mirror of
https://github.com/motajs/template.git
synced 2026-10-16 10:30:18 +08:00
docs(09): tighten 09-20 logger.json gates to error section (76/77/78 present + exact 75 preserved)
This commit is contained in:
parent
618dbb7654
commit
b0229c627f
@ -202,7 +202,7 @@ Phase 9 · 任务 10 · 第 20 个计划 —— **实现数据端插件驱动 +
|
||||
</options>
|
||||
<resume-signal>回复「可以执行」即可(默认采用 OI-5=`IClientCore`、OI-6/7/8=按 D-92(环 76 / 依赖不存在 77 / 重复 id 78 且不覆盖)、OI-9=不改 `super(...)`、OI-10=允许新增测试、OI-11=按提议消息文本)。如需调整任一 `open_items`,请在回复中一并指明。</resume-signal>
|
||||
<verify>
|
||||
<automated>node -e "const fs=require('fs');const bad=[];const must=['packages-user/data-state/src/types.ts','packages-user/data-state/src/core.ts','packages-user/data-state/src/index.ts','packages-user/data-state/src/loader/loader.ts','packages-user/data-state/src/ins.ts','packages-user/client-modules/src/types.ts','packages-user/client-modules/src/client.ts','packages-user/client-system/src/types.ts','packages-user/client-base/src/types.ts','packages/common/src/logger.json'];for(const p of must){if(!fs.existsSync(p))bad.push('missing ref: '+p)}const ts=fs.readFileSync('packages-user/data-state/src/types.ts','utf8');for(const tok of ['PluginStatus','IDataPlugin','IDataPluginDefine','getDataPlugin'])if(ts.indexOf(tok)<0)bad.push('types.ts missing '+tok);const core=fs.readFileSync('packages-user/data-state/src/core.ts','utf8');if(core.indexOf('this.plugins')<0)bad.push('core.ts does not reference this.plugins');if(core.indexOf('getDataPlugin')<0)bad.push('core.ts missing getDataPlugin');const lg=fs.readFileSync('packages/common/src/logger.json','utf8');if(lg.indexOf('Plugin ') <0)bad.push('logger.json missing plugin error code (expect user WIP error 75)');if(!/\"75\"\s*:/.test(lg))bad.push('logger.json missing existing error 75');const ins=fs.readFileSync('packages-user/data-state/src/ins.ts','utf8');if(ins.indexOf('new CoreState(')<0)bad.push('ins.ts: expected existing module-level CoreState singleton (no plugins)');for(const p of ['packages-user/data-state/src/plugin.ts','packages-user/data-state/src/__test__/plugin.test.ts']){if(fs.existsSync(p))bad.push('post-state already exists: '+p)}if(bad.length>0){console.error('PRESTATE FAILED :: '+bad.join(' ; '));process.exit(1)}console.log('OK pre-execution state: plugin types + core shells + logger error 75 (user WIP) + unconfigured call sites present; plugin.ts and plugin.test.ts absent')"</automated>
|
||||
<automated>node -e "const fs=require('fs');const bad=[];const must=['packages-user/data-state/src/types.ts','packages-user/data-state/src/core.ts','packages-user/data-state/src/index.ts','packages-user/data-state/src/loader/loader.ts','packages-user/data-state/src/ins.ts','packages-user/client-modules/src/types.ts','packages-user/client-modules/src/client.ts','packages-user/client-system/src/types.ts','packages-user/client-base/src/types.ts','packages/common/src/logger.json'];for(const p of must){if(!fs.existsSync(p))bad.push('missing ref: '+p)}const ts=fs.readFileSync('packages-user/data-state/src/types.ts','utf8');for(const tok of ['PluginStatus','IDataPlugin','IDataPluginDefine','getDataPlugin'])if(ts.indexOf(tok)<0)bad.push('types.ts missing '+tok);const core=fs.readFileSync('packages-user/data-state/src/core.ts','utf8');if(core.indexOf('this.plugins')<0)bad.push('core.ts does not reference this.plugins');if(core.indexOf('getDataPlugin')<0)bad.push('core.ts missing getDataPlugin');const lg=JSON.parse(fs.readFileSync('packages/common/src/logger.json','utf8')).error;if(!('75' in lg)||typeof lg['75']!=='string')bad.push('logger.json error missing user WIP code 75');else if(lg['75'].indexOf('Plugin ')<0)bad.push('logger.json error 75 is not the expected user-WIP plugin message');const ins=fs.readFileSync('packages-user/data-state/src/ins.ts','utf8');if(ins.indexOf('new CoreState(')<0)bad.push('ins.ts: expected existing module-level CoreState singleton (no plugins)');for(const p of ['packages-user/data-state/src/plugin.ts','packages-user/data-state/src/__test__/plugin.test.ts']){if(fs.existsSync(p))bad.push('post-state already exists: '+p)}if(bad.length>0){console.error('PRESTATE FAILED :: '+bad.join(' ; '));process.exit(1)}console.log('OK pre-execution state: plugin types + core shells + logger error 75 (user WIP) + unconfigured call sites present; plugin.ts and plugin.test.ts absent')"</automated>
|
||||
<fails_when>non-zero exit, 或 stderr 含 "PRESTATE FAILED"(插件类型 / core 空壳 / logger error 75 / 未配置插件配置的既有调用点任一缺失,或 `plugin.ts` / `plugin.test.ts` 已存在)</fails_when>
|
||||
<human-check>用户在对话中明确回复「可以执行」(若就 OI-1..OI-11 给出非默认指定,须在汇报与后续任务中据其指定执行)</human-check>
|
||||
</verify>
|
||||
@ -279,7 +279,7 @@ Phase 9 · 任务 10 · 第 20 个计划 —— **实现数据端插件驱动 +
|
||||
<verify>
|
||||
<automated>pnpm exec vitest run packages-user/data-state/src/__test__/plugin.test.ts</automated>
|
||||
<fails_when>non-zero exit, 或任一审定失败(拓扑序错误 / 环未排除 / 依赖不存在未排除 / `CoreState.load()` 四段调用顺序不符 / `PluginStatus` 推进不符 / 环上或依赖不存在插件被初始化 / 重复 id 覆盖了原插件 / **省略 `plugins` 构造并 `load()` 抛错**)</fails_when>
|
||||
<automated>node -e "const fs=require('fs');const bad=[];const plug=fs.readFileSync('packages-user/data-state/src/plugin.ts','utf8');if(!/export function orderPlugins/.test(plug))bad.push('plugin.ts: orderPlugins not exported');for(const iface of ['IPluginDepends','IPluginHolder','IPluginOrderResult']){if(!new RegExp('export interface '+iface).test(plug))bad.push('plugin.ts: missing '+iface)}if(!/missing\s*:/.test(plug))bad.push('plugin.ts: IPluginOrderResult lacks missing member');if(/(^|[^a-zA-Z])import[^a-zA-Z]/.test(plug))bad.push('plugin.ts: expected zero imports');const lg=fs.readFileSync('packages/common/src/logger.json','utf8');for(const code of ['75','76','77','78']){if(!new RegExp('\"'+code+'\"\\\\s*:').test(lg))bad.push('logger.json missing error '+code)}const core=fs.readFileSync('packages-user/data-state/src/core.ts','utf8');if(core.indexOf('orderPlugins')<0)bad.push('core.ts: does not use orderPlugins');if(!/plugins\s*:\s*Map<string,\s*IDataPlugin/.test(core))bad.push('core.ts: missing plugins registry typed Map<string, IDataPlugin<...>>');if(!/config\.plugins\s*\?\?\s*\[\]/.test(core))bad.push('core.ts: registry build NOT runtime-guarded (config.plugins ?? [])');if(!/this\.plugins\.has\(/.test(core))bad.push('core.ts: duplicate id not guarded (no this.plugins.has before set)');if(core.indexOf('logger.error(78')<0)bad.push('core.ts: duplicate id not logged via logger.error(78, ...)');if(/protected\s+awake\s*\(/.test(core)===false)bad.push('core.ts: awake not protected');if(!/protected\s+async\s+initialize\s*\(/.test(core))bad.push('core.ts: initialize not protected');if(!/protected\s+async\s+afterLoad\s*\(/.test(core))bad.push('core.ts: afterLoad not protected');if(core.indexOf('this.loader.start()')<0)bad.push('core.ts: load() does not drive loader.start()');if(core.indexOf('PluginStatus.Awakened')<0||core.indexOf('PluginStatus.Initialized')<0||core.indexOf('PluginStatus.Loaded')<0)bad.push('core.ts: PluginStatus transitions missing');if(core.indexOf('logger.error(76')<0)bad.push('core.ts: cycle not logged via logger.error(76, ...)');if(core.indexOf('logger.error(77')<0)bad.push('core.ts: missing dependency not logged via logger.error(77, ...)');if(core.indexOf('logger.error(75')>=0)bad.push('core.ts: must NOT reuse logger.error(75) for plugin errors');const idx=fs.readFileSync('packages-user/data-state/src/index.ts','utf8');if(idx.indexOf(\"'./plugin'\")<0)bad.push('index.ts: missing ./plugin barrel export');if(bad.length>0){console.error('DATA PLUGIN GATE FAILED :: '+bad.join(' ; '));process.exit(1)}console.log('OK data-side plugin driver wiring present (registry runtime-guarded, dup-id no-overwrite, 76/77/78 logged)')"</automated>
|
||||
<automated>node -e "const fs=require('fs');const bad=[];const plug=fs.readFileSync('packages-user/data-state/src/plugin.ts','utf8');if(!/export function orderPlugins/.test(plug))bad.push('plugin.ts: orderPlugins not exported');for(const iface of ['IPluginDepends','IPluginHolder','IPluginOrderResult']){if(!new RegExp('export interface '+iface).test(plug))bad.push('plugin.ts: missing '+iface)}if(!/missing\s*:/.test(plug))bad.push('plugin.ts: IPluginOrderResult lacks missing member');if(/(^|[^a-zA-Z])import[^a-zA-Z]/.test(plug))bad.push('plugin.ts: expected zero imports');const lj=JSON.parse(fs.readFileSync('packages/common/src/logger.json','utf8'));const d=String.fromCharCode(36);if(!('76' in lj.error)||!('77' in lj.error)||!('78' in lj.error))bad.push('logger.json error section missing 76/77/78');if(lj.error['75']!=='Plugin '+d+'1 error, related plugins will not be initialized. Error info: '+d+'2.')bad.push('logger.json error.75 modified (existing user-WIP entry must be preserved)');const core=fs.readFileSync('packages-user/data-state/src/core.ts','utf8');if(core.indexOf('orderPlugins')<0)bad.push('core.ts: does not use orderPlugins');if(!/plugins\s*:\s*Map<string,\s*IDataPlugin/.test(core))bad.push('core.ts: missing plugins registry typed Map<string, IDataPlugin<...>>');if(!/config\.plugins\s*\?\?\s*\[\]/.test(core))bad.push('core.ts: registry build NOT runtime-guarded (config.plugins ?? [])');if(!/this\.plugins\.has\(/.test(core))bad.push('core.ts: duplicate id not guarded (no this.plugins.has before set)');if(core.indexOf('logger.error(78')<0)bad.push('core.ts: duplicate id not logged via logger.error(78, ...)');if(/protected\s+awake\s*\(/.test(core)===false)bad.push('core.ts: awake not protected');if(!/protected\s+async\s+initialize\s*\(/.test(core))bad.push('core.ts: initialize not protected');if(!/protected\s+async\s+afterLoad\s*\(/.test(core))bad.push('core.ts: afterLoad not protected');if(core.indexOf('this.loader.start()')<0)bad.push('core.ts: load() does not drive loader.start()');if(core.indexOf('PluginStatus.Awakened')<0||core.indexOf('PluginStatus.Initialized')<0||core.indexOf('PluginStatus.Loaded')<0)bad.push('core.ts: PluginStatus transitions missing');if(core.indexOf('logger.error(76')<0)bad.push('core.ts: cycle not logged via logger.error(76, ...)');if(core.indexOf('logger.error(77')<0)bad.push('core.ts: missing dependency not logged via logger.error(77, ...)');if(core.indexOf('logger.error(75')>=0)bad.push('core.ts: must NOT reuse logger.error(75) for plugin errors');const idx=fs.readFileSync('packages-user/data-state/src/index.ts','utf8');if(idx.indexOf(\"'./plugin'\")<0)bad.push('index.ts: missing ./plugin barrel export');if(bad.length>0){console.error('DATA PLUGIN GATE FAILED :: '+bad.join(' ; '));process.exit(1)}console.log('OK data-side plugin driver wiring present (registry runtime-guarded, dup-id no-overwrite, 76/77/78 logged)')"</automated>
|
||||
<fails_when>non-zero exit, 或 stderr 含 "DATA PLUGIN GATE FAILED"(`plugin.ts` 未导出 `orderPlugins`/三接口、缺 `missing` 成员或含 import / `logger.json` 缺 75/76/77/78 任一 / `core.ts` 未用 `orderPlugins`、缺 `plugins` 注册表、**注册表构建未带 `config.plugins ?? []` 守卫**、**重复 id 未用 `this.plugins.has` 判重或未报 78**、三阶段非 `protected`、`load()` 未驱动 `loader.start()`、缺 `PluginStatus` 推进、缺 76 / 77、**仍使用 `logger.error(75`**、`index.ts` 缺 `./plugin` 桶导出)</fails_when>
|
||||
<automated>node -e "const fs=require('fs'),path=require('path');const root='packages-user/data-state/src';const bad=[];const walk=d=>{for(const e of fs.readdirSync(d,{withFileTypes:true})){const p=path.join(d,e.name);if(e.isDirectory()){if(e.name==='__test__')continue;walk(p)}else if(e.name.endsWith('.ts')){const t=fs.readFileSync(p,'utf8');if(/from ['\u0022]@user\/client-(modules|base|system)['\u0022]/.test(t))bad.push(p)}}};walk(root);if(bad.length>0){console.error('ACYCLIC GATE FAILED :: data-state imports render-side packages :: '+bad.join(' | '));process.exit(1)}console.log('OK acyclic: data-state/src has no import of @user/client-* (no reverse dependency)')"</automated>
|
||||
<fails_when>non-zero exit, 或 stderr 含 "ACYCLIC GATE FAILED"(`packages-user/data-state/src/**` 出现对 `@user/client-modules` / `@user/client-base` / `@user/client-system` 的导入)</fails_when>
|
||||
@ -334,12 +334,12 @@ Phase 9 · 任务 10 · 第 20 个计划 —— **实现数据端插件驱动 +
|
||||
</action>
|
||||
<reversibility rating="reversible">在 `types.ts` 追加渲染端插件类型、在 `client.ts` 追加渲染端注册表与三阶段覆写(含错误处置);`git checkout` / 删除追加块可整体回退;未改数据端已落地内容、未改任何调用点、未改 `logger.json`(76/77/78 已由 Task 1 落盘)。</reversibility>
|
||||
<verify>
|
||||
<automated>node -e "const fs=require('fs');const bad=[];const ty=fs.readFileSync('packages-user/client-modules/src/types.ts','utf8');for(const t of ['IClientPlugin','IClientPluginDefine','clientPlugins','getClientPlugin']){if(ty.indexOf(t)<0)bad.push('types.ts missing '+t)}if(!/from ['\u0022]@user\/data-state['\u0022]/.test(ty))bad.push('types.ts does not import from @user/data-state');if(ty.indexOf('PluginStatus')<0)bad.push('types.ts does not use PluginStatus');if(/export\s+(const\s+)?enum\s+PluginStatus/.test(ty))bad.push('types.ts must not redefine PluginStatus');const cl=fs.readFileSync('packages-user/client-modules/src/client.ts','utf8');if(!/clientPlugins\s*:\s*Map<string,\s*IClientPlugin/.test(cl))bad.push('client.ts missing clientPlugins registry');if(!/config\.clientPlugins\s*\?\?\s*\[\]/.test(cl))bad.push('client.ts: registry build NOT runtime-guarded (config.clientPlugins ?? [])');if(!/this\.clientPlugins\.has\(/.test(cl))bad.push('client.ts: duplicate id not guarded (no this.clientPlugins.has before set)');if(cl.indexOf('logger.error(78')<0)bad.push('client.ts: duplicate id not logged via logger.error(78, ...)');if(cl.indexOf('getClientPlugin')<0)bad.push('client.ts missing getClientPlugin');if(!/protected\s+awake\s*\(/.test(cl))bad.push('client.ts awake not overridden as protected');if(!/protected\s+async\s+initialize\s*\(/.test(cl))bad.push('client.ts initialize not overridden');if(!/protected\s+async\s+afterLoad\s*\(/.test(cl))bad.push('client.ts afterLoad not overridden');if(!/super\.awake\s*\(/.test(cl)||!/super\.initialize\s*\(/.test(cl)||!/super\.afterLoad\s*\(/.test(cl))bad.push('client.ts phase overrides must call super.<stage>() first');if(cl.indexOf('logger.error(76')<0)bad.push('client.ts: cycle not logged via logger.error(76, ...)');if(cl.indexOf('logger.error(77')<0)bad.push('client.ts: missing dependency not logged via logger.error(77, ...)');if(!/import\s*\{[\s\S]*?orderPlugins[\s\S]*?\}\s*from\s*['\u0022]@user\/data-state['\u0022]/.test(cl))bad.push('client.ts: orderPlugins must be imported from @user/data-state');if(/from\s*['\u0022]\.\/plugin['\u0022]/.test(cl))bad.push('client.ts: must not import a local plugin module (client-modules has none)');if(/export\s+(const\s+)?enum\s+PluginStatus/.test(cl))bad.push('client.ts must not redefine PluginStatus');if(bad.length>0){console.error('RENDER PLUGIN GATE FAILED :: '+bad.join(' ; '));process.exit(1)}console.log('OK render-side plugin mirror wiring present (registry runtime-guarded, dup-id no-overwrite, 76/77/78 logged, orderPlugins from @user/data-state)')"</automated>
|
||||
<automated>node -e "const fs=require('fs');const bad=[];const ty=fs.readFileSync('packages-user/client-modules/src/types.ts','utf8');for(const t of ['IClientPlugin','IClientPluginDefine','clientPlugins','getClientPlugin']){if(ty.indexOf(t)<0)bad.push('types.ts missing '+t)}if(!/from ['\u0022]@user\/data-state['\u0022]/.test(ty))bad.push('types.ts does not import from @user/data-state');if(ty.indexOf('PluginStatus')<0)bad.push('types.ts does not use PluginStatus');if(/export\s+(const\s+)?enum\s+PluginStatus/.test(ty))bad.push('types.ts must not redefine PluginStatus');const cl=fs.readFileSync('packages-user/client-modules/src/client.ts','utf8');if(!/clientPlugins\s*:\s*Map<string,\s*IClientPlugin/.test(cl))bad.push('client.ts missing clientPlugins registry');if(!/config\.clientPlugins\s*\?\?\s*\[\]/.test(cl))bad.push('client.ts: registry build NOT runtime-guarded (config.clientPlugins ?? [])');if(!/this\.clientPlugins\.has\(/.test(cl))bad.push('client.ts: duplicate id not guarded (no this.clientPlugins.has before set)');if(cl.indexOf('logger.error(78')<0)bad.push('client.ts: duplicate id not logged via logger.error(78, ...)');if(cl.indexOf('getClientPlugin')<0)bad.push('client.ts missing getClientPlugin');if(!/protected\s+awake\s*\(/.test(cl))bad.push('client.ts awake not overridden as protected');if(!/protected\s+async\s+initialize\s*\(/.test(cl))bad.push('client.ts initialize not overridden');if(!/protected\s+async\s+afterLoad\s*\(/.test(cl))bad.push('client.ts afterLoad not overridden');if(!/super\.awake\s*\(/.test(cl)||!/super\.initialize\s*\(/.test(cl)||!/super\.afterLoad\s*\(/.test(cl))bad.push('client.ts phase overrides must call super.<stage>() first');if(cl.indexOf('logger.error(76')<0)bad.push('client.ts: cycle not logged via logger.error(76, ...)');if(cl.indexOf('logger.error(77')<0)bad.push('client.ts: missing dependency not logged via logger.error(77, ...)');if(cl.indexOf('logger.error(75')>=0)bad.push('client.ts: must NOT reuse logger.error(75) for plugin errors');if(!/import\s*\{[\s\S]*?orderPlugins[\s\S]*?\}\s*from\s*['\u0022]@user\/data-state['\u0022]/.test(cl))bad.push('client.ts: orderPlugins must be imported from @user/data-state');if(/from\s*['\u0022]\.\/plugin['\u0022]/.test(cl))bad.push('client.ts: must not import a local plugin module (client-modules has none)');if(/export\s+(const\s+)?enum\s+PluginStatus/.test(cl))bad.push('client.ts must not redefine PluginStatus');if(bad.length>0){console.error('RENDER PLUGIN GATE FAILED :: '+bad.join(' ; '));process.exit(1)}console.log('OK render-side plugin mirror wiring present (registry runtime-guarded, dup-id no-overwrite, 76/77/78 logged, orderPlugins from @user/data-state)')"</automated>
|
||||
<fails_when>non-zero exit, 或 stderr 含 "RENDER PLUGIN GATE FAILED"(`types.ts` 缺 `IClientPlugin`/`IClientPluginDefine`/`clientPlugins`/`getClientPlugin`、未从 `@user/data-state` 导入或未用 `PluginStatus`、或自建了 `PluginStatus` 枚举;`client.ts` 缺 `clientPlugins` 注册表 / **缺 `config.clientPlugins ?? []` 守卫** / **缺 `this.clientPlugins.has` 判重或未报 78** / `getClientPlugin` / 三阶段 `protected` 覆写 / `super.<stage>()` / 缺 76 / 缺 77 / **`orderPlugins` 未自 `@user/data-state` 导入或指向本地模块** / 自建 `PluginStatus`)</fails_when>
|
||||
<!-- plan-criteria-allow: R4 - SCOPE GATE 内的 git status 由 node execSync 调用并以 try/catch 捕获失败(失败即非零退出),同行的 `|` 属 JS 正则/字符串,非 shell 管道阶段 -->
|
||||
<automated>node -e "const {execSync}=require('child_process');let raw;try{raw=execSync('git status --porcelain',{encoding:'utf8'})}catch(e){console.error('SCOPE GATE FAILED :: git status failed :: '+e.message);process.exit(1)}const lines=raw.split(/\r?\n/).filter(Boolean);const allow=new Set(['packages-user/data-state/src/plugin.ts','packages-user/data-state/src/core.ts','packages-user/data-state/src/index.ts','packages-user/data-state/src/__test__/plugin.test.ts','packages-user/client-modules/src/types.ts','packages-user/client-modules/src/client.ts','packages/common/src/logger.json','.planning/phases/09-minimum-browser-runnable/09-20-SUMMARY.md']);const userWip=new Set(['AGENTS.md','.planning/phases/09-minimum-browser-runnable/09-CONTEXT.md','index.html','packages-user/client-modules/src/index.ts','packages-user/data-base/src/hero/attribute.ts','packages-user/data-base/src/hero/state.ts','packages-user/data-base/src/hero/types.ts','packages-user/data-state/src/types.ts']);const bad=[];for(const l of lines){const p=l.slice(3).trim().replace(/^\u0022|\u0022$/g,'');if(allow.has(p)||userWip.has(p))continue;if(p==='src/bootstrap.ts'||p.startsWith('src/client/')||p.startsWith('src/data/')||p==='src/constant.ts')continue;bad.push(p)}if(bad.length>0){console.error('SCOPE GATE FAILED :: out-of-scope changes :: '+bad.join(' | '));process.exit(1)}console.log('OK scope: only this plan files_modified changed (user WIP ignored)')"</automated>
|
||||
<fails_when>non-zero exit, 或 stderr 含 "SCOPE GATE FAILED"(本计划执行期改动了 `files_modified` 与用户并发 WIP 之外的任何文件——例如 `packages-user/client-base/**`、`packages-user/data-base/**`、`packages-user/data-state/src/types.ts`、`packages-user/data-state/src/ins.ts`、`packages/common/**`(`src/logger.json` 除外)、`package.json`、lockfile、`src/**`、其它 `.planning/**`)</fails_when>
|
||||
<automated>node -e "const fs=require('fs');const bad=[];const idx=fs.readFileSync('packages-user/client-modules/src/index.ts','utf8');if(idx.indexOf(\"'./types'\")<0)bad.push('index.ts no longer exports ./types');const lg=fs.readFileSync('packages/common/src/logger.json','utf8');for(const code of ['76','77','78']){if(!new RegExp('\"'+code+'\"\\\\s*:').test(lg))bad.push('logger.json missing error '+code)}if(bad.length>0){console.error('BARREL/LOGGER FAILED :: '+bad.join(' ; '));process.exit(1)}console.log('OK barrel routes preserved and logger.json carries 76/77/78')"</automated>
|
||||
<automated>node -e "const fs=require('fs');const bad=[];const idx=fs.readFileSync('packages-user/client-modules/src/index.ts','utf8');if(idx.indexOf(\"'./types'\")<0)bad.push('index.ts no longer exports ./types');const lj=JSON.parse(fs.readFileSync('packages/common/src/logger.json','utf8'));const d=String.fromCharCode(36);if(!('76' in lj.error)||!('77' in lj.error)||!('78' in lj.error))bad.push('logger.json error section missing 76/77/78');if(lj.error['75']!=='Plugin '+d+'1 error, related plugins will not be initialized. Error info: '+d+'2.')bad.push('logger.json error.75 modified (existing user-WIP entry must be preserved)');if(bad.length>0){console.error('BARREL/LOGGER FAILED :: '+bad.join(' ; '));process.exit(1)}console.log('OK barrel routes preserved and logger.json carries 76/77/78')"</automated>
|
||||
<fails_when>non-zero exit(`client-modules/src/index.ts` 的 `./types` 桶导出被破坏,或 `logger.json` 缺 76/77/78)</fails_when>
|
||||
</verify>
|
||||
<acceptance_criteria>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user