@modern-js/repo-generator 0.0.0-canary-20221022140538 → 0.0.0-canary-20221022144540

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.
Files changed (2) hide show
  1. package/dist/index.js +856 -1029
  2. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -1962,8 +1962,8 @@ var require_lodash = __commonJSMin((exports, module2) => {
1962
1962
  if (result2 instanceof LazyWrapper) {
1963
1963
  result2 = result2.value();
1964
1964
  }
1965
- return arrayReduce(actions, function(result3, action3) {
1966
- return action3.func.apply(action3.thisArg, arrayPush([result3], action3.args));
1965
+ return arrayReduce(actions, function(result3, action2) {
1966
+ return action2.func.apply(action2.thisArg, arrayPush([result3], action2.args));
1967
1967
  }, result2);
1968
1968
  }
1969
1969
  function baseXor(arrays, iteratee2, comparator) {
@@ -34589,7 +34589,6 @@ var require_logger = __commonJSMin((exports) => {
34589
34589
  Object.defineProperty(exports, "__esModule", { value: true });
34590
34590
  exports.logger = exports.Logger = void 0;
34591
34591
  var chalk_1 = __importDefault(require_chalk());
34592
- var { grey, underline } = chalk_1.default;
34593
34592
  var LOG_LEVEL = {
34594
34593
  error: 0,
34595
34594
  warn: 1,
@@ -34604,13 +34603,18 @@ var require_logger = __commonJSMin((exports) => {
34604
34603
  level: "error"
34605
34604
  },
34606
34605
  info: {
34607
- color: "blue",
34606
+ color: "cyan",
34608
34607
  label: "info",
34609
34608
  level: "info"
34610
34609
  },
34610
+ success: {
34611
+ color: "green",
34612
+ label: "Success",
34613
+ level: "info"
34614
+ },
34611
34615
  warn: {
34612
34616
  color: "yellow",
34613
- label: "warning",
34617
+ label: "warn",
34614
34618
  level: "warn"
34615
34619
  },
34616
34620
  debug: {
@@ -34622,13 +34626,10 @@ var require_logger = __commonJSMin((exports) => {
34622
34626
  };
34623
34627
  var DEFAULT_CONFIG = {
34624
34628
  displayLabel: true,
34625
- underlineLabel: true,
34626
34629
  uppercaseLabel: false
34627
34630
  };
34628
34631
  var Logger = class {
34629
34632
  constructor(options3 = {}) {
34630
- this.logCount = 200;
34631
- this.history = {};
34632
34633
  this.level = options3.level || LOG_TYPES.log.level;
34633
34634
  this.config = { ...DEFAULT_CONFIG, ...options3.config || {} };
34634
34635
  this.types = {
@@ -34640,77 +34641,46 @@ var require_logger = __commonJSMin((exports) => {
34640
34641
  this[type] = this._log.bind(this, type);
34641
34642
  });
34642
34643
  }
34643
- retainLog(type, message) {
34644
- if (!this.history[type]) {
34645
- this.history[type] = [];
34646
- }
34647
- this.history[type].push(message);
34648
- while (this.history[type].length > this.logCount) {
34649
- this.history[type].shift();
34650
- }
34651
- }
34652
34644
  _log(type, message, ...args) {
34653
- if (message === void 0) {
34645
+ if (message === void 0 || message === null) {
34654
34646
  console.log();
34655
34647
  return;
34656
34648
  }
34657
34649
  if (LOG_LEVEL[type] > LOG_LEVEL[this.level]) {
34658
34650
  return;
34659
34651
  }
34660
- let label21 = "";
34652
+ let label = "";
34661
34653
  let text = "";
34662
34654
  const logType = this.types[type];
34663
34655
  if (this.config.displayLabel && logType.label) {
34664
- label21 = this.config.uppercaseLabel ? logType.label.toUpperCase() : logType.label;
34665
- if (this.config.underlineLabel) {
34666
- label21 = underline(label21).padEnd(this.longestUnderlinedLabel.length + 1);
34667
- } else {
34668
- label21 = label21.padEnd(this.longestLabel.length + 1);
34669
- }
34670
- label21 = logType.color ? chalk_1.default[logType.color](label21) : label21;
34656
+ label = this.config.uppercaseLabel ? logType.label.toUpperCase() : logType.label;
34657
+ label = label.padEnd(this.longestLabel.length);
34658
+ label = chalk_1.default.bold(logType.color ? chalk_1.default[logType.color](label) : label);
34671
34659
  }
34672
34660
  if (message instanceof Error) {
34673
34661
  if (message.stack) {
34674
34662
  const [name5, ...rest] = message.stack.split("\n");
34675
34663
  text = `${name5}
34676
- ${grey(rest.join("\n"))}`;
34664
+ ${chalk_1.default.grey(rest.join("\n"))}`;
34677
34665
  } else {
34678
34666
  text = message.message;
34679
34667
  }
34680
34668
  } else {
34681
34669
  text = `${message}`;
34682
34670
  }
34683
- if (logType.level === "warn" || logType.level === "error") {
34684
- this.retainLog(type, text);
34685
- }
34686
- const log = label21.length > 0 ? `${label21} ${text}` : text;
34671
+ const log = label.length > 0 ? `${label} ${text}` : text;
34687
34672
  console.log(log, ...args);
34688
34673
  }
34689
34674
  getLongestLabel() {
34690
34675
  let longestLabel = "";
34691
34676
  Object.keys(this.types).forEach((type) => {
34692
- const { label: label21 = "" } = this.types[type];
34693
- if (label21.length > longestLabel.length) {
34694
- longestLabel = label21;
34677
+ const { label = "" } = this.types[type];
34678
+ if (label.length > longestLabel.length) {
34679
+ longestLabel = label;
34695
34680
  }
34696
34681
  });
34697
34682
  return longestLabel;
34698
34683
  }
34699
- get longestUnderlinedLabel() {
34700
- return underline(this.longestLabel);
34701
- }
34702
- getRetainedLogs(type) {
34703
- return this.history[type] || [];
34704
- }
34705
- clearRetainedLogs(type) {
34706
- if (type) {
34707
- if (this.history[type]) {
34708
- this.history[type] = [];
34709
- }
34710
- } else {
34711
- this.history = {};
34712
- }
34713
- }
34714
34684
  };
34715
34685
  exports.Logger = Logger;
34716
34686
  var logger = new Logger();
@@ -35370,10 +35340,13 @@ var require_getPort = __commonJSMin((exports) => {
35370
35340
  var net_1 = __importDefault(__require("net"));
35371
35341
  var compiled_1 = require_compiled();
35372
35342
  var logger_1 = require_logger();
35373
- var getPort = async (port, tryLimits = 20) => {
35343
+ var getPort = async (port, { tryLimits = 20, strictPort = false } = {}) => {
35374
35344
  if (typeof port === "string") {
35375
35345
  port = parseInt(port, 10);
35376
35346
  }
35347
+ if (strictPort) {
35348
+ tryLimits = 1;
35349
+ }
35377
35350
  const original = port;
35378
35351
  let found = false;
35379
35352
  let attempts = 0;
@@ -35400,7 +35373,11 @@ var require_getPort = __commonJSMin((exports) => {
35400
35373
  }
35401
35374
  }
35402
35375
  if (port !== original) {
35403
- logger_1.logger.info(compiled_1.chalk.red(`Something is already running on port ${original}. ${compiled_1.chalk.yellow(`Use port ${port} instead.`)}`));
35376
+ if (strictPort) {
35377
+ throw new Error(`Port "${original}" is occupied, please choose another one.`);
35378
+ } else {
35379
+ logger_1.logger.info(`Something is already running on port ${original}. ${compiled_1.chalk.yellow(`Use port ${port} instead.`)}`);
35380
+ }
35404
35381
  }
35405
35382
  return port;
35406
35383
  };
@@ -36212,15 +36189,20 @@ var require_chainId = __commonJSMin((exports) => {
36212
36189
  }
36213
36190
  };
36214
36191
  });
36215
- var require_reactVersion = __commonJSMin((exports) => {
36192
+ var require_version = __commonJSMin((exports) => {
36216
36193
  "use strict";
36217
36194
  var __importDefault = exports && exports.__importDefault || function(mod) {
36218
36195
  return mod && mod.__esModule ? mod : { "default": mod };
36219
36196
  };
36220
36197
  Object.defineProperty(exports, "__esModule", { value: true });
36221
- exports.isReact18 = void 0;
36198
+ exports.isReact18 = exports.getPnpmVersion = void 0;
36222
36199
  var path_1 = __importDefault(__require("path"));
36223
36200
  var compiled_1 = require_compiled();
36201
+ async function getPnpmVersion() {
36202
+ const { stdout } = await (0, compiled_1.execa)("pnpm", ["--version"]);
36203
+ return stdout;
36204
+ }
36205
+ exports.getPnpmVersion = getPnpmVersion;
36224
36206
  var isReact18 = (cwd) => {
36225
36207
  const pkgPath = path_1.default.join(cwd, "package.json");
36226
36208
  if (!compiled_1.fs.existsSync(pkgPath)) {
@@ -36297,7 +36279,7 @@ var require_dist = __commonJSMin((exports) => {
36297
36279
  __exportStar(require_tryResolve(), exports);
36298
36280
  __exportStar(require_analyzeProject(), exports);
36299
36281
  __exportStar(require_chainId(), exports);
36300
- __exportStar(require_reactVersion(), exports);
36282
+ __exportStar(require_version(), exports);
36301
36283
  });
36302
36284
  var require_esprima = __commonJSMin((exports, module2) => {
36303
36285
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -37419,9 +37401,9 @@ var require_esprima = __commonJSMin((exports, module2) => {
37419
37401
  }();
37420
37402
  exports2.BlockStatement = BlockStatement;
37421
37403
  var BreakStatement = function() {
37422
- function BreakStatement2(label21) {
37404
+ function BreakStatement2(label) {
37423
37405
  this.type = syntax_1.Syntax.BreakStatement;
37424
- this.label = label21;
37406
+ this.label = label;
37425
37407
  }
37426
37408
  return BreakStatement2;
37427
37409
  }();
@@ -37493,9 +37475,9 @@ var require_esprima = __commonJSMin((exports, module2) => {
37493
37475
  }();
37494
37476
  exports2.ConditionalExpression = ConditionalExpression;
37495
37477
  var ContinueStatement = function() {
37496
- function ContinueStatement2(label21) {
37478
+ function ContinueStatement2(label) {
37497
37479
  this.type = syntax_1.Syntax.ContinueStatement;
37498
- this.label = label21;
37480
+ this.label = label;
37499
37481
  }
37500
37482
  return ContinueStatement2;
37501
37483
  }();
@@ -37686,9 +37668,9 @@ var require_esprima = __commonJSMin((exports, module2) => {
37686
37668
  }();
37687
37669
  exports2.ImportSpecifier = ImportSpecifier;
37688
37670
  var LabeledStatement = function() {
37689
- function LabeledStatement2(label21, body) {
37671
+ function LabeledStatement2(label, body) {
37690
37672
  this.type = syntax_1.Syntax.LabeledStatement;
37691
- this.label = label21;
37673
+ this.label = label;
37692
37674
  this.body = body;
37693
37675
  }
37694
37676
  return LabeledStatement2;
@@ -39835,38 +39817,38 @@ var require_esprima = __commonJSMin((exports, module2) => {
39835
39817
  Parser3.prototype.parseContinueStatement = function() {
39836
39818
  var node = this.createNode();
39837
39819
  this.expectKeyword("continue");
39838
- var label21 = null;
39820
+ var label = null;
39839
39821
  if (this.lookahead.type === 3 && !this.hasLineTerminator) {
39840
39822
  var id = this.parseVariableIdentifier();
39841
- label21 = id;
39823
+ label = id;
39842
39824
  var key = "$" + id.name;
39843
39825
  if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
39844
39826
  this.throwError(messages_1.Messages.UnknownLabel, id.name);
39845
39827
  }
39846
39828
  }
39847
39829
  this.consumeSemicolon();
39848
- if (label21 === null && !this.context.inIteration) {
39830
+ if (label === null && !this.context.inIteration) {
39849
39831
  this.throwError(messages_1.Messages.IllegalContinue);
39850
39832
  }
39851
- return this.finalize(node, new Node.ContinueStatement(label21));
39833
+ return this.finalize(node, new Node.ContinueStatement(label));
39852
39834
  };
39853
39835
  Parser3.prototype.parseBreakStatement = function() {
39854
39836
  var node = this.createNode();
39855
39837
  this.expectKeyword("break");
39856
- var label21 = null;
39838
+ var label = null;
39857
39839
  if (this.lookahead.type === 3 && !this.hasLineTerminator) {
39858
39840
  var id = this.parseVariableIdentifier();
39859
39841
  var key = "$" + id.name;
39860
39842
  if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
39861
39843
  this.throwError(messages_1.Messages.UnknownLabel, id.name);
39862
39844
  }
39863
- label21 = id;
39845
+ label = id;
39864
39846
  }
39865
39847
  this.consumeSemicolon();
39866
- if (label21 === null && !this.context.inIteration && !this.context.inSwitch) {
39848
+ if (label === null && !this.context.inIteration && !this.context.inSwitch) {
39867
39849
  this.throwError(messages_1.Messages.IllegalBreak);
39868
39850
  }
39869
- return this.finalize(node, new Node.BreakStatement(label21));
39851
+ return this.finalize(node, new Node.BreakStatement(label));
39870
39852
  };
39871
39853
  Parser3.prototype.parseReturnStatement = function() {
39872
39854
  if (!this.context.inFunctionBody) {
@@ -43345,7 +43327,7 @@ var require_array = __commonJSMin((exports, module2) => {
43345
43327
  splice(...args) {
43346
43328
  const { length } = this;
43347
43329
  const ret = super.splice(...args);
43348
- let [begin, deleteCount, ...items5] = args;
43330
+ let [begin, deleteCount, ...items] = args;
43349
43331
  if (begin < 0) {
43350
43332
  begin += length;
43351
43333
  }
@@ -43356,7 +43338,7 @@ var require_array = __commonJSMin((exports, module2) => {
43356
43338
  }
43357
43339
  const {
43358
43340
  length: item_length
43359
- } = items5;
43341
+ } = items;
43360
43342
  const offset = item_length - deleteCount;
43361
43343
  const start = begin + deleteCount;
43362
43344
  const count = length - start;
@@ -43383,12 +43365,12 @@ var require_array = __commonJSMin((exports, module2) => {
43383
43365
  move_comments(array, this, begin, before - begin, -begin);
43384
43366
  return array;
43385
43367
  }
43386
- unshift(...items5) {
43368
+ unshift(...items) {
43387
43369
  const { length } = this;
43388
- const ret = super.unshift(...items5);
43370
+ const ret = super.unshift(...items);
43389
43371
  const {
43390
43372
  length: items_length
43391
- } = items5;
43373
+ } = items;
43392
43374
  if (items_length > 0) {
43393
43375
  move_comments(this, this, 0, length, items_length, true);
43394
43376
  }
@@ -43411,14 +43393,14 @@ var require_array = __commonJSMin((exports, module2) => {
43411
43393
  remove_comments(this, this.length);
43412
43394
  return ret;
43413
43395
  }
43414
- concat(...items5) {
43396
+ concat(...items) {
43415
43397
  let { length } = this;
43416
- const ret = super.concat(...items5);
43417
- if (!items5.length) {
43398
+ const ret = super.concat(...items);
43399
+ if (!items.length) {
43418
43400
  return ret;
43419
43401
  }
43420
43402
  move_comments(ret, this, 0, this.length, 0);
43421
- items5.forEach((item) => {
43403
+ items.forEach((item) => {
43422
43404
  const prev = length;
43423
43405
  length += isArray4(item) ? item.length : 1;
43424
43406
  if (!(item instanceof CommentArray)) {
@@ -54170,18 +54152,18 @@ var require_parser = __commonJSMin((exports, module2) => {
54170
54152
  }
54171
54153
  return token;
54172
54154
  }
54173
- var symbol, preErrorSymbol, state, action3, a, r, yyval = {}, p, len, newState, expected;
54155
+ var symbol, preErrorSymbol, state, action2, a, r, yyval = {}, p, len, newState, expected;
54174
54156
  while (true) {
54175
54157
  state = stack[stack.length - 1];
54176
54158
  if (this.defaultActions[state]) {
54177
- action3 = this.defaultActions[state];
54159
+ action2 = this.defaultActions[state];
54178
54160
  } else {
54179
54161
  if (symbol === null || typeof symbol == "undefined") {
54180
54162
  symbol = lex();
54181
54163
  }
54182
- action3 = table[state] && table[state][symbol];
54164
+ action2 = table[state] && table[state][symbol];
54183
54165
  }
54184
- if (typeof action3 === "undefined" || !action3.length || !action3[0]) {
54166
+ if (typeof action2 === "undefined" || !action2.length || !action2[0]) {
54185
54167
  var errStr = "";
54186
54168
  if (!recovering) {
54187
54169
  expected = [];
@@ -54197,15 +54179,15 @@ var require_parser = __commonJSMin((exports, module2) => {
54197
54179
  this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected });
54198
54180
  }
54199
54181
  }
54200
- if (action3[0] instanceof Array && action3.length > 1) {
54182
+ if (action2[0] instanceof Array && action2.length > 1) {
54201
54183
  throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
54202
54184
  }
54203
- switch (action3[0]) {
54185
+ switch (action2[0]) {
54204
54186
  case 1:
54205
54187
  stack.push(symbol);
54206
54188
  vstack.push(this.lexer.yytext);
54207
54189
  lstack.push(this.lexer.yylloc);
54208
- stack.push(action3[1]);
54190
+ stack.push(action2[1]);
54209
54191
  symbol = null;
54210
54192
  if (!preErrorSymbol) {
54211
54193
  yyleng = this.lexer.yyleng;
@@ -54220,13 +54202,13 @@ var require_parser = __commonJSMin((exports, module2) => {
54220
54202
  }
54221
54203
  break;
54222
54204
  case 2:
54223
- len = this.productions_[action3[1]][1];
54205
+ len = this.productions_[action2[1]][1];
54224
54206
  yyval.$ = vstack[vstack.length - len];
54225
54207
  yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
54226
54208
  if (ranges) {
54227
54209
  yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
54228
54210
  }
54229
- r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action3[1], vstack, lstack);
54211
+ r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action2[1], vstack, lstack);
54230
54212
  if (typeof r !== "undefined") {
54231
54213
  return r;
54232
54214
  }
@@ -54235,7 +54217,7 @@ var require_parser = __commonJSMin((exports, module2) => {
54235
54217
  vstack = vstack.slice(0, -1 * len);
54236
54218
  lstack = lstack.slice(0, -1 * len);
54237
54219
  }
54238
- stack.push(this.productions_[action3[1]][0]);
54220
+ stack.push(this.productions_[action2[1]][0]);
54239
54221
  vstack.push(yyval.$);
54240
54222
  lstack.push(yyval._$);
54241
54223
  newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
@@ -57700,11 +57682,11 @@ var require_javascript_compiler = __commonJSMin((exports, module2) => {
57700
57682
  var functionCall = this.source.functionCall(functionLookupCode, "call", helper.callParams);
57701
57683
  this.push(functionCall);
57702
57684
  },
57703
- itemsSeparatedBy: function itemsSeparatedBy(items5, separator) {
57685
+ itemsSeparatedBy: function itemsSeparatedBy(items, separator) {
57704
57686
  var result = [];
57705
- result.push(items5[0]);
57706
- for (var i = 1; i < items5.length; i++) {
57707
- result.push(separator, items5[i]);
57687
+ result.push(items[0]);
57688
+ for (var i = 1; i < items.length; i++) {
57689
+ result.push(separator, items[i]);
57708
57690
  }
57709
57691
  return result;
57710
57692
  },
@@ -64920,8 +64902,8 @@ var require_AsapAction = __commonJSMin((exports) => {
64920
64902
  if (delay != null && delay > 0 || delay == null && this.delay > 0) {
64921
64903
  return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
64922
64904
  }
64923
- if (!scheduler.actions.some(function(action3) {
64924
- return action3.id === id;
64905
+ if (!scheduler.actions.some(function(action2) {
64906
+ return action2.id === id;
64925
64907
  })) {
64926
64908
  immediateProvider_1.immediateProvider.clearImmediate(id);
64927
64909
  scheduler._scheduled = void 0;
@@ -64994,23 +64976,23 @@ var require_AsyncScheduler = __commonJSMin((exports) => {
64994
64976
  _this._scheduled = void 0;
64995
64977
  return _this;
64996
64978
  }
64997
- AsyncScheduler2.prototype.flush = function(action3) {
64979
+ AsyncScheduler2.prototype.flush = function(action2) {
64998
64980
  var actions = this.actions;
64999
64981
  if (this._active) {
65000
- actions.push(action3);
64982
+ actions.push(action2);
65001
64983
  return;
65002
64984
  }
65003
64985
  var error;
65004
64986
  this._active = true;
65005
64987
  do {
65006
- if (error = action3.execute(action3.state, action3.delay)) {
64988
+ if (error = action2.execute(action2.state, action2.delay)) {
65007
64989
  break;
65008
64990
  }
65009
- } while (action3 = actions.shift());
64991
+ } while (action2 = actions.shift());
65010
64992
  this._active = false;
65011
64993
  if (error) {
65012
- while (action3 = actions.shift()) {
65013
- action3.unsubscribe();
64994
+ while (action2 = actions.shift()) {
64995
+ action2.unsubscribe();
65014
64996
  }
65015
64997
  throw error;
65016
64998
  }
@@ -65050,22 +65032,22 @@ var require_AsapScheduler = __commonJSMin((exports) => {
65050
65032
  function AsapScheduler2() {
65051
65033
  return _super !== null && _super.apply(this, arguments) || this;
65052
65034
  }
65053
- AsapScheduler2.prototype.flush = function(action3) {
65035
+ AsapScheduler2.prototype.flush = function(action2) {
65054
65036
  this._active = true;
65055
65037
  var flushId = this._scheduled;
65056
65038
  this._scheduled = void 0;
65057
65039
  var actions = this.actions;
65058
65040
  var error;
65059
- action3 = action3 || actions.shift();
65041
+ action2 = action2 || actions.shift();
65060
65042
  do {
65061
- if (error = action3.execute(action3.state, action3.delay)) {
65043
+ if (error = action2.execute(action2.state, action2.delay)) {
65062
65044
  break;
65063
65045
  }
65064
- } while ((action3 = actions[0]) && action3.id === flushId && actions.shift());
65046
+ } while ((action2 = actions[0]) && action2.id === flushId && actions.shift());
65065
65047
  this._active = false;
65066
65048
  if (error) {
65067
- while ((action3 = actions[0]) && action3.id === flushId && actions.shift()) {
65068
- action3.unsubscribe();
65049
+ while ((action2 = actions[0]) && action2.id === flushId && actions.shift()) {
65050
+ action2.unsubscribe();
65069
65051
  }
65070
65052
  throw error;
65071
65053
  }
@@ -65252,8 +65234,8 @@ var require_AnimationFrameAction = __commonJSMin((exports) => {
65252
65234
  if (delay != null && delay > 0 || delay == null && this.delay > 0) {
65253
65235
  return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
65254
65236
  }
65255
- if (!scheduler.actions.some(function(action3) {
65256
- return action3.id === id;
65237
+ if (!scheduler.actions.some(function(action2) {
65238
+ return action2.id === id;
65257
65239
  })) {
65258
65240
  animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);
65259
65241
  scheduler._scheduled = void 0;
@@ -65295,22 +65277,22 @@ var require_AnimationFrameScheduler = __commonJSMin((exports) => {
65295
65277
  function AnimationFrameScheduler2() {
65296
65278
  return _super !== null && _super.apply(this, arguments) || this;
65297
65279
  }
65298
- AnimationFrameScheduler2.prototype.flush = function(action3) {
65280
+ AnimationFrameScheduler2.prototype.flush = function(action2) {
65299
65281
  this._active = true;
65300
65282
  var flushId = this._scheduled;
65301
65283
  this._scheduled = void 0;
65302
65284
  var actions = this.actions;
65303
65285
  var error;
65304
- action3 = action3 || actions.shift();
65286
+ action2 = action2 || actions.shift();
65305
65287
  do {
65306
- if (error = action3.execute(action3.state, action3.delay)) {
65288
+ if (error = action2.execute(action2.state, action2.delay)) {
65307
65289
  break;
65308
65290
  }
65309
- } while ((action3 = actions[0]) && action3.id === flushId && actions.shift());
65291
+ } while ((action2 = actions[0]) && action2.id === flushId && actions.shift());
65310
65292
  this._active = false;
65311
65293
  if (error) {
65312
- while ((action3 = actions[0]) && action3.id === flushId && actions.shift()) {
65313
- action3.unsubscribe();
65294
+ while ((action2 = actions[0]) && action2.id === flushId && actions.shift()) {
65295
+ action2.unsubscribe();
65314
65296
  }
65315
65297
  throw error;
65316
65298
  }
@@ -65376,17 +65358,17 @@ var require_VirtualTimeScheduler = __commonJSMin((exports) => {
65376
65358
  VirtualTimeScheduler2.prototype.flush = function() {
65377
65359
  var _a2 = this, actions = _a2.actions, maxFrames = _a2.maxFrames;
65378
65360
  var error;
65379
- var action3;
65380
- while ((action3 = actions[0]) && action3.delay <= maxFrames) {
65361
+ var action2;
65362
+ while ((action2 = actions[0]) && action2.delay <= maxFrames) {
65381
65363
  actions.shift();
65382
- this.frame = action3.delay;
65383
- if (error = action3.execute(action3.state, action3.delay)) {
65364
+ this.frame = action2.delay;
65365
+ if (error = action2.execute(action2.state, action2.delay)) {
65384
65366
  break;
65385
65367
  }
65386
65368
  }
65387
65369
  if (error) {
65388
- while (action3 = actions.shift()) {
65389
- action3.unsubscribe();
65370
+ while (action2 = actions.shift()) {
65371
+ action2.unsubscribe();
65390
65372
  }
65391
65373
  throw error;
65392
65374
  }
@@ -65418,9 +65400,9 @@ var require_VirtualTimeScheduler = __commonJSMin((exports) => {
65418
65400
  return _super.prototype.schedule.call(this, state, delay);
65419
65401
  }
65420
65402
  this.active = false;
65421
- var action3 = new VirtualAction2(this.scheduler, this.work);
65422
- this.add(action3);
65423
- return action3.schedule(state, delay);
65403
+ var action2 = new VirtualAction2(this.scheduler, this.work);
65404
+ this.add(action2);
65405
+ return action2.schedule(state, delay);
65424
65406
  } else {
65425
65407
  return Subscription_1.Subscription.EMPTY;
65426
65408
  }
@@ -79150,15 +79132,15 @@ var require_ora2 = __commonJSMin((exports, module2) => {
79150
79132
  return new Ora(options3);
79151
79133
  };
79152
79134
  module2.exports = oraFactory;
79153
- module2.exports.promise = (action3, options3) => {
79154
- if (typeof action3.then !== "function") {
79135
+ module2.exports.promise = (action2, options3) => {
79136
+ if (typeof action2.then !== "function") {
79155
79137
  throw new TypeError("Parameter `action` must be a Promise");
79156
79138
  }
79157
79139
  const spinner = new Ora(options3);
79158
79140
  spinner.start();
79159
79141
  (async () => {
79160
79142
  try {
79161
- await action3;
79143
+ await action2;
79162
79144
  spinner.succeed();
79163
79145
  } catch {
79164
79146
  spinner.fail();
@@ -79339,13 +79321,13 @@ var require_base3 = __commonJSMin((exports, module2) => {
79339
79321
  }
79340
79322
  handleSubmitEvents(submit) {
79341
79323
  const self3 = this;
79342
- const validate5 = runAsync(this.opt.validate);
79324
+ const validate2 = runAsync(this.opt.validate);
79343
79325
  const asyncFilter = runAsync(this.opt.filter);
79344
79326
  const validation = submit.pipe(flatMap((value) => {
79345
79327
  this.startSpinner(value, this.opt.filteringText);
79346
79328
  return asyncFilter(value, self3.answers).then((filteredValue) => {
79347
79329
  this.startSpinner(filteredValue, this.opt.validatingText);
79348
- return validate5(filteredValue, self3.answers).then((isValid5) => ({ isValid: isValid5, value: filteredValue }), (err) => ({ isValid: err, value: filteredValue }));
79330
+ return validate2(filteredValue, self3.answers).then((isValid5) => ({ isValid: isValid5, value: filteredValue }), (err) => ({ isValid: err, value: filteredValue }));
79349
79331
  }, (err) => ({ isValid: err }));
79350
79332
  }), share());
79351
79333
  const success = validation.pipe(filter3((state) => state.isValid === true), take(1));
@@ -97473,7 +97455,7 @@ var init_stateField = __esmMin(() => {
97473
97455
  if (typeof value.action === "function") {
97474
97456
  schema.state.value = {
97475
97457
  effectedByFields: value.effectedByFields,
97476
- action: function action3(data, lastValue) {
97458
+ action: function action2(data, lastValue) {
97477
97459
  return value.action(data, lastValue || initValue);
97478
97460
  }
97479
97461
  };
@@ -97791,8 +97773,8 @@ var init_checkSchema = __esmMin(() => {
97791
97773
  };
97792
97774
  checkRepeatItems = function checkRepeatItems2(schema, extra) {
97793
97775
  if (schema.items && schema.items.length > 0) {
97794
- var items5 = getItems(schema, {}, extra);
97795
- var keys = items5.map(function(x) {
97776
+ var items = getItems(schema, {}, extra);
97777
+ var keys = items.map(function(x) {
97796
97778
  return x.key;
97797
97779
  });
97798
97780
  var tmp = [];
@@ -97974,9 +97956,9 @@ var init_baseReader = __esmMin(() => {
97974
97956
  initValues[_schema.key] = _this.getSchemaDefaultValue(_schema, brothers, isRoot);
97975
97957
  }
97976
97958
  if (_schema.items) {
97977
- var items5 = getItems(_schema, _this.data, _this.extra);
97978
- items5.forEach(function(each2) {
97979
- return readDefaultValue2(each2, items5.map(function(x) {
97959
+ var items = getItems(_schema, _this.data, _this.extra);
97960
+ items.forEach(function(each2) {
97961
+ return readDefaultValue2(each2, items.map(function(x) {
97980
97962
  return x.key;
97981
97963
  }), false);
97982
97964
  });
@@ -97994,7 +97976,7 @@ var init_baseReader = __esmMin(() => {
97994
97976
  if (!isEffectedValue(val)) {
97995
97977
  return val;
97996
97978
  }
97997
- var _ref = val, _ref$effectedByFields = _ref.effectedByFields, effectedByFields = _ref$effectedByFields === void 0 ? [] : _ref$effectedByFields, action3 = _ref.action, rest = _objectWithoutProperties(_ref, _excluded);
97979
+ var _ref = val, _ref$effectedByFields = _ref.effectedByFields, effectedByFields = _ref$effectedByFields === void 0 ? [] : _ref$effectedByFields, action2 = _ref.action, rest = _objectWithoutProperties(_ref, _excluded);
97998
97980
  if (isRoot) {
97999
97981
  throw Error("[".concat(schema.key, "] top level should not have effects"));
98000
97982
  }
@@ -98006,7 +97988,7 @@ var init_baseReader = __esmMin(() => {
98006
97988
  }
98007
97989
  return _objectSpread2({
98008
97990
  effectedByFields: curNodeEffectedByFields,
98009
- action: action3
97991
+ action: action2
98010
97992
  }, rest);
98011
97993
  };
98012
97994
  return handleEffects(state.value);
@@ -98990,7 +98972,7 @@ var require_utils10 = __commonJSMin((exports) => {
98990
98972
  }, choices);
98991
98973
  };
98992
98974
  exports.getQuestion = getQuestion;
98993
- var when8 = (schema, answers, extra) => {
98975
+ var when = (schema, answers, extra) => {
98994
98976
  if (schema.when && typeof schema.when === "function") {
98995
98977
  return schema.when(answers, extra);
98996
98978
  }
@@ -99016,7 +98998,7 @@ var require_utils10 = __commonJSMin((exports) => {
99016
98998
  });
99017
98999
  return (answers) => {
99018
99000
  try {
99019
- if (!when8(schema, answers, nodeInfo.extra)) {
99001
+ if (!when(schema, answers, nodeInfo.extra)) {
99020
99002
  return Promise.resolve(true);
99021
99003
  }
99022
99004
  const question = getQuestion({
@@ -99620,18 +99602,18 @@ var require_transformSchema = __commonJSMin((exports) => {
99620
99602
  schemaItem.label = schemaItem.state.cliLabel;
99621
99603
  }
99622
99604
  const {
99623
- when: when8,
99624
- validate: validate5
99605
+ when,
99606
+ validate: validate2
99625
99607
  } = schemaItem;
99626
99608
  schemaItem.when = (values, extra) => {
99627
99609
  if (!(0, _lodash.isUndefined)(configValue[schemaItem.key])) {
99628
99610
  return false;
99629
99611
  }
99630
- return when8 ? when8(values, extra) : true;
99612
+ return when ? when(values, extra) : true;
99631
99613
  };
99632
99614
  schemaItem.validate = async (value, data, extra) => {
99633
- if (validate5) {
99634
- const result = await validate5(value, data, extra);
99615
+ if (validate2) {
99616
+ const result = await validate2(value, data, extra);
99635
99617
  if (!result.success) {
99636
99618
  return result;
99637
99619
  }
@@ -102007,11 +101989,11 @@ var init_esm = __esmMin(() => {
102007
101989
  return path6;
102008
101990
  };
102009
101991
  this.push = function() {
102010
- var items5 = [];
101992
+ var items = [];
102011
101993
  for (var _i = 0; _i < arguments.length; _i++) {
102012
- items5[_i] = arguments[_i];
101994
+ items[_i] = arguments[_i];
102013
101995
  }
102014
- return _this.concat.apply(_this, __spreadArray([], __read(items5), false));
101996
+ return _this.concat.apply(_this, __spreadArray([], __read(items), false));
102015
101997
  };
102016
101998
  this.pop = function() {
102017
101999
  if (_this.isMatchPattern || _this.isRegExp) {
@@ -102020,18 +102002,18 @@ var init_esm = __esmMin(() => {
102020
102002
  return new Path2(_this.segments.slice(0, _this.segments.length - 1));
102021
102003
  };
102022
102004
  this.splice = function(start, deleteCount) {
102023
- var items5 = [];
102005
+ var items = [];
102024
102006
  for (var _i = 2; _i < arguments.length; _i++) {
102025
- items5[_i - 2] = arguments[_i];
102007
+ items[_i - 2] = arguments[_i];
102026
102008
  }
102027
102009
  if (_this.isMatchPattern || _this.isRegExp) {
102028
102010
  throw new Error("".concat(_this.entire, " cannot be splice"));
102029
102011
  }
102030
- items5 = items5.reduce(function(buf, item) {
102012
+ items = items.reduce(function(buf, item) {
102031
102013
  return buf.concat(parseString(item));
102032
102014
  }, []);
102033
102015
  var segments_ = _this.segments.slice();
102034
- segments_.splice.apply(segments_, __spreadArray([start, deleteCount], __read(items5), false));
102016
+ segments_.splice.apply(segments_, __spreadArray([start, deleteCount], __read(items), false));
102035
102017
  return new Path2(segments_);
102036
102018
  };
102037
102019
  this.forEach = function(callback) {
@@ -107113,9 +107095,9 @@ var init_BaseField = __esmMin(() => {
107113
107095
  return Path.parse(pattern).matchAliasGroup(_this.address, _this.path);
107114
107096
  };
107115
107097
  this.inject = function(actions) {
107116
- each(actions, function(action3, key) {
107117
- if (isFn(action3)) {
107118
- _this.actions[key] = action3;
107098
+ each(actions, function(action2, key) {
107099
+ if (isFn(action2)) {
107100
+ _this.actions[key] = action2;
107119
107101
  }
107120
107102
  });
107121
107103
  };
@@ -108127,16 +108109,16 @@ var init_ArrayField = __esmMin(() => {
108127
108109
  var _this = _super.call(this, address, props, form, designable) || this;
108128
108110
  _this.displayName = "ArrayField";
108129
108111
  _this.push = function() {
108130
- var items5 = [];
108112
+ var items = [];
108131
108113
  for (var _i = 0; _i < arguments.length; _i++) {
108132
- items5[_i] = arguments[_i];
108114
+ items[_i] = arguments[_i];
108133
108115
  }
108134
108116
  return action(function() {
108135
108117
  var _a2;
108136
108118
  if (!isArr(_this.value)) {
108137
108119
  _this.value = [];
108138
108120
  }
108139
- (_a2 = _this.value).push.apply(_a2, __spreadArray6([], __read6(items5), false));
108121
+ (_a2 = _this.value).push.apply(_a2, __spreadArray6([], __read6(items), false));
108140
108122
  return _this.onInput(_this.value);
108141
108123
  });
108142
108124
  };
@@ -108154,9 +108136,9 @@ var init_ArrayField = __esmMin(() => {
108154
108136
  });
108155
108137
  };
108156
108138
  _this.insert = function(index) {
108157
- var items5 = [];
108139
+ var items = [];
108158
108140
  for (var _i = 1; _i < arguments.length; _i++) {
108159
- items5[_i - 1] = arguments[_i];
108141
+ items[_i - 1] = arguments[_i];
108160
108142
  }
108161
108143
  return action(function() {
108162
108144
  var _a2;
@@ -108165,9 +108147,9 @@ var init_ArrayField = __esmMin(() => {
108165
108147
  }
108166
108148
  spliceArrayState(_this, {
108167
108149
  startIndex: index,
108168
- insertCount: items5.length
108150
+ insertCount: items.length
108169
108151
  });
108170
- (_a2 = _this.value).splice.apply(_a2, __spreadArray6([index, 0], __read6(items5), false));
108152
+ (_a2 = _this.value).splice.apply(_a2, __spreadArray6([index, 0], __read6(items), false));
108171
108153
  return _this.onInput(_this.value);
108172
108154
  });
108173
108155
  };
@@ -108192,9 +108174,9 @@ var init_ArrayField = __esmMin(() => {
108192
108174
  });
108193
108175
  };
108194
108176
  _this.unshift = function() {
108195
- var items5 = [];
108177
+ var items = [];
108196
108178
  for (var _i = 0; _i < arguments.length; _i++) {
108197
- items5[_i] = arguments[_i];
108179
+ items[_i] = arguments[_i];
108198
108180
  }
108199
108181
  return action(function() {
108200
108182
  var _a2;
@@ -108203,9 +108185,9 @@ var init_ArrayField = __esmMin(() => {
108203
108185
  }
108204
108186
  spliceArrayState(_this, {
108205
108187
  startIndex: 0,
108206
- insertCount: items5.length
108188
+ insertCount: items.length
108207
108189
  });
108208
- (_a2 = _this.value).unshift.apply(_a2, __spreadArray6([], __read6(items5), false));
108190
+ (_a2 = _this.value).unshift.apply(_a2, __spreadArray6([], __read6(items), false));
108209
108191
  return _this.onInput(_this.value);
108210
108192
  });
108211
108193
  };
@@ -109244,7 +109226,7 @@ var init_transformer = __esmMin(() => {
109244
109226
  if (isFn(reaction2)) {
109245
109227
  return reaction2(field, baseScope);
109246
109228
  }
109247
- var when8 = reaction2.when, fulfill = reaction2.fulfill, otherwise = reaction2.otherwise, target = reaction2.target, effects = reaction2.effects;
109229
+ var when = reaction2.when, fulfill = reaction2.fulfill, otherwise = reaction2.otherwise, target = reaction2.target, effects = reaction2.effects;
109248
109230
  var run = function() {
109249
109231
  var $deps = getDependencies(field, reaction2.dependencies);
109250
109232
  var $dependencies = $deps;
@@ -109253,8 +109235,8 @@ var init_transformer = __esmMin(() => {
109253
109235
  $deps,
109254
109236
  $dependencies
109255
109237
  });
109256
- var compiledWhen = shallowCompile(when8, scope);
109257
- var condition = when8 ? compiledWhen : true;
109238
+ var compiledWhen = shallowCompile(when, scope);
109239
+ var condition = when ? compiledWhen : true;
109258
109240
  var request = condition ? fulfill : otherwise;
109259
109241
  var runner2 = condition ? fulfill === null || fulfill === void 0 ? void 0 : fulfill.run : otherwise === null || otherwise === void 0 ? void 0 : otherwise.run;
109260
109242
  setSchemaFieldState({
@@ -109574,10 +109556,10 @@ var init_schema = __esmMin(() => {
109574
109556
  }
109575
109557
  return _this.items;
109576
109558
  };
109577
- this.setAdditionalItems = function(items5) {
109578
- if (!items5)
109559
+ this.setAdditionalItems = function(items) {
109560
+ if (!items)
109579
109561
  return;
109580
- _this.additionalItems = new Schema2(items5, _this);
109562
+ _this.additionalItems = new Schema2(items, _this);
109581
109563
  return _this.additionalItems;
109582
109564
  };
109583
109565
  this.findDefinitions = function(ref2) {
@@ -110251,13 +110233,13 @@ var require_base4 = __commonJSMin((exports, module2) => {
110251
110233
  }
110252
110234
  handleSubmitEvents(submit) {
110253
110235
  const self3 = this;
110254
- const validate5 = runAsync(this.opt.validate);
110236
+ const validate2 = runAsync(this.opt.validate);
110255
110237
  const asyncFilter = runAsync(this.opt.filter);
110256
110238
  const validation = submit.pipe(flatMap((value) => {
110257
110239
  this.startSpinner(value, this.opt.filteringText);
110258
110240
  return asyncFilter(value, self3.answers).then((filteredValue) => {
110259
110241
  this.startSpinner(filteredValue, this.opt.validatingText);
110260
- return validate5(filteredValue, self3.answers).then((isValid5) => ({ isValid: isValid5, value: filteredValue }), (err) => ({ isValid: err, value: filteredValue }));
110242
+ return validate2(filteredValue, self3.answers).then((isValid5) => ({ isValid: isValid5, value: filteredValue }), (err) => ({ isValid: err, value: filteredValue }));
110261
110243
  }, (err) => ({ isValid: err }));
110262
110244
  }), share());
110263
110245
  const success = validation.pipe(filter3((state) => state.isValid === true), take(1));
@@ -111311,7 +111293,7 @@ function getQuestionFromSchema(schema) {
111311
111293
  return [];
111312
111294
  }
111313
111295
  var questions = fields.map(function(field) {
111314
- var _field = properties[field], type = _field.type, title = _field.title, defaultValue = _field["default"], items5 = _field["enum"], fieldValidate = _field["x-validate"], extra = _objectWithoutProperties(_field, _excluded2);
111296
+ var _field = properties[field], type = _field.type, title = _field.title, defaultValue = _field["default"], items = _field["enum"], fieldValidate = _field["x-validate"], extra = _objectWithoutProperties(_field, _excluded2);
111315
111297
  if (type === "void" || type === "object") {
111316
111298
  return getQuestionFromSchema(properties[field], configValue, validateMap, initValue);
111317
111299
  }
@@ -111369,16 +111351,16 @@ function getQuestionFromSchema(schema) {
111369
111351
  message: title || field,
111370
111352
  "default": initValue[field] || defaultValue,
111371
111353
  origin: extra,
111372
- validate: function validate5(input) {
111354
+ validate: function validate2(input) {
111373
111355
  return questionValidate(field, input);
111374
111356
  },
111375
111357
  when: !configValue[field]
111376
111358
  };
111377
- if (items5) {
111359
+ if (items) {
111378
111360
  if ((0, import_lodash.isArray)(defaultValue)) {
111379
111361
  return _objectSpread2(_objectSpread2({}, result), {}, {
111380
111362
  type: "checkbox",
111381
- choices: items5.map(function(item) {
111363
+ choices: items.map(function(item) {
111382
111364
  return {
111383
111365
  type: "choice",
111384
111366
  name: (0, import_lodash.isObject)(item) ? item.label : item,
@@ -111389,7 +111371,7 @@ function getQuestionFromSchema(schema) {
111389
111371
  }
111390
111372
  return _objectSpread2(_objectSpread2({}, result), {}, {
111391
111373
  type: "list",
111392
- choices: items5.map(function(item) {
111374
+ choices: items.map(function(item) {
111393
111375
  return {
111394
111376
  type: "choice",
111395
111377
  name: (0, import_lodash.isObject)(item) ? item.label : item,
@@ -111518,7 +111500,7 @@ var init_prompt = __esmMin(() => {
111518
111500
  return state;
111519
111501
  };
111520
111502
  handleXReactions = /* @__PURE__ */ function() {
111521
- var _ref = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(xReactions, answers, items5, item) {
111503
+ var _ref = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(xReactions, answers, items, item) {
111522
111504
  var answer, _iterator, _step, _loop;
111523
111505
  return _regeneratorRuntime().wrap(function _callee$(_context2) {
111524
111506
  while (1) {
@@ -111555,12 +111537,12 @@ var init_prompt = __esmMin(() => {
111555
111537
  value: answer[item.name]
111556
111538
  }),
111557
111539
  $values: answers,
111558
- $target: items5.find(function(it2) {
111540
+ $target: items.find(function(it2) {
111559
111541
  return it2.name === (xReaction === null || xReaction === void 0 ? void 0 : xReaction.target);
111560
111542
  })
111561
111543
  };
111562
111544
  state = xReaction !== null && xReaction !== void 0 && xReaction.when && !compileRule(xReaction === null || xReaction === void 0 ? void 0 : xReaction.when, _scope) ? compileRule(xReaction === null || xReaction === void 0 ? void 0 : (_xReaction$otherwise = xReaction.otherwise) === null || _xReaction$otherwise === void 0 ? void 0 : _xReaction$otherwise.state, _scope) : compileRule(xReaction === null || xReaction === void 0 ? void 0 : (_xReaction$fulfill = xReaction.fulfill) === null || _xReaction$fulfill === void 0 ? void 0 : _xReaction$fulfill.state, _scope);
111563
- _iterator2 = _createForOfIteratorHelper(items5);
111545
+ _iterator2 = _createForOfIteratorHelper(items);
111564
111546
  _context.prev = 12;
111565
111547
  _iterator2.s();
111566
111548
  case 14:
@@ -111610,7 +111592,7 @@ var init_prompt = __esmMin(() => {
111610
111592
  break;
111611
111593
  }
111612
111594
  dependencies3 = xReaction === null || xReaction === void 0 ? void 0 : xReaction.dependencies;
111613
- $dependencies = items5.filter(function(it2) {
111595
+ $dependencies = items.filter(function(it2) {
111614
111596
  return dependencies3.includes(it2.name);
111615
111597
  }).map(function(it2) {
111616
111598
  return answers[it2.name];
@@ -112736,7 +112718,6 @@ var init_zh = __esmMin(() => {
112736
112718
  sass: "\u542F\u7528 Sass \u652F\u6301",
112737
112719
  bff: "\u542F\u7528\u300CBFF\u300D\u529F\u80FD",
112738
112720
  micro_frontend: "\u542F\u7528\u300C\u5FAE\u524D\u7AEF\u300D\u6A21\u5F0F",
112739
- electron: "\u542F\u7528\u300CElectron\u300D\u6A21\u5F0F",
112740
112721
  i18n: "\u542F\u7528\u300C\u56FD\u9645\u5316\uFF08i18n\uFF09\u300D\u529F\u80FD",
112741
112722
  test: "\u542F\u7528\u300C\u5355\u5143\u6D4B\u8BD5 / \u96C6\u6210\u6D4B\u8BD5\u300D\u529F\u80FD",
112742
112723
  e2e_test: "\u542F\u7528\u300CE2E \u6D4B\u8BD5\u300D\u529F\u80FD",
@@ -112755,7 +112736,7 @@ var init_zh = __esmMin(() => {
112755
112736
  },
112756
112737
  refactor: {
112757
112738
  self: "\u81EA\u52A8\u91CD\u6784",
112758
- bff_to_app: "BFF \u5207\u6362\u6846\u67B6\u6A21\u5F0F"
112739
+ react_router_5: "\u4F7F\u7528 React Router v5"
112759
112740
  }
112760
112741
  },
112761
112742
  "boolean": {
@@ -112768,11 +112749,6 @@ var init_zh = __esmMin(() => {
112768
112749
  packageManager: {
112769
112750
  self: "\u8BF7\u9009\u62E9\u5305\u7BA1\u7406\u5DE5\u5177"
112770
112751
  },
112771
- runWay: {
112772
- self: "\u662F\u5426\u9700\u8981\u652F\u6301\u4EE5\u4E0B\u7C7B\u578B\u5E94\u7528",
112773
- no: "\u4E0D\u9700\u8981",
112774
- electron: "Electron"
112775
- },
112776
112752
  entry: {
112777
112753
  name: "\u8BF7\u586B\u5199\u5165\u53E3\u540D\u79F0",
112778
112754
  no_empty: "\u5165\u53E3\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\uFF01",
@@ -112841,7 +112817,6 @@ var init_en = __esmMin(() => {
112841
112817
  sass: "Enable Sass",
112842
112818
  bff: "Enable BFF",
112843
112819
  micro_frontend: "Enable Micro Frontend",
112844
- electron: "Enable Electron",
112845
112820
  i18n: "Enable Internationalization (i18n)",
112846
112821
  test: "Enable Unit Test / Integration Test",
112847
112822
  e2e_test: "Enable E2E Test",
@@ -112860,7 +112835,7 @@ var init_en = __esmMin(() => {
112860
112835
  },
112861
112836
  refactor: {
112862
112837
  self: "Automatic refactor",
112863
- bff_to_app: "Transform BFF to frame mode"
112838
+ react_router_5: "Use React Router v5"
112864
112839
  }
112865
112840
  },
112866
112841
  "boolean": {
@@ -112883,11 +112858,6 @@ var init_en = __esmMin(() => {
112883
112858
  no_empty: "The package path cannot be empty!",
112884
112859
  format: "Only lowercase letters, numbers and delimiters (-), and underscore (_), and directory delimiters (/) can be used in package path."
112885
112860
  },
112886
- runWay: {
112887
- self: "Do you need to support the following types of applications",
112888
- no: "Not Enabled",
112889
- electron: "Electron"
112890
- },
112891
112861
  entry: {
112892
112862
  name: "Entry name",
112893
112863
  no_empty: "The entry name cannot be empty!",
@@ -112926,7 +112896,7 @@ var init_locale2 = __esmMin(() => {
112926
112896
  en: EN_LOCALE
112927
112897
  });
112928
112898
  });
112929
- var _BooleanConfigName, BooleanConfig, BooleanConfigName, BooleanSchemas;
112899
+ var _BooleanConfigName, BooleanConfig, BooleanConfigName, getBooleanSchemas;
112930
112900
  var init_boolean = __esmMin(() => {
112931
112901
  init_defineProperty();
112932
112902
  init_locale2();
@@ -112939,13 +112909,15 @@ var init_boolean = __esmMin(() => {
112939
112909
  }), _defineProperty(_BooleanConfigName, BooleanConfig.YES, function() {
112940
112910
  return i18n.t(localeKeys["boolean"].yes);
112941
112911
  }), _BooleanConfigName);
112942
- BooleanSchemas = [{
112943
- key: BooleanConfig.NO,
112944
- label: BooleanConfigName[BooleanConfig.NO]
112945
- }, {
112946
- key: BooleanConfig.YES,
112947
- label: BooleanConfigName[BooleanConfig.YES]
112948
- }];
112912
+ getBooleanSchemas = function getBooleanSchemas2() {
112913
+ return [{
112914
+ value: BooleanConfig.NO,
112915
+ label: BooleanConfigName[BooleanConfig.NO]()
112916
+ }, {
112917
+ value: BooleanConfig.YES,
112918
+ label: BooleanConfigName[BooleanConfig.YES]()
112919
+ }];
112920
+ };
112949
112921
  });
112950
112922
  function getSolutionNameFromSubSolution(solution) {
112951
112923
  if (solution === SubSolution.MWATest) {
@@ -112956,7 +112928,7 @@ function getSolutionNameFromSubSolution(solution) {
112956
112928
  }
112957
112929
  return solution;
112958
112930
  }
112959
- var _SolutionText, _SubSolutionText, _SolutionToolsMap, _SolutionGenerator, _SubSolutionGenerator, Solution, SubSolution, SolutionText, SubSolutionText, SolutionToolsMap, SolutionSchema, SubSolutionSchema, BaseGenerator, SolutionGenerator, SubSolutionGenerator, ChangesetGenerator, DependenceGenerator, EntryGenerator, ElectronGenerator, EslintGenerator;
112931
+ var _SolutionText, _SubSolutionText, _SolutionToolsMap, _SolutionGenerator, _SubSolutionGenerator, Solution, SubSolution, SolutionText, SubSolutionText, SolutionToolsMap, getSolutionSchema, getScenesSchema, BaseGenerator, SolutionGenerator, SubSolutionGenerator, ChangesetGenerator, DependenceGenerator, EntryGenerator, EslintGenerator;
112960
112932
  var init_solution = __esmMin(() => {
112961
112933
  init_toConsumableArray();
112962
112934
  init_defineProperty();
@@ -112989,114 +112961,64 @@ var init_solution = __esmMin(() => {
112989
112961
  return i18n.t(localeKeys.sub_solution.inner_module);
112990
112962
  }), _SubSolutionText);
112991
112963
  SolutionToolsMap = (_SolutionToolsMap = {}, _defineProperty(_SolutionToolsMap, Solution.MWA, "@modern-js/app-tools"), _defineProperty(_SolutionToolsMap, Solution.Module, "@modern-js/module-tools"), _defineProperty(_SolutionToolsMap, Solution.Monorepo, "@modern-js/monorepo-tools"), _SolutionToolsMap);
112992
- SolutionSchema = {
112993
- key: "solution_schema",
112994
- isObject: true,
112995
- items: [{
112996
- key: "solution",
112997
- label: function label() {
112998
- return i18n.t(localeKeys.solution.self);
112999
- },
113000
- type: ["string"],
113001
- mutualExclusion: true,
113002
- items: function items(_data, extra) {
113003
- var _extra$customPlugin, _extra$customPlugin$c;
113004
- var items5 = ((extra === null || extra === void 0 ? void 0 : extra.solutions) || Object.values(Solution)).filter(function(solution) {
113005
- return !(extra !== null && extra !== void 0 && extra.isSubProject && solution === Solution.Monorepo);
113006
- }).map(function(solution) {
113007
- return {
113008
- key: solution,
113009
- label: SolutionText[solution]
113010
- };
113011
- });
113012
- if (extra !== null && extra !== void 0 && (_extra$customPlugin = extra.customPlugin) !== null && _extra$customPlugin !== void 0 && (_extra$customPlugin$c = _extra$customPlugin.custom) !== null && _extra$customPlugin$c !== void 0 && _extra$customPlugin$c.length) {
113013
- return [].concat(_toConsumableArray(items5), [{
113014
- key: "custom",
113015
- label: i18n.t(localeKeys.solution.custom)
113016
- }]);
113017
- }
113018
- return items5;
113019
- }
113020
- }, {
113021
- key: "scenes",
113022
- label: function label2() {
113023
- return i18n.t(localeKeys.scenes.self);
113024
- },
113025
- type: ["string"],
113026
- mutualExclusion: true,
113027
- when: function when(data, extra) {
113028
- return (extra === null || extra === void 0 ? void 0 : extra.customPlugin) && extra.customPlugin[data.solution] && extra.customPlugin[data.solution].length > 0;
113029
- },
113030
- items: function items2(data, extra) {
113031
- var items5 = (extra !== null && extra !== void 0 && extra.customPlugin ? (extra === null || extra === void 0 ? void 0 : extra.customPlugin[data.solution]) || [] : []).map(function(plugin) {
113032
- return {
113033
- key: plugin.key,
113034
- label: plugin.name
113035
- };
113036
- });
113037
- if (data.solution && data.solution !== "custom") {
113038
- items5.unshift({
113039
- key: data.solution,
113040
- label: "".concat(SolutionText[data.solution](), "(").concat(i18n.t(localeKeys.solution["default"]), ")")
113041
- });
112964
+ getSolutionSchema = function getSolutionSchema2() {
112965
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
112966
+ return {
112967
+ type: "object",
112968
+ properties: {
112969
+ solution: {
112970
+ type: "string",
112971
+ title: extra.isMonorepo ? i18n.t(localeKeys.sub_solution.self) : i18n.t(localeKeys.solution.self),
112972
+ "enum": function() {
112973
+ var _extra$customPlugin, _extra$customPlugin$c;
112974
+ var items = ((extra === null || extra === void 0 ? void 0 : extra.solutions) || Object.values(extra !== null && extra !== void 0 && extra.isMonorepo ? SubSolution : Solution)).filter(function(solution) {
112975
+ return !(extra !== null && extra !== void 0 && extra.isSubProject && solution === Solution.Monorepo);
112976
+ }).map(function(solution) {
112977
+ return {
112978
+ value: solution,
112979
+ label: extra !== null && extra !== void 0 && extra.isMonorepo ? SubSolutionText[solution]() : SolutionText[solution]()
112980
+ };
112981
+ });
112982
+ if (extra !== null && extra !== void 0 && (_extra$customPlugin = extra.customPlugin) !== null && _extra$customPlugin !== void 0 && (_extra$customPlugin$c = _extra$customPlugin.custom) !== null && _extra$customPlugin$c !== void 0 && _extra$customPlugin$c.length) {
112983
+ return [].concat(_toConsumableArray(items), [{
112984
+ value: "custom",
112985
+ label: i18n.t(localeKeys.solution.custom)
112986
+ }]);
112987
+ }
112988
+ return items;
112989
+ }()
113042
112990
  }
113043
- return items5;
113044
112991
  }
113045
- }]
112992
+ };
113046
112993
  };
113047
- SubSolutionSchema = {
113048
- key: "sub_solution_schema",
113049
- isObject: true,
113050
- items: [{
113051
- key: "solution",
113052
- label: function label3() {
113053
- return i18n.t(localeKeys.sub_solution.self);
113054
- },
113055
- type: ["string"],
113056
- mutualExclusion: true,
113057
- items: function items3(_data, extra) {
113058
- var _extra$customPlugin2, _extra$customPlugin2$;
113059
- var items5 = Object.values(SubSolution).map(function(solution) {
113060
- return {
113061
- key: solution,
113062
- label: SubSolutionText[solution]
113063
- };
113064
- });
113065
- if (extra !== null && extra !== void 0 && (_extra$customPlugin2 = extra.customPlugin) !== null && _extra$customPlugin2 !== void 0 && (_extra$customPlugin2$ = _extra$customPlugin2.custom) !== null && _extra$customPlugin2$ !== void 0 && _extra$customPlugin2$.length) {
113066
- return [].concat(_toConsumableArray(items5), [{
113067
- key: "custom",
113068
- label: i18n.t(localeKeys.solution.custom)
113069
- }]);
113070
- }
113071
- return items5;
113072
- }
113073
- }, {
113074
- key: "scenes",
113075
- label: function label4() {
113076
- return i18n.t(localeKeys.scenes.self);
113077
- },
113078
- type: ["string"],
113079
- mutualExclusion: true,
113080
- when: function when2(data, extra) {
113081
- return (extra === null || extra === void 0 ? void 0 : extra.customPlugin) && extra.customPlugin[getSolutionNameFromSubSolution(data.solution)] && extra.customPlugin[getSolutionNameFromSubSolution(data.solution)].length > 0;
113082
- },
113083
- items: function items4(data, extra) {
113084
- var solution = getSolutionNameFromSubSolution(data.solution);
113085
- var items5 = (extra !== null && extra !== void 0 && extra.customPlugin ? (extra === null || extra === void 0 ? void 0 : extra.customPlugin[solution]) || [] : []).map(function(plugin) {
113086
- return {
113087
- key: plugin.key,
113088
- label: plugin.name
113089
- };
113090
- });
113091
- if (data.solution && data.solution !== "custom") {
113092
- items5.unshift({
113093
- key: data.solution,
113094
- label: "".concat(SubSolutionText[data.solution](), "(").concat(i18n.t(localeKeys.solution["default"]), ")")
113095
- });
112994
+ getScenesSchema = function getScenesSchema2() {
112995
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
112996
+ var hasPlugin = (extra === null || extra === void 0 ? void 0 : extra.customPlugin) && extra.customPlugin[extra !== null && extra !== void 0 && extra.isMonorepoSubProject ? getSolutionNameFromSubSolution(extra === null || extra === void 0 ? void 0 : extra.solution) : extra === null || extra === void 0 ? void 0 : extra.solution] && extra.customPlugin[extra !== null && extra !== void 0 && extra.isMonorepoSubProject ? getSolutionNameFromSubSolution(extra === null || extra === void 0 ? void 0 : extra.solution) : extra === null || extra === void 0 ? void 0 : extra.solution].length > 0;
112997
+ return {
112998
+ type: "object",
112999
+ properties: hasPlugin ? {
113000
+ scenes: {
113001
+ type: "string",
113002
+ title: i18n.t(localeKeys.scenes.self),
113003
+ "enum": function() {
113004
+ var solution = extra !== null && extra !== void 0 && extra.isMonorepoSubProject ? getSolutionNameFromSubSolution(extra === null || extra === void 0 ? void 0 : extra.solution) : extra === null || extra === void 0 ? void 0 : extra.solution;
113005
+ var items = (extra !== null && extra !== void 0 && extra.customPlugin ? (extra === null || extra === void 0 ? void 0 : extra.customPlugin[solution]) || [] : []).map(function(plugin) {
113006
+ return {
113007
+ value: plugin.key,
113008
+ label: plugin.name
113009
+ };
113010
+ });
113011
+ if (solution && solution !== "custom") {
113012
+ items.unshift({
113013
+ value: solution,
113014
+ label: "".concat(extra !== null && extra !== void 0 && extra.isMonorepoSubProject ? SubSolutionText[solution]() : SolutionText[solution](), "(").concat(i18n.t(localeKeys.solution["default"]), ")")
113015
+ });
113016
+ }
113017
+ return items;
113018
+ }()
113096
113019
  }
113097
- return items5;
113098
- }
113099
- }]
113020
+ } : {}
113021
+ };
113100
113022
  };
113101
113023
  BaseGenerator = "@modern-js/base-generator";
113102
113024
  SolutionGenerator = (_SolutionGenerator = {}, _defineProperty(_SolutionGenerator, Solution.MWA, "@modern-js/mwa-generator"), _defineProperty(_SolutionGenerator, Solution.Module, "@modern-js/module-generator"), _defineProperty(_SolutionGenerator, Solution.Monorepo, "@modern-js/monorepo-generator"), _SolutionGenerator);
@@ -113104,10 +113026,9 @@ var init_solution = __esmMin(() => {
113104
113026
  ChangesetGenerator = "@modern-js/changeset-generator";
113105
113027
  DependenceGenerator = "@modern-js/dependence-generator";
113106
113028
  EntryGenerator = "@modern-js/entry-generator";
113107
- ElectronGenerator = "@modern-js/electron-generator";
113108
113029
  EslintGenerator = "@modern-js/eslint-generator";
113109
113030
  });
113110
- var _LanguageName, Language, LanguageName, LanguageSchema;
113031
+ var _LanguageName, Language, LanguageName, getLanguageSchema;
113111
113032
  var init_language = __esmMin(() => {
113112
113033
  init_defineProperty();
113113
113034
  init_locale2();
@@ -113115,27 +113036,22 @@ var init_language = __esmMin(() => {
113115
113036
  Language2["TS"] = "ts";
113116
113037
  Language2["JS"] = "js";
113117
113038
  })(Language || (Language = {}));
113118
- LanguageName = (_LanguageName = {}, _defineProperty(_LanguageName, Language.TS, function() {
113119
- return "TS";
113120
- }), _defineProperty(_LanguageName, Language.JS, function() {
113121
- return "ES6+";
113122
- }), _LanguageName);
113123
- LanguageSchema = {
113124
- key: "language",
113125
- type: ["string"],
113126
- label: function label5() {
113127
- return i18n.t(localeKeys.language.self);
113128
- },
113129
- mutualExclusion: true,
113130
- items: Object.values(Language).map(function(language) {
113131
- return {
113132
- key: language,
113133
- label: LanguageName[language]
113134
- };
113135
- })
113039
+ LanguageName = (_LanguageName = {}, _defineProperty(_LanguageName, Language.TS, "TS"), _defineProperty(_LanguageName, Language.JS, "ES6+"), _LanguageName);
113040
+ getLanguageSchema = function getLanguageSchema2() {
113041
+ var _extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113042
+ return {
113043
+ type: "string",
113044
+ title: i18n.t(localeKeys.language.self),
113045
+ "enum": Object.values(Language).map(function(language) {
113046
+ return {
113047
+ value: language,
113048
+ label: LanguageName[language]
113049
+ };
113050
+ })
113051
+ };
113136
113052
  };
113137
113053
  });
113138
- var _PackageManagerName, PackageManager, PackageManagerName, PackageManagerSchema;
113054
+ var _PackageManagerName, PackageManager, PackageManagerName, getPackageManagerSchema;
113139
113055
  var init_package_manager = __esmMin(() => {
113140
113056
  init_defineProperty();
113141
113057
  init_locale2();
@@ -113144,94 +113060,83 @@ var init_package_manager = __esmMin(() => {
113144
113060
  PackageManager2["Yarn"] = "yarn";
113145
113061
  PackageManager2["Npm"] = "npm";
113146
113062
  })(PackageManager || (PackageManager = {}));
113147
- PackageManagerName = (_PackageManagerName = {}, _defineProperty(_PackageManagerName, PackageManager.Pnpm, function() {
113148
- return "pnpm";
113149
- }), _defineProperty(_PackageManagerName, PackageManager.Yarn, function() {
113150
- return "Yarn";
113151
- }), _defineProperty(_PackageManagerName, PackageManager.Npm, function() {
113152
- return "npm";
113153
- }), _PackageManagerName);
113154
- PackageManagerSchema = {
113155
- key: "packageManager",
113156
- type: ["string"],
113157
- label: function label6() {
113158
- return i18n.t(localeKeys.packageManager.self);
113159
- },
113160
- mutualExclusion: true,
113161
- when: function when3(_values, extra) {
113162
- return !(extra !== null && extra !== void 0 && extra.isMonorepoSubProject) && !(extra !== null && extra !== void 0 && extra.isSubProject);
113163
- },
113164
- items: Object.values(PackageManager).map(function(packageManager) {
113165
- return {
113166
- key: packageManager,
113167
- label: PackageManagerName[packageManager]
113168
- };
113169
- })
113063
+ PackageManagerName = (_PackageManagerName = {}, _defineProperty(_PackageManagerName, PackageManager.Pnpm, "pnpm"), _defineProperty(_PackageManagerName, PackageManager.Yarn, "Yarn"), _defineProperty(_PackageManagerName, PackageManager.Npm, "npm"), _PackageManagerName);
113064
+ getPackageManagerSchema = function getPackageManagerSchema2() {
113065
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113066
+ return {
113067
+ type: "string",
113068
+ title: i18n.t(localeKeys.packageManager.self),
113069
+ "enum": Object.values(PackageManager).filter(function(packageManager) {
113070
+ return (extra === null || extra === void 0 ? void 0 : extra.solution) === "monorepo" ? packageManager !== PackageManager.Npm : true;
113071
+ }).map(function(packageManager) {
113072
+ return {
113073
+ value: packageManager,
113074
+ label: PackageManagerName[packageManager]
113075
+ };
113076
+ }),
113077
+ "x-reactions": [{
113078
+ dependencies: [],
113079
+ fulfill: {
113080
+ state: {
113081
+ visible: !(extra !== null && extra !== void 0 && extra.isMonorepoSubProject) && !(extra !== null && extra !== void 0 && extra.isSubProject)
113082
+ }
113083
+ }
113084
+ }]
113085
+ };
113170
113086
  };
113171
113087
  });
113172
- var PackageNameSchema;
113088
+ var getPackageNameSchema;
113173
113089
  var init_package_name = __esmMin(() => {
113174
113090
  init_locale2();
113175
- PackageNameSchema = {
113176
- key: "packageName",
113177
- label: function label7(_, extra) {
113178
- return extra !== null && extra !== void 0 && extra.isMonorepoSubProject ? i18n.t(localeKeys.packageName.sub_name) : i18n.t(localeKeys.packageName.self);
113179
- },
113180
- type: ["string"],
113181
- when: function when4(_, extra) {
113182
- return Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) || !(extra !== null && extra !== void 0 && extra.isMwa);
113183
- },
113184
- validate: function validate2(value) {
113185
- if (!value) {
113186
- return {
113187
- success: false,
113188
- error: i18n.t(localeKeys.packageName.no_empty)
113189
- };
113091
+ getPackageNameSchema = function getPackageNameSchema2() {
113092
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113093
+ return {
113094
+ type: "string",
113095
+ title: extra !== null && extra !== void 0 && extra.isMonorepoSubProject ? i18n.t(localeKeys.packageName.sub_name) : i18n.t(localeKeys.packageName.self),
113096
+ "x-reactions": [{
113097
+ dependencies: [],
113098
+ fulfill: {
113099
+ state: {
113100
+ visible: Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) || !(extra !== null && extra !== void 0 && extra.isMwa)
113101
+ }
113102
+ }
113103
+ }],
113104
+ "x-validate": function xValidate(value) {
113105
+ if (!value) {
113106
+ return i18n.t(localeKeys.packageName.no_empty);
113107
+ }
113108
+ return "";
113190
113109
  }
113191
- return {
113192
- success: true
113193
- };
113194
- }
113110
+ };
113195
113111
  };
113196
113112
  });
113197
- var PackagePathRegex, PackagePathSchema;
113113
+ var PackagePathRegex, getPackagePathSchema;
113198
113114
  var init_package_path = __esmMin(() => {
113199
113115
  init_locale2();
113200
113116
  PackagePathRegex = new RegExp("^[a-z0-9]*[-_/]?([a-z0-9]*[-_]?[a-z0-9]*)*[-_/]?[a-z0-9-_]+$");
113201
- PackagePathSchema = {
113202
- key: "packagePath",
113203
- label: function label8() {
113204
- return i18n.t(localeKeys.packagePath.self);
113205
- },
113206
- type: ["string"],
113207
- when: function when5(_, extra) {
113208
- return Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject);
113209
- },
113210
- state: {
113211
- value: {
113212
- effectedByFields: ["packageName"],
113213
- action: function action2(data) {
113214
- return "".concat(data.packageName || "");
113117
+ getPackagePathSchema = function getPackagePathSchema2(extra) {
113118
+ return {
113119
+ type: "string",
113120
+ title: i18n.t(localeKeys.packagePath.self),
113121
+ "x-reactions": [{
113122
+ dependencies: ["packageName"],
113123
+ fulfill: {
113124
+ state: {
113125
+ value: "{{$deps[0]}}",
113126
+ visible: Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject)
113127
+ }
113128
+ }
113129
+ }],
113130
+ "x-validate": function xValidate(value) {
113131
+ if (!value) {
113132
+ return i18n.t(localeKeys.packagePath.no_empty);
113215
113133
  }
113134
+ if (!PackagePathRegex.test(value)) {
113135
+ return i18n.t(localeKeys.packagePath.format);
113136
+ }
113137
+ return "";
113216
113138
  }
113217
- },
113218
- validate: function validate3(value) {
113219
- if (!value) {
113220
- return {
113221
- success: false,
113222
- error: i18n.t(localeKeys.packagePath.no_empty)
113223
- };
113224
- }
113225
- if (!PackagePathRegex.test(value)) {
113226
- return {
113227
- success: false,
113228
- error: i18n.t(localeKeys.packagePath.format)
113229
- };
113230
- }
113231
- return {
113232
- success: true
113233
- };
113234
- }
113139
+ };
113235
113140
  };
113236
113141
  });
113237
113142
  var init_common = __esmMin(() => {
@@ -113242,14 +113147,17 @@ var init_common = __esmMin(() => {
113242
113147
  init_package_name();
113243
113148
  init_package_path();
113244
113149
  });
113245
- var BaseSchemas, BaseSchema, BaseDefaultConfig;
113150
+ var getBaseSchema, BaseDefaultConfig;
113246
113151
  var init_project = __esmMin(() => {
113247
113152
  init_common();
113248
- BaseSchemas = [PackageManagerSchema];
113249
- BaseSchema = {
113250
- key: "base",
113251
- isObject: true,
113252
- items: BaseSchemas
113153
+ getBaseSchema = function getBaseSchema2() {
113154
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113155
+ return {
113156
+ type: "object",
113157
+ properties: {
113158
+ packageManager: getPackageManagerSchema(extra)
113159
+ }
113160
+ };
113253
113161
  };
113254
113162
  BaseDefaultConfig = {
113255
113163
  packageManager: PackageManager.Pnpm
@@ -113258,14 +113166,23 @@ var init_project = __esmMin(() => {
113258
113166
  var init_base = __esmMin(() => {
113259
113167
  init_project();
113260
113168
  });
113261
- var ModuleSchemas, ModuleSchema, ModuleDefaultConfig;
113169
+ var getModuleSchemaProperties, getModuleSchema, ModuleDefaultConfig;
113262
113170
  var init_project2 = __esmMin(() => {
113263
113171
  init_common();
113264
- ModuleSchemas = [PackageNameSchema, PackagePathSchema, LanguageSchema, PackageManagerSchema];
113265
- ModuleSchema = {
113266
- key: "module",
113267
- isObject: true,
113268
- items: ModuleSchemas
113172
+ getModuleSchemaProperties = function getModuleSchemaProperties2(extra) {
113173
+ return {
113174
+ packageName: getPackageNameSchema(extra),
113175
+ packagePath: getPackagePathSchema(extra),
113176
+ language: getLanguageSchema(extra),
113177
+ packageManager: getPackageManagerSchema(extra)
113178
+ };
113179
+ };
113180
+ getModuleSchema = function getModuleSchema2() {
113181
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113182
+ return {
113183
+ type: "object",
113184
+ properties: getModuleSchemaProperties(extra)
113185
+ };
113269
113186
  };
113270
113187
  ModuleDefaultConfig = {
113271
113188
  language: Language.TS,
@@ -113275,20 +113192,17 @@ var init_project2 = __esmMin(() => {
113275
113192
  var init_module = __esmMin(() => {
113276
113193
  init_project2();
113277
113194
  });
113278
- var MonorepoPackageManagerSchema, MonorepoSchemas, MonorepoSchema, MonorepoDefaultConfig;
113195
+ var getMonorepoSchema, MonorepoDefaultConfig;
113279
113196
  var init_project3 = __esmMin(() => {
113280
- init_objectSpread2();
113281
113197
  init_common();
113282
- MonorepoPackageManagerSchema = _objectSpread2(_objectSpread2({}, PackageManagerSchema), {}, {
113283
- items: PackageManagerSchema.items.filter(function(item) {
113284
- return item.key !== PackageManager.Npm;
113285
- })
113286
- });
113287
- MonorepoSchemas = [MonorepoPackageManagerSchema];
113288
- MonorepoSchema = {
113289
- key: "monorepo",
113290
- isObject: true,
113291
- items: MonorepoSchemas
113198
+ getMonorepoSchema = function getMonorepoSchema2() {
113199
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113200
+ return {
113201
+ type: "object",
113202
+ properties: {
113203
+ packageManager: getPackageManagerSchema(extra)
113204
+ }
113205
+ };
113292
113206
  };
113293
113207
  MonorepoDefaultConfig = {
113294
113208
  packageManager: PackageManager.Pnpm
@@ -113297,75 +113211,45 @@ var init_project3 = __esmMin(() => {
113297
113211
  var init_monorepo = __esmMin(() => {
113298
113212
  init_project3();
113299
113213
  });
113300
- var _FrameworkAppendTypeC, mwaConfigWhenFunc, RunWay, RunWaySchema, ClientRoute, ClientRouteSchema, NeedModifyMWAConfigSchema, Framework, FrameworkSchema, FrameworkAppendTypeContent;
113214
+ var _FrameworkAppendTypeC, ClientRoute, getClientRouteSchema, getNeedModifyMWAConfigSchema, Framework, getFrameworkSchema, FrameworkAppendTypeContent;
113301
113215
  var init_common2 = __esmMin(() => {
113302
113216
  init_defineProperty();
113303
113217
  init_locale2();
113304
113218
  init_boolean();
113305
- mwaConfigWhenFunc = function mwaConfigWhenFunc2(values) {
113306
- return values.needModifyMWAConfig === BooleanConfig.YES;
113307
- };
113308
- (function(RunWay2) {
113309
- RunWay2["No"] = "no";
113310
- RunWay2["Electron"] = "electron";
113311
- })(RunWay || (RunWay = {}));
113312
- RunWaySchema = {
113313
- key: "runWay",
113314
- type: ["string"],
113315
- label: function label9() {
113316
- return i18n.t(localeKeys.runWay.self);
113317
- },
113318
- mutualExclusion: true,
113319
- when: function when6(_, extra) {
113320
- return (extra === null || extra === void 0 ? void 0 : extra.isEmptySrc) === void 0 ? true : Boolean(extra === null || extra === void 0 ? void 0 : extra.isEmptySrc);
113321
- },
113322
- state: {
113323
- value: RunWay.No
113324
- },
113325
- items: Object.values(RunWay).map(function(runWay) {
113326
- return {
113327
- key: runWay,
113328
- label: function label21() {
113329
- return i18n.t(localeKeys.runWay[runWay]);
113330
- }
113331
- };
113332
- })
113333
- };
113334
113219
  (function(ClientRoute2) {
113335
113220
  ClientRoute2["SelfControlRoute"] = "selfControlRoute";
113336
113221
  ClientRoute2["ConventionalRoute"] = "conventionalRoute";
113337
113222
  })(ClientRoute || (ClientRoute = {}));
113338
- ClientRouteSchema = {
113339
- key: "clientRoute",
113340
- type: ["string"],
113341
- label: function label10() {
113342
- return i18n.t(localeKeys.entry.clientRoute.self);
113343
- },
113344
- mutualExclusion: true,
113345
- when: mwaConfigWhenFunc,
113346
- state: {
113347
- value: ClientRoute.SelfControlRoute
113348
- },
113349
- items: Object.values(ClientRoute).map(function(clientRoute) {
113350
- return {
113351
- key: clientRoute,
113352
- label: function label21() {
113353
- return i18n.t(localeKeys.entry.clientRoute[clientRoute]);
113223
+ getClientRouteSchema = function getClientRouteSchema2() {
113224
+ var _extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113225
+ return {
113226
+ type: "string",
113227
+ title: i18n.t(localeKeys.entry.clientRoute.self),
113228
+ "default": ClientRoute.SelfControlRoute,
113229
+ "enum": Object.values(ClientRoute).map(function(clientRoute) {
113230
+ return {
113231
+ value: clientRoute,
113232
+ label: i18n.t(localeKeys.entry.clientRoute[clientRoute])
113233
+ };
113234
+ }),
113235
+ "x-reactions": [{
113236
+ dependencies: ["needModifyMWAConfig"],
113237
+ fulfill: {
113238
+ state: {
113239
+ visible: '{{$deps[0]=== "'.concat(BooleanConfig.YES, '"}}')
113240
+ }
113354
113241
  }
113355
- };
113356
- })
113242
+ }]
113243
+ };
113357
113244
  };
113358
- NeedModifyMWAConfigSchema = {
113359
- key: "needModifyMWAConfig",
113360
- label: function label11() {
113361
- return i18n.t(localeKeys.entry.needModifyConfig);
113362
- },
113363
- type: ["string"],
113364
- mutualExclusion: true,
113365
- state: {
113366
- value: BooleanConfig.NO
113367
- },
113368
- items: BooleanSchemas
113245
+ getNeedModifyMWAConfigSchema = function getNeedModifyMWAConfigSchema2() {
113246
+ var _extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113247
+ return {
113248
+ type: "string",
113249
+ title: i18n.t(localeKeys.entry.needModifyConfig),
113250
+ "default": BooleanConfig.NO,
113251
+ "enum": getBooleanSchemas()
113252
+ };
113369
113253
  };
113370
113254
  (function(Framework2) {
113371
113255
  Framework2["Express"] = "express";
@@ -113373,77 +113257,71 @@ var init_common2 = __esmMin(() => {
113373
113257
  Framework2["Egg"] = "egg";
113374
113258
  Framework2["Nest"] = "nest";
113375
113259
  })(Framework || (Framework = {}));
113376
- FrameworkSchema = {
113377
- key: "framework",
113378
- type: ["string"],
113379
- label: function label12() {
113380
- return i18n.t(localeKeys.framework.self);
113381
- },
113382
- mutualExclusion: true,
113383
- items: Object.values(Framework).map(function(framework) {
113384
- return {
113385
- key: framework,
113386
- label: function label21() {
113387
- return i18n.t(localeKeys.framework[framework]);
113388
- }
113389
- };
113390
- })
113260
+ getFrameworkSchema = function getFrameworkSchema2() {
113261
+ var _extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113262
+ return {
113263
+ type: "string",
113264
+ title: i18n.t(localeKeys.framework.self),
113265
+ "enum": Object.values(Framework).map(function(framework) {
113266
+ return {
113267
+ value: framework,
113268
+ label: i18n.t(localeKeys.framework[framework])
113269
+ };
113270
+ })
113271
+ };
113391
113272
  };
113392
113273
  FrameworkAppendTypeContent = (_FrameworkAppendTypeC = {}, _defineProperty(_FrameworkAppendTypeC, Framework.Express, "/// <reference types='@modern-js/plugin-express/types' />"), _defineProperty(_FrameworkAppendTypeC, Framework.Koa, "/// <reference types='@modern-js/plugin-koa/types' />"), _defineProperty(_FrameworkAppendTypeC, Framework.Egg, "/// <reference types='@modern-js/plugin-egg/types' />"), _defineProperty(_FrameworkAppendTypeC, Framework.Nest, "/// <reference types='@modern-js/plugin-nest/types' />"), _FrameworkAppendTypeC);
113393
113274
  });
113394
- var EntryNameSchema, EntrySchemas, EntrySchema, MWADefaultEntryConfig;
113275
+ var getEntryNameSchema, getEntrySchemaProperties, getEntrySchema, MWADefaultEntryConfig;
113395
113276
  var init_entry = __esmMin(() => {
113396
113277
  init_locale2();
113397
113278
  init_common();
113398
113279
  init_common2();
113399
- EntryNameSchema = {
113400
- key: "name",
113401
- type: ["string"],
113402
- label: function label13() {
113403
- return i18n.t(localeKeys.entry.name);
113404
- },
113405
- state: {
113406
- value: "entry"
113407
- },
113408
- validate: function validate4(value) {
113409
- if (!value) {
113410
- return {
113411
- success: false,
113412
- error: i18n.t(localeKeys.entry.no_empty)
113413
- };
113414
- }
113415
- if (value === "pages") {
113416
- return {
113417
- success: false,
113418
- error: i18n.t(localeKeys.entry.no_pages)
113419
- };
113420
- }
113421
- return {
113422
- success: true
113423
- };
113424
- },
113425
- when: function when7(_values, extra) {
113426
- if (extra !== null && extra !== void 0 && extra.isEmptySrc) {
113427
- return false;
113428
- }
113429
- return true;
113430
- }
113280
+ getEntryNameSchema = function getEntryNameSchema2() {
113281
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113282
+ return {
113283
+ type: "string",
113284
+ title: i18n.t(localeKeys.entry.name),
113285
+ "default": "entry",
113286
+ "x-validate": function xValidate(value) {
113287
+ if (!value) {
113288
+ return i18n.t(localeKeys.entry.no_empty);
113289
+ }
113290
+ if (value === "pages") {
113291
+ return i18n.t(localeKeys.entry.no_pages);
113292
+ }
113293
+ return "";
113294
+ },
113295
+ "x-reactions": [{
113296
+ dependencies: [],
113297
+ fulfill: {
113298
+ state: {
113299
+ visible: !(extra !== null && extra !== void 0 && extra.isEmptySrc)
113300
+ }
113301
+ }
113302
+ }]
113303
+ };
113431
113304
  };
113432
- EntrySchemas = [EntryNameSchema, NeedModifyMWAConfigSchema, ClientRouteSchema];
113433
- EntrySchema = {
113434
- key: "entry",
113435
- label: function label14() {
113436
- return i18n.t(localeKeys.action.element.entry);
113437
- },
113438
- isObject: true,
113439
- items: EntrySchemas
113305
+ getEntrySchemaProperties = function getEntrySchemaProperties2(extra) {
113306
+ return {
113307
+ name: getEntryNameSchema(extra),
113308
+ needModifyMWAConfig: getNeedModifyMWAConfigSchema(extra),
113309
+ clientRoute: getClientRouteSchema(extra)
113310
+ };
113311
+ };
113312
+ getEntrySchema = function getEntrySchema2() {
113313
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113314
+ return {
113315
+ type: "object",
113316
+ properties: getEntrySchemaProperties(extra)
113317
+ };
113440
113318
  };
113441
113319
  MWADefaultEntryConfig = {
113442
113320
  needModifyMWAConfig: BooleanConfig.NO,
113443
113321
  clientRoute: ClientRoute.SelfControlRoute
113444
113322
  };
113445
113323
  });
113446
- var BFFType, BFFTypeSchema, BFFSchemas, BFFSchema, MWADefaultBffConfig;
113324
+ var BFFType, getBFFTypeSchema, getBFFchemaProperties, getBFFSchema, MWADefaultBffConfig;
113447
113325
  var init_bff = __esmMin(() => {
113448
113326
  init_locale2();
113449
113327
  init_common2();
@@ -113451,66 +113329,76 @@ var init_bff = __esmMin(() => {
113451
113329
  BFFType2["Func"] = "func";
113452
113330
  BFFType2["Framework"] = "framework";
113453
113331
  })(BFFType || (BFFType = {}));
113454
- BFFTypeSchema = {
113455
- key: "bffType",
113456
- type: ["string"],
113457
- label: function label15() {
113458
- return i18n.t(localeKeys.bff.bffType.self);
113459
- },
113460
- mutualExclusion: true,
113461
- items: Object.values(BFFType).map(function(bffType) {
113462
- return {
113463
- key: bffType,
113464
- label: function label21() {
113465
- return i18n.t(localeKeys.bff.bffType[bffType]);
113466
- }
113467
- };
113468
- })
113332
+ getBFFTypeSchema = function getBFFTypeSchema2() {
113333
+ var _extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113334
+ return {
113335
+ type: "string",
113336
+ title: i18n.t(localeKeys.bff.bffType.self),
113337
+ "enum": Object.values(BFFType).map(function(bffType) {
113338
+ return {
113339
+ value: bffType,
113340
+ label: i18n.t(localeKeys.bff.bffType[bffType])
113341
+ };
113342
+ })
113343
+ };
113469
113344
  };
113470
- BFFSchemas = [BFFTypeSchema, FrameworkSchema];
113471
- BFFSchema = {
113472
- key: "bff",
113473
- label: function label16() {
113474
- return i18n.t(localeKeys.action["function"].bff);
113475
- },
113476
- isObject: true,
113477
- items: BFFSchemas
113345
+ getBFFchemaProperties = function getBFFchemaProperties2(extra) {
113346
+ return {
113347
+ bffType: getBFFTypeSchema(extra),
113348
+ framework: getFrameworkSchema(extra)
113349
+ };
113350
+ };
113351
+ getBFFSchema = function getBFFSchema2() {
113352
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113353
+ return {
113354
+ type: "object",
113355
+ properties: getBFFchemaProperties(extra)
113356
+ };
113478
113357
  };
113479
113358
  MWADefaultBffConfig = {
113480
113359
  bffType: BFFType.Func,
113481
113360
  frameWork: Framework.Express
113482
113361
  };
113483
113362
  });
113484
- var MWASchemas, MWASchema, MWADefaultConfig;
113363
+ var getMWASchemaProperties, getMWASchema, MWADefaultConfig;
113485
113364
  var init_project4 = __esmMin(() => {
113486
113365
  init_common();
113487
113366
  init_common2();
113488
- MWASchemas = [PackageNameSchema, PackagePathSchema, LanguageSchema, PackageManagerSchema, RunWaySchema, NeedModifyMWAConfigSchema, ClientRouteSchema];
113489
- MWASchema = {
113490
- key: "mwa",
113491
- isObject: true,
113492
- items: MWASchemas
113367
+ getMWASchemaProperties = function getMWASchemaProperties2(extra) {
113368
+ return {
113369
+ packageName: getPackageNameSchema(extra),
113370
+ packagePath: getPackagePathSchema(extra),
113371
+ language: getLanguageSchema(extra),
113372
+ packageManager: getPackageManagerSchema(extra),
113373
+ needModifyMWAConfig: getNeedModifyMWAConfigSchema(extra),
113374
+ clientRoute: getClientRouteSchema(extra)
113375
+ };
113376
+ };
113377
+ getMWASchema = function getMWASchema2() {
113378
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113379
+ return {
113380
+ type: "object",
113381
+ properties: getMWASchemaProperties(extra)
113382
+ };
113493
113383
  };
113494
113384
  MWADefaultConfig = {
113495
113385
  language: Language.TS,
113496
113386
  packageManager: PackageManager.Pnpm,
113497
- runWay: RunWay.No,
113498
113387
  needModifyMWAConfig: BooleanConfig.NO,
113499
113388
  clientRoute: ClientRoute.SelfControlRoute
113500
113389
  };
113501
113390
  });
113502
- var ServerSchemas, ServerSchema, MWADefaultServerConfig;
113391
+ var getServerSchema, MWADefaultServerConfig;
113503
113392
  var init_server = __esmMin(() => {
113504
- init_locale2();
113505
113393
  init_common2();
113506
- ServerSchemas = [FrameworkSchema];
113507
- ServerSchema = {
113508
- key: "server",
113509
- label: function label17() {
113510
- return i18n.t(localeKeys.action.element.server);
113511
- },
113512
- isObject: true,
113513
- items: ServerSchemas
113394
+ getServerSchema = function getServerSchema2() {
113395
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113396
+ return {
113397
+ type: "object",
113398
+ properties: {
113399
+ framework: getFrameworkSchema(extra)
113400
+ }
113401
+ };
113514
113402
  };
113515
113403
  MWADefaultServerConfig = {
113516
113404
  framework: Framework.Express
@@ -113542,7 +113430,6 @@ var init_common3 = __esmMin(() => {
113542
113430
  ActionFunction2["Sass"] = "sass";
113543
113431
  ActionFunction2["BFF"] = "bff";
113544
113432
  ActionFunction2["MicroFrontend"] = "micro_frontend";
113545
- ActionFunction2["Electron"] = "electron";
113546
113433
  ActionFunction2["I18n"] = "i18n";
113547
113434
  ActionFunction2["Test"] = "test";
113548
113435
  ActionFunction2["E2ETest"] = "e2e_test";
@@ -113554,7 +113441,7 @@ var init_common3 = __esmMin(() => {
113554
113441
  ActionFunction2["Proxy"] = "proxy";
113555
113442
  })(ActionFunction || (ActionFunction = {}));
113556
113443
  (function(ActionRefactor2) {
113557
- ActionRefactor2["BFFToApp"] = "bff_to_app";
113444
+ ActionRefactor2["ReactRouter5"] = "react_router_5";
113558
113445
  })(ActionRefactor || (ActionRefactor = {}));
113559
113446
  ActionTypeText = (_ActionTypeText = {}, _defineProperty(_ActionTypeText, ActionType.Function, function() {
113560
113447
  return i18n.t(localeKeys.action["function"].self);
@@ -113578,8 +113465,6 @@ var init_common3 = __esmMin(() => {
113578
113465
  return i18n.t(localeKeys.action["function"].bff);
113579
113466
  }), _defineProperty(_ActionFunctionText, ActionFunction.MicroFrontend, function() {
113580
113467
  return i18n.t(localeKeys.action["function"].micro_frontend);
113581
- }), _defineProperty(_ActionFunctionText, ActionFunction.Electron, function() {
113582
- return i18n.t(localeKeys.action["function"].electron);
113583
113468
  }), _defineProperty(_ActionFunctionText, ActionFunction.I18n, function() {
113584
113469
  return i18n.t(localeKeys.action["function"].i18n);
113585
113470
  }), _defineProperty(_ActionFunctionText, ActionFunction.Test, function() {
@@ -113599,20 +113484,17 @@ var init_common3 = __esmMin(() => {
113599
113484
  }), _defineProperty(_ActionFunctionText, ActionFunction.Proxy, function() {
113600
113485
  return i18n.t(localeKeys.action["function"].proxy);
113601
113486
  }), _ActionFunctionText);
113602
- ActionRefactorText = _defineProperty({}, ActionRefactor.BFFToApp, function() {
113603
- return i18n.t(localeKeys.action.refactor.bff_to_app);
113487
+ ActionRefactorText = _defineProperty({}, ActionRefactor.ReactRouter5, function() {
113488
+ return i18n.t(localeKeys.action.refactor.react_router_5);
113604
113489
  });
113605
113490
  ActionTypeTextMap = (_ActionTypeTextMap = {}, _defineProperty(_ActionTypeTextMap, ActionType.Element, ActionElementText), _defineProperty(_ActionTypeTextMap, ActionType.Function, ActionFunctionText), _defineProperty(_ActionTypeTextMap, ActionType.Refactor, ActionRefactorText), _ActionTypeTextMap);
113606
113491
  });
113607
- var _MWAActionTypesMap, _MWAActionFunctionsDe, _MWAActionFunctionsDe2, _ActionType$Element, _ActionType$Function, _MWANewActionGenerato, MWAActionTypes, MWAActionFunctions, MWAActionElements, MWAActionReactors, MWAActionTypesMap, MWASpecialSchemaMap, MWANewActionSchema, MWAActionFunctionsDevDependencies, MWAActionFunctionsDependencies, MWAActionFunctionsAppendTypeContent, MWANewActionGenerators;
113492
+ var _MWAActionTypesMap, _MWAActionFunctionsDe, _MWAActionFunctionsDe2, _MWAActionFunctionsAp, _ActionType$Element, _ActionType$Function, _MWANewActionGenerato, MWAActionTypes, MWAActionFunctions, MWAActionElements, MWAActionReactors, MWAActionTypesMap, getMWANewActionSchema, MWAActionFunctionsDevDependencies, MWAActionFunctionsDependencies, MWAActionFunctionsAppendTypeContent, MWAActionRefactorDependencies, MWAActionReactorAppendTypeContent, MWANewActionGenerators;
113608
113493
  var init_mwa2 = __esmMin(() => {
113609
113494
  init_defineProperty();
113610
113495
  init_common3();
113611
113496
  init_locale2();
113612
- MWAActionTypes = [
113613
- ActionType.Element,
113614
- ActionType.Function
113615
- ];
113497
+ MWAActionTypes = [ActionType.Element, ActionType.Function, ActionType.Refactor];
113616
113498
  MWAActionFunctions = [
113617
113499
  ActionFunction.TailwindCSS,
113618
113500
  ActionFunction.Less,
@@ -113620,53 +113502,104 @@ var init_mwa2 = __esmMin(() => {
113620
113502
  ActionFunction.BFF,
113621
113503
  ActionFunction.SSG,
113622
113504
  ActionFunction.MicroFrontend,
113623
- ActionFunction.Electron,
113624
113505
  ActionFunction.Test,
113625
113506
  ActionFunction.Storybook,
113626
113507
  ActionFunction.Polyfill,
113627
113508
  ActionFunction.Proxy
113628
113509
  ];
113629
113510
  MWAActionElements = [ActionElement.Entry, ActionElement.Server];
113630
- MWAActionReactors = [ActionRefactor.BFFToApp];
113511
+ MWAActionReactors = [ActionRefactor.ReactRouter5];
113631
113512
  MWAActionTypesMap = (_MWAActionTypesMap = {}, _defineProperty(_MWAActionTypesMap, ActionType.Element, MWAActionElements), _defineProperty(_MWAActionTypesMap, ActionType.Function, MWAActionFunctions), _defineProperty(_MWAActionTypesMap, ActionType.Refactor, MWAActionReactors), _MWAActionTypesMap);
113632
- MWASpecialSchemaMap = _defineProperty({}, ActionFunction.Storybook, {
113633
- key: ActionFunction.Storybook,
113634
- label: function label18() {
113635
- return i18n.t(localeKeys.action["function"].mwa_storybook);
113636
- }
113637
- });
113638
- MWANewActionSchema = {
113639
- key: "mwa_new_action",
113640
- isObject: true,
113641
- items: [{
113642
- key: "actionType",
113643
- label: function label19() {
113644
- return i18n.t(localeKeys.action.self);
113645
- },
113646
- type: ["string"],
113647
- mutualExclusion: true,
113648
- items: MWAActionTypes.map(function(type) {
113649
- return {
113650
- key: type,
113651
- label: ActionTypeText[type],
113652
- type: ["string"],
113653
- mutualExclusion: true,
113654
- items: MWAActionTypesMap[type].map(function(item) {
113655
- return MWASpecialSchemaMap[item] || {
113656
- key: item,
113657
- label: ActionTypeTextMap[type][item]
113513
+ getMWANewActionSchema = function getMWANewActionSchema2() {
113514
+ var _properties;
113515
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113516
+ var _extra$funcMap = extra.funcMap, funcMap = _extra$funcMap === void 0 ? {} : _extra$funcMap, _extra$refactorMap = extra.refactorMap, refactorMap = _extra$refactorMap === void 0 ? {} : _extra$refactorMap;
113517
+ var funcs = MWAActionFunctions.filter(function(func) {
113518
+ return !funcMap[func];
113519
+ });
113520
+ var refactors = MWAActionReactors.filter(function(reactor) {
113521
+ return !refactorMap[reactor];
113522
+ });
113523
+ return {
113524
+ type: "object",
113525
+ properties: (_properties = {
113526
+ actionType: {
113527
+ type: "string",
113528
+ title: i18n.t(localeKeys.action.self),
113529
+ "enum": MWAActionTypes.filter(function(type) {
113530
+ return type === ActionType.Function ? funcs.length > 0 : true;
113531
+ }).filter(function(type) {
113532
+ return type === ActionType.Refactor ? refactors.length > 0 : true;
113533
+ }).map(function(type) {
113534
+ return {
113535
+ value: type,
113536
+ label: ActionTypeText[type](),
113537
+ type: ["string"]
113658
113538
  };
113659
113539
  })
113660
- };
113661
- })
113662
- }]
113540
+ }
113541
+ }, _defineProperty(_properties, ActionType.Element, {
113542
+ type: "string",
113543
+ title: ActionTypeText[ActionType.Element](),
113544
+ "enum": MWAActionElements.map(function(element) {
113545
+ return {
113546
+ value: element,
113547
+ label: ActionElementText[element]()
113548
+ };
113549
+ }),
113550
+ "x-reactions": [{
113551
+ dependencies: ["actionType"],
113552
+ fulfill: {
113553
+ state: {
113554
+ visible: '{{$deps[0] === "element"}}'
113555
+ }
113556
+ }
113557
+ }]
113558
+ }), _defineProperty(_properties, ActionType.Function, {
113559
+ type: "string",
113560
+ title: ActionTypeText[ActionType.Function](),
113561
+ "enum": funcs.map(function(func) {
113562
+ return {
113563
+ value: func,
113564
+ label: func === ActionFunction.Storybook ? i18n.t(localeKeys.action["function"].mwa_storybook) : ActionFunctionText[func]()
113565
+ };
113566
+ }),
113567
+ "x-reactions": [{
113568
+ dependencies: ["actionType"],
113569
+ fulfill: {
113570
+ state: {
113571
+ visible: '{{$deps[0] === "function"}}'
113572
+ }
113573
+ }
113574
+ }]
113575
+ }), _defineProperty(_properties, ActionType.Refactor, {
113576
+ type: "string",
113577
+ title: ActionTypeText[ActionType.Refactor](),
113578
+ "enum": refactors.map(function(refactor) {
113579
+ return {
113580
+ value: refactor,
113581
+ label: ActionRefactorText[refactor]()
113582
+ };
113583
+ }),
113584
+ "x-reactions": [{
113585
+ dependencies: ["actionType"],
113586
+ fulfill: {
113587
+ state: {
113588
+ visible: '{{$deps[0] === "refactor"}}'
113589
+ }
113590
+ }
113591
+ }]
113592
+ }), _properties)
113593
+ };
113663
113594
  };
113664
- 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);
113595
+ 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.Storybook, "@modern-js/plugin-storybook"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.Proxy, "@modern-js/plugin-proxy"), _defineProperty(_MWAActionFunctionsDe, ActionFunction.TailwindCSS, "tailwindcss"), _MWAActionFunctionsDe);
113665
113596
  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);
113666
- MWAActionFunctionsAppendTypeContent = _defineProperty({}, ActionFunction.MicroFrontend, "/// <reference types='@modern-js/plugin-garfish/types' />");
113667
- 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);
113597
+ 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);
113598
+ MWAActionRefactorDependencies = _defineProperty({}, ActionRefactor.ReactRouter5, "@modern-js/plugin-router-legacy");
113599
+ MWAActionReactorAppendTypeContent = _defineProperty({}, ActionRefactor.ReactRouter5, "/// <reference types='@modern-js/plugin-router-legacy/types' />");
113600
+ 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.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.ReactRouter5, "@modern-js/router-legacy-generator")), _MWANewActionGenerato);
113668
113601
  });
113669
- var _ModuleActionFunction, _ModuleActionFunction2, _ModuleActionFunction3, _ActionType$Function2, ModuleActionTypes, ModuleActionFunctions, ModuleActionTypesMap, ModuleSpecialSchemaMap, ModuleNewActionSchema, ModuleActionFunctionsDevDependencies, ModuleActionFunctionsPeerDependencies, ModuleActionFunctionsDependencies, ModuleNewActionGenerators;
113602
+ var _ModuleActionFunction, _ModuleActionFunction2, _ModuleActionFunction3, _ActionType$Function2, ModuleActionTypes, ModuleActionFunctions, ModuleActionTypesMap, ModuleSpecialSchemaMap, getModuleNewActionSchema, ModuleActionFunctionsDevDependencies, ModuleActionFunctionsPeerDependencies, ModuleActionFunctionsDependencies, ModuleNewActionGenerators;
113670
113603
  var init_module2 = __esmMin(() => {
113671
113604
  init_defineProperty();
113672
113605
  init_common3();
@@ -113681,45 +113614,62 @@ var init_module2 = __esmMin(() => {
113681
113614
  ];
113682
113615
  ModuleActionTypesMap = _defineProperty({}, ActionType.Function, ModuleActionFunctions);
113683
113616
  ModuleSpecialSchemaMap = {};
113684
- ModuleNewActionSchema = {
113685
- key: "Module_new_action",
113686
- isObject: true,
113687
- items: [{
113688
- key: "actionType",
113689
- label: function label20() {
113690
- return i18n.t(localeKeys.action.self);
113691
- },
113692
- type: ["string"],
113693
- mutualExclusion: true,
113694
- items: ModuleActionTypes.map(function(type) {
113695
- return {
113696
- key: type,
113697
- label: ActionTypeText[type],
113698
- type: ["string"],
113699
- mutualExclusion: true,
113700
- items: ModuleActionFunctions.map(function(func) {
113701
- return ModuleSpecialSchemaMap[func] || {
113702
- key: func,
113703
- label: ActionFunctionText[func]
113617
+ getModuleNewActionSchema = function getModuleNewActionSchema2() {
113618
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113619
+ var _extra$funcMap = extra.funcMap, funcMap = _extra$funcMap === void 0 ? {} : _extra$funcMap;
113620
+ return {
113621
+ type: "object",
113622
+ properties: _defineProperty({
113623
+ actionType: {
113624
+ type: "string",
113625
+ title: i18n.t(localeKeys.action.self),
113626
+ "enum": ModuleActionTypes.map(function(type) {
113627
+ return {
113628
+ value: type,
113629
+ label: ActionTypeText[type](),
113630
+ type: ["string"]
113704
113631
  };
113705
113632
  })
113706
- };
113633
+ }
113634
+ }, ActionType.Function, {
113635
+ type: "string",
113636
+ title: ActionTypeText[ActionType.Function](),
113637
+ "enum": ModuleActionFunctions.filter(function(func) {
113638
+ return !funcMap[func];
113639
+ }).map(function(func) {
113640
+ return {
113641
+ value: func,
113642
+ label: ActionFunctionText[func]()
113643
+ };
113644
+ }),
113645
+ "x-reactions": [{
113646
+ dependencies: ["actionType"],
113647
+ fulfill: {
113648
+ state: {
113649
+ visible: '{{$deps[0] === "function"}}'
113650
+ }
113651
+ }
113652
+ }]
113707
113653
  })
113708
- }]
113654
+ };
113709
113655
  };
113710
113656
  ModuleActionFunctionsDevDependencies = (_ModuleActionFunction = {}, _defineProperty(_ModuleActionFunction, ActionFunction.Less, "@modern-js/plugin-less"), _defineProperty(_ModuleActionFunction, ActionFunction.Sass, "@modern-js/plugin-sass"), _defineProperty(_ModuleActionFunction, ActionFunction.Storybook, "@modern-js/plugin-storybook"), _defineProperty(_ModuleActionFunction, ActionFunction.RuntimeApi, "@modern-js/runtime"), _defineProperty(_ModuleActionFunction, ActionFunction.TailwindCSS, "tailwindcss"), _ModuleActionFunction);
113711
113657
  ModuleActionFunctionsPeerDependencies = (_ModuleActionFunction2 = {}, _defineProperty(_ModuleActionFunction2, ActionFunction.RuntimeApi, "@modern-js/runtime"), _defineProperty(_ModuleActionFunction2, ActionFunction.TailwindCSS, "tailwindcss"), _ModuleActionFunction2);
113712
113658
  ModuleActionFunctionsDependencies = (_ModuleActionFunction3 = {}, _defineProperty(_ModuleActionFunction3, ActionFunction.I18n, "@modern-js/plugin-i18n"), _defineProperty(_ModuleActionFunction3, ActionFunction.TailwindCSS, "@modern-js/plugin-tailwindcss"), _ModuleActionFunction3);
113713
113659
  ModuleNewActionGenerators = _defineProperty({}, ActionType.Function, (_ActionType$Function2 = {}, _defineProperty(_ActionType$Function2, ActionFunction.TailwindCSS, "@modern-js/tailwindcss-generator"), _defineProperty(_ActionType$Function2, ActionFunction.Less, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function2, ActionFunction.Sass, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function2, ActionFunction.I18n, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function2, ActionFunction.Test, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function2, ActionFunction.Doc, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function2, ActionFunction.Storybook, "@modern-js/storybook-generator"), _defineProperty(_ActionType$Function2, ActionFunction.RuntimeApi, "@modern-js/dependence-generator"), _ActionType$Function2));
113714
113660
  });
113715
- var _MonorepoNewActionCon, MonorepoNewActionSchema, MonorepoNewActionConfig;
113661
+ var _MonorepoNewActionCon, getMonorepoNewActionSchema, MonorepoNewActionConfig;
113716
113662
  var init_monorepo2 = __esmMin(() => {
113717
113663
  init_defineProperty();
113718
113664
  init_common();
113719
- MonorepoNewActionSchema = {
113720
- key: "monorepo_new_action",
113721
- isObject: true,
113722
- items: [SubSolutionSchema]
113665
+ getMonorepoNewActionSchema = function getMonorepoNewActionSchema2() {
113666
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113667
+ return {
113668
+ type: "object",
113669
+ properties: {
113670
+ solution: getSolutionSchema(extra)
113671
+ }
113672
+ };
113723
113673
  };
113724
113674
  MonorepoNewActionConfig = (_MonorepoNewActionCon = {}, _defineProperty(_MonorepoNewActionCon, SubSolution.MWA, {
113725
113675
  isMonorepoSubProject: true,
@@ -113741,14 +113691,24 @@ var init_newAction = __esmMin(() => {
113741
113691
  init_module2();
113742
113692
  init_monorepo2();
113743
113693
  });
113744
- var GeneratorSchemas, GeneratorSchema, GeneratorDefaultConfig;
113694
+ var getGeneratorSchemaProperties, getGeneratorSchema, GeneratorDefaultConfig;
113745
113695
  var init_generator = __esmMin(() => {
113746
113696
  init_common();
113747
- GeneratorSchemas = [PackageNameSchema, PackagePathSchema, PackageManagerSchema, LanguageSchema];
113748
- GeneratorSchema = {
113749
- key: "generator-generator",
113750
- isObject: true,
113751
- items: Object.values(GeneratorSchemas)
113697
+ getGeneratorSchemaProperties = function getGeneratorSchemaProperties2() {
113698
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113699
+ return {
113700
+ packageName: getPackageNameSchema(extra),
113701
+ packagePath: getPackagePathSchema(extra),
113702
+ packageManager: getPackageManagerSchema(extra),
113703
+ language: getLanguageSchema(extra)
113704
+ };
113705
+ };
113706
+ getGeneratorSchema = function getGeneratorSchema2() {
113707
+ var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113708
+ return {
113709
+ type: "object",
113710
+ properties: getGeneratorSchemaProperties(extra)
113711
+ };
113752
113712
  };
113753
113713
  GeneratorDefaultConfig = {
113754
113714
  packageManager: PackageManager.Pnpm,
@@ -113769,40 +113729,28 @@ __export2(treeshaking_exports5, {
113769
113729
  ActionType: () => ActionType,
113770
113730
  ActionTypeText: () => ActionTypeText,
113771
113731
  ActionTypeTextMap: () => ActionTypeTextMap,
113772
- BFFSchema: () => BFFSchema,
113773
- BFFSchemas: () => BFFSchemas,
113774
113732
  BFFType: () => BFFType,
113775
- BFFTypeSchema: () => BFFTypeSchema,
113776
113733
  BaseDefaultConfig: () => BaseDefaultConfig,
113777
113734
  BaseGenerator: () => BaseGenerator,
113778
- BaseSchema: () => BaseSchema,
113779
- BaseSchemas: () => BaseSchemas,
113780
113735
  BooleanConfig: () => BooleanConfig,
113781
113736
  BooleanConfigName: () => BooleanConfigName,
113782
- BooleanSchemas: () => BooleanSchemas,
113783
113737
  ChangesetGenerator: () => ChangesetGenerator,
113784
113738
  ClientRoute: () => ClientRoute,
113785
- ClientRouteSchema: () => ClientRouteSchema,
113786
113739
  DependenceGenerator: () => DependenceGenerator,
113787
- ElectronGenerator: () => ElectronGenerator,
113788
113740
  EntryGenerator: () => EntryGenerator,
113789
- EntrySchema: () => EntrySchema,
113790
- EntrySchemas: () => EntrySchemas,
113791
113741
  EslintGenerator: () => EslintGenerator,
113792
113742
  Framework: () => Framework,
113793
113743
  FrameworkAppendTypeContent: () => FrameworkAppendTypeContent,
113794
- FrameworkSchema: () => FrameworkSchema,
113795
113744
  GeneratorDefaultConfig: () => GeneratorDefaultConfig,
113796
- GeneratorSchema: () => GeneratorSchema,
113797
113745
  Language: () => Language,
113798
- LanguageName: () => LanguageName,
113799
- LanguageSchema: () => LanguageSchema,
113800
113746
  MWAActionElements: () => MWAActionElements,
113801
113747
  MWAActionFunctions: () => MWAActionFunctions,
113802
113748
  MWAActionFunctionsAppendTypeContent: () => MWAActionFunctionsAppendTypeContent,
113803
113749
  MWAActionFunctionsDependencies: () => MWAActionFunctionsDependencies,
113804
113750
  MWAActionFunctionsDevDependencies: () => MWAActionFunctionsDevDependencies,
113751
+ MWAActionReactorAppendTypeContent: () => MWAActionReactorAppendTypeContent,
113805
113752
  MWAActionReactors: () => MWAActionReactors,
113753
+ MWAActionRefactorDependencies: () => MWAActionRefactorDependencies,
113806
113754
  MWAActionTypes: () => MWAActionTypes,
113807
113755
  MWAActionTypesMap: () => MWAActionTypesMap,
113808
113756
  MWADefaultBffConfig: () => MWADefaultBffConfig,
@@ -113810,10 +113758,6 @@ __export2(treeshaking_exports5, {
113810
113758
  MWADefaultEntryConfig: () => MWADefaultEntryConfig,
113811
113759
  MWADefaultServerConfig: () => MWADefaultServerConfig,
113812
113760
  MWANewActionGenerators: () => MWANewActionGenerators,
113813
- MWANewActionSchema: () => MWANewActionSchema,
113814
- MWASchema: () => MWASchema,
113815
- MWASchemas: () => MWASchemas,
113816
- MWASpecialSchemaMap: () => MWASpecialSchemaMap,
113817
113761
  ModuleActionFunctions: () => ModuleActionFunctions,
113818
113762
  ModuleActionFunctionsDependencies: () => ModuleActionFunctionsDependencies,
113819
113763
  ModuleActionFunctionsDevDependencies: () => ModuleActionFunctionsDevDependencies,
@@ -113822,40 +113766,51 @@ __export2(treeshaking_exports5, {
113822
113766
  ModuleActionTypesMap: () => ModuleActionTypesMap,
113823
113767
  ModuleDefaultConfig: () => ModuleDefaultConfig,
113824
113768
  ModuleNewActionGenerators: () => ModuleNewActionGenerators,
113825
- ModuleNewActionSchema: () => ModuleNewActionSchema,
113826
- ModuleSchema: () => ModuleSchema,
113827
- ModuleSchemas: () => ModuleSchemas,
113828
113769
  ModuleSpecialSchemaMap: () => ModuleSpecialSchemaMap,
113829
113770
  MonorepoDefaultConfig: () => MonorepoDefaultConfig,
113830
113771
  MonorepoNewActionConfig: () => MonorepoNewActionConfig,
113831
- MonorepoNewActionSchema: () => MonorepoNewActionSchema,
113832
- MonorepoSchema: () => MonorepoSchema,
113833
- MonorepoSchemas: () => MonorepoSchemas,
113834
- NeedModifyMWAConfigSchema: () => NeedModifyMWAConfigSchema,
113835
113772
  PackageManager: () => PackageManager,
113836
113773
  PackageManagerName: () => PackageManagerName,
113837
- PackageManagerSchema: () => PackageManagerSchema,
113838
- PackageNameSchema: () => PackageNameSchema,
113839
- PackagePathSchema: () => PackagePathSchema,
113840
- RunWay: () => RunWay,
113841
- RunWaySchema: () => RunWaySchema,
113842
- ServerSchema: () => ServerSchema,
113843
- ServerSchemas: () => ServerSchemas,
113844
113774
  Solution: () => Solution,
113845
113775
  SolutionDefaultConfig: () => SolutionDefaultConfig,
113846
113776
  SolutionGenerator: () => SolutionGenerator,
113847
- SolutionSchema: () => SolutionSchema,
113848
113777
  SolutionSchemas: () => SolutionSchemas,
113849
113778
  SolutionText: () => SolutionText,
113850
113779
  SolutionToolsMap: () => SolutionToolsMap,
113851
113780
  SubSolution: () => SubSolution,
113852
113781
  SubSolutionGenerator: () => SubSolutionGenerator,
113853
- SubSolutionSchema: () => SubSolutionSchema,
113854
113782
  SubSolutionText: () => SubSolutionText,
113783
+ getBFFSchema: () => getBFFSchema,
113784
+ getBFFTypeSchema: () => getBFFTypeSchema,
113785
+ getBFFchemaProperties: () => getBFFchemaProperties,
113786
+ getBaseSchema: () => getBaseSchema,
113787
+ getBooleanSchemas: () => getBooleanSchemas,
113788
+ getClientRouteSchema: () => getClientRouteSchema,
113789
+ getEntryNameSchema: () => getEntryNameSchema,
113790
+ getEntrySchema: () => getEntrySchema,
113791
+ getEntrySchemaProperties: () => getEntrySchemaProperties,
113792
+ getFrameworkSchema: () => getFrameworkSchema,
113793
+ getGeneratorSchema: () => getGeneratorSchema,
113794
+ getGeneratorSchemaProperties: () => getGeneratorSchemaProperties,
113795
+ getLanguageSchema: () => getLanguageSchema,
113796
+ getMWANewActionSchema: () => getMWANewActionSchema,
113797
+ getMWASchema: () => getMWASchema,
113798
+ getMWASchemaProperties: () => getMWASchemaProperties,
113799
+ getModuleNewActionSchema: () => getModuleNewActionSchema,
113800
+ getModuleSchema: () => getModuleSchema,
113801
+ getModuleSchemaProperties: () => getModuleSchemaProperties,
113802
+ getMonorepoNewActionSchema: () => getMonorepoNewActionSchema,
113803
+ getMonorepoSchema: () => getMonorepoSchema,
113804
+ getNeedModifyMWAConfigSchema: () => getNeedModifyMWAConfigSchema,
113805
+ getPackageManagerSchema: () => getPackageManagerSchema,
113806
+ getPackageNameSchema: () => getPackageNameSchema,
113807
+ getPackagePathSchema: () => getPackagePathSchema,
113808
+ getScenesSchema: () => getScenesSchema,
113809
+ getServerSchema: () => getServerSchema,
113855
113810
  getSolutionNameFromSubSolution: () => getSolutionNameFromSubSolution,
113811
+ getSolutionSchema: () => getSolutionSchema,
113856
113812
  i18n: () => i18n,
113857
- localeKeys: () => localeKeys,
113858
- mwaConfigWhenFunc: () => mwaConfigWhenFunc
113813
+ localeKeys: () => localeKeys
113859
113814
  });
113860
113815
  var _SolutionDefaultConfi, _SolutionSchemas, SolutionDefaultConfig, SolutionSchemas;
113861
113816
  var init_treeshaking5 = __esmMin(() => {
@@ -113874,7 +113829,7 @@ var init_treeshaking5 = __esmMin(() => {
113874
113829
  init_expand();
113875
113830
  init_base();
113876
113831
  SolutionDefaultConfig = (_SolutionDefaultConfi = {}, _defineProperty(_SolutionDefaultConfi, Solution.MWA, MWADefaultConfig), _defineProperty(_SolutionDefaultConfi, Solution.Module, ModuleDefaultConfig), _defineProperty(_SolutionDefaultConfi, Solution.Monorepo, MonorepoDefaultConfig), _SolutionDefaultConfi);
113877
- SolutionSchemas = (_SolutionSchemas = {}, _defineProperty(_SolutionSchemas, Solution.MWA, MWASchemas), _defineProperty(_SolutionSchemas, Solution.Module, ModuleSchemas), _defineProperty(_SolutionSchemas, Solution.Monorepo, MonorepoSchemas), _defineProperty(_SolutionSchemas, "custom", BaseSchemas), _SolutionSchemas);
113832
+ SolutionSchemas = (_SolutionSchemas = {}, _defineProperty(_SolutionSchemas, Solution.MWA, getMWASchema), _defineProperty(_SolutionSchemas, Solution.Module, getModuleSchema), _defineProperty(_SolutionSchemas, Solution.Monorepo, getMonorepoSchema), _defineProperty(_SolutionSchemas, "custom", getBaseSchema), _SolutionSchemas);
113878
113833
  });
113879
113834
  var require_import_lazy2 = __commonJSMin((exports, module2) => {
113880
113835
  (() => {
@@ -143054,13 +143009,13 @@ var require_logger4 = __commonJSMin((exports) => {
143054
143009
  if (LOG_LEVEL[type] > LOG_LEVEL[this.level]) {
143055
143010
  return;
143056
143011
  }
143057
- let label21 = "";
143012
+ let label = "";
143058
143013
  let text = "";
143059
143014
  const logType = this.types[type];
143060
143015
  if (this.config.displayLabel && logType.label) {
143061
- label21 = this.config.uppercaseLabel ? logType.label.toUpperCase() : logType.label;
143062
- label21 = label21.padEnd(this.longestLabel.length);
143063
- label21 = chalk_1.default.bold(logType.color ? chalk_1.default[logType.color](label21) : label21);
143016
+ label = this.config.uppercaseLabel ? logType.label.toUpperCase() : logType.label;
143017
+ label = label.padEnd(this.longestLabel.length);
143018
+ label = chalk_1.default.bold(logType.color ? chalk_1.default[logType.color](label) : label);
143064
143019
  }
143065
143020
  if (message instanceof Error) {
143066
143021
  if (message.stack) {
@@ -143073,15 +143028,15 @@ ${chalk_1.default.grey(rest.join("\n"))}`;
143073
143028
  } else {
143074
143029
  text = `${message}`;
143075
143030
  }
143076
- const log = label21.length > 0 ? `${label21} ${text}` : text;
143031
+ const log = label.length > 0 ? `${label} ${text}` : text;
143077
143032
  console.log(log, ...args);
143078
143033
  }
143079
143034
  getLongestLabel() {
143080
143035
  let longestLabel = "";
143081
143036
  Object.keys(this.types).forEach((type) => {
143082
- const { label: label21 = "" } = this.types[type];
143083
- if (label21.length > longestLabel.length) {
143084
- longestLabel = label21;
143037
+ const { label = "" } = this.types[type];
143038
+ if (label.length > longestLabel.length) {
143039
+ longestLabel = label;
143085
143040
  }
143086
143041
  });
143087
143042
  return longestLabel;
@@ -143398,17 +143353,23 @@ var require_compatRequire2 = __commonJSMin((exports) => {
143398
143353
  Object.defineProperty(exports, "__esModule", { value: true });
143399
143354
  exports.cleanRequireCache = exports.requireExistModule = exports.compatRequire = void 0;
143400
143355
  var findExists_1 = require_findExists2();
143401
- var compatRequire = (filePath) => {
143356
+ var compatRequire = (filePath, interop = true) => {
143402
143357
  const mod = __require(filePath);
143403
- return (mod === null || mod === void 0 ? void 0 : mod.__esModule) ? mod.default : mod;
143358
+ const rtnESMDefault = interop && (mod === null || mod === void 0 ? void 0 : mod.__esModule);
143359
+ return rtnESMDefault ? mod.default : mod;
143404
143360
  };
143405
143361
  exports.compatRequire = compatRequire;
143406
- var requireExistModule = (filename, extensions = [".ts", ".js"]) => {
143407
- const exist = (0, findExists_1.findExists)(extensions.map((ext) => `${filename}${ext}`));
143362
+ var requireExistModule = (filename, opt) => {
143363
+ const final = {
143364
+ extensions: [".ts", ".js"],
143365
+ interop: true,
143366
+ ...opt
143367
+ };
143368
+ const exist = (0, findExists_1.findExists)(final.extensions.map((ext) => `${filename}${ext}`));
143408
143369
  if (!exist) {
143409
143370
  return null;
143410
143371
  }
143411
- return (0, exports.compatRequire)(exist);
143372
+ return (0, exports.compatRequire)(exist, final.interop);
143412
143373
  };
143413
143374
  exports.requireExistModule = requireExistModule;
143414
143375
  var cleanRequireCache = (filelist) => {
@@ -143441,6 +143402,7 @@ var require_constants6 = __commonJSMin((exports) => {
143441
143402
  "@modern-js/app-tools": { cli: "@modern-js/app-tools/cli" },
143442
143403
  "@modern-js/monorepo-tools": { cli: "@modern-js/monorepo-tools/cli" },
143443
143404
  "@modern-js/module-tools": { cli: "@modern-js/module-tools/cli" },
143405
+ "@modern-js/module-tools-v2": { cli: "@modern-js/module-tools-v2" },
143444
143406
  "@modern-js/runtime": { cli: "@modern-js/runtime/cli" },
143445
143407
  "@modern-js/plugin-less": { cli: "@modern-js/plugin-less/cli" },
143446
143408
  "@modern-js/plugin-sass": { cli: "@modern-js/plugin-sass/cli" },
@@ -143483,7 +143445,10 @@ var require_constants6 = __commonJSMin((exports) => {
143483
143445
  cli: "@modern-js/plugin-polyfill/cli",
143484
143446
  server: "@modern-js/plugin-polyfill"
143485
143447
  },
143486
- "@modern-js/plugin-nocode": { cli: "@modern-js/plugin-nocode/cli" }
143448
+ "@modern-js/plugin-nocode": { cli: "@modern-js/plugin-nocode/cli" },
143449
+ "@modern-js/plugin-router-legacy": {
143450
+ cli: "@modern-js/plugin-router-legacy/cli"
143451
+ }
143487
143452
  };
143488
143453
  exports.PLUGIN_SCHEMAS = {
143489
143454
  "@modern-js/runtime": [
@@ -144553,9 +144518,11 @@ var require_chainId2 = __commonJSMin((exports) => {
144553
144518
  HTML: "html",
144554
144519
  BABEL: "babel",
144555
144520
  ESBUILD: "esbuild",
144521
+ SWC: "swc",
144556
144522
  STYLE: "style-loader",
144557
144523
  POSTCSS: "postcss",
144558
144524
  MARKDOWN: "markdown",
144525
+ IGNORE_CSS: "ignore-css",
144559
144526
  CSS_MODULES_TS: "css-modules-typescript",
144560
144527
  MINI_CSS_EXTRACT: "mini-css-extract"
144561
144528
  },
@@ -144586,7 +144553,8 @@ var require_chainId2 = __commonJSMin((exports) => {
144586
144553
  MINIMIZER: {
144587
144554
  JS: "js",
144588
144555
  CSS: "css",
144589
- ESBUILD: "js-css"
144556
+ ESBUILD: "js-css",
144557
+ SWC: "swc"
144590
144558
  },
144591
144559
  RESOLVE_PLUGIN: {
144592
144560
  MODULE_SCOPE: "module-scope",
@@ -144594,7 +144562,7 @@ var require_chainId2 = __commonJSMin((exports) => {
144594
144562
  }
144595
144563
  };
144596
144564
  });
144597
- var require_version = __commonJSMin((exports) => {
144565
+ var require_version2 = __commonJSMin((exports) => {
144598
144566
  "use strict";
144599
144567
  var __importDefault = exports && exports.__importDefault || function(mod) {
144600
144568
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -144684,7 +144652,7 @@ var require_dist2 = __commonJSMin((exports) => {
144684
144652
  __exportStar(require_tryResolve2(), exports);
144685
144653
  __exportStar(require_analyzeProject2(), exports);
144686
144654
  __exportStar(require_chainId2(), exports);
144687
- __exportStar(require_version(), exports);
144655
+ __exportStar(require_version2(), exports);
144688
144656
  });
144689
144657
  var require_strip_ansi4 = __commonJSMin((exports) => {
144690
144658
  "use strict";
@@ -146104,23 +146072,23 @@ var require_utils15 = __commonJSMin((exports) => {
146104
146072
  }
146105
146073
  };
146106
146074
  exports.readJson = readJson;
146107
- function hasEnabledFunction(action3, dependencies3, devDependencies3, peerDependencies, cwd) {
146075
+ function hasEnabledFunction(action2, dependencies3, devDependencies3, peerDependencies, cwd) {
146108
146076
  const packageJsonPath = _path.default.normalize(`${cwd}/package.json`);
146109
146077
  const packageJson = readJson(packageJsonPath);
146110
- if (!dependencies3[action3] && !devDependencies3[action3]) {
146078
+ if (!dependencies3[action2] && !devDependencies3[action2]) {
146111
146079
  return false;
146112
146080
  }
146113
- if (dependencies3[action3]) {
146081
+ if (dependencies3[action2]) {
146114
146082
  var _packageJson$dependen;
146115
- return (_packageJson$dependen = packageJson.dependencies) === null || _packageJson$dependen === void 0 ? void 0 : _packageJson$dependen[dependencies3[action3]];
146083
+ return (_packageJson$dependen = packageJson.dependencies) === null || _packageJson$dependen === void 0 ? void 0 : _packageJson$dependen[dependencies3[action2]];
146116
146084
  }
146117
- if (peerDependencies[action3]) {
146085
+ if (peerDependencies[action2]) {
146118
146086
  var _packageJson$peerDepe;
146119
- return (_packageJson$peerDepe = packageJson.peerDependencies) === null || _packageJson$peerDepe === void 0 ? void 0 : _packageJson$peerDepe[peerDependencies[action3]];
146087
+ return (_packageJson$peerDepe = packageJson.peerDependencies) === null || _packageJson$peerDepe === void 0 ? void 0 : _packageJson$peerDepe[peerDependencies[action2]];
146120
146088
  }
146121
- if (!peerDependencies[action3] && devDependencies3[action3]) {
146089
+ if (!peerDependencies[action2] && devDependencies3[action2]) {
146122
146090
  var _packageJson$devDepen;
146123
- return (_packageJson$devDepen = packageJson.devDependencies) === null || _packageJson$devDepen === void 0 ? void 0 : _packageJson$devDepen[devDependencies3[action3]];
146091
+ return (_packageJson$devDepen = packageJson.devDependencies) === null || _packageJson$devDepen === void 0 ? void 0 : _packageJson$devDepen[devDependencies3[action2]];
146124
146092
  }
146125
146093
  return false;
146126
146094
  }
@@ -146145,6 +146113,35 @@ var require_mwa = __commonJSMin((exports) => {
146145
146113
  var _generatorCommon = (init_treeshaking5(), __toCommonJS2(treeshaking_exports5));
146146
146114
  var _generatorUtils = require_node9();
146147
146115
  var _utils = require_utils15();
146116
+ function ownKeys2(object, enumerableOnly) {
146117
+ var keys = Object.keys(object);
146118
+ if (Object.getOwnPropertySymbols) {
146119
+ var symbols = Object.getOwnPropertySymbols(object);
146120
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
146121
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
146122
+ })), keys.push.apply(keys, symbols);
146123
+ }
146124
+ return keys;
146125
+ }
146126
+ function _objectSpread(target) {
146127
+ for (var i = 1; i < arguments.length; i++) {
146128
+ var source = arguments[i] != null ? arguments[i] : {};
146129
+ i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
146130
+ _defineProperty2(target, key, source[key]);
146131
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
146132
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
146133
+ });
146134
+ }
146135
+ return target;
146136
+ }
146137
+ function _defineProperty2(obj, key, value) {
146138
+ if (key in obj) {
146139
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
146140
+ } else {
146141
+ obj[key] = value;
146142
+ }
146143
+ return obj;
146144
+ }
146148
146145
  var MWANewAction2 = async (options3) => {
146149
146146
  const {
146150
146147
  locale = "zh",
@@ -146181,19 +146178,23 @@ var require_mwa = __commonJSMin((exports) => {
146181
146178
  data: {},
146182
146179
  current: null
146183
146180
  }, mockGeneratorCore);
146184
- const schema = (0, _codesmithApiApp.forEach)(_generatorCommon.MWANewActionSchema, (schemaItem) => {
146185
- if (_generatorCommon.MWAActionFunctions.includes(schemaItem.key)) {
146186
- const enable = (0, _utils.hasEnabledFunction)(schemaItem.key, _generatorCommon.MWAActionFunctionsDependencies, _generatorCommon.MWAActionFunctionsDevDependencies, {}, cwd);
146187
- const {
146188
- when: when8
146189
- } = schemaItem;
146190
- schemaItem.when = enable ? () => false : when8;
146191
- }
146181
+ const funcMap = {};
146182
+ _generatorCommon.MWAActionFunctions.forEach((func) => {
146183
+ const enable = (0, _utils.hasEnabledFunction)(func, _generatorCommon.MWAActionFunctionsDependencies, _generatorCommon.MWAActionFunctionsDevDependencies, {}, cwd);
146184
+ funcMap[func] = enable;
146192
146185
  });
146193
- const ans = await appAPI.getInputBySchema(schema, UserConfig);
146186
+ const refactorMap = {};
146187
+ _generatorCommon.MWAActionReactors.forEach((refactor) => {
146188
+ const enable = (0, _utils.hasEnabledFunction)(refactor, _generatorCommon.MWAActionRefactorDependencies, {}, {}, cwd);
146189
+ refactorMap[refactor] = enable;
146190
+ });
146191
+ const ans = await appAPI.getInputBySchemaFunc(_generatorCommon.getMWANewActionSchema, _objectSpread(_objectSpread({}, UserConfig), {}, {
146192
+ funcMap,
146193
+ refactorMap
146194
+ }));
146194
146195
  const actionType = ans.actionType;
146195
- const action3 = ans[actionType];
146196
- const generator = (0, _utils.getGeneratorPath)(_generatorCommon.MWANewActionGenerators[actionType][action3], distTag);
146196
+ const action2 = ans[actionType];
146197
+ const generator = (0, _utils.getGeneratorPath)(_generatorCommon.MWANewActionGenerators[actionType][action2], distTag);
146197
146198
  if (!generator) {
146198
146199
  throw new Error(`no valid option`);
146199
146200
  }
@@ -146202,8 +146203,8 @@ var require_mwa = __commonJSMin((exports) => {
146202
146203
  registry: registry2
146203
146204
  });
146204
146205
  };
146205
- const devDependency = _generatorCommon.MWAActionFunctionsDevDependencies[action3];
146206
- const dependency = _generatorCommon.MWAActionFunctionsDependencies[action3];
146206
+ const devDependency = _generatorCommon.MWAActionFunctionsDevDependencies[action2];
146207
+ const dependency = _generatorCommon.MWAActionFunctionsDependencies[action2] || _generatorCommon.MWAActionRefactorDependencies[action2];
146207
146208
  const finalConfig = (0, _lodash.merge)(UserConfig, ans, {
146208
146209
  locale: UserConfig.locale || locale,
146209
146210
  packageManager: UserConfig.packageManager || await (0, _generatorUtils.getPackageManager)(cwd)
@@ -146214,7 +146215,7 @@ var require_mwa = __commonJSMin((exports) => {
146214
146215
  dependencies: dependency ? {
146215
146216
  [dependency]: `${await getMwaPluginVersion(dependency)}`
146216
146217
  } : {},
146217
- appendTypeContent: _generatorCommon.MWAActionFunctionsAppendTypeContent[action3]
146218
+ appendTypeContent: _generatorCommon.MWAActionFunctionsAppendTypeContent[action2] || _generatorCommon.MWAActionReactorAppendTypeContent[action2]
146218
146219
  });
146219
146220
  const task = [{
146220
146221
  name: generator,
@@ -146242,6 +146243,35 @@ var require_module = __commonJSMin((exports) => {
146242
146243
  var _generatorCommon = (init_treeshaking5(), __toCommonJS2(treeshaking_exports5));
146243
146244
  var _generatorUtils = require_node9();
146244
146245
  var _utils = require_utils15();
146246
+ function ownKeys2(object, enumerableOnly) {
146247
+ var keys = Object.keys(object);
146248
+ if (Object.getOwnPropertySymbols) {
146249
+ var symbols = Object.getOwnPropertySymbols(object);
146250
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
146251
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
146252
+ })), keys.push.apply(keys, symbols);
146253
+ }
146254
+ return keys;
146255
+ }
146256
+ function _objectSpread(target) {
146257
+ for (var i = 1; i < arguments.length; i++) {
146258
+ var source = arguments[i] != null ? arguments[i] : {};
146259
+ i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
146260
+ _defineProperty2(target, key, source[key]);
146261
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
146262
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
146263
+ });
146264
+ }
146265
+ return target;
146266
+ }
146267
+ function _defineProperty2(obj, key, value) {
146268
+ if (key in obj) {
146269
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
146270
+ } else {
146271
+ obj[key] = value;
146272
+ }
146273
+ return obj;
146274
+ }
146245
146275
  var ModuleNewAction2 = async (options3) => {
146246
146276
  const {
146247
146277
  locale = "zh",
@@ -146279,32 +146309,30 @@ var require_module = __commonJSMin((exports) => {
146279
146309
  current: null
146280
146310
  }, mockGeneratorCore);
146281
146311
  let hasOption = false;
146282
- const schema = (0, _codesmithApiApp.forEach)(_generatorCommon.ModuleNewActionSchema, (schemaItem) => {
146283
- if (_generatorCommon.ModuleActionFunctions.includes(schemaItem.key)) {
146284
- const enable = (0, _utils.hasEnabledFunction)(schemaItem.key, _generatorCommon.ModuleActionFunctionsDependencies, _generatorCommon.ModuleActionFunctionsDevDependencies, _generatorCommon.ModuleActionFunctionsPeerDependencies, cwd);
146285
- const {
146286
- when: when8
146287
- } = schemaItem;
146288
- schemaItem.when = enable ? () => false : when8;
146289
- if (!enable) {
146290
- hasOption = true;
146291
- }
146312
+ const funcMap = {};
146313
+ _generatorCommon.ModuleActionFunctions.forEach((func) => {
146314
+ const enable = (0, _utils.hasEnabledFunction)(func, _generatorCommon.ModuleActionFunctionsDependencies, _generatorCommon.ModuleActionFunctionsDevDependencies, _generatorCommon.ModuleActionFunctionsPeerDependencies, cwd);
146315
+ funcMap[func] = enable;
146316
+ if (!enable) {
146317
+ hasOption = true;
146292
146318
  }
146293
146319
  });
146294
146320
  if (!hasOption) {
146295
146321
  smith.logger.warn("no option can be enabled");
146296
146322
  process.exit(1);
146297
146323
  }
146298
- const ans = await appAPI.getInputBySchema(schema, UserConfig);
146324
+ const ans = await appAPI.getInputBySchemaFunc(_generatorCommon.getModuleNewActionSchema, _objectSpread(_objectSpread({}, UserConfig), {}, {
146325
+ funcMap
146326
+ }));
146299
146327
  const actionType = ans.actionType;
146300
- const action3 = ans[actionType];
146301
- const generator = (0, _utils.getGeneratorPath)(_generatorCommon.ModuleNewActionGenerators[actionType][action3], distTag);
146328
+ const action2 = ans[actionType];
146329
+ const generator = (0, _utils.getGeneratorPath)(_generatorCommon.ModuleNewActionGenerators[actionType][action2], distTag);
146302
146330
  if (!generator) {
146303
146331
  throw new Error(`no valid option`);
146304
146332
  }
146305
- const devDependency = _generatorCommon.ModuleActionFunctionsDevDependencies[action3];
146306
- const dependency = _generatorCommon.ModuleActionFunctionsDependencies[action3];
146307
- const peerDependency = _generatorCommon.ModuleActionFunctionsPeerDependencies[action3];
146333
+ const devDependency = _generatorCommon.ModuleActionFunctionsDevDependencies[action2];
146334
+ const dependency = _generatorCommon.ModuleActionFunctionsDependencies[action2];
146335
+ const peerDependency = _generatorCommon.ModuleActionFunctionsPeerDependencies[action2];
146308
146336
  const getModulePluginVersion = (packageName) => {
146309
146337
  return (0, _generatorUtils.getModernPluginVersion)(_generatorCommon.Solution.Module, packageName, {
146310
146338
  registry: registry2
@@ -147154,36 +147182,32 @@ var PluginGitAPI = /* @__PURE__ */ function() {
147154
147182
  }]);
147155
147183
  return PluginGitAPI2;
147156
147184
  }();
147157
- init_objectSpread2();
147158
147185
  init_classCallCheck();
147159
147186
  init_createClass();
147160
147187
  init_defineProperty();
147161
147188
  var import_lodash6 = __toESM2(require_lodash2());
147162
- var InputType;
147163
- (function(InputType2) {
147164
- InputType2["Input"] = "input";
147165
- InputType2["Radio"] = "radio";
147166
- InputType2["Checkbox"] = "checkbox";
147167
- })(InputType || (InputType = {}));
147168
147189
  var PluginInputContext = /* @__PURE__ */ function() {
147169
- function PluginInputContext2(inputs) {
147190
+ function PluginInputContext2(solutionSchema) {
147170
147191
  _classCallCheck(this, PluginInputContext2);
147171
147192
  _defineProperty(this, "inputValue", {});
147172
147193
  _defineProperty(this, "defaultConfig", {});
147173
- _defineProperty(this, "inputs", []);
147194
+ _defineProperty(this, "solutionSchemaFunc", void 0);
147195
+ _defineProperty(this, "solutionSchema", {});
147174
147196
  _defineProperty(this, "extendInputMap", {});
147175
- _defineProperty(this, "extendOptionMap", {});
147176
- this.inputs = inputs;
147197
+ this.solutionSchemaFunc = solutionSchema;
147177
147198
  }
147178
147199
  _createClass(PluginInputContext2, [{
147200
+ key: "prepare",
147201
+ value: function prepare(inputData) {
147202
+ this.solutionSchema = this.solutionSchemaFunc(inputData).properties;
147203
+ }
147204
+ }, {
147179
147205
  key: "context",
147180
147206
  get: function get4() {
147181
147207
  return {
147182
147208
  addInputBefore: this.addInputBefore.bind(this),
147183
147209
  addInputAfter: this.addInputAfter.bind(this),
147184
147210
  setInput: this.setInput.bind(this),
147185
- addOptionBefore: this.addOptionBefore.bind(this),
147186
- addOptionAfter: this.addOptionAfter.bind(this),
147187
147211
  setInputValue: this.setInputValue.bind(this),
147188
147212
  setDefaultConfig: this.setDefualtConfig.bind(this)
147189
147213
  };
@@ -147191,169 +147215,80 @@ var PluginInputContext = /* @__PURE__ */ function() {
147191
147215
  }, {
147192
147216
  key: "validateInputKey",
147193
147217
  value: function validateInputKey(inputKey) {
147194
- if (!this.inputs.find(function(item) {
147195
- return item.key === inputKey;
147196
- })) {
147218
+ if (!this.solutionSchema[inputKey]) {
147197
147219
  throw new Error("the input key ".concat(inputKey, " not found"));
147198
147220
  }
147199
147221
  }
147200
147222
  }, {
147201
147223
  key: "validateInput",
147202
- value: function validateInput(input) {
147224
+ value: function validateInput(inputKey) {
147203
147225
  var _this = this;
147204
- if (this.inputs.find(function(item) {
147205
- return item.key === input.key;
147206
- })) {
147207
- throw new Error("the input key ".concat(input.key, " already exists"));
147226
+ if (this.solutionSchema[inputKey]) {
147227
+ throw new Error("the input key ".concat(inputKey, " already exists"));
147208
147228
  }
147209
147229
  Object.keys(this.extendInputMap).forEach(function(key) {
147210
- if (_this.extendInputMap[key].before.find(function(item) {
147211
- return item.key === input.key;
147212
- }) || _this.extendInputMap[key].after.find(function(item) {
147213
- return item.key === input.key;
147214
- })) {
147215
- throw new Error("the input key ".concat(input.key, " is already added"));
147230
+ if (_this.extendInputMap[key].before[inputKey] || _this.extendInputMap[key].after[inputKey]) {
147231
+ throw new Error("the input key ".concat(inputKey, " is already added"));
147216
147232
  }
147217
147233
  });
147218
147234
  }
147219
- }, {
147220
- key: "validateOption",
147221
- value: function validateOption(key, option) {
147222
- var _input$items, _this2 = this;
147223
- var input = this.inputs.find(function(item) {
147224
- return item.key === key;
147225
- });
147226
- if (input && (_input$items = input.items) !== null && _input$items !== void 0 && _input$items.find(function(item) {
147227
- return item.key === option.key;
147228
- })) {
147229
- throw new Error("the option key ".concat(option.key, " already exists"));
147230
- }
147231
- Object.keys(this.extendInputMap).forEach(function(inputKey) {
147232
- var _beforeInput$options, _afterInput$options;
147233
- var beforeInput = _this2.extendInputMap[inputKey].before.find(function(item) {
147234
- return item.key === key;
147235
- });
147236
- var afterInput = _this2.extendInputMap[inputKey].after.find(function(item) {
147237
- return item.key === key;
147238
- });
147239
- if (beforeInput && (_beforeInput$options = beforeInput.options) !== null && _beforeInput$options !== void 0 && _beforeInput$options.find(function(item) {
147240
- return item.key === option.key;
147241
- }) || afterInput && (_afterInput$options = afterInput.options) !== null && _afterInput$options !== void 0 && _afterInput$options.find(function(item) {
147242
- return item.key === option.key;
147243
- })) {
147244
- throw new Error("the option key ".concat(option.key, " is already added"));
147245
- }
147246
- });
147247
- }
147248
- }, {
147249
- key: "validateOptionKey",
147250
- value: function validateOptionKey(key, optionKey) {
147251
- var _input$items2, _this3 = this;
147252
- var input = this.inputs.find(function(item) {
147253
- return item.key === key;
147254
- });
147255
- if (input && !((_input$items2 = input.items) !== null && _input$items2 !== void 0 && _input$items2.find(function(item) {
147256
- return item.key === optionKey;
147257
- }))) {
147258
- throw new Error("the option key ".concat(optionKey, " is not found"));
147259
- }
147260
- var foundFlag = false;
147261
- Object.keys(this.extendInputMap).forEach(function(inputKey) {
147262
- var _beforeInput$options2, _afterInput$options2;
147263
- var beforeInput = _this3.extendInputMap[inputKey].before.find(function(item) {
147264
- return item.key === key;
147265
- });
147266
- var afterInput = _this3.extendInputMap[inputKey].after.find(function(item) {
147267
- return item.key === key;
147268
- });
147269
- if (beforeInput || afterInput) {
147270
- foundFlag = true;
147271
- }
147272
- if (beforeInput && !((_beforeInput$options2 = beforeInput.options) !== null && _beforeInput$options2 !== void 0 && _beforeInput$options2.find(function(item) {
147273
- return item.key === optionKey;
147274
- })) || afterInput && !((_afterInput$options2 = afterInput.options) !== null && _afterInput$options2 !== void 0 && _afterInput$options2.find(function(item) {
147275
- return item.key === optionKey;
147276
- }))) {
147277
- throw new Error("the option key ".concat(optionKey, " is not found"));
147278
- }
147279
- });
147280
- if (!input && !foundFlag) {
147281
- throw new Error("the input key ".concat(key, " is not found"));
147282
- }
147283
- }
147284
147235
  }, {
147285
147236
  key: "addInputBefore",
147286
147237
  value: function addInputBefore(key, input) {
147287
147238
  this.validateInputKey(key);
147288
- this.validateInput(input);
147289
- if (this.extendInputMap[key]) {
147290
- this.extendInputMap[key].before.push(input);
147291
- } else {
147292
- this.extendInputMap[key] = {
147293
- before: [input],
147294
- after: []
147295
- };
147239
+ var properties = input.properties || {};
147240
+ for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {
147241
+ var inputKey = _Object$keys[_i];
147242
+ this.validateInput(inputKey);
147243
+ if (this.extendInputMap[key]) {
147244
+ this.extendInputMap[key].before[inputKey] = properties[inputKey];
147245
+ } else {
147246
+ this.extendInputMap[key] = {
147247
+ before: _defineProperty({}, inputKey, properties[inputKey]),
147248
+ after: {}
147249
+ };
147250
+ }
147296
147251
  }
147297
147252
  }
147298
147253
  }, {
147299
147254
  key: "addInputAfter",
147300
147255
  value: function addInputAfter(key, input) {
147301
147256
  this.validateInputKey(key);
147302
- this.validateInput(input);
147303
- if (this.extendInputMap[key]) {
147304
- this.extendInputMap[key].after.push(input);
147305
- } else {
147306
- this.extendInputMap[key] = {
147307
- before: [],
147308
- after: [input]
147309
- };
147257
+ var properties = input.properties || {};
147258
+ for (var _i2 = 0, _Object$keys2 = Object.keys(properties); _i2 < _Object$keys2.length; _i2++) {
147259
+ var inputKey = _Object$keys2[_i2];
147260
+ this.validateInput(inputKey);
147261
+ if (this.extendInputMap[key]) {
147262
+ this.extendInputMap[key].after[inputKey] = properties[inputKey];
147263
+ } else {
147264
+ this.extendInputMap[key] = {
147265
+ before: {},
147266
+ after: _defineProperty({}, inputKey, properties[inputKey])
147267
+ };
147268
+ }
147310
147269
  }
147311
147270
  }
147312
147271
  }, {
147313
147272
  key: "setInput",
147314
147273
  value: function setInput(key, field, value) {
147315
- var index = this.inputs.findIndex(function(item) {
147316
- return item.key === key;
147317
- });
147318
- if (index !== -1) {
147319
- var originInput = this.transformSchema(this.inputs[index]);
147320
- var _input = this.getFinalInput(originInput);
147321
- var targetValue = (0, import_lodash6.isFunction)(value) ? value(_input) : value;
147322
- this.inputs[index] = this.transformInput(_objectSpread2(_objectSpread2({}, originInput), {}, _defineProperty({}, field, targetValue)));
147323
- if (field === "options") {
147324
- this.resetExtendOptionMap(key);
147325
- }
147274
+ var schema = this.solutionSchema[key];
147275
+ if (schema) {
147276
+ schema[field] = (0, import_lodash6.isFunction)(value) ? value(schema) : value;
147326
147277
  return;
147327
147278
  }
147328
147279
  var findFlag = false;
147329
- for (var _i = 0, _Object$keys = Object.keys(this.extendInputMap); _i < _Object$keys.length; _i++) {
147330
- var inputKey = _Object$keys[_i];
147331
- var beforeIndex = this.extendInputMap[inputKey].before.findIndex(function(item) {
147332
- return item.key === key;
147333
- });
147334
- var afterIndex = this.extendInputMap[inputKey].after.findIndex(function(item) {
147335
- return item.key === key;
147336
- });
147337
- if (beforeIndex !== -1) {
147280
+ for (var _i3 = 0, _Object$keys3 = Object.keys(this.extendInputMap); _i3 < _Object$keys3.length; _i3++) {
147281
+ var inputKey = _Object$keys3[_i3];
147282
+ var beforeSchema = this.extendInputMap[inputKey].before[key];
147283
+ if (beforeSchema) {
147338
147284
  findFlag = true;
147339
- var originBeforeInput = this.extendInputMap[inputKey].before[beforeIndex];
147340
- var _input2 = this.getFinalInput(originBeforeInput);
147341
- var _targetValue = (0, import_lodash6.isFunction)(value) ? value(_input2) : value;
147342
- this.extendInputMap[inputKey].before[beforeIndex] = _objectSpread2(_objectSpread2({}, originBeforeInput), {}, _defineProperty({}, field, _targetValue));
147343
- if (field === "options") {
147344
- this.resetExtendOptionMap(key);
147345
- }
147285
+ beforeSchema[field] = (0, import_lodash6.isFunction)(value) ? value(schema) : value;
147346
147286
  break;
147347
147287
  }
147348
- if (afterIndex !== -1) {
147288
+ var afterSchema = this.extendInputMap[inputKey].after[key];
147289
+ if (afterSchema) {
147349
147290
  findFlag = true;
147350
- var originAfterInput = this.extendInputMap[inputKey].after[afterIndex];
147351
- var _input3 = this.getFinalInput(originAfterInput);
147352
- var _targetValue2 = (0, import_lodash6.isFunction)(value) ? value(_input3) : value;
147353
- this.extendInputMap[inputKey].after[afterIndex] = _objectSpread2(_objectSpread2({}, originAfterInput), {}, _defineProperty({}, field, _targetValue2));
147354
- if (field === "options") {
147355
- this.resetExtendOptionMap(key);
147356
- }
147291
+ afterSchema[field] = (0, import_lodash6.isFunction)(value) ? value(schema) : value;
147357
147292
  break;
147358
147293
  }
147359
147294
  }
@@ -147361,135 +147296,26 @@ var PluginInputContext = /* @__PURE__ */ function() {
147361
147296
  throw new Error("the input ".concat(key, " not found"));
147362
147297
  }
147363
147298
  }
147364
- }, {
147365
- key: "transformInput",
147366
- value: function transformInput(input) {
147367
- var _input$options, _input$options2;
147368
- var valueOption = (_input$options = input.options) === null || _input$options === void 0 ? void 0 : _input$options.find(function(option) {
147369
- return option.isDefault;
147370
- });
147371
- return {
147372
- key: input.key,
147373
- label: input.name,
147374
- type: ["string"],
147375
- mutualExclusion: input.type === InputType.Radio,
147376
- coexit: input.type === InputType.Checkbox,
147377
- items: (_input$options2 = input.options) === null || _input$options2 === void 0 ? void 0 : _input$options2.map(function(option) {
147378
- return {
147379
- key: option.key,
147380
- label: option.name,
147381
- when: option.when
147382
- };
147383
- }),
147384
- when: input.when,
147385
- state: {
147386
- value: valueOption ? valueOption.key : void 0
147387
- },
147388
- validate: input.validate
147389
- };
147390
- }
147391
- }, {
147392
- key: "transformSchema",
147393
- value: function transformSchema(schema) {
147394
- var _schema$items;
147395
- return {
147396
- key: schema.key,
147397
- name: schema.label,
147398
- type: schema.mutualExclusion ? InputType.Radio : schema.coexit ? InputType.Checkbox : InputType.Input,
147399
- options: (_schema$items = schema.items) === null || _schema$items === void 0 ? void 0 : _schema$items.map(function(item) {
147400
- var _schema$state;
147401
- return {
147402
- key: item.key,
147403
- name: item.label,
147404
- isDefault: item.key === ((_schema$state = schema.state) === null || _schema$state === void 0 ? void 0 : _schema$state.value)
147405
- };
147406
- }),
147407
- when: schema.when,
147408
- validate: schema.validate
147409
- };
147410
- }
147411
- }, {
147412
- key: "getFinalInput",
147413
- value: function getFinalInput(input) {
147414
- var _this4 = this;
147415
- var extendOption = this.extendOptionMap[input.key];
147416
- if (extendOption) {
147417
- var _input$options3;
147418
- var result = [];
147419
- (_input$options3 = input.options) === null || _input$options3 === void 0 ? void 0 : _input$options3.forEach(function(option) {
147420
- var _ref = extendOption[option.key] || {
147421
- before: [],
147422
- after: []
147423
- }, before = _ref.before, after = _ref.after;
147424
- before.forEach(function(item) {
147425
- return result.push(item);
147426
- });
147427
- result.push(option);
147428
- after.forEach(function(item) {
147429
- return result.push(item);
147430
- });
147431
- _this4.extendOptionMap[input.key][option.key] = {
147432
- before: [],
147433
- after: []
147434
- };
147435
- });
147436
- input.options = result;
147437
- }
147438
- return input;
147439
- }
147440
147299
  }, {
147441
147300
  key: "getFinalInputs",
147442
147301
  value: function getFinalInputs() {
147443
- var _this5 = this;
147444
- var result = [];
147445
- this.inputs.forEach(function(input) {
147446
- var _ref2 = _this5.extendInputMap[input.key] || {
147447
- before: [],
147448
- after: []
147449
- }, before = _ref2.before, after = _ref2.after;
147450
- before.forEach(function(item) {
147451
- return result.push(_this5.transformInput(_this5.getFinalInput(item)));
147452
- });
147453
- result.push(_this5.transformInput(_this5.getFinalInput(_this5.transformSchema(input))));
147454
- after.forEach(function(item) {
147455
- return result.push(_this5.transformInput(_this5.getFinalInput(item)));
147302
+ var _this2 = this;
147303
+ var result = {};
147304
+ Object.keys(this.solutionSchema).forEach(function(key) {
147305
+ var _ref = _this2.extendInputMap[key] || {
147306
+ before: {},
147307
+ after: {}
147308
+ }, before = _ref.before, after = _ref.after;
147309
+ Object.keys(before).forEach(function(beforeKey) {
147310
+ return result[beforeKey] = before[beforeKey];
147311
+ });
147312
+ result[key] = _this2.solutionSchema[key];
147313
+ Object.keys(after).forEach(function(afterKey) {
147314
+ return result[afterKey] = after[afterKey];
147456
147315
  });
147457
147316
  });
147458
147317
  return result;
147459
147318
  }
147460
- }, {
147461
- key: "initExtendOptionMap",
147462
- value: function initExtendOptionMap(key, optionKey) {
147463
- this.extendOptionMap[key] = this.extendOptionMap[key] || _defineProperty({}, key, _defineProperty({}, optionKey, {
147464
- before: [],
147465
- after: []
147466
- }));
147467
- this.extendOptionMap[key][optionKey] = this.extendOptionMap[key][optionKey] || {
147468
- before: [],
147469
- after: []
147470
- };
147471
- }
147472
- }, {
147473
- key: "resetExtendOptionMap",
147474
- value: function resetExtendOptionMap(key) {
147475
- this.extendOptionMap[key] = {};
147476
- }
147477
- }, {
147478
- key: "addOptionBefore",
147479
- value: function addOptionBefore(key, optionKey, option) {
147480
- this.validateOptionKey(key, optionKey);
147481
- this.validateOption(key, option);
147482
- this.initExtendOptionMap(key, optionKey);
147483
- this.extendOptionMap[key][optionKey].before.push(option);
147484
- }
147485
- }, {
147486
- key: "addOptionAfter",
147487
- value: function addOptionAfter(key, optionKey, option) {
147488
- this.validateOptionKey(key, optionKey);
147489
- this.validateOption(key, option);
147490
- this.initExtendOptionMap(key, optionKey);
147491
- this.extendOptionMap[key][optionKey].after.push(option);
147492
- }
147493
147319
  }, {
147494
147320
  key: "setInputValue",
147495
147321
  value: function setInputValue(value) {
@@ -147757,7 +147583,7 @@ var LifeCycle2;
147757
147583
  LifeCycle3["AfterForged"] = "afterForged";
147758
147584
  })(LifeCycle2 || (LifeCycle2 = {}));
147759
147585
  var PluginContext = /* @__PURE__ */ function() {
147760
- function PluginContext2(inputs, locale) {
147586
+ function PluginContext2(solutionSchema, locale) {
147761
147587
  var _defineProperty2;
147762
147588
  _classCallCheck(this, PluginContext2);
147763
147589
  _defineProperty(this, "generator", void 0);
@@ -147770,7 +147596,7 @@ var PluginContext = /* @__PURE__ */ function() {
147770
147596
  _defineProperty(this, "lifeCycleFuncMap", (_defineProperty2 = {}, _defineProperty(_defineProperty2, LifeCycle2.OnForged, function() {
147771
147597
  }), _defineProperty(_defineProperty2, LifeCycle2.AfterForged, function() {
147772
147598
  }), _defineProperty2));
147773
- this.inputContext = new PluginInputContext(inputs);
147599
+ this.inputContext = new PluginInputContext(solutionSchema);
147774
147600
  this.gitAPI = new PluginGitAPI();
147775
147601
  this.fileAPI = new PluginFileAPI();
147776
147602
  this.locale = locale;
@@ -148066,13 +147892,13 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
148066
147892
  }()
148067
147893
  }, {
148068
147894
  key: "getInputSchema",
148069
- value: function getInputSchema(solution) {
148070
- var items5 = [];
147895
+ value: function getInputSchema() {
147896
+ var properties = {};
148071
147897
  var _iterator = _createForOfIteratorHelper(this.plugins), _step;
148072
147898
  try {
148073
147899
  for (_iterator.s(); !(_step = _iterator.n()).done; ) {
148074
147900
  var info = _step.value;
148075
- items5 = [].concat(_toConsumableArray(items5), _toConsumableArray(info.context.inputContext.getFinalInputs()));
147901
+ properties = _objectSpread2(_objectSpread2({}, properties), info.context.inputContext.getFinalInputs());
148076
147902
  }
148077
147903
  } catch (err) {
148078
147904
  _iterator.e(err);
@@ -148080,9 +147906,8 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
148080
147906
  _iterator.f();
148081
147907
  }
148082
147908
  return {
148083
- key: "".concat(solution, "_plugin_schema"),
148084
- isObject: true,
148085
- items: items5
147909
+ type: "object",
147910
+ properties
148086
147911
  };
148087
147912
  }
148088
147913
  }, {
@@ -148150,6 +147975,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
148150
147975
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) {
148151
147976
  info = _step4.value;
148152
147977
  info.context = new PluginContext(SolutionSchemas[solution], inputData.locale);
147978
+ info.context.inputContext.prepare(inputData);
148153
147979
  info.module(info.context.context);
148154
147980
  }
148155
147981
  } catch (err) {
@@ -148319,10 +148145,11 @@ var getNeedRunPlugin = (context, generatorPlugin) => {
148319
148145
  };
148320
148146
  var handleTemplateFile = async (context, generator, appApi, generatorPlugin) => {
148321
148147
  const { isMonorepo } = context.config;
148322
- const { solution } = await appApi.getInputBySchema(isMonorepo ? MonorepoNewActionSchema : SolutionSchema, {
148148
+ const { solution } = await appApi.getInputBySchemaFunc(isMonorepo ? getMonorepoNewActionSchema : getSolutionSchema, {
148323
148149
  ...context.config,
148324
148150
  customPlugin: generatorPlugin?.customPlugin
148325
148151
  });
148152
+ await appApi.getInputBySchemaFunc(getScenesSchema, context.config);
148326
148153
  const solutionGenerator = solution === "custom" ? BaseGenerator : isMonorepo ? SubSolutionGenerator[solution] : SolutionGenerator[solution];
148327
148154
  if (!solution || !solutionGenerator) {
148328
148155
  generator.logger.error("solution is not valid ");