feat(M01-A): 建立后端API基础骨架
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
$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."
|
||||
Reference in New Issue
Block a user