@modern-js/router-v5-generator 3.7.19 → 3.7.21
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 +112 -39
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -1629,9 +1629,9 @@ var require_source = __commonJS({
|
|
|
1629
1629
|
}
|
|
1630
1630
|
});
|
|
1631
1631
|
|
|
1632
|
-
// ../../../../node_modules/.pnpm/universalify@2.0.
|
|
1632
|
+
// ../../../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
|
|
1633
1633
|
var require_universalify = __commonJS({
|
|
1634
|
-
"../../../../node_modules/.pnpm/universalify@2.0.
|
|
1634
|
+
"../../../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
|
|
1635
1635
|
"use strict";
|
|
1636
1636
|
exports.fromCallback = function(fn) {
|
|
1637
1637
|
return Object.defineProperty(function(...args) {
|
|
@@ -1639,11 +1639,8 @@ var require_universalify = __commonJS({
|
|
|
1639
1639
|
fn.apply(this, args);
|
|
1640
1640
|
else {
|
|
1641
1641
|
return new Promise((resolve, reject) => {
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
...args,
|
|
1645
|
-
(err, res) => err != null ? reject(err) : resolve(res)
|
|
1646
|
-
);
|
|
1642
|
+
args.push((err, res) => err != null ? reject(err) : resolve(res));
|
|
1643
|
+
fn.apply(this, args);
|
|
1647
1644
|
});
|
|
1648
1645
|
}
|
|
1649
1646
|
}, "name", { value: fn.name });
|
|
@@ -1653,8 +1650,10 @@ var require_universalify = __commonJS({
|
|
|
1653
1650
|
const cb = args[args.length - 1];
|
|
1654
1651
|
if (typeof cb !== "function")
|
|
1655
1652
|
return fn.apply(this, args);
|
|
1656
|
-
else
|
|
1657
|
-
|
|
1653
|
+
else {
|
|
1654
|
+
args.pop();
|
|
1655
|
+
fn.apply(this, args).then((r) => cb(null, r), cb);
|
|
1656
|
+
}
|
|
1658
1657
|
}, "name", { value: fn.name });
|
|
1659
1658
|
};
|
|
1660
1659
|
}
|
|
@@ -3876,6 +3875,37 @@ var require_ensure = __commonJS({
|
|
|
3876
3875
|
}
|
|
3877
3876
|
});
|
|
3878
3877
|
|
|
3878
|
+
// ../../../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
|
|
3879
|
+
var require_universalify2 = __commonJS({
|
|
3880
|
+
"../../../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
|
|
3881
|
+
"use strict";
|
|
3882
|
+
exports.fromCallback = function(fn) {
|
|
3883
|
+
return Object.defineProperty(function(...args) {
|
|
3884
|
+
if (typeof args[args.length - 1] === "function")
|
|
3885
|
+
fn.apply(this, args);
|
|
3886
|
+
else {
|
|
3887
|
+
return new Promise((resolve, reject) => {
|
|
3888
|
+
fn.call(
|
|
3889
|
+
this,
|
|
3890
|
+
...args,
|
|
3891
|
+
(err, res) => err != null ? reject(err) : resolve(res)
|
|
3892
|
+
);
|
|
3893
|
+
});
|
|
3894
|
+
}
|
|
3895
|
+
}, "name", { value: fn.name });
|
|
3896
|
+
};
|
|
3897
|
+
exports.fromPromise = function(fn) {
|
|
3898
|
+
return Object.defineProperty(function(...args) {
|
|
3899
|
+
const cb = args[args.length - 1];
|
|
3900
|
+
if (typeof cb !== "function")
|
|
3901
|
+
return fn.apply(this, args);
|
|
3902
|
+
else
|
|
3903
|
+
fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
|
|
3904
|
+
}, "name", { value: fn.name });
|
|
3905
|
+
};
|
|
3906
|
+
}
|
|
3907
|
+
});
|
|
3908
|
+
|
|
3879
3909
|
// ../../../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
|
|
3880
3910
|
var require_utils2 = __commonJS({
|
|
3881
3911
|
"../../../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) {
|
|
@@ -3904,7 +3934,7 @@ var require_jsonfile = __commonJS({
|
|
|
3904
3934
|
} catch (_) {
|
|
3905
3935
|
_fs = require("fs");
|
|
3906
3936
|
}
|
|
3907
|
-
var universalify =
|
|
3937
|
+
var universalify = require_universalify2();
|
|
3908
3938
|
var { stringify: stringify2, stripBom } = require_utils2();
|
|
3909
3939
|
function _readFile(_0) {
|
|
3910
3940
|
return __async(this, arguments, function* (file, options = {}) {
|
|
@@ -63498,16 +63528,16 @@ __export(src_exports, {
|
|
|
63498
63528
|
module.exports = __toCommonJS(src_exports);
|
|
63499
63529
|
var import_path6 = __toESM(require("path"));
|
|
63500
63530
|
|
|
63501
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63531
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/chalk.js
|
|
63502
63532
|
var import_chalk = __toESM(require_source());
|
|
63503
63533
|
|
|
63504
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63534
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/fs-extra.js
|
|
63505
63535
|
var import_fs_extra = __toESM(require_lib());
|
|
63506
63536
|
|
|
63507
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
63537
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
63508
63538
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
63509
63539
|
|
|
63510
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
63540
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
63511
63541
|
function fsExists(path6) {
|
|
63512
63542
|
return __async(this, null, function* () {
|
|
63513
63543
|
try {
|
|
@@ -63519,19 +63549,19 @@ function fsExists(path6) {
|
|
|
63519
63549
|
});
|
|
63520
63550
|
}
|
|
63521
63551
|
|
|
63522
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63552
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/execa.js
|
|
63523
63553
|
var import_execa = __toESM(require_execa());
|
|
63524
63554
|
|
|
63525
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63555
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/semver.js
|
|
63526
63556
|
var import_semver = __toESM(require_semver2());
|
|
63527
63557
|
|
|
63528
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.
|
|
63558
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
63529
63559
|
var import_ejs = __toESM(require_ejs());
|
|
63530
63560
|
function renderString(template, fullData) {
|
|
63531
63561
|
return import_ejs.default.render(template, fullData) || "";
|
|
63532
63562
|
}
|
|
63533
63563
|
|
|
63534
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.
|
|
63564
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
63535
63565
|
var EjsAPI = class {
|
|
63536
63566
|
renderTemplate(_0, _1) {
|
|
63537
63567
|
return __async(this, arguments, function* (templateResource, target, parameters = {}) {
|
|
@@ -63566,7 +63596,7 @@ var EjsAPI = class {
|
|
|
63566
63596
|
}
|
|
63567
63597
|
};
|
|
63568
63598
|
|
|
63569
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.6.
|
|
63599
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
63570
63600
|
var import_path = __toESM(require("path"));
|
|
63571
63601
|
var FsAPI = class {
|
|
63572
63602
|
renderFile(resource, target) {
|
|
@@ -63595,7 +63625,7 @@ var FsAPI = class {
|
|
|
63595
63625
|
}
|
|
63596
63626
|
};
|
|
63597
63627
|
|
|
63598
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.
|
|
63628
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
63599
63629
|
function canUseGit() {
|
|
63600
63630
|
return __async(this, null, function* () {
|
|
63601
63631
|
try {
|
|
@@ -63679,7 +63709,7 @@ function gitCommit(cwd, commitMessage) {
|
|
|
63679
63709
|
});
|
|
63680
63710
|
}
|
|
63681
63711
|
|
|
63682
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.
|
|
63712
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
63683
63713
|
var GitAPI = class {
|
|
63684
63714
|
isInGitRepo() {
|
|
63685
63715
|
return __async(this, arguments, function* (cwd = this.generatorCore.outputPath) {
|
|
@@ -63735,7 +63765,7 @@ var GitAPI = class {
|
|
|
63735
63765
|
}
|
|
63736
63766
|
};
|
|
63737
63767
|
|
|
63738
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.
|
|
63768
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
63739
63769
|
var import_handlebars = __toESM(require_lib2());
|
|
63740
63770
|
function renderString2(template, fullData, registers) {
|
|
63741
63771
|
const helpers = __spreadValues({}, registers === null || registers === void 0 ? void 0 : registers.helpers);
|
|
@@ -63745,7 +63775,7 @@ function renderString2(template, fullData, registers) {
|
|
|
63745
63775
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
63746
63776
|
}
|
|
63747
63777
|
|
|
63748
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.
|
|
63778
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
63749
63779
|
var HandlebarsAPI = class {
|
|
63750
63780
|
registerHelp(helpers) {
|
|
63751
63781
|
return __async(this, null, function* () {
|
|
@@ -63902,7 +63932,7 @@ function __generator(thisArg, body) {
|
|
|
63902
63932
|
}
|
|
63903
63933
|
}
|
|
63904
63934
|
|
|
63905
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63935
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/npm.js
|
|
63906
63936
|
var import_execa3 = __toESM(require_execa());
|
|
63907
63937
|
function canUseNvm() {
|
|
63908
63938
|
return _canUseNvm.apply(this, arguments);
|
|
@@ -63947,6 +63977,49 @@ function _canUseNvm() {
|
|
|
63947
63977
|
});
|
|
63948
63978
|
return _canUseNvm.apply(this, arguments);
|
|
63949
63979
|
}
|
|
63980
|
+
function canUseFnm() {
|
|
63981
|
+
return _canUseFnm.apply(this, arguments);
|
|
63982
|
+
}
|
|
63983
|
+
function _canUseFnm() {
|
|
63984
|
+
_canUseFnm = _async_to_generator(function() {
|
|
63985
|
+
var e;
|
|
63986
|
+
return __generator(this, function(_state) {
|
|
63987
|
+
switch (_state.label) {
|
|
63988
|
+
case 0:
|
|
63989
|
+
_state.trys.push([
|
|
63990
|
+
0,
|
|
63991
|
+
2,
|
|
63992
|
+
,
|
|
63993
|
+
3
|
|
63994
|
+
]);
|
|
63995
|
+
return [
|
|
63996
|
+
4,
|
|
63997
|
+
(0, import_execa3.default)("fnm --version", {
|
|
63998
|
+
env: process.env,
|
|
63999
|
+
shell: true
|
|
64000
|
+
})
|
|
64001
|
+
];
|
|
64002
|
+
case 1:
|
|
64003
|
+
_state.sent();
|
|
64004
|
+
return [
|
|
64005
|
+
2,
|
|
64006
|
+
true
|
|
64007
|
+
];
|
|
64008
|
+
case 2:
|
|
64009
|
+
e = _state.sent();
|
|
64010
|
+
return [
|
|
64011
|
+
2,
|
|
64012
|
+
false
|
|
64013
|
+
];
|
|
64014
|
+
case 3:
|
|
64015
|
+
return [
|
|
64016
|
+
2
|
|
64017
|
+
];
|
|
64018
|
+
}
|
|
64019
|
+
});
|
|
64020
|
+
});
|
|
64021
|
+
return _canUseFnm.apply(this, arguments);
|
|
64022
|
+
}
|
|
63950
64023
|
function canUseNpm() {
|
|
63951
64024
|
return _canUseNpm.apply(this, arguments);
|
|
63952
64025
|
}
|
|
@@ -64080,7 +64153,7 @@ function _canUsePnpm() {
|
|
|
64080
64153
|
return _canUsePnpm.apply(this, arguments);
|
|
64081
64154
|
}
|
|
64082
64155
|
|
|
64083
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.
|
|
64156
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
64084
64157
|
function execaWithStreamLog(command, args, options) {
|
|
64085
64158
|
const promise = (0, import_execa.default)(command, args, __spreadProps(__spreadValues({}, options), {
|
|
64086
64159
|
stdin: "inherit",
|
|
@@ -64181,7 +64254,7 @@ function pnpmInstall(_0) {
|
|
|
64181
64254
|
});
|
|
64182
64255
|
}
|
|
64183
64256
|
|
|
64184
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.
|
|
64257
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.6_@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
64185
64258
|
var NpmAPI = class {
|
|
64186
64259
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
64187
64260
|
return npmInstall({
|
|
@@ -64209,7 +64282,7 @@ var NpmAPI = class {
|
|
|
64209
64282
|
}
|
|
64210
64283
|
};
|
|
64211
64284
|
|
|
64212
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
64285
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/lodash.js
|
|
64213
64286
|
var import_lodash = __toESM(require_lodash());
|
|
64214
64287
|
var import_lodash2 = __toESM(require_lodash2());
|
|
64215
64288
|
var import_lodash3 = __toESM(require_lodash3());
|
|
@@ -69976,10 +70049,10 @@ var Schema = (
|
|
|
69976
70049
|
}()
|
|
69977
70050
|
);
|
|
69978
70051
|
|
|
69979
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70052
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
69980
70053
|
var import_inquirer = __toESM(require_inquirer());
|
|
69981
70054
|
|
|
69982
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70055
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
69983
70056
|
function validateSchema(schema) {
|
|
69984
70057
|
const { type, properties } = schema;
|
|
69985
70058
|
if (type !== "object") {
|
|
@@ -70066,7 +70139,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
70066
70139
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
70067
70140
|
}
|
|
70068
70141
|
|
|
70069
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70142
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
70070
70143
|
var compileRule = (rule, scope) => {
|
|
70071
70144
|
const state = Schema.compile(rule, __spreadValues({
|
|
70072
70145
|
$self: {},
|
|
@@ -70166,7 +70239,7 @@ function prompt(_0) {
|
|
|
70166
70239
|
});
|
|
70167
70240
|
}
|
|
70168
70241
|
|
|
70169
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70242
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
70170
70243
|
var CLIReader = class {
|
|
70171
70244
|
getAnswers() {
|
|
70172
70245
|
return this.answers;
|
|
@@ -70194,7 +70267,7 @@ var CLIReader = class {
|
|
|
70194
70267
|
}
|
|
70195
70268
|
};
|
|
70196
70269
|
|
|
70197
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70270
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
70198
70271
|
var import_comment_json = __toESM(require_src2());
|
|
70199
70272
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
70200
70273
|
|
|
@@ -70261,7 +70334,7 @@ var I18n = class {
|
|
|
70261
70334
|
}
|
|
70262
70335
|
};
|
|
70263
70336
|
|
|
70264
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70337
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
70265
70338
|
var EN_LOCALE = {
|
|
70266
70339
|
environment: {
|
|
70267
70340
|
node_version: "The version of Node.js is too low. Please upgrade to the LTS version: https://nodejs.org/",
|
|
@@ -70288,7 +70361,7 @@ var EN_LOCALE = {
|
|
|
70288
70361
|
}
|
|
70289
70362
|
};
|
|
70290
70363
|
|
|
70291
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70364
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
70292
70365
|
var ZH_LOCALE = {
|
|
70293
70366
|
environment: {
|
|
70294
70367
|
node_version: "Node.js 版本太低,请升级至 LTS 版本: https://nodejs.org/",
|
|
@@ -70315,14 +70388,14 @@ var ZH_LOCALE = {
|
|
|
70315
70388
|
}
|
|
70316
70389
|
};
|
|
70317
70390
|
|
|
70318
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70391
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
70319
70392
|
var i18n = new I18n();
|
|
70320
70393
|
var localeKeys = i18n.init("zh", {
|
|
70321
70394
|
zh: ZH_LOCALE,
|
|
70322
70395
|
en: EN_LOCALE
|
|
70323
70396
|
});
|
|
70324
70397
|
|
|
70325
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70398
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
70326
70399
|
var import_path3 = __toESM(require("path"));
|
|
70327
70400
|
var NODE_MAJOR_VERSION_MAP = {
|
|
70328
70401
|
"lts/*": 18,
|
|
@@ -70357,7 +70430,7 @@ function checkUseNvm(cwd, logger) {
|
|
|
70357
70430
|
if (expectNodeVersion === import_semver.default.major(currentNodeVersion)) {
|
|
70358
70431
|
return false;
|
|
70359
70432
|
}
|
|
70360
|
-
if (!(yield canUseNvm())) {
|
|
70433
|
+
if (!((yield canUseNvm()) || (yield canUseFnm()))) {
|
|
70361
70434
|
logger.warn(`🟡 [Check nvm Error]: Current node version is not expect, you should install ${expectNodeVersion}`);
|
|
70362
70435
|
return false;
|
|
70363
70436
|
}
|
|
@@ -70373,7 +70446,7 @@ function checkUseNvm(cwd, logger) {
|
|
|
70373
70446
|
});
|
|
70374
70447
|
}
|
|
70375
70448
|
|
|
70376
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70449
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
70377
70450
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
70378
70451
|
for (const question of questions) {
|
|
70379
70452
|
question.default = initValue[question.name] || question.default;
|
|
@@ -70400,7 +70473,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
70400
70473
|
return questions;
|
|
70401
70474
|
}
|
|
70402
70475
|
|
|
70403
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70476
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.6_@modern-js+codesmith@2.6.6_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
70404
70477
|
var AppAPI = class {
|
|
70405
70478
|
checkEnvironment(nodeVersion) {
|
|
70406
70479
|
return __async(this, null, function* () {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.7.
|
|
18
|
+
"version": "3.7.21",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,19 +23,19 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@modern-js/codesmith": "2.6.
|
|
27
|
-
"@modern-js/codesmith-api-app": "2.6.
|
|
28
|
-
"@modern-js/codesmith-utils": "2.6.
|
|
26
|
+
"@modern-js/codesmith": "2.6.6",
|
|
27
|
+
"@modern-js/codesmith-api-app": "2.6.6",
|
|
28
|
+
"@modern-js/codesmith-utils": "2.6.6",
|
|
29
29
|
"@types/jest": "^29",
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/dependence-generator": "3.7.
|
|
34
|
-
"@modern-js/generator-common": "3.7.
|
|
35
|
-
"@modern-js/generator-utils": "3.7.
|
|
36
|
-
"@modern-js/plugin-i18n": "2.65.
|
|
37
|
-
"@scripts/build": "2.65.
|
|
38
|
-
"@scripts/jest-config": "2.65.
|
|
33
|
+
"@modern-js/dependence-generator": "3.7.21",
|
|
34
|
+
"@modern-js/generator-common": "3.7.21",
|
|
35
|
+
"@modern-js/generator-utils": "3.7.21",
|
|
36
|
+
"@modern-js/plugin-i18n": "2.65.3",
|
|
37
|
+
"@scripts/build": "2.65.3",
|
|
38
|
+
"@scripts/jest-config": "2.65.3"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|