fix(coding-agent): package lazy HTML export assets

This commit is contained in:
usr-bin-roygbiv
2026-07-27 01:07:40 +00:00
parent 9570656f87
commit f0ebf3463a
3 changed files with 45 additions and 2 deletions
+3 -1
View File
@@ -9,6 +9,7 @@ const packageDir = path.join(import.meta.dir, "..");
const outDir = path.join(packageDir, "dist");
const cliPath = path.join(outDir, "cli.js");
const shebang = "#!/usr/bin/env bun\n";
const legacyHtmlExportAssetPattern = /^(?:template-[^.]+\.(?:css|html|js)|tool-views\.generated-[^.]+\.js)$/;
// Native / optional / platform-specific deps are loaded from installed files.
// `omp-legacy-pi-modules` exists only in compiled binaries via the build plugin;
@@ -80,7 +81,8 @@ async function cleanBundleOutputs(): Promise<void> {
entry === "cli.js" ||
entry.endsWith(".node") ||
entry.endsWith(".js.map") ||
(entry.startsWith("CHANGELOG-") && entry.endsWith(".md")),
(entry.startsWith("CHANGELOG-") && entry.endsWith(".md")) ||
legacyHtmlExportAssetPattern.test(entry),
)
.map(entry => fs.rm(path.join(outDir, entry), { force: true })),
);