/** * `ref upgrade` command — applies a new release via the detected install method. * * See: spec/features/self-upgrade.md */ import type { Command } from "commander"; import { type UpgradeBinaryOptions, type UpgradeResult } from "../../upgrade/apply-binary.js"; import { type UpgradeNpmOptions } from "../../upgrade/apply-npm.js"; import { type InstallMethod } from "../../upgrade/detect.js"; export interface UpgradeCommandOptions { check?: boolean; version?: string; yes?: boolean; installDir?: string; } export interface RunUpgradeDeps { installMethod?: InstallMethod; argv1?: string; /** Defaults to `process.execPath`; replaces a bunfs virtual `argv1`. */ execPath?: string; currentVersion?: string; upgradeBinaryFn?: (options: UpgradeBinaryOptions) => Promise; upgradeNpmFn?: (options: UpgradeNpmOptions) => Promise; stdout?: NodeJS.WritableStream; stderr?: NodeJS.WritableStream; } export interface RunUpgradeResult { exitCode: 0 | 1 | 2; method: InstallMethod; result?: UpgradeResult; } export declare function formatUpgradeResult(result: UpgradeResult): string; export declare function runUpgrade(options: UpgradeCommandOptions, deps?: RunUpgradeDeps): Promise; export declare function registerUpgradeCommand(program: Command): void; //# sourceMappingURL=upgrade.d.ts.map