cmyr-template-cli 1.12.1 → 1.12.2
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/index.js +1 -1
- package/dist/plopfile.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
|
13
13
|
|
|
14
14
|
const program = new commander.Command('ct')
|
|
15
15
|
.description('草梅项目创建器');
|
|
16
|
-
program.version("1.12.
|
|
16
|
+
program.version("1.12.1" , '-v, --version');
|
|
17
17
|
const args = process.argv.slice(2);
|
|
18
18
|
if (args.length === 0) {
|
|
19
19
|
args.push('create');
|
package/dist/plopfile.js
CHANGED
|
@@ -712,16 +712,16 @@ async function getFastNodeUrl() {
|
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
async function getLtsNodeVersion() {
|
|
715
|
-
var _a, _b;
|
|
715
|
+
var _a, _b, _c;
|
|
716
716
|
try {
|
|
717
717
|
const url = await getFastNodeUrl();
|
|
718
718
|
if (!url) {
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
721
721
|
const html = (await axios__default["default"].get(url)).data;
|
|
722
|
-
const version = (_a = html.match(/<strong>(.*)<\/strong>/)) === null || _a === void 0 ? void 0 : _a[1];
|
|
722
|
+
const version = (_b = (_a = html.match(/<strong>(.*)<\/strong>/)) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.trim();
|
|
723
723
|
console.log(`当前 Node.js 的 lts 版本为 ${version}`);
|
|
724
|
-
return (
|
|
724
|
+
return (_c = version === null || version === void 0 ? void 0 : version.split('.')) === null || _c === void 0 ? void 0 : _c[0];
|
|
725
725
|
}
|
|
726
726
|
catch (error) {
|
|
727
727
|
console.error(error);
|