node-install-release 1.10.17 → 1.10.19

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.cjs CHANGED
@@ -16,6 +16,7 @@ function _interop_require_default(obj) {
16
16
  default: obj
17
17
  };
18
18
  }
19
+ var ERROR_CODE = 9;
19
20
  var _default = function(argv) {
20
21
  var options = (0, _getoptscompat.default)(argv.slice(1), {
21
22
  alias: {
@@ -33,7 +34,7 @@ var _default = function(argv) {
33
34
  var args = argv.slice(0, 1).concat(options._);
34
35
  if (args.length < 1) {
35
36
  console.log('Missing command. Example usage: nir version [directory]');
36
- return (0, _exit.default)(8);
37
+ return (0, _exit.default)(ERROR_CODE);
37
38
  }
38
39
  (0, _index.default)(args[0], options, function(err, result) {
39
40
  if (!options.silent) {
@@ -42,7 +43,7 @@ var _default = function(argv) {
42
43
  else console.log("".concat(result.version, " installed in: ").concat(result.installPath));
43
44
  console.log('======================');
44
45
  }
45
- (0, _exit.default)(err ? 9 : 0);
46
+ (0, _exit.default)(err ? ERROR_CODE : 0);
46
47
  });
47
48
  };
48
49
  /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport install, { type InstallOptions } from './index';\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log('Missing command. Example usage: nir version [directory]');\n return exit(8);\n }\n install(args[0], options as InstallOptions, (err, result) => {\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? 9 : 0);\n });\n};\n"],"names":["argv","options","getopts","slice","alias","platform","arch","filename","installPath","storagePath","silent","boolean","args","concat","_","length","console","log","exit","install","err","result","message","version"],"mappings":";;;;+BAIA;;;eAAA;;;2DAJiB;oEACG;4DACyB;;;;;;IAE7C,WAAe,SAACA;IACd,IAAMC,UAAUC,IAAAA,sBAAO,EAACF,KAAKG,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,aAAa;YAAKC,aAAa;YAAKC,QAAQ;QAAI;QAClGC,SAAS;YAAC;SAAS;IACrB;IAEA,IAAMC,OAAOZ,KAAKG,KAAK,CAAC,GAAG,GAAGU,MAAM,CAACZ,QAAQa,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOC,IAAAA,aAAI,EAAC;IACd;IACAC,IAAAA,cAAO,EAACP,IAAI,CAAC,EAAE,EAAEX,SAA2B,SAACmB,KAAKC;QAChD,IAAI,CAACpB,QAAQS,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAIG,KAAKJ,QAAQC,GAAG,CAAC,AAAC,GAAmCG,OAAjCR,IAAI,CAAC,EAAE,EAAC,2BAAqC,OAAZQ,IAAIE,OAAO;iBAC/DN,QAAQC,GAAG,CAAC,AAAC,GAAkCI,OAAhCA,OAAOE,OAAO,EAAC,mBAAoC,OAAnBF,OAAOb,WAAW;YACtEQ,QAAQC,GAAG,CAAC;QACd;QACAC,IAAAA,aAAI,EAACE,MAAM,IAAI;IACjB;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport install, { type InstallOptions } from './index';\n\nconst ERROR_CODE = 9;\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log('Missing command. Example usage: nir version [directory]');\n return exit(ERROR_CODE);\n }\n install(args[0], options as InstallOptions, (err, result) => {\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? ERROR_CODE : 0);\n });\n};\n"],"names":["ERROR_CODE","argv","options","getopts","slice","alias","platform","arch","filename","installPath","storagePath","silent","boolean","args","concat","_","length","console","log","exit","install","err","result","message","version"],"mappings":";;;;+BAMA;;;eAAA;;;2DANiB;oEACG;4DACyB;;;;;;AAE7C,IAAMA,aAAa;IAEnB,WAAe,SAACC;IACd,IAAMC,UAAUC,IAAAA,sBAAO,EAACF,KAAKG,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,aAAa;YAAKC,aAAa;YAAKC,QAAQ;QAAI;QAClGC,SAAS;YAAC;SAAS;IACrB;IAEA,IAAMC,OAAOZ,KAAKG,KAAK,CAAC,GAAG,GAAGU,MAAM,CAACZ,QAAQa,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOC,IAAAA,aAAI,EAACnB;IACd;IACAoB,IAAAA,cAAO,EAACP,IAAI,CAAC,EAAE,EAAEX,SAA2B,SAACmB,KAAKC;QAChD,IAAI,CAACpB,QAAQS,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAIG,KAAKJ,QAAQC,GAAG,CAAC,AAAC,GAAmCG,OAAjCR,IAAI,CAAC,EAAE,EAAC,2BAAqC,OAAZQ,IAAIE,OAAO;iBAC/DN,QAAQC,GAAG,CAAC,AAAC,GAAkCI,OAAhCA,OAAOE,OAAO,EAAC,mBAAoC,OAAnBF,OAAOb,WAAW;YACtEQ,QAAQC,GAAG,CAAC;QACd;QACAC,IAAAA,aAAI,EAACE,MAAMrB,aAAa;IAC1B;AACF"}
package/dist/esm/cli.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import exit from 'exit';
2
2
  import getopts from 'getopts-compat';
3
3
  import install from './index.mjs';
