esp32tool 1.6.6 → 1.7.0

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.
Files changed (119) hide show
  1. package/apple-touch-icon.png +0 -0
  2. package/css/style.css +325 -25
  3. package/dist/const.d.ts +6 -1
  4. package/dist/const.js +9 -3
  5. package/dist/esp_loader.js +35 -22
  6. package/dist/flash_jedec.js +5 -0
  7. package/dist/stubs/esp32.json +5 -5
  8. package/dist/stubs/esp32c2.json +4 -4
  9. package/dist/stubs/esp32c3.json +4 -4
  10. package/dist/stubs/esp32c5.json +4 -4
  11. package/dist/stubs/esp32c6.json +4 -4
  12. package/dist/stubs/esp32c61.json +4 -4
  13. package/dist/stubs/esp32h2.json +4 -4
  14. package/dist/stubs/esp32p4.json +4 -4
  15. package/dist/stubs/esp32p4r3.json +4 -4
  16. package/dist/stubs/esp32s2.json +4 -4
  17. package/dist/stubs/esp32s3.json +27 -5
  18. package/dist/stubs/esp32s31.json +8 -0
  19. package/dist/stubs/esp8266.json +5 -5
  20. package/dist/stubs/index.js +4 -2
  21. package/dist/util/console-color.js +3 -3
  22. package/dist/util/timestamp-transformer.js +24 -1
  23. package/dist/web/esp32-n1hWo9nn.js +1 -0
  24. package/dist/web/esp32c2-CPnHdueO.js +1 -0
  25. package/dist/web/esp32c3-ea1mvbdS.js +1 -0
  26. package/dist/web/esp32c5-Dzn4lVbd.js +1 -0
  27. package/dist/web/esp32c6-DL8Ekn6h.js +1 -0
  28. package/dist/web/esp32c61-DDIvCrFA.js +1 -0
  29. package/dist/web/esp32h2-Dnu87P5q.js +1 -0
  30. package/dist/web/esp32p4-HGPqzQsU.js +1 -0
  31. package/dist/web/esp32p4r3-DounZFQB.js +1 -0
  32. package/dist/web/esp32s2-gzKRBlZl.js +1 -0
  33. package/dist/web/esp32s3-BzPgJvNE.js +1 -0
  34. package/dist/web/esp32s31-Ck4fXdho.js +1 -0
  35. package/dist/web/esp8266-KToZdvHe.js +1 -0
  36. package/dist/web/index.js +1 -1
  37. package/electron/cli-main.cjs +19 -19
  38. package/electron/main.cjs +167 -148
  39. package/electron/preload.js +16 -18
  40. package/icons/icon-128.png +0 -0
  41. package/icons/icon-144.png +0 -0
  42. package/icons/icon-152.png +0 -0
  43. package/icons/icon-192.png +0 -0
  44. package/icons/icon-384.png +0 -0
  45. package/icons/icon-512.png +0 -0
  46. package/icons/icon-72.png +0 -0
  47. package/icons/icon-96.png +0 -0
  48. package/js/console.js +21 -12
  49. package/js/hex-editor.js +216 -163
  50. package/js/improv.js +59 -21
  51. package/js/modules/esp32-n1hWo9nn.js +1 -0
  52. package/js/modules/esp32c2-CPnHdueO.js +1 -0
  53. package/js/modules/esp32c3-ea1mvbdS.js +1 -0
  54. package/js/modules/esp32c5-Dzn4lVbd.js +1 -0
  55. package/js/modules/esp32c6-DL8Ekn6h.js +1 -0
  56. package/js/modules/esp32c61-DDIvCrFA.js +1 -0
  57. package/js/modules/esp32h2-Dnu87P5q.js +1 -0
  58. package/js/modules/esp32p4-HGPqzQsU.js +1 -0
  59. package/js/modules/esp32p4r3-DounZFQB.js +1 -0
  60. package/js/modules/esp32s2-gzKRBlZl.js +1 -0
  61. package/js/modules/esp32s3-BzPgJvNE.js +1 -0
  62. package/js/modules/esp32s31-Ck4fXdho.js +1 -0
  63. package/js/modules/esp8266-KToZdvHe.js +1 -0
  64. package/js/modules/esptool.js +1 -1
  65. package/js/nvs-editor.js +1366 -182
  66. package/js/script.js +1048 -845
  67. package/js/util/console-color.js +3 -3
  68. package/js/util/timestamp-transformer.js +24 -1
  69. package/js/webusb-serial.js +1075 -950
  70. package/package.cli.json +2 -2
  71. package/package.json +22 -13
  72. package/screenshots/desktop.png +0 -0
  73. package/screenshots/mobile.png +0 -0
  74. package/src/const.ts +12 -3
  75. package/src/esp_loader.ts +41 -24
  76. package/src/flash_jedec.ts +5 -0
  77. package/src/stubs/README.md +3 -1
  78. package/src/stubs/esp32.json +5 -5
  79. package/src/stubs/esp32c2.json +4 -4
  80. package/src/stubs/esp32c3.json +4 -4
  81. package/src/stubs/esp32c5.json +4 -4
  82. package/src/stubs/esp32c6.json +4 -4
  83. package/src/stubs/esp32c61.json +4 -4
  84. package/src/stubs/esp32h2.json +4 -4
  85. package/src/stubs/esp32h4.json +8 -0
  86. package/src/stubs/esp32p4.json +4 -4
  87. package/src/stubs/esp32p4r3.json +4 -4
  88. package/src/stubs/esp32s2.json +4 -4
  89. package/src/stubs/esp32s3.json +27 -5
  90. package/src/stubs/esp32s31.json +8 -0
  91. package/src/stubs/esp8266.json +5 -5
  92. package/src/stubs/index.ts +3 -2
  93. package/src/util/console-color.ts +3 -3
  94. package/src/util/timestamp-transformer.ts +27 -1
  95. package/sw.js +1 -1
  96. package/dist/web/esp32-BRKoi17y.js +0 -1
  97. package/dist/web/esp32c2-Btgr_lwh.js +0 -1
  98. package/dist/web/esp32c3-CHKfoI8W.js +0 -1
  99. package/dist/web/esp32c5-BDW4KtLo.js +0 -1
  100. package/dist/web/esp32c6-il8tTxAG.js +0 -1
  101. package/dist/web/esp32c61-thKzxBGf.js +0 -1
  102. package/dist/web/esp32h2-CxoUHv_P.js +0 -1
  103. package/dist/web/esp32p4-D3jLP-jY.js +0 -1
  104. package/dist/web/esp32p4r3-CqI71ojR.js +0 -1
  105. package/dist/web/esp32s2-iX3WoDbg.js +0 -1
  106. package/dist/web/esp32s3-DGwDVIgz.js +0 -1
  107. package/dist/web/esp8266-CUwxJpGa.js +0 -1
  108. package/js/modules/esp32-BRKoi17y.js +0 -1
  109. package/js/modules/esp32c2-Btgr_lwh.js +0 -1
  110. package/js/modules/esp32c3-CHKfoI8W.js +0 -1
  111. package/js/modules/esp32c5-BDW4KtLo.js +0 -1
  112. package/js/modules/esp32c6-il8tTxAG.js +0 -1
  113. package/js/modules/esp32c61-thKzxBGf.js +0 -1
  114. package/js/modules/esp32h2-CxoUHv_P.js +0 -1
  115. package/js/modules/esp32p4-D3jLP-jY.js +0 -1
  116. package/js/modules/esp32p4r3-CqI71ojR.js +0 -1
  117. package/js/modules/esp32s2-iX3WoDbg.js +0 -1
  118. package/js/modules/esp32s3-DGwDVIgz.js +0 -1
  119. package/js/modules/esp8266-CUwxJpGa.js +0 -1
