games-development-ai/scripts/check-s1-scope.mjs
2026-06-04 09:45:46 +08:00

18 lines
543 B
JavaScript

import { spawnSync } from "node:child_process";
import path from "node:path";
import { fileURLToPath } from "node:url";
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
const checkScopeScript = path.join(scriptDir, "check-scope.mjs");
// 兼容旧入口:所有 S1 安全扫描和业务范围规则统一由 phase-aware gate 执行。
const result = spawnSync(process.execPath, [checkScopeScript, "--phase", "S1"], {
stdio: "inherit"
});
if (result.error) {
throw result.error;
}
process.exitCode = result.status ?? 1;