esp32tool 1.1.8 → 1.2.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 (49) hide show
  1. package/.nojekyll +0 -0
  2. package/README.md +100 -6
  3. package/apple-touch-icon.png +0 -0
  4. package/build-electron-cli.cjs +177 -0
  5. package/build-single-binary.cjs +295 -0
  6. package/css/light.css +11 -0
  7. package/css/style.css +225 -35
  8. package/dist/cli.d.ts +17 -0
  9. package/dist/cli.js +458 -0
  10. package/dist/esp_loader.d.ts +129 -21
  11. package/dist/esp_loader.js +1227 -222
  12. package/dist/index.d.ts +2 -1
  13. package/dist/index.js +37 -4
  14. package/dist/node-usb-adapter.d.ts +47 -0
  15. package/dist/node-usb-adapter.js +725 -0
  16. package/dist/stubs/index.d.ts +1 -2
  17. package/dist/stubs/index.js +4 -0
  18. package/dist/web/index.js +1 -1
  19. package/electron/cli-main.cjs +74 -0
  20. package/electron/main.cjs +338 -0
  21. package/electron/main.js +7 -2
  22. package/favicon.ico +0 -0
  23. package/fix-cli-imports.cjs +127 -0
  24. package/generate-icons.sh +89 -0
  25. package/icons/icon-128.png +0 -0
  26. package/icons/icon-144.png +0 -0
  27. package/icons/icon-152.png +0 -0
  28. package/icons/icon-192.png +0 -0
  29. package/icons/icon-384.png +0 -0
  30. package/icons/icon-512.png +0 -0
  31. package/icons/icon-72.png +0 -0
  32. package/icons/icon-96.png +0 -0
  33. package/index.html +94 -64
  34. package/install-android.html +411 -0
  35. package/js/modules/esptool.js +1 -1
  36. package/js/script.js +165 -160
  37. package/js/webusb-serial.js +1017 -0
  38. package/license.md +1 -1
  39. package/manifest.json +89 -0
  40. package/package.cli.json +29 -0
  41. package/package.json +31 -21
  42. package/screenshots/desktop.png +0 -0
  43. package/screenshots/mobile.png +0 -0
  44. package/src/cli.ts +618 -0
  45. package/src/esp_loader.ts +1438 -254
  46. package/src/index.ts +69 -3
  47. package/src/node-usb-adapter.ts +924 -0
  48. package/src/stubs/index.ts +4 -1
  49. package/sw.js +155 -0
package/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Johann Obermeier
3
+ Copyright (c) 2023-2026 Johann Obermeier
4
4
  Copyright (c) 2021 Nabu Casa
5
5
  Copyright (c) 2020 Melissa LeBlanc-Williams for Adafruit Industries
6
6
 
package/manifest.json ADDED
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "ESP32Tool - Flash & Read ESP Devices",
3
+ "short_name": "ESP32Tool",
4
+ "description": "Flash & Read ESP devices using WebSerial and WebUSB",
5
+ "start_url": "./",
6
+ "scope": "./",
7
+ "id": "./?source=pwa",
8
+ "display": "standalone",
9
+ "background_color": "#ffffff",
10
+ "theme_color": "#1a1a1a",
11
+ "orientation": "any",
12
+ "icons": [
13
+ {
14
+ "src": "icons/icon-72.png",
15
+ "sizes": "72x72",
16
+ "type": "image/png",
17
+ "purpose": "any"
18
+ },
19
+ {
20
+ "src": "icons/icon-96.png",
21
+ "sizes": "96x96",
22
+ "type": "image/png",
23
+ "purpose": "any"
24
+ },
25
+ {
26
+ "src": "icons/icon-128.png",
27
+ "sizes": "128x128",
28
+ "type": "image/png",
29
+ "purpose": "any"
30
+ },
31
+ {
32
+ "src": "icons/icon-144.png",
33
+ "sizes": "144x144",
34
+ "type": "image/png",
35
+ "purpose": "any"
36
+ },
37
+ {
38
+ "src": "icons/icon-152.png",
39
+ "sizes": "152x152",
40
+ "type": "image/png",
41
+ "purpose": "any"
42
+ },
43
+ {
44
+ "src": "icons/icon-192.png",
45
+ "sizes": "192x192",
46
+ "type": "image/png",
47
+ "purpose": "any"
48
+ },
49
+ {
50
+ "src": "icons/icon-192.png",
51
+ "sizes": "192x192",
52
+ "type": "image/png",
53
+ "purpose": "maskable"
54
+ },
55
+ {
56
+ "src": "icons/icon-384.png",
57
+ "sizes": "384x384",
58
+ "type": "image/png",
59
+ "purpose": "any"
60
+ },
61
+ {
62
+ "src": "icons/icon-512.png",
63
+ "sizes": "512x512",
64
+ "type": "image/png",
65
+ "purpose": "any"
66
+ },
67
+ {
68
+ "src": "icons/icon-512.png",
69
+ "sizes": "512x512",
70
+ "type": "image/png",
71
+ "purpose": "maskable"
72
+ }
73
+ ],
74
+ "categories": ["utilities", "developer tools"],
75
+ "screenshots": [
76
+ {
77
+ "src": "screenshots/desktop.png",
78
+ "sizes": "1280x720",
79
+ "type": "image/png",
80
+ "form_factor": "wide"
81
+ },
82
+ {
83
+ "src": "screenshots/mobile.png",
84
+ "sizes": "540x720",
85
+ "type": "image/png",
86
+ "form_factor": "narrow"
87
+ }
88
+ ]
89
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "esp32tool",
3
+ "version": "1.2.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "description": "ESP32Tool - Standalone command-line tool (build-time config only)",
7
+ "main": "electron/cli-main.cjs",
8
+ "author": "Johann Obermeier",
9
+ "license": "MIT",
10
+ "files": [
11
+ "electron/cli-main.cjs",
12
+ "dist/**/*.js",
13
+ "dist/**/*.json",
14
+ "dist/**/*.wasm",
15
+ "!dist/web/**",
16
+ "!dist/index.js",
17
+ "!dist/index.d.ts",
18
+ "package.json"
19
+ ],
20
+ "dependencies": {
21
+ "pako": "^2.1.0",
22
+ "tslib": "^2.8.1",
23
+ "usb": "^2.16.0"
24
+ },
25
+ "devDependencies": {
26
+ "electron": "^39.2.5"
27
+ },
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
+ }
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "esp32tool",
3
- "version": "1.1.8",
4
- "description": "Flash & Read ESP devices using WebSerial",
5
- "main": "electron/main.js",
3
+ "version": "1.2.0",
4
+ "type": "module",
5
+ "description": "Flash & Read ESP devices using WebSerial, Electron, and also Android mobile via WebUSB",
6
+ "main": "electron/main.cjs",
7
+ "bin": {
8
+ "esp32tool": "./dist/cli-fixed.js"
9
+ },
6
10
  "repository": {
7
11
  "type": "git",
8
12
  "url": "git://github.com/Jason2866/esp32tool.git"
@@ -12,13 +16,14 @@
12
16
  },
