electron-incremental-update 2.0.0-beta.7 → 2.0.0-beta.9
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/dist/{chunk-DFNDKSE6.js → chunk-4MH6ZXCY.js} +12 -12
- package/dist/{chunk-N77WQ5WB.js → chunk-KZSYEXLO.js} +9 -9
- package/dist/index.cjs +43 -52
- package/dist/index.d.cts +130 -9
- package/dist/index.d.ts +130 -9
- package/dist/index.js +36 -51
- package/dist/provider.cjs +25 -9
- package/dist/provider.d.cts +17 -1
- package/dist/provider.d.ts +17 -1
- package/dist/provider.js +17 -6
- package/dist/{types-CItP6bL-.d.ts → types-D7OK98ln.d.ts} +3 -28
- package/dist/{types-CItP6bL-.d.cts → types-mEfMjnlV.d.cts} +3 -28
- package/dist/utils.cjs +24 -25
- package/dist/utils.d.cts +3 -11
- package/dist/utils.d.ts +3 -11
- package/dist/utils.js +2 -11
- package/dist/version-DgfjJQUx.d.cts +27 -0
- package/dist/version-DgfjJQUx.d.ts +27 -0
- package/dist/vite.d.ts +7 -4
- package/dist/vite.js +164 -125
- package/package.json +8 -6
- package/dist/core-DJdvtwvU.d.ts +0 -134
- package/dist/core-ZUlLHadf.d.cts +0 -134
package/dist/utils.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { BrowserWindow } from 'electron';
|
|
2
2
|
export { e as aesDecrypt, b as aesEncrypt, c as defaultSignature, a as defaultUnzipFile, f as defaultVerifySignature, d as defaultZipFile, h as hashBuffer } from './zip-DPF5IFkK.js';
|
|
3
|
-
export {
|
|
4
|
-
import { U as Updater } from './core-DJdvtwvU.js';
|
|
5
|
-
import '@subframe7536/type-utils';
|
|
6
|
-
import 'node:events';
|
|
3
|
+
export { a as UpdateInfo, U as UpdateJSON, V as Version, d as defaultIsLowerVersion, b as defaultVersionJsonGenerator, i as isUpdateJSON, p as parseVersion } from './version-DgfjJQUx.js';
|
|
7
4
|
|
|
8
5
|
/**
|
|
9
6
|
* compile time dev check
|
|
@@ -17,7 +14,7 @@ declare const isLinux: boolean;
|
|
|
17
14
|
*
|
|
18
15
|
* if is in dev, **always** return `'DEV.asar'`
|
|
19
16
|
*/
|
|
20
|
-
declare function getPathFromAppNameAsar(...
|
|
17
|
+
declare function getPathFromAppNameAsar(...paths: string[]): string;
|
|
21
18
|
/**
|
|
22
19
|
* get app version, if is in dev, return `getEntryVersion()`
|
|
23
20
|
*/
|
|
@@ -72,9 +69,4 @@ declare function getPathFromEntryAsar(...paths: string[]): string;
|
|
|
72
69
|
*/
|
|
73
70
|
declare function handleUnexpectedErrors(callback: (err: unknown) => void): void;
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
* auto check update, download and install
|
|
77
|
-
*/
|
|
78
|
-
declare function autoUpdate(updater: Updater): Promise<void>;
|
|
79
|
-
|
|
80
|
-
export { autoUpdate, disableHWAccForWin7, getAppVersion, getEntryVersion, getPathFromAppNameAsar, getPathFromEntryAsar, getPathFromPreload, getPathFromPublic, handleUnexpectedErrors, isDev, isLinux, isMac, isWin, loadPage, requireNative, restartApp, setAppUserModelId, setPortableAppDataPath, singleInstance };
|
|
72
|
+
export { disableHWAccForWin7, getAppVersion, getEntryVersion, getPathFromAppNameAsar, getPathFromEntryAsar, getPathFromPreload, getPathFromPublic, handleUnexpectedErrors, isDev, isLinux, isMac, isWin, loadPage, requireNative, restartApp, setAppUserModelId, setPortableAppDataPath, singleInstance };
|
package/dist/utils.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
export { disableHWAccForWin7, getAppVersion, getEntryVersion, getPathFromAppNameAsar, getPathFromEntryAsar, getPathFromPreload, getPathFromPublic, handleUnexpectedErrors, isDev, isLinux, isMac, isWin, loadPage, requireNative, restartApp, setAppUserModelId, setPortableAppDataPath, singleInstance } from './chunk-
|
|
2
|
-
export { aesDecrypt, aesEncrypt, defaultSignature, defaultUnzipFile, defaultVerifySignature, defaultZipFile, hashBuffer } from './chunk-
|
|
1
|
+
export { disableHWAccForWin7, getAppVersion, getEntryVersion, getPathFromAppNameAsar, getPathFromEntryAsar, getPathFromPreload, getPathFromPublic, handleUnexpectedErrors, isDev, isLinux, isMac, isWin, loadPage, requireNative, restartApp, setAppUserModelId, setPortableAppDataPath, singleInstance } from './chunk-4MH6ZXCY.js';
|
|
2
|
+
export { aesDecrypt, aesEncrypt, defaultSignature, defaultUnzipFile, defaultVerifySignature, defaultZipFile, hashBuffer } from './chunk-KZSYEXLO.js';
|
|
3
3
|
export { defaultIsLowerVersion, defaultVersionJsonGenerator, isUpdateJSON, parseVersion } from './chunk-72ZAJ7AF.js';
|
|
4
|
-
|
|
5
|
-
// src/utils/updater.ts
|
|
6
|
-
async function autoUpdate(updater) {
|
|
7
|
-
if (await updater.checkUpdate() && await updater.downloadUpdate()) {
|
|
8
|
-
updater.quitAndInstall();
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { autoUpdate };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface Version {
|
|
2
|
+
major: number;
|
|
3
|
+
minor: number;
|
|
4
|
+
patch: number;
|
|
5
|
+
stage: string;
|
|
6
|
+
stageVersion: number;
|
|
7
|
+
}
|
|
8
|
+
declare function parseVersion(version: string): Version;
|
|
9
|
+
declare function defaultIsLowerVersion(oldVer: string, newVer: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* update info json
|
|
12
|
+
*/
|
|
13
|
+
type UpdateInfo = {
|
|
14
|
+
signature: string;
|
|
15
|
+
minimumVersion: string;
|
|
16
|
+
version: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* {@link UpdateInfo} with beta
|
|
20
|
+
*/
|
|
21
|
+
type UpdateJSON = UpdateInfo & {
|
|
22
|
+
beta: UpdateInfo;
|
|
23
|
+
};
|
|
24
|
+
declare function isUpdateJSON(json: any): json is UpdateJSON;
|
|
25
|
+
declare function defaultVersionJsonGenerator(existingJson: UpdateJSON, signature: string, version: string, minimumVersion: string): UpdateJSON;
|
|
26
|
+
|
|
27
|
+
export { type UpdateJSON as U, type Version as V, type UpdateInfo as a, defaultVersionJsonGenerator as b, defaultIsLowerVersion as d, isUpdateJSON as i, parseVersion as p };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface Version {
|
|
2
|
+
major: number;
|
|
3
|
+
minor: number;
|
|
4
|
+
patch: number;
|
|
5
|
+
stage: string;
|
|
6
|
+
stageVersion: number;
|
|
7
|
+
}
|
|
8
|
+
declare function parseVersion(version: string): Version;
|
|
9
|
+
declare function defaultIsLowerVersion(oldVer: string, newVer: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* update info json
|
|
12
|
+
*/
|
|
13
|
+
type UpdateInfo = {
|
|
14
|
+
signature: string;
|
|
15
|
+
minimumVersion: string;
|
|
16
|
+
version: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* {@link UpdateInfo} with beta
|
|
20
|
+
*/
|
|
21
|
+
type UpdateJSON = UpdateInfo & {
|
|
22
|
+
beta: UpdateInfo;
|
|
23
|
+
};
|
|
24
|
+
declare function isUpdateJSON(json: any): json is UpdateJSON;
|
|
25
|
+
declare function defaultVersionJsonGenerator(existingJson: UpdateJSON, signature: string, version: string, minimumVersion: string): UpdateJSON;
|
|
26
|
+
|
|
27
|
+
export { type UpdateJSON as U, type Version as V, type UpdateInfo as a, defaultVersionJsonGenerator as b, defaultIsLowerVersion as d, isUpdateJSON as i, parseVersion as p };
|
package/dist/vite.d.ts
CHANGED
|
@@ -234,14 +234,17 @@ interface ElectronUpdaterOptions {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
interface BytecodeOptions {
|
|
237
|
+
enable: boolean;
|
|
237
238
|
/**
|
|
238
|
-
*
|
|
239
|
+
* Remember to set `sandbox: false` when creating window
|
|
239
240
|
*/
|
|
240
|
-
|
|
241
|
+
preload?: boolean;
|
|
241
242
|
/**
|
|
242
|
-
*
|
|
243
|
+
* before transformed code compile callback, if return `null` or `undefined`, it will be ignored
|
|
244
|
+
* @param code transformed code
|
|
245
|
+
* @param id file path
|
|
243
246
|
*/
|
|
244
|
-
|
|
247
|
+
beforeCompile?: (code: string, id: string) => Promisable<string | null | undefined>;
|
|
245
248
|
}
|
|
246
249
|
|
|
247
250
|
type MakeRequired<T, K extends keyof T> = Exclude<T, undefined> & {
|