Comparing version
{ | ||
"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 @@ |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
33290
0.31%5
-16.67%33
-5.71%797
-0.25%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated