node-install-release 1.6.2 → 1.6.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/dist/cjs/install.js +15 -17
- package/dist/cjs/install.js.map +1 -1
- package/dist/cjs/installNode/findDistPaths.js +2 -2
- package/dist/cjs/installNode/findDistPaths.js.map +1 -1
- package/dist/cjs/installNode/installSource/index.js +1 -1
- package/dist/cjs/installNode/installSource/index.js.map +1 -1
- package/dist/cjs/installNode/{filenames.js → prebuilts.js} +6 -6
- package/dist/cjs/installNode/prebuilts.js.map +1 -0
- package/dist/cjs/polyfills.js +4 -3
- package/dist/cjs/polyfills.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/installNode/filenames.js.map +0 -1
- /package/dist/types/installNode/{filenames.d.ts → prebuilts.d.ts} +0 -0
package/dist/cjs/install.js
CHANGED
|
@@ -56,10 +56,10 @@ var Queue = require('queue-cb');
|
|
|
56
56
|
var mkdirp = require('mkdirp-classic');
|
|
57
57
|
var resolveVersions = require('node-resolve-versions');
|
|
58
58
|
var installVersion = require('./installVersion');
|
|
59
|
-
var
|
|
59
|
+
var DEFAULT_INSTALL_PATH = path.join(require('homedir-polyfill')(), '.nir');
|
|
60
60
|
var DEFAULT_OPTIONS = {
|
|
61
|
-
cachePath: path.join(
|
|
62
|
-
|
|
61
|
+
cachePath: path.join(DEFAULT_INSTALL_PATH, 'cache'),
|
|
62
|
+
buildPath: path.join(DEFAULT_INSTALL_PATH, 'build'),
|
|
63
63
|
downloadURL: function downloadURL(relativePath) {
|
|
64
64
|
return "https://nodejs.org/dist/".concat(relativePath);
|
|
65
65
|
}
|
|
@@ -76,22 +76,20 @@ module.exports = function install(versionDetails, dest, options, callback) {
|
|
|
76
76
|
queue.defer(function(callback) {
|
|
77
77
|
mkdirp(options.cachePath, callback.bind(null, null));
|
|
78
78
|
});
|
|
79
|
-
|
|
80
|
-
(function(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
installPath: installPath
|
|
89
|
-
});
|
|
90
|
-
callback();
|
|
79
|
+
versions.forEach(function(version) {
|
|
80
|
+
queue.defer(function(cb) {
|
|
81
|
+
var installPath = dest && versions.length > 1 ? path.join(dest, version.version) : dest;
|
|
82
|
+
installVersion(version, installPath, options, function(error) {
|
|
83
|
+
if (err) return cb(err);
|
|
84
|
+
results.push({
|
|
85
|
+
version: version.version,
|
|
86
|
+
error: error,
|
|
87
|
+
installPath: installPath
|
|
91
88
|
});
|
|
89
|
+
cb();
|
|
92
90
|
});
|
|
93
|
-
})
|
|
94
|
-
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
95
93
|
queue.await(function(err) {
|
|
96
94
|
err ? callback(err) : callback(null, results);
|
|
97
95
|
});
|
package/dist/cjs/install.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/install.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\nconst mkdirp = require('mkdirp-classic');\n\nconst resolveVersions = require('node-resolve-versions');\n\nconst installVersion = require('./installVersion');\n\nconst
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/install.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\nconst mkdirp = require('mkdirp-classic');\n\nconst resolveVersions = require('node-resolve-versions');\n\nconst installVersion = require('./installVersion');\n\nconst DEFAULT_INSTALL_PATH = path.join(require('homedir-polyfill')(), '.nir');\nconst DEFAULT_OPTIONS = {\n cachePath: path.join(DEFAULT_INSTALL_PATH, 'cache'),\n buildPath: path.join(DEFAULT_INSTALL_PATH, 'build'),\n downloadURL: function downloadURL(relativePath) {\n return `https://nodejs.org/dist/${relativePath}`;\n },\n};\n\nmodule.exports = function install(versionDetails, dest, options, callback) {\n options = { ...DEFAULT_OPTIONS, ...options, path: 'raw' };\n resolveVersions(versionDetails, options, (err, versions) => {\n if (err) return callback(err);\n if (!versions.length) return callback(new Error(`Could not resolve versions for: ${JSON.stringify(versionDetails)}`));\n\n const results = [];\n const queue = new Queue(1);\n queue.defer((callback) => {\n mkdirp(options.cachePath, callback.bind(null, null));\n });\n versions.forEach((version) => {\n queue.defer((cb) => {\n const installPath = dest && versions.length > 1 ? path.join(dest, version.version) : dest;\n installVersion(version, installPath, options, (error) => {\n if (err) return cb(err);\n results.push({ version: version.version, error, installPath });\n cb();\n });\n });\n });\n queue.await((err) => {\n err ? callback(err) : callback(null, results);\n });\n });\n};\n"],"names":["path","require","Queue","mkdirp","resolveVersions","installVersion","DEFAULT_INSTALL_PATH","join","DEFAULT_OPTIONS","cachePath","buildPath","downloadURL","relativePath","module","exports","install","versionDetails","dest","options","callback","err","versions","length","Error","JSON","stringify","results","queue","defer","bind","forEach","version","cb","installPath","error","push","await"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AACtB,IAAME,SAASF,QAAQ;AAEvB,IAAMG,kBAAkBH,QAAQ;AAEhC,IAAMI,iBAAiBJ,QAAQ;AAE/B,IAAMK,uBAAuBN,KAAKO,IAAI,CAACN,QAAQ,uBAAuB;AACtE,IAAMO,kBAAkB;IACtBC,WAAWT,KAAKO,IAAI,CAACD,sBAAsB;IAC3CI,WAAWV,KAAKO,IAAI,CAACD,sBAAsB;IAC3CK,aAAa,SAASA,YAAYC,YAAY;QAC5C,OAAO,AAAC,2BAAuC,OAAbA;IACpC;AACF;AAEAC,OAAOC,OAAO,GAAG,SAASC,QAAQC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvED,UAAU,wCAAKV,iBAAoBU;QAASlB,MAAM;;IAClDI,gBAAgBY,gBAAgBE,SAAS,SAACE,KAAKC;QAC7C,IAAID,KAAK,OAAOD,SAASC;QACzB,IAAI,CAACC,SAASC,MAAM,EAAE,OAAOH,SAAS,IAAII,MAAM,AAAC,mCAAiE,OAA/BC,KAAKC,SAAS,CAACT;QAElG,IAAMU,UAAU,EAAE;QAClB,IAAMC,QAAQ,IAAIzB,MAAM;QACxByB,MAAMC,KAAK,CAAC,SAACT;YACXhB,OAAOe,QAAQT,SAAS,EAAEU,SAASU,IAAI,CAAC,MAAM;QAChD;QACAR,SAASS,OAAO,CAAC,SAACC;YAChBJ,MAAMC,KAAK,CAAC,SAACI;gBACX,IAAMC,cAAchB,QAAQI,SAASC,MAAM,GAAG,IAAItB,KAAKO,IAAI,CAACU,MAAMc,QAAQA,OAAO,IAAId;gBACrFZ,eAAe0B,SAASE,aAAaf,SAAS,SAACgB;oBAC7C,IAAId,KAAK,OAAOY,GAAGZ;oBACnBM,QAAQS,IAAI,CAAC;wBAAEJ,SAASA,QAAQA,OAAO;wBAAEG,OAAAA;wBAAOD,aAAAA;oBAAY;oBAC5DD;gBACF;YACF;QACF;QACAL,MAAMS,KAAK,CAAC,SAAChB;YACXA,MAAMD,SAASC,OAAOD,SAAS,MAAMO;QACvC;IACF;AACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var distPaths = require('node-filename-to-dist-paths');
|
|
3
|
-
var
|
|
3
|
+
var prebuilts = require('./prebuilts');
|
|
4
4
|
module.exports = function findDistPaths(version, options) {
|
|
5
5
|
var filenames = options.filename ? [
|
|
6
6
|
options.filename
|
|
7
|
-
] :
|
|
7
|
+
] : prebuilts(options);
|
|
8
8
|
for(var index = 0; index < filenames.length; index++){
|
|
9
9
|
var filename = filenames[index];
|
|
10
10
|
if (!~version.files.indexOf(filename)) continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/findDistPaths.js"],"sourcesContent":["const distPaths = require('node-filename-to-dist-paths');\nconst
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/findDistPaths.js"],"sourcesContent":["const distPaths = require('node-filename-to-dist-paths');\nconst prebuilts = require('./prebuilts');\n\nmodule.exports = function findDistPaths(version, options) {\n const filenames = options.filename ? [options.filename] : prebuilts(options);\n for (let index = 0; index < filenames.length; index++) {\n const filename = filenames[index];\n if (!~version.files.indexOf(filename)) continue;\n const relativePaths = distPaths(filename, version.version);\n if (relativePaths && relativePaths.length) return { version: version.version, filename: filename, relativePaths: relativePaths };\n }\n return null;\n};\n"],"names":["distPaths","require","prebuilts","module","exports","findDistPaths","version","options","filenames","filename","index","length","files","indexOf","relativePaths"],"mappings":";AAAA,IAAMA,YAAYC,QAAQ;AAC1B,IAAMC,YAAYD,QAAQ;AAE1BE,OAAOC,OAAO,GAAG,SAASC,cAAcC,OAAO,EAAEC,OAAO;IACtD,IAAMC,YAAYD,QAAQE,QAAQ,GAAG;QAACF,QAAQE,QAAQ;KAAC,GAAGP,UAAUK;IACpE,IAAK,IAAIG,QAAQ,GAAGA,QAAQF,UAAUG,MAAM,EAAED,QAAS;QACrD,IAAMD,WAAWD,SAAS,CAACE,MAAM;QACjC,IAAI,CAAC,CAACJ,QAAQM,KAAK,CAACC,OAAO,CAACJ,WAAW;QACvC,IAAMK,gBAAgBd,UAAUS,UAAUH,QAAQA,OAAO;QACzD,IAAIQ,iBAAiBA,cAAcH,MAAM,EAAE,OAAO;YAAEL,SAASA,QAAQA,OAAO;YAAEG,UAAUA;YAAUK,eAAeA;QAAc;IACjI;IACA,OAAO;AACT"}
|
|
@@ -9,7 +9,7 @@ module.exports = function InstallSource(relativePath, dest, _record, options, ca
|
|
|
9
9
|
var platform = options.platform || process.platform;
|
|
10
10
|
var build = platform === 'win32' ? buildWin32 : buildPosix;
|
|
11
11
|
var downloadPath = options.downloadURL(relativePath);
|
|
12
|
-
var buildPath = path.join(options.
|
|
12
|
+
var buildPath = path.join(options.buildPath, path.basename(relativePath));
|
|
13
13
|
var cachePath = path.join(options.cachePath, path.basename(downloadPath));
|
|
14
14
|
var queue = new Queue(1);
|
|
15
15
|
queue.defer(conditionalCache.bind(null, downloadPath, cachePath));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installSource/index.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\n\nconst conditionalCache = require('../../conditionalCache');\nconst conditionalExtract = require('../../conditionalExtract');\nconst buildPosix = require('./buildPosix');\nconst buildWin32 = require('./buildWin32');\n\nmodule.exports = function InstallSource(relativePath, dest, _record, options, callback) {\n const platform = options.platform || process.platform;\n const build = platform === 'win32' ? buildWin32 : buildPosix;\n const downloadPath = options.downloadURL(relativePath);\n const buildPath = path.join(options.
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installSource/index.js"],"sourcesContent":["const path = require('path');\nconst Queue = require('queue-cb');\n\nconst conditionalCache = require('../../conditionalCache');\nconst conditionalExtract = require('../../conditionalExtract');\nconst buildPosix = require('./buildPosix');\nconst buildWin32 = require('./buildWin32');\n\nmodule.exports = function InstallSource(relativePath, dest, _record, options, callback) {\n const platform = options.platform || process.platform;\n const build = platform === 'win32' ? buildWin32 : buildPosix;\n const downloadPath = options.downloadURL(relativePath);\n const buildPath = path.join(options.buildPath, path.basename(relativePath));\n const cachePath = path.join(options.cachePath, path.basename(downloadPath));\n\n const queue = new Queue(1);\n queue.defer(conditionalCache.bind(null, downloadPath, cachePath));\n queue.defer(conditionalExtract.bind(null, cachePath, buildPath, { strip: 1 }));\n queue.defer(build.bind(null, buildPath, dest, options));\n queue.await(callback);\n};\n"],"names":["path","require","Queue","conditionalCache","conditionalExtract","buildPosix","buildWin32","module","exports","InstallSource","relativePath","dest","_record","options","callback","platform","process","build","downloadPath","downloadURL","buildPath","join","basename","cachePath","queue","defer","bind","strip","await"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,QAAQD,QAAQ;AAEtB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,qBAAqBH,QAAQ;AACnC,IAAMI,aAAaJ,QAAQ;AAC3B,IAAMK,aAAaL,QAAQ;AAE3BM,OAAOC,OAAO,GAAG,SAASC,cAAcC,YAAY,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ;IACpF,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,QAAQF,aAAa,UAAUT,aAAaD;IAClD,IAAMa,eAAeL,QAAQM,WAAW,CAACT;IACzC,IAAMU,YAAYpB,KAAKqB,IAAI,CAACR,QAAQO,SAAS,EAAEpB,KAAKsB,QAAQ,CAACZ;IAC7D,IAAMa,YAAYvB,KAAKqB,IAAI,CAACR,QAAQU,SAAS,EAAEvB,KAAKsB,QAAQ,CAACJ;IAE7D,IAAMM,QAAQ,IAAItB,MAAM;IACxBsB,MAAMC,KAAK,CAACtB,iBAAiBuB,IAAI,CAAC,MAAMR,cAAcK;IACtDC,MAAMC,KAAK,CAACrB,mBAAmBsB,IAAI,CAAC,MAAMH,WAAWH,WAAW;QAAEO,OAAO;IAAE;IAC3EH,MAAMC,KAAK,CAACR,MAAMS,IAAI,CAAC,MAAMN,WAAWT,MAAME;IAC9CW,MAAMI,KAAK,CAACd;AACd"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var arch = require('../arch');
|
|
3
3
|
var archOS = require('os').arch;
|
|
4
4
|
var PLATFORM_OS = {
|
|
5
5
|
win32: 'win',
|
|
@@ -14,16 +14,16 @@ var PLATFORM_FILES = {
|
|
|
14
14
|
'tar'
|
|
15
15
|
]
|
|
16
16
|
};
|
|
17
|
-
var
|
|
18
|
-
module.exports = function
|
|
19
|
-
if (!
|
|
17
|
+
var machineArch = null;
|
|
18
|
+
module.exports = function prebuilts(options) {
|
|
19
|
+
if (!machineArch) machineArch = arch();
|
|
20
20
|
var platform = options.platform || process.platform;
|
|
21
21
|
var os = PLATFORM_OS[platform] || platform;
|
|
22
22
|
var archs = [];
|
|
23
23
|
if (options.arch) archs.push(options.arch);
|
|
24
|
-
archs.push(
|
|
24
|
+
archs.push(machineArch);
|
|
25
25
|
if (archOS) archs.push(archOS());
|
|
26
|
-
if (platform === 'darwin' &&
|
|
26
|
+
if (platform === 'darwin' && machineArch === 'arm64') archs.push('x64'); // fallback
|
|
27
27
|
var files = PLATFORM_FILES[platform];
|
|
28
28
|
var results = [];
|
|
29
29
|
for(var i = 0; i < archs.length; i++){
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/prebuilts.js"],"sourcesContent":["const arch = require('../arch');\nconst archOS = require('os').arch;\n\nconst PLATFORM_OS = {\n win32: 'win',\n darwin: 'osx',\n};\n\nconst PLATFORM_FILES = {\n win32: ['zip', 'exe'],\n darwin: ['tar'],\n};\nlet machineArch = null;\n\nmodule.exports = function prebuilts(options) {\n if (!machineArch) machineArch = arch();\n const platform = options.platform || process.platform;\n const os = PLATFORM_OS[platform] || platform;\n const archs = [];\n if (options.arch) archs.push(options.arch);\n archs.push(machineArch);\n if (archOS) archs.push(archOS());\n if (platform === 'darwin' && machineArch === 'arm64') archs.push('x64'); // fallback\n\n const files = PLATFORM_FILES[platform];\n const results = [];\n for (let i = 0; i < archs.length; i++) {\n if (typeof files === 'undefined') {\n results.push(`${os}-${archs[i]}`);\n } else {\n for (let j = 0; j < files.length; j++) {\n results.push(`${os}-${archs[i]}-${files[j]}`);\n }\n }\n }\n return results;\n};\n"],"names":["arch","require","archOS","PLATFORM_OS","win32","darwin","PLATFORM_FILES","machineArch","module","exports","prebuilts","options","platform","process","os","archs","push","files","results","i","length","j"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ,MAAMD,IAAI;AAEjC,IAAMG,cAAc;IAClBC,OAAO;IACPC,QAAQ;AACV;AAEA,IAAMC,iBAAiB;IACrBF,OAAO;QAAC;QAAO;KAAM;IACrBC,QAAQ;QAAC;KAAM;AACjB;AACA,IAAIE,cAAc;AAElBC,OAAOC,OAAO,GAAG,SAASC,UAAUC,OAAO;IACzC,IAAI,CAACJ,aAAaA,cAAcP;IAChC,IAAMY,WAAWD,QAAQC,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,KAAKX,WAAW,CAACS,SAAS,IAAIA;IACpC,IAAMG,QAAQ,EAAE;IAChB,IAAIJ,QAAQX,IAAI,EAAEe,MAAMC,IAAI,CAACL,QAAQX,IAAI;IACzCe,MAAMC,IAAI,CAACT;IACX,IAAIL,QAAQa,MAAMC,IAAI,CAACd;IACvB,IAAIU,aAAa,YAAYL,gBAAgB,SAASQ,MAAMC,IAAI,CAAC,QAAQ,WAAW;IAEpF,IAAMC,QAAQX,cAAc,CAACM,SAAS;IACtC,IAAMM,UAAU,EAAE;IAClB,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,MAAMK,MAAM,EAAED,IAAK;QACrC,IAAI,OAAOF,UAAU,aAAa;YAChCC,QAAQF,IAAI,CAAC,AAAC,GAAQD,OAAND,IAAG,KAAY,OAATC,KAAK,CAACI,EAAE;QAChC,OAAO;YACL,IAAK,IAAIE,IAAI,GAAGA,IAAIJ,MAAMG,MAAM,EAAEC,IAAK;gBACrCH,QAAQF,IAAI,CAAC,AAAC,GAAQD,OAAND,IAAG,KAAeG,OAAZF,KAAK,CAACI,EAAE,EAAC,KAAY,OAATF,KAAK,CAACI,EAAE;YAC5C;QACF;IACF;IACA,OAAOH;AACT"}
|
package/dist/cjs/polyfills.js
CHANGED
|
@@ -4,11 +4,12 @@ if (!cp.execSync) {
|
|
|
4
4
|
var path = require('path');
|
|
5
5
|
var execCallback = path.join(__dirname, 'workers', 'execCallback.js');
|
|
6
6
|
var functionExec = null; // break dependencies
|
|
7
|
-
cp.execSync = function execSyncPolyfill(cmd
|
|
7
|
+
cp.execSync = function execSyncPolyfill(cmd) {
|
|
8
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
8
9
|
if (!functionExec) functionExec = require('function-exec-sync');
|
|
9
|
-
return functionExec(
|
|
10
|
+
return functionExec({
|
|
10
11
|
callbacks: true
|
|
11
|
-
}, execCallback, cmd, options
|
|
12
|
+
}, execCallback, cmd, options);
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
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/polyfills.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const execCallback = path.join(__dirname, 'workers', 'execCallback.js');\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(
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/polyfills.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const execCallback = path.join(__dirname, 'workers', 'execCallback.js');\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 }, execCallback, cmd, options);\n };\n}\n"],"names":["cp","require","execSync","path","execCallback","join","__dirname","functionExec","execSyncPolyfill","cmd","options","callbacks"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AACnB,IAAI,CAACD,GAAGE,QAAQ,EAAE;IAChB,IAAMC,OAAOF,QAAQ;IACrB,IAAMG,eAAeD,KAAKE,IAAI,CAACC,WAAW,WAAW;IAErD,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,cAAcK,KAAKC;IAC9D;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-install-release",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Cross-platform solution for installing releases of Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"exit": "^0.1.2",
|
|
39
39
|
"fast-extract": "^1.3.1",
|
|
40
40
|
"fs-access-compat": "^1.0.3",
|
|
41
|
-
"function-exec-sync": "^1.1.
|
|
41
|
+
"function-exec-sync": "^1.1.5",
|
|
42
42
|
"get-remote": "^1.3.2",
|
|
43
43
|
"getopts-compat": "^2.2.5",
|
|
44
44
|
"homedir-polyfill": "^1.0.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/filenames.js"],"sourcesContent":["const archMachine = require('../arch');\nconst archOS = require('os').arch;\n\nconst PLATFORM_OS = {\n win32: 'win',\n darwin: 'osx',\n};\n\nconst PLATFORM_FILES = {\n win32: ['zip', 'exe'],\n darwin: ['tar'],\n};\nlet machine = null;\n\nmodule.exports = function prebuiltFilenames(options) {\n if (!machine) machine = archMachine();\n const platform = options.platform || process.platform;\n const os = PLATFORM_OS[platform] || platform;\n const archs = [];\n if (options.arch) archs.push(options.arch);\n archs.push(machine);\n if (archOS) archs.push(archOS());\n if (platform === 'darwin' && machine === 'arm64') archs.push('x64'); // fallback\n\n const files = PLATFORM_FILES[platform];\n const results = [];\n for (let i = 0; i < archs.length; i++) {\n if (typeof files === 'undefined') {\n results.push(`${os}-${archs[i]}`);\n } else {\n for (let j = 0; j < files.length; j++) {\n results.push(`${os}-${archs[i]}-${files[j]}`);\n }\n }\n }\n return results;\n};\n"],"names":["archMachine","require","archOS","arch","PLATFORM_OS","win32","darwin","PLATFORM_FILES","machine","module","exports","prebuiltFilenames","options","platform","process","os","archs","push","files","results","i","length","j"],"mappings":";AAAA,IAAMA,cAAcC,QAAQ;AAC5B,IAAMC,SAASD,QAAQ,MAAME,IAAI;AAEjC,IAAMC,cAAc;IAClBC,OAAO;IACPC,QAAQ;AACV;AAEA,IAAMC,iBAAiB;IACrBF,OAAO;QAAC;QAAO;KAAM;IACrBC,QAAQ;QAAC;KAAM;AACjB;AACA,IAAIE,UAAU;AAEdC,OAAOC,OAAO,GAAG,SAASC,kBAAkBC,OAAO;IACjD,IAAI,CAACJ,SAASA,UAAUR;IACxB,IAAMa,WAAWD,QAAQC,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,KAAKX,WAAW,CAACS,SAAS,IAAIA;IACpC,IAAMG,QAAQ,EAAE;IAChB,IAAIJ,QAAQT,IAAI,EAAEa,MAAMC,IAAI,CAACL,QAAQT,IAAI;IACzCa,MAAMC,IAAI,CAACT;IACX,IAAIN,QAAQc,MAAMC,IAAI,CAACf;IACvB,IAAIW,aAAa,YAAYL,YAAY,SAASQ,MAAMC,IAAI,CAAC,QAAQ,WAAW;IAEhF,IAAMC,QAAQX,cAAc,CAACM,SAAS;IACtC,IAAMM,UAAU,EAAE;IAClB,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,MAAMK,MAAM,EAAED,IAAK;QACrC,IAAI,OAAOF,UAAU,aAAa;YAChCC,QAAQF,IAAI,CAAC,AAAC,GAAQD,OAAND,IAAG,KAAY,OAATC,KAAK,CAACI,EAAE;QAChC,OAAO;YACL,IAAK,IAAIE,IAAI,GAAGA,IAAIJ,MAAMG,MAAM,EAAEC,IAAK;gBACrCH,QAAQF,IAAI,CAAC,AAAC,GAAQD,OAAND,IAAG,KAAeG,OAAZF,KAAK,CAACI,EAAE,EAAC,KAAY,OAATF,KAAK,CAACI,EAAE;YAC5C;QACF;IACF;IACA,OAAOH;AACT"}
|
|
File without changes
|