node-version-use 1.5.25 → 1.5.27
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 +1 -1
- package/dist/cjs/cli.cjs.map +1 -1
- package/package.json +1 -1
package/dist/cjs/cli.cjs
CHANGED
|
@@ -62,7 +62,7 @@ var _default = function(argv, name) {
|
|
|
62
62
|
console.log('\n----------------------');
|
|
63
63
|
console.log("nvu ".concat(args.map(function(x) {
|
|
64
64
|
return x.indexOf(' ') >= 0 ? '"'.concat(x, '"') : x;
|
|
65
|
-
}).join(''), "\n").concat(errors.length ? "".concat(errors.length, " failed") : "".concat(results.length - errors.length, " succeeded")));
|
|
65
|
+
}).join(' '), "\n").concat(errors.length ? "".concat(figures.cross, " ").concat(errors.length, " failed") : "".concat(figures.tick, " ").concat(results.length - errors.length, " succeeded")));
|
|
66
66
|
}
|
|
67
67
|
(0, _exit.default)(err || errors.length ? 14 : 0);
|
|
68
68
|
});
|
package/dist/cjs/cli.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-version-use/src/cli.js"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport nvu from './index.mjs';\n\nconst figures = {\n tick: '✔',\n cross: '✘',\n};\n\nexport default (argv, name) => {\n const options = getopts(argv.slice(1), {\n alias: { range: 'r', desc: 'd', silent: 's' },\n default: { range: 'major,even' },\n boolean: ['silent', 'desc'],\n stopEarly: true,\n });\n\n // define.option('-r, --range [range]', 'range type of major, minor, or patch with filters of lts, even, odd for version string expressions', 'major,even');\n // define.option('-s, --silent', 'suppress logging', false);\n options.sort = options.desc ? -1 : 1;\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log(`Missing command. Example usage: ${name} [version expression] [command]`);\n return exit(13);\n }\n\n options.stdio = 'inherit'; // pass through stdio\n nvu(args[0], args[1], args.slice(2), options, (err, results) => {\n if (err && err.message.indexOf('ExperimentalWarning') >= 0) err = null;\n if (err) {\n results = err.results;\n console.log(err.message);\n }\n const errors = results.filter((result) => !!result.error);\n\n if (!options.silent) {\n console.log('\\n======================');\n results.forEach((res) => console.log(`${res.error ? figures.cross : figures.tick} ${res.version}${res.error ? ` Error: ${res.error.message}` : ''}`));\n console.log('\\n----------------------');\n console.log(`nvu ${args.map(x => x.indexOf(' ') >= 0 ? `\"${x}\"` : x).join('')}\\n${errors.length ? `${errors.length} failed` : `${results.length - errors.length} succeeded`}`);\n }\n
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-version-use/src/cli.js"],"sourcesContent":["import exit from 'exit';\nimport getopts from 'getopts-compat';\nimport nvu from './index.mjs';\n\nconst figures = {\n tick: '✔',\n cross: '✘',\n};\n\nexport default (argv, name) => {\n const options = getopts(argv.slice(1), {\n alias: { range: 'r', desc: 'd', silent: 's' },\n default: { range: 'major,even' },\n boolean: ['silent', 'desc'],\n stopEarly: true,\n });\n\n // define.option('-r, --range [range]', 'range type of major, minor, or patch with filters of lts, even, odd for version string expressions', 'major,even');\n // define.option('-s, --silent', 'suppress logging', false);\n options.sort = options.desc ? -1 : 1;\n\n const args = argv.slice(0, 1).concat(options._);\n if (args.length < 1) {\n console.log(`Missing command. Example usage: ${name} [version expression] [command]`);\n return exit(13);\n }\n\n options.stdio = 'inherit'; // pass through stdio\n nvu(args[0], args[1], args.slice(2), options, (err, results) => {\n if (err && err.message.indexOf('ExperimentalWarning') >= 0) err = null;\n if (err) {\n results = err.results;\n console.log(err.message);\n }\n const errors = results.filter((result) => !!result.error);\n\n if (!options.silent) {\n console.log('\\n======================');\n results.forEach((res) => console.log(`${res.error ? figures.cross : figures.tick} ${res.version}${res.error ? ` Error: ${res.error.message}` : ''}`));\n console.log('\\n----------------------');\n console.log(`nvu ${args.map(x => x.indexOf(' ') >= 0 ? `\"${x}\"` : x).join(' ')}\\n${errors.length ? `${figures.cross} ${errors.length} failed` : `${figures.tick} ${results.length - errors.length} succeeded`}`);\n }\n exit(err || errors.length ? 14 : 0);\n });\n};\n"],"names":["figures","tick","cross","argv","name","options","getopts","slice","alias","range","desc","silent","default","boolean","stopEarly","sort","args","concat","_","length","console","log","exit","stdio","nvu","err","results","message","indexOf","errors","filter","result","error","forEach","res","version","map","x","join"],"mappings":";;;;+BASA;;;eAAA;;;2DATiB;oEACG;4DACJ;;;;;;AAEhB,IAAMA,UAAU;IACdC,MAAM;IACNC,OAAO;AACT;IAEA,WAAe,SAACC,MAAMC;IACpB,IAAMC,UAAUC,IAAAA,sBAAO,EAACH,KAAKI,KAAK,CAAC,IAAI;QACrCC,OAAO;YAAEC,OAAO;YAAKC,MAAM;YAAKC,QAAQ;QAAI;QAC5CC,SAAS;YAAEH,OAAO;QAAa;QAC/BI,SAAS;YAAC;YAAU;SAAO;QAC3BC,WAAW;IACb;IAEA,4JAA4J;IAC5J,4DAA4D;IAC5DT,QAAQU,IAAI,GAAGV,QAAQK,IAAI,GAAG,CAAC,IAAI;IAEnC,IAAMM,OAAOb,KAAKI,KAAK,CAAC,GAAG,GAAGU,MAAM,CAACZ,QAAQa,CAAC;IAC9C,IAAIF,KAAKG,MAAM,GAAG,GAAG;QACnBC,QAAQC,GAAG,CAAC,AAAC,mCAAuC,OAALjB,MAAK;QACpD,OAAOkB,IAAAA,aAAI,EAAC;IACd;IAEAjB,QAAQkB,KAAK,GAAG,WAAW,qBAAqB;IAChDC,IAAAA,cAAG,EAACR,IAAI,CAAC,EAAE,EAAEA,IAAI,CAAC,EAAE,EAAEA,KAAKT,KAAK,CAAC,IAAIF,SAAS,SAACoB,KAAKC;QAClD,IAAID,OAAOA,IAAIE,OAAO,CAACC,OAAO,CAAC,0BAA0B,GAAGH,MAAM;QAClE,IAAIA,KAAK;YACPC,UAAUD,IAAIC,OAAO;YACrBN,QAAQC,GAAG,CAACI,IAAIE,OAAO;QACzB;QACA,IAAME,SAASH,QAAQI,MAAM,CAAC,SAAC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