UNPKG

@adpt/cli

Version:
39 lines 1.33 kB
import Conf from "conf"; import { CliState } from "../config"; import { VersionSummary } from "./versions"; export interface UpgradeCheckerConfig { channel: string; configDir: string; logDir: string; /** Timeout in milliseconds */ timeout?: number; /** Interval in milliseconds */ upgradeCheckInterval: number; upgradeCheckUrl: string; /** Interval in milliseconds */ upgradeRemindInterval: number; /** Don't remind about this version */ upgradeIgnore: string; } export interface NotifyOptions { fancy?: boolean; } export declare class UpgradeChecker { private state; readonly config: Required<UpgradeCheckerConfig>; constructor(config: UpgradeCheckerConfig, state: Conf<CliState>); check(): Promise<void>; notifyString(options?: NotifyOptions): Promise<string | undefined>; /** * This method should not be called directly. It is called when the * check method invokes a subprocess that executes check.ts, which calls * this method. */ fetch(): Promise<CliState["upgrade"]>; readonly upgrade: CliState["upgrade"] | undefined; } /** * Exported for testing */ export declare function hasSecurityFixes(current: string, latest: string, channel: string, summary: VersionSummary): boolean; //# sourceMappingURL=upgrade_checker.d.ts.map