electron-incremental-update 0.7.4 → 0.7.5

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 CHANGED
@@ -55,30 +55,27 @@ src
55
55
 
56
56
  ```ts
57
57
  // electron/app.ts
58
- import { createUpdater, getGithubReleaseCdnGroup, initApp, parseGithubCdnURL } from 'electron-incremental-update'
58
+ import { getGithubReleaseCdnGroup, initApp, parseGithubCdnURL } from 'electron-incremental-update'
59
59
  import { name, repository } from '../package.json'
60
60
 
61
61
  const SIGNATURE_CERT = '' // auto generate certificate when start app
62
62
 
63
- // create updater when init, no need to set productName
64
- initApp({ onStart: console.log }, { productName: name, SIGNATURE_CERT, repository })
65
-
66
- // or create updater manually
67
63
  const { cdnPrefix } = getGithubReleaseCdnGroup()[0]
68
- const updater = createUpdater({
69
- SIGNATURE_CERT,
70
- productName: name,
71
- repository,
72
- updateJsonURL: parseGithubCdnURL(repository, 'fastly.jsdelivr.net/gh', 'version.json'),
73
- releaseAsarURL: parseGithubCdnURL(repository, cdnPrefix, `download/latest/${name}.asar.gz`),
74
- debug: true,
75
- })
76
- initApp().setUpdater(updater)
64
+ initApp({ onStart: console.log })
65
+ // can be updater option or function that return updater
66
+ .setUpdater({
67
+ SIGNATURE_CERT,
68
+ productName: name,
69
+ repository,
70
+ updateJsonURL: parseGithubCdnURL(repository, 'fastly.jsdelivr.net/gh', 'version.json'),
71
+ releaseAsarURL: parseGithubCdnURL(repository, cdnPrefix, `download/latest/${name}.asar.gz`),
72
+ debug: true,
73
+ })
77
74
  ```
78
75
 
79
76
  ### usage in main process
80
77
 
81
- To utilize the electron `net` module for requesting update information, the `checkUpdate` and `downloadAndInstall` functions must be called after the app is ready by default.
78
+ To utilize the electron `net` module for requesting update information, the `checkUpdate` and `download` functions must be called after the app is ready by default.
82
79
 
83
80
  However, you have the option to customize the download function when creating the updater.
84
81
 
@@ -33,22 +33,31 @@ function parseGithubCdnURL(repository, cdnPrefix, relativeFilePath) {
33
33
  cdnPrefix = cdnPrefix.trim().replace(/^\/?|\/?$/g, "").trim();
34
34
  return repository.replace("github.com", cdnPrefix) + relativeFilePath;
35
35
  }
