@modern-js/repo-generator 0.0.0-canary-20221026085130 → 0.0.0-canary-20221026100629

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 +1096 -911
  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, action2) {
1966
- return action2.func.apply(action2.thisArg, arrayPush([result3], action2.args));
1965
+ return arrayReduce(actions, function(result3, action3) {
1966
+ return action3.func.apply(action3.thisArg, arrayPush([result3], action3.args));
1967
1967
  }, result2);
1968
1968
  }
1969
1969
  function baseXor(arrays, iteratee2, comparator) {
@@ -34589,6 +34589,7 @@ 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;
34592
34593
  var LOG_LEVEL = {
34593
34594
  error: 0,
34594
34595
  warn: 1,
@@ -34603,18 +34604,13 @@ var require_logger = __commonJSMin((exports) => {
34603
34604
  level: "error"
34604
34605
  },
34605
34606
  info: {
34606
- color: "cyan",
34607
+ color: "blue",
34607
34608
  label: "info",
34608
34609
  level: "info"
34609
34610
  },
34610
- success: {
34611
- color: "green",
34612
- label: "Success",
34613
- level: "info"
34614
- },
34615
34611
  warn: {
34616
34612
  color: "yellow",
34617
- label: "warn",
34613
+ label: "warning",
34618
34614
  level: "warn"
34619
34615
  },
34620
34616
  debug: {
@@ -34626,10 +34622,13 @@ var require_logger = __commonJSMin((exports) => {
34626
34622
  };
34627
34623
  var DEFAULT_CONFIG = {
34628
34624
  displayLabel: true,
34625
+ underlineLabel: true,
34629
34626
  uppercaseLabel: false
34630
34627
  };
34631
34628
  var Logger = class {
34632
34629
  constructor(options3 = {}) {
34630
+ this.logCount = 200;
34631
+ this.history = {};
34633
34632
  this.level = options3.level || LOG_TYPES.log.level;
34634
34633
  this.config = { ...DEFAULT_CONFIG, ...options3.config || {} };
34635
34634
  this.types = {
@@ -34641,46 +34640,77 @@ var require_logger = __commonJSMin((exports) => {
34641
34640
  this[type] = this._log.bind(this, type);
34642
34641
  });
34643
34642
  }
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
+ }
34644
34652
  _log(type, message, ...args) {
34645
- if (message === void 0 || message === null) {
34653
+ if (message === void 0) {
34646
34654
  console.log();
34647
34655
  return;
34648
34656
  }
34649
34657
  if (LOG_LEVEL[type] > LOG_LEVEL[this.level]) {
34650
34658
  return;
34651
34659
  }
34652
- let label = "";
34660
+ let label21 = "";
34653
34661
  let text = "";
34654
34662
  const logType = this.types[type];
34655
34663
  if (this.config.displayLabel && logType.label) {
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);
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;
34659
34671
  }
34660
34672
  if (message instanceof Error) {
34661
34673
  if (message.stack) {
34662
34674
  const [name5, ...rest] = message.stack.split("\n");
34663
34675
  text = `${name5}
34664
- ${chalk_1.default.grey(rest.join("\n"))}`;
34676
+ ${grey(rest.join("\n"))}`;
34665
34677
  } else {
34666
34678
  text = message.message;
34667
34679
  }
34668
34680
  } else {
34669
34681
  text = `${message}`;
34670
34682
  }
34671
- const log = label.length > 0 ? `${label} ${text}` : text;
34683
+ if (logType.level === "warn" || logType.level === "error") {
34684
+ this.retainLog(type, text);
34685
+ }
34686
+ const log = label21.length > 0 ? `${label21} ${text}` : text;
34672
34687
  console.log(log, ...args);
34673
34688
  }
34674
34689
  getLongestLabel() {
34675
34690
  let longestLabel = "";
34676
34691
  Object.keys(this.types).forEach((type) => {
34677
- const { label = "" } = this.types[type];
34678
- if (label.length > longestLabel.length) {
34679
- longestLabel = label;
34692
+ const { label: label21 = "" } = this.types[type];
34693
+ if (label21.length > longestLabel.length) {
34694
+ longestLabel = label21;
34680
34695
  }
34681
34696
  });
34682
34697
  return longestLabel;
34683
34698
  }
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
+ }
34684
34714
  };
34685
34715
  exports.Logger = Logger;
34686
34716
  var logger = new Logger();
@@ -35340,13 +35370,10 @@ var require_getPort = __commonJSMin((exports) => {
35340
35370
  var net_1 = __importDefault(__require("net"));
35341
35371
  var compiled_1 = require_compiled();
35342
35372
  var logger_1 = require_logger();
35343
- var getPort = async (port, { tryLimits = 20, strictPort = false } = {}) => {
35373
+ var getPort = async (port, tryLimits = 20) => {
35344
35374
  if (typeof port === "string") {
35345
35375
  port = parseInt(port, 10);
35346
35376
  }
35347
- if (strictPort) {
35348
- tryLimits = 1;
35349
- }
35350
35377
  const original = port;
35351
35378
  let found = false;
35352
35379
  let attempts = 0;
@@ -35373,11 +35400,7 @@ var require_getPort = __commonJSMin((exports) => {
35373
35400
  }
35374
35401
  }
35375
35402
  if (port !== original) {
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
- }
35403
+ logger_1.logger.info(compiled_1.chalk.red(`Something is already running on port ${original}. ${compiled_1.chalk.yellow(`Use port ${port} instead.`)}`));
35381
35404
  }
35382
35405
  return port;
35383
35406
  };
@@ -36189,20 +36212,15 @@ var require_chainId = __commonJSMin((exports) => {
36189
36212
  }
36190
36213
  };
36191
36214
  });
36192
- var require_version = __commonJSMin((exports) => {
36215
+ var require_reactVersion = __commonJSMin((exports) => {
36193
36216
  "use strict";
36194
36217
  var __importDefault = exports && exports.__importDefault || function(mod) {
36195
36218
  return mod && mod.__esModule ? mod : { "default": mod };
36196
36219
  };
36197
36220
  Object.defineProperty(exports, "__esModule", { value: true });
36198
- exports.isReact18 = exports.getPnpmVersion = void 0;
36221
+ exports.isReact18 = void 0;
36199
36222
  var path_1 = __importDefault(__require("path"));
36200
36223
  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;
36206
36224
  var isReact18 = (cwd) => {
36207
36225
  const pkgPath = path_1.default.join(cwd, "package.json");
36208
36226
  if (!compiled_1.fs.existsSync(pkgPath)) {
@@ -36279,7 +36297,7 @@ var require_dist = __commonJSMin((exports) => {
36279
36297
  __exportStar(require_tryResolve(), exports);
36280
36298
  __exportStar(require_analyzeProject(), exports);
36281
36299
  __exportStar(require_chainId(), exports);
36282
- __exportStar(require_version(), exports);
36300
+ __exportStar(require_reactVersion(), exports);
36283
36301
  });
36284
36302
  var require_esprima = __commonJSMin((exports, module2) => {
36285
36303
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -37401,9 +37419,9 @@ var require_esprima = __commonJSMin((exports, module2) => {
37401
37419
  }();
37402
37420
  exports2.BlockStatement = BlockStatement;
37403
37421
  var BreakStatement = function() {
37404
- function BreakStatement2(label) {
37422
+ function BreakStatement2(label21) {
37405
37423
  this.type = syntax_1.Syntax.BreakStatement;
37406
- this.label = label;
37424
+ this.label = label21;
37407
37425
  }
37408
37426
  return BreakStatement2;
37409
37427
  }();
@@ -37475,9 +37493,9 @@ var require_esprima = __commonJSMin((exports, module2) => {
37475
37493
  }();
37476
37494
  exports2.ConditionalExpression = ConditionalExpression;
37477
37495
  var ContinueStatement = function() {
37478
- function ContinueStatement2(label) {
37496
+ function ContinueStatement2(label21) {
37479
37497
  this.type = syntax_1.Syntax.ContinueStatement;
37480
- this.label = label;
37498
+ this.label = label21;
37481
37499
  }
37482
37500
  return ContinueStatement2;
37483
37501
  }();
@@ -37668,9 +37686,9 @@ var require_esprima = __commonJSMin((exports, module2) => {
37668
37686
  }();
37669
37687
  exports2.ImportSpecifier = ImportSpecifier;
37670
37688
  var LabeledStatement = function() {
37671
- function LabeledStatement2(label, body) {
37689
+ function LabeledStatement2(label21, body) {
37672
37690
  this.type = syntax_1.Syntax.LabeledStatement;
37673
- this.label = label;
37691
+ this.label = label21;
37674
37692
  this.body = body;
37675
37693
  }
37676
37694
  return LabeledStatement2;
@@ -39817,38 +39835,38 @@ var require_esprima = __commonJSMin((exports, module2) => {
39817
39835
  Parser3.prototype.parseContinueStatement = function() {
39818
39836
  var node = this.createNode();
39819
39837
  this.expectKeyword("continue");
39820
- var label = null;
39838
+ var label21 = null;
39821
39839
  if (this.lookahead.type === 3 && !this.hasLineTerminator) {
39822
39840
  var id = this.parseVariableIdentifier();
39823
- label = id;
39841
+ label21 = id;
39824
39842
  var key = "$" + id.name;
39825
39843
  if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
39826
39844
  this.throwError(messages_1.Messages.UnknownLabel, id.name);
39827
39845
  }
39828
39846
  }
39829
39847
  this.consumeSemicolon();
39830
- if (label === null && !this.context.inIteration) {
39848
+ if (label21 === null && !this.context.inIteration) {
39831
39849
  this.throwError(messages_1.Messages.IllegalContinue);
39832
39850
  }
39833
- return this.finalize(node, new Node.ContinueStatement(label));
39851
+ return this.finalize(node, new Node.ContinueStatement(label21));
39834
39852
  };
39835
39853
  Parser3.prototype.parseBreakStatement = function() {
39836
39854
  var node = this.createNode();
39837
39855
  this.expectKeyword("break");
39838
- var label = null;
39856
+ var label21 = null;
39839
39857
  if (this.lookahead.type === 3 && !this.hasLineTerminator) {
39840
39858
  var id = this.parseVariableIdentifier();
39841
39859
  var key = "$" + id.name;
39842
39860
  if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
39843
39861
  this.throwError(messages_1.Messages.UnknownLabel, id.name);
39844
39862
  }
39845
- label = id;
39863
+ label21 = id;
39846
39864
  }
39847
39865
  this.consumeSemicolon();
39848
- if (label === null && !this.context.inIteration && !this.context.inSwitch) {
39866
+ if (label21 === null && !this.context.inIteration && !this.context.inSwitch) {
39849
39867
  this.throwError(messages_1.Messages.IllegalBreak);
39850
39868
  }
39851
- return this.finalize(node, new Node.BreakStatement(label));
39869
+ return this.finalize(node, new Node.BreakStatement(label21));
39852
39870
  };
39853
39871
  Parser3.prototype.parseReturnStatement = function() {
39854
39872
  if (!this.context.inFunctionBody) {
@@ -43327,7 +43345,7 @@ var require_array = __commonJSMin((exports, module2) => {
43327
43345
  splice(...args) {
43328
43346
  const { length } = this;
43329
43347
  const ret = super.splice(...args);
43330
- let [begin, deleteCount, ...items] = args;
43348
+ let [begin, deleteCount, ...items5] = args;
43331
43349
  if (begin < 0) {
43332
43350
  begin += length;
43333
43351
  }
@@ -43338,7 +43356,7 @@ var require_array = __commonJSMin((exports, module2) => {
43338
43356
  }
43339
43357
  const {
43340
43358
  length: item_length
43341
- } = items;
43359
+ } = items5;
43342
43360
  const offset = item_length - deleteCount;
43343
43361
  const start = begin + deleteCount;
43344
43362
  const count = length - start;
@@ -43365,12 +43383,12 @@ var require_array = __commonJSMin((exports, module2) => {
43365
43383
  move_comments(array, this, begin, before - begin, -begin);
43366
43384
  return array;
43367
43385
  }
43368
- unshift(...items) {
43386
+ unshift(...items5) {
43369
43387
  const { length } = this;
43370
- const ret = super.unshift(...items);
43388
+ const ret = super.unshift(...items5);
43371
43389
  const {
43372
43390
  length: items_length
43373
- } = items;
43391
+ } = items5;
43374
43392
  if (items_length > 0) {
43375
43393
  move_comments(this, this, 0, length, items_length, true);
43376
43394
  }
@@ -43393,14 +43411,14 @@ var require_array = __commonJSMin((exports, module2) => {
43393
43411
  remove_comments(this, this.length);
43394
43412
  return ret;
43395
43413
  }
43396
- concat(...items) {
43414
+ concat(...items5) {
43397
43415
  let { length } = this;
43398
- const ret = super.concat(...items);
43399
- if (!items.length) {
43416
+ const ret = super.concat(...items5);
43417
+ if (!items5.length) {
43400
43418
  return ret;
43401
43419
  }
43402
43420
  move_comments(ret, this, 0, this.length, 0);
43403
- items.forEach((item) => {
43421
+ items5.forEach((item) => {
43404
43422
  const prev = length;
43405
43423
  length += isArray4(item) ? item.length : 1;
43406
43424
  if (!(item instanceof CommentArray)) {
@@ -54152,18 +54170,18 @@ var require_parser = __commonJSMin((exports, module2) => {
54152
54170
  }
54153
54171
  return token;
54154
54172
  }
54155
- var symbol, preErrorSymbol, state, action2, a, r, yyval = {}, p, len, newState, expected;
54173
+ var symbol, preErrorSymbol, state, action3, a, r, yyval = {}, p, len, newState, expected;
54156
54174
  while (true) {
54157
54175
  state = stack[stack.length - 1];
54158
54176
  if (this.defaultActions[state]) {
54159
- action2 = this.defaultActions[state];
54177
+ action3 = this.defaultActions[state];
54160
54178
  } else {
54161
54179
  if (symbol === null || typeof symbol == "undefined") {
54162
54180
  symbol = lex();
54163
54181
  }
54164
- action2 = table[state] && table[state][symbol];
54182
+ action3 = table[state] && table[state][symbol];
54165
54183
  }
54166
- if (typeof action2 === "undefined" || !action2.length || !action2[0]) {
54184
+ if (typeof action3 === "undefined" || !action3.length || !action3[0]) {
54167
54185
  var errStr = "";
54168
54186
  if (!recovering) {
54169
54187
  expected = [];
@@ -54179,15 +54197,15 @@ var require_parser = __commonJSMin((exports, module2) => {
54179
54197
  this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected });
54180
54198
  }
54181
54199
  }
54182
- if (action2[0] instanceof Array && action2.length > 1) {
54200
+ if (action3[0] instanceof Array && action3.length > 1) {
54183
54201
  throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
54184
54202
  }
54185
- switch (action2[0]) {
54203
+ switch (action3[0]) {
54186
54204
  case 1:
54187
54205
  stack.push(symbol);
54188
54206
  vstack.push(this.lexer.yytext);
54189
54207
  lstack.push(this.lexer.yylloc);
54190
- stack.push(action2[1]);
54208
+ stack.push(action3[1]);
54191
54209
  symbol = null;
54192
54210
  if (!preErrorSymbol) {
54193
54211
  yyleng = this.lexer.yyleng;
@@ -54202,13 +54220,13 @@ var require_parser = __commonJSMin((exports, module2) => {
54202
54220
  }
54203
54221
  break;
54204
54222
  case 2:
54205
- len = this.productions_[action2[1]][1];
54223
+ len = this.productions_[action3[1]][1];
54206
54224
  yyval.$ = vstack[vstack.length - len];
54207
54225
  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 };
54208
54226
  if (ranges) {
54209
54227
  yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
54210
54228
  }
54211
- r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action2[1], vstack, lstack);
54229
+ r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action3[1], vstack, lstack);
54212
54230
  if (typeof r !== "undefined") {
54213
54231
  return r;
54214
54232
  }
@@ -54217,7 +54235,7 @@ var require_parser = __commonJSMin((exports, module2) => {
54217
54235
  vstack = vstack.slice(0, -1 * len);
54218
54236
  lstack = lstack.slice(0, -1 * len);
54219
54237
  }
54220
- stack.push(this.productions_[action2[1]][0]);
54238
+ stack.push(this.productions_[action3[1]][0]);
54221
54239
  vstack.push(yyval.$);
54222
54240
  lstack.push(yyval._$);
54223
54241
  newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
@@ -57682,11 +57700,11 @@ var require_javascript_compiler = __commonJSMin((exports, module2) => {
57682
57700
  var functionCall = this.source.functionCall(functionLookupCode, "call", helper.callParams);
57683
57701
  this.push(functionCall);
57684
57702
  },
57685
- itemsSeparatedBy: function itemsSeparatedBy(items, separator) {
57703
+ itemsSeparatedBy: function itemsSeparatedBy(items5, separator) {
57686
57704
  var result = [];
57687
- result.push(items[0]);
57688
- for (var i = 1; i < items.length; i++) {
57689
- result.push(separator, items[i]);
57705
+ result.push(items5[0]);
57706
+ for (var i = 1; i < items5.length; i++) {
57707
+ result.push(separator, items5[i]);
57690
57708
  }
57691
57709
  return result;
57692
57710
  },
@@ -64902,8 +64920,8 @@ var require_AsapAction = __commonJSMin((exports) => {
64902
64920
  if (delay != null && delay > 0 || delay == null && this.delay > 0) {
64903
64921
  return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
64904
64922
  }
64905
- if (!scheduler.actions.some(function(action2) {
64906
- return action2.id === id;
64923
+ if (!scheduler.actions.some(function(action3) {
64924
+ return action3.id === id;
64907
64925
  })) {
64908
64926
  immediateProvider_1.immediateProvider.clearImmediate(id);
64909
64927
  scheduler._scheduled = void 0;
@@ -64976,23 +64994,23 @@ var require_AsyncScheduler = __commonJSMin((exports) => {
64976
64994
  _this._scheduled = void 0;
64977
64995
  return _this;
64978
64996
  }
64979
- AsyncScheduler2.prototype.flush = function(action2) {
64997
+ AsyncScheduler2.prototype.flush = function(action3) {
64980
64998
  var actions = this.actions;
64981
64999
  if (this._active) {
64982
- actions.push(action2);
65000
+ actions.push(action3);
64983
65001
  return;
64984
65002
  }
64985
65003
  var error;
64986
65004
  this._active = true;
64987
65005
  do {
64988
- if (error = action2.execute(action2.state, action2.delay)) {
65006
+ if (error = action3.execute(action3.state, action3.delay)) {
64989
65007
  break;
64990
65008
  }
64991
- } while (action2 = actions.shift());
65009
+ } while (action3 = actions.shift());
64992
65010
  this._active = false;
64993
65011
  if (error) {
64994
- while (action2 = actions.shift()) {
64995
- action2.unsubscribe();
65012
+ while (action3 = actions.shift()) {
65013
+ action3.unsubscribe();
64996
65014
  }
64997
65015
  throw error;
64998
65016
  }
@@ -65032,22 +65050,22 @@ var require_AsapScheduler = __commonJSMin((exports) => {
65032
65050
  function AsapScheduler2() {
65033
65051
  return _super !== null && _super.apply(this, arguments) || this;
65034
65052
  }
65035
- AsapScheduler2.prototype.flush = function(action2) {
65053
+ AsapScheduler2.prototype.flush = function(action3) {
65036
65054
  this._active = true;
65037
65055
  var flushId = this._scheduled;
65038
65056
  this._scheduled = void 0;
65039
65057
  var actions = this.actions;
65040
65058
  var error;
65041
- action2 = action2 || actions.shift();
65059
+ action3 = action3 || actions.shift();
65042
65060
  do {
65043
- if (error = action2.execute(action2.state, action2.delay)) {
65061
+ if (error = action3.execute(action3.state, action3.delay)) {
65044
65062
  break;
65045
65063
  }
65046
- } while ((action2 = actions[0]) && action2.id === flushId && actions.shift());
65064
+ } while ((action3 = actions[0]) && action3.id === flushId && actions.shift());
65047
65065
  this._active = false;
65048
65066
  if (error) {
65049
- while ((action2 = actions[0]) && action2.id === flushId && actions.shift()) {
65050
- action2.unsubscribe();
65067
+ while ((action3 = actions[0]) && action3.id === flushId && actions.shift()) {
65068
+ action3.unsubscribe();
65051
65069
  }
65052
65070
  throw error;
65053
65071
  }
@@ -65234,8 +65252,8 @@ var require_AnimationFrameAction = __commonJSMin((exports) => {
65234
65252
  if (delay != null && delay > 0 || delay == null && this.delay > 0) {
65235
65253
  return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
65236
65254
  }
65237
- if (!scheduler.actions.some(function(action2) {
65238
- return action2.id === id;
65255
+ if (!scheduler.actions.some(function(action3) {
65256
+ return action3.id === id;
65239
65257
  })) {
65240
65258
  animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);
65241
65259
  scheduler._scheduled = void 0;
@@ -65277,22 +65295,22 @@ var require_AnimationFrameScheduler = __commonJSMin((exports) => {
65277
65295
  function AnimationFrameScheduler2() {
65278
65296
  return _super !== null && _super.apply(this, arguments) || this;
65279
65297
  }
65280
- AnimationFrameScheduler2.prototype.flush = function(action2) {
65298
+ AnimationFrameScheduler2.prototype.flush = function(action3) {
65281
65299
  this._active = true;
65282
65300
  var flushId = this._scheduled;
65283
65301
  this._scheduled = void 0;
65284
65302
  var actions = this.actions;
65285
65303
  var error;
65286
- action2 = action2 || actions.shift();
65304
+ action3 = action3 || actions.shift();
65287
65305
  do {
65288
- if (error = action2.execute(action2.state, action2.delay)) {
65306
+ if (error = action3.execute(action3.state, action3.delay)) {
65289
65307
  break;
65290
65308
  }
65291
- } while ((action2 = actions[0]) && action2.id === flushId && actions.shift());
65309
+ } while ((action3 = actions[0]) && action3.id === flushId && actions.shift());
65292
65310
  this._active = false;
65293
65311
  if (error) {
65294
- while ((action2 = actions[0]) && action2.id === flushId && actions.shift()) {
65295
- action2.unsubscribe();
65312
+ while ((action3 = actions[0]) && action3.id === flushId && actions.shift()) {
65313
+ action3.unsubscribe();
65296
65314
  }
65297
65315
  throw error;
65298
65316
  }
@@ -65358,17 +65376,17 @@ var require_VirtualTimeScheduler = __commonJSMin((exports) => {
65358
65376
  VirtualTimeScheduler2.prototype.flush = function() {
65359
65377
  var _a2 = this, actions = _a2.actions, maxFrames = _a2.maxFrames;
65360
65378
  var error;
65361
- var action2;
65362
- while ((action2 = actions[0]) && action2.delay <= maxFrames) {
65379
+ var action3;
65380
+ while ((action3 = actions[0]) && action3.delay <= maxFrames) {
65363
65381
  actions.shift();
65364
- this.frame = action2.delay;
65365
- if (error = action2.execute(action2.state, action2.delay)) {
65382
+ this.frame = action3.delay;
65383
+ if (error = action3.execute(action3.state, action3.delay)) {
65366
65384
  break;
65367
65385
  }
65368
65386
  }
65369
65387
  if (error) {
65370
- while (action2 = actions.shift()) {
65371
- action2.unsubscribe();
65388
+ while (action3 = actions.shift()) {
65389
+ action3.unsubscribe();
65372
65390
  }
65373
65391
  throw error;
65374
65392
  }
@@ -65400,9 +65418,9 @@ var require_VirtualTimeScheduler = __commonJSMin((exports) => {
65400
65418
  return _super.prototype.schedule.call(this, state, delay);
65401
65419
  }
65402
65420
  this.active = false;
65403
- var action2 = new VirtualAction2(this.scheduler, this.work);
65404
- this.add(action2);
65405
- return action2.schedule(state, delay);
65421
+ var action3 = new VirtualAction2(this.scheduler, this.work);
65422
+ this.add(action3);
65423
+ return action3.schedule(state, delay);
65406
65424
  } else {
65407
65425
  return Subscription_1.Subscription.EMPTY;
65408
65426
  }
@@ -79132,15 +79150,15 @@ var require_ora2 = __commonJSMin((exports, module2) => {
79132
79150
  return new Ora(options3);
79133
79151
  };
79134
79152
  module2.exports = oraFactory;
79135
- module2.exports.promise = (action2, options3) => {
79136
- if (typeof action2.then !== "function") {
79153
+ module2.exports.promise = (action3, options3) => {
79154
+ if (typeof action3.then !== "function") {
79137
79155
  throw new TypeError("Parameter `action` must be a Promise");
79138
79156
  }
79139
79157
  const spinner = new Ora(options3);
79140
79158
  spinner.start();
79141
79159
  (async () => {
79142
79160
  try {
79143
- await action2;
79161
+ await action3;
79144
79162
  spinner.succeed();
79145
79163
  } catch {
79146
79164
  spinner.fail();
@@ -79321,13 +79339,13 @@ var require_base3 = __commonJSMin((exports, module2) => {
79321
79339
  }
79322
79340
  handleSubmitEvents(submit) {
79323
79341
  const self3 = this;
79324
- const validate2 = runAsync(this.opt.validate);
79342
+ const validate5 = runAsync(this.opt.validate);
79325
79343
  const asyncFilter = runAsync(this.opt.filter);
79326
79344
  const validation = submit.pipe(flatMap((value) => {
79327
79345
  this.startSpinner(value, this.opt.filteringText);
79328
79346
  return asyncFilter(value, self3.answers).then((filteredValue) => {
79329
79347
  this.startSpinner(filteredValue, this.opt.validatingText);
79330
- return validate2(filteredValue, self3.answers).then((isValid5) => ({ isValid: isValid5, value: filteredValue }), (err) => ({ isValid: err, value: filteredValue }));
79348
+ return validate5(filteredValue, self3.answers).then((isValid5) => ({ isValid: isValid5, value: filteredValue }), (err) => ({ isValid: err, value: filteredValue }));
79331
79349
  }, (err) => ({ isValid: err }));
79332
79350
  }), share());
79333
79351
  const success = validation.pipe(filter3((state) => state.isValid === true), take(1));
@@ -97455,7 +97473,7 @@ var init_stateField = __esmMin(() => {
97455
97473
  if (typeof value.action === "function") {
97456
97474
  schema.state.value = {
97457
97475
  effectedByFields: value.effectedByFields,
97458
- action: function action2(data, lastValue) {
97476
+ action: function action3(data, lastValue) {
97459
97477
  return value.action(data, lastValue || initValue);
97460
97478
  }
97461
97479
  };
@@ -97773,8 +97791,8 @@ var init_checkSchema = __esmMin(() => {
97773
97791
  };
97774
97792
  checkRepeatItems = function checkRepeatItems2(schema, extra) {
97775
97793
  if (schema.items && schema.items.length > 0) {
97776
- var items = getItems(schema, {}, extra);
97777
- var keys = items.map(function(x) {
97794
+ var items5 = getItems(schema, {}, extra);
97795
+ var keys = items5.map(function(x) {
97778
97796
  return x.key;
97779
97797
  });
97780
97798
  var tmp = [];
@@ -97956,9 +97974,9 @@ var init_baseReader = __esmMin(() => {
97956
97974
  initValues[_schema.key] = _this.getSchemaDefaultValue(_schema, brothers, isRoot);
97957
97975
  }
97958
97976
  if (_schema.items) {
97959
- var items = getItems(_schema, _this.data, _this.extra);
97960
- items.forEach(function(each2) {
97961
- return readDefaultValue2(each2, items.map(function(x) {
97977
+ var items5 = getItems(_schema, _this.data, _this.extra);
97978
+ items5.forEach(function(each2) {
97979
+ return readDefaultValue2(each2, items5.map(function(x) {
97962
97980
  return x.key;
97963
97981
  }), false);
97964
97982
  });
@@ -97976,7 +97994,7 @@ var init_baseReader = __esmMin(() => {
97976
97994
  if (!isEffectedValue(val)) {
97977
97995
  return val;
97978
97996
  }
97979
- var _ref = val, _ref$effectedByFields = _ref.effectedByFields, effectedByFields = _ref$effectedByFields === void 0 ? [] : _ref$effectedByFields, action2 = _ref.action, rest = _objectWithoutProperties(_ref, _excluded);
97997
+ var _ref = val, _ref$effectedByFields = _ref.effectedByFields, effectedByFields = _ref$effectedByFields === void 0 ? [] : _ref$effectedByFields, action3 = _ref.action, rest = _objectWithoutProperties(_ref, _excluded);
97980
97998
  if (isRoot) {
97981
97999
  throw Error("[".concat(schema.key, "] top level should not have effects"));
97982
98000
  }
@@ -97988,7 +98006,7 @@ var init_baseReader = __esmMin(() => {
97988
98006
  }
97989
98007
  return _objectSpread2({
97990
98008
  effectedByFields: curNodeEffectedByFields,
97991
- action: action2
98009
+ action: action3
97992
98010
  }, rest);
97993
98011
  };
97994
98012
  return handleEffects(state.value);
@@ -98972,7 +98990,7 @@ var require_utils10 = __commonJSMin((exports) => {
98972
98990
  }, choices);
98973
98991
  };
98974
98992
  exports.getQuestion = getQuestion;
98975
- var when = (schema, answers, extra) => {
98993
+ var when8 = (schema, answers, extra) => {
98976
98994
  if (schema.when && typeof schema.when === "function") {
98977
98995
  return schema.when(answers, extra);
98978
98996
  }
@@ -98998,7 +99016,7 @@ var require_utils10 = __commonJSMin((exports) => {
98998
99016
  });
98999
99017
  return (answers) => {
99000
99018
  try {
99001
- if (!when(schema, answers, nodeInfo.extra)) {
99019
+ if (!when8(schema, answers, nodeInfo.extra)) {
99002
99020
  return Promise.resolve(true);
99003
99021
  }
99004
99022
  const question = getQuestion({
@@ -99602,18 +99620,18 @@ var require_transformSchema = __commonJSMin((exports) => {
99602
99620
  schemaItem.label = schemaItem.state.cliLabel;
99603
99621
  }
99604
99622
  const {
99605
- when,
99606
- validate: validate2
99623
+ when: when8,
99624
+ validate: validate5
99607
99625
  } = schemaItem;
99608
99626
  schemaItem.when = (values, extra) => {
99609
99627
  if (!(0, _lodash.isUndefined)(configValue[schemaItem.key])) {
99610
99628
  return false;
99611
99629
  }
99612
- return when ? when(values, extra) : true;
99630
+ return when8 ? when8(values, extra) : true;
99613
99631
  };
99614
99632
  schemaItem.validate = async (value, data, extra) => {
99615
- if (validate2) {
99616
- const result = await validate2(value, data, extra);
99633
+ if (validate5) {
99634
+ const result = await validate5(value, data, extra);
99617
99635
  if (!result.success) {
99618
99636
  return result;
99619
99637
  }
@@ -101989,11 +102007,11 @@ var init_esm = __esmMin(() => {
101989
102007
  return path6;
101990
102008
  };
101991
102009
  this.push = function() {
101992
- var items = [];
102010
+ var items5 = [];
101993
102011
  for (var _i = 0; _i < arguments.length; _i++) {
101994
- items[_i] = arguments[_i];
102012
+ items5[_i] = arguments[_i];
101995
102013
  }
101996
- return _this.concat.apply(_this, __spreadArray([], __read(items), false));
102014
+ return _this.concat.apply(_this, __spreadArray([], __read(items5), false));
101997
102015
  };
101998
102016
  this.pop = function() {
101999
102017
  if (_this.isMatchPattern || _this.isRegExp) {
@@ -102002,18 +102020,18 @@ var init_esm = __esmMin(() => {
102002
102020
  return new Path2(_this.segments.slice(0, _this.segments.length - 1));
102003
102021
  };
102004
102022
  this.splice = function(start, deleteCount) {
102005
- var items = [];
102023
+ var items5 = [];
102006
102024
  for (var _i = 2; _i < arguments.length; _i++) {
102007
- items[_i - 2] = arguments[_i];
102025
+ items5[_i - 2] = arguments[_i];
102008
102026
  }
102009
102027
  if (_this.isMatchPattern || _this.isRegExp) {
102010
102028
  throw new Error("".concat(_this.entire, " cannot be splice"));
102011
102029
  }
102012
- items = items.reduce(function(buf, item) {
102030
+ items5 = items5.reduce(function(buf, item) {
102013
102031
  return buf.concat(parseString(item));
102014
102032
  }, []);
102015
102033
  var segments_ = _this.segments.slice();
102016
- segments_.splice.apply(segments_, __spreadArray([start, deleteCount], __read(items), false));
102034
+ segments_.splice.apply(segments_, __spreadArray([start, deleteCount], __read(items5), false));
102017
102035
  return new Path2(segments_);
102018
102036
  };
102019
102037
  this.forEach = function(callback) {
@@ -107095,9 +107113,9 @@ var init_BaseField = __esmMin(() => {
107095
107113
  return Path.parse(pattern).matchAliasGroup(_this.address, _this.path);
107096
107114
  };
107097
107115
  this.inject = function(actions) {
107098
- each(actions, function(action2, key) {
107099
- if (isFn(action2)) {
107100
- _this.actions[key] = action2;
107116
+ each(actions, function(action3, key) {
107117
+ if (isFn(action3)) {
107118
+ _this.actions[key] = action3;
107101
107119
  }
107102
107120
  });
107103
107121
  };
@@ -108109,16 +108127,16 @@ var init_ArrayField = __esmMin(() => {
108109
108127
  var _this = _super.call(this, address, props, form, designable) || this;
108110
108128
  _this.displayName = "ArrayField";
108111
108129
  _this.push = function() {
108112
- var items = [];
108130
+ var items5 = [];
108113
108131
  for (var _i = 0; _i < arguments.length; _i++) {
108114
- items[_i] = arguments[_i];
108132
+ items5[_i] = arguments[_i];
108115
108133
  }
108116
108134
  return action(function() {
108117
108135
  var _a2;
108118
108136
  if (!isArr(_this.value)) {
108119
108137
  _this.value = [];
108120
108138
  }
108121
- (_a2 = _this.value).push.apply(_a2, __spreadArray6([], __read6(items), false));
108139
+ (_a2 = _this.value).push.apply(_a2, __spreadArray6([], __read6(items5), false));
108122
108140
  return _this.onInput(_this.value);
108123
108141
  });
108124
108142
  };
@@ -108136,9 +108154,9 @@ var init_ArrayField = __esmMin(() => {
108136
108154
  });
108137
108155
  };
108138
108156
  _this.insert = function(index) {
108139
- var items = [];
108157
+ var items5 = [];
108140
108158
  for (var _i = 1; _i < arguments.length; _i++) {
108141
- items[_i - 1] = arguments[_i];
108159
+ items5[_i - 1] = arguments[_i];
108142
108160
  }
108143
108161
  return action(function() {
108144
108162
  var _a2;
@@ -108147,9 +108165,9 @@ var init_ArrayField = __esmMin(() => {
108147
108165
  }
108148
108166
  spliceArrayState(_this, {
108149
108167
  startIndex: index,
108150
- insertCount: items.length
108168
+ insertCount: items5.length
108151
108169
  });
108152
- (_a2 = _this.value).splice.apply(_a2, __spreadArray6([index, 0], __read6(items), false));
108170
+ (_a2 = _this.value).splice.apply(_a2, __spreadArray6([index, 0], __read6(items5), false));
108153
108171
  return _this.onInput(_this.value);
108154
108172
  });
108155
108173
  };
@@ -108174,9 +108192,9 @@ var init_ArrayField = __esmMin(() => {
108174
108192
  });
108175
108193
  };
108176
108194
  _this.unshift = function() {
108177
- var items = [];
108195
+ var items5 = [];
108178
108196
  for (var _i = 0; _i < arguments.length; _i++) {
108179
- items[_i] = arguments[_i];
108197
+ items5[_i] = arguments[_i];
108180
108198
  }
108181
108199
  return action(function() {
108182
108200
  var _a2;
@@ -108185,9 +108203,9 @@ var init_ArrayField = __esmMin(() => {
108185
108203
  }
108186
108204
  spliceArrayState(_this, {
108187
108205
  startIndex: 0,
108188
- insertCount: items.length
108206
+ insertCount: items5.length
108189
108207
  });
108190
- (_a2 = _this.value).unshift.apply(_a2, __spreadArray6([], __read6(items), false));
108208
+ (_a2 = _this.value).unshift.apply(_a2, __spreadArray6([], __read6(items5), false));
108191
108209
  return _this.onInput(_this.value);
108192
108210
  });
108193
108211
  };
@@ -109226,7 +109244,7 @@ var init_transformer = __esmMin(() => {
109226
109244
  if (isFn(reaction2)) {
109227
109245
  return reaction2(field, baseScope);
109228
109246
  }
109229
- var when = reaction2.when, fulfill = reaction2.fulfill, otherwise = reaction2.otherwise, target = reaction2.target, effects = reaction2.effects;
109247
+ var when8 = reaction2.when, fulfill = reaction2.fulfill, otherwise = reaction2.otherwise, target = reaction2.target, effects = reaction2.effects;
109230
109248
  var run = function() {
109231
109249
  var $deps = getDependencies(field, reaction2.dependencies);
109232
109250
  var $dependencies = $deps;
@@ -109235,8 +109253,8 @@ var init_transformer = __esmMin(() => {
109235
109253
  $deps,
109236
109254
  $dependencies
109237
109255
  });
109238
- var compiledWhen = shallowCompile(when, scope);
109239
- var condition = when ? compiledWhen : true;
109256
+ var compiledWhen = shallowCompile(when8, scope);
109257
+ var condition = when8 ? compiledWhen : true;
109240
109258
  var request = condition ? fulfill : otherwise;
109241
109259
  var runner2 = condition ? fulfill === null || fulfill === void 0 ? void 0 : fulfill.run : otherwise === null || otherwise === void 0 ? void 0 : otherwise.run;
109242
109260
  setSchemaFieldState({
@@ -109556,10 +109574,10 @@ var init_schema = __esmMin(() => {
109556
109574
  }
109557
109575
  return _this.items;
109558
109576
  };
109559
- this.setAdditionalItems = function(items) {
109560
- if (!items)
109577
+ this.setAdditionalItems = function(items5) {
109578
+ if (!items5)
109561
109579
  return;
109562
- _this.additionalItems = new Schema2(items, _this);
109580
+ _this.additionalItems = new Schema2(items5, _this);
109563
109581
  return _this.additionalItems;
109564
109582
  };
109565
109583
  this.findDefinitions = function(ref2) {
@@ -110233,13 +110251,13 @@ var require_base4 = __commonJSMin((exports, module2) => {
110233
110251
  }
110234
110252
  handleSubmitEvents(submit) {
110235
110253
  const self3 = this;
110236
- const validate2 = runAsync(this.opt.validate);
110254
+ const validate5 = runAsync(this.opt.validate);
110237
110255
  const asyncFilter = runAsync(this.opt.filter);
110238
110256
  const validation = submit.pipe(flatMap((value) => {
110239
110257
  this.startSpinner(value, this.opt.filteringText);
110240
110258
  return asyncFilter(value, self3.answers).then((filteredValue) => {
110241
110259
  this.startSpinner(filteredValue, this.opt.validatingText);
110242
- return validate2(filteredValue, self3.answers).then((isValid5) => ({ isValid: isValid5, value: filteredValue }), (err) => ({ isValid: err, value: filteredValue }));
110260
+ return validate5(filteredValue, self3.answers).then((isValid5) => ({ isValid: isValid5, value: filteredValue }), (err) => ({ isValid: err, value: filteredValue }));
110243
110261
  }, (err) => ({ isValid: err }));
110244
110262
  }), share());
110245
110263
  const success = validation.pipe(filter3((state) => state.isValid === true), take(1));
@@ -111293,7 +111311,7 @@ function getQuestionFromSchema(schema) {
111293
111311
  return [];
111294
111312
  }
111295
111313
  var questions = fields.map(function(field) {
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);
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);
111297
111315
  if (type === "void" || type === "object") {
111298
111316
  return getQuestionFromSchema(properties[field], configValue, validateMap, initValue);
111299
111317
  }
@@ -111351,16 +111369,16 @@ function getQuestionFromSchema(schema) {
111351
111369
  message: title || field,
111352
111370
  "default": initValue[field] || defaultValue,
111353
111371
  origin: extra,
111354
- validate: function validate2(input) {
111372
+ validate: function validate5(input) {
111355
111373
  return questionValidate(field, input);
111356
111374
  },
111357
111375
  when: !configValue[field]
111358
111376
  };
111359
- if (items) {
111377
+ if (items5) {
111360
111378
  if ((0, import_lodash.isArray)(defaultValue)) {
111361
111379
  return _objectSpread2(_objectSpread2({}, result), {}, {
111362
111380
  type: "checkbox",
111363
- choices: items.map(function(item) {
111381
+ choices: items5.map(function(item) {
111364
111382
  return {
111365
111383
  type: "choice",
111366
111384
  name: (0, import_lodash.isObject)(item) ? item.label : item,
@@ -111371,7 +111389,7 @@ function getQuestionFromSchema(schema) {
111371
111389
  }
111372
111390
  return _objectSpread2(_objectSpread2({}, result), {}, {
111373
111391
  type: "list",
111374
- choices: items.map(function(item) {
111392
+ choices: items5.map(function(item) {
111375
111393
  return {
111376
111394
  type: "choice",
111377
111395
  name: (0, import_lodash.isObject)(item) ? item.label : item,
@@ -111500,7 +111518,7 @@ var init_prompt = __esmMin(() => {
111500
111518
  return state;
111501
111519
  };
111502
111520
  handleXReactions = /* @__PURE__ */ function() {
111503
- var _ref = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(xReactions, answers, items, item) {
111521
+ var _ref = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(xReactions, answers, items5, item) {
111504
111522
  var answer, _iterator, _step, _loop;
111505
111523
  return _regeneratorRuntime().wrap(function _callee$(_context2) {
111506
111524
  while (1) {
@@ -111537,12 +111555,12 @@ var init_prompt = __esmMin(() => {
111537
111555
  value: answer[item.name]
111538
111556
  }),
111539
111557
  $values: answers,
111540
- $target: items.find(function(it2) {
111558
+ $target: items5.find(function(it2) {
111541
111559
  return it2.name === (xReaction === null || xReaction === void 0 ? void 0 : xReaction.target);
111542
111560
  })
111543
111561
  };
111544
111562
  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);
111545
- _iterator2 = _createForOfIteratorHelper(items);
111563
+ _iterator2 = _createForOfIteratorHelper(items5);
111546
111564
  _context.prev = 12;
111547
111565
  _iterator2.s();
111548
111566
  case 14:
@@ -111592,7 +111610,7 @@ var init_prompt = __esmMin(() => {
111592
111610
  break;
111593
111611
  }
111594
111612
  dependencies3 = xReaction === null || xReaction === void 0 ? void 0 : xReaction.dependencies;
111595
- $dependencies = items.filter(function(it2) {
111613
+ $dependencies = items5.filter(function(it2) {
111596
111614
  return dependencies3.includes(it2.name);
111597
111615
  }).map(function(it2) {
111598
111616
  return answers[it2.name];
@@ -112718,6 +112736,7 @@ var init_zh = __esmMin(() => {
112718
112736
  sass: "\u542F\u7528 Sass \u652F\u6301",
112719
112737
  bff: "\u542F\u7528\u300CBFF\u300D\u529F\u80FD",
112720
112738
  micro_frontend: "\u542F\u7528\u300C\u5FAE\u524D\u7AEF\u300D\u6A21\u5F0F",
112739
+ electron: "\u542F\u7528\u300CElectron\u300D\u6A21\u5F0F",
112721
112740
  i18n: "\u542F\u7528\u300C\u56FD\u9645\u5316\uFF08i18n\uFF09\u300D\u529F\u80FD",
112722
112741
  test: "\u542F\u7528\u300C\u5355\u5143\u6D4B\u8BD5 / \u96C6\u6210\u6D4B\u8BD5\u300D\u529F\u80FD",
112723
112742
  e2e_test: "\u542F\u7528\u300CE2E \u6D4B\u8BD5\u300D\u529F\u80FD",
@@ -112736,7 +112755,7 @@ var init_zh = __esmMin(() => {
112736
112755
  },
112737
112756
  refactor: {
112738
112757
  self: "\u81EA\u52A8\u91CD\u6784",
112739
- react_router_5: "\u4F7F\u7528 React Router v5"
112758
+ bff_to_app: "BFF \u5207\u6362\u6846\u67B6\u6A21\u5F0F"
112740
112759
  }
112741
112760
  },
112742
112761
  "boolean": {
@@ -112749,6 +112768,11 @@ var init_zh = __esmMin(() => {
112749
112768
  packageManager: {
112750
112769
  self: "\u8BF7\u9009\u62E9\u5305\u7BA1\u7406\u5DE5\u5177"
112751
112770
  },
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
+ },
112752
112776
  entry: {
112753
112777
  name: "\u8BF7\u586B\u5199\u5165\u53E3\u540D\u79F0",
112754
112778
  no_empty: "\u5165\u53E3\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\uFF01",
@@ -112817,6 +112841,7 @@ var init_en = __esmMin(() => {
112817
112841
  sass: "Enable Sass",
112818
112842
  bff: "Enable BFF",
112819
112843
  micro_frontend: "Enable Micro Frontend",
112844
+ electron: "Enable Electron",
112820
112845
  i18n: "Enable Internationalization (i18n)",
112821
112846
  test: "Enable Unit Test / Integration Test",
112822
112847
  e2e_test: "Enable E2E Test",
@@ -112835,7 +112860,7 @@ var init_en = __esmMin(() => {
112835
112860
  },
112836
112861
  refactor: {
112837
112862
  self: "Automatic refactor",
112838
- react_router_5: "Use React Router v5"
112863
+ bff_to_app: "Transform BFF to frame mode"
112839
112864
  }
112840
112865
  },
112841
112866
  "boolean": {
@@ -112858,6 +112883,11 @@ var init_en = __esmMin(() => {
112858
112883
  no_empty: "The package path cannot be empty!",
112859
112884
  format: "Only lowercase letters, numbers and delimiters (-), and underscore (_), and directory delimiters (/) can be used in package path."
112860
112885
  },
112886
+ runWay: {
112887
+ self: "Do you need to support the following types of applications",
112888
+ no: "Not Enabled",
112889
+ electron: "Electron"
112890
+ },
112861
112891
  entry: {
112862
112892
  name: "Entry name",
112863
112893
  no_empty: "The entry name cannot be empty!",
@@ -112896,7 +112926,7 @@ var init_locale2 = __esmMin(() => {
112896
112926
  en: EN_LOCALE
112897
112927
  });
112898
112928
  });
112899
- var _BooleanConfigName, BooleanConfig, BooleanConfigName, getBooleanSchemas;
112929
+ var _BooleanConfigName, BooleanConfig, BooleanConfigName, BooleanSchemas;
112900
112930
  var init_boolean = __esmMin(() => {
112901
112931
  init_defineProperty();
112902
112932
  init_locale2();
@@ -112909,15 +112939,13 @@ var init_boolean = __esmMin(() => {
112909
112939
  }), _defineProperty(_BooleanConfigName, BooleanConfig.YES, function() {
112910
112940
  return i18n.t(localeKeys["boolean"].yes);
112911
112941
  }), _BooleanConfigName);
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
- };
112942
+ BooleanSchemas = [{
112943
+ key: BooleanConfig.NO,
112944
+ label: BooleanConfigName[BooleanConfig.NO]
112945
+ }, {
112946
+ key: BooleanConfig.YES,
112947
+ label: BooleanConfigName[BooleanConfig.YES]
112948
+ }];
112921
112949
  });
112922
112950
  function getSolutionNameFromSubSolution(solution) {
112923
112951
  if (solution === SubSolution.MWATest) {
@@ -112928,7 +112956,7 @@ function getSolutionNameFromSubSolution(solution) {
112928
112956
  }
112929
112957
  return solution;
112930
112958
  }
112931
- var _SolutionText, _SubSolutionText, _SolutionToolsMap, _SolutionGenerator, _SubSolutionGenerator, Solution, SubSolution, SolutionText, SubSolutionText, SolutionToolsMap, getSolutionSchema, getScenesSchema, BaseGenerator, SolutionGenerator, SubSolutionGenerator, ChangesetGenerator, DependenceGenerator, EntryGenerator, EslintGenerator;
112959
+ var _SolutionText, _SubSolutionText, _SolutionToolsMap, _SolutionGenerator, _SubSolutionGenerator, Solution, SubSolution, SolutionText, SubSolutionText, SolutionToolsMap, SolutionSchema, SubSolutionSchema, BaseGenerator, SolutionGenerator, SubSolutionGenerator, ChangesetGenerator, DependenceGenerator, EntryGenerator, ElectronGenerator, EslintGenerator;
112932
112960
  var init_solution = __esmMin(() => {
112933
112961
  init_toConsumableArray();
112934
112962
  init_defineProperty();
@@ -112961,64 +112989,114 @@ var init_solution = __esmMin(() => {
112961
112989
  return i18n.t(localeKeys.sub_solution.inner_module);
112962
112990
  }), _SubSolutionText);
112963
112991
  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);
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
- }()
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
+ }]);
112990
113017
  }
113018
+ return items5;
112991
113019
  }
112992
- };
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
+ });
113042
+ }
113043
+ return items5;
113044
+ }
113045
+ }]
112993
113046
  };
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
- }()
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
+ }]);
113019
113070
  }
113020
- } : {}
113021
- };
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
+ });
113096
+ }
113097
+ return items5;
113098
+ }
113099
+ }]
113022
113100
  };
113023
113101
  BaseGenerator = "@modern-js/base-generator";
113024
113102
  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);
@@ -113026,9 +113104,10 @@ var init_solution = __esmMin(() => {
113026
113104
  ChangesetGenerator = "@modern-js/changeset-generator";
113027
113105
  DependenceGenerator = "@modern-js/dependence-generator";
113028
113106
  EntryGenerator = "@modern-js/entry-generator";
113107
+ ElectronGenerator = "@modern-js/electron-generator";
113029
113108
  EslintGenerator = "@modern-js/eslint-generator";
113030
113109
  });
113031
- var _LanguageName, Language, LanguageName, getLanguageSchema;
113110
+ var _LanguageName, Language, LanguageName, LanguageSchema;
113032
113111
  var init_language = __esmMin(() => {
113033
113112
  init_defineProperty();
113034
113113
  init_locale2();
@@ -113036,22 +113115,27 @@ var init_language = __esmMin(() => {
113036
113115
  Language2["TS"] = "ts";
113037
113116
  Language2["JS"] = "js";
113038
113117
  })(Language || (Language = {}));
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
- };
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
+ })
113052
113136
  };
113053
113137
  });
113054
- var _PackageManagerName, PackageManager, PackageManagerName, getPackageManagerSchema;
113138
+ var _PackageManagerName, PackageManager, PackageManagerName, PackageManagerSchema;
113055
113139
  var init_package_manager = __esmMin(() => {
113056
113140
  init_defineProperty();
113057
113141
  init_locale2();
@@ -113060,83 +113144,94 @@ var init_package_manager = __esmMin(() => {
113060
113144
  PackageManager2["Yarn"] = "yarn";
113061
113145
  PackageManager2["Npm"] = "npm";
113062
113146
  })(PackageManager || (PackageManager = {}));
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
- };
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
+ })
113086
113170
  };
113087
113171
  });
113088
- var getPackageNameSchema;
113172
+ var PackageNameSchema;
113089
113173
  var init_package_name = __esmMin(() => {
113090
113174
  init_locale2();
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 "";
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
+ };
113109
113190
  }
113110
- };
113191
+ return {
113192
+ success: true
113193
+ };
113194
+ }
113111
113195
  };
113112
113196
  });
113113
- var PackagePathRegex, getPackagePathSchema;
113197
+ var PackagePathRegex, PackagePathSchema;
113114
113198
  var init_package_path = __esmMin(() => {
113115
113199
  init_locale2();
113116
113200
  PackagePathRegex = new RegExp("^[a-z0-9]*[-_/]?([a-z0-9]*[-_]?[a-z0-9]*)*[-_/]?[a-z0-9-_]+$");
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);
113133
- }
113134
- if (!PackagePathRegex.test(value)) {
113135
- return i18n.t(localeKeys.packagePath.format);
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 || "");
113136
113215
  }
113137
- return "";
113138
113216
  }
113139
- };
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
+ }
113140
113235
  };
113141
113236
  });
113142
113237
  var init_common = __esmMin(() => {
@@ -113147,17 +113242,14 @@ var init_common = __esmMin(() => {
113147
113242
  init_package_name();
113148
113243
  init_package_path();
113149
113244
  });
113150
- var getBaseSchema, BaseDefaultConfig;
113245
+ var BaseSchemas, BaseSchema, BaseDefaultConfig;
113151
113246
  var init_project = __esmMin(() => {
113152
113247
  init_common();
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
- };
113248
+ BaseSchemas = [PackageManagerSchema];
113249
+ BaseSchema = {
113250
+ key: "base",
113251
+ isObject: true,
113252
+ items: BaseSchemas
113161
113253
  };
113162
113254
  BaseDefaultConfig = {
113163
113255
  packageManager: PackageManager.Pnpm
@@ -113166,23 +113258,14 @@ var init_project = __esmMin(() => {
113166
113258
  var init_base = __esmMin(() => {
113167
113259
  init_project();
113168
113260
  });
113169
- var getModuleSchemaProperties, getModuleSchema, ModuleDefaultConfig;
113261
+ var ModuleSchemas, ModuleSchema, ModuleDefaultConfig;
113170
113262
  var init_project2 = __esmMin(() => {
113171
113263
  init_common();
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
- };
113264
+ ModuleSchemas = [PackageNameSchema, PackagePathSchema, LanguageSchema, PackageManagerSchema];
113265
+ ModuleSchema = {
113266
+ key: "module",
113267
+ isObject: true,
113268
+ items: ModuleSchemas
113186
113269
  };
113187
113270
  ModuleDefaultConfig = {
113188
113271
  language: Language.TS,
@@ -113192,17 +113275,20 @@ var init_project2 = __esmMin(() => {
113192
113275
  var init_module = __esmMin(() => {
113193
113276
  init_project2();
113194
113277
  });
113195
- var getMonorepoSchema, MonorepoDefaultConfig;
113278
+ var MonorepoPackageManagerSchema, MonorepoSchemas, MonorepoSchema, MonorepoDefaultConfig;
113196
113279
  var init_project3 = __esmMin(() => {
113280
+ init_objectSpread2();
113197
113281
  init_common();
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
- };
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
113206
113292
  };
113207
113293
  MonorepoDefaultConfig = {
113208
113294
  packageManager: PackageManager.Pnpm
@@ -113211,45 +113297,75 @@ var init_project3 = __esmMin(() => {
113211
113297
  var init_monorepo = __esmMin(() => {
113212
113298
  init_project3();
113213
113299
  });
113214
- var _FrameworkAppendTypeC, ClientRoute, getClientRouteSchema, getNeedModifyMWAConfigSchema, Framework, getFrameworkSchema, FrameworkAppendTypeContent;
113300
+ var _FrameworkAppendTypeC, mwaConfigWhenFunc, RunWay, RunWaySchema, ClientRoute, ClientRouteSchema, NeedModifyMWAConfigSchema, Framework, FrameworkSchema, FrameworkAppendTypeContent;
113215
113301
  var init_common2 = __esmMin(() => {
113216
113302
  init_defineProperty();
113217
113303
  init_locale2();
113218
113304
  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
+ };
113219
113334
  (function(ClientRoute2) {
113220
113335
  ClientRoute2["SelfControlRoute"] = "selfControlRoute";
113221
113336
  ClientRoute2["ConventionalRoute"] = "conventionalRoute";
113222
113337
  })(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
- }
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]);
113241
113354
  }
113242
- }]
113243
- };
113355
+ };
113356
+ })
113244
113357
  };
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
- };
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
113253
113369
  };
113254
113370
  (function(Framework2) {
113255
113371
  Framework2["Express"] = "express";
@@ -113257,71 +113373,77 @@ var init_common2 = __esmMin(() => {
113257
113373
  Framework2["Egg"] = "egg";
113258
113374
  Framework2["Nest"] = "nest";
113259
113375
  })(Framework || (Framework = {}));
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
- };
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
+ })
113272
113391
  };
113273
113392
  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);
113274
113393
  });
113275
- var getEntryNameSchema, getEntrySchemaProperties, getEntrySchema, MWADefaultEntryConfig;
113394
+ var EntryNameSchema, EntrySchemas, EntrySchema, MWADefaultEntryConfig;
113276
113395
  var init_entry = __esmMin(() => {
113277
113396
  init_locale2();
113278
113397
  init_common();
113279
113398
  init_common2();
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
- };
113304
- };
113305
- getEntrySchemaProperties = function getEntrySchemaProperties2(extra) {
113306
- return {
113307
- name: getEntryNameSchema(extra),
113308
- needModifyMWAConfig: getNeedModifyMWAConfigSchema(extra),
113309
- clientRoute: getClientRouteSchema(extra)
113310
- };
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
+ }
113311
113431
  };
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
- };
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
113318
113440
  };
113319
113441
  MWADefaultEntryConfig = {
113320
113442
  needModifyMWAConfig: BooleanConfig.NO,
113321
113443
  clientRoute: ClientRoute.SelfControlRoute
113322
113444
  };
113323
113445
  });
113324
- var BFFType, getBFFTypeSchema, getBFFchemaProperties, getBFFSchema, MWADefaultBffConfig;
113446
+ var BFFType, BFFTypeSchema, BFFSchemas, BFFSchema, MWADefaultBffConfig;
113325
113447
  var init_bff = __esmMin(() => {
113326
113448
  init_locale2();
113327
113449
  init_common2();
@@ -113329,76 +113451,66 @@ var init_bff = __esmMin(() => {
113329
113451
  BFFType2["Func"] = "func";
113330
113452
  BFFType2["Framework"] = "framework";
113331
113453
  })(BFFType || (BFFType = {}));
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
- };
113344
- };
113345
- getBFFchemaProperties = function getBFFchemaProperties2(extra) {
113346
- return {
113347
- bffType: getBFFTypeSchema(extra),
113348
- framework: getFrameworkSchema(extra)
113349
- };
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
+ })
113350
113469
  };
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
- };
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
113357
113478
  };
113358
113479
  MWADefaultBffConfig = {
113359
113480
  bffType: BFFType.Func,
113360
113481
  frameWork: Framework.Express
113361
113482
  };
113362
113483
  });
113363
- var getMWASchemaProperties, getMWASchema, MWADefaultConfig;
113484
+ var MWASchemas, MWASchema, MWADefaultConfig;
113364
113485
  var init_project4 = __esmMin(() => {
113365
113486
  init_common();
113366
113487
  init_common2();
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
- };
113488
+ MWASchemas = [PackageNameSchema, PackagePathSchema, LanguageSchema, PackageManagerSchema, RunWaySchema, NeedModifyMWAConfigSchema, ClientRouteSchema];
113489
+ MWASchema = {
113490
+ key: "mwa",
113491
+ isObject: true,
113492
+ items: MWASchemas
113383
113493
  };
113384
113494
  MWADefaultConfig = {
113385
113495
  language: Language.TS,
113386
113496
  packageManager: PackageManager.Pnpm,
113497
+ runWay: RunWay.No,
113387
113498
  needModifyMWAConfig: BooleanConfig.NO,
113388
113499
  clientRoute: ClientRoute.SelfControlRoute
113389
113500
  };
113390
113501
  });
113391
- var getServerSchema, MWADefaultServerConfig;
113502
+ var ServerSchemas, ServerSchema, MWADefaultServerConfig;
113392
113503
  var init_server = __esmMin(() => {
113504
+ init_locale2();
113393
113505
  init_common2();
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
- };
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
113402
113514
  };
113403
113515
  MWADefaultServerConfig = {
113404
113516
  framework: Framework.Express
@@ -113430,6 +113542,7 @@ var init_common3 = __esmMin(() => {
113430
113542
  ActionFunction2["Sass"] = "sass";
113431
113543
  ActionFunction2["BFF"] = "bff";
113432
113544
  ActionFunction2["MicroFrontend"] = "micro_frontend";
113545
+ ActionFunction2["Electron"] = "electron";
113433
113546
  ActionFunction2["I18n"] = "i18n";
113434
113547
  ActionFunction2["Test"] = "test";
113435
113548
  ActionFunction2["E2ETest"] = "e2e_test";
@@ -113441,7 +113554,7 @@ var init_common3 = __esmMin(() => {
113441
113554
  ActionFunction2["Proxy"] = "proxy";
113442
113555
  })(ActionFunction || (ActionFunction = {}));
113443
113556
  (function(ActionRefactor2) {
113444
- ActionRefactor2["ReactRouter5"] = "react_router_5";
113557
+ ActionRefactor2["BFFToApp"] = "bff_to_app";
113445
113558
  })(ActionRefactor || (ActionRefactor = {}));
113446
113559
  ActionTypeText = (_ActionTypeText = {}, _defineProperty(_ActionTypeText, ActionType.Function, function() {
113447
113560
  return i18n.t(localeKeys.action["function"].self);
@@ -113465,6 +113578,8 @@ var init_common3 = __esmMin(() => {
113465
113578
  return i18n.t(localeKeys.action["function"].bff);
113466
113579
  }), _defineProperty(_ActionFunctionText, ActionFunction.MicroFrontend, function() {
113467
113580
  return i18n.t(localeKeys.action["function"].micro_frontend);
113581
+ }), _defineProperty(_ActionFunctionText, ActionFunction.Electron, function() {
113582
+ return i18n.t(localeKeys.action["function"].electron);
113468
113583
  }), _defineProperty(_ActionFunctionText, ActionFunction.I18n, function() {
113469
113584
  return i18n.t(localeKeys.action["function"].i18n);
113470
113585
  }), _defineProperty(_ActionFunctionText, ActionFunction.Test, function() {
@@ -113484,17 +113599,20 @@ var init_common3 = __esmMin(() => {
113484
113599
  }), _defineProperty(_ActionFunctionText, ActionFunction.Proxy, function() {
113485
113600
  return i18n.t(localeKeys.action["function"].proxy);
113486
113601
  }), _ActionFunctionText);
113487
- ActionRefactorText = _defineProperty({}, ActionRefactor.ReactRouter5, function() {
113488
- return i18n.t(localeKeys.action.refactor.react_router_5);
113602
+ ActionRefactorText = _defineProperty({}, ActionRefactor.BFFToApp, function() {
113603
+ return i18n.t(localeKeys.action.refactor.bff_to_app);
113489
113604
  });
113490
113605
  ActionTypeTextMap = (_ActionTypeTextMap = {}, _defineProperty(_ActionTypeTextMap, ActionType.Element, ActionElementText), _defineProperty(_ActionTypeTextMap, ActionType.Function, ActionFunctionText), _defineProperty(_ActionTypeTextMap, ActionType.Refactor, ActionRefactorText), _ActionTypeTextMap);
113491
113606
  });
113492
- var _MWAActionTypesMap, _MWAActionFunctionsDe, _MWAActionFunctionsDe2, _MWAActionFunctionsAp, _ActionType$Element, _ActionType$Function, _MWANewActionGenerato, MWAActionTypes, MWAActionFunctions, MWAActionElements, MWAActionReactors, MWAActionTypesMap, getMWANewActionSchema, MWAActionFunctionsDevDependencies, MWAActionFunctionsDependencies, MWAActionFunctionsAppendTypeContent, MWAActionRefactorDependencies, MWAActionReactorAppendTypeContent, MWANewActionGenerators;
113607
+ var _MWAActionTypesMap, _MWAActionFunctionsDe, _MWAActionFunctionsDe2, _MWAActionFunctionsAp, _ActionType$Element, _ActionType$Function, _MWANewActionGenerato, MWAActionTypes, MWAActionFunctions, MWAActionElements, MWAActionReactors, MWAActionTypesMap, MWASpecialSchemaMap, MWANewActionSchema, MWAActionFunctionsDevDependencies, MWAActionFunctionsDependencies, MWAActionFunctionsAppendTypeContent, MWANewActionGenerators;
113493
113608
  var init_mwa2 = __esmMin(() => {
113494
113609
  init_defineProperty();
113495
113610
  init_common3();
113496
113611
  init_locale2();
113497
- MWAActionTypes = [ActionType.Element, ActionType.Function, ActionType.Refactor];
113612
+ MWAActionTypes = [
113613
+ ActionType.Element,
113614
+ ActionType.Function
113615
+ ];
113498
113616
  MWAActionFunctions = [
113499
113617
  ActionFunction.TailwindCSS,
113500
113618
  ActionFunction.Less,
@@ -113502,104 +113620,53 @@ var init_mwa2 = __esmMin(() => {
113502
113620
  ActionFunction.BFF,
113503
113621
  ActionFunction.SSG,
113504
113622
  ActionFunction.MicroFrontend,
113623
+ ActionFunction.Electron,
113505
113624
  ActionFunction.Test,
113506
113625
  ActionFunction.Storybook,
113507
113626
  ActionFunction.Polyfill,
113508
113627
  ActionFunction.Proxy
113509
113628
  ];
113510
113629
  MWAActionElements = [ActionElement.Entry, ActionElement.Server];
113511
- MWAActionReactors = [ActionRefactor.ReactRouter5];
113630
+ MWAActionReactors = [ActionRefactor.BFFToApp];
113512
113631
  MWAActionTypesMap = (_MWAActionTypesMap = {}, _defineProperty(_MWAActionTypesMap, ActionType.Element, MWAActionElements), _defineProperty(_MWAActionTypesMap, ActionType.Function, MWAActionFunctions), _defineProperty(_MWAActionTypesMap, ActionType.Refactor, MWAActionReactors), _MWAActionTypesMap);
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"]
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]
113538
113658
  };
113539
113659
  })
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
- };
113660
+ };
113661
+ })
113662
+ }]
113594
113663
  };
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);
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);
113596
113665
  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);
113597
113666
  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);
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);
113601
113668
  });
113602
- var _ModuleActionFunction, _ModuleActionFunction2, _ModuleActionFunction3, _ActionType$Function2, ModuleActionTypes, ModuleActionFunctions, ModuleActionTypesMap, ModuleSpecialSchemaMap, getModuleNewActionSchema, ModuleActionFunctionsDevDependencies, ModuleActionFunctionsPeerDependencies, ModuleActionFunctionsDependencies, ModuleNewActionGenerators;
113669
+ var _ModuleActionFunction, _ModuleActionFunction2, _ModuleActionFunction3, _ActionType$Function2, ModuleActionTypes, ModuleActionFunctions, ModuleActionTypesMap, ModuleSpecialSchemaMap, ModuleNewActionSchema, ModuleActionFunctionsDevDependencies, ModuleActionFunctionsPeerDependencies, ModuleActionFunctionsDependencies, ModuleNewActionGenerators;
113603
113670
  var init_module2 = __esmMin(() => {
113604
113671
  init_defineProperty();
113605
113672
  init_common3();
@@ -113614,62 +113681,45 @@ var init_module2 = __esmMin(() => {
113614
113681
  ];
113615
113682
  ModuleActionTypesMap = _defineProperty({}, ActionType.Function, ModuleActionFunctions);
113616
113683
  ModuleSpecialSchemaMap = {};
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"]
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]
113631
113704
  };
113632
113705
  })
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
- }]
113706
+ };
113653
113707
  })
113654
- };
113708
+ }]
113655
113709
  };
113656
113710
  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);
113657
113711
  ModuleActionFunctionsPeerDependencies = (_ModuleActionFunction2 = {}, _defineProperty(_ModuleActionFunction2, ActionFunction.RuntimeApi, "@modern-js/runtime"), _defineProperty(_ModuleActionFunction2, ActionFunction.TailwindCSS, "tailwindcss"), _ModuleActionFunction2);
113658
113712
  ModuleActionFunctionsDependencies = (_ModuleActionFunction3 = {}, _defineProperty(_ModuleActionFunction3, ActionFunction.I18n, "@modern-js/plugin-i18n"), _defineProperty(_ModuleActionFunction3, ActionFunction.TailwindCSS, "@modern-js/plugin-tailwindcss"), _ModuleActionFunction3);
113659
113713
  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));
113660
113714
  });
113661
- var _MonorepoNewActionCon, getMonorepoNewActionSchema, MonorepoNewActionConfig;
113715
+ var _MonorepoNewActionCon, MonorepoNewActionSchema, MonorepoNewActionConfig;
113662
113716
  var init_monorepo2 = __esmMin(() => {
113663
113717
  init_defineProperty();
113664
113718
  init_common();
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
- };
113719
+ MonorepoNewActionSchema = {
113720
+ key: "monorepo_new_action",
113721
+ isObject: true,
113722
+ items: [SubSolutionSchema]
113673
113723
  };
113674
113724
  MonorepoNewActionConfig = (_MonorepoNewActionCon = {}, _defineProperty(_MonorepoNewActionCon, SubSolution.MWA, {
113675
113725
  isMonorepoSubProject: true,
@@ -113691,24 +113741,14 @@ var init_newAction = __esmMin(() => {
113691
113741
  init_module2();
113692
113742
  init_monorepo2();
113693
113743
  });
113694
- var getGeneratorSchemaProperties, getGeneratorSchema, GeneratorDefaultConfig;
113744
+ var GeneratorSchemas, GeneratorSchema, GeneratorDefaultConfig;
113695
113745
  var init_generator = __esmMin(() => {
113696
113746
  init_common();
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
- };
113747
+ GeneratorSchemas = [PackageNameSchema, PackagePathSchema, PackageManagerSchema, LanguageSchema];
113748
+ GeneratorSchema = {
113749
+ key: "generator-generator",
113750
+ isObject: true,
113751
+ items: Object.values(GeneratorSchemas)
113712
113752
  };
113713
113753
  GeneratorDefaultConfig = {
113714
113754
  packageManager: PackageManager.Pnpm,
@@ -113729,28 +113769,40 @@ __export2(treeshaking_exports5, {
113729
113769
  ActionType: () => ActionType,
113730
113770
  ActionTypeText: () => ActionTypeText,
113731
113771
  ActionTypeTextMap: () => ActionTypeTextMap,
113772
+ BFFSchema: () => BFFSchema,
113773
+ BFFSchemas: () => BFFSchemas,
113732
113774
  BFFType: () => BFFType,
113775
+ BFFTypeSchema: () => BFFTypeSchema,
113733
113776
  BaseDefaultConfig: () => BaseDefaultConfig,
113734
113777
  BaseGenerator: () => BaseGenerator,
113778
+ BaseSchema: () => BaseSchema,
113779
+ BaseSchemas: () => BaseSchemas,
113735
113780
  BooleanConfig: () => BooleanConfig,
113736
113781
  BooleanConfigName: () => BooleanConfigName,
113782
+ BooleanSchemas: () => BooleanSchemas,
113737
113783
  ChangesetGenerator: () => ChangesetGenerator,
113738
113784
  ClientRoute: () => ClientRoute,
113785
+ ClientRouteSchema: () => ClientRouteSchema,
113739
113786
  DependenceGenerator: () => DependenceGenerator,
113787
+ ElectronGenerator: () => ElectronGenerator,
113740
113788
  EntryGenerator: () => EntryGenerator,
113789
+ EntrySchema: () => EntrySchema,
113790
+ EntrySchemas: () => EntrySchemas,
113741
113791
  EslintGenerator: () => EslintGenerator,
113742
113792
  Framework: () => Framework,
113743
113793
  FrameworkAppendTypeContent: () => FrameworkAppendTypeContent,
113794
+ FrameworkSchema: () => FrameworkSchema,
113744
113795
  GeneratorDefaultConfig: () => GeneratorDefaultConfig,
113796
+ GeneratorSchema: () => GeneratorSchema,
113745
113797
  Language: () => Language,
113798
+ LanguageName: () => LanguageName,
113799
+ LanguageSchema: () => LanguageSchema,
113746
113800
  MWAActionElements: () => MWAActionElements,
113747
113801
  MWAActionFunctions: () => MWAActionFunctions,
113748
113802
  MWAActionFunctionsAppendTypeContent: () => MWAActionFunctionsAppendTypeContent,
113749
113803
  MWAActionFunctionsDependencies: () => MWAActionFunctionsDependencies,
113750
113804
  MWAActionFunctionsDevDependencies: () => MWAActionFunctionsDevDependencies,
113751
- MWAActionReactorAppendTypeContent: () => MWAActionReactorAppendTypeContent,
113752
113805
  MWAActionReactors: () => MWAActionReactors,
113753
- MWAActionRefactorDependencies: () => MWAActionRefactorDependencies,
113754
113806
  MWAActionTypes: () => MWAActionTypes,
113755
113807
  MWAActionTypesMap: () => MWAActionTypesMap,
113756
113808
  MWADefaultBffConfig: () => MWADefaultBffConfig,
@@ -113758,6 +113810,10 @@ __export2(treeshaking_exports5, {
113758
113810
  MWADefaultEntryConfig: () => MWADefaultEntryConfig,
113759
113811
  MWADefaultServerConfig: () => MWADefaultServerConfig,
113760
113812
  MWANewActionGenerators: () => MWANewActionGenerators,
113813
+ MWANewActionSchema: () => MWANewActionSchema,
113814
+ MWASchema: () => MWASchema,
113815
+ MWASchemas: () => MWASchemas,
113816
+ MWASpecialSchemaMap: () => MWASpecialSchemaMap,
113761
113817
  ModuleActionFunctions: () => ModuleActionFunctions,
113762
113818
  ModuleActionFunctionsDependencies: () => ModuleActionFunctionsDependencies,
113763
113819
  ModuleActionFunctionsDevDependencies: () => ModuleActionFunctionsDevDependencies,
@@ -113766,51 +113822,40 @@ __export2(treeshaking_exports5, {
113766
113822
  ModuleActionTypesMap: () => ModuleActionTypesMap,
113767
113823
  ModuleDefaultConfig: () => ModuleDefaultConfig,
113768
113824
  ModuleNewActionGenerators: () => ModuleNewActionGenerators,
113825
+ ModuleNewActionSchema: () => ModuleNewActionSchema,
113826
+ ModuleSchema: () => ModuleSchema,
113827
+ ModuleSchemas: () => ModuleSchemas,
113769
113828
  ModuleSpecialSchemaMap: () => ModuleSpecialSchemaMap,
113770
113829
  MonorepoDefaultConfig: () => MonorepoDefaultConfig,
113771
113830
  MonorepoNewActionConfig: () => MonorepoNewActionConfig,
113831
+ MonorepoNewActionSchema: () => MonorepoNewActionSchema,
113832
+ MonorepoSchema: () => MonorepoSchema,
113833
+ MonorepoSchemas: () => MonorepoSchemas,
113834
+ NeedModifyMWAConfigSchema: () => NeedModifyMWAConfigSchema,
113772
113835
  PackageManager: () => PackageManager,
113773
113836
  PackageManagerName: () => PackageManagerName,
113837
+ PackageManagerSchema: () => PackageManagerSchema,
113838
+ PackageNameSchema: () => PackageNameSchema,
113839
+ PackagePathSchema: () => PackagePathSchema,
113840
+ RunWay: () => RunWay,
113841
+ RunWaySchema: () => RunWaySchema,
113842
+ ServerSchema: () => ServerSchema,
113843
+ ServerSchemas: () => ServerSchemas,
113774
113844
  Solution: () => Solution,
113775
113845
  SolutionDefaultConfig: () => SolutionDefaultConfig,
113776
113846
  SolutionGenerator: () => SolutionGenerator,
113847
+ SolutionSchema: () => SolutionSchema,
113777
113848
  SolutionSchemas: () => SolutionSchemas,
113778
113849
  SolutionText: () => SolutionText,
113779
113850
  SolutionToolsMap: () => SolutionToolsMap,
113780
113851
  SubSolution: () => SubSolution,
113781
113852
  SubSolutionGenerator: () => SubSolutionGenerator,
113853
+ SubSolutionSchema: () => SubSolutionSchema,
113782
113854
  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,
113810
113855
  getSolutionNameFromSubSolution: () => getSolutionNameFromSubSolution,
113811
- getSolutionSchema: () => getSolutionSchema,
113812
113856
  i18n: () => i18n,
113813
- localeKeys: () => localeKeys
113857
+ localeKeys: () => localeKeys,
113858
+ mwaConfigWhenFunc: () => mwaConfigWhenFunc
113814
113859
  });
113815
113860
  var _SolutionDefaultConfi, _SolutionSchemas, SolutionDefaultConfig, SolutionSchemas;
113816
113861
  var init_treeshaking5 = __esmMin(() => {
@@ -113829,7 +113874,7 @@ var init_treeshaking5 = __esmMin(() => {
113829
113874
  init_expand();
113830
113875
  init_base();
113831
113876
  SolutionDefaultConfig = (_SolutionDefaultConfi = {}, _defineProperty(_SolutionDefaultConfi, Solution.MWA, MWADefaultConfig), _defineProperty(_SolutionDefaultConfi, Solution.Module, ModuleDefaultConfig), _defineProperty(_SolutionDefaultConfi, Solution.Monorepo, MonorepoDefaultConfig), _SolutionDefaultConfi);
113832
- SolutionSchemas = (_SolutionSchemas = {}, _defineProperty(_SolutionSchemas, Solution.MWA, getMWASchema), _defineProperty(_SolutionSchemas, Solution.Module, getModuleSchema), _defineProperty(_SolutionSchemas, Solution.Monorepo, getMonorepoSchema), _defineProperty(_SolutionSchemas, "custom", getBaseSchema), _SolutionSchemas);
113877
+ SolutionSchemas = (_SolutionSchemas = {}, _defineProperty(_SolutionSchemas, Solution.MWA, MWASchemas), _defineProperty(_SolutionSchemas, Solution.Module, ModuleSchemas), _defineProperty(_SolutionSchemas, Solution.Monorepo, MonorepoSchemas), _defineProperty(_SolutionSchemas, "custom", BaseSchemas), _SolutionSchemas);
113833
113878
  });
113834
113879
  var require_import_lazy2 = __commonJSMin((exports, module2) => {
113835
113880
  (() => {
@@ -143009,13 +143054,13 @@ var require_logger4 = __commonJSMin((exports) => {
143009
143054
  if (LOG_LEVEL[type] > LOG_LEVEL[this.level]) {
143010
143055
  return;
143011
143056
  }
143012
- let label = "";
143057
+ let label21 = "";
143013
143058
  let text = "";
143014
143059
  const logType = this.types[type];
143015
143060
  if (this.config.displayLabel && logType.label) {
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);
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);
143019
143064
  }
143020
143065
  if (message instanceof Error) {
143021
143066
  if (message.stack) {
@@ -143028,15 +143073,15 @@ ${chalk_1.default.grey(rest.join("\n"))}`;
143028
143073
  } else {
143029
143074
  text = `${message}`;
143030
143075
  }
143031
- const log = label.length > 0 ? `${label} ${text}` : text;
143076
+ const log = label21.length > 0 ? `${label21} ${text}` : text;
143032
143077
  console.log(log, ...args);
143033
143078
  }
143034
143079
  getLongestLabel() {
143035
143080
  let longestLabel = "";
143036
143081
  Object.keys(this.types).forEach((type) => {
143037
- const { label = "" } = this.types[type];
143038
- if (label.length > longestLabel.length) {
143039
- longestLabel = label;
143082
+ const { label: label21 = "" } = this.types[type];
143083
+ if (label21.length > longestLabel.length) {
143084
+ longestLabel = label21;
143040
143085
  }
143041
143086
  });
143042
143087
  return longestLabel;
@@ -143353,23 +143398,17 @@ var require_compatRequire2 = __commonJSMin((exports) => {
143353
143398
  Object.defineProperty(exports, "__esModule", { value: true });
143354
143399
  exports.cleanRequireCache = exports.requireExistModule = exports.compatRequire = void 0;
143355
143400
  var findExists_1 = require_findExists2();
143356
- var compatRequire = (filePath, interop = true) => {
143401
+ var compatRequire = (filePath) => {
143357
143402
  const mod = __require(filePath);
143358
- const rtnESMDefault = interop && (mod === null || mod === void 0 ? void 0 : mod.__esModule);
143359
- return rtnESMDefault ? mod.default : mod;
143403
+ return (mod === null || mod === void 0 ? void 0 : mod.__esModule) ? mod.default : mod;
143360
143404
  };
143361
143405
  exports.compatRequire = compatRequire;
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}`));
143406
+ var requireExistModule = (filename, extensions = [".ts", ".js"]) => {
143407
+ const exist = (0, findExists_1.findExists)(extensions.map((ext) => `${filename}${ext}`));
143369
143408
  if (!exist) {
143370
143409
  return null;
143371
143410
  }
143372
- return (0, exports.compatRequire)(exist, final.interop);
143411
+ return (0, exports.compatRequire)(exist);
143373
143412
  };
143374
143413
  exports.requireExistModule = requireExistModule;
143375
143414
  var cleanRequireCache = (filelist) => {
@@ -143382,7 +143421,7 @@ var require_compatRequire2 = __commonJSMin((exports) => {
143382
143421
  var require_constants6 = __commonJSMin((exports) => {
143383
143422
  "use strict";
143384
143423
  Object.defineProperty(exports, "__esModule", { value: true });
143385
- exports.PLUGIN_SCHEMAS = exports.INTERNAL_SERVER_PLUGINS = exports.INTERNAL_CLI_PLUGINS = exports.DEFAULT_SERVER_CONFIG = exports.OUTPUT_CONFIG_FILE = exports.CONFIG_FILE_EXTENSIONS = exports.CONFIG_CACHE_DIR = exports.SHARED_DIR = exports.SERVER_DIR = exports.API_DIR = exports.LOADABLE_STATS_FILE = exports.SERVER_RENDER_FUNCTION_NAME = exports.ENTRY_NAME_PATTERN = exports.SERVER_BUNDLE_DIRECTORY = exports.LAUNCH_EDITOR_ENDPOINT = exports.MAIN_ENTRY_NAME = exports.ROUTE_SPEC_FILE = exports.HMR_SOCK_PATH = void 0;
143424
+ exports.PLUGIN_SCHEMAS = exports.INTERNAL_PLUGINS = exports.DEFAULT_SERVER_CONFIG = exports.OUTPUT_CONFIG_FILE = exports.CONFIG_FILE_EXTENSIONS = exports.CONFIG_CACHE_DIR = exports.SHARED_DIR = exports.SERVER_DIR = exports.API_DIR = exports.LOADABLE_STATS_FILE = exports.SERVER_RENDER_FUNCTION_NAME = exports.ENTRY_NAME_PATTERN = exports.SERVER_BUNDLE_DIRECTORY = exports.LAUNCH_EDITOR_ENDPOINT = exports.MAIN_ENTRY_NAME = exports.ROUTE_SPEC_FILE = exports.HMR_SOCK_PATH = void 0;
143386
143425
  exports.HMR_SOCK_PATH = "/webpack-hmr";
143387
143426
  exports.ROUTE_SPEC_FILE = "route.json";
143388
143427
  exports.MAIN_ENTRY_NAME = "main";
@@ -143398,39 +143437,53 @@ var require_constants6 = __commonJSMin((exports) => {
143398
143437
  exports.CONFIG_FILE_EXTENSIONS = [".js", ".ts", ".ejs", ".mjs"];
143399
143438
  exports.OUTPUT_CONFIG_FILE = "modern.config.json";
143400
143439
  exports.DEFAULT_SERVER_CONFIG = "modern.server-runtime.config";
143401
- exports.INTERNAL_CLI_PLUGINS = {
143402
- "@modern-js/app-tools": "@modern-js/app-tools/cli",
143403
- "@modern-js/monorepo-tools": "@modern-js/monorepo-tools/cli",
143404
- "@modern-js/module-tools": "@modern-js/module-tools/cli",
143405
- "@modern-js/module-tools-v2": "@modern-js/module-tools-v2",
143406
- "@modern-js/runtime": "@modern-js/runtime/cli",
143407
- "@modern-js/plugin-less": "@modern-js/plugin-less/cli",
143408
- "@modern-js/plugin-sass": "@modern-js/plugin-sass/cli",
143409
- "@modern-js/plugin-esbuild": "@modern-js/plugin-esbuild/cli",
143410
- "@modern-js/plugin-proxy": "@modern-js/plugin-proxy/cli",
143411
- "@modern-js/plugin-ssg": "@modern-js/plugin-ssg/cli",
143412
- "@modern-js/plugin-bff": "@modern-js/plugin-bff/cli",
143413
- "@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
143414
- "@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
143415
- "@modern-js/plugin-express": "@modern-js/plugin-express/cli",
143416
- "@modern-js/plugin-egg": "@modern-js/plugin-egg/cli",
143417
- "@modern-js/plugin-koa": "@modern-js/plugin-koa/cli",
143418
- "@modern-js/plugin-nest": "@modern-js/plugin-nest/cli",
143419
- "@modern-js/plugin-server": "@modern-js/plugin-server/cli",
143420
- "@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
143421
- "@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
143422
- "@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
143423
- "@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
143424
- "@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
143425
- };
143426
- exports.INTERNAL_SERVER_PLUGINS = {
143427
- "@modern-js/plugin-bff": "@modern-js/plugin-bff/server",
143428
- "@modern-js/plugin-express": "@modern-js/plugin-express",
143429
- "@modern-js/plugin-egg": "@modern-js/plugin-egg",
143430
- "@modern-js/plugin-koa": "@modern-js/plugin-koa",
143431
- "@modern-js/plugin-nest": "@modern-js/plugin-nest/server",
143432
- "@modern-js/plugin-server": "@modern-js/plugin-server/server",
143433
- "@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill"
143440
+ exports.INTERNAL_PLUGINS = {
143441
+ "@modern-js/app-tools": { cli: "@modern-js/app-tools/cli" },
143442
+ "@modern-js/monorepo-tools": { cli: "@modern-js/monorepo-tools/cli" },
143443
+ "@modern-js/module-tools": { cli: "@modern-js/module-tools/cli" },
143444
+ "@modern-js/runtime": { cli: "@modern-js/runtime/cli" },
143445
+ "@modern-js/plugin-less": { cli: "@modern-js/plugin-less/cli" },
143446
+ "@modern-js/plugin-sass": { cli: "@modern-js/plugin-sass/cli" },
143447
+ "@modern-js/plugin-esbuild": { cli: "@modern-js/plugin-esbuild/cli" },
143448
+ "@modern-js/plugin-proxy": { cli: "@modern-js/plugin-proxy/cli" },
143449
+ "@modern-js/plugin-ssg": { cli: "@modern-js/plugin-ssg/cli" },
143450
+ "@modern-js/plugin-bff": {
143451
+ cli: "@modern-js/plugin-bff/cli",
143452
+ server: "@modern-js/plugin-bff/server"
143453
+ },
143454
+ "@modern-js/plugin-electron": { cli: "@modern-js/plugin-electron/cli" },
143455
+ "@modern-js/plugin-testing": { cli: "@modern-js/plugin-testing/cli" },
143456
+ "@modern-js/plugin-storybook": { cli: "@modern-js/plugin-storybook/cli" },
143457
+ "@modern-js/plugin-express": {
143458
+ cli: "@modern-js/plugin-express/cli",
143459
+ server: "@modern-js/plugin-express"
143460
+ },
143461
+ "@modern-js/plugin-egg": {
143462
+ cli: "@modern-js/plugin-egg/cli",
143463
+ server: "@modern-js/plugin-egg"
143464
+ },
143465
+ "@modern-js/plugin-koa": {
143466
+ cli: "@modern-js/plugin-koa/cli",
143467
+ server: "@modern-js/plugin-koa"
143468
+ },
143469
+ "@modern-js/plugin-nest": {
143470
+ cli: "@modern-js/plugin-nest/cli",
143471
+ server: "@modern-js/plugin-nest/server"
143472
+ },
143473
+ "@modern-js/plugin-unbundle": { cli: "@modern-js/plugin-unbundle" },
143474
+ "@modern-js/plugin-server": {
143475
+ cli: "@modern-js/plugin-server/cli",
143476
+ server: "@modern-js/plugin-server/server"
143477
+ },
143478
+ "@modern-js/plugin-garfish": {
143479
+ cli: "@modern-js/plugin-garfish/cli"
143480
+ },
143481
+ "@modern-js/plugin-tailwindcss": { cli: "@modern-js/plugin-tailwindcss/cli" },
143482
+ "@modern-js/plugin-polyfill": {
143483
+ cli: "@modern-js/plugin-polyfill/cli",
143484
+ server: "@modern-js/plugin-polyfill"
143485
+ },
143486
+ "@modern-js/plugin-nocode": { cli: "@modern-js/plugin-nocode/cli" }
143434
143487
  };
143435
143488
  exports.PLUGIN_SCHEMAS = {
143436
143489
  "@modern-js/runtime": [
@@ -143497,6 +143550,27 @@ var require_constants6 = __commonJSMin((exports) => {
143497
143550
  schema: { typeof: ["string", "object"] }
143498
143551
  }
143499
143552
  ],
143553
+ "@modern-js/plugin-unbundle": [
143554
+ {
143555
+ target: "output.disableAutoImportStyle",
143556
+ schema: { type: "boolean" }
143557
+ },
143558
+ {
143559
+ target: "dev.unbundle",
143560
+ schema: {
143561
+ type: "object",
143562
+ properties: {
143563
+ ignore: {
143564
+ type: ["string", "array"],
143565
+ items: { type: "string" }
143566
+ },
143567
+ ignoreModuleCache: { type: "boolean" },
143568
+ clearPdnCache: { type: "boolean" },
143569
+ pdnHost: { type: "string" }
143570
+ }
143571
+ }
143572
+ }
143573
+ ],
143500
143574
  "@modern-js/plugin-ssg": [
143501
143575
  {
143502
143576
  target: "output.ssg",
@@ -144479,11 +144553,9 @@ var require_chainId2 = __commonJSMin((exports) => {
144479
144553
  HTML: "html",
144480
144554
  BABEL: "babel",
144481
144555
  ESBUILD: "esbuild",
144482
- SWC: "swc",
144483
144556
  STYLE: "style-loader",
144484
144557
  POSTCSS: "postcss",
144485
144558
  MARKDOWN: "markdown",
144486
- IGNORE_CSS: "ignore-css",
144487
144559
  CSS_MODULES_TS: "css-modules-typescript",
144488
144560
  MINI_CSS_EXTRACT: "mini-css-extract"
144489
144561
  },
@@ -144514,8 +144586,7 @@ var require_chainId2 = __commonJSMin((exports) => {
144514
144586
  MINIMIZER: {
144515
144587
  JS: "js",
144516
144588
  CSS: "css",
144517
- ESBUILD: "js-css",
144518
- SWC: "swc"
144589
+ ESBUILD: "js-css"
144519
144590
  },
144520
144591
  RESOLVE_PLUGIN: {
144521
144592
  MODULE_SCOPE: "module-scope",
@@ -144523,7 +144594,7 @@ var require_chainId2 = __commonJSMin((exports) => {
144523
144594
  }
144524
144595
  };
144525
144596
  });
144526
- var require_version2 = __commonJSMin((exports) => {
144597
+ var require_version = __commonJSMin((exports) => {
144527
144598
  "use strict";
144528
144599
  var __importDefault = exports && exports.__importDefault || function(mod) {
144529
144600
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -144554,32 +144625,6 @@ var require_version2 = __commonJSMin((exports) => {
144554
144625
  };
144555
144626
  exports.isReact18 = isReact18;
144556
144627
  });
144557
- var require_plugin = __commonJSMin((exports) => {
144558
- "use strict";
144559
- Object.defineProperty(exports, "__esModule", { value: true });
144560
- exports.getInternalPlugins = void 0;
144561
- var constants_1 = require_constants6();
144562
- var is_1 = require_is2();
144563
- function getInternalPlugins(appDirectory, internalPlugins = constants_1.INTERNAL_CLI_PLUGINS) {
144564
- return [
144565
- ...Object.keys(internalPlugins).filter((name5) => {
144566
- const config = internalPlugins[name5];
144567
- if (typeof config !== "string" && config.forced === true) {
144568
- return true;
144569
- }
144570
- return (0, is_1.isDepExists)(appDirectory, name5);
144571
- }).map((name5) => {
144572
- const config = internalPlugins[name5];
144573
- if (typeof config !== "string") {
144574
- return config.path;
144575
- } else {
144576
- return config;
144577
- }
144578
- })
144579
- ];
144580
- }
144581
- exports.getInternalPlugins = getInternalPlugins;
144582
- });
144583
144628
  var require_dist2 = __commonJSMin((exports) => {
144584
144629
  "use strict";
144585
144630
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
@@ -144639,8 +144684,7 @@ var require_dist2 = __commonJSMin((exports) => {
144639
144684
  __exportStar(require_tryResolve2(), exports);
144640
144685
  __exportStar(require_analyzeProject2(), exports);
144641
144686
  __exportStar(require_chainId2(), exports);
144642
- __exportStar(require_version2(), exports);
144643
- __exportStar(require_plugin(), exports);
144687
+ __exportStar(require_version(), exports);
144644
144688
  });
144645
144689
  var require_strip_ansi4 = __commonJSMin((exports) => {
144646
144690
  "use strict";
@@ -146060,23 +146104,23 @@ var require_utils15 = __commonJSMin((exports) => {
146060
146104
  }
146061
146105
  };
146062
146106
  exports.readJson = readJson;
146063
- function hasEnabledFunction(action2, dependencies3, devDependencies3, peerDependencies, cwd) {
146107
+ function hasEnabledFunction(action3, dependencies3, devDependencies3, peerDependencies, cwd) {
146064
146108
  const packageJsonPath = _path.default.normalize(`${cwd}/package.json`);
146065
146109
  const packageJson = readJson(packageJsonPath);
146066
- if (!dependencies3[action2] && !devDependencies3[action2]) {
146110
+ if (!dependencies3[action3] && !devDependencies3[action3]) {
146067
146111
  return false;
146068
146112
  }
146069
- if (dependencies3[action2]) {
146113
+ if (dependencies3[action3]) {
146070
146114
  var _packageJson$dependen;
146071
- return (_packageJson$dependen = packageJson.dependencies) === null || _packageJson$dependen === void 0 ? void 0 : _packageJson$dependen[dependencies3[action2]];
146115
+ return (_packageJson$dependen = packageJson.dependencies) === null || _packageJson$dependen === void 0 ? void 0 : _packageJson$dependen[dependencies3[action3]];
146072
146116
  }
146073
- if (peerDependencies[action2]) {
146117
+ if (peerDependencies[action3]) {
146074
146118
  var _packageJson$peerDepe;
146075
- return (_packageJson$peerDepe = packageJson.peerDependencies) === null || _packageJson$peerDepe === void 0 ? void 0 : _packageJson$peerDepe[peerDependencies[action2]];
146119
+ return (_packageJson$peerDepe = packageJson.peerDependencies) === null || _packageJson$peerDepe === void 0 ? void 0 : _packageJson$peerDepe[peerDependencies[action3]];
146076
146120
  }
146077
- if (!peerDependencies[action2] && devDependencies3[action2]) {
146121
+ if (!peerDependencies[action3] && devDependencies3[action3]) {
146078
146122
  var _packageJson$devDepen;
146079
- return (_packageJson$devDepen = packageJson.devDependencies) === null || _packageJson$devDepen === void 0 ? void 0 : _packageJson$devDepen[devDependencies3[action2]];
146123
+ return (_packageJson$devDepen = packageJson.devDependencies) === null || _packageJson$devDepen === void 0 ? void 0 : _packageJson$devDepen[devDependencies3[action3]];
146080
146124
  }
146081
146125
  return false;
146082
146126
  }
@@ -146101,35 +146145,6 @@ var require_mwa = __commonJSMin((exports) => {
146101
146145
  var _generatorCommon = (init_treeshaking5(), __toCommonJS2(treeshaking_exports5));
146102
146146
  var _generatorUtils = require_node9();
146103
146147
  var _utils = require_utils15();
146104
- function ownKeys2(object, enumerableOnly) {
146105
- var keys = Object.keys(object);
146106
- if (Object.getOwnPropertySymbols) {
146107
- var symbols = Object.getOwnPropertySymbols(object);
146108
- enumerableOnly && (symbols = symbols.filter(function(sym) {
146109
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
146110
- })), keys.push.apply(keys, symbols);
146111
- }
146112
- return keys;
146113
- }
146114
- function _objectSpread(target) {
146115
- for (var i = 1; i < arguments.length; i++) {
146116
- var source = arguments[i] != null ? arguments[i] : {};
146117
- i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
146118
- _defineProperty2(target, key, source[key]);
146119
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
146120
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
146121
- });
146122
- }
146123
- return target;
146124
- }
146125
- function _defineProperty2(obj, key, value) {
146126
- if (key in obj) {
146127
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
146128
- } else {
146129
- obj[key] = value;
146130
- }
146131
- return obj;
146132
- }
146133
146148
  var MWANewAction2 = async (options3) => {
146134
146149
  const {
146135
146150
  locale = "zh",
@@ -146166,23 +146181,19 @@ var require_mwa = __commonJSMin((exports) => {
146166
146181
  data: {},
146167
146182
  current: null
146168
146183
  }, mockGeneratorCore);
146169
- const funcMap = {};
146170
- _generatorCommon.MWAActionFunctions.forEach((func) => {
146171
- const enable = (0, _utils.hasEnabledFunction)(func, _generatorCommon.MWAActionFunctionsDependencies, _generatorCommon.MWAActionFunctionsDevDependencies, {}, cwd);
146172
- funcMap[func] = enable;
146173
- });
146174
- const refactorMap = {};
146175
- _generatorCommon.MWAActionReactors.forEach((refactor) => {
146176
- const enable = (0, _utils.hasEnabledFunction)(refactor, _generatorCommon.MWAActionRefactorDependencies, {}, {}, cwd);
146177
- refactorMap[refactor] = enable;
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
+ }
146178
146192
  });
146179
- const ans = await appAPI.getInputBySchemaFunc(_generatorCommon.getMWANewActionSchema, _objectSpread(_objectSpread({}, UserConfig), {}, {
146180
- funcMap,
146181
- refactorMap
146182
- }));
146193
+ const ans = await appAPI.getInputBySchema(schema, UserConfig);
146183
146194
  const actionType = ans.actionType;
146184
- const action2 = ans[actionType];
146185
- const generator = (0, _utils.getGeneratorPath)(_generatorCommon.MWANewActionGenerators[actionType][action2], distTag);
146195
+ const action3 = ans[actionType];
146196
+ const generator = (0, _utils.getGeneratorPath)(_generatorCommon.MWANewActionGenerators[actionType][action3], distTag);
146186
146197
  if (!generator) {
146187
146198
  throw new Error(`no valid option`);
146188
146199
  }
@@ -146191,8 +146202,8 @@ var require_mwa = __commonJSMin((exports) => {
146191
146202
  registry: registry2
146192
146203
  });
146193
146204
  };
146194
- const devDependency = _generatorCommon.MWAActionFunctionsDevDependencies[action2];
146195
- const dependency = _generatorCommon.MWAActionFunctionsDependencies[action2] || _generatorCommon.MWAActionRefactorDependencies[action2];
146205
+ const devDependency = _generatorCommon.MWAActionFunctionsDevDependencies[action3];
146206
+ const dependency = _generatorCommon.MWAActionFunctionsDependencies[action3];
146196
146207
  const finalConfig = (0, _lodash.merge)(UserConfig, ans, {
146197
146208
  locale: UserConfig.locale || locale,
146198
146209
  packageManager: UserConfig.packageManager || await (0, _generatorUtils.getPackageManager)(cwd)
@@ -146203,7 +146214,7 @@ var require_mwa = __commonJSMin((exports) => {
146203
146214
  dependencies: dependency ? {
146204
146215
  [dependency]: `${await getMwaPluginVersion(dependency)}`
146205
146216
  } : {},
146206
- appendTypeContent: _generatorCommon.MWAActionFunctionsAppendTypeContent[action2] || _generatorCommon.MWAActionReactorAppendTypeContent[action2]
146217
+ appendTypeContent: _generatorCommon.MWAActionFunctionsAppendTypeContent[action3]
146207
146218
  });
146208
146219
  const task = [{
146209
146220
  name: generator,
@@ -146231,35 +146242,6 @@ var require_module = __commonJSMin((exports) => {
146231
146242
  var _generatorCommon = (init_treeshaking5(), __toCommonJS2(treeshaking_exports5));
146232
146243
  var _generatorUtils = require_node9();
146233
146244
  var _utils = require_utils15();
146234
- function ownKeys2(object, enumerableOnly) {
146235
- var keys = Object.keys(object);
146236
- if (Object.getOwnPropertySymbols) {
146237
- var symbols = Object.getOwnPropertySymbols(object);
146238
- enumerableOnly && (symbols = symbols.filter(function(sym) {
146239
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
146240
- })), keys.push.apply(keys, symbols);
146241
- }
146242
- return keys;
146243
- }
146244
- function _objectSpread(target) {
146245
- for (var i = 1; i < arguments.length; i++) {
146246
- var source = arguments[i] != null ? arguments[i] : {};
146247
- i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
146248
- _defineProperty2(target, key, source[key]);
146249
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
146250
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
146251
- });
146252
- }
146253
- return target;
146254
- }
146255
- function _defineProperty2(obj, key, value) {
146256
- if (key in obj) {
146257
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
146258
- } else {
146259
- obj[key] = value;
146260
- }
146261
- return obj;
146262
- }
146263
146245
  var ModuleNewAction2 = async (options3) => {
146264
146246
  const {
146265
146247
  locale = "zh",
@@ -146297,30 +146279,32 @@ var require_module = __commonJSMin((exports) => {
146297
146279
  current: null
146298
146280
  }, mockGeneratorCore);
146299
146281
  let hasOption = false;
146300
- const funcMap = {};
146301
- _generatorCommon.ModuleActionFunctions.forEach((func) => {
146302
- const enable = (0, _utils.hasEnabledFunction)(func, _generatorCommon.ModuleActionFunctionsDependencies, _generatorCommon.ModuleActionFunctionsDevDependencies, _generatorCommon.ModuleActionFunctionsPeerDependencies, cwd);
146303
- funcMap[func] = enable;
146304
- if (!enable) {
146305
- hasOption = true;
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
+ }
146306
146292
  }
146307
146293
  });
146308
146294
  if (!hasOption) {
146309
146295
  smith.logger.warn("no option can be enabled");
146310
146296
  process.exit(1);
146311
146297
  }
146312
- const ans = await appAPI.getInputBySchemaFunc(_generatorCommon.getModuleNewActionSchema, _objectSpread(_objectSpread({}, UserConfig), {}, {
146313
- funcMap
146314
- }));
146298
+ const ans = await appAPI.getInputBySchema(schema, UserConfig);
146315
146299
  const actionType = ans.actionType;
146316
- const action2 = ans[actionType];
146317
- const generator = (0, _utils.getGeneratorPath)(_generatorCommon.ModuleNewActionGenerators[actionType][action2], distTag);
146300
+ const action3 = ans[actionType];
146301
+ const generator = (0, _utils.getGeneratorPath)(_generatorCommon.ModuleNewActionGenerators[actionType][action3], distTag);
146318
146302
  if (!generator) {
146319
146303
  throw new Error(`no valid option`);
146320
146304
  }
146321
- const devDependency = _generatorCommon.ModuleActionFunctionsDevDependencies[action2];
146322
- const dependency = _generatorCommon.ModuleActionFunctionsDependencies[action2];
146323
- const peerDependency = _generatorCommon.ModuleActionFunctionsPeerDependencies[action2];
146305
+ const devDependency = _generatorCommon.ModuleActionFunctionsDevDependencies[action3];
146306
+ const dependency = _generatorCommon.ModuleActionFunctionsDependencies[action3];
146307
+ const peerDependency = _generatorCommon.ModuleActionFunctionsPeerDependencies[action3];
146324
146308
  const getModulePluginVersion = (packageName) => {
146325
146309
  return (0, _generatorUtils.getModernPluginVersion)(_generatorCommon.Solution.Module, packageName, {
146326
146310
  registry: registry2
@@ -147170,32 +147154,36 @@ var PluginGitAPI = /* @__PURE__ */ function() {
147170
147154
  }]);
147171
147155
  return PluginGitAPI2;
147172
147156
  }();
147157
+ init_objectSpread2();
147173
147158
  init_classCallCheck();
147174
147159
  init_createClass();
147175
147160
  init_defineProperty();
147176
147161
  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 = {}));
147177
147168
  var PluginInputContext = /* @__PURE__ */ function() {
147178
- function PluginInputContext2(solutionSchema) {
147169
+ function PluginInputContext2(inputs) {
147179
147170
  _classCallCheck(this, PluginInputContext2);
147180
147171
  _defineProperty(this, "inputValue", {});
147181
147172
  _defineProperty(this, "defaultConfig", {});
147182
- _defineProperty(this, "solutionSchemaFunc", void 0);
147183
- _defineProperty(this, "solutionSchema", {});
147173
+ _defineProperty(this, "inputs", []);
147184
147174
  _defineProperty(this, "extendInputMap", {});
147185
- this.solutionSchemaFunc = solutionSchema;
147175
+ _defineProperty(this, "extendOptionMap", {});
147176
+ this.inputs = inputs;
147186
147177
  }
147187
147178
  _createClass(PluginInputContext2, [{
147188
- key: "prepare",
147189
- value: function prepare(inputData) {
147190
- this.solutionSchema = this.solutionSchemaFunc(inputData).properties;
147191
- }
147192
- }, {
147193
147179
  key: "context",
147194
147180
  get: function get4() {
147195
147181
  return {
147196
147182
  addInputBefore: this.addInputBefore.bind(this),
147197
147183
  addInputAfter: this.addInputAfter.bind(this),
147198
147184
  setInput: this.setInput.bind(this),
147185
+ addOptionBefore: this.addOptionBefore.bind(this),
147186
+ addOptionAfter: this.addOptionAfter.bind(this),
147199
147187
  setInputValue: this.setInputValue.bind(this),
147200
147188
  setDefaultConfig: this.setDefualtConfig.bind(this)
147201
147189
  };
@@ -147203,80 +147191,169 @@ var PluginInputContext = /* @__PURE__ */ function() {
147203
147191
  }, {
147204
147192
  key: "validateInputKey",
147205
147193
  value: function validateInputKey(inputKey) {
147206
- if (!this.solutionSchema[inputKey]) {
147194
+ if (!this.inputs.find(function(item) {
147195
+ return item.key === inputKey;
147196
+ })) {
147207
147197
  throw new Error("the input key ".concat(inputKey, " not found"));
147208
147198
  }
147209
147199
  }
147210
147200
  }, {
147211
147201
  key: "validateInput",
147212
- value: function validateInput(inputKey) {
147202
+ value: function validateInput(input) {
147213
147203
  var _this = this;
147214
- if (this.solutionSchema[inputKey]) {
147215
- throw new Error("the input key ".concat(inputKey, " already exists"));
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"));
147216
147208
  }
147217
147209
  Object.keys(this.extendInputMap).forEach(function(key) {
147218
- if (_this.extendInputMap[key].before[inputKey] || _this.extendInputMap[key].after[inputKey]) {
147219
- throw new Error("the input key ".concat(inputKey, " is already added"));
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"));
147216
+ }
147217
+ });
147218
+ }
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"));
147220
147245
  }
147221
147246
  });
147222
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
+ }
147223
147284
  }, {
147224
147285
  key: "addInputBefore",
147225
147286
  value: function addInputBefore(key, input) {
147226
147287
  this.validateInputKey(key);
147227
- var properties = input.properties || {};
147228
- for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {
147229
- var inputKey = _Object$keys[_i];
147230
- this.validateInput(inputKey);
147231
- if (this.extendInputMap[key]) {
147232
- this.extendInputMap[key].before[inputKey] = properties[inputKey];
147233
- } else {
147234
- this.extendInputMap[key] = {
147235
- before: _defineProperty({}, inputKey, properties[inputKey]),
147236
- after: {}
147237
- };
147238
- }
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
147296
  }
147240
147297
  }
147241
147298
  }, {
147242
147299
  key: "addInputAfter",
147243
147300
  value: function addInputAfter(key, input) {
147244
147301
  this.validateInputKey(key);
147245
- var properties = input.properties || {};
147246
- for (var _i2 = 0, _Object$keys2 = Object.keys(properties); _i2 < _Object$keys2.length; _i2++) {
147247
- var inputKey = _Object$keys2[_i2];
147248
- this.validateInput(inputKey);
147249
- if (this.extendInputMap[key]) {
147250
- this.extendInputMap[key].after[inputKey] = properties[inputKey];
147251
- } else {
147252
- this.extendInputMap[key] = {
147253
- before: {},
147254
- after: _defineProperty({}, inputKey, properties[inputKey])
147255
- };
147256
- }
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
147310
  }
147258
147311
  }
147259
147312
  }, {
147260
147313
  key: "setInput",
147261
147314
  value: function setInput(key, field, value) {
147262
- var schema = this.solutionSchema[key];
147263
- if (schema) {
147264
- schema[field] = (0, import_lodash6.isFunction)(value) ? value(schema) : 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
+ }
147265
147326
  return;
147266
147327
  }
147267
147328
  var findFlag = false;
147268
- for (var _i3 = 0, _Object$keys3 = Object.keys(this.extendInputMap); _i3 < _Object$keys3.length; _i3++) {
147269
- var inputKey = _Object$keys3[_i3];
147270
- var beforeSchema = this.extendInputMap[inputKey].before[key];
147271
- if (beforeSchema) {
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) {
147272
147338
  findFlag = true;
147273
- beforeSchema[field] = (0, import_lodash6.isFunction)(value) ? value(schema) : value;
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
+ }
147274
147346
  break;
147275
147347
  }
147276
- var afterSchema = this.extendInputMap[inputKey].after[key];
147277
- if (afterSchema) {
147348
+ if (afterIndex !== -1) {
147278
147349
  findFlag = true;
147279
- afterSchema[field] = (0, import_lodash6.isFunction)(value) ? value(schema) : value;
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
+ }
147280
147357
  break;
147281
147358
  }
147282
147359
  }
@@ -147284,26 +147361,135 @@ var PluginInputContext = /* @__PURE__ */ function() {
147284
147361
  throw new Error("the input ".concat(key, " not found"));
147285
147362
  }
147286
147363
  }
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
+ }
147287
147440
  }, {
147288
147441
  key: "getFinalInputs",
147289
147442
  value: function getFinalInputs() {
147290
- var _this2 = this;
147291
- var result = {};
147292
- Object.keys(this.solutionSchema).forEach(function(key) {
147293
- var _ref = _this2.extendInputMap[key] || {
147294
- before: {},
147295
- after: {}
147296
- }, before = _ref.before, after = _ref.after;
147297
- Object.keys(before).forEach(function(beforeKey) {
147298
- return result[beforeKey] = before[beforeKey];
147299
- });
147300
- result[key] = _this2.solutionSchema[key];
147301
- Object.keys(after).forEach(function(afterKey) {
147302
- return result[afterKey] = after[afterKey];
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)));
147303
147456
  });
147304
147457
  });
147305
147458
  return result;
147306
147459
  }
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
+ }
147307
147493
  }, {
147308
147494
  key: "setInputValue",
147309
147495
  value: function setInputValue(value) {
@@ -147571,7 +147757,7 @@ var LifeCycle2;
147571
147757
  LifeCycle3["AfterForged"] = "afterForged";
147572
147758
  })(LifeCycle2 || (LifeCycle2 = {}));
147573
147759
  var PluginContext = /* @__PURE__ */ function() {
147574
- function PluginContext2(solutionSchema, locale) {
147760
+ function PluginContext2(inputs, locale) {
147575
147761
  var _defineProperty2;
147576
147762
  _classCallCheck(this, PluginContext2);
147577
147763
  _defineProperty(this, "generator", void 0);
@@ -147584,7 +147770,7 @@ var PluginContext = /* @__PURE__ */ function() {
147584
147770
  _defineProperty(this, "lifeCycleFuncMap", (_defineProperty2 = {}, _defineProperty(_defineProperty2, LifeCycle2.OnForged, function() {
147585
147771
  }), _defineProperty(_defineProperty2, LifeCycle2.AfterForged, function() {
147586
147772
  }), _defineProperty2));
147587
- this.inputContext = new PluginInputContext(solutionSchema);
147773
+ this.inputContext = new PluginInputContext(inputs);
147588
147774
  this.gitAPI = new PluginGitAPI();
147589
147775
  this.fileAPI = new PluginFileAPI();
147590
147776
  this.locale = locale;
@@ -147880,13 +148066,13 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
147880
148066
  }()
147881
148067
  }, {
147882
148068
  key: "getInputSchema",
147883
- value: function getInputSchema() {
147884
- var properties = {};
148069
+ value: function getInputSchema(solution) {
148070
+ var items5 = [];
147885
148071
  var _iterator = _createForOfIteratorHelper(this.plugins), _step;
147886
148072
  try {
147887
148073
  for (_iterator.s(); !(_step = _iterator.n()).done; ) {
147888
148074
  var info = _step.value;
147889
- properties = _objectSpread2(_objectSpread2({}, properties), info.context.inputContext.getFinalInputs());
148075
+ items5 = [].concat(_toConsumableArray(items5), _toConsumableArray(info.context.inputContext.getFinalInputs()));
147890
148076
  }
147891
148077
  } catch (err) {
147892
148078
  _iterator.e(err);
@@ -147894,8 +148080,9 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
147894
148080
  _iterator.f();
147895
148081
  }
147896
148082
  return {
147897
- type: "object",
147898
- properties
148083
+ key: "".concat(solution, "_plugin_schema"),
148084
+ isObject: true,
148085
+ items: items5
147899
148086
  };
147900
148087
  }
147901
148088
  }, {
@@ -147963,7 +148150,6 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
147963
148150
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) {
147964
148151
  info = _step4.value;
147965
148152
  info.context = new PluginContext(SolutionSchemas[solution], inputData.locale);
147966
- info.context.inputContext.prepare(inputData);
147967
148153
  info.module(info.context.context);
147968
148154
  }
147969
148155
  } catch (err) {
@@ -148133,11 +148319,10 @@ var getNeedRunPlugin = (context, generatorPlugin) => {
148133
148319
  };
148134
148320
  var handleTemplateFile = async (context, generator, appApi, generatorPlugin) => {
148135
148321
  const { isMonorepo } = context.config;
148136
- const { solution } = await appApi.getInputBySchemaFunc(isMonorepo ? getMonorepoNewActionSchema : getSolutionSchema, {
148322
+ const { solution } = await appApi.getInputBySchema(isMonorepo ? MonorepoNewActionSchema : SolutionSchema, {
148137
148323
  ...context.config,
148138
148324
  customPlugin: generatorPlugin?.customPlugin
148139
148325
  });
148140
- await appApi.getInputBySchemaFunc(getScenesSchema, context.config);
148141
148326
  const solutionGenerator = solution === "custom" ? BaseGenerator : isMonorepo ? SubSolutionGenerator[solution] : SolutionGenerator[solution];
148142
148327
  if (!solution || !solutionGenerator) {
148143
148328
  generator.logger.error("solution is not valid ");