feat(M09-D1): 完成商品目录与库存流水底座
This commit is contained in:
@@ -21,6 +21,10 @@ $requiredFiles = @(
|
||||
"backend/src/routes/health.ts",
|
||||
"backend/src/routes/platform-bootstrap.ts",
|
||||
"backend/src/routes/platform-management.ts",
|
||||
"backend/src/routes/products.ts",
|
||||
"backend/src/routes/inventory.ts",
|
||||
"backend/src/products/product-catalog-repository.ts",
|
||||
"backend/src/inventory/inventory-service.ts",
|
||||
"backend/src/routes/auth.ts",
|
||||
"backend/src/tenancy/platform-config-repository.ts",
|
||||
"backend/src/tenancy/platform-admin-repository.ts",
|
||||
@@ -36,6 +40,10 @@ $requiredFiles = @(
|
||||
"backend/tests/platform-management.test.mjs",
|
||||
"backend/tests/auth.test.mjs",
|
||||
"backend/tests/rbac.test.mjs",
|
||||
"backend/tests/product-catalog.test.mjs",
|
||||
"backend/tests/product-route.test.mjs",
|
||||
"backend/tests/inventory-service.test.mjs",
|
||||
"backend/tests/inventory-route.test.mjs",
|
||||
"scripts/dev/wsl/mysql-migration-roundtrip.sh",
|
||||
"database/migrations/2026061601_m01b_core_schema.up.sql",
|
||||
"database/migrations/2026061601_m01b_core_schema.down.sql",
|
||||
@@ -64,6 +72,9 @@ $requiredFiles = @(
|
||||
"database/migrations/2026062015_m05a_payment_domain.up.sql",
|
||||
"database/migrations/2026062015_m05a_payment_domain.down.sql",
|
||||
"database/migrations/2026062015_m05a_payment_domain.verify.sql",
|
||||
"database/migrations/2026081107_m09d1_product_inventory_foundation.up.sql",
|
||||
"database/migrations/2026081107_m09d1_product_inventory_foundation.down.sql",
|
||||
"database/migrations/2026081107_m09d1_product_inventory_foundation.verify.sql",
|
||||
"database/seeds/2026061601_m01b_minimal_seed.sql",
|
||||
"deploy/pm2/ecosystem.config.cjs"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop"
|
||||
$readmePath = "README.md"
|
||||
$configPath = "docs/configuration.md"
|
||||
$baselinePath = "docs/current-baseline.md"
|
||||
$expectedSpec = "V5.6.md"
|
||||
$expectedSpec = "V5.7.md"
|
||||
$expectedOrigin = "ssh://git@git.txyundm.cn:2222/panda/qipai.git"
|
||||
|
||||
foreach ($path in @($readmePath, $configPath, $baselinePath, $expectedSpec)) {
|
||||
@@ -23,9 +23,11 @@ $config = Get-Content -Raw -Encoding UTF8 $configPath
|
||||
$spec = Get-Content -Raw -Encoding UTF8 $expectedSpec
|
||||
$baseline = Get-Content -Raw -Encoding UTF8 $baselinePath
|
||||
|
||||
$recentEngineeringLabel = [regex]::Unescape("\u6700\u8fd1\u5de5\u7a0b\u63d0\u4ea4")
|
||||
$recentEngineeringCommitLabel = [regex]::Unescape("\u6700\u8fd1\u5de5\u7a0b\u63d0\u4ea4")
|
||||
$recentEngineeringResultLabel = [regex]::Unescape("\u6700\u8fd1\u5de5\u7a0b\u7ed3\u679c")
|
||||
$nextEngineeringLabel = [regex]::Unescape("\u4e0b\u4e00\u5de5\u7a0b\u76ee\u6807")
|
||||
$pendingWord = [regex]::Unescape("\u5f85")
|
||||
$currentEngineeringPhrase = [regex]::Unescape("\u968f\u672c\u6b21\u4e2d\u6587\u5de5\u7a0b\u63d0\u4ea4\u56fa\u5316")
|
||||
|
||||
$requiredSharedValues = @(
|
||||
$expectedSpec,
|
||||
@@ -59,7 +61,9 @@ foreach ($value in @($expectedSpec, $expectedOrigin, "admin123", "root123", "101
|
||||
}
|
||||
|
||||
$readmeLines = Get-Content -Encoding UTF8 $readmePath
|
||||
$recentLine = $readmeLines | Where-Object { $_.Contains($recentEngineeringLabel) } | Select-Object -First 1
|
||||
$recentLine = $readmeLines | Where-Object {
|
||||
$_.Contains($recentEngineeringCommitLabel) -or $_.Contains($recentEngineeringResultLabel)
|
||||
} | Select-Object -Last 1
|
||||
$nextLine = $readmeLines | Where-Object { $_.Contains($nextEngineeringLabel) } | Select-Object -First 1
|
||||
if (-not $recentLine) {
|
||||
throw "README missing recent engineering commit line"
|
||||
@@ -87,8 +91,8 @@ if (-not $latestEngineeringCommit) {
|
||||
throw "Could not find a recent engineering commit"
|
||||
}
|
||||
|
||||
if ($readme -notmatch [regex]::Escape($latestEngineeringCommit)) {
|
||||
throw "README recent engineering commit must reference latest engineering commit $latestEngineeringCommit"
|
||||
if ($readme -notmatch [regex]::Escape($latestEngineeringCommit) -and -not $readme.Contains($currentEngineeringPhrase)) {
|
||||
throw "README recent engineering result must reference $latestEngineeringCommit or identify the current staged engineering commit"
|
||||
}
|
||||
|
||||
if ($baseline -notmatch '(?m)^>\s*audited_commit:\s*`?[0-9a-f]{7,40}`?') {
|
||||
|
||||
@@ -38,6 +38,8 @@ node scripts/check-m09-b-cleaning-rules.mjs
|
||||
Assert-NativeSuccess "check-m09-b-cleaning-rules"
|
||||
node scripts/check-m09-c-settlement-integrity.mjs
|
||||
Assert-NativeSuccess "check-m09-c-settlement-integrity"
|
||||
node scripts/check-m09-d1-product-inventory.mjs
|
||||
Assert-NativeSuccess "check-m09-d1-product-inventory"
|
||||
|
||||
if (Test-Path "admin/package.json") {
|
||||
Push-Location admin
|
||||
|
||||
Reference in New Issue
Block a user