feat(M01-A): 建立后端API基础骨架

This commit is contained in:
Codex
2026-06-16 20:37:55 +08:00
parent eb259ce2a4
commit 98b66d22f2
22 changed files with 437 additions and 19 deletions
+16 -4
View File
@@ -2,14 +2,17 @@ $ErrorActionPreference = "Stop"
$head = (& git rev-parse HEAD).Trim()
$shortHead = (& git rev-parse --short HEAD).Trim()
$backendBuild = if (Test-Path "backend/package.json") { "PROJECT_PRESENT_BUILD_NOT_RUN" } else { "SKIPPED_NO_PROJECT" }
$adminBuild = if (Test-Path "admin/package.json") { "PROJECT_PRESENT_BUILD_NOT_RUN" } else { "SKIPPED_NO_PROJECT" }
$rawText = @"
{
"releaseId": "DRYRUN-$shortHead",
"generatedAt": "WINDOWS_CHECK",
"commit": "$head",
"branch": "main",
"backendBuild": "SKIPPED_NO_PROJECT",
"adminBuild": "SKIPPED_NO_PROJECT",
"backendBuild": "$backendBuild",
"adminBuild": "$adminBuild",
"miniappMirror": "RECORDED_SOURCE_COMMIT_ONLY",
"databaseMigration": "SKIPPED_NO_MIGRATIONS",
"deployed": false
@@ -39,8 +42,17 @@ if ($manifest.deployed -ne $false) {
throw "Dry-run manifest must not mark deployed=true"
}
if ($manifest.backendBuild -ne "SKIPPED_NO_PROJECT" -or $manifest.adminBuild -ne "SKIPPED_NO_PROJECT") {
throw "Dry-run manifest should record skipped builds until projects exist"
if ((Test-Path "backend/package.json") -and $manifest.backendBuild -ne "PROJECT_PRESENT_BUILD_NOT_RUN") {
throw "Dry-run manifest should record backend project presence"
}
if ((-not (Test-Path "backend/package.json")) -and $manifest.backendBuild -ne "SKIPPED_NO_PROJECT") {
throw "Dry-run manifest should record missing backend project"
}
if ((Test-Path "admin/package.json") -and $manifest.adminBuild -ne "PROJECT_PRESENT_BUILD_NOT_RUN") {
throw "Dry-run manifest should record admin project presence"
}
if ((-not (Test-Path "admin/package.json")) -and $manifest.adminBuild -ne "SKIPPED_NO_PROJECT") {
throw "Dry-run manifest should record missing admin project"
}
if ($manifest.databaseMigration -ne "SKIPPED_NO_MIGRATIONS") {