纳入移动壳烟测脚本扫描
移动壳单端门禁登记 EAS 和 Expo 烟测脚本 移动壳生产替身词扫描覆盖烟测脚本 宿主壳方案和项目记忆同步烟测脚本验收口径
This commit is contained in:
@@ -102,6 +102,7 @@ const productionSourceRoots = [
|
||||
new URL('../App.tsx', import.meta.url),
|
||||
new URL('../app.json', import.meta.url),
|
||||
new URL('../package.json', import.meta.url),
|
||||
new URL('../scripts/', import.meta.url),
|
||||
new URL('../src/', import.meta.url),
|
||||
];
|
||||
const productionFileExtensions = new Set(['.json', '.mjs', '.ts', '.tsx']);
|
||||
@@ -136,6 +137,11 @@ const requiredMobileShellSourceModules = [
|
||||
'shell/webViewHistory.ts',
|
||||
'shell/webViewPolicy.ts',
|
||||
];
|
||||
const requiredMobileShellScriptModules = [
|
||||
'check-eas-build-config.mjs',
|
||||
'check-expo-config.mjs',
|
||||
'check-expo-export.mjs',
|
||||
];
|
||||
const devScaffoldTerms = [
|
||||
'mo' + 'ck',
|
||||
'fa' + 'ke',
|
||||
@@ -440,7 +446,7 @@ function collectProductionSourceFiles(entry) {
|
||||
if (!productionFileExtensions.has(extension)) {
|
||||
return [];
|
||||
}
|
||||
if (path.includes('.test.') || path.includes('/scripts/check-')) {
|
||||
if (path.includes('.test.') || path.endsWith('/scripts/check-config.mjs')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -512,6 +518,17 @@ assertSameList(
|
||||
requiredMobileShellSourceModules,
|
||||
'mobile shell source modules',
|
||||
);
|
||||
assertSameList(
|
||||
fs
|
||||
.readdirSync(new URL('../scripts/', import.meta.url), {
|
||||
withFileTypes: true,
|
||||
})
|
||||
.filter((entry) => entry.isFile() && entry.name !== 'check-config.mjs')
|
||||
.map((entry) => entry.name)
|
||||
.sort(),
|
||||
requiredMobileShellScriptModules,
|
||||
'mobile shell smoke scripts',
|
||||
);
|
||||
|
||||
assertNoDevScaffoldTerms(
|
||||
productionSourceRoots.flatMap((root) => collectProductionSourceFiles(root)),
|
||||
|
||||
Reference in New Issue
Block a user