electron-incremental-update 2.4.3 → 3.0.0-beta.3
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 +48 -40
- package/dist/download-BN4uMS4_.d.mts +39 -0
- package/dist/download-DO7iuxEJ.d.cts +39 -0
- package/dist/electron-DH-Uyikp.cjs +321 -0
- package/dist/electron-OKQIYbcw.mjs +181 -0
- package/dist/index.cjs +261 -331
- package/dist/index.d.cts +179 -169
- package/dist/index.d.mts +204 -0
- package/dist/index.mjs +273 -0
- package/dist/provider.cjs +142 -330
- package/dist/provider.d.cts +113 -114
- package/dist/provider.d.mts +133 -0
- package/dist/provider.mjs +152 -0
- package/dist/types-BM9Jfu7q.d.cts +154 -0
- package/dist/types-DASqEPXE.d.mts +154 -0
- package/dist/utils.cjs +43 -381
- package/dist/utils.d.cts +120 -85
- package/dist/utils.d.mts +164 -0
- package/dist/utils.mjs +5 -0
- package/dist/version--eVB2A7n.mjs +72 -0
- package/dist/version-aPrLuz_-.cjs +129 -0
- package/dist/vite.d.mts +521 -0
- package/dist/vite.mjs +1094 -0
- package/dist/zip-BCC7FAQ_.cjs +264 -0
- package/dist/zip-Dwm7s1C9.mjs +185 -0
- package/package.json +66 -64
- package/dist/chunk-AAAM44NW.js +0 -70
- package/dist/chunk-IVHNGRZY.js +0 -122
- package/dist/chunk-PD4EV4MM.js +0 -147
- package/dist/index.d.ts +0 -194
- package/dist/index.js +0 -309
- package/dist/provider.d.ts +0 -134
- package/dist/provider.js +0 -152
- package/dist/types-CU7GyVez.d.cts +0 -151
- package/dist/types-CU7GyVez.d.ts +0 -151
- package/dist/utils.d.ts +0 -129
- package/dist/utils.js +0 -3
- package/dist/vite.d.ts +0 -533
- package/dist/vite.js +0 -945
- package/dist/zip-Blmn2vzE.d.cts +0 -71
- package/dist/zip-CnSv_Njj.d.ts +0 -71
- package/provider.d.ts +0 -1
- package/provider.js +0 -1
- package/utils.d.ts +0 -1
- package/utils.js +0 -1
- package/vite.d.ts +0 -1
- package/vite.js +0 -1
package/dist/zip-Blmn2vzE.d.cts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { a as UpdateJSON, D as DownloadingInfo } from './types-CU7GyVez.cjs';
|
|
2
|
-
import { Arrayable } from '@subframe7536/type-utils';
|
|
3
|
-
import { IncomingMessage } from 'electron';
|
|
4
|
-
|
|
5
|
-
declare function hashBuffer(data: string | Buffer, length: number): Buffer;
|
|
6
|
-
declare function aesEncrypt(plainText: string, key: Buffer, iv: Buffer): string;
|
|
7
|
-
/**
|
|
8
|
-
* Default function to generate asar signature, returns generated signature
|
|
9
|
-
* @param buffer file buffer
|
|
10
|
-
* @param privateKey primary key
|
|
11
|
-
* @param cert certificate
|
|
12
|
-
* @param version target version
|
|
13
|
-
*/
|
|
14
|
-
declare function defaultSignature(buffer: Buffer, privateKey: string, cert: string, version: string): string;
|
|
15
|
-
declare function aesDecrypt(encryptedText: string, key: Buffer, iv: Buffer): string;
|
|
16
|
-
/**
|
|
17
|
-
* Default function to verify asar signature,
|
|
18
|
-
* if signature is valid, returns the version, otherwise returns `undefined`
|
|
19
|
-
* @param buffer file buffer
|
|
20
|
-
* @param version target version
|
|
21
|
-
* @param signature signature
|
|
22
|
-
* @param cert certificate
|
|
23
|
-
*/
|
|
24
|
-
declare function defaultVerifySignature(buffer: Buffer, version: string, signature: string, cert: string): boolean;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Safe get value from header
|
|
28
|
-
* @param headers response header
|
|
29
|
-
* @param key target header key
|
|
30
|
-
*/
|
|
31
|
-
declare function getHeader(headers: Record<string, Arrayable<string>>, key: any): any;
|
|
32
|
-
declare function downloadUtil<T>(url: string, headers: Record<string, any>, onResponse: (req: Electron.ClientRequest, resp: IncomingMessage, resolve: (data: T) => void, reject: (e: any) => void) => void): Promise<T>;
|
|
33
|
-
type ResolveDataFn = (data: string, resolve: (data: any) => void, reject: (e: any) => void) => void;
|
|
34
|
-
declare const resolveJson: ResolveDataFn;
|
|
35
|
-
/**
|
|
36
|
-
* Default function to download json and parse to UpdateJson
|
|
37
|
-
* @param url target url
|
|
38
|
-
* @param headers extra headers
|
|
39
|
-
* @param signal abort signal
|
|
40
|
-
* @param resolveData on resolve
|
|
41
|
-
*/
|
|
42
|
-
declare function defaultDownloadText<T>(url: string, headers: Record<string, any>, signal: AbortSignal, resolveData: ResolveDataFn): Promise<T>;
|
|
43
|
-
/**
|
|
44
|
-
* Default function to download json and parse to UpdateJson
|
|
45
|
-
* @param url target url
|
|
46
|
-
* @param headers extra headers
|
|
47
|
-
* @param signal abort signal
|
|
48
|
-
*/
|
|
49
|
-
declare function defaultDownloadUpdateJSON(url: string, headers: Record<string, any>, signal: AbortSignal): Promise<UpdateJSON>;
|
|
50
|
-
/**
|
|
51
|
-
* Default function to download asar buffer,
|
|
52
|
-
* get total size from `Content-Length` header
|
|
53
|
-
* @param url target url
|
|
54
|
-
* @param headers extra headers
|
|
55
|
-
* @param signal abort signal
|
|
56
|
-
* @param onDownloading on downloading callback
|
|
57
|
-
*/
|
|
58
|
-
declare function defaultDownloadAsar(url: string, headers: Record<string, any>, signal: AbortSignal, onDownloading?: (progress: DownloadingInfo) => void): Promise<Buffer>;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Default function to compress file using brotli
|
|
62
|
-
* @param buffer uncompressed file buffer
|
|
63
|
-
*/
|
|
64
|
-
declare function defaultZipFile(buffer: Buffer): Promise<Buffer>;
|
|
65
|
-
/**
|
|
66
|
-
* Default function to decompress file using brotli
|
|
67
|
-
* @param buffer compressed file buffer
|
|
68
|
-
*/
|
|
69
|
-
declare function defaultUnzipFile(buffer: Buffer): Promise<Buffer>;
|
|
70
|
-
|
|
71
|
-
export { aesEncrypt as a, aesDecrypt as b, defaultVerifySignature as c, defaultSignature as d, downloadUtil as e, defaultDownloadText as f, getHeader as g, hashBuffer as h, defaultDownloadUpdateJSON as i, defaultDownloadAsar as j, defaultZipFile as k, defaultUnzipFile as l, resolveJson as r };
|
package/dist/zip-CnSv_Njj.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { a as UpdateJSON, D as DownloadingInfo } from './types-CU7GyVez.js';
|
|
2
|
-
import { Arrayable } from '@subframe7536/type-utils';
|
|
3
|
-
import { IncomingMessage } from 'electron';
|
|
4
|
-
|
|
5
|
-
declare function hashBuffer(data: string | Buffer, length: number): Buffer;
|
|
6
|
-
declare function aesEncrypt(plainText: string, key: Buffer, iv: Buffer): string;
|
|
7
|
-
/**
|
|
8
|
-
* Default function to generate asar signature, returns generated signature
|
|
9
|
-
* @param buffer file buffer
|
|
10
|
-
* @param privateKey primary key
|
|
11
|
-
* @param cert certificate
|
|
12
|
-
* @param version target version
|
|
13
|
-
*/
|
|
14
|
-
declare function defaultSignature(buffer: Buffer, privateKey: string, cert: string, version: string): string;
|
|
15
|
-
declare function aesDecrypt(encryptedText: string, key: Buffer, iv: Buffer): string;
|
|
16
|
-
/**
|
|
17
|
-
* Default function to verify asar signature,
|
|
18
|
-
* if signature is valid, returns the version, otherwise returns `undefined`
|
|
19
|
-
* @param buffer file buffer
|
|
20
|
-
* @param version target version
|
|
21
|
-
* @param signature signature
|
|
22
|
-
* @param cert certificate
|
|
23
|
-
*/
|
|
24
|
-
declare function defaultVerifySignature(buffer: Buffer, version: string, signature: string, cert: string): boolean;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Safe get value from header
|
|
28
|
-
* @param headers response header
|
|
29
|
-
* @param key target header key
|
|
30
|
-
*/
|
|
31
|
-
declare function getHeader(headers: Record<string, Arrayable<string>>, key: any): any;
|
|
32
|
-
declare function downloadUtil<T>(url: string, headers: Record<string, any>, onResponse: (req: Electron.ClientRequest, resp: IncomingMessage, resolve: (data: T) => void, reject: (e: any) => void) => void): Promise<T>;
|
|
33
|
-
type ResolveDataFn = (data: string, resolve: (data: any) => void, reject: (e: any) => void) => void;
|
|
34
|
-
declare const resolveJson: ResolveDataFn;
|
|
35
|
-
/**
|
|
36
|
-
* Default function to download json and parse to UpdateJson
|
|
37
|
-
* @param url target url
|
|
38
|
-
* @param headers extra headers
|
|
39
|
-
* @param signal abort signal
|
|
40
|
-
* @param resolveData on resolve
|
|
41
|
-
*/
|
|
42
|
-
declare function defaultDownloadText<T>(url: string, headers: Record<string, any>, signal: AbortSignal, resolveData: ResolveDataFn): Promise<T>;
|
|
43
|
-
/**
|
|
44
|
-
* Default function to download json and parse to UpdateJson
|
|
45
|
-
* @param url target url
|
|
46
|
-
* @param headers extra headers
|
|
47
|
-
* @param signal abort signal
|
|
48
|
-
*/
|
|
49
|
-
declare function defaultDownloadUpdateJSON(url: string, headers: Record<string, any>, signal: AbortSignal): Promise<UpdateJSON>;
|
|
50
|
-
/**
|
|
51
|
-
* Default function to download asar buffer,
|
|
52
|
-
* get total size from `Content-Length` header
|
|
53
|
-
* @param url target url
|
|
54
|
-
* @param headers extra headers
|
|
55
|
-
* @param signal abort signal
|
|
56
|
-
* @param onDownloading on downloading callback
|
|
57
|
-
*/
|
|
58
|
-
declare function defaultDownloadAsar(url: string, headers: Record<string, any>, signal: AbortSignal, onDownloading?: (progress: DownloadingInfo) => void): Promise<Buffer>;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Default function to compress file using brotli
|
|
62
|
-
* @param buffer uncompressed file buffer
|
|
63
|
-
*/
|
|
64
|
-
declare function defaultZipFile(buffer: Buffer): Promise<Buffer>;
|
|
65
|
-
/**
|
|
66
|
-
* Default function to decompress file using brotli
|
|
67
|
-
* @param buffer compressed file buffer
|
|
68
|
-
*/
|
|
69
|
-
declare function defaultUnzipFile(buffer: Buffer): Promise<Buffer>;
|
|
70
|
-
|
|
71
|
-
export { aesEncrypt as a, aesDecrypt as b, defaultVerifySignature as c, defaultSignature as d, downloadUtil as e, defaultDownloadText as f, getHeader as g, hashBuffer as h, defaultDownloadUpdateJSON as i, defaultDownloadAsar as j, defaultZipFile as k, defaultUnzipFile as l, resolveJson as r };
|
package/provider.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/provider'
|
package/provider.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/provider.cjs')
|
package/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/utils'
|
package/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/utils.cjs')
|
package/vite.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/vite'
|
package/vite.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/vite.js')
|