/** * @file Volta-managed binary resolution. * Volta layers binaries through `~/.volta/tools/{image,user}/...` with * version-pinned subdirectories, so the path on PATH is a shim rather than * the real CLI. Given the `.volta/` segment's offset in a bin path, the * functions here walk into the image directory and return the real script. * Results are memoized in `voltaBinCache`, which lives in `../shared.mjs` so * `which.mts` can flush it alongside its own cache. */ /** * The subset of Volta's `user/platform.json` that pins tool versions. */ export type VoltaPlatform = { node?: { npm?: string | undefined; runtime?: string | undefined; } | undefined; } | null; /** * Volta's pinned tool versions, or null when the file is absent or malformed. */ export declare function readVoltaPlatform(userPath: string): VoltaPlatform; /** * The real script behind a Volta shim, or `''` when Volta does not manage it. * * `voltaIndex` is the offset of the `.volta/` segment inside `binPath`, which * the caller already located. */ export declare function resolveVoltaBinSync(config: { basename: string; binPath: string; voltaIndex: number; }): string; /** * The npm or npx CLI script inside a Volta image. * * Volta stores npm two ways depending on whether it was pinned separately: * under `image/npm//`, or bundled inside the Node image at * `image/node//lib/node_modules/npm/`. The first is tried first. */ export declare function voltaNpmCliPath(config: { basename: string; imagePath: string; platform: VoltaPlatform; }): string; /** * A non-npm package binary inside a Volta image. * * Volta records the owning package in `user/bin/.json`, then stores the * binary at `image/packages//bin/`, with a `.cmd` sibling on * Windows. */ export declare function voltaPackageBinPath(config: { basename: string; imagePath: string; userPath: string; }): string;