13
17
  "author": "Johann Obermeier",
14
18
  "license": "MIT",
15
- "engines": {
19
+ "engines": {
16
20
  "node": ">=22.12.0"
17
21
  },
18
22
  "scripts": {
19
23
  "prebuild": "node -e \"const fs=require('fs'); fs.rmSync('dist',{recursive:true,force:true}); fs.rmSync('js/modules',{recursive:true,force:true}); fs.mkdirSync('js/modules',{recursive:true});\"",
20
- "build": "npm run prebuild && tsc && 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');\"",
21
- "prepublishOnly": "npm run build",
24
+ "build": "npm run prebuild && tsc --skipLibCheck && 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
+ "build:binary": "node build-single-binary.cjs",
26
+ "build:cli-electron": "node build-electron-cli.cjs",
22
27
  "format": "npm exec -- prettier --write src",
23
28
  "develop": "script/develop",
24
29
  "lint": "eslint src/",
@@ -26,39 +31,44 @@
26
31
  "start": "electron-forge start",
27
32
  "package": "electron-forge package",
28
33
  "make": "electron-forge make",
29
- "publish": "electron-forge publish"
34
+ "publish": "electron-forge publish",
35
+ "generate-icons": "./generate-icons.sh",
36
+ "test-pwa": "npx serve . -p 5004"
30
37
  },
31
38
  "devDependencies": {
32
- "@types/node": "^25.0.2",
33
- "eslint": "^9.39.2",
34
- "@eslint/js": "^9.39.2",
35
- "electron": "^39.2.5",
36
- "electron-squirrel-startup": "^1.0.1",
37
- "@electron-forge/cli": "^7.6.0",
38
- "@electron-forge/maker-deb": "^7.6.0",
39
- "@electron-forge/maker-dmg": "^7.6.0",
40
- "@electron-forge/maker-rpm": "^7.6.0",
41
- "@electron-forge/maker-squirrel": "^7.6.0",
42
- "@electron-forge/maker-zip": "^7.6.0",
43
- "@electron-forge/plugin-auto-unpack-natives": "^7.6.0",
39
+ "@electron-forge/cli": "^7.11.1",
40
+ "@electron-forge/maker-deb": "^7.11.1",
41
+ "@electron-forge/maker-dmg": "^7.11.1",
42
+ "@electron-forge/maker-rpm": "^7.11.1",
43
+ "@electron-forge/maker-squirrel": "^7.11.1",
44
+ "@electron-forge/maker-zip": "^7.11.1",
45
+ "@electron-forge/plugin-auto-unpack-natives": "^7.11.1",
44
46
  "@electron/fuses": "^2.0.0",
47
+ "@eslint/js": "^9.39.2",
45
48
  "@rollup/plugin-json": "^6.1.0",
46
49
  "@rollup/plugin-node-resolve": "^16.0.0",
47
50
  "@rollup/plugin-terser": "^0.4.4",
48
51
  "@rollup/plugin-typescript": "^12.3.0",
52
+ "@types/node": "^25.0.6",
49
53
  "@types/pako": "^2.0.4",
54
+ "@types/serialport": "^8.0.5",
50
55
  "@types/w3c-web-serial": "^1.0.7",
56
+ "archiver": "^7.0.1",
57
+ "electron": "^39.2.5",
58
+ "electron-squirrel-startup": "^1.0.1",
59
+ "eslint": "^9.39.2",
51
60
  "eslint-config-prettier": "^10.1.8",
52
61
  "eslint-plugin-prettier": "^5.5.4",
53
62
  "prettier": "^3.7.3",
54
63
  "rollup": "^4.53.5",
55
64
  "serve": "^14.2.4",
56
65
  "typescript": "^5.7.3",
57
- "typescript-eslint": "^8.50.1"
66
+ "typescript-eslint": "^8.53.0"
58
67
  },
59
68
  "dependencies": {
60
69
  "pako": "^2.1.0",
61
- "tslib": "^2.8.1"
70
+ "tslib": "^2.8.1",
71
+ "usb": "^2.16.0"
62
72
  },
63
73
  "overrides": {
64
74
  "tmp": "^0.2.4"
Binary file
Binary file