export interface MakeRunPacquetOpts { lockfileDir: string; /** * Effective pnpm config value. Forwarded through `PNPM_CONFIG_*` so * pacquet writes the same `.modules.yaml` and virtual-store paths as * the pnpm process that delegated to it, including Windows' shorter * default. */ virtualStoreDirMaxLength: number; /** * Which `configDependencies` entry installed pacquet: either the * original unscoped `pacquet` or the official scoped * `@pnpm/pacquet` mirror. Drives the directory we look in under * `node_modules/.pnpm-config//`. Both packages ship * the same shim and the same `@pacquet/-` binary * sub-packages, so the rest of the lookup is identical. */ packageName: 'pacquet' | '@pnpm/pacquet'; /** * The parsed pnpm argv from `@pnpm/cli.parse-cli-args` — `original` * preserves the user's exact tokens (so `--key=value` stays joined, * which pacquet's `--config.=` parser requires), and * `remain` lists the positionals (the `install`/`i` command token * among them). When `isInstallCommand` is true we forward * `original` minus positionals to pacquet's own `install` * subcommand; otherwise we only inspect it to warn about flags * pacquet won't see. */ argv: { original: string[]; remain: string[]; }; /** * `true` when the user invoked `pnpm install` (or `pnpm i`). Gates * flag forwarding: pacquet's `install` subcommand mirrors pnpm's * surface closely enough that the user's flags are safe to pass * along on that command, but not from `add`/`update`/`dedupe` (whose * own flag surface doesn't line up with pacquet's `install`). */ isInstallCommand: boolean; } /** Args the deps-installer passes per pacquet invocation. */ export interface RunPacquetCallOpts { /** * `true` when pnpm has already run a lockfileOnly resolve pass and * the reporter has already accumulated one `pnpm:progress * status:resolved` per package. Pacquet's own `resolved` events * (emitted for wire-format parity as it walks the lockfile) are * dropped on the way back through the reader so the reporter * doesn't double-count. The frozen-install path passes `false`: * pnpm did no resolution there, so pacquet's events are the only * source. */ filterResolvedProgress?: boolean; /** * `true` to let pacquet perform the resolution itself rather than * materialize an already-resolved lockfile. Drops the injected * `--frozen-lockfile`, so pacquet resolves the manifests, writes * `pnpm-lock.yaml`, and materializes in a single pass. Only valid * when {@link PacquetEngine.supportsResolution} is `true` (pacquet * >= 0.11.7). */ resolve?: boolean; } /** * Handle to the pacquet install engine: its capabilities plus the * callback `mutateModules` invokes to run it. */ export interface PacquetEngine { /** * `true` when the installed pacquet is new enough (>= 0.11.7) to * perform dependency resolution itself. When `false`, pacquet can * only materialize an already-resolved lockfile, so the deps-installer * runs its own resolve pass first and hands the written lockfile to * pacquet. */ supportsResolution: boolean; run: (callOpts?: RunPacquetCallOpts) => Promise; } /** * Build the pacquet install engine `mutateModules` delegates to when * `configDependencies` declares pacquet. * * `run` spawns the pacquet binary installed under * `node_modules/.pnpm-config/pacquet`. From `pnpm install`/`pnpm i` it * forwards the user's own pnpm CLI flags to pacquet's `install` * subcommand; from `add`/`update`/`dedupe` it doesn't forward (warning * instead). Pacquet's NDJSON stderr is parsed line-by-line and the * valid JSON records are re-emitted on pnpm's global `streamParser` so * `@pnpm/cli.default-reporter` renders pacquet's events the same way it * renders pnpm's own. Non-JSON stderr lines (panic backtraces, * unexpected diagnostics) are forwarded to the real stderr verbatim so * they reach the user. */ export declare function makeRunPacquet(opts: MakeRunPacquetOpts): PacquetEngine; /** * Name of the `@pacquet/-[-musl]` package that holds the * native pacquet binary for the host. On linux the binary packages are * split by libc and only the matching one is installed, so spawning and * signature verification must agree on this exact name. */ export declare function pacquetPlatformPkgName(): string;