1 | import { AllPublishOptions } from "builder-util-runtime";
|
2 | import { StdioOptions } from "child_process";
|
3 | import { AppAdapter } from "./AppAdapter";
|
4 | import { AppUpdater, DownloadExecutorTask } from "./AppUpdater";
|
5 | export declare abstract class BaseUpdater extends AppUpdater {
|
6 | protected quitAndInstallCalled: boolean;
|
7 | private quitHandlerAdded;
|
8 | protected constructor(options?: AllPublishOptions | null, app?: AppAdapter);
|
9 | quitAndInstall(isSilent?: boolean, isForceRunAfter?: boolean): void;
|
10 | protected executeDownload(taskOptions: DownloadExecutorTask): Promise<Array<string>>;
|
11 | protected abstract doInstall(options: InstallOptions): boolean;
|
12 | install(isSilent?: boolean, isForceRunAfter?: boolean): boolean;
|
13 | protected addQuitHandler(): void;
|
14 | protected wrapSudo(): string;
|
15 | protected spawnSyncLog(cmd: string, args?: string[], env?: {}): string;
|
16 | /**
|
17 | * This handles both node 8 and node 10 way of emitting error when spawning a process
|
18 | * - node 8: Throws the error
|
19 | * - node 10: Emit the error(Need to listen with on)
|
20 | */
|
21 | protected spawnLog(cmd: string, args?: string[], env?: any, stdio?: StdioOptions): Promise<boolean>;
|
22 | }
|
23 | export interface InstallOptions {
|
24 | readonly installerPath: string;
|
25 | readonly isSilent: boolean;
|
26 | readonly isForceRunAfter: boolean;
|
27 | readonly isAdminRightsRequired: boolean;
|
28 | }
|