nw-builder 4.7.2 → 4.7.4
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 +0 -2
- package/package.json +4 -4
- package/src/cli.js +32 -16
- package/src/index.js +4 -4
package/README.md
CHANGED
|
@@ -303,7 +303,6 @@ nwbuild({
|
|
|
303
303
|
|
|
304
304
|
### Chores
|
|
305
305
|
|
|
306
|
-
- chore(cli): migrate from `yargs` to `commander`
|
|
307
306
|
- chore(get): verify sha checksum for downloads
|
|
308
307
|
- chore: annotate file paths as `fs.PathLike` instead of `string`.
|
|
309
308
|
- chore(bld): factor out core build step
|
|
@@ -314,7 +313,6 @@ nwbuild({
|
|
|
314
313
|
- chore(bld): factor out compressing
|
|
315
314
|
- chore(bld): factor out managed manifest
|
|
316
315
|
- chore(bld): move `.desktop` entry file logic to `create-desktop-shortcuts` package
|
|
317
|
-
- chore(util): factor out file paths as constant variables
|
|
318
316
|
|
|
319
317
|
## FAQ
|
|
320
318
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nw-builder",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.4",
|
|
4
4
|
"description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NW.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@stylistic/eslint-plugin-js": "^2.1.0",
|
|
53
53
|
"eslint": "^8.57.0",
|
|
54
54
|
"eslint-config-tjw-jsdoc": "^1.0.5",
|
|
55
|
-
"eslint-plugin-jsdoc": "^48.2.
|
|
55
|
+
"eslint-plugin-jsdoc": "^48.2.4",
|
|
56
56
|
"eslint-plugin-markdown": "^5.0.0",
|
|
57
57
|
"jsdoc": "^4.0.3",
|
|
58
58
|
"selenium-webdriver": "^4.20.0",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"axios": "^1.6.8",
|
|
63
63
|
"cli-progress": "^3.12.0",
|
|
64
64
|
"compressing": "^1.10.0",
|
|
65
|
-
"glob": "^10.3.
|
|
65
|
+
"glob": "^10.3.14",
|
|
66
66
|
"node-gyp": "^10.1.0",
|
|
67
67
|
"plist": "^3.1.0",
|
|
68
68
|
"rcedit": "^4.0.1",
|
|
69
|
-
"semver": "^7.6.
|
|
69
|
+
"semver": "^7.6.2",
|
|
70
70
|
"tar": "^7.1.0",
|
|
71
71
|
"yargs": "^17.7.2",
|
|
72
72
|
"yauzl-promise": "^4.0.0"
|
package/src/cli.js
CHANGED
|
@@ -12,7 +12,8 @@ const cli = yargs(yargs_helpers.hideBin(process.argv))
|
|
|
12
12
|
.command("[srcDir] [options]")
|
|
13
13
|
.option("mode", {
|
|
14
14
|
type: "string",
|
|
15
|
-
description: "`run` or `build` application",
|
|
15
|
+
description: "`get`, `run` or `build` application",
|
|
16
|
+
choices: ["get", "run", "build"]
|
|
16
17
|
})
|
|
17
18
|
.option("version", {
|
|
18
19
|
type: "string",
|
|
@@ -21,22 +22,17 @@ const cli = yargs(yargs_helpers.hideBin(process.argv))
|
|
|
21
22
|
.option("flavor", {
|
|
22
23
|
type: "string",
|
|
23
24
|
description: "NW.js build flavor",
|
|
25
|
+
choices: ["normal", "sdk"]
|
|
24
26
|
})
|
|
25
27
|
.option("platform", {
|
|
26
28
|
type: "string",
|
|
27
29
|
description: "NW.js supported platform",
|
|
30
|
+
choices: ["linux", "osx", "win"]
|
|
28
31
|
})
|
|
29
32
|
.option("arch", {
|
|
30
33
|
type: "string",
|
|
31
34
|
description: "NW.js supported architecture",
|
|
32
|
-
|
|
33
|
-
.option("outDir", {
|
|
34
|
-
type: "string",
|
|
35
|
-
description: "NW.js build artifacts",
|
|
36
|
-
})
|
|
37
|
-
.option("cacheDir", {
|
|
38
|
-
type: "string",
|
|
39
|
-
description: "Cache NW.js binaries",
|
|
35
|
+
choices: ["ia32", "x64", "arm64"]
|
|
40
36
|
})
|
|
41
37
|
.option("downloadUrl", {
|
|
42
38
|
type: "string",
|
|
@@ -46,9 +42,13 @@ const cli = yargs(yargs_helpers.hideBin(process.argv))
|
|
|
46
42
|
type: "string",
|
|
47
43
|
description: "NW.js version info",
|
|
48
44
|
})
|
|
49
|
-
.option("
|
|
50
|
-
type: "
|
|
51
|
-
description: "
|
|
45
|
+
.option("cacheDir", {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "Cache NW.js binaries",
|
|
48
|
+
})
|
|
49
|
+
.option("outDir", {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "NW.js build artifacts",
|
|
52
52
|
})
|
|
53
53
|
.option("app", {
|
|
54
54
|
type: "object",
|
|
@@ -58,18 +58,34 @@ const cli = yargs(yargs_helpers.hideBin(process.argv))
|
|
|
58
58
|
type: "boolean",
|
|
59
59
|
description: "Flag to enable/disable caching",
|
|
60
60
|
})
|
|
61
|
+
.option("ffmpeg", {
|
|
62
|
+
type: "boolean",
|
|
63
|
+
description: "Flag to enable/disable downloading community ffmpeg",
|
|
64
|
+
})
|
|
65
|
+
.option("glob", {
|
|
66
|
+
type: "boolean",
|
|
67
|
+
description: "Flag to enable/disable globbing",
|
|
68
|
+
})
|
|
69
|
+
.option("logLevel", {
|
|
70
|
+
type: "string",
|
|
71
|
+
description: "Specify log level",
|
|
72
|
+
choices: ["error", "warn", "info", "debug"]
|
|
73
|
+
})
|
|
61
74
|
.option("zip", {
|
|
62
75
|
type: "string",
|
|
63
76
|
description: "Flag to enable/disable compression",
|
|
77
|
+
choices: ["zip", "tar", "tgz"]
|
|
64
78
|
})
|
|
65
|
-
.option("
|
|
79
|
+
.option("managedManifest", {
|
|
66
80
|
type: "string",
|
|
67
|
-
description: "
|
|
81
|
+
description: "Managed manifest mode",
|
|
68
82
|
})
|
|
69
|
-
.option("
|
|
83
|
+
.option("nodeAddon", {
|
|
70
84
|
type: "string",
|
|
71
|
-
description: "
|
|
85
|
+
description: "Download NW.js Node headers",
|
|
86
|
+
choices: [false, "gyp"]
|
|
72
87
|
})
|
|
88
|
+
.strictOptions()
|
|
73
89
|
.parse();
|
|
74
90
|
|
|
75
91
|
nwbuild({
|
package/src/index.js
CHANGED
|
@@ -19,14 +19,14 @@ import util from "./util.js";
|
|
|
19
19
|
* @property {"./cache" | string} [cacheDir="./cache"] Directory to cache NW binaries
|
|
20
20
|
* @property {"./" | string} [srcDir="./"] File paths to application code
|
|
21
21
|
* @property {"./out" | string} [outDir="./out"] Directory to store build artifacts
|
|
22
|
-
* @property {boolean | string | object} [managedManifest = false] Managed manifest mode
|
|
23
|
-
* @property {false | "gyp"} [nodeAddon = false] Rebuild Node native addons
|
|
24
22
|
* @property {object} app Refer to Linux/Windows Specific Options under Getting Started in the docs
|
|
25
23
|
* @property {boolean} [cache=true] If true the existing cache is used. Otherwise it removes and redownloads it.
|
|
26
24
|
* @property {boolean} [ffmpeg=false] If true the chromium ffmpeg is replaced by community version
|
|
27
25
|
* @property {boolean} [glob=true] If true file globbing is enabled when parsing srcDir.
|
|
28
|
-
* @property {"error" | "warn" | "info" | "debug"} [logLevel="info"] Specify level of logging.
|
|
26
|
+
* @property {"error" | "warn" | "info" | "debug"} [logLevel="info"] Specify level of logging.
|
|
29
27
|
* @property {boolean | "zip" | "tar" | "tgz"} [zip=false] If true, "zip", "tar" or "tgz" the outDir directory is compressed.
|
|
28
|
+
* @property {boolean | string | object} [managedManifest = false] Managed manifest mode
|
|
29
|
+
* @property {false | "gyp"} [nodeAddon = false] Rebuild Node native addons
|
|
30
30
|
* @property {boolean} [cli=false] If true the CLI is used to parse options. This option is used internally.
|
|
31
31
|
*/
|
|
32
32
|
|
|
@@ -35,7 +35,7 @@ import util from "./util.js";
|
|
|
35
35
|
*
|
|
36
36
|
* @async
|
|
37
37
|
* @function
|
|
38
|
-
*
|
|
38
|
+
*
|
|
39
39
|
* @param {Options} options Options
|
|
40
40
|
* @return {Promise<void>}
|
|
41
41
|
*/
|