fix(ci): pack-artifact policy + maxBuffer fixes for npm publish

Cherry-pick of #3622 + #3624: aligns PACK_ARTIFACT_ROOT_ALLOWED_PATH_PREFIXES
with the v3.8.21 package.json files expansion, and increases execFileSync
maxBuffer to 64 MB to avoid ENOBUFS on npm pack --dry-run --json.
This commit is contained in:
diegosouzapw
2026-06-11 05:48:06 -03:00
parent 7e9e4ab489
commit 3c328d6a62
2 changed files with 11 additions and 4 deletions

View File

@@ -101,10 +101,16 @@ export const PACK_ARTIFACT_ROOT_ALLOWED_PATH_PREFIXES: string[] = [
"@omniroute/opencode-plugin/",
"@omniroute/opencode-provider/",
"bin/cli/",
"open-sse/mcp-server/schemas/",
"open-sse/mcp-server/tools/",
"src/lib/cli-helper/",
"src/shared/contracts/",
// Broad open-sse + src source dirs added to package.json "files" in v3.8.21
// to allow TypeScript-first imports from the published package.
"open-sse/",
"src/domain/",
"src/lib/",
"src/mitm/",
"src/server/",
"src/shared/",
"src/sse/",
"src/types/",
];
export const PACK_ARTIFACT_REQUIRED_PATHS: string[] = [

View File

@@ -25,6 +25,7 @@ function runNpm(args: string[], stdio: "inherit" | "pipe" = "pipe"): string {
cwd: ROOT,
encoding: "utf8",
stdio: stdio === "inherit" ? "inherit" : ["ignore", "pipe", "pipe"],
maxBuffer: 64 * 1024 * 1024,
});
}