锁定总验收原生壳检查入口

反查根 check:native-shells 脚本入口

反查根 check 必须串联原生壳验收

防止全仓检查绕过移动桌面宿主壳门禁
This commit is contained in:
2026-06-21 20:46:36 +08:00
parent 2621ddc835
commit 75abcf6fd4
+15
View File
@@ -13,6 +13,7 @@ const hostBridgeProtocolDocPath =
const developmentWorkflowDocPath =
'docs/project-memory/shared-memory/development-workflow.md';
const decisionLogDocPath = 'docs/project-memory/shared-memory/decision-log.md';
const rootPackageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const productionShellScanRoots = [
'apps/mobile-shell',
@@ -59,6 +60,20 @@ const h5HostBridgeScannedFacadeImports = new Set([
'subscribeHostRuntimeChange',
'writeHostClipboardText',
]);
function assertRootNativeShellCheckScripts() {
if (rootPackageJson.scripts?.['check:native-shells'] !== 'node scripts/check-native-shells.mjs') {
throw new Error('root check:native-shells script must run scripts/check-native-shells.mjs');
}
if (
rootPackageJson.scripts?.check !==
'npm run lint && npm run test && npm run build && npm run check:content && npm run check:native-shells'
) {
throw new Error('root check script must include check:native-shells after build and content checks');
}
}
assertRootNativeShellCheckScripts();
const h5HostBridgeCallChainWrapperFiles = [
'src/hooks/useHostLifecycleActive.ts',
'src/hooks/useHostNavigationCanGoBack.ts',