@modern-js/entry-generator 3.7.18 → 3.7.20
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 +111 -38
- 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 = {}) {
|
|
@@ -63499,13 +63529,13 @@ __export(src_exports, {
|
|
|
63499
63529
|
module.exports = __toCommonJS(src_exports);
|
|
63500
63530
|
var import_path6 = __toESM(require("path"));
|
|
63501
63531
|
|
|
63502
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63532
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/fs-extra.js
|
|
63503
63533
|
var import_fs_extra = __toESM(require_lib());
|
|
63504
63534
|
|
|
63505
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
63535
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
63506
63536
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
63507
63537
|
|
|
63508
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
63538
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
63509
63539
|
function fsExists(path6) {
|
|
63510
63540
|
return __async(this, null, function* () {
|
|
63511
63541
|
try {
|
|
@@ -63517,19 +63547,19 @@ function fsExists(path6) {
|
|
|
63517
63547
|
});
|
|
63518
63548
|
}
|
|
63519
63549
|
|
|
63520
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63550
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/execa.js
|
|
63521
63551
|
var import_execa = __toESM(require_execa());
|
|
63522
63552
|
|
|
63523
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63553
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/semver.js
|
|
63524
63554
|
var import_semver = __toESM(require_semver2());
|
|
63525
63555
|
|
|
63526
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.
|
|
63556
|
+
// ../../../../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
|
|
63527
63557
|
var import_ejs = __toESM(require_ejs());
|
|
63528
63558
|
function renderString(template, fullData) {
|
|
63529
63559
|
return import_ejs.default.render(template, fullData) || "";
|
|
63530
63560
|
}
|
|
63531
63561
|
|
|
63532
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.
|
|
63562
|
+
// ../../../../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
|
|
63533
63563
|
var EjsAPI = class {
|
|
63534
63564
|
renderTemplate(_0, _1) {
|
|
63535
63565
|
return __async(this, arguments, function* (templateResource, target, parameters = {}) {
|
|
@@ -63564,7 +63594,7 @@ var EjsAPI = class {
|
|
|
63564
63594
|
}
|
|
63565
63595
|
};
|
|
63566
63596
|
|
|
63567
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.6.
|
|
63597
|
+
// ../../../../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
|
|
63568
63598
|
var import_path = __toESM(require("path"));
|
|
63569
63599
|
var FsAPI = class {
|
|
63570
63600
|
renderFile(resource, target) {
|
|
@@ -63593,7 +63623,7 @@ var FsAPI = class {
|
|
|
63593
63623
|
}
|
|
63594
63624
|
};
|
|
63595
63625
|
|
|
63596
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.
|
|
63626
|
+
// ../../../../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
|
|
63597
63627
|
function canUseGit() {
|
|
63598
63628
|
return __async(this, null, function* () {
|
|
63599
63629
|
try {
|
|
@@ -63677,7 +63707,7 @@ function gitCommit(cwd, commitMessage) {
|
|
|
63677
63707
|
});
|
|
63678
63708
|
}
|
|
63679
63709
|
|
|
63680
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.
|
|
63710
|
+
// ../../../../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
|
|
63681
63711
|
var GitAPI = class {
|
|
63682
63712
|
isInGitRepo() {
|
|
63683
63713
|
return __async(this, arguments, function* (cwd = this.generatorCore.outputPath) {
|
|
@@ -63733,7 +63763,7 @@ var GitAPI = class {
|
|
|
63733
63763
|
}
|
|
63734
63764
|
};
|
|
63735
63765
|
|
|
63736
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.
|
|
63766
|
+
// ../../../../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
|
|
63737
63767
|
var import_handlebars = __toESM(require_lib2());
|
|
63738
63768
|
function renderString2(template, fullData, registers) {
|
|
63739
63769
|
const helpers = __spreadValues({}, registers === null || registers === void 0 ? void 0 : registers.helpers);
|
|
@@ -63743,7 +63773,7 @@ function renderString2(template, fullData, registers) {
|
|
|
63743
63773
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
63744
63774
|
}
|
|
63745
63775
|
|
|
63746
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.
|
|
63776
|
+
// ../../../../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
|
|
63747
63777
|
var HandlebarsAPI = class {
|
|
63748
63778
|
registerHelp(helpers) {
|
|
63749
63779
|
return __async(this, null, function* () {
|
|
@@ -63900,7 +63930,7 @@ function __generator(thisArg, body) {
|
|
|
63900
63930
|
}
|
|
63901
63931
|
}
|
|
63902
63932
|
|
|
63903
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63933
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/npm.js
|
|
63904
63934
|
var import_execa3 = __toESM(require_execa());
|
|
63905
63935
|
function canUseNvm() {
|
|
63906
63936
|
return _canUseNvm.apply(this, arguments);
|
|
@@ -63945,6 +63975,49 @@ function _canUseNvm() {
|
|
|
63945
63975
|
});
|
|
63946
63976
|
return _canUseNvm.apply(this, arguments);
|
|
63947
63977
|
}
|
|
63978
|
+
function canUseFnm() {
|
|
63979
|
+
return _canUseFnm.apply(this, arguments);
|
|
63980
|
+
}
|
|
63981
|
+
function _canUseFnm() {
|
|
63982
|
+
_canUseFnm = _async_to_generator(function() {
|
|
63983
|
+
var e;
|
|
63984
|
+
return __generator(this, function(_state) {
|
|
63985
|
+
switch (_state.label) {
|
|
63986
|
+
case 0:
|
|
63987
|
+
_state.trys.push([
|
|
63988
|
+
0,
|
|
63989
|
+
2,
|
|
63990
|
+
,
|
|
63991
|
+
3
|
|
63992
|
+
]);
|
|
63993
|
+
return [
|
|
63994
|
+
4,
|
|
63995
|
+
(0, import_execa3.default)("fnm --version", {
|
|
63996
|
+
env: process.env,
|
|
63997
|
+
shell: true
|
|
63998
|
+
})
|
|
63999
|
+
];
|
|
64000
|
+
case 1:
|
|
64001
|
+
_state.sent();
|
|
64002
|
+
return [
|
|
64003
|
+
2,
|
|
64004
|
+
true
|
|
64005
|
+
];
|
|
64006
|
+
case 2:
|
|
64007
|
+
e = _state.sent();
|
|
64008
|
+
return [
|
|
64009
|
+
2,
|
|
64010
|
+
false
|
|
64011
|
+
];
|
|
64012
|
+
case 3:
|
|
64013
|
+
return [
|
|
64014
|
+
2
|
|
64015
|
+
];
|
|
64016
|
+
}
|
|
64017
|
+
});
|
|
64018
|
+
});
|
|
64019
|
+
return _canUseFnm.apply(this, arguments);
|
|
64020
|
+
}
|
|
63948
64021
|
function canUseNpm() {
|
|
63949
64022
|
return _canUseNpm.apply(this, arguments);
|
|
63950
64023
|
}
|
|
@@ -64078,7 +64151,7 @@ function _canUsePnpm() {
|
|
|
64078
64151
|
return _canUsePnpm.apply(this, arguments);
|
|
64079
64152
|
}
|
|
64080
64153
|
|
|
64081
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.
|
|
64154
|
+
// ../../../../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
|
|
64082
64155
|
function execaWithStreamLog(command, args, options) {
|
|
64083
64156
|
const promise = (0, import_execa.default)(command, args, __spreadProps(__spreadValues({}, options), {
|
|
64084
64157
|
stdin: "inherit",
|
|
@@ -64179,7 +64252,7 @@ function pnpmInstall(_0) {
|
|
|
64179
64252
|
});
|
|
64180
64253
|
}
|
|
64181
64254
|
|
|
64182
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.
|
|
64255
|
+
// ../../../../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
|
|
64183
64256
|
var NpmAPI = class {
|
|
64184
64257
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
64185
64258
|
return npmInstall({
|
|
@@ -64207,7 +64280,7 @@ var NpmAPI = class {
|
|
|
64207
64280
|
}
|
|
64208
64281
|
};
|
|
64209
64282
|
|
|
64210
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
64283
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/lodash.js
|
|
64211
64284
|
var import_lodash = __toESM(require_lodash());
|
|
64212
64285
|
var import_lodash2 = __toESM(require_lodash2());
|
|
64213
64286
|
var import_lodash3 = __toESM(require_lodash3());
|
|
@@ -69974,10 +70047,10 @@ var Schema = (
|
|
|
69974
70047
|
}()
|
|
69975
70048
|
);
|
|
69976
70049
|
|
|
69977
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70050
|
+
// ../../../../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
|
|
69978
70051
|
var import_inquirer = __toESM(require_inquirer());
|
|
69979
70052
|
|
|
69980
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70053
|
+
// ../../../../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
|
|
69981
70054
|
function validateSchema(schema) {
|
|
69982
70055
|
const { type, properties } = schema;
|
|
69983
70056
|
if (type !== "object") {
|
|
@@ -70064,7 +70137,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
70064
70137
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
70065
70138
|
}
|
|
70066
70139
|
|
|
70067
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70140
|
+
// ../../../../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
|
|
70068
70141
|
var compileRule = (rule, scope) => {
|
|
70069
70142
|
const state = Schema.compile(rule, __spreadValues({
|
|
70070
70143
|
$self: {},
|
|
@@ -70164,7 +70237,7 @@ function prompt(_0) {
|
|
|
70164
70237
|
});
|
|
70165
70238
|
}
|
|
70166
70239
|
|
|
70167
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70240
|
+
// ../../../../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
|
|
70168
70241
|
var CLIReader = class {
|
|
70169
70242
|
getAnswers() {
|
|
70170
70243
|
return this.answers;
|
|
@@ -70192,7 +70265,7 @@ var CLIReader = class {
|
|
|
70192
70265
|
}
|
|
70193
70266
|
};
|
|
70194
70267
|
|
|
70195
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70268
|
+
// ../../../../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
|
|
70196
70269
|
var import_comment_json = __toESM(require_src2());
|
|
70197
70270
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
70198
70271
|
|
|
@@ -70259,7 +70332,7 @@ var I18n = class {
|
|
|
70259
70332
|
}
|
|
70260
70333
|
};
|
|
70261
70334
|
|
|
70262
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70335
|
+
// ../../../../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
|
|
70263
70336
|
var EN_LOCALE = {
|
|
70264
70337
|
environment: {
|
|
70265
70338
|
node_version: "The version of Node.js is too low. Please upgrade to the LTS version: https://nodejs.org/",
|
|
@@ -70286,7 +70359,7 @@ var EN_LOCALE = {
|
|
|
70286
70359
|
}
|
|
70287
70360
|
};
|
|
70288
70361
|
|
|
70289
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70362
|
+
// ../../../../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
|
|
70290
70363
|
var ZH_LOCALE = {
|
|
70291
70364
|
environment: {
|
|
70292
70365
|
node_version: "Node.js 版本太低,请升级至 LTS 版本: https://nodejs.org/",
|
|
@@ -70313,14 +70386,14 @@ var ZH_LOCALE = {
|
|
|
70313
70386
|
}
|
|
70314
70387
|
};
|
|
70315
70388
|
|
|
70316
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70389
|
+
// ../../../../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
|
|
70317
70390
|
var i18n = new I18n();
|
|
70318
70391
|
var localeKeys = i18n.init("zh", {
|
|
70319
70392
|
zh: ZH_LOCALE,
|
|
70320
70393
|
en: EN_LOCALE
|
|
70321
70394
|
});
|
|
70322
70395
|
|
|
70323
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70396
|
+
// ../../../../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
|
|
70324
70397
|
var import_path3 = __toESM(require("path"));
|
|
70325
70398
|
var NODE_MAJOR_VERSION_MAP = {
|
|
70326
70399
|
"lts/*": 18,
|
|
@@ -70355,7 +70428,7 @@ function checkUseNvm(cwd, logger) {
|
|
|
70355
70428
|
if (expectNodeVersion === import_semver.default.major(currentNodeVersion)) {
|
|
70356
70429
|
return false;
|
|
70357
70430
|
}
|
|
70358
|
-
if (!(yield canUseNvm())) {
|
|
70431
|
+
if (!((yield canUseNvm()) || (yield canUseFnm()))) {
|
|
70359
70432
|
logger.warn(`🟡 [Check nvm Error]: Current node version is not expect, you should install ${expectNodeVersion}`);
|
|
70360
70433
|
return false;
|
|
70361
70434
|
}
|
|
@@ -70371,7 +70444,7 @@ function checkUseNvm(cwd, logger) {
|
|
|
70371
70444
|
});
|
|
70372
70445
|
}
|
|
70373
70446
|
|
|
70374
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70447
|
+
// ../../../../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
|
|
70375
70448
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
70376
70449
|
for (const question of questions) {
|
|
70377
70450
|
question.default = initValue[question.name] || question.default;
|
|
@@ -70398,7 +70471,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
70398
70471
|
return questions;
|
|
70399
70472
|
}
|
|
70400
70473
|
|
|
70401
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70474
|
+
// ../../../../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
|
|
70402
70475
|
var AppAPI = class {
|
|
70403
70476
|
checkEnvironment(nodeVersion) {
|
|
70404
70477
|
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.20",
|
|
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-api-handlebars": "2.6.
|
|
29
|
-
"@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-api-handlebars": "2.6.6",
|
|
29
|
+
"@modern-js/codesmith-utils": "2.6.6",
|
|
30
30
|
"@types/jest": "^29",
|
|
31
31
|
"@types/node": "^14",
|
|
32
32
|
"jest": "^29",
|
|
33
33
|
"typescript": "^5",
|
|
34
|
-
"@modern-js/generator-
|
|
35
|
-
"@modern-js/generator-
|
|
36
|
-
"@modern-js/plugin-i18n": "2.65.
|
|
37
|
-
"@scripts/build": "2.65.
|
|
38
|
-
"@scripts/jest-config": "2.65.
|
|
34
|
+
"@modern-js/generator-common": "3.7.20",
|
|
35
|
+
"@modern-js/generator-utils": "3.7.20",
|
|
36
|
+
"@modern-js/plugin-i18n": "2.65.2",
|
|
37
|
+
"@scripts/build": "2.65.2",
|
|
38
|
+
"@scripts/jest-config": "2.65.2"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|