nw-builder 4.13.16 → 4.14.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 +1 -0
- package/package.json +9 -9
- package/src/cli.js +25 -11
package/README.md
CHANGED
|
@@ -375,6 +375,7 @@ nwbuild({
|
|
|
375
375
|
- A commit's body should have a description of changes in bullet points followed by any links it references or issues it fixes or closes.
|
|
376
376
|
- Google's Release Please Action is used to update the changelog, bump the package version and generate GitHub releases.
|
|
377
377
|
- NPM Publish Action publishes to `npm` if there is a version bump.
|
|
378
|
+
- Every time `nw` is upgraded, the `volta` package should also be updated and `nw-builder` should create a minor release (since the underlying Node version is changed).
|
|
378
379
|
|
|
379
380
|
## Roadmap
|
|
380
381
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nw-builder",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.1",
|
|
4
4
|
"description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NW.js",
|
|
@@ -52,25 +52,25 @@
|
|
|
52
52
|
"demo:exe:linux": "./tests/fixtures/out/linux/Demo",
|
|
53
53
|
"demo:exe:osx": "./tests/fixtures/out/osx/Demo.app/Contents/MacOS/Demo",
|
|
54
54
|
"demo:exe:win": "./tests/fixtures/out/win/Demo.exe",
|
|
55
|
-
"demo:cli": "nwbuild --mode=
|
|
55
|
+
"demo:cli": "nwbuild --mode=build --flavor=sdk --glob=false --cacheDir=./node_modules/nw --logLevel=debug --outDir=./tests/fixtures/out/linux --app.name=Demo --app.icon=./tests/fixtures/app/icon.png ./tests/fixtures/app"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@eslint/js": "^9.
|
|
58
|
+
"@eslint/js": "^9.32.0",
|
|
59
59
|
"@vitest/coverage-v8": "^3.2.4",
|
|
60
60
|
"base-volta-off-of-nwjs": "^1.0.5",
|
|
61
|
-
"eslint": "^9.
|
|
62
|
-
"eslint-plugin-jsdoc": "^
|
|
61
|
+
"eslint": "^9.32.0",
|
|
62
|
+
"eslint-plugin-jsdoc": "^52.0.2",
|
|
63
63
|
"globals": "^16.3.0",
|
|
64
|
-
"nw": "^0.
|
|
64
|
+
"nw": "^0.102.0",
|
|
65
65
|
"selenium-webdriver": "^4.34.0",
|
|
66
66
|
"vitest": "^3.0.7"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"archiver": "^7.0.1",
|
|
70
|
-
"axios": "^1.
|
|
70
|
+
"axios": "^1.11.0",
|
|
71
71
|
"commander": "^14.0.0",
|
|
72
72
|
"glob": "^11.0.3",
|
|
73
|
-
"node-gyp": "^11.
|
|
73
|
+
"node-gyp": "^11.3.0",
|
|
74
74
|
"plist": "^3.1.0",
|
|
75
75
|
"resedit": "^2.0.3",
|
|
76
76
|
"semver": "^7.7.2",
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
},
|
|
80
80
|
"volta": {
|
|
81
81
|
"node": "24.3.0",
|
|
82
|
-
"npm": "11.2
|
|
82
|
+
"npm": "11.5.2"
|
|
83
83
|
}
|
|
84
84
|
}
|
package/src/cli.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import process from 'node:process';
|
|
4
|
-
|
|
5
4
|
import { program } from 'commander';
|
|
6
5
|
|
|
7
6
|
import nwbuild from './index.js';
|
|
@@ -19,19 +18,34 @@ program
|
|
|
19
18
|
.option('--cacheDir <string>', 'Cache NW.js binaries', './cache')
|
|
20
19
|
.option('--outDir <string>', 'NW.js build artifacts', './out')
|
|
21
20
|
.option('--app <object>', 'Platform specific app metadata. Refer to docs for more info', {})
|
|
22
|
-
.option('--cache <boolean>', '
|
|
23
|
-
.option('--ffmpeg <boolean>', '
|
|
24
|
-
.option('--glob <boolean>', '
|
|
21
|
+
.option('--cache <boolean>', 'Enable/disable caching', true)
|
|
22
|
+
.option('--ffmpeg <boolean>', 'Enable/disable community ffmpeg', false)
|
|
23
|
+
.option('--glob <boolean>', 'Enable/disable globbing', true)
|
|
25
24
|
.option('--logLevel <string>', 'Specify log level', 'info')
|
|
26
|
-
.option('--shaSum <string>', '
|
|
27
|
-
.option('--zip <string>', '
|
|
25
|
+
.option('--shaSum <string>', 'Enable/disable shasum', true)
|
|
26
|
+
.option('--zip <string>', 'Enable/disable compression', false)
|
|
28
27
|
.option('--managedManifest <string>', 'Managed manifest mode', false)
|
|
29
|
-
.option('--nodeAddon <boolean>', 'Download NW.js Node headers', false)
|
|
28
|
+
.option('--nodeAddon <boolean>', 'Download NW.js Node headers', false)
|
|
29
|
+
.allowUnknownOption(true)
|
|
30
|
+
.allowExcessArguments(true);
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
// Handle unknown --app.* arguments
|
|
33
|
+
const unknownArgs = program.parse(process.argv).args;
|
|
34
|
+
const appConfig = {};
|
|
35
|
+
for (const arg of unknownArgs) {
|
|
36
|
+
const match = arg.match(/^--app\.([^.=]+)=(.*)$/);
|
|
37
|
+
if (match) {
|
|
38
|
+
const [, key, value] = match;
|
|
39
|
+
appConfig[key] = value;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
// Compose final options object
|
|
44
|
+
const opts = {
|
|
34
45
|
...program.opts(),
|
|
35
|
-
|
|
46
|
+
app: appConfig,
|
|
47
|
+
srcDir: program.args.find((arg) => !arg.startsWith('--app')),
|
|
36
48
|
cli: true,
|
|
37
|
-
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
nwbuild(opts);
|