@modern-js/monorepo-generator 2.4.4 → 2.4.5
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 +125 -62
- package/package.json +11 -11
package/dist/index.js
CHANGED
@@ -18898,7 +18898,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
18898
18898
|
}
|
18899
18899
|
function baseFunctions(object, props) {
|
18900
18900
|
return arrayFilter(props, function(key) {
|
18901
|
-
return
|
18901
|
+
return isFunction2(object[key]);
|
18902
18902
|
});
|
18903
18903
|
}
|
18904
18904
|
function baseGet(object, path2) {
|
@@ -19061,7 +19061,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
19061
19061
|
if (!isObject5(value) || isMasked(value)) {
|
19062
19062
|
return false;
|
19063
19063
|
}
|
19064
|
-
var pattern =
|
19064
|
+
var pattern = isFunction2(value) ? reIsNative : reIsHostCtor;
|
19065
19065
|
return pattern.test(toSource(value));
|
19066
19066
|
}
|
19067
19067
|
function baseIsRegExp(value) {
|
@@ -19183,7 +19183,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
19183
19183
|
newValue = objValue;
|
19184
19184
|
if (isArguments(objValue)) {
|
19185
19185
|
newValue = toPlainObject(objValue);
|
19186
|
-
} else if (!isObject5(objValue) ||
|
19186
|
+
} else if (!isObject5(objValue) || isFunction2(objValue)) {
|
19187
19187
|
newValue = initCloneObject(srcValue);
|
19188
19188
|
}
|
19189
19189
|
} else {
|
@@ -20485,7 +20485,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
20485
20485
|
function isMasked(func) {
|
20486
20486
|
return !!maskSrcKey && maskSrcKey in func;
|
20487
20487
|
}
|
20488
|
-
var isMaskable = coreJsData ?
|
20488
|
+
var isMaskable = coreJsData ? isFunction2 : stubFalse;
|
20489
20489
|
function isPrototype(value) {
|
20490
20490
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
20491
20491
|
return value === proto;
|
@@ -21598,7 +21598,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
21598
21598
|
var isArray4 = Array2.isArray;
|
21599
21599
|
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
|
21600
21600
|
function isArrayLike(value) {
|
21601
|
-
return value != null && isLength(value.length) && !
|
21601
|
+
return value != null && isLength(value.length) && !isFunction2(value);
|
21602
21602
|
}
|
21603
21603
|
function isArrayLikeObject(value) {
|
21604
21604
|
return isObjectLike(value) && isArrayLike(value);
|
@@ -21650,7 +21650,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
21650
21650
|
function isFinite2(value) {
|
21651
21651
|
return typeof value == "number" && nativeIsFinite(value);
|
21652
21652
|
}
|
21653
|
-
function
|
21653
|
+
function isFunction2(value) {
|
21654
21654
|
if (!isObject5(value)) {
|
21655
21655
|
return false;
|
21656
21656
|
}
|
@@ -21973,7 +21973,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
21973
21973
|
index = length;
|
21974
21974
|
value = defaultValue;
|
21975
21975
|
}
|
21976
|
-
object =
|
21976
|
+
object = isFunction2(value) ? value.call(object) : value;
|
21977
21977
|
}
|
21978
21978
|
return object;
|
21979
21979
|
}
|
@@ -21994,7 +21994,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
21994
21994
|
if (isArrLike) {
|
21995
21995
|
accumulator = isArr4 ? new Ctor() : [];
|
21996
21996
|
} else if (isObject5(object)) {
|
21997
|
-
accumulator =
|
21997
|
+
accumulator = isFunction2(Ctor) ? baseCreate(getPrototype(object)) : {};
|
21998
21998
|
} else {
|
21999
21999
|
accumulator = {};
|
22000
22000
|
}
|
@@ -22411,7 +22411,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
22411
22411
|
object = this;
|
22412
22412
|
methodNames = baseFunctions(source, keys(source));
|
22413
22413
|
}
|
22414
|
-
var chain2 = !(isObject5(options3) && "chain" in options3) || !!options3.chain, isFunc =
|
22414
|
+
var chain2 = !(isObject5(options3) && "chain" in options3) || !!options3.chain, isFunc = isFunction2(object);
|
22415
22415
|
arrayEach(methodNames, function(methodName) {
|
22416
22416
|
var func = source[methodName];
|
22417
22417
|
object[methodName] = func;
|
@@ -22746,7 +22746,7 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
22746
22746
|
lodash.isEqualWith = isEqualWith;
|
22747
22747
|
lodash.isError = isError;
|
22748
22748
|
lodash.isFinite = isFinite2;
|
22749
|
-
lodash.isFunction =
|
22749
|
+
lodash.isFunction = isFunction2;
|
22750
22750
|
lodash.isInteger = isInteger;
|
22751
22751
|
lodash.isLength = isLength;
|
22752
22752
|
lodash.isMap = isMap2;
|
@@ -34940,10 +34940,10 @@ var require_type = __commonJSMin((exports) => {
|
|
34940
34940
|
return Array.isArray(obj);
|
34941
34941
|
}
|
34942
34942
|
exports.isArray = isArray4;
|
34943
|
-
function
|
34943
|
+
function isFunction2(func) {
|
34944
34944
|
return typeof func === "function";
|
34945
34945
|
}
|
34946
|
-
exports.isFunction =
|
34946
|
+
exports.isFunction = isFunction2;
|
34947
34947
|
function isObject5(obj) {
|
34948
34948
|
return obj !== null && typeof obj === "object";
|
34949
34949
|
}
|
@@ -36939,11 +36939,11 @@ var require_utils = __commonJSMin((exports, module2) => {
|
|
36939
36939
|
function isBlob(val) {
|
36940
36940
|
return toString5.call(val) === "[object Blob]";
|
36941
36941
|
}
|
36942
|
-
function
|
36942
|
+
function isFunction2(val) {
|
36943
36943
|
return toString5.call(val) === "[object Function]";
|
36944
36944
|
}
|
36945
36945
|
function isStream(val) {
|
36946
|
-
return isObject5(val) &&
|
36946
|
+
return isObject5(val) && isFunction2(val.pipe);
|
36947
36947
|
}
|
36948
36948
|
function isURLSearchParams(val) {
|
36949
36949
|
return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
|
@@ -37024,7 +37024,7 @@ var require_utils = __commonJSMin((exports, module2) => {
|
|
37024
37024
|
isDate,
|
37025
37025
|
isFile,
|
37026
37026
|
isBlob,
|
37027
|
-
isFunction,
|
37027
|
+
isFunction: isFunction2,
|
37028
37028
|
isStream,
|
37029
37029
|
isURLSearchParams,
|
37030
37030
|
isStandardBrowserEnv,
|
@@ -50903,10 +50903,10 @@ var require_util = __commonJSMin((exports) => {
|
|
50903
50903
|
return objectToString(e) === "[object Error]" || e instanceof Error;
|
50904
50904
|
}
|
50905
50905
|
exports.isError = isError;
|
50906
|
-
function
|
50906
|
+
function isFunction2(arg) {
|
50907
50907
|
return typeof arg === "function";
|
50908
50908
|
}
|
50909
|
-
exports.isFunction =
|
50909
|
+
exports.isFunction = isFunction2;
|
50910
50910
|
function isPrimitive(arg) {
|
50911
50911
|
return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg === "undefined";
|
50912
50912
|
}
|
@@ -52184,7 +52184,7 @@ var require_stringify = __commonJSMin((exports, module2) => {
|
|
52184
52184
|
var {
|
52185
52185
|
isArray: isArray4,
|
52186
52186
|
isObject: isObject5,
|
52187
|
-
isFunction,
|
52187
|
+
isFunction: isFunction2,
|
52188
52188
|
isNumber,
|
52189
52189
|
isString: isString3
|
52190
52190
|
} = require_util();
|
@@ -52311,10 +52311,10 @@ var require_stringify = __commonJSMin((exports, module2) => {
|
|
52311
52311
|
};
|
52312
52312
|
function stringify(key, holder, gap) {
|
52313
52313
|
let value = holder[key];
|
52314
|
-
if (isObject5(value) &&
|
52314
|
+
if (isObject5(value) && isFunction2(value.toJSON)) {
|
52315
52315
|
value = value.toJSON(key);
|
52316
52316
|
}
|
52317
|
-
if (
|
52317
|
+
if (isFunction2(replacer)) {
|
52318
52318
|
value = replacer.call(holder, key, value);
|
52319
52319
|
}
|
52320
52320
|
switch (typeof value) {
|
@@ -52349,7 +52349,7 @@ var require_stringify = __commonJSMin((exports, module2) => {
|
|
52349
52349
|
if (!indent_) {
|
52350
52350
|
return JSON.stringify(value, replacer_);
|
52351
52351
|
}
|
52352
|
-
if (!
|
52352
|
+
if (!isFunction2(replacer_) && !isArray4(replacer_)) {
|
52353
52353
|
replacer_ = null;
|
52354
52354
|
}
|
52355
52355
|
replacer = replacer_;
|
@@ -52472,13 +52472,20 @@ var require_install = __commonJSMin((exports) => {
|
|
52472
52472
|
}));
|
52473
52473
|
return promise;
|
52474
52474
|
}
|
52475
|
-
async function npmInstall(
|
52475
|
+
async function npmInstall({
|
52476
|
+
cwd,
|
52477
|
+
registryUrl,
|
52478
|
+
ignoreScripts
|
52479
|
+
}) {
|
52476
52480
|
const canUse = await (0, _env.canUseNpm)();
|
52477
52481
|
if (canUse) {
|
52478
52482
|
const params = ["install"];
|
52479
52483
|
if (registryUrl) {
|
52480
52484
|
params.push(`--registry=${registryUrl}`);
|
52481
52485
|
}
|
52486
|
+
if (ignoreScripts) {
|
52487
|
+
params.push("--ignore-scripts");
|
52488
|
+
}
|
52482
52489
|
return execaWithStreamLog("npm", params, {
|
52483
52490
|
cwd,
|
52484
52491
|
env: process.env
|
@@ -52486,13 +52493,20 @@ var require_install = __commonJSMin((exports) => {
|
|
52486
52493
|
}
|
52487
52494
|
throw new Error("please install npm first");
|
52488
52495
|
}
|
52489
|
-
async function yarnInstall(
|
52496
|
+
async function yarnInstall({
|
52497
|
+
cwd,
|
52498
|
+
registryUrl,
|
52499
|
+
ignoreScripts
|
52500
|
+
}) {
|
52490
52501
|
const canUse = await (0, _env.canUseYarn)();
|
52491
52502
|
if (canUse) {
|
52492
52503
|
const params = ["install"];
|
52493
52504
|
if (registryUrl) {
|
52494
52505
|
params.push(`--registry=${registryUrl}`);
|
52495
52506
|
}
|
52507
|
+
if (ignoreScripts) {
|
52508
|
+
params.push("--ignore-scripts");
|
52509
|
+
}
|
52496
52510
|
return execaWithStreamLog("yarn", params, {
|
52497
52511
|
cwd,
|
52498
52512
|
env: process.env
|
@@ -52500,13 +52514,20 @@ var require_install = __commonJSMin((exports) => {
|
|
52500
52514
|
}
|
52501
52515
|
throw new Error("please install yarn first");
|
52502
52516
|
}
|
52503
|
-
async function pnpmInstall(
|
52517
|
+
async function pnpmInstall({
|
52518
|
+
cwd,
|
52519
|
+
registryUrl,
|
52520
|
+
ignoreScripts
|
52521
|
+
}) {
|
52504
52522
|
const canUse = await (0, _env.canUsePnpm)();
|
52505
52523
|
if (canUse) {
|
52506
52524
|
const params = ["install"];
|
52507
52525
|
if (registryUrl) {
|
52508
52526
|
params.push(`--registry=${registryUrl}`);
|
52509
52527
|
}
|
52528
|
+
if (ignoreScripts) {
|
52529
|
+
params.push("--ignore-scripts");
|
52530
|
+
}
|
52510
52531
|
return execaWithStreamLog("pnpm", params, {
|
52511
52532
|
cwd,
|
52512
52533
|
env: process.env
|
@@ -52602,14 +52623,38 @@ var require_node2 = __commonJSMin((exports) => {
|
|
52602
52623
|
_defineProperty2(this, "generatorCore", void 0);
|
52603
52624
|
this.generatorCore = generatorCore;
|
52604
52625
|
}
|
52605
|
-
npmInstall(
|
52606
|
-
|
52626
|
+
npmInstall({
|
52627
|
+
cwd,
|
52628
|
+
registryUrl,
|
52629
|
+
ignoreScripts
|
52630
|
+
}) {
|
52631
|
+
return (0, _utils.npmInstall)({
|
52632
|
+
cwd: cwd || this.generatorCore.outputPath,
|
52633
|
+
registryUrl,
|
52634
|
+
ignoreScripts
|
52635
|
+
});
|
52607
52636
|
}
|
52608
|
-
yarnInstall(
|
52609
|
-
|
52637
|
+
yarnInstall({
|
52638
|
+
cwd,
|
52639
|
+
registryUrl,
|
52640
|
+
ignoreScripts
|
52641
|
+
}) {
|
52642
|
+
return (0, _utils.yarnInstall)({
|
52643
|
+
cwd: cwd || this.generatorCore.outputPath,
|
52644
|
+
registryUrl,
|
52645
|
+
ignoreScripts
|
52646
|
+
});
|
52610
52647
|
}
|
52611
|
-
pnpmInstall(
|
52612
|
-
|
52648
|
+
pnpmInstall({
|
52649
|
+
cwd,
|
52650
|
+
registryUrl,
|
52651
|
+
ignoreScripts
|
52652
|
+
}) {
|
52653
|
+
return (0, _utils.pnpmInstall)({
|
52654
|
+
cwd: cwd || this.generatorCore.outputPath,
|
52655
|
+
registryUrl,
|
52656
|
+
ignoreScripts
|
52657
|
+
});
|
52613
52658
|
}
|
52614
52659
|
};
|
52615
52660
|
exports.NpmAPI = NpmAPI;
|
@@ -52784,15 +52829,15 @@ var require_utils5 = __commonJSMin((exports) => {
|
|
52784
52829
|
}
|
52785
52830
|
var toString5 = Object.prototype.toString;
|
52786
52831
|
exports.toString = toString5;
|
52787
|
-
var
|
52832
|
+
var isFunction2 = function isFunction3(value) {
|
52788
52833
|
return typeof value === "function";
|
52789
52834
|
};
|
52790
|
-
if (
|
52791
|
-
exports.isFunction =
|
52835
|
+
if (isFunction2(/x/)) {
|
52836
|
+
exports.isFunction = isFunction2 = function(value) {
|
52792
52837
|
return typeof value === "function" && toString5.call(value) === "[object Function]";
|
52793
52838
|
};
|
52794
52839
|
}
|
52795
|
-
exports.isFunction =
|
52840
|
+
exports.isFunction = isFunction2;
|
52796
52841
|
var isArray4 = Array.isArray || function(value) {
|
52797
52842
|
return value && typeof value === "object" ? toString5.call(value) === "[object Array]" : false;
|
52798
52843
|
};
|
@@ -60859,14 +60904,14 @@ var require_isFunction = __commonJSMin((exports, module2) => {
|
|
60859
60904
|
var funcTag = "[object Function]";
|
60860
60905
|
var genTag = "[object GeneratorFunction]";
|
60861
60906
|
var proxyTag = "[object Proxy]";
|
60862
|
-
function
|
60907
|
+
function isFunction2(value) {
|
60863
60908
|
if (!isObject5(value)) {
|
60864
60909
|
return false;
|
60865
60910
|
}
|
60866
60911
|
var tag = baseGetTag(value);
|
60867
60912
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
60868
60913
|
}
|
60869
|
-
module2.exports =
|
60914
|
+
module2.exports = isFunction2;
|
60870
60915
|
});
|
60871
60916
|
var require_coreJsData = __commonJSMin((exports, module2) => {
|
60872
60917
|
var root = require_root();
|
@@ -60903,7 +60948,7 @@ var require_toSource = __commonJSMin((exports, module2) => {
|
|
60903
60948
|
module2.exports = toSource;
|
60904
60949
|
});
|
60905
60950
|
var require_baseIsNative = __commonJSMin((exports, module2) => {
|
60906
|
-
var
|
60951
|
+
var isFunction2 = require_isFunction();
|
60907
60952
|
var isMasked = require_isMasked();
|
60908
60953
|
var isObject5 = require_isObject();
|
60909
60954
|
var toSource = require_toSource();
|
@@ -60918,7 +60963,7 @@ var require_baseIsNative = __commonJSMin((exports, module2) => {
|
|
60918
60963
|
if (!isObject5(value) || isMasked(value)) {
|
60919
60964
|
return false;
|
60920
60965
|
}
|
60921
|
-
var pattern =
|
60966
|
+
var pattern = isFunction2(value) ? reIsNative : reIsHostCtor;
|
60922
60967
|
return pattern.test(toSource(value));
|
60923
60968
|
}
|
60924
60969
|
module2.exports = baseIsNative;
|
@@ -61117,10 +61162,10 @@ var require_isLength = __commonJSMin((exports, module2) => {
|
|
61117
61162
|
module2.exports = isLength;
|
61118
61163
|
});
|
61119
61164
|
var require_isArrayLike = __commonJSMin((exports, module2) => {
|
61120
|
-
var
|
61165
|
+
var isFunction2 = require_isFunction();
|
61121
61166
|
var isLength = require_isLength();
|
61122
61167
|
function isArrayLike(value) {
|
61123
|
-
return value != null && isLength(value.length) && !
|
61168
|
+
return value != null && isLength(value.length) && !isFunction2(value);
|
61124
61169
|
}
|
61125
61170
|
module2.exports = isArrayLike;
|
61126
61171
|
});
|
@@ -63033,10 +63078,10 @@ var require_isFunction2 = __commonJSMin((exports) => {
|
|
63033
63078
|
"use strict";
|
63034
63079
|
Object.defineProperty(exports, "__esModule", { value: true });
|
63035
63080
|
exports.isFunction = void 0;
|
63036
|
-
function
|
63081
|
+
function isFunction2(value) {
|
63037
63082
|
return typeof value === "function";
|
63038
63083
|
}
|
63039
|
-
exports.isFunction =
|
63084
|
+
exports.isFunction = isFunction2;
|
63040
63085
|
});
|
63041
63086
|
var require_createErrorClass = __commonJSMin((exports) => {
|
63042
63087
|
"use strict";
|
@@ -97265,7 +97310,7 @@ var require_baseMergeDeep = __commonJSMin((exports, module2) => {
|
|
97265
97310
|
var isArray4 = require_isArray();
|
97266
97311
|
var isArrayLikeObject = require_isArrayLikeObject();
|
97267
97312
|
var isBuffer = require_isBuffer();
|
97268
|
-
var
|
97313
|
+
var isFunction2 = require_isFunction();
|
97269
97314
|
var isObject5 = require_isObject();
|
97270
97315
|
var isPlainObject = require_isPlainObject();
|
97271
97316
|
var isTypedArray = require_isTypedArray();
|
@@ -97300,7 +97345,7 @@ var require_baseMergeDeep = __commonJSMin((exports, module2) => {
|
|
97300
97345
|
newValue = objValue;
|
97301
97346
|
if (isArguments(objValue)) {
|
97302
97347
|
newValue = toPlainObject(objValue);
|
97303
|
-
} else if (!isObject5(objValue) ||
|
97348
|
+
} else if (!isObject5(objValue) || isFunction2(objValue)) {
|
97304
97349
|
newValue = initCloneObject(srcValue);
|
97305
97350
|
}
|
97306
97351
|
} else {
|
@@ -111260,7 +111305,7 @@ function getQuestionFromSchema(schema) {
|
|
111260
111305
|
}
|
111261
111306
|
var questions = fields.map(function(field) {
|
111262
111307
|
var _field = properties[field], type = _field.type, title = _field.title, defaultValue = _field["default"], items5 = _field["enum"], fieldValidate = _field["x-validate"], extra = _objectWithoutProperties(_field, _excluded2);
|
111263
|
-
if (type === "void") {
|
111308
|
+
if (type === "void" || type === "object") {
|
111264
111309
|
return getQuestionFromSchema(properties[field], configValue, validateMap, initValue);
|
111265
111310
|
}
|
111266
111311
|
if (type !== "string" && type !== "number") {
|
@@ -111278,7 +111323,9 @@ function getQuestionFromSchema(schema) {
|
|
111278
111323
|
break;
|
111279
111324
|
}
|
111280
111325
|
_context.next = 3;
|
111281
|
-
return validate(input, fieldValidate)
|
111326
|
+
return validate(input, (0, import_lodash.isFunction)(fieldValidate) ? {
|
111327
|
+
validator: fieldValidate
|
111328
|
+
} : fieldValidate);
|
111282
111329
|
case 3:
|
111283
111330
|
_result = _context.sent;
|
111284
111331
|
if (!((_result$error = _result.error) !== null && _result$error !== void 0 && _result$error.length)) {
|
@@ -111701,10 +111748,12 @@ var init_inquirer = __esmMin(() => {
|
|
111701
111748
|
});
|
111702
111749
|
var treeshaking_exports2 = {};
|
111703
111750
|
__export2(treeshaking_exports2, {
|
111704
|
-
CLIReader: () => CLIReader
|
111751
|
+
CLIReader: () => CLIReader,
|
111752
|
+
validate: () => validate
|
111705
111753
|
});
|
111706
111754
|
var init_treeshaking2 = __esmMin(() => {
|
111707
111755
|
init_inquirer();
|
111756
|
+
init_esm4();
|
111708
111757
|
});
|
111709
111758
|
function getObjKeyMap(obj) {
|
111710
111759
|
var prefix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
@@ -112388,7 +112437,7 @@ var require_node8 = __commonJSMin((exports) => {
|
|
112388
112437
|
}
|
112389
112438
|
return true;
|
112390
112439
|
}
|
112391
|
-
async runInstall(command) {
|
112440
|
+
async runInstall(command, options3) {
|
112392
112441
|
const {
|
112393
112442
|
config: {
|
112394
112443
|
packageManager,
|
@@ -112402,11 +112451,11 @@ var require_node8 = __commonJSMin((exports) => {
|
|
112402
112451
|
if (command) {
|
112403
112452
|
intallPromise = (0, _utils.execa)(command);
|
112404
112453
|
} else if (packageManager === "pnpm") {
|
112405
|
-
intallPromise = this.npmApi.pnpmInstall();
|
112454
|
+
intallPromise = this.npmApi.pnpmInstall(options3 || {});
|
112406
112455
|
} else if (packageManager === "yarn") {
|
112407
|
-
intallPromise = this.npmApi.yarnInstall();
|
112456
|
+
intallPromise = this.npmApi.yarnInstall(options3 || {});
|
112408
112457
|
} else {
|
112409
|
-
intallPromise = this.npmApi.npmInstall();
|
112458
|
+
intallPromise = this.npmApi.npmInstall(options3 || {});
|
112410
112459
|
}
|
112411
112460
|
try {
|
112412
112461
|
await intallPromise;
|
@@ -112499,6 +112548,21 @@ var require_node8 = __commonJSMin((exports) => {
|
|
112499
112548
|
throw new Error("run sub generator failed");
|
112500
112549
|
}
|
112501
112550
|
}
|
112551
|
+
mergeAnswers(answers, configValue) {
|
112552
|
+
const inputData = (0, _lodash.merge)(answers, configValue);
|
112553
|
+
this.generatorContext.config = (0, _lodash.merge)(this.generatorContext.config, inputData);
|
112554
|
+
return inputData;
|
112555
|
+
}
|
112556
|
+
async getInputBySchemaFunc(schemaFunc, configValue = {}, validateMap = {}, initValue = {}) {
|
112557
|
+
const reader = new _codesmithFormily.CLIReader({
|
112558
|
+
schema: schemaFunc(configValue),
|
112559
|
+
validateMap,
|
112560
|
+
initValue
|
112561
|
+
});
|
112562
|
+
reader.setAnswers(configValue);
|
112563
|
+
const answers = await reader.start();
|
112564
|
+
return this.mergeAnswers(answers, configValue);
|
112565
|
+
}
|
112502
112566
|
async getInputBySchema(schema, configValue = {}, validateMap = {}, initValue = {}, type = "easy-form") {
|
112503
112567
|
if (type === "easy-form") {
|
112504
112568
|
const reader = new _easyFormCli.CliReader({
|
@@ -112509,9 +112573,7 @@ var require_node8 = __commonJSMin((exports) => {
|
|
112509
112573
|
return new Promise((resolve, reject) => {
|
112510
112574
|
reader.startQuestion({
|
112511
112575
|
onComplete: (answers) => {
|
112512
|
-
|
112513
|
-
this.generatorContext.config = (0, _lodash.merge)(this.generatorContext.config, inputData);
|
112514
|
-
resolve(inputData);
|
112576
|
+
resolve(this.mergeAnswers(answers, configValue));
|
112515
112577
|
},
|
112516
112578
|
onError: (error) => {
|
112517
112579
|
reject(error);
|
@@ -112525,10 +112587,11 @@ var require_node8 = __commonJSMin((exports) => {
|
|
112525
112587
|
initValue
|
112526
112588
|
});
|
112527
112589
|
reader.setAnswers(configValue);
|
112528
|
-
|
112590
|
+
const answers = await reader.start();
|
112591
|
+
return this.mergeAnswers(answers, configValue);
|
112529
112592
|
} else {
|
112530
|
-
const
|
112531
|
-
return
|
112593
|
+
const answers = await _inquirer.default.prompt((0, _transform.transformInquirerSchema)(schema, configValue, validateMap, initValue));
|
112594
|
+
return this.mergeAnswers(answers, configValue);
|
112532
112595
|
}
|
112533
112596
|
}
|
112534
112597
|
};
|
@@ -114480,7 +114543,7 @@ var init_common3 = __esmMin(() => {
|
|
114480
114543
|
});
|
114481
114544
|
ActionTypeTextMap = (_ActionTypeTextMap = {}, _defineProperty(_ActionTypeTextMap, ActionType.Element, ActionElementText), _defineProperty(_ActionTypeTextMap, ActionType.Function, ActionFunctionText), _defineProperty(_ActionTypeTextMap, ActionType.Refactor, ActionRefactorText), _ActionTypeTextMap);
|
114482
114545
|
});
|
114483
|
-
var _MWAActionTypesMap, _MWAActionFunctionsDe, _MWAActionFunctionsDe2, _ActionType$Element, _ActionType$Function, _MWANewActionGenerato, MWAActionTypes, MWAActionFunctions, MWAActionElements, MWAActionReactors, MWAActionTypesMap, MWASpecialSchemaMap, MWANewActionSchema, MWAActionFunctionsDevDependencies, MWAActionFunctionsDependencies, MWAActionFunctionsAppendTypeContent, MWANewActionGenerators;
|
114546
|
+
var _MWAActionTypesMap, _MWAActionFunctionsDe, _MWAActionFunctionsDe2, _MWAActionFunctionsAp, _ActionType$Element, _ActionType$Function, _MWANewActionGenerato, MWAActionTypes, MWAActionFunctions, MWAActionElements, MWAActionReactors, MWAActionTypesMap, MWASpecialSchemaMap, MWANewActionSchema, MWAActionFunctionsDevDependencies, MWAActionFunctionsDependencies, MWAActionFunctionsAppendTypeContent, MWANewActionGenerators;
|
114484
114547
|
var init_mwa2 = __esmMin(() => {
|
114485
114548
|
init_defineProperty();
|
114486
114549
|
init_common3();
|
@@ -114539,7 +114602,7 @@ var init_mwa2 = __esmMin(() => {
|
|
114539
114602
|
};
|
114540
114603
|
MWAActionFunctionsDevDependencies = (_MWAActionFunctionsDe = {}, _defineProperty(_MWAActionFunctionsDe, ActionFunction.Less, "@modern-js/plugin-less"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.Sass, "@modern-js/plugin-sass"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.SSG, "@modern-js/plugin-ssg"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.Test, "@modern-js/plugin-testing"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.E2ETest, "@modern-js/plugin-e2e"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.Electron, "@modern-js/plugin-electron"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.Storybook, "@modern-js/plugin-storybook"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.Proxy, "@modern-js/plugin-proxy"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.TailwindCSS, "tailwindcss"), _MWAActionFunctionsDe);
|
114541
114604
|
MWAActionFunctionsDependencies = (_MWAActionFunctionsDe2 = {}, _defineProperty(_MWAActionFunctionsDe2, ActionFunction.BFF, "@modern-js/plugin-bff"), _defineProperty(_MWAActionFunctionsDe2, ActionFunction.MicroFrontend, "@modern-js/plugin-garfish"), _defineProperty(_MWAActionFunctionsDe2, ActionFunction.I18n, "@modern-js/plugin-i18n"), _defineProperty(_MWAActionFunctionsDe2, ActionFunction.TailwindCSS, "@modern-js/plugin-tailwindcss"), _defineProperty(_MWAActionFunctionsDe2, ActionFunction.Polyfill, "@modern-js/plugin-polyfill"), _MWAActionFunctionsDe2);
|
114542
|
-
MWAActionFunctionsAppendTypeContent =
|
114605
|
+
MWAActionFunctionsAppendTypeContent = (_MWAActionFunctionsAp = {}, _defineProperty(_MWAActionFunctionsAp, ActionFunction.MicroFrontend, "/// <reference types='@modern-js/plugin-garfish/types' />"), _defineProperty(_MWAActionFunctionsAp, ActionFunction.Test, "/// <reference types='@modern-js/plugin-testing/types' />"), _MWAActionFunctionsAp);
|
114543
114606
|
MWANewActionGenerators = (_MWANewActionGenerato = {}, _defineProperty(_MWANewActionGenerato, ActionType.Element, (_ActionType$Element = {}, _defineProperty(_ActionType$Element, ActionElement.Entry, "@modern-js/entry-generator"), _defineProperty(_ActionType$Element, ActionElement.Server, "@modern-js/server-generator"), _ActionType$Element)), _defineProperty(_MWANewActionGenerato, ActionType.Function, (_ActionType$Function = {}, _defineProperty(_ActionType$Function, ActionFunction.TailwindCSS, "@modern-js/tailwindcss-generator"), _defineProperty(_ActionType$Function, ActionFunction.Less, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Sass, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.BFF, "@modern-js/bff-generator"), _defineProperty(_ActionType$Function, ActionFunction.MicroFrontend, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Electron, "@modern-js/electron-generator"), _defineProperty(_ActionType$Function, ActionFunction.I18n, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Test, "@modern-js/test-generator"), _defineProperty(_ActionType$Function, ActionFunction.E2ETest, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Doc, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Storybook, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.SSG, "@modern-js/ssg-generator"), _defineProperty(_ActionType$Function, ActionFunction.Polyfill, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Proxy, "@modern-js/dependence-generator"), _ActionType$Function)), _defineProperty(_MWANewActionGenerato, ActionType.Refactor, _defineProperty({}, ActionRefactor.BFFToApp, "@modern-js/bff-refactor-generator")), _MWANewActionGenerato);
|
114544
114607
|
});
|
114545
114608
|
var _ModuleActionFunction, _ModuleActionFunction2, _ModuleActionFunction3, _ActionType$Function2, ModuleActionTypes, ModuleActionFunctions, ModuleActionTypesMap, ModuleSpecialSchemaMap, ModuleNewActionSchema, ModuleActionFunctionsDevDependencies, ModuleActionFunctionsPeerDependencies, ModuleActionFunctionsDependencies, ModuleNewActionGenerators;
|
@@ -144179,10 +144242,10 @@ var require_type2 = __commonJSMin((exports) => {
|
|
144179
144242
|
return Array.isArray(obj);
|
144180
144243
|
}
|
144181
144244
|
exports.isArray = isArray4;
|
144182
|
-
function
|
144245
|
+
function isFunction2(func) {
|
144183
144246
|
return typeof func === "function";
|
144184
144247
|
}
|
144185
|
-
exports.isFunction =
|
144248
|
+
exports.isFunction = isFunction2;
|
144186
144249
|
function isObject5(obj) {
|
144187
144250
|
return obj !== null && typeof obj === "object";
|
144188
144251
|
}
|
@@ -145911,7 +145974,7 @@ var require_node10 = __commonJSMin((exports) => {
|
|
145911
145974
|
const version5 = await getPackageVersion(packageName, registry2);
|
145912
145975
|
return version5;
|
145913
145976
|
};
|
145914
|
-
if (!packageName.startsWith("@modern-js")) {
|
145977
|
+
if (!packageName.startsWith("@modern-js") || packageName.includes("electron") || packageName.includes("codesmith") || packageName.includes("easy-form") || packageName.startsWith("@modern-js-reduck")) {
|
145915
145978
|
return getLatetPluginVersion();
|
145916
145979
|
}
|
145917
145980
|
const pkgPath = _path.default.join(__require.resolve(_generatorCommon.SolutionToolsMap[solution], {
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "2.4.
|
14
|
+
"version": "2.4.5",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"main": "./dist/index.js",
|
17
17
|
"files": [
|
@@ -20,16 +20,16 @@
|
|
20
20
|
],
|
21
21
|
"devDependencies": {
|
22
22
|
"@babel/runtime": "^7.18.0",
|
23
|
-
"@modern-js/base-generator": "2.4.
|
24
|
-
"@modern-js/changeset-generator": "2.4.
|
25
|
-
"@modern-js/codesmith": "1.6.
|
26
|
-
"@modern-js/codesmith-api-app": "1.6.
|
27
|
-
"@modern-js/codesmith-api-json": "1.6.
|
28
|
-
"@modern-js/generator-common": "2.4.
|
29
|
-
"@modern-js/generator-utils": "2.4.
|
30
|
-
"@modern-js/plugin-i18n": "1.
|
31
|
-
"@scripts/build": "1.
|
32
|
-
"@scripts/jest-config": "1.
|
23
|
+
"@modern-js/base-generator": "2.4.5",
|
24
|
+
"@modern-js/changeset-generator": "2.4.5",
|
25
|
+
"@modern-js/codesmith": "1.6.3",
|
26
|
+
"@modern-js/codesmith-api-app": "1.6.3",
|
27
|
+
"@modern-js/codesmith-api-json": "1.6.3",
|
28
|
+
"@modern-js/generator-common": "2.4.5",
|
29
|
+
"@modern-js/generator-utils": "2.4.5",
|
30
|
+
"@modern-js/plugin-i18n": "1.21.0",
|
31
|
+
"@scripts/build": "1.21.0",
|
32
|
+
"@scripts/jest-config": "1.21.0",
|
33
33
|
"@types/jest": "^27",
|
34
34
|
"@types/node": "^14",
|
35
35
|
"jest": "^27",
|