1 | import { CancellationToken, PackageFileInfo, ProgressInfo, UpdateFileInfo, UpdateInfo } from "builder-util-runtime";
|
2 | import { EventEmitter } from "events";
|
3 | import { URL } from "url";
|
4 | import { AppUpdater } from "./AppUpdater";
|
5 | import { LoginCallback } from "./electronHttpExecutor";
|
6 | export { BaseUpdater } from "./BaseUpdater";
|
7 | export { AppUpdater, NoOpLogger } from "./AppUpdater";
|
8 | export { CancellationToken, PackageFileInfo, ProgressInfo, UpdateFileInfo, UpdateInfo };
|
9 | export { Provider } from "./providers/Provider";
|
10 | export { AppImageUpdater } from "./AppImageUpdater";
|
11 | export { DebUpdater } from "./DebUpdater";
|
12 | export { RpmUpdater } from "./RpmUpdater";
|
13 | export { MacUpdater } from "./MacUpdater";
|
14 | export { NsisUpdater } from "./NsisUpdater";
|
15 | export declare const autoUpdater: AppUpdater;
|
16 | export interface ResolvedUpdateFileInfo {
|
17 | readonly url: URL;
|
18 | readonly info: UpdateFileInfo;
|
19 | packageInfo?: PackageFileInfo;
|
20 | }
|
21 | export interface UpdateCheckResult {
|
22 | readonly updateInfo: UpdateInfo;
|
23 | readonly downloadPromise?: Promise<Array<string>> | null;
|
24 | readonly cancellationToken?: CancellationToken;
|
25 |
|
26 | readonly versionInfo: UpdateInfo;
|
27 | }
|
28 | export type UpdaterEvents = "login" | "checking-for-update" | "update-available" | "update-not-available" | "update-cancelled" | "download-progress" | "update-downloaded" | "error";
|
29 | export declare const DOWNLOAD_PROGRESS = "download-progress";
|
30 | export declare const UPDATE_DOWNLOADED = "update-downloaded";
|
31 | export type LoginHandler = (authInfo: any, callback: LoginCallback) => void;
|
32 | export declare class UpdaterSignal {
|
33 | private emitter;
|
34 | constructor(emitter: EventEmitter);
|
35 | /**
|
36 | * Emitted when an authenticating proxy is [asking for user credentials](https:
|
37 | */
|
38 | login(handler: LoginHandler): void;
|
39 | progress(handler: (info: ProgressInfo) => void): void;
|
40 | updateDownloaded(handler: (info: UpdateDownloadedEvent) => void): void;
|
41 | updateCancelled(handler: (info: UpdateInfo) => void): void;
|
42 | }
|
43 | export interface UpdateDownloadedEvent extends UpdateInfo {
|
44 | downloadedFile: string;
|
45 | }
|
46 | export interface Logger {
|
47 | info(message?: any): void;
|
48 | warn(message?: any): void;
|
49 | error(message?: any): void;
|
50 | debug?(message: string): void;
|
51 | }
|
52 | export type verifyUpdateCodeSignature = (publisherName: string[], path: string) => Promise<string | null>;
|
53 |
|
\ | No newline at end of file |