


























@@ -40,13 +40,13 @@ import {
4040runInstalledWorkspaceBootstrapSmoke,
4141WORKSPACE_TEMPLATE_PACK_PATHS,
4242} from "./lib/workspace-bootstrap-smoke.mjs";
43+import { resolveNpmRunner } from "./npm-runner.mjs";
4344import {
4445collectInstalledPackageErrors,
4546normalizeInstalledBinaryVersion,
4647resolveInstalledBinaryCommandInvocation,
4748resolveInstalledBinaryPath,
4849} from "./openclaw-npm-postpublish-verify.ts";
49-import { resolveNpmRunner } from "./npm-runner.mjs";
5050import { listStaticExtensionAssetOutputs } from "./runtime-postbuild.mjs";
5151import { sparkleBuildFloorsFromShortVersion, type SparkleBuildFloors } from "./sparkle-build.ts";
5252import { buildCmdExeCommandLine } from "./windows-cmd-helpers.mjs";
@@ -117,6 +117,7 @@ const forbiddenPrivateQaContentMarkers = [
117117"qa-lab/runtime-api.js",
118118] as const;
119119const forbiddenPrivateQaContentScanPrefixes = ["dist/"] as const;
120+const forbiddenPluginSdkRootAliasMinifiedExportPattern = /\bmod\.[A-Za-z_$]\b/u;
120121const appcastPath = resolve("appcast.xml");
121122const laneBuildMin = 1_000_000_000;
122123const laneFloorAdoptionDateKey = 20260227;
@@ -297,11 +298,14 @@ function runPackDry(): PackResult[] {
297298}
298299299300function runPack(packDestination: string): PackResult[] {
300- const raw = execNpm(["pack", "--json", "--ignore-scripts", "--pack-destination", packDestination], {
301-encoding: "utf8",
302-stdio: ["ignore", "pipe", "pipe"],
303-maxBuffer: 1024 * 1024 * 100,
304-});
301+ const raw = execNpm(
302+["pack", "--json", "--ignore-scripts", "--pack-destination", packDestination],
303+{
304+encoding: "utf8",
305+stdio: ["ignore", "pipe", "pipe"],
306+maxBuffer: 1024 * 1024 * 100,
307+},
308+);
305309return JSON.parse(raw) as PackResult[];
306310}
307311@@ -443,6 +447,15 @@ export function collectPackedInstalledPackageVerificationErrors(params: {
443447`installed openclaw binary version mismatch: expected ${params.expectedVersion}, found ${params.installedBinaryVersion || "<missing>"}.`,
444448);
445449}
450+const rootAliasPath = join(params.packageRoot, "dist", "plugin-sdk", "root-alias.cjs");
451+if (existsSync(rootAliasPath)) {
452+const rootAliasSource = readFileSync(rootAliasPath, "utf8");
453+if (forbiddenPluginSdkRootAliasMinifiedExportPattern.test(rootAliasSource)) {
454+errors.push(
455+"installed package dist/plugin-sdk/root-alias.cjs depends on a single-letter bundled export alias.",
456+);
457+}
458+}
446459return errors;
447460}
448461此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。