import type { Command } from 'commander'; import { type UpdateInfo } from '../utils/update-check.js'; export { RELEASE_REPO, resolveLatestStandaloneRelease, standaloneAssetName, } from '../utils/standalone-release.js'; export type PackageManager = 'pnpm' | 'npm'; /** * How the running `hula` binary was installed. `standalone` is the curl * installer's channel (a Bun-compiled binary in `~/.hublaunch/bin`); the rest * are the package-manager channels detected by {@link detectManager}. */ export type InstallMethod = PackageManager | 'standalone'; /** * The default directory a standalone install drops the binary into. Honours * `HULA_INSTALL_DIR` (the one knob shared with `install.sh`), else * `~/.hublaunch/bin`. Never needs sudo. */ export declare function standaloneInstallDir(env?: NodeJS.ProcessEnv): string; /** * Detect how the running CLI was installed. * * A standalone install is a compiled binary — it is not backed by npm/pnpm and * self-updates by downloading a fresh binary. The build-time payload only the * binary carries ({@link isStandaloneBinary}) is the definitive signal, even * when the binary was moved out of its install dir. Otherwise a running * executable (`process.execPath`) or `argv1` under the standalone install dir * (`~/.hublaunch/bin` or `HULA_INSTALL_DIR`) counts. Anything else falls back * to the package-manager detection in {@link detectManager}. */ export declare function detectInstallMethod(opts?: { argv1?: string; execPath?: string; env?: NodeJS.ProcessEnv; }): InstallMethod; /** * Detect which package manager installed the global `hula` binary. * * pnpm global installs live under a pnpm path — `.../Library/pnpm/…`, * `.../.local/share/pnpm/…`, Windows `%LOCALAPPDATA%\pnpm\…`, or whatever * `PNPM_HOME` points at. Everything else is treated as npm. Backslashes are * normalized so Windows paths match the same rules. */ export declare function detectManager(opts?: { argv1?: string; env?: NodeJS.ProcessEnv; }): PackageManager; /** Resolve the manager from an optional `--manager` override, else detect it. */ export declare function resolveManager(override?: string): PackageManager; /** Parse a `SHA256SUMS` manifest into a map of filename → lowercase hex digest. */ export declare function parseSha256Sums(manifest: string): Map; /** * Run the opt-in automatic update after a command finishes (never during). * Prints what it is doing, runs the same routine as `hula update`, and reports * the result; on failure it falls back to the plain notice. The caller * preserves the original command's exit code. */ export declare function runAutoUpdate(info: UpdateInfo): Promise; /** * Ask once whether to enable automatic updates, persisting the answer to the * global settings. A no-op when stdout is not a TTY or when the user has * already chosen (so it is only ever shown once). Called after a successful * `hula login` and once from `hula init`. Never throws (a cancelled prompt * leaves the setting undefined so it may be asked again later). */ export declare function maybePromptAutoUpdate(): Promise; interface UpdateOptions { manager?: string; check?: boolean; auto?: string; } /** * Implement `hula update`. Returns the process exit code: * 0 success / up to date / `--auto` set, * 1 install failure or bad usage, * 2 `--check` found an available update. */ export declare function runUpdateCommand(options: UpdateOptions): Promise; /** Register `hula update` on the program. */ export declare function updateCommand(program: Command): void; //# sourceMappingURL=update.d.ts.map