node-install-release 1.9.0 → 1.9.3
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 -1
- package/dist/cjs/cli.cjs +2 -4
- package/dist/cjs/cli.cjs.map +1 -1
- package/dist/cjs/machine/execSync/polyfill.cjs +2 -2
- package/dist/cjs/machine/execSync/polyfill.cjs.map +1 -1
- package/dist/esm/cli.mjs +4 -6
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/machine/execSync/polyfill.cjs +2 -2
- package/dist/esm/machine/execSync/polyfill.cjs.map +1 -1
- package/package.json +12 -17
package/README.md
CHANGED
|
@@ -20,7 +20,6 @@ var installPath = path.join(INSTALLED_DIR, 'v12-darwin-x64');
|
|
|
20
20
|
|
|
21
21
|
// callback - choose the platform and arch
|
|
22
22
|
installRelease('v12', installPath, { platform: 'darwin', arch: 'x64' }, function (err, res) {
|
|
23
|
-
assert.ok(!err, err ? err.message : '');
|
|
24
23
|
});
|
|
25
24
|
|
|
26
25
|
// promise - use the local system for platform and arch
|
package/dist/cjs/cli.cjs
CHANGED
|
@@ -30,16 +30,14 @@ var _default = function(argv) {
|
|
|
30
30
|
'silent'
|
|
31
31
|
]
|
|
32
32
|
});
|
|
33
|
-
// define.option('-p, --platform [platform]', 'Platform like darwin');
|
|
34
|
-
// define.option('-a, --arch [arch]', 'Architecure x64, x86, arm-pi');
|
|
35
|
-
// define.option('-f, --filename [filename]', 'Distribution filename from https://nodejs.org/dist/index.json');
|
|
36
|
-
// define.option('-c, --cachePath [cachePath]', 'Cache directory');
|
|
37
33
|
var args = argv.slice(0, 1).concat(options._);
|
|
38
34
|
if (args.length < 1) {
|
|
39
35
|
console.log('Missing command. Example usage: nir version [directory]');
|
|
40
36
|
return (0, _exit.default)(-1);
|
|
41
37
|
}
|
|
38
|
+
console.log('cli', args[0], JSON.stringify(options));
|
|
42
39
|
(0, _index.default)(args[0], options, function(err, result) {
|
|
40
|
+
console.log('cli res', args[0], JSON.stringify(options), err, JSON.stringify(result));
|
|
43
41
|
if (!options.silent) {
|
|
44
42
|
console.log('\n======================');
|
|
45
43
|
if (err) console.log("".concat(args[0], " not installed. Error: ").concat(err.message));
|
package/dist/cjs/cli.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport install, { type InstallOptions } from './index';\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log('Missing command. Example usage: nir version [directory]');\n return exit(-1);\n }\n console.log('cli', args[0], JSON.stringify(options));\n install(args[0], options as InstallOptions, (err, result) => {\n console.log('cli res', args[0], JSON.stringify(options), err, JSON.stringify(result));\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? -1 : 0);\n });\n};\n"],"names":["argv","options","getopts","slice","alias","platform","arch","filename","installPath","storagePath","silent","boolean","args","concat","_","length","console","log","exit","JSON","stringify","install","err","result","message","version"],"mappings":";;;;+BAIA;;;eAAA;;;2DAJiB;oEACG;4DACyB;;;;;;IAE7C,WAAe,SAACA;IACd,IAAMC,UAAUC,IAAAA,sBAAO,EAACF,KAAKG,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,aAAa;YAAKC,aAAa;YAAKC,QAAQ;QAAI;QAClGC,SAAS;YAAC;SAAS;IACrB;IAEA,IAAMC,OAAOZ,KAAKG,KAAK,CAAC,GAAG,GAAGU,MAAM,CAACZ,QAAQa,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOC,IAAAA,aAAI,EAAC,CAAC;IACf;IACAF,QAAQC,GAAG,CAAC,OAAOL,IAAI,CAAC,EAAE,EAAEO,KAAKC,SAAS,CAACnB;IAC3CoB,IAAAA,cAAO,EAACT,IAAI,CAAC,EAAE,EAAEX,SAA2B,SAACqB,KAAKC;QAChDP,QAAQC,GAAG,CAAC,WAAWL,IAAI,CAAC,EAAE,EAAEO,KAAKC,SAAS,CAACnB,UAAUqB,KAAKH,KAAKC,SAAS,CAACG;QAC7E,IAAI,CAACtB,QAAQS,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAIK,KAAKN,QAAQC,GAAG,CAAC,AAAC,GAAmCK,OAAjCV,IAAI,CAAC,EAAE,EAAC,2BAAqC,OAAZU,IAAIE,OAAO;iBAC/DR,QAAQC,GAAG,CAAC,AAAC,GAAkCM,OAAhCA,OAAOE,OAAO,EAAC,mBAAoC,OAAnBF,OAAOf,WAAW;YACtEQ,QAAQC,GAAG,CAAC;QACd;QACAC,IAAAA,aAAI,EAACI,MAAM,CAAC,IAAI;IAClB;AACF"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
var cp = require('child_process');
|
|
3
3
|
if (!cp.execSync) {
|
|
4
4
|
var path = require('path');
|
|
5
|
-
var
|
|
5
|
+
var workerPath = path.join(__dirname, 'worker.cjs');
|
|
6
6
|
var functionExec = null; // break dependencies
|
|
7
7
|
cp.execSync = function execSyncPolyfill(cmd) {
|
|
8
8
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
9
9
|
if (!functionExec) functionExec = require('function-exec-sync');
|
|
10
10
|
return functionExec({
|
|
11
11
|
callbacks: true
|
|
12
|
-
},
|
|
12
|
+
}, workerPath, cmd, options);
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/execSync/polyfill.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/execSync/polyfill.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const workerPath = path.join(__dirname, 'worker.cjs');\n\n let functionExec = null; // break dependencies\n cp.execSync = function execSyncPolyfill(cmd, options = {}) {\n if (!functionExec) functionExec = require('function-exec-sync');\n return functionExec({ callbacks: true }, workerPath, cmd, options);\n };\n}\n"],"names":["cp","require","execSync","path","workerPath","join","__dirname","functionExec","execSyncPolyfill","cmd","options","callbacks"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AACnB,IAAI,CAACD,GAAGE,QAAQ,EAAE;IAChB,IAAMC,OAAOF,QAAQ;IACrB,IAAMG,aAAaD,KAAKE,IAAI,CAACC,WAAW;IAExC,IAAIC,eAAe,MAAM,qBAAqB;IAC9CP,GAAGE,QAAQ,GAAG,SAASM,iBAAiBC,GAAG;YAAEC,UAAAA,iEAAU,CAAC;QACtD,IAAI,CAACH,cAAcA,eAAeN,QAAQ;QAC1C,OAAOM,aAAa;YAAEI,WAAW;QAAK,GAAGP,YAAYK,KAAKC;IAC5D;AACF"}
|
package/dist/esm/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import exit from 'exit';
|
|
2
2
|
import getopts from 'getopts-compat';
|
|
3
|
-
import
|
|
3
|
+
import install from './index.mjs';
|
|
4
4
|
export default ((argv)=>{
|
|
5
5
|
const options = getopts(argv.slice(1), {
|
|
6
6
|
alias: {
|
|
@@ -15,16 +15,14 @@ export default ((argv)=>{
|
|
|
15
15
|
'silent'
|
|
16
16
|
]
|
|
17
17
|
});
|
|
18
|
-
// define.option('-p, --platform [platform]', 'Platform like darwin');
|
|
19
|
-
// define.option('-a, --arch [arch]', 'Architecure x64, x86, arm-pi');
|
|
20
|
-
// define.option('-f, --filename [filename]', 'Distribution filename from https://nodejs.org/dist/index.json');
|
|
21
|
-
// define.option('-c, --cachePath [cachePath]', 'Cache directory');
|
|
22
18
|
const args = argv.slice(0, 1).concat(options._);
|
|
23
19
|
if (args.length < 1) {
|
|
24
20
|
console.log('Missing command. Example usage: nir version [directory]');
|
|
25
21
|
return exit(-1);
|
|
26
22
|
}
|
|
27
|
-
|
|
23
|
+
console.log('cli', args[0], JSON.stringify(options));
|
|
24
|
+
install(args[0], options, (err, result)=>{
|
|
25
|
+
console.log('cli res', args[0], JSON.stringify(options), err, JSON.stringify(result));
|
|
28
26
|
if (!options.silent) {
|
|
29
27
|
console.log('\n======================');
|
|
30
28
|
if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);
|
package/dist/esm/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport install, { type InstallOptions } from './index';\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log('Missing command. Example usage: nir version [directory]');\n return exit(-1);\n }\n console.log('cli', args[0], JSON.stringify(options));\n install(args[0], options as InstallOptions, (err, result) => {\n console.log('cli res', args[0], JSON.stringify(options), err, JSON.stringify(result));\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? -1 : 0);\n });\n};\n"],"names":["exit","getopts","install","argv","options","slice","alias","platform","arch","filename","installPath","storagePath","silent","boolean","args","concat","_","length","console","log","JSON","stringify","err","result","message","version"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,aAAsC,UAAU;AAEvD,eAAe,CAAA,CAACC;IACd,MAAMC,UAAUH,QAAQE,KAAKE,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,aAAa;YAAKC,aAAa;YAAKC,QAAQ;QAAI;QAClGC,SAAS;YAAC;SAAS;IACrB;IAEA,MAAMC,OAAOX,KAAKE,KAAK,CAAC,GAAG,GAAGU,MAAM,CAACX,QAAQY,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOnB,KAAK,CAAC;IACf;IACAkB,QAAQC,GAAG,CAAC,OAAOL,IAAI,CAAC,EAAE,EAAEM,KAAKC,SAAS,CAACjB;IAC3CF,QAAQY,IAAI,CAAC,EAAE,EAAEV,SAA2B,CAACkB,KAAKC;QAChDL,QAAQC,GAAG,CAAC,WAAWL,IAAI,CAAC,EAAE,EAAEM,KAAKC,SAAS,CAACjB,UAAUkB,KAAKF,KAAKC,SAAS,CAACE;QAC7E,IAAI,CAACnB,QAAQQ,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAIG,KAAKJ,QAAQC,GAAG,CAAC,GAAGL,IAAI,CAAC,EAAE,CAAC,uBAAuB,EAAEQ,IAAIE,OAAO,EAAE;iBACjEN,QAAQC,GAAG,CAAC,GAAGI,OAAOE,OAAO,CAAC,eAAe,EAAEF,OAAOb,WAAW,EAAE;YACxEQ,QAAQC,GAAG,CAAC;QACd;QACAnB,KAAKsB,MAAM,CAAC,IAAI;IAClB;AACF,CAAA,EAAE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const cp = require('child_process');
|
|
2
2
|
if (!cp.execSync) {
|
|
3
3
|
const path = require('path');
|
|
4
|
-
const
|
|
4
|
+
const workerPath = path.join(__dirname, 'worker.cjs');
|
|
5
5
|
let functionExec = null; // break dependencies
|
|
6
6
|
cp.execSync = function execSyncPolyfill(cmd, options = {}) {
|
|
7
7
|
if (!functionExec) functionExec = require('function-exec-sync');
|
|
8
8
|
return functionExec({
|
|
9
9
|
callbacks: true
|
|
10
|
-
},
|
|
10
|
+
}, workerPath, cmd, options);
|
|
11
11
|
};
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/execSync/polyfill.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/machine/execSync/polyfill.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const workerPath = path.join(__dirname, 'worker.cjs');\n\n let functionExec = null; // break dependencies\n cp.execSync = function execSyncPolyfill(cmd, options = {}) {\n if (!functionExec) functionExec = require('function-exec-sync');\n return functionExec({ callbacks: true }, workerPath, cmd, options);\n };\n}\n"],"names":["cp","require","execSync","path","workerPath","join","__dirname","functionExec","execSyncPolyfill","cmd","options","callbacks"],"mappings":"AAAA,MAAMA,KAAKC,QAAQ;AACnB,IAAI,CAACD,GAAGE,QAAQ,EAAE;IAChB,MAAMC,OAAOF,QAAQ;IACrB,MAAMG,aAAaD,KAAKE,IAAI,CAACC,WAAW;IAExC,IAAIC,eAAe,MAAM,qBAAqB;IAC9CP,GAAGE,QAAQ,GAAG,SAASM,iBAAiBC,GAAG,EAAEC,UAAU,CAAC,CAAC;QACvD,IAAI,CAACH,cAAcA,eAAeN,QAAQ;QAC1C,OAAOM,aAAa;YAAEI,WAAW;QAAK,GAAGP,YAAYK,KAAKC;IAC5D;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-install-release",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "Cross-platform solution for installing releases of Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -18,12 +18,9 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"exports": {
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"types": "./dist/types/index.d.ts"
|
|
25
|
-
},
|
|
26
|
-
"./*": "./*"
|
|
21
|
+
"import": "./dist/esm/index.mjs",
|
|
22
|
+
"require": "./dist/cjs/index.cjs",
|
|
23
|
+
"types": "./dist/types/index.d.ts"
|
|
27
24
|
},
|
|
28
25
|
"main": "dist/cjs/index.cjs",
|
|
29
26
|
"module": "dist/dist/esm/index.mjs",
|
|
@@ -37,30 +34,28 @@
|
|
|
37
34
|
],
|
|
38
35
|
"scripts": {
|
|
39
36
|
"build": "tsds build",
|
|
40
|
-
"deploy": "tsds deploy",
|
|
41
|
-
"docs": "tsds docs",
|
|
42
37
|
"format": "biome check --write --unsafe src/ test/",
|
|
43
38
|
"test": "tsds test:node --no-timeouts",
|
|
44
39
|
"test:engines": "nvu engines npm test",
|
|
45
40
|
"version": "tsds version"
|
|
46
41
|
},
|
|
47
42
|
"dependencies": {
|
|
48
|
-
"cross-spawn-cb": "^2.
|
|
43
|
+
"cross-spawn-cb": "^2.1.2",
|
|
49
44
|
"end-of-stream": "^1.4.4",
|
|
50
45
|
"exit": "^0.1.2",
|
|
51
|
-
"fast-extract": "^1.3.
|
|
52
|
-
"fs-access-compat": "^1.1.
|
|
53
|
-
"function-exec-sync": "^1.
|
|
54
|
-
"get-remote": "^1.3.
|
|
55
|
-
"getopts-compat": "^2.2.
|
|
46
|
+
"fast-extract": "^1.3.11",
|
|
47
|
+
"fs-access-compat": "^1.1.6",
|
|
48
|
+
"function-exec-sync": "^1.2.5",
|
|
49
|
+
"get-remote": "^1.3.10",
|
|
50
|
+
"getopts-compat": "^2.2.6",
|
|
56
51
|
"homedir-polyfill": "^1.0.3",
|
|
57
|
-
"is-version": "^0.2.
|
|
52
|
+
"is-version": "^0.2.7",
|
|
58
53
|
"lodash.keys": "^4.2.0",
|
|
59
54
|
"mkdirp-classic": "^0.5.3",
|
|
60
55
|
"node-filename-to-dist-paths": "^1.1.8",
|
|
61
56
|
"node-resolve-versions": "^1.0.10",
|
|
62
57
|
"pump": "^3.0.2",
|
|
63
|
-
"queue-cb": "^1.4.
|
|
58
|
+
"queue-cb": "^1.4.11",
|
|
64
59
|
"rimraf2": "^2.8.2",
|
|
65
60
|
"single-line-log2": "^1.1.3"
|
|
66
61
|
},
|