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