27 lines
605 B
PowerShell
27 lines
605 B
PowerShell
$ErrorActionPreference = "Stop"
|
|
|
|
$requiredFiles = @(
|
|
"backend/package.json",
|
|
"backend/tsconfig.json",
|
|
"backend/.env.example",
|
|
"backend/src/app.ts",
|
|
"backend/src/config.ts",
|
|
"backend/src/routes/health.ts",
|
|
"backend/src/server.ts",
|
|
"backend/tests/backend-contract.test.mjs",
|
|
"deploy/pm2/ecosystem.config.cjs"
|
|
)
|
|
|
|
foreach ($path in $requiredFiles) {
|
|
if (-not (Test-Path $path)) {
|
|
throw "Required backend file missing: $path"
|
|
}
|
|
}
|
|
|
|
& npm --prefix backend test
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "backend contract test failed"
|
|
}
|
|
|
|
Write-Host "PASS: backend M01-A skeleton check passed."
|