electron-incremental-update 2.1.0 → 2.1.1
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.
- package/README.md +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/provider.d.cts +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/{types-1Hc4F8aC.d.ts → types-BVcfNRXE.d.ts} +5 -5
- package/dist/{types-jAPZkKmv.d.cts → types-DADYYy6C.d.cts} +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -222,7 +222,7 @@ export default startupWithUpdater((updater) => {
|
|
|
222
222
|
}
|
|
223
223
|
await updater.downloadUpdate()
|
|
224
224
|
})
|
|
225
|
-
updater.on('update-not-available', (reason, info) => console.log(reason, info))
|
|
225
|
+
updater.on('update-not-available', (code, reason, info) => console.log(code, reason, info))
|
|
226
226
|
updater.on('download-progress', (data) => {
|
|
227
227
|
console.log(data)
|
|
228
228
|
main.send(BrowserWindow.getAllWindows()[0], 'msg', data)
|
package/dist/index.cjs
CHANGED
|
@@ -44,9 +44,9 @@ function restartApp() {
|
|
|
44
44
|
// src/entry/types.ts
|
|
45
45
|
var UpdaterError = class extends Error {
|
|
46
46
|
code;
|
|
47
|
-
constructor(
|
|
48
|
-
super(`[${
|
|
49
|
-
this.code =
|
|
47
|
+
constructor(code, info) {
|
|
48
|
+
super(`[${code}] ${info}`);
|
|
49
|
+
this.code = code;
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { U as UpdateJSON, a as UpdateInfo } from './version-DcFMG3pT.cjs';
|
|
3
|
-
import { U as UpdateInfoWithExtraVersion, a as
|
|
4
|
-
export { E as
|
|
3
|
+
import { U as UpdateInfoWithExtraVersion, a as UnavailableCode, b as UpdaterError, D as DownloadingInfo, I as IProvider, L as Logger, c as UpdaterOption, d as UpdateJSONWithURL } from './types-DADYYy6C.cjs';
|
|
4
|
+
export { E as ErrorCode, e as UpdateInfoWithURL } from './types-DADYYy6C.cjs';
|
|
5
5
|
import { Promisable } from '@subframe7536/type-utils';
|
|
6
6
|
|
|
7
7
|
declare class Updater extends EventEmitter<{
|
|
8
8
|
'checking': any;
|
|
9
9
|
'update-available': [data: UpdateInfoWithExtraVersion];
|
|
10
|
-
'update-not-available': [code:
|
|
10
|
+
'update-not-available': [code: UnavailableCode, msg: string, info?: UpdateInfoWithExtraVersion];
|
|
11
11
|
'error': [error: UpdaterError];
|
|
12
12
|
'download-progress': [info: DownloadingInfo];
|
|
13
13
|
'update-downloaded': any;
|
|
@@ -143,4 +143,4 @@ declare function createElectronApp(appOptions?: AppOption): Promise<void>;
|
|
|
143
143
|
*/
|
|
144
144
|
declare const initApp: typeof createElectronApp;
|
|
145
145
|
|
|
146
|
-
export { type AppOption, Logger,
|
|
146
|
+
export { type AppOption, Logger, UnavailableCode, UpdateInfoWithExtraVersion, Updater, UpdaterError, UpdaterOption, autoUpdate, createElectronApp, initApp, startupWithUpdater };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { U as UpdateJSON, a as UpdateInfo } from './version-DcFMG3pT.js';
|
|
3
|
-
import { U as UpdateInfoWithExtraVersion, a as
|
|
4
|
-
export { E as
|
|
3
|
+
import { U as UpdateInfoWithExtraVersion, a as UnavailableCode, b as UpdaterError, D as DownloadingInfo, I as IProvider, L as Logger, c as UpdaterOption, d as UpdateJSONWithURL } from './types-BVcfNRXE.js';
|
|
4
|
+
export { E as ErrorCode, e as UpdateInfoWithURL } from './types-BVcfNRXE.js';
|
|
5
5
|
import { Promisable } from '@subframe7536/type-utils';
|
|
6
6
|
|
|
7
7
|
declare class Updater extends EventEmitter<{
|
|
8
8
|
'checking': any;
|
|
9
9
|
'update-available': [data: UpdateInfoWithExtraVersion];
|
|
10
|
-
'update-not-available': [code:
|
|
10
|
+
'update-not-available': [code: UnavailableCode, msg: string, info?: UpdateInfoWithExtraVersion];
|
|
11
11
|
'error': [error: UpdaterError];
|
|
12
12
|
'download-progress': [info: DownloadingInfo];
|
|
13
13
|
'update-downloaded': any;
|
|
@@ -143,4 +143,4 @@ declare function createElectronApp(appOptions?: AppOption): Promise<void>;
|
|
|
143
143
|
*/
|
|
144
144
|
declare const initApp: typeof createElectronApp;
|
|
145
145
|
|
|
146
|
-
export { type AppOption, Logger,
|
|
146
|
+
export { type AppOption, Logger, UnavailableCode, UpdateInfoWithExtraVersion, Updater, UpdaterError, UpdaterOption, autoUpdate, createElectronApp, initApp, startupWithUpdater };
|
package/dist/index.js
CHANGED
|
@@ -8,9 +8,9 @@ import path from 'node:path';
|
|
|
8
8
|
// src/entry/types.ts
|
|
9
9
|
var UpdaterError = class extends Error {
|
|
10
10
|
code;
|
|
11
|
-
constructor(
|
|
12
|
-
super(`[${
|
|
13
|
-
this.code =
|
|
11
|
+
constructor(code, info) {
|
|
12
|
+
super(`[${code}] ${info}`);
|
|
13
|
+
this.code = code;
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
package/dist/provider.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IProvider, d as UpdateJSONWithURL, e as UpdateInfoWithURL, D as DownloadingInfo, f as URLHandler, O as OnDownloading } from './types-
|
|
1
|
+
import { I as IProvider, d as UpdateJSONWithURL, e as UpdateInfoWithURL, D as DownloadingInfo, f as URLHandler, O as OnDownloading } from './types-DADYYy6C.cjs';
|
|
2
2
|
import { f as defaultVerifySignature, a as defaultUnzipFile } from './zip-rm9ED9nU.cjs';
|
|
3
3
|
import { d as defaultIsLowerVersion, U as UpdateJSON } from './version-DcFMG3pT.cjs';
|
|
4
4
|
import { Arrayable } from '@subframe7536/type-utils';
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IProvider, d as UpdateJSONWithURL, e as UpdateInfoWithURL, D as DownloadingInfo, f as URLHandler, O as OnDownloading } from './types-
|
|
1
|
+
import { I as IProvider, d as UpdateJSONWithURL, e as UpdateInfoWithURL, D as DownloadingInfo, f as URLHandler, O as OnDownloading } from './types-BVcfNRXE.js';
|
|
2
2
|
import { f as defaultVerifySignature, a as defaultUnzipFile } from './zip-rm9ED9nU.js';
|
|
3
3
|
import { d as defaultIsLowerVersion, U as UpdateJSON } from './version-DcFMG3pT.js';
|
|
4
4
|
import { Arrayable } from '@subframe7536/type-utils';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Promisable } from '@subframe7536/type-utils';
|
|
2
2
|
import { a as UpdateInfo } from './version-DcFMG3pT.js';
|
|
3
3
|
|
|
4
|
-
type
|
|
5
|
-
type
|
|
4
|
+
type ErrorCode = 'ERR_DOWNLOAD' | 'ERR_VALIDATE' | 'ERR_PARAM' | 'ERR_NETWORK';
|
|
5
|
+
type UnavailableCode = 'UNAVAILABLE_ERROR' | 'UNAVAILABLE_DEV' | 'UNAVAILABLE_VERSION';
|
|
6
6
|
declare class UpdaterError extends Error {
|
|
7
|
-
code:
|
|
8
|
-
constructor(
|
|
7
|
+
code: ErrorCode;
|
|
8
|
+
constructor(code: ErrorCode, info: string);
|
|
9
9
|
}
|
|
10
10
|
interface Logger {
|
|
11
11
|
info: (msg: string) => void;
|
|
@@ -114,4 +114,4 @@ interface IProvider {
|
|
|
114
114
|
}
|
|
115
115
|
type URLHandler = (url: URL) => Promisable<URL | string | undefined | null>;
|
|
116
116
|
|
|
117
|
-
export { type DownloadingInfo as D, type
|
|
117
|
+
export { type DownloadingInfo as D, type ErrorCode as E, type IProvider as I, type Logger as L, type OnDownloading as O, type UpdateInfoWithExtraVersion as U, type UnavailableCode as a, UpdaterError as b, type UpdaterOption as c, type UpdateJSONWithURL as d, type UpdateInfoWithURL as e, type URLHandler as f };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Promisable } from '@subframe7536/type-utils';
|
|
2
2
|
import { a as UpdateInfo } from './version-DcFMG3pT.cjs';
|
|
3
3
|
|
|
4
|
-
type
|
|
5
|
-
type
|
|
4
|
+
type ErrorCode = 'ERR_DOWNLOAD' | 'ERR_VALIDATE' | 'ERR_PARAM' | 'ERR_NETWORK';
|
|
5
|
+
type UnavailableCode = 'UNAVAILABLE_ERROR' | 'UNAVAILABLE_DEV' | 'UNAVAILABLE_VERSION';
|
|
6
6
|
declare class UpdaterError extends Error {
|
|
7
|
-
code:
|
|
8
|
-
constructor(
|
|
7
|
+
code: ErrorCode;
|
|
8
|
+
constructor(code: ErrorCode, info: string);
|
|
9
9
|
}
|
|
10
10
|
interface Logger {
|
|
11
11
|
info: (msg: string) => void;
|
|
@@ -114,4 +114,4 @@ interface IProvider {
|
|
|
114
114
|
}
|
|
115
115
|
type URLHandler = (url: URL) => Promisable<URL | string | undefined | null>;
|
|
116
116
|
|
|
117
|
-
export { type DownloadingInfo as D, type
|
|
117
|
+
export { type DownloadingInfo as D, type ErrorCode as E, type IProvider as I, type Logger as L, type OnDownloading as O, type UpdateInfoWithExtraVersion as U, type UnavailableCode as a, UpdaterError as b, type UpdaterOption as c, type UpdateJSONWithURL as d, type UpdateInfoWithURL as e, type URLHandler as f };
|
package/package.json
CHANGED