Files
readest/scripts/test-open-readest-latest.ps1
T
akai d4136c53c7
CodeQL Advanced / Analyze (actions) (pull_request) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (pull_request) Waiting to run
CodeQL Advanced / Analyze (rust) (pull_request) Waiting to run
PR checks / rust_lint (pull_request) Waiting to run
PR checks / build_web_app (pull_request) Waiting to run
PR checks / test_web_app (1) (pull_request) Waiting to run
PR checks / test_web_app (2) (pull_request) Waiting to run
PR checks / test_extensions (pull_request) Waiting to run
PR checks / build_tauri_app (pull_request) Waiting to run
Merge remote-tracking branch 'origin/codex/full-book-translation' into codex/readest-web-translation-base
# Conflicts:
#	apps/readest-app/src/app/library/components/BookshelfItem.tsx
#	apps/readest-app/src/app/review-editor/ReviewEditorLauncher.tsx
#	apps/readest-app/src/services/reviewEditorService.ts
#	apps/readest-app/tools/epub-review-editor/MAINTENANCE.md
#	apps/readest-app/tools/epub-review-editor/README.md
#	apps/readest-app/tools/epub-review-editor/static/index.html
#	apps/readest-app/tools/epub-review-editor/version.py
#	scripts/open-readest-latest.ps1
2026-07-10 15:34:51 +08:00

29 lines
1.5 KiB
PowerShell

$ErrorActionPreference = "Stop"
$ScriptPath = Join-Path $PSScriptRoot "open-readest-latest.ps1"
$ScriptText = Get-Content -LiteralPath $ScriptPath -Raw
function Assert-Match {
param(
[string]$Pattern,
[string]$Message
)
if ($ScriptText -notmatch $Pattern) {
throw $Message
}
}
Assert-Match '\[string\]\$Remote\s*=\s*"akai-tools"' "Launcher must pull from akai-tools by default."
Assert-Match '\[switch\]\$Desktop' "Launcher must expose an explicit desktop mode."
Assert-Match 'if\s*\(\$Desktop\)[\s\S]*tauri[\s\S]*else[\s\S]*dev-web' "Launcher must default to dev-web while preserving Tauri."
Assert-Match '\$requiredCommands\s*=\s*@\("git",\s*"pnpm"\)' "Web mode must not require Cargo."
Assert-Match 'submodule\.fetchJobs=1' "Launcher must initialize missing submodules conservatively."
Assert-Match 'status\s+--porcelain\s+--untracked-files=no\s+--ignore-submodules=dirty' "Clean check must ignore runtime logs and dirty submodule contents."
Assert-Match 'Get-NetTCPConnection[^\r\n]*-LocalPort\s+3000' "Launcher must inspect the Tauri dev port before starting."
Assert-Match 'Stop-Process[^\r\n]*-Id\s+\$ownerPid' "Launcher must stop an old Readest/Next process that owns port 3000."
Assert-Match 'Port 3000 is occupied' "Launcher must report an actionable error for an unrelated port owner."
Assert-Match 'Port 3000 is still occupied' "Launcher must wait for the previous dev server to release the port."
Write-Host "open-readest-latest launcher checks passed."