UNPKG

balena-cli

Version:

The official balena Command Line Interface

28 lines (27 loc) 1.08 kB
import type { BalenaSettingsStorage } from 'balena-settings-storage'; export interface ReleaseTimestampsByVersion { [version: string]: string; lastFetched: string; } export declare class DeprecationChecker { protected currentVersion: string; readonly majorVersionFetchIntervalDays = 7; readonly expiryDays = 365; readonly deprecationDays: number; readonly msInDay: number; readonly debugPrefix = "Deprecation check"; readonly cacheFile = "cachedReleaseTimestamps"; readonly now: number; private initialized; storage: BalenaSettingsStorage; cachedTimestamps: ReleaseTimestampsByVersion; nextMajorVersion: string; constructor(currentVersion: string); init(): Promise<void>; protected getNpmUrl(version: string): string; protected fetchPublishedTimestampForVersion(version: string): Promise<string | undefined>; checkForNewReleasesIfNeeded(): Promise<void>; warnAndAbortIfDeprecated(): Promise<void>; getDeprecationMsg(daysElapsed: number): string; getExpiryMsg(daysElapsed: number): string; }