liveperson-functions-cli
Version:
LivePerson Functions CLI
23 lines (22 loc) • 914 B
TypeScript
import { Hook } from '@oclif/core';
import { Config } from '@oclif/core/lib/interfaces';
/**
* Prints a update hint for the user if a newer version is available.
* If the hint is displayed it will be muted for 2 days (configurable in the package.json).
* It will save information about the versions in a version file in the cacheDir.
* If the timeout is over, it will fetch the latest version from the repo and get the current version from the version file.
* And if they are unequal it will print the update hint.
* @export
* @param {Config} config - passed config from the oclif framework
* @returns {Promise<void>} - update hint
*/
export declare function warnIfUpdateAvailable({ config, id, }: {
config: Config;
id?: string;
}): Promise<void>;
/**
* Runs the a hook every time the CLI gets initialised
* @param opts - oclif options
*/
declare const hook: Hook<'init'>;
export default hook;