node-install-release 1.6.0 → 1.6.1

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.
Files changed (41) hide show
  1. package/dist/cjs/{archPatched.js → arch.js} +17 -10
  2. package/dist/cjs/arch.js.map +1 -0
  3. package/dist/cjs/cli.js +2 -2
  4. package/dist/cjs/cli.js.map +1 -1
  5. package/dist/cjs/index.js +6 -6
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/{worker.js → install.js} +20 -18
  8. package/dist/cjs/install.js.map +1 -0
  9. package/dist/cjs/installNPM/installLib.js +1 -1
  10. package/dist/cjs/installNPM/installLib.js.map +1 -1
  11. package/dist/cjs/installNode/{prebuilds.js → filenames.js} +10 -8
  12. package/dist/cjs/installNode/filenames.js.map +1 -0
  13. package/dist/cjs/installNode/findDistPaths.js +3 -3
  14. package/dist/cjs/installNode/findDistPaths.js.map +1 -1
  15. package/dist/cjs/installNode/installCompressed.js +1 -1
  16. package/dist/cjs/installNode/installCompressed.js.map +1 -1
  17. package/dist/cjs/installNode/installExe.js +1 -1
  18. package/dist/cjs/installNode/installExe.js.map +1 -1
  19. package/dist/cjs/installNode/installSource/index.js +2 -2
  20. package/dist/cjs/installNode/installSource/index.js.map +1 -1
  21. package/dist/cjs/polyfills.js +14 -0
  22. package/dist/cjs/polyfills.js.map +1 -0
  23. package/dist/cjs/workers/execCallback.js +6 -0
  24. package/dist/cjs/workers/execCallback.js.map +1 -0
  25. package/dist/types/arch.d.ts +2 -0
  26. package/dist/types/index.d.mts +1 -1
  27. package/dist/types/polyfills.d.cts +1 -0
  28. package/dist/types/workers/execCallback.d.ts +3 -0
  29. package/package.json +2 -4
  30. package/dist/cjs/archPatched.js.map +0 -1
  31. package/dist/cjs/execSyncPolyfill/index.js +0 -31
  32. package/dist/cjs/execSyncPolyfill/index.js.map +0 -1
  33. package/dist/cjs/execSyncPolyfill/worker.js +0 -15
  34. package/dist/cjs/execSyncPolyfill/worker.js.map +0 -1
  35. package/dist/cjs/installNode/prebuilds.js.map +0 -1
  36. package/dist/cjs/worker.js.map +0 -1
  37. package/dist/types/archPatched.d.ts +0 -2
  38. package/dist/types/execSyncPolyfill/index.d.mts +0 -2
  39. package/dist/types/execSyncPolyfill/worker.d.mts +0 -1
  40. /package/dist/types/{worker.d.ts → install.d.ts} +0 -0
  41. /package/dist/types/installNode/{prebuilds.d.ts → filenames.d.ts} +0 -0
