Comparing version 0.86.0 to 0.87.0-sdk
{ | ||
"name": "nw", | ||
"version": "0.86.0", | ||
"version": "0.87.0-sdk", | ||
"description": "An installer for nw.js", | ||
@@ -17,3 +17,3 @@ "repository": { | ||
"test": "vitest run", | ||
"demo": "nw ./test/app" | ||
"demo": "nw ./test/app --log-level=verbose" | ||
}, | ||
@@ -40,4 +40,3 @@ "files": [ | ||
"semver": "^7.5.4", | ||
"tar": "^6.2.1", | ||
"yargs": "^17.7.2", | ||
"tar": "^7.0.1", | ||
"yauzl-promise": "^4.0.0" | ||
@@ -59,4 +58,4 @@ }, | ||
"selenium-webdriver": "^4.18.1", | ||
"vitest": "^1.4.0" | ||
"vitest": "^1.5.0" | ||
} | ||
} | ||
} |
@@ -20,3 +20,4 @@ #!/usr/bin/env node | ||
.option('--cacheDir <cacheDir>') | ||
.argument('<app>') | ||
.argument('[app]') | ||
.allowUnknownOption() | ||
.parse(process.argv); | ||
@@ -23,0 +24,0 @@ |
@@ -5,3 +5,3 @@ import fs from "node:fs"; | ||
import tar from "tar"; | ||
import * as tar from "tar"; | ||
import yauzl from "yauzl-promise"; | ||
@@ -8,0 +8,0 @@ |
import get from './get.js'; | ||
import run from './run'; | ||
import run from './run.js'; | ||
import util from './util.js'; | ||
@@ -4,0 +4,0 @@ |
@@ -0,1 +1,2 @@ | ||
import path from 'node:path'; | ||
import process from 'node:process'; | ||
@@ -59,3 +60,3 @@ | ||
options.downloadUrl = options.downloadUrl || process.env.npm_config_nwjs_urlbase || process.env.NWJS_URLBASE || 'https://dl.nwjs.io'; | ||
options.cacheDir = options.npm_config_nwjs_urlbase || process.env.npm_config_nwjs_cache_dir || process.env.NWJS_CACHE_DIR || '.'; | ||
options.cacheDir = options.npm_config_nwjs_urlbase || process.env.npm_config_nwjs_cache_dir || process.env.NWJS_CACHE_DIR || path.resolve('.', 'node_modules', 'nw'); | ||
options.cache = options.cache || process.env.npm_config_nwjs_cache || process.env.NWJS_CACHE || true; | ||
@@ -62,0 +63,0 @@ options.ffmpeg = options.ffmpeg || process.env.npm_config_nwjs_ffmpeg || process.env.NWJS_FFMPEG || false; |
@@ -6,2 +6,4 @@ import fs from 'node:fs'; | ||
import parse from './parse.js'; | ||
const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); | ||
@@ -47,6 +49,8 @@ | ||
* @param {'nwjs' | 'chromedriver'} executable Path to NW.js or Chromedriver executable. | ||
* @return {string} | ||
* @return {Promise<string>} | ||
*/ | ||
function findpath(executable = 'nwjs') { | ||
const nwDir = path.resolve(__dirname, '..', 'nwjs'); | ||
async function findpath(executable = 'nwjs', options = {}) { | ||
options = await parse(options); | ||
const nwDir = path.resolve(__dirname, '..', `nwjs${options.flavor === "sdk" ? "-sdk" : ""}-v${options.version}-${options.platform}-${options.arch}`); | ||
/** | ||
@@ -60,13 +64,6 @@ * File path to executable. | ||
/** | ||
* Host operating system | ||
* | ||
* @type {NodeJS.Platform} | ||
*/ | ||
let hostOs = PLATFORM_KV[process.env.npm_config_nwjs_platform || process.env.NWJS_PLATFORM || process.platform]; | ||
/** | ||
* Get the platform dependant path of the NW.js binary. | ||
*/ | ||
function findNwjs() { | ||
binPath = path.resolve(nwDir, EXE_NAME[hostOs]); | ||
binPath = path.resolve(nwDir, EXE_NAME[options.platform]); | ||
} | ||
@@ -73,0 +70,0 @@ |
33290
5
32
797
+ Added@isaacs/cliui@8.0.2(transitive)
+ Added@isaacs/fs-minipass@4.0.1(transitive)
+ Added@pkgjs/parseargs@0.11.0(transitive)
+ Addedansi-regex@6.1.0(transitive)
+ Addedansi-styles@6.2.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedchownr@3.0.0(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addedeastasianwidth@0.2.0(transitive)
+ Addedemoji-regex@9.2.2(transitive)
+ Addedforeground-child@3.3.0(transitive)
+ Addedglob@10.4.5(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjackspeak@3.4.3(transitive)
+ Addedlru-cache@10.4.3(transitive)
+ Addedminimatch@9.0.5(transitive)
+ Addedminipass@7.1.2(transitive)
+ Addedminizlib@3.0.1(transitive)
+ Addedmkdirp@3.0.1(transitive)
+ Addedpackage-json-from-dist@1.0.1(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-scurry@1.11.1(transitive)
+ Addedrimraf@5.0.10(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedstring-width@5.1.2(transitive)
+ Addedstrip-ansi@7.1.0(transitive)
+ Addedtar@7.4.3(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedwrap-ansi@8.1.0(transitive)
+ Addedyallist@5.0.0(transitive)
- Removedyargs@^17.7.2
- Removedchownr@2.0.0(transitive)
- Removedcliui@8.0.1(transitive)
- Removedescalade@3.2.0(transitive)
- Removedfs-minipass@2.1.0(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedminipass@3.3.65.0.0(transitive)
- Removedminizlib@2.1.2(transitive)
- Removedmkdirp@1.0.4(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedtar@6.2.1(transitive)
- Removedy18n@5.0.8(transitive)
- Removedyallist@4.0.0(transitive)
- Removedyargs@17.7.2(transitive)
- Removedyargs-parser@21.1.1(transitive)
Updatedtar@^7.0.1