build: exclude plugin sdk build info from npm pack

This commit is contained in:
Peter Steinberger
2026-04-08 02:42:42 +01:00
parent c33ad415df
commit da858c326b
3 changed files with 13 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
"assets/",
"dist/",
"!dist/**/*.map",
"!dist/plugin-sdk/.tsbuildinfo",
"docs/",
"!docs/.generated/**",
"!docs/.i18n/zh-CN.tm.jsonl",

View File

@@ -33,7 +33,12 @@ const requiredPathGroups = [
"dist/channel-catalog.json",
"dist/control-ui/index.html",
];
const forbiddenPrefixes = ["dist-runtime/", "dist/OpenClaw.app/", "docs/.generated/"];
const forbiddenPrefixes = [
"dist-runtime/",
"dist/OpenClaw.app/",
"dist/plugin-sdk/.tsbuildinfo",
"docs/.generated/",
];
// 2026.3.12 ballooned to ~213.6 MiB unpacked and correlated with low-memory
// startup/doctor OOM reports. Keep enough headroom for the current pack with
// restored bundled upgrade surfaces and Control UI assets while still catching

View File

@@ -256,6 +256,12 @@ describe("collectForbiddenPackPaths", () => {
"docs/.generated/config-baseline.json",
]);
});
it("blocks plugin SDK TypeScript build info from npm pack output", () => {
expect(collectForbiddenPackPaths(["dist/index.js", "dist/plugin-sdk/.tsbuildinfo"])).toEqual([
"dist/plugin-sdk/.tsbuildinfo",
]);
});
});
describe("collectMissingPackPaths", () => {