@@ -1,10 +1,13 @@
1
- // ****************************
2
- // KM: patched to detect without making assumptions
3
- // ****************************
1
+ // <<<<****************************>>>>
2
+ // Inline until merged: https://github.com/jakejarvis/arch/blob/detect-arm/index.js
3
+ // <<<<****************************>>>>
4
4
  /*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ "use strict";
5
5
  var cp = require('child_process');
6
6
  var fs = require('fs');
7
7
  var path = require('path');
8
+ // <<<<****************************>>>>
9
+ var isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);
10
+ // <<<<****************************>>>>
8
11
  /**
9
12
  * Returns the operating system's CPU architecture. This is different than
10
13
  * `process.arch` or `os.arch()` which returns the architecture the Node.js (or
@@ -25,7 +28,9 @@ var path = require('path');
25
28
  * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit
26
29
  * app is based on the presence of a WOW64 file: %SystemRoot%\SysNative.
27
30
  * See: https://twitter.com/feross/status/776949077208510464
28
- */ if (process.platform === 'win32') {
31
+ */ // <<<<****************************>>>>
32
+ if (isWindows) {
33
+ // <<<<****************************>>>>
29
34
  var useEnv = false;
30
35
  try {
31
36
  useEnv = !!(process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT));
@@ -41,22 +46,24 @@ var path = require('path');
41
46
  /**
42
47
  * On Linux, use the `getconf` command to get the architecture.
43
48
  */ if (process.platform === 'linux') {
49
+ try {
50
+ var output1 = cp.execSync('uname -a', {
51
+ encoding: 'utf8'
52
+ });
53
+ if (~output1.indexOf('raspberrypi')) return 'arm-pi';
54
+ } catch (_err) {}
44
55
  var output = cp.execSync('getconf LONG_BIT', {
45
56
  encoding: 'utf8'
46
57
  });
47
58
  return output === '64\n' ? 'x64' : 'x86';
48
59
  }
49
- // ****************************
50
- // KM: patched to detect without making assumptions
51
- // ****************************
60
+ // <<<<****************************>>>>
52
61
  /**
53
62
  * The running binary is 64-bit, so the OS is clearly 64-bit.
54
63
  */ if (process.arch === 'x64') {
55
64
  return 'x64';
56
65
  }
57
- // ****************************
58
- // KM: patched to detect without making assumptions
59
- // ****************************
66
+ // <<<<****************************>>>>
60
67
  /**
61
68
  * If none of the above, assume the architecture is 32-bit.
62
69
  */ return 'x86';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/arch.js"],"sourcesContent":["// <<<<****************************>>>>\n// Inline until merged: https://github.com/jakejarvis/arch/blob/detect-arm/index.js\n// <<<<****************************>>>>\n\n/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nconst cp = require('child_process');\nconst fs = require('fs');\nconst path = require('path');\n\n// <<<<****************************>>>>\nconst isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);\n// <<<<****************************>>>>\n\n/**\n * Returns the operating system's CPU architecture. This is different than\n * `process.arch` or `os.arch()` which returns the architecture the Node.js (or\n * Electron) binary was compiled for.\n */\nmodule.exports = function arch() {\n /**\n * On macOS, we need to detect if x64 Node is running because the CPU is truly\n * an Intel chip, or if it's running on Apple Silicon via Rosetta 2:\n * https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment\n */\n if (process.platform === 'darwin') {\n const nativeArm = process.arch === 'arm64';\n const rosettaArm = cp.execSync('sysctl -in sysctl.proc_translated', { encoding: 'utf8' }) === '1\\n';\n\n return nativeArm || rosettaArm ? 'arm64' : 'x64';\n }\n\n /**\n * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit\n * app is based on the presence of a WOW64 file: %SystemRoot%\\SysNative.\n * See: https://twitter.com/feross/status/776949077208510464\n */\n // <<<<****************************>>>>\n if (isWindows) {\n // <<<<****************************>>>>\n let useEnv = false;\n try {\n useEnv = !!(process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT));\n } catch (_err) {}\n\n const sysRoot = useEnv ? process.env.SYSTEMROOT : 'C:\\\\Windows';\n\n // If %SystemRoot%\\SysNative exists, we are in a WOW64 FS Redirected application.\n let isWOW64 = false;\n try {\n isWOW64 = !!fs.statSync(path.join(sysRoot, 'sysnative'));\n } catch (_err) {}\n\n return isWOW64 ? 'x64' : 'x86';\n }\n\n /**\n * On Linux, use the `getconf` command to get the architecture.\n */\n if (process.platform === 'linux') {\n try {\n const output1 = cp.execSync('uname -a', { encoding: 'utf8' });\n if (~output1.indexOf('raspberrypi')) return 'arm-pi';\n } catch (_err) {}\n\n const output = cp.execSync('getconf LONG_BIT', { encoding: 'utf8' });\n return output === '64\\n' ? 'x64' : 'x86';\n }\n\n // <<<<****************************>>>>\n /**\n * The running binary is 64-bit, so the OS is clearly 64-bit.\n */\n if (process.arch === 'x64') {\n return 'x64';\n }\n // <<<<****************************>>>>\n\n /**\n * If none of the above, assume the architecture is 32-bit.\n */\n return 'x86';\n};\n"],"names":["cp","require","fs","path","isWindows","process","platform","test","env","OSTYPE","module","exports","arch","nativeArm","rosettaArm","execSync","encoding","useEnv","SYSTEMROOT","statSync","_err","sysRoot","isWOW64","join","output1","indexOf","output"],"mappings":"AAAA,uCAAuC;AACvC,mFAAmF;AACnF,uCAAuC;AAEvC,2EAA2E;AAC3E,IAAMA,KAAKC,QAAQ;AACnB,IAAMC,KAAKD,QAAQ;AACnB,IAAME,OAAOF,QAAQ;AAErB,uCAAuC;AACvC,IAAMG,YAAYC,QAAQC,QAAQ,KAAK,WAAW,kBAAkBC,IAAI,CAACF,QAAQG,GAAG,CAACC,MAAM;AAC3F,uCAAuC;AAEvC;;;;CAIC,GACDC,OAAOC,OAAO,GAAG,SAASC;IACxB;;;;GAIC,GACD,IAAIP,QAAQC,QAAQ,KAAK,UAAU;QACjC,IAAMO,YAAYR,QAAQO,IAAI,KAAK;QACnC,IAAME,aAAad,GAAGe,QAAQ,CAAC,qCAAqC;YAAEC,UAAU;QAAO,OAAO;QAE9F,OAAOH,aAAaC,aAAa,UAAU;IAC7C;IAEA;;;;GAIC,GACD,uCAAuC;IACvC,IAAIV,WAAW;QACb,uCAAuC;QACvC,IAAIa,SAAS;QACb,IAAI;YACFA,SAAS,CAAC,CAAEZ,CAAAA,QAAQG,GAAG,CAACU,UAAU,IAAIhB,GAAGiB,QAAQ,CAACd,QAAQG,GAAG,CAACU,UAAU,CAAA;QAC1E,EAAE,OAAOE,MAAM,CAAC;QAEhB,IAAMC,UAAUJ,SAASZ,QAAQG,GAAG,CAACU,UAAU,GAAG;QAElD,iFAAiF;QACjF,IAAII,UAAU;QACd,IAAI;YACFA,UAAU,CAAC,CAACpB,GAAGiB,QAAQ,CAAChB,KAAKoB,IAAI,CAACF,SAAS;QAC7C,EAAE,OAAOD,MAAM,CAAC;QAEhB,OAAOE,UAAU,QAAQ;IAC3B;IAEA;;GAEC,GACD,IAAIjB,QAAQC,QAAQ,KAAK,SAAS;QAChC,IAAI;YACF,IAAMkB,UAAUxB,GAAGe,QAAQ,CAAC,YAAY;gBAAEC,UAAU;YAAO;YAC3D,IAAI,CAACQ,QAAQC,OAAO,CAAC,gBAAgB,OAAO;QAC9C,EAAE,OAAOL,MAAM,CAAC;QAEhB,IAAMM,SAAS1B,GAAGe,QAAQ,CAAC,oBAAoB;YAAEC,UAAU;QAAO;QAClE,OAAOU,WAAW,SAAS,QAAQ;IACrC;IAEA,uCAAuC;IACvC;;GAEC,GACD,IAAIrB,QAAQO,IAAI,KAAK,OAAO;QAC1B,OAAO;IACT;IACA,uCAAuC;IAEvC;;GAEC,GACD,OAAO;AACT"}
package/dist/cjs/cli.js CHANGED
@@ -50,7 +50,7 @@ var _default = function(argv) {
50
50
  platform: 'p',
51
51
  arch: 'a',
52
52
  filename: 'f',
53
- cachePath: 'c',
53
+ cacheDirectory: 'c',
54
54
  silent: 's'
55
55
  },
56
56
  boolean: [
@@ -60,7 +60,7 @@ var _default = function(argv) {
60
60
  // define.option('-p, --platform [platform]', 'Platform like darwin');
61
61
  // define.option('-a, --arch [arch]', 'Architecure x64, x86, arm-pi');
62
62
  // define.option('-f, --filename [filename]', 'Distribution filename from https://nodejs.org/dist/index.json');
63
- // define.option('-c, --cachePath [cachePath]', 'Cache directory');
63
+ // define.option('-c, --cacheDirectory [cacheDirectory]', 'Cache directory');
64
64
  var args = argv.slice(0, 1).concat(options._);
65
65
  if (args.length < 1) {
66
66
  console.log('Missing command. Example usage: nir version [directory]');
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.js"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport nir from './index.js';\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', cachePath: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n // define.option('-p, --platform [platform]', 'Platform like darwin');\n // define.option('-a, --arch [arch]', 'Architecure x64, x86, arm-pi');\n // define.option('-f, --filename [filename]', 'Distribution filename from https://nodejs.org/dist/index.json');\n // define.option('-c, --cachePath [cachePath]', 'Cache directory');\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\n const installPath = args.length > 1 ? args[1] : null;\n nir(args[0], installPath, { stdio: 'inherit', ...options }, (err, results) => {\n if (err) {\n console.log(err.message);\n return exit(err.code || -1);\n }\n const errors = results.filter((result) => !!result.error);\n\n if (!options.silent) {\n console.log('\\n======================');\n for (let index = 0; index < results.length; index++) {\n const result = results[index];\n if (result.error) console.log(`${result.version} not installed. Error: ${result.error.message}`);\n else console.log(`${result.version} installed in: ${result.fullPath}`);\n }\n console.log('======================');\n }\n\n exit(errors.length ? -1 : 0);\n });\n};\n"],"names":["argv","options","getopts","slice","alias","platform","arch","filename","cachePath","silent","boolean","args","concat","_","length","console","log","exit","installPath","nir","stdio","err","results","message","code","errors","filter","result","error","index","version","fullPath"],"mappings":";;;;+BAIA;;;eAAA;;;2DAJiB;oEACG;4DACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhB,WAAe,SAACA;IACd,IAAMC,UAAUC,IAAAA,sBAAO,EAACF,KAAKG,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,WAAW;YAAKC,QAAQ;QAAI;QAC9EC,SAAS;YAAC;SAAS;IACrB;IAEA,sEAAsE;IACtE,sEAAsE;IACtE,+GAA+G;IAC/G,mEAAmE;IAEnE,IAAMC,OAAOX,KAAKG,KAAK,CAAC,GAAG,GAAGS,MAAM,CAACX,QAAQY,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOC,IAAAA,aAAI,EAAC,CAAC;IACf;IAEA,IAAMC,cAAcP,KAAKG,MAAM,GAAG,IAAIH,IAAI,CAAC,EAAE,GAAG;IAChDQ,IAAAA,cAAG,EAACR,IAAI,CAAC,EAAE,EAAEO,aAAa;QAAEE,OAAO;OAAcnB,UAAW,SAACoB,KAAKC;QAChE,IAAID,KAAK;YACPN,QAAQC,GAAG,CAACK,IAAIE,OAAO;YACvB,OAAON,IAAAA,aAAI,EAACI,IAAIG,IAAI,IAAI,CAAC;QAC3B;QACA,IAAMC,SAASH,QAAQI,MAAM,CAAC,SAACC;mBAAW,CAAC,CAACA,OAAOC,KAAK;;QAExD,IAAI,CAAC3B,QAAQQ,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAK,IAAIa,QAAQ,GAAGA,QAAQP,QAAQR,MAAM,EAAEe,QAAS;gBACnD,IAAMF,SAASL,OAAO,CAACO,MAAM;gBAC7B,IAAIF,OAAOC,KAAK,EAAEb,QAAQC,GAAG,CAAC,AAAC,GAA0CW,OAAxCA,OAAOG,OAAO,EAAC,2BAA8C,OAArBH,OAAOC,KAAK,CAACL,OAAO;qBACxFR,QAAQC,GAAG,CAAC,AAAC,GAAkCW,OAAhCA,OAAOG,OAAO,EAAC,mBAAiC,OAAhBH,OAAOI,QAAQ;YACrE;YACAhB,QAAQC,GAAG,CAAC;QACd;QAEAC,IAAAA,aAAI,EAACQ,OAAOX,MAAM,GAAG,CAAC,IAAI;IAC5B;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.js"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport nir from './index.js';\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', cacheDirectory: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n // define.option('-p, --platform [platform]', 'Platform like darwin');\n // define.option('-a, --arch [arch]', 'Architecure x64, x86, arm-pi');\n // define.option('-f, --filename [filename]', 'Distribution filename from https://nodejs.org/dist/index.json');\n // define.option('-c, --cacheDirectory [cacheDirectory]', 'Cache directory');\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\n const installPath = args.length > 1 ? args[1] : null;\n nir(args[0], installPath, { stdio: 'inherit', ...options }, (err, results) => {\n if (err) {\n console.log(err.message);\n return exit(err.code || -1);\n }\n const errors = results.filter((result) => !!result.error);\n\n if (!options.silent) {\n console.log('\\n======================');\n for (let index = 0; index < results.length; index++) {\n const result = results[index];\n if (result.error) console.log(`${result.version} not installed. Error: ${result.error.message}`);\n else console.log(`${result.version} installed in: ${result.fullPath}`);\n }\n console.log('======================');\n }\n\n exit(errors.length ? -1 : 0);\n });\n};\n"],"names":["argv","options","getopts","slice","alias","platform","arch","filename","cacheDirectory","silent","boolean","args","concat","_","length","console","log","exit","installPath","nir","stdio","err","results","message","code","errors","filter","result","error","index","version","fullPath"],"mappings":";;;;+BAIA;;;eAAA;;;2DAJiB;oEACG;4DACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhB,WAAe,SAACA;IACd,IAAMC,UAAUC,IAAAA,sBAAO,EAACF,KAAKG,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,gBAAgB;YAAKC,QAAQ;QAAI;QACnFC,SAAS;YAAC;SAAS;IACrB;IAEA,sEAAsE;IACtE,sEAAsE;IACtE,+GAA+G;IAC/G,6EAA6E;IAE7E,IAAMC,OAAOX,KAAKG,KAAK,CAAC,GAAG,GAAGS,MAAM,CAACX,QAAQY,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOC,IAAAA,aAAI,EAAC,CAAC;IACf;IAEA,IAAMC,cAAcP,KAAKG,MAAM,GAAG,IAAIH,IAAI,CAAC,EAAE,GAAG;IAChDQ,IAAAA,cAAG,EAACR,IAAI,CAAC,EAAE,EAAEO,aAAa;QAAEE,OAAO;OAAcnB,UAAW,SAACoB,KAAKC;QAChE,IAAID,KAAK;YACPN,QAAQC,GAAG,CAACK,IAAIE,OAAO;YACvB,OAAON,IAAAA,aAAI,EAACI,IAAIG,IAAI,IAAI,CAAC;QAC3B;QACA,IAAMC,SAASH,QAAQI,MAAM,CAAC,SAACC;mBAAW,CAAC,CAACA,OAAOC,KAAK;;QAExD,IAAI,CAAC3B,QAAQQ,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAK,IAAIa,QAAQ,GAAGA,QAAQP,QAAQR,MAAM,EAAEe,QAAS;gBACnD,IAAMF,SAASL,OAAO,CAACO,MAAM;gBAC7B,IAAIF,OAAOC,KAAK,EAAEb,QAAQC,GAAG,CAAC,AAAC,GAA0CW,OAAxCA,OAAOG,OAAO,EAAC,2BAA8C,OAArBH,OAAOC,KAAK,CAACL,OAAO;qBACxFR,QAAQC,GAAG,CAAC,AAAC,GAAkCW,OAAhCA,OAAOG,OAAO,EAAC,mBAAiC,OAAhBH,OAAOI,QAAQ;YACrE;YACAhB,QAAQC,GAAG,CAAC;QACd;QAEAC,IAAAA,aAAI,EAACQ,OAAOX,MAAM,GAAG,CAAC,IAAI;IAC5B;AACF"}
package/dist/cjs/index.js CHANGED
@@ -5,25 +5,25 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return install;
8
+ return installRelease;
9
9
  }
10
10
  });
11
- require("./execSyncPolyfill/index.js");
12
- var _worker = /*#__PURE__*/ _interop_require_default(require("./worker"));
11
+ require("./polyfills.js");
12
+ var _install = /*#__PURE__*/ _interop_require_default(require("./install"));
13
13
  function _interop_require_default(obj) {
14
14
  return obj && obj.__esModule ? obj : {
15
15
  default: obj
16
16
  };
17
17
  }
18
- function install(versionDetails, dest, options, callback) {
18
+ function installRelease(versionDetails, dest, options, callback) {
19
19
  if (typeof options === 'function') {
20
20
  callback = options;
21
21
  options = null;
22
22
  }
23
23
  options = options || {};
24
- if (typeof callback === 'function') return (0, _worker.default)(versionDetails, dest, options, callback);
24
+ if (typeof callback === 'function') return (0, _install.default)(versionDetails, dest, options, callback);
25
25
  return new Promise(function(resolve, reject) {
26
- return (0, _worker.default)(versionDetails, dest, options, function(err, result) {
26
+ installRelease(versionDetails, dest, options, function installCallback(err, result) {
27
27
  err ? reject(err) : resolve(result);
28
28
  });
29
29
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/index.mjs"],"sourcesContent":["import './execSyncPolyfill/index.js';\nimport worker from './worker';\n\nexport default function install(versionDetails, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n if (typeof callback === 'function') return worker(versionDetails, dest, options, callback);\n return new Promise((resolve, reject) =>\n worker(versionDetails, dest, options, (err, result) => {\n err ? reject(err) : resolve(result);\n })\n );\n}\n"],"names":["install","versionDetails","dest","options","callback","worker","Promise","resolve","reject","err","result"],"mappings":";;;;+BAGA;;;eAAwBA;;;QAHjB;6DACY;;;;;;AAEJ,SAASA,QAAQC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACrE,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtB,IAAI,OAAOC,aAAa,YAAY,OAAOC,IAAAA,eAAM,EAACJ,gBAAgBC,MAAMC,SAASC;IACjF,OAAO,IAAIE,QAAQ,SAACC,SAASC;eAC3BH,IAAAA,eAAM,EAACJ,gBAAgBC,MAAMC,SAAS,SAACM,KAAKC;YAC1CD,MAAMD,OAAOC,OAAOF,QAAQG;QAC9B;;AAEJ"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/index.mjs"],"sourcesContent":["import './polyfills.cjs';\nimport install from './install';\n\nexport default function installRelease(versionDetails, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n if (typeof callback === 'function') return install(versionDetails, dest, options, callback);\n return new Promise((resolve, reject) => {\n installRelease(versionDetails, dest, options, function installCallback(err, result) {\n err ? reject(err) : resolve(result);\n });\n });\n}\n"],"names":["installRelease","versionDetails","dest","options","callback","install","Promise","resolve","reject","installCallback","err","result"],"mappings":";;;;+BAGA;;;eAAwBA;;;QAHjB;8DACa;;;;;;AAEL,SAASA,eAAeC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC5E,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtB,IAAI,OAAOC,aAAa,YAAY,OAAOC,IAAAA,gBAAO,EAACJ,gBAAgBC,MAAMC,SAASC;IAClF,OAAO,IAAIE,QAAQ,SAACC,SAASC;QAC3BR,eAAeC,gBAAgBC,MAAMC,SAAS,SAASM,gBAAgBC,GAAG,EAAEC,MAAM;YAChFD,MAAMF,OAAOE,OAAOH,QAAQI;QAC9B;IACF;AACF"}
@@ -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 DEFAULT_INSTALL_PATH = path.join(require('homedir-polyfill')(), '.nir');
59
+ var NIR_DIR = path.join(require('homedir-polyfill')(), '.nir');
60
60
  var DEFAULT_OPTIONS = {
61
- cachePath: path.join(DEFAULT_INSTALL_PATH, 'cache'),
62
- buildPath: path.join(DEFAULT_INSTALL_PATH, 'build'),
61
+ cacheDirectory: path.join(NIR_DIR, 'cache'),
62
+ buildDirectory: path.join(NIR_DIR, 'build'),
63
63
  downloadURL: function downloadURL(relativePath) {
64
64
  return "https://nodejs.org/dist/".concat(relativePath);
65
65
  }
@@ -73,25 +73,27 @@ module.exports = function install(versionDetails, dest, options, callback) {
73
73
  if (!versions.length) return callback(new Error("Could not resolve versions for: ".concat(JSON.stringify(versionDetails))));
74
74
  var results = [];
75
75
  var queue = new Queue(1);
76
- queue.defer(function(cb) {
77
- return mkdirp(options.cachePath, cb.bind(null, null));
76
+ queue.defer(function(callback) {
77
+ mkdirp(options.cacheDirectory, callback.bind(null, null));
78
78
  });
79
- versions.forEach(function(version) {
80
- queue.defer(function(cb) {
81
- var installPath = dest && versions.length > 1 ? path.join(dest, version) : dest;
82
- installVersion(version, installPath, options, function(err, fullPath) {
83
- if (err) return cb(err);
84
- results.push({
85
- version: version.version,
86
- error: err,
87
- fullPath: fullPath
79
+ for(var index = 0; index < versions.length; index++){
80
+ (function(version) {
81
+ queue.defer(function(callback) {
82
+ var installDirectory = dest && versions.length > 1 ? path.join(dest, version.version) : dest;
83
+ installVersion(version, installDirectory, options, function(err, fullPath) {
84
+ if (err) return callback(err);
85
+ results.push({
86
+ version: version.version,
87
+ error: err,
88
+ fullPath: fullPath
89
+ });
90
+ callback();
88
91
  });
89
- cb();
90
92
  });
91
- });
92
- });
93
+ })(versions[index]);
94
+ }
93
95
  queue.await(function(err) {
94
- return err ? callback(err) : callback(null, results);
96
+ err ? callback(err) : callback(null, results);
95
97
  });
96
98
  });
97
99
  };
@@ -0,0 +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 NIR_DIR = path.join(require('homedir-polyfill')(), '.nir');\nconst DEFAULT_OPTIONS = {\n cacheDirectory: path.join(NIR_DIR, 'cache'),\n buildDirectory: path.join(NIR_DIR, '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.cacheDirectory, callback.bind(null, null));\n });\n for (let index = 0; index < versions.length; index++) {\n ((version) => {\n queue.defer((callback) => {\n const installDirectory = dest && versions.length > 1 ? path.join(dest, version.version) : dest;\n installVersion(version, installDirectory, options, (err, fullPath) => {\n if (err) return callback(err);\n results.push({ version: version.version, error: err, fullPath: fullPath });\n callback();\n });\n });\n })(versions[index]);\n }\n queue.await((err) => {\n err ? callback(err) : callback(null, results);\n });\n });\n};\n"],"names":["path","require","Queue","mkdirp","resolveVersions","installVersion","NIR_DIR","join","DEFAULT_OPTIONS","cacheDirectory","buildDirectory","downloadURL","relativePath","module","exports","install","versionDetails","dest","options","callback","err","versions","length","Error","JSON","stringify","results","queue","defer","bind","index","version","installDirectory","fullPath","push","error","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,UAAUN,KAAKO,IAAI,CAACN,QAAQ,uBAAuB;AACzD,IAAMO,kBAAkB;IACtBC,gBAAgBT,KAAKO,IAAI,CAACD,SAAS;IACnCI,gBAAgBV,KAAKO,IAAI,CAACD,SAAS;IACnCK,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,cAAc,EAAEU,SAASU,IAAI,CAAC,MAAM;QACrD;QACA,IAAK,IAAIC,QAAQ,GAAGA,QAAQT,SAASC,MAAM,EAAEQ,QAAS;YACnD,CAAA,SAACC;gBACAJ,MAAMC,KAAK,CAAC,SAACT;oBACX,IAAMa,mBAAmBf,QAAQI,SAASC,MAAM,GAAG,IAAItB,KAAKO,IAAI,CAACU,MAAMc,QAAQA,OAAO,IAAId;oBAC1FZ,eAAe0B,SAASC,kBAAkBd,SAAS,SAACE,KAAKa;wBACvD,IAAIb,KAAK,OAAOD,SAASC;wBACzBM,QAAQQ,IAAI,CAAC;4BAAEH,SAASA,QAAQA,OAAO;4BAAEI,OAAOf;4BAAKa,UAAUA;wBAAS;wBACxEd;oBACF;gBACF;YACF,CAAA,EAAGE,QAAQ,CAACS,MAAM;QACpB;QACAH,MAAMS,KAAK,CAAC,SAAChB;YACXA,MAAMD,SAASC,OAAOD,SAAS,MAAMO;QACvC;IACF;AACF"}
@@ -24,7 +24,7 @@ module.exports = function installLib(version, dest, options, callback) {
24
24
  var distTags = res2.body;
25
25
  var installVersion = distTags["latest-".concat(npmMajor)] || distTags["next-".concat(npmMajor)] || distTags.latest;
26
26
  var downloadPath = "".concat(NPM_DIST_URL, "/-/npm-").concat(installVersion, ".tgz");
27
- var cachePath = path.join(options.cachePath, path.basename(downloadPath));
27
+ var cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));
28
28
  conditionalCache(downloadPath, cachePath, function(err) {
29
29
  if (err) return callback(err);
30
30
  conditionalExtract(cachePath, installPath, callback);
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/installLib.js"],"sourcesContent":["const path = require('path');\nconst get = require('get-remote');\n\nconst conditionalCache = require('../conditionalCache');\nconst conditionalExtract = require('../conditionalExtract');\n\nconst NODE_DIST_URL = 'https://nodejs.org/dist/index.json';\nconst NPM_DIST_TAGS_URL = 'https://registry.npmjs.org/-/package/npm/dist-tags';\nconst NPM_DIST_URL = 'https://registry.npmjs.org/npm';\nconst NPM_MIN_VERSION = 3;\n\nmodule.exports = function installLib(version, dest, options, callback) {\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n\n get(NODE_DIST_URL).json((err, res1) => {\n if (err) return callback(err);\n const releases = res1.body;\n\n const found = releases.find((record) => record.version === version.version);\n const npmMajorPair = found && found.npm ? +found.npm.split('.')[0] : NPM_MIN_VERSION;\n const npmMajor = Math.max(npmMajorPair, NPM_MIN_VERSION);\n\n get(NPM_DIST_TAGS_URL).json((err, res2) => {\n if (err) return callback(err);\n const distTags = res2.body;\n const installVersion = distTags[`latest-${npmMajor}`] || distTags[`next-${npmMajor}`] || distTags.latest;\n const downloadPath = `${NPM_DIST_URL}/-/npm-${installVersion}.tgz`;\n const cachePath = path.join(options.cachePath, path.basename(downloadPath));\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n conditionalExtract(cachePath, installPath, callback);\n });\n });\n });\n};\n"],"names":["path","require","get","conditionalCache","conditionalExtract","NODE_DIST_URL","NPM_DIST_TAGS_URL","NPM_DIST_URL","NPM_MIN_VERSION","module","exports","installLib","version","dest","options","callback","platform","process","libPath","join","installPath","json","err","res1","releases","body","found","find","record","npmMajorPair","npm","split","npmMajor","Math","max","res2","distTags","installVersion","latest","downloadPath","cachePath","basename"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,MAAMD,QAAQ;AAEpB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,qBAAqBH,QAAQ;AAEnC,IAAMI,gBAAgB;AACtB,IAAMC,oBAAoB;AAC1B,IAAMC,eAAe;AACrB,IAAMC,kBAAkB;AAExBC,OAAOC,OAAO,GAAG,SAASC,WAAWC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACnE,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,UAAUF,aAAa,UAAUH,OAAOb,KAAKmB,IAAI,CAACN,MAAM;IAC9D,IAAMO,cAAcpB,KAAKmB,IAAI,CAACD,SAAS,gBAAgB;IAEvDhB,IAAIG,eAAegB,IAAI,CAAC,SAACC,KAAKC;QAC5B,IAAID,KAAK,OAAOP,SAASO;QACzB,IAAME,WAAWD,KAAKE,IAAI;QAE1B,IAAMC,QAAQF,SAASG,IAAI,CAAC,SAACC;mBAAWA,OAAOhB,OAAO,KAAKA,QAAQA,OAAO;;QAC1E,IAAMiB,eAAeH,SAASA,MAAMI,GAAG,GAAG,CAACJ,MAAMI,GAAG,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAGvB;QACrE,IAAMwB,WAAWC,KAAKC,GAAG,CAACL,cAAcrB;QAExCN,IAAII,mBAAmBe,IAAI,CAAC,SAACC,KAAKa;YAChC,IAAIb,KAAK,OAAOP,SAASO;YACzB,IAAMc,WAAWD,KAAKV,IAAI;YAC1B,IAAMY,iBAAiBD,QAAQ,CAAC,AAAC,UAAkB,OAATJ,UAAW,IAAII,QAAQ,CAAC,AAAC,QAAgB,OAATJ,UAAW,IAAII,SAASE,MAAM;YACxG,IAAMC,eAAe,AAAC,GAAwBF,OAAtB9B,cAAa,WAAwB,OAAf8B,gBAAe;YAC7D,IAAMG,YAAYxC,KAAKmB,IAAI,CAACL,QAAQ0B,SAAS,EAAExC,KAAKyC,QAAQ,CAACF;YAC7DpC,iBAAiBoC,cAAcC,WAAW,SAAClB;gBACzC,IAAIA,KAAK,OAAOP,SAASO;gBACzBlB,mBAAmBoC,WAAWpB,aAAaL;YAC7C;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNPM/installLib.js"],"sourcesContent":["const path = require('path');\nconst get = require('get-remote');\n\nconst conditionalCache = require('../conditionalCache');\nconst conditionalExtract = require('../conditionalExtract');\n\nconst NODE_DIST_URL = 'https://nodejs.org/dist/index.json';\nconst NPM_DIST_TAGS_URL = 'https://registry.npmjs.org/-/package/npm/dist-tags';\nconst NPM_DIST_URL = 'https://registry.npmjs.org/npm';\nconst NPM_MIN_VERSION = 3;\n\nmodule.exports = function installLib(version, dest, options, callback) {\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n\n get(NODE_DIST_URL).json((err, res1) => {\n if (err) return callback(err);\n const releases = res1.body;\n\n const found = releases.find((record) => record.version === version.version);\n const npmMajorPair = found && found.npm ? +found.npm.split('.')[0] : NPM_MIN_VERSION;\n const npmMajor = Math.max(npmMajorPair, NPM_MIN_VERSION);\n\n get(NPM_DIST_TAGS_URL).json((err, res2) => {\n if (err) return callback(err);\n const distTags = res2.body;\n const installVersion = distTags[`latest-${npmMajor}`] || distTags[`next-${npmMajor}`] || distTags.latest;\n const downloadPath = `${NPM_DIST_URL}/-/npm-${installVersion}.tgz`;\n const cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n conditionalExtract(cachePath, installPath, callback);\n });\n });\n });\n};\n"],"names":["path","require","get","conditionalCache","conditionalExtract","NODE_DIST_URL","NPM_DIST_TAGS_URL","NPM_DIST_URL","NPM_MIN_VERSION","module","exports","installLib","version","dest","options","callback","platform","process","libPath","join","installPath","json","err","res1","releases","body","found","find","record","npmMajorPair","npm","split","npmMajor","Math","max","res2","distTags","installVersion","latest","downloadPath","cachePath","cacheDirectory","basename"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,MAAMD,QAAQ;AAEpB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,qBAAqBH,QAAQ;AAEnC,IAAMI,gBAAgB;AACtB,IAAMC,oBAAoB;AAC1B,IAAMC,eAAe;AACrB,IAAMC,kBAAkB;AAExBC,OAAOC,OAAO,GAAG,SAASC,WAAWC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACnE,IAAMC,WAAWF,QAAQE,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,UAAUF,aAAa,UAAUH,OAAOb,KAAKmB,IAAI,CAACN,MAAM;IAC9D,IAAMO,cAAcpB,KAAKmB,IAAI,CAACD,SAAS,gBAAgB;IAEvDhB,IAAIG,eAAegB,IAAI,CAAC,SAACC,KAAKC;QAC5B,IAAID,KAAK,OAAOP,SAASO;QACzB,IAAME,WAAWD,KAAKE,IAAI;QAE1B,IAAMC,QAAQF,SAASG,IAAI,CAAC,SAACC;mBAAWA,OAAOhB,OAAO,KAAKA,QAAQA,OAAO;;QAC1E,IAAMiB,eAAeH,SAASA,MAAMI,GAAG,GAAG,CAACJ,MAAMI,GAAG,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAGvB;QACrE,IAAMwB,WAAWC,KAAKC,GAAG,CAACL,cAAcrB;QAExCN,IAAII,mBAAmBe,IAAI,CAAC,SAACC,KAAKa;YAChC,IAAIb,KAAK,OAAOP,SAASO;YACzB,IAAMc,WAAWD,KAAKV,IAAI;YAC1B,IAAMY,iBAAiBD,QAAQ,CAAC,AAAC,UAAkB,OAATJ,UAAW,IAAII,QAAQ,CAAC,AAAC,QAAgB,OAATJ,UAAW,IAAII,SAASE,MAAM;YACxG,IAAMC,eAAe,AAAC,GAAwBF,OAAtB9B,cAAa,WAAwB,OAAf8B,gBAAe;YAC7D,IAAMG,YAAYxC,KAAKmB,IAAI,CAACL,QAAQ2B,cAAc,EAAEzC,KAAK0C,QAAQ,CAACH;YAClEpC,iBAAiBoC,cAAcC,WAAW,SAAClB;gBACzC,IAAIA,KAAK,OAAOP,SAASO;gBACzBlB,mBAAmBoC,WAAWpB,aAAaL;YAC7C;QACF;IACF;AACF"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- var machineArch = require('../archPatched.js');
3
- var osArch = require('os').arch;
2
+ var archMachine = require('../arch');
3
+ var archOS = require('os').arch;
4
4
  var PLATFORM_OS = {
5
5
  win32: 'win',
6
6
  darwin: 'osx'
@@ -14,14 +14,16 @@ var PLATFORM_FILES = {
14
14
  'tar'
15
15
  ]
16
16
  };
17
- module.exports = function prebuilts(options) {
17
+ var machine = null;
18
+ module.exports = function prebuiltFilenames(options) {
19
+ if (!machine) machine = archMachine();
18
20
  var platform = options.platform || process.platform;
19
21
  var os = PLATFORM_OS[platform] || platform;
20
- var archs = [
21
- machineArch()
22
- ];
23
- if (osArch) archs.push(osArch());
24
- if (platform === 'darwin' && archs[0] === 'arm64') archs.push('x64'); // fallback
22
+ var archs = [];
23
+ if (options.arch) archs.push(options.arch);
24
+ archs.push(machine);
25
+ if (archOS) archs.push(archOS());
26
+ if (platform === 'darwin' && machine === 'arm64') archs.push('x64'); // fallback
25
27
  var files = PLATFORM_FILES[platform];
26
28
  var results = [];
27
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/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"}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  var distPaths = require('node-filename-to-dist-paths');
3
- var prebuilds = require('./prebuilds');
3
+ var prebuiltFilenames = require('./filenames');
4
4
  module.exports = function findDistPaths(version, options) {
5
5
  var filenames = options.filename ? [
6
6
  options.filename
7
- ] : prebuilds(options);
7
+ ] : prebuiltFilenames(options);
8
8
  for(var index = 0; index < filenames.length; index++){
9
9
  var filename = filenames[index];
10
- if (version.files.indexOf(filename) < 0) continue;
10
+ if (!~version.files.indexOf(filename)) continue;
11
11
  var relativePaths = distPaths(filename, version.version);
12
12
  if (relativePaths && relativePaths.length) return {
13
13
  version: version.version,
@@ -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 prebuilds = require('./prebuilds');\n\nmodule.exports = function findDistPaths(version, options) {\n const filenames = options.filename ? [options.filename] : prebuilds(options);\n for (let index = 0; index < filenames.length; index++) {\n const filename = filenames[index];\n if (version.files.indexOf(filename) < 0) 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","prebuilds","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,IAAIJ,QAAQM,KAAK,CAACC,OAAO,CAACJ,YAAY,GAAG;QACzC,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"}
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 prebuiltFilenames = require('./filenames');\n\nmodule.exports = function findDistPaths(version, options) {\n const filenames = options.filename ? [options.filename] : prebuiltFilenames(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","prebuiltFilenames","module","exports","findDistPaths","version","options","filenames","filename","index","length","files","indexOf","relativePaths"],"mappings":";AAAA,IAAMA,YAAYC,QAAQ;AAC1B,IAAMC,oBAAoBD,QAAQ;AAElCE,OAAOC,OAAO,GAAG,SAASC,cAAcC,OAAO,EAAEC,OAAO;IACtD,IAAMC,YAAYD,QAAQE,QAAQ,GAAG;QAACF,QAAQE,QAAQ;KAAC,GAAGP,kBAAkBK;IAC5E,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"}
@@ -35,7 +35,7 @@ var conditionalExtract = require('../conditionalExtract');
35
35
  var progress = require('../progress');
36
36
  module.exports = function installCompressed(relativePath, dest, _record, options, callback) {
37
37
  var downloadPath = options.downloadURL(relativePath);
38
- var cachePath = path.join(options.cachePath, path.basename(downloadPath));
38
+ var cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));
39
39
  conditionalCache(downloadPath, cachePath, function(err) {
40
40
  if (err) return callback(err);
41
41
  access(dest, function(err) {
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installCompressed.js"],"sourcesContent":["const path = require('path');\nconst access = require('fs-access-compat');\nconst rimraf2 = require('rimraf2');\n\nconst conditionalCache = require('../conditionalCache');\nconst conditionalExtract = require('../conditionalExtract');\nconst progress = require('../progress');\n\nmodule.exports = function installCompressed(relativePath, dest, _record, options, callback) {\n const downloadPath = options.downloadURL(relativePath);\n const cachePath = path.join(options.cachePath, path.basename(downloadPath));\n\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n conditionalExtract(cachePath, dest, { strip: 1, progress: progress, time: 1000, ...options }, (err) => {\n console.log('');\n if (err) return callback(err);\n\n // some compressed versions of node come with npm pre-installed, but we want to override with a specific version\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n rimraf2(installPath, { disableGlob: true }, () => {\n callback(err);\n });\n });\n });\n });\n};\n"],"names":["path","require","access","rimraf2","conditionalCache","conditionalExtract","progress","module","exports","installCompressed","relativePath","dest","_record","options","callback","downloadPath","downloadURL","cachePath","join","basename","err","strip","time","console","log","platform","process","libPath","installPath","disableGlob"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AACvB,IAAME,UAAUF,QAAQ;AAExB,IAAMG,mBAAmBH,QAAQ;AACjC,IAAMI,qBAAqBJ,QAAQ;AACnC,IAAMK,WAAWL,QAAQ;AAEzBM,OAAOC,OAAO,GAAG,SAASC,kBAAkBC,YAAY,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ;IACxF,IAAMC,eAAeF,QAAQG,WAAW,CAACN;IACzC,IAAMO,YAAYjB,KAAKkB,IAAI,CAACL,QAAQI,SAAS,EAAEjB,KAAKmB,QAAQ,CAACJ;IAE7DX,iBAAiBW,cAAcE,WAAW,SAACG;QACzC,IAAIA,KAAK,OAAON,SAASM;QACzBlB,OAAOS,MAAM,SAACS;YACZ,IAAI,CAACA,KAAK,OAAON,YAAY,iBAAiB;YAC9CT,mBAAmBY,WAAWN,MAAM;gBAAEU,OAAO;gBAAGf,UAAUA;gBAAUgB,MAAM;eAAST,UAAW,SAACO;gBAC7FG,QAAQC,GAAG,CAAC;gBACZ,IAAIJ,KAAK,OAAON,SAASM;gBAEzB,gHAAgH;gBAChH,IAAMK,WAAWZ,QAAQY,QAAQ,IAAIC,QAAQD,QAAQ;gBACrD,IAAME,UAAUF,aAAa,UAAUd,OAAOX,KAAKkB,IAAI,CAACP,MAAM;gBAC9D,IAAMiB,cAAc5B,KAAKkB,IAAI,CAACS,SAAS,gBAAgB;gBACvDxB,QAAQyB,aAAa;oBAAEC,aAAa;gBAAK,GAAG;oBAC1Cf,SAASM;gBACX;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installCompressed.js"],"sourcesContent":["const path = require('path');\nconst access = require('fs-access-compat');\nconst rimraf2 = require('rimraf2');\n\nconst conditionalCache = require('../conditionalCache');\nconst conditionalExtract = require('../conditionalExtract');\nconst progress = require('../progress');\n\nmodule.exports = function installCompressed(relativePath, dest, _record, options, callback) {\n const downloadPath = options.downloadURL(relativePath);\n const cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));\n\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n conditionalExtract(cachePath, dest, { strip: 1, progress: progress, time: 1000, ...options }, (err) => {\n console.log('');\n if (err) return callback(err);\n\n // some compressed versions of node come with npm pre-installed, but we want to override with a specific version\n const platform = options.platform || process.platform;\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n rimraf2(installPath, { disableGlob: true }, () => {\n callback(err);\n });\n });\n });\n });\n};\n"],"names":["path","require","access","rimraf2","conditionalCache","conditionalExtract","progress","module","exports","installCompressed","relativePath","dest","_record","options","callback","downloadPath","downloadURL","cachePath","join","cacheDirectory","basename","err","strip","time","console","log","platform","process","libPath","installPath","disableGlob"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AACvB,IAAME,UAAUF,QAAQ;AAExB,IAAMG,mBAAmBH,QAAQ;AACjC,IAAMI,qBAAqBJ,QAAQ;AACnC,IAAMK,WAAWL,QAAQ;AAEzBM,OAAOC,OAAO,GAAG,SAASC,kBAAkBC,YAAY,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ;IACxF,IAAMC,eAAeF,QAAQG,WAAW,CAACN;IACzC,IAAMO,YAAYjB,KAAKkB,IAAI,CAACL,QAAQM,cAAc,EAAEnB,KAAKoB,QAAQ,CAACL;IAElEX,iBAAiBW,cAAcE,WAAW,SAACI;QACzC,IAAIA,KAAK,OAAOP,SAASO;QACzBnB,OAAOS,MAAM,SAACU;YACZ,IAAI,CAACA,KAAK,OAAOP,YAAY,iBAAiB;YAC9CT,mBAAmBY,WAAWN,MAAM;gBAAEW,OAAO;gBAAGhB,UAAUA;gBAAUiB,MAAM;eAASV,UAAW,SAACQ;gBAC7FG,QAAQC,GAAG,CAAC;gBACZ,IAAIJ,KAAK,OAAOP,SAASO;gBAEzB,gHAAgH;gBAChH,IAAMK,WAAWb,QAAQa,QAAQ,IAAIC,QAAQD,QAAQ;gBACrD,IAAME,UAAUF,aAAa,UAAUf,OAAOX,KAAKkB,IAAI,CAACP,MAAM;gBAC9D,IAAMkB,cAAc7B,KAAKkB,IAAI,CAACU,SAAS,gBAAgB;gBACvDzB,QAAQ0B,aAAa;oBAAEC,aAAa;gBAAK,GAAG;oBAC1ChB,SAASO;gBACX;YACF;QACF;IACF;AACF"}
@@ -5,7 +5,7 @@ var conditionalCache = require('../conditionalCache');
5
5
  var copyFile = require('../copyFile');
6
6
  module.exports = function installExe(relativePath, dest, record, options, callback) {
7
7
  var downloadPath = options.downloadURL(relativePath);
8
- var cachePath = path.join(options.cachePath, "node-".concat(record.version, ".exe"));
8
+ var cachePath = path.join(options.cacheDirectory, "node-".concat(record.version, ".exe"));
9
9
  var destPath = path.join(dest, path.basename(relativePath));
10
10
  access(destPath, function(err) {
11
11
  if (!err) return callback(); // already exists
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installExe.js"],"sourcesContent":["const path = require('path');\nconst access = require('fs-access-compat');\n\nconst conditionalCache = require('../conditionalCache');\nconst copyFile = require('../copyFile');\n\nmodule.exports = function installExe(relativePath, dest, record, options, callback) {\n const downloadPath = options.downloadURL(relativePath);\n const cachePath = path.join(options.cachePath, `node-${record.version}.exe`);\n const destPath = path.join(dest, path.basename(relativePath));\n\n access(destPath, (err) => {\n if (!err) return callback(); // already exists\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n copyFile(cachePath, destPath, callback);\n });\n });\n};\n"],"names":["path","require","access","conditionalCache","copyFile","module","exports","installExe","relativePath","dest","record","options","callback","downloadPath","downloadURL","cachePath","join","version","destPath","basename","err"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AAEvB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,WAAWH,QAAQ;AAEzBI,OAAOC,OAAO,GAAG,SAASC,WAAWC,YAAY,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ;IAChF,IAAMC,eAAeF,QAAQG,WAAW,CAACN;IACzC,IAAMO,YAAYf,KAAKgB,IAAI,CAACL,QAAQI,SAAS,EAAE,AAAC,QAAsB,OAAfL,OAAOO,OAAO,EAAC;IACtE,IAAMC,WAAWlB,KAAKgB,IAAI,CAACP,MAAMT,KAAKmB,QAAQ,CAACX;IAE/CN,OAAOgB,UAAU,SAACE;QAChB,IAAI,CAACA,KAAK,OAAOR,YAAY,iBAAiB;QAC9CT,iBAAiBU,cAAcE,WAAW,SAACK;YACzC,IAAIA,KAAK,OAAOR,SAASQ;YACzBhB,SAASW,WAAWG,UAAUN;QAChC;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installExe.js"],"sourcesContent":["const path = require('path');\nconst access = require('fs-access-compat');\n\nconst conditionalCache = require('../conditionalCache');\nconst copyFile = require('../copyFile');\n\nmodule.exports = function installExe(relativePath, dest, record, options, callback) {\n const downloadPath = options.downloadURL(relativePath);\n const cachePath = path.join(options.cacheDirectory, `node-${record.version}.exe`);\n const destPath = path.join(dest, path.basename(relativePath));\n\n access(destPath, (err) => {\n if (!err) return callback(); // already exists\n conditionalCache(downloadPath, cachePath, (err) => {\n if (err) return callback(err);\n copyFile(cachePath, destPath, callback);\n });\n });\n};\n"],"names":["path","require","access","conditionalCache","copyFile","module","exports","installExe","relativePath","dest","record","options","callback","downloadPath","downloadURL","cachePath","join","cacheDirectory","version","destPath","basename","err"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,SAASD,QAAQ;AAEvB,IAAME,mBAAmBF,QAAQ;AACjC,IAAMG,WAAWH,QAAQ;AAEzBI,OAAOC,OAAO,GAAG,SAASC,WAAWC,YAAY,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ;IAChF,IAAMC,eAAeF,QAAQG,WAAW,CAACN;IACzC,IAAMO,YAAYf,KAAKgB,IAAI,CAACL,QAAQM,cAAc,EAAE,AAAC,QAAsB,OAAfP,OAAOQ,OAAO,EAAC;IAC3E,IAAMC,WAAWnB,KAAKgB,IAAI,CAACP,MAAMT,KAAKoB,QAAQ,CAACZ;IAE/CN,OAAOiB,UAAU,SAACE;QAChB,IAAI,CAACA,KAAK,OAAOT,YAAY,iBAAiB;QAC9CT,iBAAiBU,cAAcE,WAAW,SAACM;YACzC,IAAIA,KAAK,OAAOT,SAASS;YACzBjB,SAASW,WAAWI,UAAUP;QAChC;IACF;AACF"}
@@ -9,8 +9,8 @@ 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.buildPath, path.basename(relativePath));
13
- var cachePath = path.join(options.cachePath, path.basename(downloadPath));
12
+ var buildPath = path.join(options.buildDirectory, path.basename(relativePath));
13
+ var cachePath = path.join(options.cacheDirectory, path.basename(downloadPath));
14
14
  var queue = new Queue(1);
15
15
  queue.defer(conditionalCache.bind(null, downloadPath, cachePath));
16
16
  queue.defer(conditionalExtract.bind(null, cachePath, buildPath, {
@@ -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.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
+ {"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.buildDirectory, path.basename(relativePath));\n const cachePath = path.join(options.cacheDirectory, 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","buildDirectory","basename","cachePath","cacheDirectory","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,QAAQS,cAAc,EAAEtB,KAAKuB,QAAQ,CAACb;IAClE,IAAMc,YAAYxB,KAAKqB,IAAI,CAACR,QAAQY,cAAc,EAAEzB,KAAKuB,QAAQ,CAACL;IAElE,IAAMQ,QAAQ,IAAIxB,MAAM;IACxBwB,MAAMC,KAAK,CAACxB,iBAAiByB,IAAI,CAAC,MAAMV,cAAcM;IACtDE,MAAMC,KAAK,CAACvB,mBAAmBwB,IAAI,CAAC,MAAMJ,WAAWJ,WAAW;QAAES,OAAO;IAAE;IAC3EH,MAAMC,KAAK,CAACV,MAAMW,IAAI,CAAC,MAAMR,WAAWT,MAAME;IAC9Ca,MAAMI,KAAK,CAAChB;AACd"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var cp = require('child_process');
3
+ if (!cp.execSync) {
4
+ var path = require('path');
5
+ var execCallback = path.join(__dirname, 'workers', 'execCallback.js');
6
+ var functionExec = null; // break dependencies
7
+ cp.execSync = function execSyncPolyfill(cmd, options) {
8
+ if (!functionExec) functionExec = require('function-exec-sync');
9
+ return functionExec()({
10
+ callbacks: true
11
+ }, execCallback, cmd, options || {});
12
+ };
13
+ }
14
+ /* 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; }
@@ -0,0 +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()({ 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,EAAEC,OAAO;QAClD,IAAI,CAACH,cAAcA,eAAeN,QAAQ;QAC1C,OAAOM,eAAe;YAAEI,WAAW;QAAK,GAAGP,cAAcK,KAAKC,WAAW,CAAC;IAC5E;AACF"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ var cp = require('child_process');
3
+ module.exports = function execCallback(cmd, options, callback) {
4
+ return cp.exec(cmd, options, callback);
5
+ };
6
+ /* 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; }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/workers/execCallback.js"],"sourcesContent":["const cp = require('child_process');\n\nmodule.exports = function execCallback(cmd, options, callback) {\n return cp.exec(cmd, options, callback);\n};\n"],"names":["cp","require","module","exports","execCallback","cmd","options","callback","exec"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AAEnBC,OAAOC,OAAO,GAAG,SAASC,aAAaC,GAAG,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,OAAOP,GAAGQ,IAAI,CAACH,KAAKC,SAASC;AAC/B"}
@@ -0,0 +1,2 @@
1
+ declare function _exports(): "arm64" | "x64" | "x86" | "arm-pi";
2
+ export = _exports;
@@ -1 +1 @@
1
- export default function install(versionDetails: any, dest: any, options: any, callback: any): any;
1
+ export default function installRelease(versionDetails: any, dest: any, options: any, callback: any): any;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ declare function _exports(cmd: any, options: any, callback: any): cp.ChildProcess;
2
+ export = _exports;
3
+ import cp = require("child_process");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-install-release",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Cross-platform solution for installing releases of Node.js",
5
5
  "keywords": [
6
6
  "node",
@@ -38,16 +38,14 @@
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.2",
41
+ "function-exec-sync": "^1.1.3",
42
42
  "get-remote": "^1.3.2",
43
43
  "getopts-compat": "^2.2.5",
44
44
  "homedir-polyfill": "^1.0.3",
45
45
  "isarray": "^2.0.5",
46
- "lazy-cache": "^2.0.2",
47
46
  "lodash.find": "^4.6.0",
48
47
  "lodash.keys": "^4.2.0",
49
48
  "mkdirp-classic": "^0.5.3",
50
- "module-root-sync": "^0.1.1",
51
49
  "node-filename-to-dist-paths": "^0.2.5",
52
50
  "node-resolve-versions": "^1.0.5",
53
51
  "pump": "^3.0.2",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/archPatched.js"],"sourcesContent":["// ****************************\n// KM: patched to detect without making assumptions\n// ****************************\n\n/*! arch. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nconst cp = require('child_process');\nconst fs = require('fs');\nconst path = require('path');\n\n/**\n * Returns the operating system's CPU architecture. This is different than\n * `process.arch` or `os.arch()` which returns the architecture the Node.js (or\n * Electron) binary was compiled for.\n */\nmodule.exports = function arch() {\n /**\n * On macOS, we need to detect if x64 Node is running because the CPU is truly\n * an Intel chip, or if it's running on Apple Silicon via Rosetta 2:\n * https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment\n */\n if (process.platform === 'darwin') {\n const nativeArm = process.arch === 'arm64';\n const rosettaArm = cp.execSync('sysctl -in sysctl.proc_translated', { encoding: 'utf8' }) === '1\\n';\n\n return nativeArm || rosettaArm ? 'arm64' : 'x64';\n }\n\n /**\n * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit\n * app is based on the presence of a WOW64 file: %SystemRoot%\\SysNative.\n * See: https://twitter.com/feross/status/776949077208510464\n */\n if (process.platform === 'win32') {\n let useEnv = false;\n try {\n useEnv = !!(process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT));\n } catch (_err) {}\n\n const sysRoot = useEnv ? process.env.SYSTEMROOT : 'C:\\\\Windows';\n\n // If %SystemRoot%\\SysNative exists, we are in a WOW64 FS Redirected application.\n let isWOW64 = false;\n try {\n isWOW64 = !!fs.statSync(path.join(sysRoot, 'sysnative'));\n } catch (_err) {}\n\n return isWOW64 ? 'x64' : 'x86';\n }\n\n /**\n * On Linux, use the `getconf` command to get the architecture.\n */\n if (process.platform === 'linux') {\n const output = cp.execSync('getconf LONG_BIT', { encoding: 'utf8' });\n return output === '64\\n' ? 'x64' : 'x86';\n }\n\n // ****************************\n // KM: patched to detect without making assumptions\n // ****************************\n\n /**\n * The running binary is 64-bit, so the OS is clearly 64-bit.\n */\n if (process.arch === 'x64') {\n return 'x64';\n }\n // ****************************\n // KM: patched to detect without making assumptions\n // ****************************\n\n /**\n * If none of the above, assume the architecture is 32-bit.\n */\n return 'x86';\n};\n"],"names":["cp","require","fs","path","module","exports","arch","process","platform","nativeArm","rosettaArm","execSync","encoding","useEnv","env","SYSTEMROOT","statSync","_err","sysRoot","isWOW64","join","output"],"mappings":"AAAA,+BAA+B;AAC/B,mDAAmD;AACnD,+BAA+B;AAE/B,2EAA2E;AAC3E,IAAMA,KAAKC,QAAQ;AACnB,IAAMC,KAAKD,QAAQ;AACnB,IAAME,OAAOF,QAAQ;AAErB;;;;CAIC,GACDG,OAAOC,OAAO,GAAG,SAASC;IACxB;;;;GAIC,GACD,IAAIC,QAAQC,QAAQ,KAAK,UAAU;QACjC,IAAMC,YAAYF,QAAQD,IAAI,KAAK;QACnC,IAAMI,aAAaV,GAAGW,QAAQ,CAAC,qCAAqC;YAAEC,UAAU;QAAO,OAAO;QAE9F,OAAOH,aAAaC,aAAa,UAAU;IAC7C;IAEA;;;;GAIC,GACD,IAAIH,QAAQC,QAAQ,KAAK,SAAS;QAChC,IAAIK,SAAS;QACb,IAAI;YACFA,SAAS,CAAC,CAAEN,CAAAA,QAAQO,GAAG,CAACC,UAAU,IAAIb,GAAGc,QAAQ,CAACT,QAAQO,GAAG,CAACC,UAAU,CAAA;QAC1E,EAAE,OAAOE,MAAM,CAAC;QAEhB,IAAMC,UAAUL,SAASN,QAAQO,GAAG,CAACC,UAAU,GAAG;QAElD,iFAAiF;QACjF,IAAII,UAAU;QACd,IAAI;YACFA,UAAU,CAAC,CAACjB,GAAGc,QAAQ,CAACb,KAAKiB,IAAI,CAACF,SAAS;QAC7C,EAAE,OAAOD,MAAM,CAAC;QAEhB,OAAOE,UAAU,QAAQ;IAC3B;IAEA;;GAEC,GACD,IAAIZ,QAAQC,QAAQ,KAAK,SAAS;QAChC,IAAMa,SAASrB,GAAGW,QAAQ,CAAC,oBAAoB;YAAEC,UAAU;QAAO;QAClE,OAAOS,WAAW,SAAS,QAAQ;IACrC;IAEA,+BAA+B;IAC/B,mDAAmD;IACnD,+BAA+B;IAE/B;;GAEC,GACD,IAAId,QAAQD,IAAI,KAAK,OAAO;QAC1B,OAAO;IACT;IACA,+BAA+B;IAC/B,mDAAmD;IACnD,+BAA+B;IAE/B;;GAEC,GACD,OAAO;AACT"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- var _module = /*#__PURE__*/ _interop_require_default(require("module"));
12
- var _path = /*#__PURE__*/ _interop_require_default(require("path"));
13
- var _lazycache = /*#__PURE__*/ _interop_require_default(require("lazy-cache"));
14
- var _modulerootsync = /*#__PURE__*/ _interop_require_default(require("module-root-sync"));
15
- function _interop_require_default(obj) {
16
- return obj && obj.__esModule ? obj : {
17
- default: obj
18
- };
19
- }
20
- var _require = typeof require === 'undefined' ? _module.default.createRequire(require("url").pathToFileURL(__filename).toString()) : require;
21
- var functionExec = (0, _lazycache.default)(_require)('function-exec-sync');
22
- var __dirname = _path.default.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(require("url").pathToFileURL(__filename).toString()) : __filename);
23
- var worker = _path.default.join((0, _modulerootsync.default)(__dirname), 'dist', 'cjs', 'execSyncPolyFill', 'worker.js');
24
- var cp = require('child_process');
25
- if (!cp.execSync) cp.execSync = function execSyncPolyfill(cmd, options) {
26
- return functionExec()({
27
- callbacks: true
28
- }, worker, cmd, options || {});
29
- };
30
- var _default = cp.execSync;
31
- /* 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 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/execSyncPolyfill/index.mjs"],"sourcesContent":["import Module from 'module';\nimport path from 'path';\nimport lazy from 'lazy-cache';\nimport moduleRoot from 'module-root-sync';\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst functionExec = lazy(_require)('function-exec-sync');\nconst __dirname = path.dirname(typeof __filename === 'undefined' ? url.fileURLToPath(import.meta.url) : __filename);\nconst worker = path.join(moduleRoot(__dirname), 'dist', 'cjs', 'execSyncPolyFill', 'worker.js');\n\nconst cp = require('child_process');\nif (!cp.execSync)\n cp.execSync = function execSyncPolyfill(cmd, options) {\n return functionExec()({ callbacks: true }, worker, cmd, options || {});\n };\nexport default cp.execSync;\n"],"names":["_require","require","Module","createRequire","functionExec","lazy","__dirname","path","dirname","__filename","url","fileURLToPath","worker","join","moduleRoot","cp","execSync","execSyncPolyfill","cmd","options","callbacks"],"mappings":";;;;+BAcA;;;eAAA;;;6DAdmB;2DACF;gEACA;qEACM;;;;;;AACvB,IAAMA,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAC1F,IAAMG,eAAeC,IAAAA,kBAAI,EAACL,UAAU;AACpC,IAAMM,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcC,IAAIC,aAAa,CAAC,uDAAmBF;AACxG,IAAMG,SAASL,aAAI,CAACM,IAAI,CAACC,IAAAA,uBAAU,EAACR,YAAY,QAAQ,OAAO,oBAAoB;AAEnF,IAAMS,KAAKd,QAAQ;AACnB,IAAI,CAACc,GAAGC,QAAQ,EACdD,GAAGC,QAAQ,GAAG,SAASC,iBAAiBC,GAAG,EAAEC,OAAO;IAClD,OAAOf,eAAe;QAAEgB,WAAW;IAAK,GAAGR,QAAQM,KAAKC,WAAW,CAAC;AACtE;IACF,WAAeJ,GAAGC,QAAQ"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return execCallback;
9
- }
10
- });
11
- var _child_process = require("child_process");
12
- function execCallback(cmd, options, callback) {
13
- return (0, _child_process.exec)(cmd, options, callback);
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 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/execSyncPolyfill/worker.mjs"],"sourcesContent":["import { exec } from 'child_process';\n\nexport default function execCallback(cmd, options, callback) {\n return exec(cmd, options, callback);\n}\n"],"names":["execCallback","cmd","options","callback","exec"],"mappings":";;;;+BAEA;;;eAAwBA;;;6BAFH;AAEN,SAASA,aAAaC,GAAG,EAAEC,OAAO,EAAEC,QAAQ;IACzD,OAAOC,IAAAA,mBAAI,EAACH,KAAKC,SAASC;AAC5B"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/prebuilds.js"],"sourcesContent":["const machineArch = require('../archPatched.js');\nconst osArch = 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};\n\nmodule.exports = function prebuilts(options) {\n const platform = options.platform || process.platform;\n const os = PLATFORM_OS[platform] || platform;\n const archs = [machineArch()];\n if (osArch) archs.push(osArch());\n if (platform === 'darwin' && archs[0] === '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":["machineArch","require","osArch","arch","PLATFORM_OS","win32","darwin","PLATFORM_FILES","module","exports","prebuilts","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;AAEAE,OAAOC,OAAO,GAAG,SAASC,UAAUC,OAAO;IACzC,IAAMC,WAAWD,QAAQC,QAAQ,IAAIC,QAAQD,QAAQ;IACrD,IAAME,KAAKV,WAAW,CAACQ,SAAS,IAAIA;IACpC,IAAMG,QAAQ;QAACf;KAAc;IAC7B,IAAIE,QAAQa,MAAMC,IAAI,CAACd;IACvB,IAAIU,aAAa,YAAYG,KAAK,CAAC,EAAE,KAAK,SAASA,MAAMC,IAAI,CAAC,QAAQ,WAAW;IAEjF,IAAMC,QAAQV,cAAc,CAACK,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"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/worker.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((cb) => mkdirp(options.cachePath, cb.bind(null, null)));\n versions.forEach((version) => {\n queue.defer((cb) => {\n const installPath = dest && versions.length > 1 ? path.join(dest, version) : dest;\n installVersion(version, installPath, options, (err, fullPath) => {\n if (err) return cb(err);\n results.push({ version: version.version, error: err, fullPath: fullPath });\n cb();\n });\n });\n });\n queue.await((err) => (err ? callback(err) : callback(null, results)));\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","cb","bind","forEach","version","installPath","fullPath","push","error","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,SAACC;mBAAO1B,OAAOe,QAAQT,SAAS,EAAEoB,GAAGC,IAAI,CAAC,MAAM;;QAC5DT,SAASU,OAAO,CAAC,SAACC;YAChBL,MAAMC,KAAK,CAAC,SAACC;gBACX,IAAMI,cAAchB,QAAQI,SAASC,MAAM,GAAG,IAAItB,KAAKO,IAAI,CAACU,MAAMe,WAAWf;gBAC7EZ,eAAe2B,SAASC,aAAaf,SAAS,SAACE,KAAKc;oBAClD,IAAId,KAAK,OAAOS,GAAGT;oBACnBM,QAAQS,IAAI,CAAC;wBAAEH,SAASA,QAAQA,OAAO;wBAAEI,OAAOhB;wBAAKc,UAAUA;oBAAS;oBACxEL;gBACF;YACF;QACF;QACAF,MAAMU,KAAK,CAAC,SAACjB;mBAASA,MAAMD,SAASC,OAAOD,SAAS,MAAMO;;IAC7D;AACF"}
@@ -1,2 +0,0 @@
1
- declare function _exports(): "arm64" | "x64" | "x86";
2
- export = _exports;
@@ -1,2 +0,0 @@
1
- declare const _default: typeof cp.execSync;
2
- export default _default;
@@ -1 +0,0 @@
1
- export default function execCallback(cmd: any, options: any, callback: any): import("child_process").ChildProcess;
File without changes