36
+ function getGithubFileCdnGroup() {
37
+ return [
38
+ { cdnPrefix: "cdn.jsdelivr.net/gh", source: "jsdelivr" },
39
+ { cdnPrefix: "fastly.jsdelivr.net/gh", source: "jsdelivr-fastly" },
40
+ { cdnPrefix: "cdn.statically.io/gh", source: "statically" },
41
+ { cdnPrefix: "rawcdn.githack.com/gh", source: "githack" },
42
+ { cdnPrefix: "raw.githack.com/gh", source: "githack-dev" }
43
+ ];
44
+ }
36
45
  function getGithubReleaseCdnGroup() {
37
46
  return [
38
- { cdnPrefix: "gh.gh2233.ml", maintainer: "@X.I.U/XIU2" },
39
- { cdnPrefix: "ghproxy.com", maintainer: "gh-proxy" },
40
- { cdnPrefix: "gh.ddlc.top", maintainer: "@mtr-static-official" },
41
- { cdnPrefix: "ghdl.feizhuqwq.cf", maintainer: "feizhuqwq.com" },
42
- { cdnPrefix: "slink.ltd", maintainer: "\u77E5\u4E86\u5C0F\u7AD9" },
43
- { cdnPrefix: "git.xfj0.cn", maintainer: "anonymous1" },
44
- { cdnPrefix: "gh.con.sh", maintainer: "anonymous2" },
45
- { cdnPrefix: "ghps.cc", maintainer: "anonymous3" },
46
- { cdnPrefix: "cors.isteed.cc/github.com", maintainer: "Lufs's" },
47
- { cdnPrefix: "hub.gitmirror.com", maintainer: "GitMirror" },
48
- { cdnPrefix: "js.xxooo.ml", maintainer: "\u996D\u592A\u786C" },
49
- { cdnPrefix: "download.njuu.cf", maintainer: "LibraryCloud-njuu" },
50
- { cdnPrefix: "download.yzuu.cf", maintainer: "LibraryCloud-yzuu" },
51
- { cdnPrefix: "download.nuaa.cf", maintainer: "LibraryCloud-nuaa" }
47
+ { cdnPrefix: "gh.gh2233.ml", source: "@X.I.U/XIU2" },
48
+ { cdnPrefix: "ghproxy.com", source: "gh-proxy" },
49
+ { cdnPrefix: "gh.ddlc.top", source: "@mtr-static-official" },
50
+ { cdnPrefix: "ghdl.feizhuqwq.cf", source: "feizhuqwq.com" },
51
+ { cdnPrefix: "slink.ltd", source: "\u77E5\u4E86\u5C0F\u7AD9" },
52
+ { cdnPrefix: "git.xfj0.cn", source: "anonymous1" },
53
+ { cdnPrefix: "gh.con.sh", source: "anonymous2" },
54
+ { cdnPrefix: "ghps.cc", source: "anonymous3" },
55
+ { cdnPrefix: "cors.isteed.cc/github.com", source: "Lufs's" },
56
+ { cdnPrefix: "hub.gitmirror.com", source: "GitMirror" },
57
+ { cdnPrefix: "js.xxooo.ml", source: "\u996D\u592A\u786C" },
58
+ { cdnPrefix: "download.njuu.cf", source: "LibraryCloud-njuu" },
59
+ { cdnPrefix: "download.yzuu.cf", source: "LibraryCloud-yzuu" },
60
+ { cdnPrefix: "download.nuaa.cf", source: "LibraryCloud-nuaa" }
52
61
  ];
53
62
  }
