nw-builder 4.1.0-beta.0 → 4.1.0-beta.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nw-builder",
3
- "version": "4.1.0-beta.0",
3
+ "version": "4.1.0-beta.2",
4
4
  "description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
5
5
  "keywords": [
6
6
  "NW.js",
@@ -31,7 +31,7 @@
31
31
  "test:unit": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
32
32
  "demo:esm": "cd e2e && node demo.js",
33
33
  "demo:cjs": "cd e2e && node demo.cjs",
34
- "demo:cli": "cd ./test && nwbuild ./nwapp/* --mode=build --version=latest --flavor=normal --platform=linux --arch=x64 --outDir=./build/cli"
34
+ "demo:cli": "cd e2e && nwbuild ./app/* --mode=build --version=0.73.0 --flavor=normal --platform=win --arch=x64 --outDir=./out --cacheDir=./tmp"
35
35
  },
36
36
  "devDependencies": {
37
37
  "eslint": "^8.34.0",
@@ -44,6 +44,7 @@ const packager = async (
44
44
  platform !== "osx"
45
45
  ? "package.nw"
46
46
  : "nwjs.app/Contents/Resources/app.nw",
47
+ file.split("/").splice(2).join("/"),
47
48
  ),
48
49
  {
49
50
  recursive: true,
@@ -26,10 +26,6 @@ export const getOptions = async (opts) => {
26
26
  files = [...patterns];
27
27
  }
28
28
 
29
- files.forEach((file, index) => {
30
- files[index] = resolve(file);
31
- });
32
-
33
29
  // Try to find the first instance of the package.json
34
30
  for (const file of files) {
35
31
  if (basename(file) === "package.json" && nwPkg === undefined) {
package/src/util/parse.js CHANGED
@@ -16,14 +16,16 @@ export const parse = async (options, pkg) => {
16
16
  options = { ...pkg.nwbuild };
17
17
  }
18
18
 
19
- options.srcDir = resolve(options.srcDir) ?? resolve("./*");
19
+ console.log(options.cacheDir)
20
+
21
+ options.srcDir = resolve(options.srcDir ?? "./*");
20
22
  options.mode = options.mode ?? "build";
21
23
  options.version = options.version ?? "latest";
22
24
  options.flavor = options.flavor || "normal";
23
25
  options.platform = options.platform ?? getPlatform(platform);
24
26
  options.arch = options.arch ?? getArch(arch);
25
- options.outDir = resolve(options.outDir) ?? resolve("./out");
26
- options.cacheDir = resolve(options.cacheDir) ?? resolve("./cache");
27
+ options.outDir = resolve(options.outDir ?? "./out");
28
+ options.cacheDir = resolve(options.cacheDir ?? "./cache");
27
29
  options.downloadUrl = options.downloadUrl ?? "https://dl.nwjs.io";
28
30
  options.manifestUrl = options.manifestUrl ?? "https://nwjs.io/versions";
29
31
  options.app = {};