esp32tool 1.6.6 → 1.6.7
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/apple-touch-icon.png +0 -0
- package/css/style.css +325 -25
- package/dist/util/console-color.js +3 -3
- package/dist/util/timestamp-transformer.js +24 -1
- package/electron/cli-main.cjs +19 -19
- package/electron/main.cjs +167 -148
- package/electron/preload.js +16 -18
- package/icons/icon-128.png +0 -0
- package/icons/icon-144.png +0 -0
- package/icons/icon-152.png +0 -0
- package/icons/icon-192.png +0 -0
- package/icons/icon-384.png +0 -0
- package/icons/icon-512.png +0 -0
- package/icons/icon-72.png +0 -0
- package/icons/icon-96.png +0 -0
- package/js/console.js +21 -12
- package/js/hex-editor.js +216 -163
- package/js/improv.js +59 -21
- package/js/nvs-editor.js +1189 -182
- package/js/script.js +1048 -845
- package/js/util/console-color.js +3 -3
- package/js/util/timestamp-transformer.js +24 -1
- package/js/webusb-serial.js +1075 -950
- package/package.cli.json +2 -2
- package/package.json +11 -12
- package/screenshots/desktop.png +0 -0
- package/screenshots/mobile.png +0 -0
- package/src/util/console-color.ts +3 -3
- package/src/util/timestamp-transformer.ts +27 -1
- package/sw.js +1 -1
package/package.cli.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esp32tool",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "ESP32Tool - Standalone command-line tool (build-time config only)",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"usb": "^2.17.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"electron": "^
|
|
26
|
+
"electron": "^42.0.1"
|
|
27
27
|
},
|
|
28
28
|
"_comment": "This file is ONLY used during CLI builds. It is temporarily swapped with package.json by build-electron-cli.cjs, then restored. Never publish this file to npm. Keep version in sync with main package.json when releasing."
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esp32tool",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Flash & Read ESP devices using WebSerial, Electron, and also Android mobile via WebUSB",
|
|
6
6
|
"main": "electron/main.cjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build": "npm run prebuild && node update-sw-version.cjs && tsc --skipLibCheck && tsc -p tsconfig.util.json && rollup -c && node -e \"const fs=require('fs'); fs.readdirSync('dist/web').filter(f=>f.endsWith('.js')).forEach(f=>fs.copyFileSync('dist/web/'+f,'js/modules/'+f)); fs.renameSync('js/modules/index.js','js/modules/esptool.js');\" && node fix-cli-imports.cjs",
|
|
25
25
|
"build:binary": "node build-single-binary.cjs",
|
|
26
26
|
"build:cli-electron": "node build-electron-cli.cjs",
|
|
27
|
-
"format": "npm exec -- prettier --write src",
|
|
27
|
+
"format": "npm exec -- prettier --write src \"js/*.js\" electron css",
|
|
28
28
|
"dev:clean": "node -e \"const fs=require('fs'); fs.rmSync('dist',{recursive:true,force:true});\"",
|
|
29
29
|
"dev:tsc-once": "tsc",
|
|
30
30
|
"dev:tsc": "tsc --watch",
|
|
@@ -55,22 +55,21 @@
|
|
|
55
55
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
56
56
|
"@rollup/plugin-terser": "^1.0.0",
|
|
57
57
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
58
|
-
"@types/node": "^25.
|
|
58
|
+
"@types/node": "^25.7.0",
|
|
59
59
|
"@types/pako": "^2.0.4",
|
|
60
|
-
"@types/serialport": "^10.2.0",
|
|
61
60
|
"@types/w3c-web-serial": "^1.0.8",
|
|
62
61
|
"archiver": "^7.0.1",
|
|
63
|
-
"electron": "^
|
|
62
|
+
"electron": "^42.0.1",
|
|
64
63
|
"electron-squirrel-startup": "^1.0.1",
|
|
65
|
-
"eslint": "^10.
|
|
64
|
+
"eslint": "^10.3.0",
|
|
66
65
|
"eslint-config-prettier": "^10.1.8",
|
|
67
66
|
"eslint-plugin-prettier": "^5.5.5",
|
|
68
67
|
"npm-run-all": "^4.1.5",
|
|
69
68
|
"prettier": "^3.8.3",
|
|
70
|
-
"rollup": "^4.60.
|
|
69
|
+
"rollup": "^4.60.3",
|
|
71
70
|
"serve": "^14.2.6",
|
|
72
71
|
"typescript": "^5.9.3",
|
|
73
|
-
"typescript-eslint": "^8.59.
|
|
72
|
+
"typescript-eslint": "^8.59.1"
|
|
74
73
|
},
|
|
75
74
|
"dependencies": {
|
|
76
75
|
"pako": "^2.1.0",
|
|
@@ -78,11 +77,11 @@
|
|
|
78
77
|
"usb": "^2.17.0"
|
|
79
78
|
},
|
|
80
79
|
"overrides": {
|
|
81
|
-
"tmp": "^0.2.
|
|
82
|
-
"tar": "^7.5.
|
|
83
|
-
"minimatch": "^10.2.
|
|
80
|
+
"tmp": "^0.2.5",
|
|
81
|
+
"tar": "^7.5.13",
|
|
82
|
+
"minimatch": "^10.2.5",
|
|
84
83
|
"serve": {
|
|
85
|
-
"ajv": "^8.
|
|
84
|
+
"ajv": "^8.20.0"
|
|
86
85
|
},
|
|
87
86
|
"@electron/asar": "^4.0.1",
|
|
88
87
|
"serialize-javascript": "^7.0.3",
|
package/screenshots/desktop.png
CHANGED
|
Binary file
|
package/screenshots/mobile.png
CHANGED
|
Binary file
|
|
@@ -109,8 +109,6 @@ export class ColoredConsole {
|
|
|
109
109
|
lineSpan.classList.add("line");
|
|
110
110
|
|
|
111
111
|
const addSpan = (content: string) => {
|
|
112
|
-
if (content === "") return;
|
|
113
|
-
|
|
114
112
|
const span = document.createElement("span");
|
|
115
113
|
if (this.state.bold) span.classList.add("log-bold");
|
|
116
114
|
if (this.state.dim) span.classList.add("log-dim");
|
|
@@ -193,7 +191,8 @@ export class ColoredConsole {
|
|
|
193
191
|
}
|
|
194
192
|
if (invalidSgr) continue;
|
|
195
193
|
|
|
196
|
-
|
|
194
|
+
let ci = 0;
|
|
195
|
+
while (ci < codes.length) {
|
|
197
196
|
const code = codes[ci];
|
|
198
197
|
switch (code) {
|
|
199
198
|
case 0:
|
|
@@ -464,6 +463,7 @@ export class ColoredConsole {
|
|
|
464
463
|
this.state.bgRgb = ANSI_256[15];
|
|
465
464
|
break;
|
|
466
465
|
}
|
|
466
|
+
ci++;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
addSpan(line.substring(i));
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
const DEVICE_TIMESTAMP_RE =
|
|
10
10
|
/^\s*(?:\[\d{2}:\d{2}:\d{2}(?:\.\d+)?\]|(?:\d{2}:){2}\d{2}\.\d)/;
|
|
11
11
|
|
|
12
|
+
// Matches leading ANSI SGR (color/style) codes at the start of a string
|
|
13
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: ANSI escape sequences
|
|
14
|
+
// eslint-disable-next-line no-control-regex
|
|
15
|
+
const LEADING_ANSI_RE = /^(\x1b\[(?:\d+;)*\d*m)+/;
|
|
16
|
+
|
|
12
17
|
export class TimestampTransformer implements Transformer<string, string> {
|
|
13
18
|
private deviceHasTimestamps = false;
|
|
14
19
|
|
|
@@ -32,11 +37,32 @@ export class TimestampTransformer implements Transformer<string, string> {
|
|
|
32
37
|
return;
|
|
33
38
|
}
|
|
34
39
|
|
|
40
|
+
// Extract leading ANSI codes to preserve them across line splits
|
|
41
|
+
const ansiMatch = chunk.match(LEADING_ANSI_RE);
|
|
42
|
+
const leadingAnsi = ansiMatch ? ansiMatch[0] : "";
|
|
43
|
+
const contentWithoutAnsi = leadingAnsi
|
|
44
|
+
? chunk.slice(leadingAnsi.length)
|
|
45
|
+
: chunk;
|
|
46
|
+
|
|
35
47
|
const date = new Date();
|
|
36
48
|
const h = date.getHours().toString().padStart(2, "0");
|
|
37
49
|
const m = date.getMinutes().toString().padStart(2, "0");
|
|
38
50
|
const s = date.getSeconds().toString().padStart(2, "0");
|
|
39
|
-
|
|
51
|
+
const timestamp = `[${h}:${m}:${s}]`;
|
|
52
|
+
|
|
53
|
+
// For multi-line chunks, we need to preserve ANSI codes on each line
|
|
54
|
+
// Split on newlines, but keep the newline characters
|
|
55
|
+
const lines = contentWithoutAnsi.split(/(\r?\n)/);
|
|
56
|
+
let result = "";
|
|
57
|
+
for (const part of lines) {
|
|
58
|
+
if (part === "\n" || part === "\r\n") {
|
|
59
|
+
result += part;
|
|
60
|
+
} else if (part !== "") {
|
|
61
|
+
result += leadingAnsi + timestamp + " " + part;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
controller.enqueue(result);
|
|
40
66
|
}
|
|
41
67
|
|
|
42
68
|
reset() {
|
package/sw.js
CHANGED