nw-builder 4.14.0 → 4.14.2
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/package.json +2 -2
- package/src/bld.js +1 -1
- package/src/cli.js +5 -3
- package/src/util.js +2 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nw-builder",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.2",
|
|
4
4
|
"description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NW.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@vitest/coverage-v8": "^3.2.4",
|
|
60
60
|
"base-volta-off-of-nwjs": "^1.0.5",
|
|
61
61
|
"eslint": "^9.32.0",
|
|
62
|
-
"eslint-plugin-jsdoc": "^52.0.
|
|
62
|
+
"eslint-plugin-jsdoc": "^52.0.4",
|
|
63
63
|
"globals": "^16.3.0",
|
|
64
64
|
"nw": "^0.102.0",
|
|
65
65
|
"selenium-webdriver": "^4.34.0",
|
package/src/bld.js
CHANGED
|
@@ -340,7 +340,7 @@ const setWinConfig = async ({ app, outDir }) => {
|
|
|
340
340
|
lang: EN_US,
|
|
341
341
|
codepage: 1200,
|
|
342
342
|
});
|
|
343
|
-
vi.lang=app.languageCode;
|
|
343
|
+
vi.lang = app.languageCode;
|
|
344
344
|
}
|
|
345
345
|
vi.setFileVersion(app.fileVersion, app.languageCode);
|
|
346
346
|
vi.setProductVersion(app.productVersion, app.languageCode);
|
package/src/cli.js
CHANGED
|
@@ -25,10 +25,12 @@ program
|
|
|
25
25
|
.option('--shaSum <string>', 'Enable/disable shasum', true)
|
|
26
26
|
.option('--zip <string>', 'Enable/disable compression', false)
|
|
27
27
|
.option('--managedManifest <string>', 'Managed manifest mode', false)
|
|
28
|
-
.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);
|
|
29
31
|
|
|
30
32
|
// Handle unknown --app.* arguments
|
|
31
|
-
const unknownArgs = program.
|
|
33
|
+
const unknownArgs = program.parse(process.argv).args;
|
|
32
34
|
const appConfig = {};
|
|
33
35
|
for (const arg of unknownArgs) {
|
|
34
36
|
const match = arg.match(/^--app\.([^.=]+)=(.*)$/);
|
|
@@ -42,7 +44,7 @@ for (const arg of unknownArgs) {
|
|
|
42
44
|
const opts = {
|
|
43
45
|
...program.opts(),
|
|
44
46
|
app: appConfig,
|
|
45
|
-
srcDir: program.args
|
|
47
|
+
srcDir: program.args.find((arg) => !arg.startsWith('--app')),
|
|
46
48
|
cli: true,
|
|
47
49
|
};
|
|
48
50
|
|
package/src/util.js
CHANGED
|
@@ -240,9 +240,6 @@ export const parse = async (options, pkg) => {
|
|
|
240
240
|
}
|
|
241
241
|
/* Path to where the icon currently is in the filesystem */
|
|
242
242
|
options.app.icon = options.app.icon ?? pkg.window?.icon ?? undefined;
|
|
243
|
-
if (options.app.icon) {
|
|
244
|
-
options.app.icon = path.resolve(options.app.icon);
|
|
245
|
-
}
|
|
246
243
|
|
|
247
244
|
// TODO(#737): move this out
|
|
248
245
|
if (options.platform === 'linux') {
|
|
@@ -255,11 +252,8 @@ export const parse = async (options, pkg) => {
|
|
|
255
252
|
options.app.notShowIn = options.app.notShowIn ?? undefined;
|
|
256
253
|
options.app.dBusActivatable = options.app.dBusActivatable ?? undefined;
|
|
257
254
|
options.app.tryExec = options.app.tryExec ?? undefined;
|
|
258
|
-
options.app.exec = options.app.exec ?? undefined;
|
|
259
|
-
|
|
260
|
-
options.app.exec = path.resolve(options.app.exec);
|
|
261
|
-
}
|
|
262
|
-
options.app.path = options.app.path ?? undefined;
|
|
255
|
+
options.app.exec = options.app.exec ? path.resolve(options.app.exec) : options.app.name ?? undefined;
|
|
256
|
+
options.app.path = options.app.path ?? options.outDir ?? undefined;
|
|
263
257
|
options.app.terminal = options.app.terminal ?? undefined;
|
|
264
258
|
options.app.actions = options.app.actions ?? undefined;
|
|
265
259
|
options.app.mimeType = options.app.mimeType ?? undefined;
|