/** * Work out how the running CLI was installed, so the update path can offer * the command that will actually work rather than a generic `npm i -g`. * * Detection is by the *path the CLI is running from* — each package manager * puts its global installs somewhere recognizable. This is a heuristic, and * it degrades deliberately: an unrecognized layout yields `unknown`, which * prints an npm command as a suggestion but is never auto-executed. Guessing * wrong and then running the guess is the one outcome worth designing out. */ export type PackageManager = 'bun' | 'pnpm' | 'yarn' | 'npm' | 'unknown'; export type InstallManager = { manager: PackageManager; /** Human-readable command to upgrade, for printing. */ command: string; /** * argv to execute for an automated update, or null when the manager could * not be identified — `auden update` prints instructions instead of running * something speculative. */ argv: readonly string[] | null; }; /** * The npm package spec that installs a given channel. * * Bare `auden` resolves to the `latest` dist-tag, so a prerelease channel MUST * be named explicitly — otherwise telling an alpha user to run `npm i -g auden` * silently moves them onto stable, which is the opposite of what the notice * said was available. Shared by the notice and the installer so the printed * command and the executed one cannot diverge. */ export declare function packageSpecForChannel(channel: string): string; /** * Identify the package manager from the filesystem path the CLI is running * from. Exported separately from `detectInstallManager` so it can be unit * tested against fixed path shapes without touching the real filesystem. * * `packageSpec` lets callers target a channel (`auden@alpha`); it defaults to * the plain package name, which resolves to the `latest` dist-tag. */ export declare function detectInstallManagerFromPath(modulePath: string, packageSpec?: string): InstallManager; /** * Detect the install manager for the currently running CLI. * * `import.meta.url` of this module resolves inside the installed package * (`.../node_modules/auden/dist/update/install-manager.js`), which is what * carries the manager's signature — `process.argv[1]` may be a shim or a * symlink in a bin dir shared by every manager. */ export declare function detectInstallManager(packageSpec?: string): InstallManager; //# sourceMappingURL=install-manager.d.ts.map