1 | import RWLockfile from 'rwlockfile';
|
2 | import Config from './config';
|
3 | import deps from './deps';
|
4 | export interface IVersion {
|
5 | version: string;
|
6 | channel: string;
|
7 | message?: string;
|
8 | }
|
9 | export interface IManifest {
|
10 | version: string;
|
11 | channel: string;
|
12 | sha256gz: string;
|
13 | rollout?: number;
|
14 | }
|
15 | export declare class Updater {
|
16 | config: Config;
|
17 | lock: RWLockfile;
|
18 | http: typeof deps.HTTP;
|
19 | constructor(config: Config);
|
20 | readonly autoupdatefile: string;
|
21 | readonly autoupdatelogfile: string;
|
22 | readonly versionFile: string;
|
23 | private readonly clientRoot;
|
24 | private readonly clientBin;
|
25 | private readonly binPath;
|
26 | private readonly s3Host;
|
27 | s3url(channel: string, p: string): string;
|
28 | fetchManifest(channel: string, oclif: boolean): Promise<IManifest>;
|
29 | fetchVersion(download: boolean): Promise<IVersion>;
|
30 | warnIfUpdateAvailable(): Promise<void>;
|
31 | autoupdate(force?: boolean): Promise<void>;
|
32 | update(manifest: IManifest, oclif: boolean): Promise<void>;
|
33 | tidy(): Promise<void>;
|
34 | private extract(stream, dir, sha);
|
35 | private base(manifest);
|
36 | private autoupdateNeeded();
|
37 | readonly timestampEnvVar: string;
|
38 | readonly skipAnalyticsEnvVar: string;
|
39 | readonly autoupdateEnv: {
|
40 | [k: string]: string;
|
41 | };
|
42 | private reexecUpdate();
|
43 | private _createBin(manifest);
|
44 | private _catch(fn);
|
45 | }
|