electron-incremental-update 2.0.0-beta.4 → 2.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,134 +0,0 @@
1
- import { EventEmitter } from 'node:events';
2
- import { a as UpdateJSON, U as UpdateInfo, D as DownloadingInfo, I as IProvider, c as URLHandler } from './types-Bz1VD18z.cjs';
3
-
4
- declare const ErrorInfo: {
5
- readonly download: "Download failed";
6
- readonly validate: "Validate failed";
7
- readonly param: "Missing params";
8
- readonly network: "Network error";
9
- };
10
- declare class UpdaterError extends Error {
11
- code: keyof typeof ErrorInfo;
12
- constructor(msg: keyof typeof ErrorInfo, info: string);
13
- }
14
- type CheckResult<T extends UpdateJSON> = {
15
- success: true;
16
- data: Omit<T, 'beta'>;
17
- } | {
18
- success: false;
19
- /**
20
- * minimal version that can update
21
- */
22
- data: string;
23
- } | {
24
- success: false;
25
- data: UpdaterError;
26
- };
27
- type DownloadResult = {
28
- success: true;
29
- } | {
30
- success: false;
31
- data: UpdaterError;
32
- };
33
- interface Logger {
34
- info: (msg: string) => void;
35
- debug: (msg: string) => void;
36
- warn: (msg: string) => void;
37
- error: (msg: string, e?: unknown) => void;
38
- }
39
- interface UpdaterOption {
40
- /**
41
- * public key of signature, which will be auto generated by plugin,
42
- * generate by `selfsigned` if not set
43
- */
44
- SIGNATURE_CERT?: string;
45
- /**
46
- * whether to receive beta update
47
- */
48
- receiveBeta?: boolean;
49
- logger?: Logger;
50
- }
51
-
52
- declare class Updater extends EventEmitter<{
53
- 'checking': any;
54
- 'update-available': [data: UpdateInfo];
55
- 'update-unavailable': [reason: string];
56
- 'error': [error: UpdaterError];
57
- 'download-progress': [info: DownloadingInfo];
58
- 'update-downloaded': any;
59
- }> {
60
- private CERT;
61
- private info?;
62
- private provider;
63
- /**
64
- * updater logger
65
- */
66
- logger?: Logger;
67
- /**
68
- * whether to receive beta update
69
- */
70
- receiveBeta?: boolean;
71
- /**
72
- * whether force update in DEV
73
- */
74
- forceUpdate?: boolean;
75
- /**
76
- * initialize incremental updater
77
- * @param provider update provider
78
- * @param option UpdaterOption
79
- */
80
- constructor(provider: IProvider, option?: UpdaterOption);
81
- /**
82
- * this function is used to parse download data.
83
- * - if format is `'json'`
84
- * - if data is `UpdateJSON`, return it
85
- * - if data is string or absent, download URL data and return it
86
- * - if format is `'buffer'`
87
- * - if data is `Buffer`, return it
88
- * - if data is string or absent, download URL data and return it
89
- * @param format 'json' or 'buffer'
90
- * @param data download URL or update json or buffer
91
- */
92
- private fetch;
93
- /**
94
- * handle error message and emit error event
95
- */
96
- private err;
97
- /**
98
- * check update info using default options
99
- */
100
- checkUpdate(): Promise<boolean>;
101
- /**
102
- * check update info using existing update json
103
- * @param data existing update json
104
- */
105
- checkUpdate(data: UpdateJSON): Promise<boolean>;
106
- /**
107
- * download update using default options
108
- */
109
- downloadUpdate(): Promise<boolean>;
110
- /**
111
- * download update using existing `asar.gz` buffer and signature
112
- * @param data existing `asar.gz` buffer
113
- * @param sig signature
114
- */
115
- downloadUpdate(data: Uint8Array | Buffer, sig: string): Promise<boolean>;
116
- /**
117
- * quit App and install
118
- */
119
- quitAndInstall(): void;
120
- /**
121
- * setup provider URL handler
122
- *
123
- * @example
124
- * updater.setURLHandler((url, isDownloadingAsar) => {
125
- * if (isDownloadingAsar) {
126
- * url.hostname = 'https://cdn.jsdelivr.net/gh'
127
- * return url
128
- * }
129
- * })
130
- */
131
- setURLHandler(handler: URLHandler): void;
132
- }
133
-
134
- export { type CheckResult as C, type DownloadResult as D, ErrorInfo as E, type Logger as L, Updater as U, type UpdaterOption as a, UpdaterError as b };
@@ -1,134 +0,0 @@
1
- import { EventEmitter } from 'node:events';
2
- import { a as UpdateJSON, U as UpdateInfo, D as DownloadingInfo, I as IProvider, c as URLHandler } from './types-Bz1VD18z.js';
3
-
4
- declare const ErrorInfo: {
5
- readonly download: "Download failed";
6
- readonly validate: "Validate failed";
7
- readonly param: "Missing params";
8
- readonly network: "Network error";
9
- };
10
- declare class UpdaterError extends Error {
11
- code: keyof typeof ErrorInfo;
12
- constructor(msg: keyof typeof ErrorInfo, info: string);
13
- }
14
- type CheckResult<T extends UpdateJSON> = {
15
- success: true;
16
- data: Omit<T, 'beta'>;
17
- } | {
18
- success: false;
19
- /**
20
- * minimal version that can update
21
- */
22
- data: string;
23
- } | {
24
- success: false;
25
- data: UpdaterError;
26
- };
27
- type DownloadResult = {
28
- success: true;
29
- } | {
30
- success: false;
31
- data: UpdaterError;
32
- };
33
- interface Logger {
34
- info: (msg: string) => void;
35
- debug: (msg: string) => void;
36
- warn: (msg: string) => void;
37
- error: (msg: string, e?: unknown) => void;
38
- }
39
- interface UpdaterOption {
40
- /**
41
- * public key of signature, which will be auto generated by plugin,
42
- * generate by `selfsigned` if not set
43
- */
44
- SIGNATURE_CERT?: string;
45
- /**
46
- * whether to receive beta update
47
- */
48
- receiveBeta?: boolean;
49
- logger?: Logger;
50
- }
51
-
52
- declare class Updater extends EventEmitter<{
53
- 'checking': any;
54
- 'update-available': [data: UpdateInfo];
55
- 'update-unavailable': [reason: string];
56
- 'error': [error: UpdaterError];
57
- 'download-progress': [info: DownloadingInfo];
58
- 'update-downloaded': any;
59
- }> {
60
- private CERT;
61
- private info?;
62
- private provider;
63
- /**
64
- * updater logger
65
- */
66
- logger?: Logger;
67
- /**
68
- * whether to receive beta update
69
- */
70
- receiveBeta?: boolean;
71
- /**
72
- * whether force update in DEV
73
- */
74
- forceUpdate?: boolean;
75
- /**
76
- * initialize incremental updater
77
- * @param provider update provider
78
- * @param option UpdaterOption
79
- */
80
- constructor(provider: IProvider, option?: UpdaterOption);
81
- /**
82
- * this function is used to parse download data.
83
- * - if format is `'json'`
84
- * - if data is `UpdateJSON`, return it
85
- * - if data is string or absent, download URL data and return it
86
- * - if format is `'buffer'`
87
- * - if data is `Buffer`, return it
88
- * - if data is string or absent, download URL data and return it
89
- * @param format 'json' or 'buffer'
90
- * @param data download URL or update json or buffer
91
- */
92
- private fetch;
93
- /**
94
- * handle error message and emit error event
95
- */
96
- private err;
97
- /**
98
- * check update info using default options
99
- */
100
- checkUpdate(): Promise<boolean>;
101
- /**
102
- * check update info using existing update json
103
- * @param data existing update json
104
- */
105
- checkUpdate(data: UpdateJSON): Promise<boolean>;
106
- /**
107
- * download update using default options
108
- */
109
- downloadUpdate(): Promise<boolean>;
110
- /**
111
- * download update using existing `asar.gz` buffer and signature
112
- * @param data existing `asar.gz` buffer
113
- * @param sig signature
114
- */
115
- downloadUpdate(data: Uint8Array | Buffer, sig: string): Promise<boolean>;
116
- /**
117
- * quit App and install
118
- */
119
- quitAndInstall(): void;
120
- /**
121
- * setup provider URL handler
122
- *
123
- * @example
124
- * updater.setURLHandler((url, isDownloadingAsar) => {
125
- * if (isDownloadingAsar) {
126
- * url.hostname = 'https://cdn.jsdelivr.net/gh'
127
- * return url
128
- * }
129
- * })
130
- */
131
- setURLHandler(handler: URLHandler): void;
132
- }
133
-
134
- export { type CheckResult as C, type DownloadResult as D, ErrorInfo as E, type Logger as L, Updater as U, type UpdaterOption as a, UpdaterError as b };
package/dist/index.d.cts DELETED
@@ -1,78 +0,0 @@
1
- import { U as Updater, a as UpdaterOption, L as Logger } from './core-CW7TMqi7.cjs';
2
- export { C as CheckResult, D as DownloadResult, E as ErrorInfo, b as UpdaterError } from './core-CW7TMqi7.cjs';
3
- import { I as IProvider } from './types-Bz1VD18z.cjs';
4
- import 'node:events';
5
- import '@subframe7536/type-utils';
6
-
7
- type Promisable<T> = T | Promise<T>;
8
- /**
9
- * hooks on rename temp asar path to `${app.name}.asar`
10
- * @param install `() => renameSync(tempAsarPath, appNameAsarPath)`
11
- * @param tempAsarPath temp(updated) asar path
12
- * @param appNameAsarPath `${app.name}.asar` path
13
- * @param logger logger
14
- * @default install(); logger.info(`update success!`)
15
- */
16
- type OnInstallFunction = (install: VoidFunction, tempAsarPath: string, appNameAsarPath: string, logger?: Logger) => Promisable<void>;
17
- interface AppOption {
18
- /**
19
- * update provider
20
- */
21
- provider: IProvider;
22
- /**
23
- * updater options
24
- */
25
- updater?: (() => Promisable<Updater>) | UpdaterOption;
26
- /**
27
- * hooks on rename temp asar path to `${app.name}.asar`
28
- */
29
- onInstall?: OnInstallFunction;
30
- /**
31
- * hooks before app start up
32
- * @param mainFilePath main file path of `${app.name}.asar`
33
- * @param logger logger
34
- */
35
- beforeStart?: (mainFilePath: string, logger?: Logger) => Promisable<void>;
36
- /**
37
- * hooks on app start up error
38
- * @param err installing or startup error
39
- * @param logger logger
40
- */
41
- onStartError?: (err: unknown, logger?: Logger) => void;
42
- }
43
- /**
44
- * utils for startuping with updater
45
- * @param fn startup function
46
- * @example
47
- * // in electron/main/index.ts
48
- * export default startupWithUpdater((updater) => {
49
- * updater.checkUpdate()
50
- * })
51
- */
52
- declare function startupWithUpdater(fn: (updater: Updater) => Promisable<void>): (updater: Updater) => Promisable<void>;
53
- /**
54
- * initialize app
55
- * @example
56
- * ```ts
57
- * import { getGithubReleaseCdnGroup, initApp, parseGithubCdnURL } from 'electron-incremental-update'
58
- * import { repository } from '../package.json'
59
- *
60
- * const { cdnPrefix: asarPrefix } = getGithubReleaseCdnGroup()[0]
61
- * const { cdnPrefix: jsonPrefix } = getGithubFileCdnGroup()[0]
62
- *
63
- * initApp({
64
- * // can be updater option or function that return updater
65
- * updater: {
66
- * SIGNATURE_CERT: 'custom certificate',
67
- * repository,
68
- * updateJsonURL: parseGithubCdnURL(repository, jsonPrefix, 'version.json'),
69
- * releaseAsarURL: parseGithubCdnURL(repository, asarPrefix, `download/latest/${app.name}.asar.gz`),
70
- * receiveBeta: true,
71
- * },
72
- * onStart: console.log
73
- * })
74
- * ```
75
- */
76
- declare function initApp(appOptions: AppOption): Promise<void>;
77
-
78
- export { type AppOption, Logger, Updater, UpdaterOption, initApp, startupWithUpdater };
package/dist/index.d.ts DELETED
@@ -1,78 +0,0 @@
1
- import { U as Updater, a as UpdaterOption, L as Logger } from './core-D6QlpOgp.js';
2
- export { C as CheckResult, D as DownloadResult, E as ErrorInfo, b as UpdaterError } from './core-D6QlpOgp.js';
3
- import { I as IProvider } from './types-Bz1VD18z.js';
4
- import 'node:events';
5
- import '@subframe7536/type-utils';
6
-
7
- type Promisable<T> = T | Promise<T>;
8
- /**
9
- * hooks on rename temp asar path to `${app.name}.asar`
10
- * @param install `() => renameSync(tempAsarPath, appNameAsarPath)`
11
- * @param tempAsarPath temp(updated) asar path
12
- * @param appNameAsarPath `${app.name}.asar` path
13
- * @param logger logger
14
- * @default install(); logger.info(`update success!`)
15
- */
16
- type OnInstallFunction = (install: VoidFunction, tempAsarPath: string, appNameAsarPath: string, logger?: Logger) => Promisable<void>;
17
- interface AppOption {
18
- /**
19
- * update provider
20
- */
21
- provider: IProvider;
22
- /**
23
- * updater options
24
- */
25
- updater?: (() => Promisable<Updater>) | UpdaterOption;
26
- /**
27
- * hooks on rename temp asar path to `${app.name}.asar`
28
- */
29
- onInstall?: OnInstallFunction;
30
- /**
31
- * hooks before app start up
32
- * @param mainFilePath main file path of `${app.name}.asar`
33
- * @param logger logger
34
- */
35
- beforeStart?: (mainFilePath: string, logger?: Logger) => Promisable<void>;
36
- /**
37
- * hooks on app start up error
38
- * @param err installing or startup error
39
- * @param logger logger
40
- */
41
- onStartError?: (err: unknown, logger?: Logger) => void;
42
- }
43
- /**
44
- * utils for startuping with updater
45
- * @param fn startup function
46
- * @example
47
- * // in electron/main/index.ts
48
- * export default startupWithUpdater((updater) => {
49
- * updater.checkUpdate()
50
- * })
51
- */
52
- declare function startupWithUpdater(fn: (updater: Updater) => Promisable<void>): (updater: Updater) => Promisable<void>;
53
- /**
54
- * initialize app
55
- * @example
56
- * ```ts
57
- * import { getGithubReleaseCdnGroup, initApp, parseGithubCdnURL } from 'electron-incremental-update'
58
- * import { repository } from '../package.json'
59
- *
60
- * const { cdnPrefix: asarPrefix } = getGithubReleaseCdnGroup()[0]
61
- * const { cdnPrefix: jsonPrefix } = getGithubFileCdnGroup()[0]
62
- *
63
- * initApp({
64
- * // can be updater option or function that return updater
65
- * updater: {
66
- * SIGNATURE_CERT: 'custom certificate',
67
- * repository,
68
- * updateJsonURL: parseGithubCdnURL(repository, jsonPrefix, 'version.json'),
69
- * releaseAsarURL: parseGithubCdnURL(repository, asarPrefix, `download/latest/${app.name}.asar.gz`),
70
- * receiveBeta: true,
71
- * },
72
- * onStart: console.log
73
- * })
74
- * ```
75
- */
76
- declare function initApp(appOptions: AppOption): Promise<void>;
77
-
78
- export { type AppOption, Logger, Updater, UpdaterOption, initApp, startupWithUpdater };
@@ -1,64 +0,0 @@
1
- import { I as IProvider, d as defaultIsLowerVersion, a as UpdateJSON, U as UpdateInfo, D as DownloadingInfo, c as URLHandler, O as OnDownloading } from './types-Bz1VD18z.cjs';
2
- import { f as defaultVerify, a as defaultUnzipFile } from './zip-WRrEMkgp.cjs';
3
- import '@subframe7536/type-utils';
4
-
5
- declare abstract class BaseProvider implements IProvider {
6
- name: string;
7
- isLowerVersion: typeof defaultIsLowerVersion;
8
- verifySignaure: typeof defaultVerify;
9
- unzipFile: typeof defaultUnzipFile;
10
- abstract downloadJSON(versionPath: string): Promise<UpdateJSON>;
11
- abstract downloadAsar(name: string, info: UpdateInfo, onDownloading?: (info: DownloadingInfo) => void): Promise<Buffer>;
12
- }
13
-
14
- interface GitHubProviderOptions {
15
- /**
16
- * github user name
17
- */
18
- username: string;
19
- /**
20
- * github repo name
21
- */
22
- repo: string;
23
- /**
24
- * extra headers
25
- */
26
- extraHeaders?: Record<string, string>;
27
- /**
28
- * custom url handler
29
- *
30
- * for Github, there are some {@link https://github.com/XIU2/UserScript/blob/master/GithubEnhanced-High-Speed-Download.user.js#L40 public CDN links}
31
- * @example
32
- * (url, isDownloadAsar) => {
33
- * if (isDownloadAsar) {
34
- * url.hostname = 'mirror.ghproxy.com'
35
- * url.pathname = 'https://github.com' + url.pathname
36
- * return url
37
- * }
38
- * }
39
- */
40
- urlHandler?: URLHandler;
41
- }
42
- declare class GitHubProvider extends BaseProvider {
43
- name: string;
44
- private options;
45
- /**
46
- * Update Provider for Github repo
47
- * - download update json from `https://raw.githubusercontent.com/{user}/{repo}/HEAD/{versionPath}`
48
- * - download update asar from `https://github.com/{user}/{repo}/releases/download/v{version}/{name}-{version}.asar.gz`
49
- *
50
- * you can setup `urlHandler` in {@link GitHubProviderOptions} or `Updater` to modify url before request
51
- * @param options provider options
52
- */
53
- constructor(options: GitHubProviderOptions);
54
- get urlHandler(): URLHandler | undefined;
55
- set urlHandler(handler: URLHandler);
56
- private parseURL;
57
- downloadJSON(versionPath: string): Promise<UpdateJSON>;
58
- downloadAsar(name: string, { version, size }: UpdateInfo, onDownloading?: (info: DownloadingInfo) => void): Promise<Buffer>;
59
- }
60
-
61
- declare function defaultDownloadUpdateJSON(url: string, headers: Record<string, any>): Promise<UpdateJSON>;
62
- declare function defaultDownloadAsar(url: string, headers: Record<string, any>, total: number, onDownloading?: OnDownloading): Promise<Buffer>;
63
-
64
- export { BaseProvider, DownloadingInfo, GitHubProvider, type GitHubProviderOptions, IProvider, OnDownloading, URLHandler, defaultDownloadAsar, defaultDownloadUpdateJSON };
@@ -1,64 +0,0 @@
1
- import { I as IProvider, d as defaultIsLowerVersion, a as UpdateJSON, U as UpdateInfo, D as DownloadingInfo, c as URLHandler, O as OnDownloading } from './types-Bz1VD18z.js';
2
- import { f as defaultVerify, a as defaultUnzipFile } from './zip-WRrEMkgp.js';
3
- import '@subframe7536/type-utils';
4
-
5
- declare abstract class BaseProvider implements IProvider {
6
- name: string;
7
- isLowerVersion: typeof defaultIsLowerVersion;
8
- verifySignaure: typeof defaultVerify;
9
- unzipFile: typeof defaultUnzipFile;
10
- abstract downloadJSON(versionPath: string): Promise<UpdateJSON>;
11
- abstract downloadAsar(name: string, info: UpdateInfo, onDownloading?: (info: DownloadingInfo) => void): Promise<Buffer>;
12
- }
13
-
14
- interface GitHubProviderOptions {
15
- /**
16
- * github user name
17
- */
18
- username: string;
19
- /**
20
- * github repo name
21
- */
22
- repo: string;
23
- /**
24
- * extra headers
25
- */
26
- extraHeaders?: Record<string, string>;
27
- /**
28
- * custom url handler
29
- *
30
- * for Github, there are some {@link https://github.com/XIU2/UserScript/blob/master/GithubEnhanced-High-Speed-Download.user.js#L40 public CDN links}
31
- * @example
32
- * (url, isDownloadAsar) => {
33
- * if (isDownloadAsar) {
34
- * url.hostname = 'mirror.ghproxy.com'
35
- * url.pathname = 'https://github.com' + url.pathname
36
- * return url
37
- * }
38
- * }
39
- */
40
- urlHandler?: URLHandler;
41
- }
42
- declare class GitHubProvider extends BaseProvider {
43
- name: string;
44
- private options;
45
- /**
46
- * Update Provider for Github repo
47
- * - download update json from `https://raw.githubusercontent.com/{user}/{repo}/HEAD/{versionPath}`
48
- * - download update asar from `https://github.com/{user}/{repo}/releases/download/v{version}/{name}-{version}.asar.gz`
49
- *
50
- * you can setup `urlHandler` in {@link GitHubProviderOptions} or `Updater` to modify url before request
51
- * @param options provider options
52
- */
53
- constructor(options: GitHubProviderOptions);
54
- get urlHandler(): URLHandler | undefined;
55
- set urlHandler(handler: URLHandler);
56
- private parseURL;
57
- downloadJSON(versionPath: string): Promise<UpdateJSON>;
58
- downloadAsar(name: string, { version, size }: UpdateInfo, onDownloading?: (info: DownloadingInfo) => void): Promise<Buffer>;
59
- }
60
-
61
- declare function defaultDownloadUpdateJSON(url: string, headers: Record<string, any>): Promise<UpdateJSON>;
62
- declare function defaultDownloadAsar(url: string, headers: Record<string, any>, total: number, onDownloading?: OnDownloading): Promise<Buffer>;
63
-
64
- export { BaseProvider, DownloadingInfo, GitHubProvider, type GitHubProviderOptions, IProvider, OnDownloading, URLHandler, defaultDownloadAsar, defaultDownloadUpdateJSON };
@@ -1,105 +0,0 @@
1
- import { Promisable } from '@subframe7536/type-utils';
2
-
3
- /**
4
- * handle all unhandled error
5
- * @param callback callback function
6
- */
7
- declare function handleUnexpectedErrors(callback: (err: unknown) => void): void;
8
- interface Version {
9
- major: number;
10
- minor: number;
11
- patch: number;
12
- stage: string;
13
- stageVersion: number;
14
- }
15
- declare function parseVersion(version: string): Version;
16
- declare function defaultIsLowerVersion(oldVer: string, newVer: string): boolean;
17
- /**
18
- * update info json
19
- */
20
- type UpdateInfo = {
21
- signature: string;
22
- minimumVersion: string;
23
- version: string;
24
- size: number;
25
- };
26
- /**
27
- * {@link UpdateInfo} with beta
28
- */
29
- type UpdateJSON = UpdateInfo & {
30
- beta: UpdateInfo;
31
- };
32
- declare function isUpdateJSON(json: any): json is UpdateJSON;
33
- declare function defaultVersionJsonGenerator(existingJson: UpdateJSON, buffer: Buffer, signature: string, version: string, minimumVersion: string): UpdateJSON;
34
-
35
- type URLHandler = (url: URL, isDownloadAsar: boolean) => Promisable<URL | string | undefined | null>;
36
- type OnDownloading = (progress: DownloadingInfo) => void;
37
- interface DownloadingInfo {
38
- /**
39
- * download delta
40
- */
41
- delta: number;
42
- /**
43
- * downloaded percent, 0 ~ 100
44
- */
45
- percent: number;
46
- /**
47
- * total size
48
- */
49
- total: number;
50
- /**
51
- * downloaded size
52
- */
53
- transferred: number;
54
- /**
55
- * download speed, bytes per second
56
- */
57
- bps: number;
58
- }
59
- interface IProvider {
60
- /**
61
- * provider name
62
- */
63
- name: string;
64
- /**
65
- * custom url handler
66
- *
67
- * for Github, there are some {@link https://github.com/XIU2/UserScript/blob/master/GithubEnhanced-High-Speed-Download.user.js#L34 public CDN links}
68
- */
69
- urlHandler?: URLHandler;
70
- onDownloading?: OnDownloading;
71
- /**
72
- * download update json
73
- * @param versionPath parsed version path
74
- */
75
- downloadJSON: (versionPath: string) => Promise<UpdateJSON>;
76
- /**
77
- * download update asar
78
- * @param name app name
79
- * @param updateInfo existing update info
80
- * @param onDownloading hook for on downloading
81
- */
82
- downloadAsar: (name: string, updateInfo: UpdateInfo, onDownloading?: (info: DownloadingInfo) => void) => Promise<Buffer>;
83
- /**
84
- * compare version
85
- * @param oldVer old version string
86
- * @param newVer new version string
87
- * @returns if version1 < version2
88
- */
89
- isLowerVersion: (oldVer: string, newVer: string) => boolean;
90
- /**
91
- * unzip file buffer
92
- * @param buffer source buffer
93
- */
94
- unzipFile: (buffer: Buffer) => Promise<Buffer>;
95
- /**
96
- * verify asar signature
97
- * @param buffer file buffer
98
- * @param signature signature
99
- * @param cert certificate
100
- * @returns if signature is valid, returns the version, otherwise returns `undefined`
101
- */
102
- verifySignaure: (buffer: Buffer, signature: string, cert: string) => Promisable<string | undefined>;
103
- }
104
-
105
- export { type DownloadingInfo as D, type IProvider as I, type OnDownloading as O, type UpdateInfo as U, type Version as V, type UpdateJSON as a, defaultVersionJsonGenerator as b, type URLHandler as c, defaultIsLowerVersion as d, handleUnexpectedErrors as h, isUpdateJSON as i, parseVersion as p };