/** * packlist.ts — derive the REAL set of files that would be published to npm. * * Always resolve the package-visible file set from the packager itself * (`npm pack --dry-run` / `bun pm pack --dry-run`), never from a hand-maintained * copy of the `files` array. This guarantees the safety guards scan exactly what * ships, including the effect of the `files` allow/deny globs. */ /** * Parse `npm pack --json`, returning null rather than throwing when the output is * not a usable manifest. * * npm does not always produce the JSON it promises. Observed in CI: a first, * cold `npm pack` invocation took 5s, exited 0, and wrote nothing to stdout, * which surfaced as a bare `SyntaxError: JSON Parse error: Unexpected EOF` from * inside a boundary test - an unactionable failure that says nothing about * packaging. Later calls in the same run, with the same package.json, succeeded * in ~1.2s. Returning null lets the caller fall back to `bun pm pack` instead of * failing the build on npm's flakiness. */ export declare function parseNpmPackJson(stdout: string): string[] | null; /** * Return the sorted list of package-relative file paths that would be published. * Prefers `npm pack` (authoritative for npm) and falls back to `bun pm pack`. */ export declare function getPackedFiles(cwd?: string): string[];