From 69c9cfeade7b819aee12615b0e8d93a019ac7910 Mon Sep 17 00:00:00 2001 From: HIsheR Date: Mon, 26 Oct 2026 21:41:50 +0800 Subject: [PATCH] =?UTF-8?q?iter(g241):=20verify=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=BC=94=E7=A4=BA=E9=94=9A=E7=82=B9=E5=A4=A7=E5=86=99=E9=98=B2?= =?UTF-8?q?=E6=8A=A4=EF=BC=8C=E9=98=B2=E5=A4=A7=E5=86=99=E9=94=9A=E7=82=B9?= =?UTF-8?q?=E8=A2=AB=E9=9D=99=E9=BB=98=E5=90=9E=E6=8E=89=E8=AF=AF=E6=8A=A5?= =?UTF-8?q?=E7=BC=BA=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/tools/cli/bin/ua.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/tools/cli/bin/ua.js b/packages/tools/cli/bin/ua.js index 95279d7..be764d4 100644 --- a/packages/tools/cli/bin/ua.js +++ b/packages/tools/cli/bin/ua.js @@ -1458,6 +1458,9 @@ function cmdVerify() { const demoPath = path.join(ROOT, 'apps', 'demo', 'main.ts'); // 演示区块定义在源码里(产物是打包后的 JS) const demoSource = fs.existsSync(demoPath) ? fs.readFileSync(demoPath, 'utf8') : ''; const anchors = new Set(demoSource.match(/sec-[a-z0-9-]+/g) ?? []); // 已定义的区块锚点 + for (const raw of demoSource.match(/sec-[A-Za-z0-9-]+/g) ?? []) { + if (/[A-Z]/.test(raw)) issues.push(`demo 锚点 ${raw} 含大写字母:锚点口径只认 sec-[a-z0-9-](大写会被锚点集合静默吞掉, manifests 登记后会误报「缺 section」)`); // 防大写锚点静默失踪(g234 实踩) + } const tokenVars = new Set(loadTokenList().map((t) => t.cssVar)); // 令牌白名单:tokens.json 拍平结果 if (demoSource) issues.push(...checkDemoBundle(anchors)); // 产物与源码同步校验 if (!demoSource) console.log('verify: 未找到 apps/demo/main.ts,跳过 demo 锚点校验');