seabox 0.1.0 → 0.1.1

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 CHANGED
@@ -25,6 +25,16 @@ Note: **V8 snapshot includes and embedds the original source**, this is currentl
25
25
  npm install --save-dev seabox
26
26
  ```
27
27
 
28
+ ### Optional: Windows Executable Metadata
29
+
30
+ If you want to customize Windows executable metadata (icon, version info), install `rcedit`:
31
+
32
+ ```bash
33
+ npm install --save-dev rcedit
34
+ ```
35
+
36
+ This is only needed if you use the `rcedit` configuration option.
37
+
28
38
  ## Configuration
29
39
 
30
40
  Create a `seabox.config.json` file in your project root:
@@ -217,8 +227,7 @@ You can also explicitly specify library patterns in your config:
217
227
  These files are extracted on first run (like `.node` files) since they need to be loaded from the filesystem.
218
228
 
219
229
  ### Code Signature Removal
220
-
221
- Required before SEA injection. Platform-specific tools needed:
230
+ If you have sign tools available, the seabox will attempt to unsign the node exe before modifying it. This is to reduce issues afterward when you try to resign it.
222
231
  - **Windows**: `signtool.exe` (from Windows SDK)
223
232
  - **macOS**: `codesign` (included with Xcode)
224
233
  - **Linux**: Not required
package/lib/inject.mjs CHANGED
@@ -81,8 +81,19 @@ async function applyRcedit(exePath, options, verbose) {
81
81
  diag.verbose('Applying rcedit to modify executable resources...', 2);
82
82
  diag.verbose(`Options: ${JSON.stringify(options, null, 2)}`, 2);
83
83
 
84
- // Dynamic import for rcedit (it's CommonJS)
85
- const rcedit = (await import('rcedit')).default;
84
+ // Try to import rcedit - it's a peer dependency
85
+ let rcedit;
86
+ try {
87
+ rcedit = (await import('rcedit')).default;
88
+ } catch (error) {
89
+ if (error.code === 'ERR_MODULE_NOT_FOUND') {
90
+ throw new Error(
91
+ 'rcedit is required for Windows executable metadata but not installed. ' +
92
+ 'Install it with: npm install rcedit'
93
+ );
94
+ }
95
+ throw error;
96
+ }
86
97
 
87
98
  try {
88
99
  await rcedit(exePath, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seabox",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Node.js Single Executable Application (SEA) builder tool with native and library extraction",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -34,17 +34,20 @@
34
34
  },
35
35
  "homepage": "https://github.com/MeirionHughes/seabox",
36
36
  "dependencies": {
37
- "@rollup/plugin-commonjs": "^28.0.2",
38
- "@rollup/plugin-json": "^6.1.0",
39
- "@rollup/plugin-node-resolve": "^15.3.0",
40
37
  "adm-zip": "^0.5.16",
41
38
  "glob": "^10.0.0",
42
39
  "postject": "^1.0.0-alpha.6",
43
- "rcedit": "^4.0.1",
44
40
  "rolldown": "^1.0.0-beta.50",
45
- "rollup": "^4.28.1",
46
41
  "tar": "^6.2.1"
47
42
  },
43
+ "peerDependencies": {
44
+ "rcedit": "^4.0.1"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "rcedit": {
48
+ "optional": true
49
+ }
50
+ },
48
51
  "devDependencies": {
49
52
  "chai": "^6.2.1",
50
53
  "javascript-obfuscator": "^4.1.1",