/** * `npm install` already runs with `--json` so a failure can be classified from * the structured error envelope. On the SUCCESS path that same JSON was passed * straight to `logger.info(stdout)` as the log MESSAGE, which is why Datadog * shows an empty line after "Package installation completed successfully" and * the counts never reached anyone. * * Those counts are the only evidence of what an install actually did. Deciding * whether to persist a node_modules delta, and whether the trade is worth it, * needs to distinguish "added 8 packages" from "added nothing and still spent * 52 seconds". */ export type NpmInstallSummary = { added: number; removed: number; changed: number; audited: number; }; /** * Parse npm's `--json` install summary. * * Returns null when there is nothing parseable — no output, output that is * not a JSON object, or a JSON object that carries none of npm's summary keys * (the install may have run under yarn/pnpm, whose JSON output would otherwise * masquerade as a confidently-measured no-op npm install). Callers should fall * back to logging the raw text so an unrecognized shape is still recoverable * from logs. */ export declare function parseNpmInstallSummary(stdout: string): NpmInstallSummary | null; //# sourceMappingURL=npm-install-summary.d.mts.map