54
63
  function restartApp() {
@@ -113,6 +122,7 @@ export {
113
122
  getProductVersion,
114
123
  requireNative,
115
124
  parseGithubCdnURL,
125
+ getGithubFileCdnGroup,
116
126
  getGithubReleaseCdnGroup,
117
127
  restartApp,
118
128
  waitAppReady,
package/dist/index.d.mts CHANGED
@@ -163,43 +163,34 @@ type AppOption = {
163
163
  onStartError?: (err: unknown) => void;
164
164
  };
165
165
  type StartupWithUpdater = (updater: Updater) => void;
166
+ type SetUpdater = {
167
+ /**
168
+ * set updater option or create function
169
+ */
170
+ setUpdater: (updater: (() => Updater | Promise<Updater>) | UpdaterOption) => void;
171
+ };
166
172
  /**
167
173
  * create updater manually
168
174
  * @example
169
175
  * ```ts
170
- * import { createUpdater, getGithubReleaseCdnGroup, initApp, parseGithubCdnURL } from 'electron-incremental-update'
176
+ * import { getGithubReleaseCdnGroup, initApp, parseGithubCdnURL } from 'electron-incremental-update'
171
177
  * import { name, repository } from '../package.json'
172
178
  *
173
- * const SIGNATURE_CERT = '' // auto generate
179
+ * const SIGNATURE_CERT = '' // auto generate certificate when start app
174
180
  *
175
181
  * const { cdnPrefix } = getGithubReleaseCdnGroup()[0]
176
- * const updater = createUpdater({
177
- * SIGNATURE_CERT,
178
- * productName: name,
179
- * repository,
180
- * updateJsonURL: parseGithubCdnURL(repository, 'fastly.jsdelivr.net/gh', 'version.json'),
181
- * releaseAsarURL: parseGithubCdnURL(repository, cdnPrefix, `download/latest/${name}.asar.gz`),
182
- * debug: true,
183
- * })
184
- * initApp().setUpdater(updater)
185
- * ```
186
- */
187
- declare function initApp(appOptions: AppOption): {
188
- setUpdater: (updater: Updater) => void;
189
- };
190
- /**
191
- * create updater when init, no need to set productName
192
- *
193
- * @example
194
- * ```ts
195
- * import { initApp } from 'electron-incremental-update'
196
- * import { name, repository } from '../package.json'
197
- *
198
- * const SIGNATURE_CERT = '' // auto generate
199
- *
200
- * initApp({ onStart: console.log }, { productName: name, SIGNATURE_CERT, repository })
182
+ * initApp({ onStart: console.log })
183
+ * // can be updater option or function that return updater
184
+ * .setUpdater({
185
+ * SIGNATURE_CERT,
186
+ * productName: name,
187
+ * repository,
188
+ * updateJsonURL: parseGithubCdnURL(repository, 'fastly.jsdelivr.net/gh', 'version.json'),
189
+ * releaseAsarURL: parseGithubCdnURL(repository, cdnPrefix, `download/latest/${name}.asar.gz`),
190
+ * debug: true,
191
+ * })
201
192
  * ```
202
193
  */
203
- declare function initApp(appOptions: AppOption, updaterOptions: UpdaterOption): undefined;
194
+ declare function initApp(appOptions?: AppOption): SetUpdater;
204
195
 
205
196
  export { AppOption, FunctionCompareVersion, FunctionVerifySignature, StartupWithUpdater, UpdateJSON, Updater, UpdaterOption, createUpdater, initApp };
package/dist/index.d.ts CHANGED
@@ -163,43 +163,34 @@ type AppOption = {
163
163
  onStartError?: (err: unknown) => void;
164
164
  };
165
165
  type StartupWithUpdater = (updater: Updater) => void;
166
+ type SetUpdater = {
167
+ /**
168
+ * set updater option or create function
169
+ */
170
+ setUpdater: (updater: (() => Updater | Promise<Updater>) | UpdaterOption) => void;
171
+ };
166
172
  /**
167
173
  * create updater manually
168
174
  * @example
169
175
  * ```ts
170
- * import { createUpdater, getGithubReleaseCdnGroup, initApp, parseGithubCdnURL } from 'electron-incremental-update'
176
+ * import { getGithubReleaseCdnGroup, initApp, parseGithubCdnURL } from 'electron-incremental-update'
171
177
  * import { name, repository } from '../package.json'
172
178
  *
173
- * const SIGNATURE_CERT = '' // auto generate
179
+ * const SIGNATURE_CERT = '' // auto generate certificate when start app
174
180
  *
175
181
  * const { cdnPrefix } = getGithubReleaseCdnGroup()[0]
176
- * const updater = createUpdater({
177
- * SIGNATURE_CERT,
178
- * productName: name,
179
- * repository,
180
- * updateJsonURL: parseGithubCdnURL(repository, 'fastly.jsdelivr.net/gh', 'version.json'),
181
- * releaseAsarURL: parseGithubCdnURL(repository, cdnPrefix, `download/latest/${name}.asar.gz`),
182
- * debug: true,
183
- * })
184
- * initApp().setUpdater(updater)
185
- * ```
186
- */
187
- declare function initApp(appOptions: AppOption): {
188
- setUpdater: (updater: Updater) => void;
189
- };
190
- /**
191
- * create updater when init, no need to set productName
192
- *
193
- * @example
194
- * ```ts
195
- * import { initApp } from 'electron-incremental-update'
196
- * import { name, repository } from '../package.json'
197
- *
198
- * const SIGNATURE_CERT = '' // auto generate
199
- *
200
- * initApp({ onStart: console.log }, { productName: name, SIGNATURE_CERT, repository })
182
+ * initApp({ onStart: console.log })
183
+ * // can be updater option or function that return updater
184
+ * .setUpdater({
185
+ * SIGNATURE_CERT,
186
+ * productName: name,
187
+ * repository,
188
+ * updateJsonURL: parseGithubCdnURL(repository, 'fastly.jsdelivr.net/gh', 'version.json'),
189
+ * releaseAsarURL: parseGithubCdnURL(repository, cdnPrefix, `download/latest/${name}.asar.gz`),
190
+ * debug: true,
191
+ * })
201
192
  * ```
202
193
  */
203
- declare function initApp(appOptions: AppOption, updaterOptions: UpdaterOption): undefined;
194
+ declare function initApp(appOptions?: AppOption): SetUpdater;
204
195
 
205
196
  export { AppOption, FunctionCompareVersion, FunctionVerifySignature, StartupWithUpdater, UpdateJSON, Updater, UpdaterOption, createUpdater, initApp };
package/dist/index.js CHANGED
@@ -334,12 +334,17 @@ function createUpdater(updaterOptions) {
334
334
  }
335
335
 
336
336
  // src/index.ts
337
- function initApp({
338
- electronDevDistPath = "dist-electron",
339
- mainPath = "main/index.js",
340
- onStart,
341
- onStartError
342
- }, updaterOptions) {
337
+ function initApp(appOptions) {
338
+ const {
339
+ electronDevDistPath = "dist-electron",
340
+ mainPath = "main/index.js",
341
+ onStart,
342
+ onStartError
343
+ } = appOptions || {};
344
+ function handleError(msg) {
345
+ onStartError?.(new Error(msg));
346
+ import_electron4.app.quit();
347
+ }
343
348
  function startup(updater) {
344
349
  try {
345
350
  const asarPath = getProductAsarPath(updater.productName);
@@ -351,30 +356,24 @@ function initApp({
351
356
  onStart?.(entry);
352
357
  require(entry)(updater);
353
358
  } catch (error) {
354
- if (onStartError) {
355
- onStartError(error);
356
- } else {
357
- console.error("fail to start app,", error);
358
- import_electron4.app.quit();
359
- process.exit(1);
360
- }
359
+ handleError(`failed to start app, ${error}`);
361
360
  }
362
361
  }
363
- if (updaterOptions) {
364
- startup(createUpdater(updaterOptions));
365
- } else {
366
- let timer = setTimeout(() => {
367
- console.error("start app timeout, please call .setUpdater() to set updater and start");
368
- import_electron4.app.quit();
369
- process.exit(1);
370
- }, 3e3);
371
- return {
372
- setUpdater(updater) {
373
- clearTimeout(timer);
374
- startup(updater);
362
+ let timer = setTimeout(() => {
363
+ handleError("start app timeout, please call .setUpdater() to set updater and start");
364
+ }, 3e3);
365
+ return {
366
+ async setUpdater(updater) {
367
+ clearTimeout(timer);
368
+ if (typeof updater === "object") {
369
+ startup(createUpdater(updater));
370
+ } else if (typeof updater === "function") {
371
+ startup(await updater());
372
+ } else {
373
+ handleError("invalid updater option or updater is not a function");
375
374
  }
376
- };
377
- }
375
+ }
376
+ };
378
377
  }
379
378
  // Annotate the CommonJS export names for ESM import in node:
380
379
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getProductAsarPath,
8
8
  unzipFile,
9
9
  waitAppReady
10
- } from "./chunk-L3QO4PD3.mjs";
10
+ } from "./chunk-67MCNA7W.mjs";
11
11
 
12
12
  // src/index.ts
13
13
  import { resolve } from "node:path";
@@ -258,12 +258,17 @@ function createUpdater(updaterOptions) {
258
258
  }
259
259
 
260
260
  // src/index.ts
261
- function initApp({
262
- electronDevDistPath = "dist-electron",
263
- mainPath = "main/index.js",
264
- onStart,
265
- onStartError
266
- }, updaterOptions) {
261
+ function initApp(appOptions) {
262
+ const {
263
+ electronDevDistPath = "dist-electron",
264
+ mainPath = "main/index.js",
265
+ onStart,
266
+ onStartError
267
+ } = appOptions || {};
268
+ function handleError(msg) {
269
+ onStartError?.(new Error(msg));
270
+ app2.quit();
271
+ }
267
272
  function startup(updater) {
268
273
  try {
269
274
  const asarPath = getProductAsarPath(updater.productName);
@@ -275,30 +280,24 @@ function initApp({
275
280
  onStart?.(entry);
276
281
  __require(entry)(updater);
277
282
  } catch (error) {
278
- if (onStartError) {
279
- onStartError(error);
280
- } else {
281
- console.error("fail to start app,", error);
282
- app2.quit();
283
- process.exit(1);
284
- }
283
+ handleError(`failed to start app, ${error}`);
285
284
  }
286
285
  }
287
- if (updaterOptions) {
288
- startup(createUpdater(updaterOptions));
289
- } else {
290
- let timer = setTimeout(() => {
291
- console.error("start app timeout, please call .setUpdater() to set updater and start");
292
- app2.quit();
293
- process.exit(1);
294
- }, 3e3);
295
- return {
296
- setUpdater(updater) {
297
- clearTimeout(timer);
298
- startup(updater);
286
+ let timer = setTimeout(() => {
287
+ handleError("start app timeout, please call .setUpdater() to set updater and start");
288
+ }, 3e3);
289
+ return {
290
+ async setUpdater(updater) {
291
+ clearTimeout(timer);
292
+ if (typeof updater === "object") {
293
+ startup(createUpdater(updater));
294
+ } else if (typeof updater === "function") {
295
+ startup(await updater());
296
+ } else {
297
+ handleError("invalid updater option or updater is not a function");
299
298
  }
300
- };
301
- }
299
+ }
300
+ };
302
301
  }
303
302
  export {
304
303
  createUpdater,
package/dist/utils.d.mts CHANGED
@@ -21,12 +21,19 @@ declare function requireNative<T = any>(packageName: string): T;
21
21
  * get github version.json CDN URL for accelerating the speed of downloading version info
22
22
  */
23
23
  declare function parseGithubCdnURL(repository: string, cdnPrefix: string, relativeFilePath: string): string;
24
+ /**
25
+ * get group of github file CDN prefix for accelerating the speed of downloading release
26
+ */
27
+ declare function getGithubFileCdnGroup(): {
28
+ cdnPrefix: string;
29
+ source: string;
30
+ }[];
24
31
  /**
25
32
  * get group of github release CDN prefix for accelerating the speed of downloading release
26
33
  */
27
34
  declare function getGithubReleaseCdnGroup(): {
28
35
  cdnPrefix: string;
29
- maintainer: string;
36
+ source: string;
30
37
  }[];
31
38
  declare function restartApp(): void;
32
39
  declare function waitAppReady(duration?: number): Promise<unknown>;
@@ -34,4 +41,4 @@ declare function unzipFile(gzipPath: string, targetFilePath: string): Promise<un
34
41
  declare function zipFile(filePath: string, targetFilePath?: string): Promise<unknown>;
35
42
  declare function handleUnexpectedErrors(callback: (err: Error) => void): void;
36
43
 
37
- export { getEntryVersion, getGithubReleaseCdnGroup, getProductAsarPath, getProductVersion, handleUnexpectedErrors, parseGithubCdnURL, requireNative, restartApp, unzipFile, waitAppReady, zipFile };
44
+ export { getEntryVersion, getGithubFileCdnGroup, getGithubReleaseCdnGroup, getProductAsarPath, getProductVersion, handleUnexpectedErrors, parseGithubCdnURL, requireNative, restartApp, unzipFile, waitAppReady, zipFile };
package/dist/utils.d.ts CHANGED
@@ -21,12 +21,19 @@ declare function requireNative<T = any>(packageName: string): T;
21
21
  * get github version.json CDN URL for accelerating the speed of downloading version info
22
22
  */
23
23
  declare function parseGithubCdnURL(repository: string, cdnPrefix: string, relativeFilePath: string): string;
24
+ /**
25
+ * get group of github file CDN prefix for accelerating the speed of downloading release
26
+ */
27
+ declare function getGithubFileCdnGroup(): {
28
+ cdnPrefix: string;
29
+ source: string;
30
+ }[];
24
31
  /**
25
32
  * get group of github release CDN prefix for accelerating the speed of downloading release
26
33
  */
27
34
  declare function getGithubReleaseCdnGroup(): {
28
35
  cdnPrefix: string;
29
- maintainer: string;
36
+ source: string;
30
37
  }[];
31
38
  declare function restartApp(): void;
32
39
  declare function waitAppReady(duration?: number): Promise<unknown>;
@@ -34,4 +41,4 @@ declare function unzipFile(gzipPath: string, targetFilePath: string): Promise<un
34
41
  declare function zipFile(filePath: string, targetFilePath?: string): Promise<unknown>;
35
42
  declare function handleUnexpectedErrors(callback: (err: Error) => void): void;
36
43
 
37
- export { getEntryVersion, getGithubReleaseCdnGroup, getProductAsarPath, getProductVersion, handleUnexpectedErrors, parseGithubCdnURL, requireNative, restartApp, unzipFile, waitAppReady, zipFile };
44
+ export { getEntryVersion, getGithubFileCdnGroup, getGithubReleaseCdnGroup, getProductAsarPath, getProductVersion, handleUnexpectedErrors, parseGithubCdnURL, requireNative, restartApp, unzipFile, waitAppReady, zipFile };
package/dist/utils.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var utils_exports = {};
22
22
  __export(utils_exports, {
23
23
  getEntryVersion: () => getEntryVersion,
24
+ getGithubFileCdnGroup: () => getGithubFileCdnGroup,
24
25
  getGithubReleaseCdnGroup: () => getGithubReleaseCdnGroup,
25
26
  getProductAsarPath: () => getProductAsarPath,
26
27
  getProductVersion: () => getProductVersion,
@@ -59,22 +60,31 @@ function parseGithubCdnURL(repository, cdnPrefix, relativeFilePath) {
59
60
  cdnPrefix = cdnPrefix.trim().replace(/^\/?|\/?$/g, "").trim();
60
61
  return repository.replace("github.com", cdnPrefix) + relativeFilePath;
61
62
  }
63
+ function getGithubFileCdnGroup() {
64
+ return [
65
+ { cdnPrefix: "cdn.jsdelivr.net/gh", source: "jsdelivr" },
66
+ { cdnPrefix: "fastly.jsdelivr.net/gh", source: "jsdelivr-fastly" },
67
+ { cdnPrefix: "cdn.statically.io/gh", source: "statically" },
68
+ { cdnPrefix: "rawcdn.githack.com/gh", source: "githack" },
69
+ { cdnPrefix: "raw.githack.com/gh", source: "githack-dev" }
70
+ ];
71
+ }
62
72
  function getGithubReleaseCdnGroup() {
63
73
  return [
64
- { cdnPrefix: "gh.gh2233.ml", maintainer: "@X.I.U/XIU2" },
65
- { cdnPrefix: "ghproxy.com", maintainer: "gh-proxy" },
66
- { cdnPrefix: "gh.ddlc.top", maintainer: "@mtr-static-official" },
67
- { cdnPrefix: "ghdl.feizhuqwq.cf", maintainer: "feizhuqwq.com" },
68
- { cdnPrefix: "slink.ltd", maintainer: "\u77E5\u4E86\u5C0F\u7AD9" },
69
- { cdnPrefix: "git.xfj0.cn", maintainer: "anonymous1" },
70
- { cdnPrefix: "gh.con.sh", maintainer: "anonymous2" },
71
- { cdnPrefix: "ghps.cc", maintainer: "anonymous3" },
72
- { cdnPrefix: "cors.isteed.cc/github.com", maintainer: "Lufs's" },
73
- { cdnPrefix: "hub.gitmirror.com", maintainer: "GitMirror" },
74
- { cdnPrefix: "js.xxooo.ml", maintainer: "\u996D\u592A\u786C" },
75
- { cdnPrefix: "download.njuu.cf", maintainer: "LibraryCloud-njuu" },
76
- { cdnPrefix: "download.yzuu.cf", maintainer: "LibraryCloud-yzuu" },
77
- { cdnPrefix: "download.nuaa.cf", maintainer: "LibraryCloud-nuaa" }
74
+ { cdnPrefix: "gh.gh2233.ml", source: "@X.I.U/XIU2" },
75
+ { cdnPrefix: "ghproxy.com", source: "gh-proxy" },
76
+ { cdnPrefix: "gh.ddlc.top", source: "@mtr-static-official" },
77
+ { cdnPrefix: "ghdl.feizhuqwq.cf", source: "feizhuqwq.com" },
78
+ { cdnPrefix: "slink.ltd", source: "\u77E5\u4E86\u5C0F\u7AD9" },
79
+ { cdnPrefix: "git.xfj0.cn", source: "anonymous1" },
80
+ { cdnPrefix: "gh.con.sh", source: "anonymous2" },
81
+ { cdnPrefix: "ghps.cc", source: "anonymous3" },
82
+ { cdnPrefix: "cors.isteed.cc/github.com", source: "Lufs's" },
83
+ { cdnPrefix: "hub.gitmirror.com", source: "GitMirror" },
84
+ { cdnPrefix: "js.xxooo.ml", source: "\u996D\u592A\u786C" },
85
+ { cdnPrefix: "download.njuu.cf", source: "LibraryCloud-njuu" },
86
+ { cdnPrefix: "download.yzuu.cf", source: "LibraryCloud-yzuu" },
87
+ { cdnPrefix: "download.nuaa.cf", source: "LibraryCloud-nuaa" }
78
88
  ];
79
89
  }
80
90
  function restartApp() {
@@ -134,6 +144,7 @@ function handleUnexpectedErrors(callback) {
134
144
  // Annotate the CommonJS export names for ESM import in node:
135
145
  0 && (module.exports = {
136
146
  getEntryVersion,
147
+ getGithubFileCdnGroup,
137
148
  getGithubReleaseCdnGroup,
138
149
  getProductAsarPath,
139
150
  getProductVersion,
package/dist/utils.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  getEntryVersion,
3
+ getGithubFileCdnGroup,
3
4
  getGithubReleaseCdnGroup,
4
5
  getProductAsarPath,
5
6
  getProductVersion,
@@ -10,9 +11,10 @@ import {
10
11
  unzipFile,
11
12
  waitAppReady,
12
13
  zipFile
13
- } from "./chunk-L3QO4PD3.mjs";
14
+ } from "./chunk-67MCNA7W.mjs";
14
15
  export {
15
16
  getEntryVersion,
17
+ getGithubFileCdnGroup,
16
18
  getGithubReleaseCdnGroup,
17
19
  getProductAsarPath,
18
20
  getProductVersion,
package/dist/vite.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-Q2K52LOG.mjs";
4
4
  import {
5
5
  zipFile
6
- } from "./chunk-L3QO4PD3.mjs";
6
+ } from "./chunk-67MCNA7W.mjs";
7
7
 
8
8
  // src/vite.ts
9
9
  import { createLogger } from "vite";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "electron-incremental-update",
3
3
  "author": "subframe7536",
4
- "version": "0.7.4",
4
+ "version": "0.7.5",
5
5
  "description": "electron incremental update tools, powered by vite",
6
6
  "scripts": {
7
7
  "build": "tsup && node fix-module.js",