node-install-release 1.4.4 → 1.4.6

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/cli.js CHANGED
@@ -11,11 +11,39 @@ Object.defineProperty(exports, "default", {
11
11
  var _exit = /*#__PURE__*/ _interop_require_default(require("exit"));
12
12
  var _getoptscompat = /*#__PURE__*/ _interop_require_default(require("getopts-compat"));
13
13
  var _index = /*#__PURE__*/ _interop_require_default(require("./index.js"));
14
+ function _define_property(obj, key, value) {
15
+ if (key in obj) {
16
+ Object.defineProperty(obj, key, {
17
+ value: value,
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true
21
+ });
22
+ } else {
23
+ obj[key] = value;
24
+ }
25
+ return obj;
26
+ }
14
27
  function _interop_require_default(obj) {
15
28
  return obj && obj.__esModule ? obj : {
16
29
  default: obj
17
30
  };
18
31
  }
32
+ function _object_spread(target) {
33
+ for(var i = 1; i < arguments.length; i++){
34
+ var source = arguments[i] != null ? arguments[i] : {};
35
+ var ownKeys = Object.keys(source);
36
+ if (typeof Object.getOwnPropertySymbols === "function") {
37
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
38
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
39
+ }));
40
+ }
41
+ ownKeys.forEach(function(key) {
42
+ _define_property(target, key, source[key]);
43
+ });
44
+ }
45
+ return target;
46
+ }
19
47
  var _default = function(argv) {
20
48
  var options = (0, _getoptscompat.default)(argv.slice(1), {
21
49
  alias: {
@@ -39,7 +67,7 @@ var _default = function(argv) {
39
67
  return (0, _exit.default)(-1);
40
68
  }
41
69
  var installPath = args.length > 1 ? args[1] : null;
42
- (0, _index.default)(args[0], installPath, Object.assign({
70
+ (0, _index.default)(args[0], installPath, _object_spread({
43
71
  stdio: 'inherit'
44
72
  }, options), function(err, results) {
45
73
  if (err) {
@@ -1 +1 @@
1
- {"version":3,"sources":["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, Object.assign({ 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","Object","assign","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,aAAaE,OAAOC,MAAM,CAAC;QAAEC,OAAO;IAAU,GAAGrB,UAAU,SAACsB,KAAKC;QAC5E,IAAID,KAAK;YACPR,QAAQC,GAAG,CAACO,IAAIE,OAAO;YACvB,OAAOR,IAAAA,aAAI,EAACM,IAAIG,IAAI,IAAI,CAAC;QAC3B;QACA,IAAMC,SAASH,QAAQI,MAAM,CAAC,SAACC;mBAAW,CAAC,CAACA,OAAOC,KAAK;;QAExD,IAAI,CAAC7B,QAAQQ,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAK,IAAIe,QAAQ,GAAGA,QAAQP,QAAQV,MAAM,EAAEiB,QAAS;gBACnD,IAAMF,SAASL,OAAO,CAACO,MAAM;gBAC7B,IAAIF,OAAOC,KAAK,EAAEf,QAAQC,GAAG,CAAC,AAAC,GAA0Ca,OAAxCA,OAAOG,OAAO,EAAC,2BAA8C,OAArBH,OAAOC,KAAK,CAACL,OAAO;qBACxFV,QAAQC,GAAG,CAAC,AAAC,GAAkCa,OAAhCA,OAAOG,OAAO,EAAC,mBAAiC,OAAhBH,OAAOI,QAAQ;YACrE;YACAlB,QAAQC,GAAG,CAAC;QACd;QAEAC,IAAAA,aAAI,EAACU,OAAOb,MAAM,GAAG,CAAC,IAAI;IAC5B;AACF"}
1
+ {"version":3,"sources":["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"}
@@ -1,4 +1,32 @@
1
1
  "use strict";
2
+ function _define_property(obj, key, value) {
3
+ if (key in obj) {
4
+ Object.defineProperty(obj, key, {
5
+ value: value,
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true
9
+ });
10
+ } else {
11
+ obj[key] = value;
12
+ }
13
+ return obj;
14
+ }
15
+ function _object_spread(target) {
16
+ for(var i = 1; i < arguments.length; i++){
17
+ var source = arguments[i] != null ? arguments[i] : {};
18
+ var ownKeys = Object.keys(source);
19
+ if (typeof Object.getOwnPropertySymbols === "function") {
20
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
21
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
22
+ }));
23
+ }
24
+ ownKeys.forEach(function(key) {
25
+ _define_property(target, key, source[key]);
26
+ });
27
+ }
28
+ return target;
29
+ }
2
30
  var path = require('path');
3
31
  var get = require('get-remote');
4
32
  var access = require('fs-access-compat');
@@ -14,8 +42,7 @@ module.exports = function conditionalCache(endpoint, dest, options, callback) {
14
42
  if (!err) return callback(); // already exists
15
43
  ensureDestinationParent(dest, function(err) {
16
44
  if (err) return callback(err);
17
- // TODO: do I need assign?
18
- get(endpoint, Object.assign({
45
+ get(endpoint, _object_spread({
19
46
  filename: path.basename(dest),
20
47
  progress: progress,
21
48
  time: 1000
@@ -1 +1 @@
1
- {"version":3,"sources":["conditionalCache.js"],"sourcesContent":["const path = require('path');\nconst get = require('get-remote');\nconst access = require('fs-access-compat');\n\nconst progress = require('./progress');\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nmodule.exports = function conditionalCache(endpoint, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n ensureDestinationParent(dest, (err) => {\n if (err) return callback(err);\n\n // TODO: do I need assign?\n get(endpoint, Object.assign({ filename: path.basename(dest), progress: progress, time: 1000 }, options)).file(path.dirname(dest), (err) => {\n console.log('');\n callback(err);\n });\n });\n });\n};\n"],"names":["path","require","get","access","progress","ensureDestinationParent","module","exports","conditionalCache","endpoint","dest","options","callback","err","Object","assign","filename","basename","time","file","dirname","console","log"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,MAAMD,QAAQ;AACpB,IAAME,SAASF,QAAQ;AAEvB,IAAMG,WAAWH,QAAQ;AACzB,IAAMI,0BAA0BJ,QAAQ;AAExCK,OAAOC,OAAO,GAAG,SAASC,iBAAiBC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC1E,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtBR,OAAOO,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CP,wBAAwBK,MAAM,SAACG;YAC7B,IAAIA,KAAK,OAAOD,SAASC;YAEzB,0BAA0B;YAC1BX,IAAIO,UAAUK,OAAOC,MAAM,CAAC;gBAAEC,UAAUhB,KAAKiB,QAAQ,CAACP;gBAAON,UAAUA;gBAAUc,MAAM;YAAK,GAAGP,UAAUQ,IAAI,CAACnB,KAAKoB,OAAO,CAACV,OAAO,SAACG;gBACjIQ,QAAQC,GAAG,CAAC;gBACZV,SAASC;YACX;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["conditionalCache.js"],"sourcesContent":["const path = require('path');\nconst get = require('get-remote');\nconst access = require('fs-access-compat');\n\nconst progress = require('./progress');\nconst ensureDestinationParent = require('./ensureDestinationParent');\n\nmodule.exports = function conditionalCache(endpoint, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n ensureDestinationParent(dest, (err) => {\n if (err) return callback(err);\n\n get(endpoint, { filename: path.basename(dest), progress: progress, time: 1000, ...options }).file(path.dirname(dest), (err) => {\n console.log('');\n callback(err);\n });\n });\n });\n};\n"],"names":["path","require","get","access","progress","ensureDestinationParent","module","exports","conditionalCache","endpoint","dest","options","callback","err","filename","basename","time","file","dirname","console","log"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,MAAMD,QAAQ;AACpB,IAAME,SAASF,QAAQ;AAEvB,IAAMG,WAAWH,QAAQ;AACzB,IAAMI,0BAA0BJ,QAAQ;AAExCK,OAAOC,OAAO,GAAG,SAASC,iBAAiBC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IAC1E,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtBR,OAAOO,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CP,wBAAwBK,MAAM,SAACG;YAC7B,IAAIA,KAAK,OAAOD,SAASC;YAEzBX,IAAIO,UAAU;gBAAEK,UAAUd,KAAKe,QAAQ,CAACL;gBAAON,UAAUA;gBAAUY,MAAM;eAASL,UAAWM,IAAI,CAACjB,KAAKkB,OAAO,CAACR,OAAO,SAACG;gBACrHM,QAAQC,GAAG,CAAC;gBACZR,SAASC;YACX;QACF;IACF;AACF"}
@@ -1,4 +1,32 @@
1
1
  "use strict";
2
+ function _define_property(obj, key, value) {
3
+ if (key in obj) {
4
+ Object.defineProperty(obj, key, {
5
+ value: value,
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true
9
+ });
10
+ } else {
11
+ obj[key] = value;
12
+ }
13
+ return obj;
14
+ }
15
+ function _object_spread(target) {
16
+ for(var i = 1; i < arguments.length; i++){
17
+ var source = arguments[i] != null ? arguments[i] : {};
18
+ var ownKeys = Object.keys(source);
19
+ if (typeof Object.getOwnPropertySymbols === "function") {
20
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
21
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
22
+ }));
23
+ }
24
+ ownKeys.forEach(function(key) {
25
+ _define_property(target, key, source[key]);
26
+ });
27
+ }
28
+ return target;
29
+ }
2
30
  var path = require('path');
3
31
  var extract = require('fast-extract').default;
4
32
  var mkdirp = require('mkdirp-classic');
@@ -13,12 +41,11 @@ module.exports = function conditionalExtract(src, dest, options, callback) {
13
41
  access(dest, function(err) {
14
42
  if (!err) return callback(); // already exists
15
43
  mkdirp(path.dirname(dest), function() {
16
- var extractOptions = Object.assign({
44
+ extract(src, dest, _object_spread({
17
45
  strip: 1,
18
46
  progress: progress,
19
47
  time: 1000
20
- }, options);
21
- extract(src, dest, extractOptions, function(err) {
48
+ }, options), function(err) {
22
49
  console.log('');
23
50
  callback(err);
24
51
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["conditionalExtract.js"],"sourcesContent":["const path = require('path');\nconst extract = require('fast-extract').default;\nconst mkdirp = require('mkdirp-classic');\nconst access = require('fs-access-compat');\n\nconst progress = require('./progress');\n\nmodule.exports = function conditionalExtract(src, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n mkdirp(path.dirname(dest), () => {\n const extractOptions = Object.assign({ strip: 1, progress: progress, time: 1000 }, options);\n\n extract(src, dest, extractOptions, (err) => {\n console.log('');\n callback(err);\n });\n });\n });\n};\n"],"names":["path","require","extract","default","mkdirp","access","progress","module","exports","conditionalExtract","src","dest","options","callback","err","dirname","extractOptions","Object","assign","strip","time","console","log"],"mappings":";AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,UAAUD,QAAQ,gBAAgBE,OAAO;AAC/C,IAAMC,SAASH,QAAQ;AACvB,IAAMI,SAASJ,QAAQ;AAEvB,IAAMK,WAAWL,QAAQ;AAEzBM,OAAOC,OAAO,GAAG,SAASC,mBAAmBC,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvE,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtBP,OAAOM,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CT,OAAOJ,KAAKe,OAAO,CAACJ,OAAO;YACzB,IAAMK,iBAAiBC,OAAOC,MAAM,CAAC;gBAAEC,OAAO;gBAAGb,UAAUA;gBAAUc,MAAM;YAAK,GAAGR;YAEnFV,QAAQQ,KAAKC,MAAMK,gBAAgB,SAACF;gBAClCO,QAAQC,GAAG,CAAC;gBACZT,SAASC;YACX;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["conditionalExtract.js"],"sourcesContent":["const path = require('path');\nconst extract = require('fast-extract').default;\nconst mkdirp = require('mkdirp-classic');\nconst access = require('fs-access-compat');\n\nconst progress = require('./progress');\n\nmodule.exports = function conditionalExtract(src, dest, options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n\n access(dest, (err) => {\n if (!err) return callback(); // already exists\n\n mkdirp(path.dirname(dest), () => {\n extract(src, dest, { strip: 1, progress: progress, time: 1000, ...options }, (err) => {\n console.log('');\n callback(err);\n });\n });\n });\n};\n"],"names":["path","require","extract","default","mkdirp","access","progress","module","exports","conditionalExtract","src","dest","options","callback","err","dirname","strip","time","console","log"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,OAAOC,QAAQ;AACrB,IAAMC,UAAUD,QAAQ,gBAAgBE,OAAO;AAC/C,IAAMC,SAASH,QAAQ;AACvB,IAAMI,SAASJ,QAAQ;AAEvB,IAAMK,WAAWL,QAAQ;AAEzBM,OAAOC,OAAO,GAAG,SAASC,mBAAmBC,GAAG,EAAEC,IAAI,EAAEC,OAAO,EAAEC,QAAQ;IACvE,IAAI,OAAOD,YAAY,YAAY;QACjCC,WAAWD;QACXA,UAAU;IACZ;IACAA,UAAUA,WAAW,CAAC;IAEtBP,OAAOM,MAAM,SAACG;QACZ,IAAI,CAACA,KAAK,OAAOD,YAAY,iBAAiB;QAE9CT,OAAOJ,KAAKe,OAAO,CAACJ,OAAO;YACzBT,QAAQQ,KAAKC,MAAM;gBAAEK,OAAO;gBAAGV,UAAUA;gBAAUW,MAAM;eAASL,UAAW,SAACE;gBAC5EI,QAAQC,GAAG,CAAC;gBACZN,SAASC;YACX;QACF;IACF;AACF"}
package/dist/cjs/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -8,13 +9,14 @@ Object.defineProperty(exports, "default", {
8
9
  return installRelease;
9
10
  }
10
11
  });
12
+ var _pinkiepromise = /*#__PURE__*/ _interop_require_default(require("pinkie-promise"));
13
+ require("./polyfills.js");
11
14
  var _install = /*#__PURE__*/ _interop_require_default(require("./install"));
12
15
  function _interop_require_default(obj) {
13
16
  return obj && obj.__esModule ? obj : {
14
17
  default: obj
15
18
  };
16
19
  }
17
- require('./polyfills');
18
20
  function installRelease(versionDetails, dest, options, callback) {
19
21
  if (typeof options === 'function') {
20
22
  callback = options;
@@ -22,7 +24,7 @@ function installRelease(versionDetails, dest, options, callback) {
22
24
  }
23
25
  options = options || {};
24
26
  if (typeof callback === 'function') return (0, _install.default)(versionDetails, dest, options, callback);
25
- return new Promise(function(resolve, reject) {
27
+ return new _pinkiepromise.default(function(resolve, reject) {
26
28
  installRelease(versionDetails, dest, options, function installCallback(err, result) {
27
29
  err ? reject(err) : resolve(result);
28
30
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["index.mjs"],"sourcesContent":["require('./polyfills');\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","require","versionDetails","dest","options","callback","install","Promise","resolve","reject","installCallback","err","result"],"mappings":";;;;+BAGA;;;eAAwBA;;;8DAFJ;;;;;;AADpBC,QAAQ;AAGO,SAASD,eAAeE,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;QAC3BT,eAAeE,gBAAgBC,MAAMC,SAAS,SAASM,gBAAgBC,GAAG,EAAEC,MAAM;YAChFD,MAAMF,OAAOE,OAAOH,QAAQI;QAC9B;IACF;AACF"}
1
+ {"version":3,"sources":["index.mjs"],"sourcesContent":["// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>\nimport Promise from 'pinkie-promise';\nimport './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":"AAAA,sEAAsE;;;;;+BAKtE;;;eAAwBA;;;oEAJJ;QACb;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,sBAAO,CAAC,SAACC,SAASC;QAC3BR,eAAeC,gBAAgBC,MAAMC,SAAS,SAASM,gBAAgBC,GAAG,EAAEC,MAAM;YAChFD,MAAMF,OAAOE,OAAOH,QAAQI;QAC9B;IACF;AACF"}
@@ -1,4 +1,56 @@
1
1
  "use strict";
2
+ function _define_property(obj, key, value) {
3
+ if (key in obj) {
4
+ Object.defineProperty(obj, key, {
5
+ value: value,
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true
9
+ });
10
+ } else {
11
+ obj[key] = value;
12
+ }
13
+ return obj;
14
+ }
15
+ function _object_spread(target) {
16
+ for(var i = 1; i < arguments.length; i++){
17
+ var source = arguments[i] != null ? arguments[i] : {};
18
+ var ownKeys = Object.keys(source);
19
+ if (typeof Object.getOwnPropertySymbols === "function") {
20
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
21
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
22
+ }));
23
+ }
24
+ ownKeys.forEach(function(key) {
25
+ _define_property(target, key, source[key]);
26
+ });
27
+ }
28
+ return target;
29
+ }
30
+ function ownKeys(object, enumerableOnly) {
31
+ var keys = Object.keys(object);
32
+ if (Object.getOwnPropertySymbols) {
33
+ var symbols = Object.getOwnPropertySymbols(object);
34
+ if (enumerableOnly) {
35
+ symbols = symbols.filter(function(sym) {
36
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
37
+ });
38
+ }
39
+ keys.push.apply(keys, symbols);
40
+ }
41
+ return keys;
42
+ }
43
+ function _object_spread_props(target, source) {
44
+ source = source != null ? source : {};
45
+ if (Object.getOwnPropertyDescriptors) {
46
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
47
+ } else {
48
+ ownKeys(Object(source)).forEach(function(key) {
49
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
50
+ });
51
+ }
52
+ return target;
53
+ }
2
54
  var path = require('path');
3
55
  var Queue = require('queue-cb');
4
56
  var mkdirp = require('mkdirp-classic');
@@ -13,7 +65,7 @@ var DEFAULT_OPTIONS = {
13
65
  }
14
66
  };
15
67
  module.exports = function install(versionDetails, dest, options, callback) {
16
- options = Object.assign({}, DEFAULT_OPTIONS, options, {
68
+ options = _object_spread_props(_object_spread({}, DEFAULT_OPTIONS, options), {
17
69
  path: 'raw'
18
70
  });
19
71
  resolveVersions(versionDetails, options, function(err, versions) {
@@ -1 +1 @@
1
- {"version":3,"sources":["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 = Object.assign({}, 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","Object","assign","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,UAAUE,OAAOC,MAAM,CAAC,CAAC,GAAGb,iBAAiBU,SAAS;QAAElB,MAAM;IAAM;IACpEI,gBAAgBY,gBAAgBE,SAAS,SAACI,KAAKC;QAC7C,IAAID,KAAK,OAAOH,SAASG;QACzB,IAAI,CAACC,SAASC,MAAM,EAAE,OAAOL,SAAS,IAAIM,MAAM,AAAC,mCAAiE,OAA/BC,KAAKC,SAAS,CAACX;QAElG,IAAMY,UAAU,EAAE;QAClB,IAAMC,QAAQ,IAAI3B,MAAM;QACxB2B,MAAMC,KAAK,CAAC,SAACX;YACXhB,OAAOe,QAAQT,cAAc,EAAEU,SAASY,IAAI,CAAC,MAAM;QACrD;QACA,IAAK,IAAIC,QAAQ,GAAGA,QAAQT,SAASC,MAAM,EAAEQ,QAAS;YACnD,CAAA,SAACC;gBACAJ,MAAMC,KAAK,CAAC,SAACX;oBACX,IAAMe,mBAAmBjB,QAAQM,SAASC,MAAM,GAAG,IAAIxB,KAAKO,IAAI,CAACU,MAAMgB,QAAQA,OAAO,IAAIhB;oBAC1FZ,eAAe4B,SAASC,kBAAkBhB,SAAS,SAACI,KAAKa;wBACvD,IAAIb,KAAK,OAAOH,SAASG;wBACzBM,QAAQQ,IAAI,CAAC;4BAAEH,SAASA,QAAQA,OAAO;4BAAEI,OAAOf;4BAAKa,UAAUA;wBAAS;wBACxEhB;oBACF;gBACF;YACF,CAAA,EAAGI,QAAQ,CAACS,MAAM;QACpB;QACAH,MAAMS,KAAK,CAAC,SAAChB;YACXA,MAAMH,SAASG,OAAOH,SAAS,MAAMS;QACvC;IACF;AACF"}
1
+ {"version":3,"sources":["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"}
@@ -1,4 +1,32 @@
1
1
  "use strict";
2
+ function _define_property(obj, key, value) {
3
+ if (key in obj) {
4
+ Object.defineProperty(obj, key, {
5
+ value: value,
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true
9
+ });
10
+ } else {
11
+ obj[key] = value;
12
+ }
13
+ return obj;
14
+ }
15
+ function _object_spread(target) {
16
+ for(var i = 1; i < arguments.length; i++){
17
+ var source = arguments[i] != null ? arguments[i] : {};
18
+ var ownKeys = Object.keys(source);
19
+ if (typeof Object.getOwnPropertySymbols === "function") {
20
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
21
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
22
+ }));
23
+ }
24
+ ownKeys.forEach(function(key) {
25
+ _define_property(target, key, source[key]);
26
+ });
27
+ }
28
+ return target;
29
+ }
2
30
  var path = require('path');
3
31
  var access = require('fs-access-compat');
4
32
  var rimraf2 = require('rimraf2');
@@ -12,7 +40,7 @@ module.exports = function installCompressed(relativePath, dest, _record, options
12
40
  if (err) return callback(err);
13
41
  access(dest, function(err) {
14
42
  if (!err) return callback(); // already exists
15
- conditionalExtract(cachePath, dest, Object.assign({
43
+ conditionalExtract(cachePath, dest, _object_spread({
16
44
  strip: 1,
17
45
  progress: progress,
18
46
  time: 1000
@@ -1 +1 @@
1
- {"version":3,"sources":["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, Object.assign({ 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","Object","assign","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,MAAMW,OAAOC,MAAM,CAAC;gBAAEC,OAAO;gBAAGlB,UAAUA;gBAAUmB,MAAM;YAAK,GAAGZ,UAAU,SAACQ;gBACzGK,QAAQC,GAAG,CAAC;gBACZ,IAAIN,KAAK,OAAOP,SAASO;gBAEzB,gHAAgH;gBAChH,IAAMO,WAAWf,QAAQe,QAAQ,IAAIC,QAAQD,QAAQ;gBACrD,IAAME,UAAUF,aAAa,UAAUjB,OAAOX,KAAKkB,IAAI,CAACP,MAAM;gBAC9D,IAAMoB,cAAc/B,KAAKkB,IAAI,CAACY,SAAS,gBAAgB;gBACvD3B,QAAQ4B,aAAa;oBAAEC,aAAa;gBAAK,GAAG;oBAC1ClB,SAASO;gBACX;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["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"}
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- require('core-js/actual/object/assign');
3
- require('core-js/actual/promise');
4
2
  var cp = require('child_process');
5
3
  if (!cp.execSync) {
6
4
  var path = require('path');
@@ -8,7 +6,7 @@ if (!cp.execSync) {
8
6
  var functionExec = null; // break dependencies
9
7
  cp.execSync = function execSyncPolyfill(cmd, options) {
10
8
  if (!functionExec) functionExec = require('function-exec-sync');
11
- return functionExec({
9
+ return functionExec()({
12
10
  callbacks: true
13
11
  }, execCallback, cmd, options || {});
14
12
  };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["polyfills.cjs"],"sourcesContent":["const cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const execCallback = path.join(__dirname, '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;IAE1C,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"}
@@ -1 +1 @@
1
- export default function installRelease(versionDetails: any, dest: any, options: any, callback: any): void | Promise<any>;
1
+ export default function installRelease(versionDetails: any, dest: any, options: any, callback: any): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-install-release",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "description": "Cross-platform solution for installing releases of Node.js",
5
5
  "keywords": [
6
6
  "node",
@@ -33,14 +33,13 @@
33
33
  "version": "tsds version"
34
34
  },
35
35
  "dependencies": {
36
- "core-js": "^3.39.0",
37
- "cross-spawn-cb": "^1.1.3",
36
+ "cross-spawn-cb": "^1.3.0",
38
37
  "end-with": "^1.0.2",
39
38
  "exit": "^0.1.2",
40
- "fast-extract": "^1.2.5",
39
+ "fast-extract": "^1.2.8",
41
40
  "fs-access-compat": "^1.0.3",
42
- "function-exec-sync": "^1.0.3",
43
- "get-remote": "^1.2.2",
41
+ "function-exec-sync": "^1.1.1",
42
+ "get-remote": "^1.2.3",
44
43
  "getopts-compat": "^2.2.5",
45
44
  "homedir-polyfill": "^1.0.3",
46
45
  "isarray": "^2.0.5",
@@ -48,7 +47,8 @@
48
47
  "lodash.keys": "^4.2.0",
49
48
  "mkdirp-classic": "^0.5.3",
50
49
  "node-filename-to-dist-paths": "^0.2.5",
51
- "node-resolve-versions": "^1.0.0",
50
+ "node-resolve-versions": "^1.0.1",
51
+ "pinkie-promise": "^2.0.1",
52
52
  "pump": "^3.0.2",
53
53
  "queue-cb": "^1.4.4",
54
54
  "rimraf2": "^2.8.2",
@@ -62,9 +62,10 @@
62
62
  "depcheck": "^1.4.7",
63
63
  "fs-access-sync-compat": "^1.0.2",
64
64
  "is-version": "^0.2.1",
65
- "node-version-utils": "^1.0.2",
66
- "ts-dev-stack": "^1.4.0"
65
+ "node-version-utils": "^1.0.3",
66
+ "ts-dev-stack": "^1.5.3"
67
67
  },
68
+ "packageManager": "npm@11.0.0+sha512.11dff29565d2297c74e7c594a9762581bde969f0aa5cbe6f5b3644bf008a16c065ece61094d9ffbb81125be38df8e1ba43eb8244b3d30c61eb797e9a2440e3ec",
68
69
  "engines": {
69
70
  "node": ">=0.8"
70
71
  },
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["require('core-js/actual/object/assign');\nrequire('core-js/actual/promise');\n\nconst cp = require('child_process');\nif (!cp.execSync) {\n const path = require('path');\n const execCallback = path.join(__dirname, '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\n return functionExec({ callbacks: true }, execCallback, cmd, options || {});\n };\n}\n"],"names":["require","cp","execSync","path","execCallback","join","__dirname","functionExec","execSyncPolyfill","cmd","options","callbacks"],"mappings":";AAAAA,QAAQ;AACRA,QAAQ;AAER,IAAMC,KAAKD,QAAQ;AACnB,IAAI,CAACC,GAAGC,QAAQ,EAAE;IAChB,IAAMC,OAAOH,QAAQ;IACrB,IAAMI,eAAeD,KAAKE,IAAI,CAACC,WAAW;IAE1C,IAAIC,eAAe,MAAM,qBAAqB;IAC9CN,GAAGC,QAAQ,GAAG,SAASM,iBAAiBC,GAAG,EAAEC,OAAO;QAClD,IAAI,CAACH,cAAcA,eAAeP,QAAQ;QAE1C,OAAOO,aAAa;YAAEI,WAAW;QAAK,GAAGP,cAAcK,KAAKC,WAAW,CAAC;IAC1E;AACF"}
File without changes