4
+ const ERROR_CODE = 9;
4
5
  export default ((argv)=>{
5
6
  const options = getopts(argv.slice(1), {
6
7
  alias: {
@@ -18,7 +19,7 @@ export default ((argv)=>{
18
19
  const args = argv.slice(0, 1).concat(options._);
19
20
  if (args.length < 1) {
20
21
  console.log('Missing command. Example usage: nir version [directory]');
21
- return exit(8);
22
+ return exit(ERROR_CODE);
22
23
  }
23
24
  install(args[0], options, (err, result)=>{
24
25
  if (!options.silent) {
@@ -27,6 +28,6 @@ export default ((argv)=>{
27
28
  else console.log(`${result.version} installed in: ${result.installPath}`);
28
29
  console.log('======================');
29
30
  }
30
- exit(err ? 9 : 0);
31
+ exit(err ? ERROR_CODE : 0);
31
32
  });
32
33
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport install, { type InstallOptions } from './index';\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log('Missing command. Example usage: nir version [directory]');\n return exit(8);\n }\n install(args[0], options as InstallOptions, (err, result) => {\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? 9 : 0);\n });\n};\n"],"names":["exit","getopts","install","argv","options","slice","alias","platform","arch","filename","installPath","storagePath","silent","boolean","args","concat","_","length","console","log","err","result","message","version"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,aAAsC,UAAU;AAEvD,eAAe,CAAA,CAACC;IACd,MAAMC,UAAUH,QAAQE,KAAKE,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,aAAa;YAAKC,aAAa;YAAKC,QAAQ;QAAI;QAClGC,SAAS;YAAC;SAAS;IACrB;IAEA,MAAMC,OAAOX,KAAKE,KAAK,CAAC,GAAG,GAAGU,MAAM,CAACX,QAAQY,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOnB,KAAK;IACd;IACAE,QAAQY,IAAI,CAAC,EAAE,EAAEV,SAA2B,CAACgB,KAAKC;QAChD,IAAI,CAACjB,QAAQQ,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAIC,KAAKF,QAAQC,GAAG,CAAC,GAAGL,IAAI,CAAC,EAAE,CAAC,uBAAuB,EAAEM,IAAIE,OAAO,EAAE;iBACjEJ,QAAQC,GAAG,CAAC,GAAGE,OAAOE,OAAO,CAAC,eAAe,EAAEF,OAAOX,WAAW,EAAE;YACxEQ,QAAQC,GAAG,CAAC;QACd;QACAnB,KAAKoB,MAAM,IAAI;IACjB;AACF,CAAA,EAAE"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport install, { type InstallOptions } from './index';\n\nconst ERROR_CODE = 9;\n\nexport default (argv) => {\n const options = getopts(argv.slice(1), {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 's' },\n boolean: ['silent'],\n });\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log('Missing command. Example usage: nir version [directory]');\n return exit(ERROR_CODE);\n }\n install(args[0], options as InstallOptions, (err, result) => {\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? ERROR_CODE : 0);\n });\n};\n"],"names":["exit","getopts","install","ERROR_CODE","argv","options","slice","alias","platform","arch","filename","installPath","storagePath","silent","boolean","args","concat","_","length","console","log","err","result","message","version"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,aAAsC,UAAU;AAEvD,MAAMC,aAAa;AAEnB,eAAe,CAAA,CAACC;IACd,MAAMC,UAAUJ,QAAQG,KAAKE,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,aAAa;YAAKC,aAAa;YAAKC,QAAQ;QAAI;QAClGC,SAAS;YAAC;SAAS;IACrB;IAEA,MAAMC,OAAOX,KAAKE,KAAK,CAAC,GAAG,GAAGU,MAAM,CAACX,QAAQY,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC;QACZ,OAAOpB,KAAKG;IACd;IACAD,QAAQa,IAAI,CAAC,EAAE,EAAEV,SAA2B,CAACgB,KAAKC;QAChD,IAAI,CAACjB,QAAQQ,MAAM,EAAE;YACnBM,QAAQC,GAAG,CAAC;YACZ,IAAIC,KAAKF,QAAQC,GAAG,CAAC,GAAGL,IAAI,CAAC,EAAE,CAAC,uBAAuB,EAAEM,IAAIE,OAAO,EAAE;iBACjEJ,QAAQC,GAAG,CAAC,GAAGE,OAAOE,OAAO,CAAC,eAAe,EAAEF,OAAOX,WAAW,EAAE;YACxEQ,QAAQC,GAAG,CAAC;QACd;QACApB,KAAKqB,MAAMlB,aAAa;IAC1B;AACF,CAAA,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-install-release",
3
- "version": "1.10.17",
3
+ "version": "1.10.19",
4
4
  "description": "Cross-platform solution for installing releases of Node.js",
5
5
  "keywords": [
6
6
  "node",
@@ -52,7 +52,7 @@
52
52
  "lodash.keys": "^4.2.0",
53
53
  "mkdirp-classic": "^0.5.3",
54
54
  "node-filename-to-dist-paths": "^1.1.20",
55
- "node-resolve-versions": "^1.0.20",
55
+ "node-resolve-versions": "^1.0.21",
56
56
  "pump": "^3.0.2",
57
57
  "queue-cb": "^1.4.13",
58
58
  "rimraf2": "^2.8.2",