electron-incremental-update 2.2.1 → 2.2.2
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 +6 -4
- package/dist/{bytecode-7V24FFYI.js → bytecode-R2B4KTMV.js} +3 -3
- package/dist/{chunk-PUVBFHOK.js → chunk-XGWQQVIZ.js} +12 -12
- package/dist/{esm-UJAQJA65.js → esm-4S4XCVEW.js} +1 -1
- package/dist/index.cjs +16 -16
- package/dist/index.d.cts +16 -7
- package/dist/index.d.ts +16 -7
- package/dist/index.js +12 -8
- package/dist/provider.cjs +44 -48
- package/dist/provider.d.cts +36 -35
- package/dist/provider.d.ts +36 -35
- package/dist/provider.js +19 -22
- package/dist/{types-C6lSLZWB.d.cts → types-CStrrQPl.d.ts} +4 -3
- package/dist/{types-nE_pIMPo.d.ts → types-CWtySwqA.d.cts} +4 -3
- package/dist/utils.cjs +37 -37
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/{version-BYVQ367i.d.cts → version-Bl_0oO5f.d.cts} +12 -0
- package/dist/{version-BYVQ367i.d.ts → version-Bl_0oO5f.d.ts} +12 -0
- package/dist/vite.d.ts +47 -24
- package/dist/vite.js +28 -19
- package/dist/{crypto-Zynscwmj.d.ts → zip-DQdr8pFv.d.cts} +12 -12
- package/dist/{crypto-Zynscwmj.d.cts → zip-DQdr8pFv.d.ts} +12 -12
- package/package.json +86 -87
- package/dist/{chunk-7JCGLFGU.js → chunk-LR7LR5WG.js} +3 -3
package/package.json
CHANGED
|
@@ -1,87 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "electron-incremental-update",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
5
|
-
"description": "Electron incremental update tools with Vite plugin, support bytecode protection",
|
|
6
|
-
"author": "subframe7536",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/subframe7536/electron-incremental-update.git"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [
|
|
13
|
-
"electron",
|
|
14
|
-
"incremental update",
|
|
15
|
-
"updater",
|
|
16
|
-
"bytecode"
|
|
17
|
-
],
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"import": "./dist/index.js",
|
|
21
|
-
"require": "./dist/index.cjs"
|
|
22
|
-
},
|
|
23
|
-
"./vite": {
|
|
24
|
-
"import": "./dist/vite.js"
|
|
25
|
-
},
|
|
26
|
-
"./utils": {
|
|
27
|
-
"import": "./dist/utils.js",
|
|
28
|
-
"require": "./dist/utils.cjs"
|
|
29
|
-
},
|
|
30
|
-
"./provider": {
|
|
31
|
-
"import": "./dist/provider.js",
|
|
32
|
-
"require": "./dist/provider.cjs"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"main": "dist/index.cjs",
|
|
36
|
-
"module": "dist/index.js",
|
|
37
|
-
"files": [
|
|
38
|
-
"dist",
|
|
39
|
-
"provider.d.ts",
|
|
40
|
-
"provider.js",
|
|
41
|
-
"utils.d.ts",
|
|
42
|
-
"utils.js",
|
|
43
|
-
"vite.d.ts",
|
|
44
|
-
"vite.js"
|
|
45
|
-
],
|
|
46
|
-
"scripts": {
|
|
47
|
-
"dev": "tsup --watch",
|
|
48
|
-
"build": "tsup &&
|
|
49
|
-
"release": "pnpm test && pnpm run build && bumpp --all && npm publish",
|
|
50
|
-
"test": "vitest --run",
|
|
51
|
-
"test:dev": "vitest",
|
|
52
|
-
"format": "eslint . --fix"
|
|
53
|
-
},
|
|
54
|
-
"publishConfig": {
|
|
55
|
-
"access": "public",
|
|
56
|
-
"registry": "https://registry.npmjs.org/"
|
|
57
|
-
},
|
|
58
|
-
"peerDependencies": {
|
|
59
|
-
"@electron/asar": "*",
|
|
60
|
-
"esbuild": "*"
|
|
61
|
-
},
|
|
62
|
-
"dependencies": {
|
|
63
|
-
"@babel/core": "^7.25.
|
|
64
|
-
"@babel/plugin-transform-arrow-functions": "^7.
|
|
65
|
-
"@babel/plugin-transform-template-literals": "^7.
|
|
66
|
-
"@subframe7536/type-utils": "^0.1.6",
|
|
67
|
-
"ci-info": "^4.0.0",
|
|
68
|
-
"local-pkg": "^0.5.0",
|
|
69
|
-
"magic-string": "^0.30.11",
|
|
70
|
-
"selfsigned": "^2.4.1",
|
|
71
|
-
"vite-plugin-electron": "^0.28.
|
|
72
|
-
},
|
|
73
|
-
"devDependencies": {
|
|
74
|
-
"@subframe7536/eslint-config": "^0.9.
|
|
75
|
-
"@types/babel__core": "^7.20.5",
|
|
76
|
-
"@types/node": "^20.16.
|
|
77
|
-
"bumpp": "^9.
|
|
78
|
-
"electron": "28.2.10",
|
|
79
|
-
"eslint": "^9.
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"vite": "^
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "electron-incremental-update",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "2.2.2",
|
|
5
|
+
"description": "Electron incremental update tools with Vite plugin, support bytecode protection",
|
|
6
|
+
"author": "subframe7536",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/subframe7536/electron-incremental-update.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"electron",
|
|
14
|
+
"incremental update",
|
|
15
|
+
"updater",
|
|
16
|
+
"bytecode"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"require": "./dist/index.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./vite": {
|
|
24
|
+
"import": "./dist/vite.js"
|
|
25
|
+
},
|
|
26
|
+
"./utils": {
|
|
27
|
+
"import": "./dist/utils.js",
|
|
28
|
+
"require": "./dist/utils.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./provider": {
|
|
31
|
+
"import": "./dist/provider.js",
|
|
32
|
+
"require": "./dist/provider.cjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"main": "dist/index.cjs",
|
|
36
|
+
"module": "dist/index.js",
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"provider.d.ts",
|
|
40
|
+
"provider.js",
|
|
41
|
+
"utils.d.ts",
|
|
42
|
+
"utils.js",
|
|
43
|
+
"vite.d.ts",
|
|
44
|
+
"vite.js"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"dev": "tsup --watch",
|
|
48
|
+
"build": "tsup && node fix-module.cjs",
|
|
49
|
+
"release": "pnpm test && pnpm run build && bumpp --all && npm publish",
|
|
50
|
+
"test": "vitest --run",
|
|
51
|
+
"test:dev": "vitest",
|
|
52
|
+
"format": "eslint . --fix"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public",
|
|
56
|
+
"registry": "https://registry.npmjs.org/"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@electron/asar": "*",
|
|
60
|
+
"esbuild": "*"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@babel/core": "^7.25.7",
|
|
64
|
+
"@babel/plugin-transform-arrow-functions": "^7.25.7",
|
|
65
|
+
"@babel/plugin-transform-template-literals": "^7.25.7",
|
|
66
|
+
"@subframe7536/type-utils": "^0.1.6",
|
|
67
|
+
"ci-info": "^4.0.0",
|
|
68
|
+
"local-pkg": "^0.5.0",
|
|
69
|
+
"magic-string": "^0.30.11",
|
|
70
|
+
"selfsigned": "^2.4.1",
|
|
71
|
+
"vite-plugin-electron": "^0.28.8"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@subframe7536/eslint-config": "^0.9.4",
|
|
75
|
+
"@types/babel__core": "^7.20.5",
|
|
76
|
+
"@types/node": "^20.16.11",
|
|
77
|
+
"bumpp": "^9.6.1",
|
|
78
|
+
"electron": "28.2.10",
|
|
79
|
+
"eslint": "^9.12.0",
|
|
80
|
+
"tsup": "^8.3.0",
|
|
81
|
+
"typescript": "^5.6.3",
|
|
82
|
+
"vite": "^5.4.8",
|
|
83
|
+
"vite-plugin-electron": "^0.28.8",
|
|
84
|
+
"vitest": "^2.1.2"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { bytecodeLog } from './chunk-5NKEXGI3.js';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import fs from 'node:fs';
|
|
4
2
|
import cp from 'node:child_process';
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
5
|
import * as babel from '@babel/core';
|
|
6
|
-
import MagicString from 'magic-string';
|
|
7
6
|
import { getPackageInfoSync } from 'local-pkg';
|
|
7
|
+
import MagicString from 'magic-string';
|
|
8
8
|
|
|
9
9
|
// src/vite/bytecode/code.ts
|
|
10
10
|
var bytecodeGeneratorScript = "const vm = require('vm')\nconst v8 = require('v8')\nconst wrap = require('module').wrap\nv8.setFlagsFromString('--no-lazy')\nv8.setFlagsFromString('--no-flush-bytecode')\nlet code = ''\nprocess.stdin.setEncoding('utf-8')\nprocess.stdin.on('readable', () => {\n const data = process.stdin.read()\n if (data !== null) {\n code += data\n }\n})\nprocess.stdin.on('end', () => {\n try {\n if (typeof code !== 'string') {\n throw new Error('javascript code must be string.')\n }\n const script = new vm.Script(wrap(code), { produceCachedData: true })\n const bytecodeBuffer = script.createCachedData()\n process.stdout.write(bytecodeBuffer)\n } catch (error) {\n console.error(error)\n }\n})\n";
|