package/js/console.js CHANGED
@@ -133,7 +133,7 @@ export class ESP32ToolConsole {
133
133
  `;
134
134
 
135
135
  this.console = new ColoredConsole(
136
- this.containerElement.querySelector(".log")
136
+ this.containerElement.querySelector(".log"),
137
137
  );
138
138
 
139
139
  // Setup event listeners
@@ -152,18 +152,22 @@ export class ESP32ToolConsole {
152
152
  closeBtn.addEventListener("click", () => {
153
153
  // Dispatch close event to parent
154
154
  this.containerElement.dispatchEvent(
155
- new CustomEvent("console-close", { bubbles: true })
155
+ new CustomEvent("console-close", { bubbles: true }),
156
156
  );
157
157
  });
158
158
  }
159
159
 
160
- const improvBtn = this.containerElement.querySelector("#console-improv-btn");
160
+ const improvBtn = this.containerElement.querySelector(
161
+ "#console-improv-btn",
162
+ );
161
163
  if (improvBtn) {
162
164
  improvBtn.addEventListener("click", () => this._openImprov());
163
165
  }
164
166
 
165
167
  if (this.allowInput) {
166
- const input = this.containerElement.querySelector(".esp32tool-console-input");
168
+ const input = this.containerElement.querySelector(
169
+ ".esp32tool-console-input",
170
+ );
167
171
 
168
172
  this.containerElement.addEventListener("click", () => {
169
173
  // Only focus input if user didn't select some text
@@ -217,10 +221,10 @@ export class ESP32ToolConsole {
217
221
  this.console.addLine("");
218
222
  this.console.addLine("");
219
223
  this.console.addLine(
220
- `Terminal disconnected: Port readable stream not available`
224
+ `Terminal disconnected: Port readable stream not available`,
221
225
  );
222
226
  console.error(
223
- "Port readable stream not available - port may need to be reopened at correct baudrate"
227
+ "Port readable stream not available - port may need to be reopened at correct baudrate",
224
228
  );
225
229
  return;
226
230
  }
@@ -248,14 +252,14 @@ export class ESP32ToolConsole {
248
252
  if (pat.test(chunk)) {
249
253
  bootloaderDetected = true;
250
254
  this.containerElement.dispatchEvent(
251
- new CustomEvent("console-bootloader", { bubbles: true })
255
+ new CustomEvent("console-bootloader", { bubbles: true }),
252
256
  );
253
257
  break;
254
258
  }
255
259
  }
256
260
  }
257
261
  },
258
- })
262
+ }),
259
263
  );
260
264
  if (!abortSignal.aborted) {
261
265
  this.console.addLine("");
@@ -264,7 +268,10 @@ export class ESP32ToolConsole {
264
268
  }
265
269
  } catch (e) {
266
270
  // Only log disconnect errors if the abort was NOT intentional
267
- if (!abortSignal.aborted && !(e instanceof DOMException && e.name === 'AbortError')) {
271
+ if (
272
+ !abortSignal.aborted &&
273
+ !(e instanceof DOMException && e.name === "AbortError")
274
+ ) {
268
275
  this.console.addLine("");
269
276
  this.console.addLine("");
270
277
  this.console.addLine(`Terminal disconnected: ${e}`);
@@ -297,7 +304,9 @@ export class ESP32ToolConsole {
297
304
  }
298
305
 
299
306
  async _sendCommand() {
300
- const input = this.containerElement.querySelector(".esp32tool-console-input");
307
+ const input = this.containerElement.querySelector(
308
+ ".esp32tool-console-input",
309
+ );
301
310
  const command = input.value;
302
311
 
303
312
  if (command.trim() !== "") {
@@ -347,8 +356,8 @@ export class ESP32ToolConsole {
347
356
 
348
357
  // Only check the first 30 lines (same as _connect) to avoid false positives
349
358
  // from bootloader patterns appearing later in normal firmware output
350
- const lines = text.split('\n');
351
- const firstLines = lines.slice(0, 30).join('\n');
359
+ const lines = text.split("\n");
360
+ const firstLines = lines.slice(0, 30).join("\n");
352
361
 
353
362
  for (const pat of BOOTLOADER_PATTERNS) {
354
363
  if (pat.test(firstLines)) {