fix(build): enforce bin/cli/utils/versionFastPath.mjs in the pack-artifact gate

bin/omniroute.mjs now imports ./cli/utils/versionFastPath.mjs on its boot path
(the --version fast-path). bin/cli/ is only an allowlist PREFIX, so the file
vanishing from the npm tarball would never fail the unexpected-paths check --
only PACK_ARTIFACT_REQUIRED_PATHS makes its absence loud (#7065 class).

Adds the required path and updates the hardcoded expectation in
pack-artifact-policy.test.ts, matching the existing data-dir.mjs /
storageKeyProvision.mjs entries. Fixes the red in
tests/unit/pack-artifact-entrypoint-closures.test.ts, which derives the
requirement from the entrypoint's own imports.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-07-15 10:22:24 -03:00
parent bc80aa5952
commit 907cb5a3f6
2 changed files with 2 additions and 0 deletions

View File

@@ -166,6 +166,7 @@ export const PACK_ARTIFACT_REQUIRED_PATHS: string[] = [
// tests/unit/pack-artifact-entrypoint-closures.test.ts).
"bin/cli/data-dir.mjs",
"bin/cli/utils/storageKeyProvision.mjs",
"bin/cli/utils/versionFastPath.mjs",
"bin/mcp-server.mjs",
"bin/nodeRuntimeSupport.mjs",
"bin/omniroute.mjs",

View File

@@ -108,6 +108,7 @@ test("findMissingArtifactPaths flags missing root runtime files in the tarball",
"bin/cli/data-dir.mjs",
"bin/cli/program.mjs",
"bin/cli/utils/storageKeyProvision.mjs",
"bin/cli/utils/versionFastPath.mjs",
"bin/mcp-server.mjs",
"bin/nodeRuntimeSupport.mjs",
"dist/head-response-guard.cjs",