@modern-js/repo-generator 0.0.0-canary-20221018095932 → 0.0.0-canary-20221018105521

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 +1019 -814
  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",
@@ -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",
@@ -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";
@@ -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() {
@@ -113489,7 +113604,7 @@ var init_common3 = __esmMin(() => {
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, MWANewActionGenerators;
113607
+ var _MWAActionTypesMap, _MWAActionFunctionsDe, _MWAActionFunctionsDe2, _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();
@@ -113505,6 +113620,7 @@ var init_mwa2 = __esmMin(() => {
113505
113620
  ActionFunction.BFF,
113506
113621
  ActionFunction.SSG,
113507
113622
  ActionFunction.MicroFrontend,
113623
+ ActionFunction.Electron,
113508
113624
  ActionFunction.Test,
113509
113625
  ActionFunction.Storybook,
113510
113626
  ActionFunction.Polyfill,
@@ -113513,72 +113629,44 @@ var init_mwa2 = __esmMin(() => {
113513
113629
  MWAActionElements = [ActionElement.Entry, ActionElement.Server];
113514
113630
  MWAActionReactors = [ActionRefactor.BFFToApp];
113515
113631
  MWAActionTypesMap = (_MWAActionTypesMap = {}, _defineProperty(_MWAActionTypesMap, ActionType.Element, MWAActionElements), _defineProperty(_MWAActionTypesMap, ActionType.Function, MWAActionFunctions), _defineProperty(_MWAActionTypesMap, ActionType.Refactor, MWAActionReactors), _MWAActionTypesMap);
113516
- getMWANewActionSchema = function getMWANewActionSchema2() {
113517
- var _properties;
113518
- var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113519
- var _extra$funcMap = extra.funcMap, funcMap = _extra$funcMap === void 0 ? {} : _extra$funcMap;
113520
- var funcs = MWAActionFunctions.filter(function(func) {
113521
- return !funcMap[func];
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
- }).map(function(type) {
113532
- return {
113533
- value: type,
113534
- label: ActionTypeText[type](),
113535
- 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]
113536
113658
  };
113537
113659
  })
113538
- }
113539
- }, _defineProperty(_properties, ActionType.Element, {
113540
- type: "string",
113541
- title: ActionTypeText[ActionType.Element](),
113542
- "enum": MWAActionElements.map(function(element) {
113543
- return {
113544
- value: element,
113545
- label: ActionElementText[element]()
113546
- };
113547
- }),
113548
- "x-reactions": [{
113549
- dependencies: ["actionType"],
113550
- fulfill: {
113551
- state: {
113552
- visible: '{{$deps[0] === "element"}}'
113553
- }
113554
- }
113555
- }]
113556
- }), _defineProperty(_properties, ActionType.Function, {
113557
- type: "string",
113558
- title: ActionTypeText[ActionType.Function](),
113559
- "enum": funcs.map(function(func) {
113560
- return {
113561
- value: func,
113562
- label: func === ActionFunction.Storybook ? i18n.t(localeKeys.action["function"].mwa_storybook) : ActionFunctionText[func]()
113563
- };
113564
- }),
113565
- "x-reactions": [{
113566
- dependencies: ["actionType"],
113567
- fulfill: {
113568
- state: {
113569
- visible: '{{$deps[0] === "function"}}'
113570
- }
113571
- }
113572
- }]
113573
- }), _properties)
113574
- };
113660
+ };
113661
+ })
113662
+ }]
113575
113663
  };
113576
- 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);
113577
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);
113578
- 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);
113579
- 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.BFFToApp, "@modern-js/bff-refactor-generator")), _MWANewActionGenerato);
113666
+ MWAActionFunctionsAppendTypeContent = _defineProperty({}, ActionFunction.MicroFrontend, "/// <reference types='@modern-js/plugin-garfish/types' />");
113667
+ MWANewActionGenerators = (_MWANewActionGenerato = {}, _defineProperty(_MWANewActionGenerato, ActionType.Element, (_ActionType$Element = {}, _defineProperty(_ActionType$Element, ActionElement.Entry, "@modern-js/entry-generator"), _defineProperty(_ActionType$Element, ActionElement.Server, "@modern-js/server-generator"), _ActionType$Element)), _defineProperty(_MWANewActionGenerato, ActionType.Function, (_ActionType$Function = {}, _defineProperty(_ActionType$Function, ActionFunction.TailwindCSS, "@modern-js/tailwindcss-generator"), _defineProperty(_ActionType$Function, ActionFunction.Less, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Sass, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.BFF, "@modern-js/bff-generator"), _defineProperty(_ActionType$Function, ActionFunction.MicroFrontend, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Electron, "@modern-js/electron-generator"), _defineProperty(_ActionType$Function, ActionFunction.I18n, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Test, "@modern-js/test-generator"), _defineProperty(_ActionType$Function, ActionFunction.E2ETest, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Doc, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Storybook, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.SSG, "@modern-js/ssg-generator"), _defineProperty(_ActionType$Function, ActionFunction.Polyfill, "@modern-js/dependence-generator"), _defineProperty(_ActionType$Function, ActionFunction.Proxy, "@modern-js/dependence-generator"), _ActionType$Function)), _defineProperty(_MWANewActionGenerato, ActionType.Refactor, _defineProperty({}, ActionRefactor.BFFToApp, "@modern-js/bff-refactor-generator")), _MWANewActionGenerato);
113580
113668
  });
113581
- 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;
113582
113670
  var init_module2 = __esmMin(() => {
113583
113671
  init_defineProperty();
113584
113672
  init_common3();
@@ -113593,62 +113681,45 @@ var init_module2 = __esmMin(() => {
113593
113681
  ];
113594
113682
  ModuleActionTypesMap = _defineProperty({}, ActionType.Function, ModuleActionFunctions);
113595
113683
  ModuleSpecialSchemaMap = {};
113596
- getModuleNewActionSchema = function getModuleNewActionSchema2() {
113597
- var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113598
- var _extra$funcMap = extra.funcMap, funcMap = _extra$funcMap === void 0 ? {} : _extra$funcMap;
113599
- return {
113600
- type: "object",
113601
- properties: _defineProperty({
113602
- actionType: {
113603
- type: "string",
113604
- title: i18n.t(localeKeys.action.self),
113605
- "enum": ModuleActionTypes.map(function(type) {
113606
- return {
113607
- value: type,
113608
- label: ActionTypeText[type](),
113609
- 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]
113610
113704
  };
113611
113705
  })
113612
- }
113613
- }, ActionType.Function, {
113614
- type: "string",
113615
- title: ActionTypeText[ActionType.Function](),
113616
- "enum": ModuleActionFunctions.filter(function(func) {
113617
- return !funcMap[func];
113618
- }).map(function(func) {
113619
- return {
113620
- value: func,
113621
- label: ActionFunctionText[func]()
113622
- };
113623
- }),
113624
- "x-reactions": [{
113625
- dependencies: ["actionType"],
113626
- fulfill: {
113627
- state: {
113628
- visible: '{{$deps[0] === "function"}}'
113629
- }
113630
- }
113631
- }]
113706
+ };
113632
113707
  })
113633
- };
113708
+ }]
113634
113709
  };
113635
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);
113636
113711
  ModuleActionFunctionsPeerDependencies = (_ModuleActionFunction2 = {}, _defineProperty(_ModuleActionFunction2, ActionFunction.RuntimeApi, "@modern-js/runtime"), _defineProperty(_ModuleActionFunction2, ActionFunction.TailwindCSS, "tailwindcss"), _ModuleActionFunction2);
113637
113712
  ModuleActionFunctionsDependencies = (_ModuleActionFunction3 = {}, _defineProperty(_ModuleActionFunction3, ActionFunction.I18n, "@modern-js/plugin-i18n"), _defineProperty(_ModuleActionFunction3, ActionFunction.TailwindCSS, "@modern-js/plugin-tailwindcss"), _ModuleActionFunction3);
113638
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));
113639
113714
  });
113640
- var _MonorepoNewActionCon, getMonorepoNewActionSchema, MonorepoNewActionConfig;
113715
+ var _MonorepoNewActionCon, MonorepoNewActionSchema, MonorepoNewActionConfig;
113641
113716
  var init_monorepo2 = __esmMin(() => {
113642
113717
  init_defineProperty();
113643
113718
  init_common();
113644
- getMonorepoNewActionSchema = function getMonorepoNewActionSchema2() {
113645
- var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113646
- return {
113647
- type: "object",
113648
- properties: {
113649
- solution: getSolutionSchema(extra)
113650
- }
113651
- };
113719
+ MonorepoNewActionSchema = {
113720
+ key: "monorepo_new_action",
113721
+ isObject: true,
113722
+ items: [SubSolutionSchema]
113652
113723
  };
113653
113724
  MonorepoNewActionConfig = (_MonorepoNewActionCon = {}, _defineProperty(_MonorepoNewActionCon, SubSolution.MWA, {
113654
113725
  isMonorepoSubProject: true,
@@ -113670,24 +113741,14 @@ var init_newAction = __esmMin(() => {
113670
113741
  init_module2();
113671
113742
  init_monorepo2();
113672
113743
  });
113673
- var getGeneratorSchemaProperties, getGeneratorSchema, GeneratorDefaultConfig;
113744
+ var GeneratorSchemas, GeneratorSchema, GeneratorDefaultConfig;
113674
113745
  var init_generator = __esmMin(() => {
113675
113746
  init_common();
113676
- getGeneratorSchemaProperties = function getGeneratorSchemaProperties2() {
113677
- var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113678
- return {
113679
- packageName: getPackageNameSchema(extra),
113680
- packagePath: getPackagePathSchema(extra),
113681
- packageManager: getPackageManagerSchema(extra),
113682
- language: getLanguageSchema(extra)
113683
- };
113684
- };
113685
- getGeneratorSchema = function getGeneratorSchema2() {
113686
- var extra = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
113687
- return {
113688
- type: "object",
113689
- properties: getGeneratorSchemaProperties(extra)
113690
- };
113747
+ GeneratorSchemas = [PackageNameSchema, PackagePathSchema, PackageManagerSchema, LanguageSchema];
113748
+ GeneratorSchema = {
113749
+ key: "generator-generator",
113750
+ isObject: true,
113751
+ items: Object.values(GeneratorSchemas)
113691
113752
  };
113692
113753
  GeneratorDefaultConfig = {
113693
113754
  packageManager: PackageManager.Pnpm,
@@ -113708,20 +113769,34 @@ __export2(treeshaking_exports5, {
113708
113769
  ActionType: () => ActionType,
113709
113770
  ActionTypeText: () => ActionTypeText,
113710
113771
  ActionTypeTextMap: () => ActionTypeTextMap,
113772
+ BFFSchema: () => BFFSchema,
113773
+ BFFSchemas: () => BFFSchemas,
113711
113774
  BFFType: () => BFFType,
113775
+ BFFTypeSchema: () => BFFTypeSchema,
113712
113776
  BaseDefaultConfig: () => BaseDefaultConfig,
113713
113777
  BaseGenerator: () => BaseGenerator,
113778
+ BaseSchema: () => BaseSchema,
113779
+ BaseSchemas: () => BaseSchemas,
113714
113780
  BooleanConfig: () => BooleanConfig,
113715
113781
  BooleanConfigName: () => BooleanConfigName,
113782
+ BooleanSchemas: () => BooleanSchemas,
113716
113783
  ChangesetGenerator: () => ChangesetGenerator,
113717
113784
  ClientRoute: () => ClientRoute,
113785
+ ClientRouteSchema: () => ClientRouteSchema,
113718
113786
  DependenceGenerator: () => DependenceGenerator,
113787
+ ElectronGenerator: () => ElectronGenerator,
113719
113788
  EntryGenerator: () => EntryGenerator,
113789
+ EntrySchema: () => EntrySchema,
113790
+ EntrySchemas: () => EntrySchemas,
113720
113791
  EslintGenerator: () => EslintGenerator,
113721
113792
  Framework: () => Framework,
113722
113793
  FrameworkAppendTypeContent: () => FrameworkAppendTypeContent,
113794
+ FrameworkSchema: () => FrameworkSchema,
113723
113795
  GeneratorDefaultConfig: () => GeneratorDefaultConfig,
113796
+ GeneratorSchema: () => GeneratorSchema,
113724
113797
  Language: () => Language,
113798
+ LanguageName: () => LanguageName,
113799
+ LanguageSchema: () => LanguageSchema,
113725
113800
  MWAActionElements: () => MWAActionElements,
113726
113801
  MWAActionFunctions: () => MWAActionFunctions,
113727
113802
  MWAActionFunctionsAppendTypeContent: () => MWAActionFunctionsAppendTypeContent,
@@ -113735,6 +113810,10 @@ __export2(treeshaking_exports5, {
113735
113810
  MWADefaultEntryConfig: () => MWADefaultEntryConfig,
113736
113811
  MWADefaultServerConfig: () => MWADefaultServerConfig,
113737
113812
  MWANewActionGenerators: () => MWANewActionGenerators,
113813
+ MWANewActionSchema: () => MWANewActionSchema,
113814
+ MWASchema: () => MWASchema,
113815
+ MWASchemas: () => MWASchemas,
113816
+ MWASpecialSchemaMap: () => MWASpecialSchemaMap,
113738
113817
  ModuleActionFunctions: () => ModuleActionFunctions,
113739
113818
  ModuleActionFunctionsDependencies: () => ModuleActionFunctionsDependencies,
113740
113819
  ModuleActionFunctionsDevDependencies: () => ModuleActionFunctionsDevDependencies,
@@ -113743,51 +113822,40 @@ __export2(treeshaking_exports5, {
113743
113822
  ModuleActionTypesMap: () => ModuleActionTypesMap,
113744
113823
  ModuleDefaultConfig: () => ModuleDefaultConfig,
113745
113824
  ModuleNewActionGenerators: () => ModuleNewActionGenerators,
113825
+ ModuleNewActionSchema: () => ModuleNewActionSchema,
113826
+ ModuleSchema: () => ModuleSchema,
113827
+ ModuleSchemas: () => ModuleSchemas,
113746
113828
  ModuleSpecialSchemaMap: () => ModuleSpecialSchemaMap,
113747
113829
  MonorepoDefaultConfig: () => MonorepoDefaultConfig,
113748
113830
  MonorepoNewActionConfig: () => MonorepoNewActionConfig,
113831
+ MonorepoNewActionSchema: () => MonorepoNewActionSchema,
113832
+ MonorepoSchema: () => MonorepoSchema,
113833
+ MonorepoSchemas: () => MonorepoSchemas,
113834
+ NeedModifyMWAConfigSchema: () => NeedModifyMWAConfigSchema,
113749
113835
  PackageManager: () => PackageManager,
113750
113836
  PackageManagerName: () => PackageManagerName,
113837
+ PackageManagerSchema: () => PackageManagerSchema,
113838
+ PackageNameSchema: () => PackageNameSchema,
113839
+ PackagePathSchema: () => PackagePathSchema,
113840
+ RunWay: () => RunWay,
113841
+ RunWaySchema: () => RunWaySchema,
113842
+ ServerSchema: () => ServerSchema,
113843
+ ServerSchemas: () => ServerSchemas,
113751
113844
  Solution: () => Solution,
113752
113845
  SolutionDefaultConfig: () => SolutionDefaultConfig,
113753
113846
  SolutionGenerator: () => SolutionGenerator,
113847
+ SolutionSchema: () => SolutionSchema,
113754
113848
  SolutionSchemas: () => SolutionSchemas,
113755
113849
  SolutionText: () => SolutionText,
113756
113850
  SolutionToolsMap: () => SolutionToolsMap,
113757
113851
  SubSolution: () => SubSolution,
113758
113852
  SubSolutionGenerator: () => SubSolutionGenerator,
113853
+ SubSolutionSchema: () => SubSolutionSchema,
113759
113854
  SubSolutionText: () => SubSolutionText,
113760
- getBFFSchema: () => getBFFSchema,
113761
- getBFFTypeSchema: () => getBFFTypeSchema,
113762
- getBFFchemaProperties: () => getBFFchemaProperties,
113763
- getBaseSchema: () => getBaseSchema,
113764
- getBooleanSchemas: () => getBooleanSchemas,
113765
- getClientRouteSchema: () => getClientRouteSchema,
113766
- getEntryNameSchema: () => getEntryNameSchema,
113767
- getEntrySchema: () => getEntrySchema,
113768
- getEntrySchemaProperties: () => getEntrySchemaProperties,
113769
- getFrameworkSchema: () => getFrameworkSchema,
113770
- getGeneratorSchema: () => getGeneratorSchema,
113771
- getGeneratorSchemaProperties: () => getGeneratorSchemaProperties,
113772
- getLanguageSchema: () => getLanguageSchema,
113773
- getMWANewActionSchema: () => getMWANewActionSchema,
113774
- getMWASchema: () => getMWASchema,
113775
- getMWASchemaProperties: () => getMWASchemaProperties,
113776
- getModuleNewActionSchema: () => getModuleNewActionSchema,
113777
- getModuleSchema: () => getModuleSchema,
113778
- getModuleSchemaProperties: () => getModuleSchemaProperties,
113779
- getMonorepoNewActionSchema: () => getMonorepoNewActionSchema,
113780
- getMonorepoSchema: () => getMonorepoSchema,
113781
- getNeedModifyMWAConfigSchema: () => getNeedModifyMWAConfigSchema,
113782
- getPackageManagerSchema: () => getPackageManagerSchema,
113783
- getPackageNameSchema: () => getPackageNameSchema,
113784
- getPackagePathSchema: () => getPackagePathSchema,
113785
- getScenesSchema: () => getScenesSchema,
113786
- getServerSchema: () => getServerSchema,
113787
113855
  getSolutionNameFromSubSolution: () => getSolutionNameFromSubSolution,
113788
- getSolutionSchema: () => getSolutionSchema,
113789
113856
  i18n: () => i18n,
113790
- localeKeys: () => localeKeys
113857
+ localeKeys: () => localeKeys,
113858
+ mwaConfigWhenFunc: () => mwaConfigWhenFunc
113791
113859
  });
113792
113860
  var _SolutionDefaultConfi, _SolutionSchemas, SolutionDefaultConfig, SolutionSchemas;
113793
113861
  var init_treeshaking5 = __esmMin(() => {
@@ -113806,7 +113874,7 @@ var init_treeshaking5 = __esmMin(() => {
113806
113874
  init_expand();
113807
113875
  init_base();
113808
113876
  SolutionDefaultConfig = (_SolutionDefaultConfi = {}, _defineProperty(_SolutionDefaultConfi, Solution.MWA, MWADefaultConfig), _defineProperty(_SolutionDefaultConfi, Solution.Module, ModuleDefaultConfig), _defineProperty(_SolutionDefaultConfi, Solution.Monorepo, MonorepoDefaultConfig), _SolutionDefaultConfi);
113809
- 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);
113810
113878
  });
113811
113879
  var require_import_lazy2 = __commonJSMin((exports, module2) => {
113812
113880
  (() => {
@@ -142986,13 +143054,13 @@ var require_logger4 = __commonJSMin((exports) => {
142986
143054
  if (LOG_LEVEL[type] > LOG_LEVEL[this.level]) {
142987
143055
  return;
142988
143056
  }
142989
- let label = "";
143057
+ let label21 = "";
142990
143058
  let text = "";
142991
143059
  const logType = this.types[type];
142992
143060
  if (this.config.displayLabel && logType.label) {
142993
- label = this.config.uppercaseLabel ? logType.label.toUpperCase() : logType.label;
142994
- label = label.padEnd(this.longestLabel.length);
142995
- 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);
142996
143064
  }
142997
143065
  if (message instanceof Error) {
142998
143066
  if (message.stack) {
@@ -143005,15 +143073,15 @@ ${chalk_1.default.grey(rest.join("\n"))}`;
143005
143073
  } else {
143006
143074
  text = `${message}`;
143007
143075
  }
143008
- const log = label.length > 0 ? `${label} ${text}` : text;
143076
+ const log = label21.length > 0 ? `${label21} ${text}` : text;
143009
143077
  console.log(log, ...args);
143010
143078
  }
143011
143079
  getLongestLabel() {
143012
143080
  let longestLabel = "";
143013
143081
  Object.keys(this.types).forEach((type) => {
143014
- const { label = "" } = this.types[type];
143015
- if (label.length > longestLabel.length) {
143016
- longestLabel = label;
143082
+ const { label: label21 = "" } = this.types[type];
143083
+ if (label21.length > longestLabel.length) {
143084
+ longestLabel = label21;
143017
143085
  }
143018
143086
  });
143019
143087
  return longestLabel;
@@ -143330,23 +143398,17 @@ var require_compatRequire2 = __commonJSMin((exports) => {
143330
143398
  Object.defineProperty(exports, "__esModule", { value: true });
143331
143399
  exports.cleanRequireCache = exports.requireExistModule = exports.compatRequire = void 0;
143332
143400
  var findExists_1 = require_findExists2();
143333
- var compatRequire = (filePath, interop = true) => {
143401
+ var compatRequire = (filePath) => {
143334
143402
  const mod = __require(filePath);
143335
- const rtnESMDefault = interop && (mod === null || mod === void 0 ? void 0 : mod.__esModule);
143336
- return rtnESMDefault ? mod.default : mod;
143403
+ return (mod === null || mod === void 0 ? void 0 : mod.__esModule) ? mod.default : mod;
143337
143404
  };
143338
143405
  exports.compatRequire = compatRequire;
143339
- var requireExistModule = (filename, opt) => {
143340
- const final = {
143341
- extensions: [".ts", ".js"],
143342
- interop: true,
143343
- ...opt
143344
- };
143345
- 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}`));
143346
143408
  if (!exist) {
143347
143409
  return null;
143348
143410
  }
143349
- return (0, exports.compatRequire)(exist, final.interop);
143411
+ return (0, exports.compatRequire)(exist);
143350
143412
  };
143351
143413
  exports.requireExistModule = requireExistModule;
143352
143414
  var cleanRequireCache = (filelist) => {
@@ -143379,7 +143441,6 @@ var require_constants6 = __commonJSMin((exports) => {
143379
143441
  "@modern-js/app-tools": { cli: "@modern-js/app-tools/cli" },
143380
143442
  "@modern-js/monorepo-tools": { cli: "@modern-js/monorepo-tools/cli" },
143381
143443
  "@modern-js/module-tools": { cli: "@modern-js/module-tools/cli" },
143382
- "@modern-js/module-tools-v2": { cli: "@modern-js/module-tools-v2" },
143383
143444
  "@modern-js/runtime": { cli: "@modern-js/runtime/cli" },
143384
143445
  "@modern-js/plugin-less": { cli: "@modern-js/plugin-less/cli" },
143385
143446
  "@modern-js/plugin-sass": { cli: "@modern-js/plugin-sass/cli" },
@@ -143422,10 +143483,7 @@ var require_constants6 = __commonJSMin((exports) => {
143422
143483
  cli: "@modern-js/plugin-polyfill/cli",
143423
143484
  server: "@modern-js/plugin-polyfill"
143424
143485
  },
143425
- "@modern-js/plugin-nocode": { cli: "@modern-js/plugin-nocode/cli" },
143426
- "@modern-js/plugin-router-legacy": {
143427
- cli: "@modern-js/plugin-router-legacy/cli"
143428
- }
143486
+ "@modern-js/plugin-nocode": { cli: "@modern-js/plugin-nocode/cli" }
143429
143487
  };
143430
143488
  exports.PLUGIN_SCHEMAS = {
143431
143489
  "@modern-js/runtime": [
@@ -144536,7 +144594,7 @@ var require_chainId2 = __commonJSMin((exports) => {
144536
144594
  }
144537
144595
  };
144538
144596
  });
144539
- var require_version2 = __commonJSMin((exports) => {
144597
+ var require_version = __commonJSMin((exports) => {
144540
144598
  "use strict";
144541
144599
  var __importDefault = exports && exports.__importDefault || function(mod) {
144542
144600
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -144626,7 +144684,7 @@ var require_dist2 = __commonJSMin((exports) => {
144626
144684
  __exportStar(require_tryResolve2(), exports);
144627
144685
  __exportStar(require_analyzeProject2(), exports);
144628
144686
  __exportStar(require_chainId2(), exports);
144629
- __exportStar(require_version2(), exports);
144687
+ __exportStar(require_version(), exports);
144630
144688
  });
144631
144689
  var require_strip_ansi4 = __commonJSMin((exports) => {
144632
144690
  "use strict";
@@ -144977,7 +145035,7 @@ var require_node9 = __commonJSMin((exports) => {
144977
145035
  const version5 = await getPackageVersion(packageName, registry2);
144978
145036
  return version5;
144979
145037
  };
144980
- if (!packageName.startsWith("@modern-js")) {
145038
+ if (!packageName.startsWith("@modern-js") || packageName.includes("electron") || packageName.includes("codesmith") || packageName.includes("easy-form") || packageName.startsWith("@modern-js-reduck")) {
144981
145039
  return getLatetPluginVersion();
144982
145040
  }
144983
145041
  const pkgPath = _path.default.join(__require.resolve(_generatorCommon.SolutionToolsMap[solution], {
@@ -146046,23 +146104,23 @@ var require_utils15 = __commonJSMin((exports) => {
146046
146104
  }
146047
146105
  };
146048
146106
  exports.readJson = readJson;
146049
- function hasEnabledFunction(action2, dependencies3, devDependencies3, peerDependencies, cwd) {
146107
+ function hasEnabledFunction(action3, dependencies3, devDependencies3, peerDependencies, cwd) {
146050
146108
  const packageJsonPath = _path.default.normalize(`${cwd}/package.json`);
146051
146109
  const packageJson = readJson(packageJsonPath);
146052
- if (!dependencies3[action2] && !devDependencies3[action2]) {
146110
+ if (!dependencies3[action3] && !devDependencies3[action3]) {
146053
146111
  return false;
146054
146112
  }
146055
- if (dependencies3[action2]) {
146113
+ if (dependencies3[action3]) {
146056
146114
  var _packageJson$dependen;
146057
- 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]];
146058
146116
  }
146059
- if (peerDependencies[action2]) {
146117
+ if (peerDependencies[action3]) {
146060
146118
  var _packageJson$peerDepe;
146061
- 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]];
146062
146120
  }
146063
- if (!peerDependencies[action2] && devDependencies3[action2]) {
146121
+ if (!peerDependencies[action3] && devDependencies3[action3]) {
146064
146122
  var _packageJson$devDepen;
146065
- 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]];
146066
146124
  }
146067
146125
  return false;
146068
146126
  }
@@ -146087,35 +146145,6 @@ var require_mwa = __commonJSMin((exports) => {
146087
146145
  var _generatorCommon = (init_treeshaking5(), __toCommonJS2(treeshaking_exports5));
146088
146146
  var _generatorUtils = require_node9();
146089
146147
  var _utils = require_utils15();
146090
- function ownKeys2(object, enumerableOnly) {
146091
- var keys = Object.keys(object);
146092
- if (Object.getOwnPropertySymbols) {
146093
- var symbols = Object.getOwnPropertySymbols(object);
146094
- enumerableOnly && (symbols = symbols.filter(function(sym) {
146095
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
146096
- })), keys.push.apply(keys, symbols);
146097
- }
146098
- return keys;
146099
- }
146100
- function _objectSpread(target) {
146101
- for (var i = 1; i < arguments.length; i++) {
146102
- var source = arguments[i] != null ? arguments[i] : {};
146103
- i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
146104
- _defineProperty2(target, key, source[key]);
146105
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
146106
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
146107
- });
146108
- }
146109
- return target;
146110
- }
146111
- function _defineProperty2(obj, key, value) {
146112
- if (key in obj) {
146113
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
146114
- } else {
146115
- obj[key] = value;
146116
- }
146117
- return obj;
146118
- }
146119
146148
  var MWANewAction2 = async (options3) => {
146120
146149
  const {
146121
146150
  locale = "zh",
@@ -146152,17 +146181,19 @@ var require_mwa = __commonJSMin((exports) => {
146152
146181
  data: {},
146153
146182
  current: null
146154
146183
  }, mockGeneratorCore);
146155
- const funcMap = {};
146156
- _generatorCommon.MWAActionFunctions.forEach((func) => {
146157
- const enable = (0, _utils.hasEnabledFunction)(func, _generatorCommon.MWAActionFunctionsDependencies, _generatorCommon.MWAActionFunctionsDevDependencies, {}, cwd);
146158
- funcMap[func] = 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
+ }
146159
146192
  });
146160
- const ans = await appAPI.getInputBySchemaFunc(_generatorCommon.getMWANewActionSchema, _objectSpread(_objectSpread({}, UserConfig), {}, {
146161
- funcMap
146162
- }));
146193
+ const ans = await appAPI.getInputBySchema(schema, UserConfig);
146163
146194
  const actionType = ans.actionType;
146164
- const action2 = ans[actionType];
146165
- 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);
146166
146197
  if (!generator) {
146167
146198
  throw new Error(`no valid option`);
146168
146199
  }
@@ -146171,8 +146202,8 @@ var require_mwa = __commonJSMin((exports) => {
146171
146202
  registry: registry2
146172
146203
  });
146173
146204
  };
146174
- const devDependency = _generatorCommon.MWAActionFunctionsDevDependencies[action2];
146175
- const dependency = _generatorCommon.MWAActionFunctionsDependencies[action2];
146205
+ const devDependency = _generatorCommon.MWAActionFunctionsDevDependencies[action3];
146206
+ const dependency = _generatorCommon.MWAActionFunctionsDependencies[action3];
146176
146207
  const finalConfig = (0, _lodash.merge)(UserConfig, ans, {
146177
146208
  locale: UserConfig.locale || locale,
146178
146209
  packageManager: UserConfig.packageManager || await (0, _generatorUtils.getPackageManager)(cwd)
@@ -146183,7 +146214,7 @@ var require_mwa = __commonJSMin((exports) => {
146183
146214
  dependencies: dependency ? {
146184
146215
  [dependency]: `${await getMwaPluginVersion(dependency)}`
146185
146216
  } : {},
146186
- appendTypeContent: _generatorCommon.MWAActionFunctionsAppendTypeContent[action2]
146217
+ appendTypeContent: _generatorCommon.MWAActionFunctionsAppendTypeContent[action3]
146187
146218
  });
146188
146219
  const task = [{
146189
146220
  name: generator,
@@ -146211,35 +146242,6 @@ var require_module = __commonJSMin((exports) => {
146211
146242
  var _generatorCommon = (init_treeshaking5(), __toCommonJS2(treeshaking_exports5));
146212
146243
  var _generatorUtils = require_node9();
146213
146244
  var _utils = require_utils15();
146214
- function ownKeys2(object, enumerableOnly) {
146215
- var keys = Object.keys(object);
146216
- if (Object.getOwnPropertySymbols) {
146217
- var symbols = Object.getOwnPropertySymbols(object);
146218
- enumerableOnly && (symbols = symbols.filter(function(sym) {
146219
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
146220
- })), keys.push.apply(keys, symbols);
146221
- }
146222
- return keys;
146223
- }
146224
- function _objectSpread(target) {
146225
- for (var i = 1; i < arguments.length; i++) {
146226
- var source = arguments[i] != null ? arguments[i] : {};
146227
- i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
146228
- _defineProperty2(target, key, source[key]);
146229
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
146230
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
146231
- });
146232
- }
146233
- return target;
146234
- }
146235
- function _defineProperty2(obj, key, value) {
146236
- if (key in obj) {
146237
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
146238
- } else {
146239
- obj[key] = value;
146240
- }
146241
- return obj;
146242
- }
146243
146245
  var ModuleNewAction2 = async (options3) => {
146244
146246
  const {
146245
146247
  locale = "zh",
@@ -146277,30 +146279,32 @@ var require_module = __commonJSMin((exports) => {
146277
146279
  current: null
146278
146280
  }, mockGeneratorCore);
146279
146281
  let hasOption = false;
146280
- const funcMap = {};
146281
- _generatorCommon.ModuleActionFunctions.forEach((func) => {
146282
- const enable = (0, _utils.hasEnabledFunction)(func, _generatorCommon.ModuleActionFunctionsDependencies, _generatorCommon.ModuleActionFunctionsDevDependencies, _generatorCommon.ModuleActionFunctionsPeerDependencies, cwd);
146283
- funcMap[func] = enable;
146284
- if (!enable) {
146285
- 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
+ }
146286
146292
  }
146287
146293
  });
146288
146294
  if (!hasOption) {
146289
146295
  smith.logger.warn("no option can be enabled");
146290
146296
  process.exit(1);
146291
146297
  }
146292
- const ans = await appAPI.getInputBySchemaFunc(_generatorCommon.getModuleNewActionSchema, _objectSpread(_objectSpread({}, UserConfig), {}, {
146293
- funcMap
146294
- }));
146298
+ const ans = await appAPI.getInputBySchema(schema, UserConfig);
146295
146299
  const actionType = ans.actionType;
146296
- const action2 = ans[actionType];
146297
- 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);
146298
146302
  if (!generator) {
146299
146303
  throw new Error(`no valid option`);
146300
146304
  }
146301
- const devDependency = _generatorCommon.ModuleActionFunctionsDevDependencies[action2];
146302
- const dependency = _generatorCommon.ModuleActionFunctionsDependencies[action2];
146303
- const peerDependency = _generatorCommon.ModuleActionFunctionsPeerDependencies[action2];
146305
+ const devDependency = _generatorCommon.ModuleActionFunctionsDevDependencies[action3];
146306
+ const dependency = _generatorCommon.ModuleActionFunctionsDependencies[action3];
146307
+ const peerDependency = _generatorCommon.ModuleActionFunctionsPeerDependencies[action3];
146304
146308
  const getModulePluginVersion = (packageName) => {
146305
146309
  return (0, _generatorUtils.getModernPluginVersion)(_generatorCommon.Solution.Module, packageName, {
146306
146310
  registry: registry2
@@ -147150,32 +147154,36 @@ var PluginGitAPI = /* @__PURE__ */ function() {
147150
147154
  }]);
147151
147155
  return PluginGitAPI2;
147152
147156
  }();
147157
+ init_objectSpread2();
147153
147158
  init_classCallCheck();
147154
147159
  init_createClass();
147155
147160
  init_defineProperty();
147156
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 = {}));
147157
147168
  var PluginInputContext = /* @__PURE__ */ function() {
147158
- function PluginInputContext2(solutionSchema) {
147169
+ function PluginInputContext2(inputs) {
147159
147170
  _classCallCheck(this, PluginInputContext2);
147160
147171
  _defineProperty(this, "inputValue", {});
147161
147172
  _defineProperty(this, "defaultConfig", {});
147162
- _defineProperty(this, "solutionSchemaFunc", void 0);
147163
- _defineProperty(this, "solutionSchema", {});
147173
+ _defineProperty(this, "inputs", []);
147164
147174
  _defineProperty(this, "extendInputMap", {});
147165
- this.solutionSchemaFunc = solutionSchema;
147175
+ _defineProperty(this, "extendOptionMap", {});
147176
+ this.inputs = inputs;
147166
147177
  }
147167
147178
  _createClass(PluginInputContext2, [{
147168
- key: "prepare",
147169
- value: function prepare(inputData) {
147170
- this.solutionSchema = this.solutionSchemaFunc(inputData).properties;
147171
- }
147172
- }, {
147173
147179
  key: "context",
147174
147180
  get: function get4() {
147175
147181
  return {
147176
147182
  addInputBefore: this.addInputBefore.bind(this),
147177
147183
  addInputAfter: this.addInputAfter.bind(this),
147178
147184
  setInput: this.setInput.bind(this),
147185
+ addOptionBefore: this.addOptionBefore.bind(this),
147186
+ addOptionAfter: this.addOptionAfter.bind(this),
147179
147187
  setInputValue: this.setInputValue.bind(this),
147180
147188
  setDefaultConfig: this.setDefualtConfig.bind(this)
147181
147189
  };
@@ -147183,80 +147191,169 @@ var PluginInputContext = /* @__PURE__ */ function() {
147183
147191
  }, {
147184
147192
  key: "validateInputKey",
147185
147193
  value: function validateInputKey(inputKey) {
147186
- if (!this.solutionSchema[inputKey]) {
147194
+ if (!this.inputs.find(function(item) {
147195
+ return item.key === inputKey;
147196
+ })) {
147187
147197
  throw new Error("the input key ".concat(inputKey, " not found"));
147188
147198
  }
147189
147199
  }
147190
147200
  }, {
147191
147201
  key: "validateInput",
147192
- value: function validateInput(inputKey) {
147202
+ value: function validateInput(input) {
147193
147203
  var _this = this;
147194
- if (this.solutionSchema[inputKey]) {
147195
- 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"));
147196
147208
  }
147197
147209
  Object.keys(this.extendInputMap).forEach(function(key) {
147198
- if (_this.extendInputMap[key].before[inputKey] || _this.extendInputMap[key].after[inputKey]) {
147199
- 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"));
147200
147216
  }
147201
147217
  });
147202
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"));
147245
+ }
147246
+ });
147247
+ }
147248
+ }, {
147249
+ key: "validateOptionKey",
147250
+ value: function validateOptionKey(key, optionKey) {
147251
+ var _input$items2, _this3 = this;
147252
+ var input = this.inputs.find(function(item) {
147253
+ return item.key === key;
147254
+ });
147255
+ if (input && !((_input$items2 = input.items) !== null && _input$items2 !== void 0 && _input$items2.find(function(item) {
147256
+ return item.key === optionKey;
147257
+ }))) {
147258
+ throw new Error("the option key ".concat(optionKey, " is not found"));
147259
+ }
147260
+ var foundFlag = false;
147261
+ Object.keys(this.extendInputMap).forEach(function(inputKey) {
147262
+ var _beforeInput$options2, _afterInput$options2;
147263
+ var beforeInput = _this3.extendInputMap[inputKey].before.find(function(item) {
147264
+ return item.key === key;
147265
+ });
147266
+ var afterInput = _this3.extendInputMap[inputKey].after.find(function(item) {
147267
+ return item.key === key;
147268
+ });
147269
+ if (beforeInput || afterInput) {
147270
+ foundFlag = true;
147271
+ }
147272
+ if (beforeInput && !((_beforeInput$options2 = beforeInput.options) !== null && _beforeInput$options2 !== void 0 && _beforeInput$options2.find(function(item) {
147273
+ return item.key === optionKey;
147274
+ })) || afterInput && !((_afterInput$options2 = afterInput.options) !== null && _afterInput$options2 !== void 0 && _afterInput$options2.find(function(item) {
147275
+ return item.key === optionKey;
147276
+ }))) {
147277
+ throw new Error("the option key ".concat(optionKey, " is not found"));
147278
+ }
147279
+ });
147280
+ if (!input && !foundFlag) {
147281
+ throw new Error("the input key ".concat(key, " is not found"));
147282
+ }
147283
+ }
147203
147284
  }, {
147204
147285
  key: "addInputBefore",
147205
147286
  value: function addInputBefore(key, input) {
147206
147287
  this.validateInputKey(key);
147207
- var properties = input.properties || {};
147208
- for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {
147209
- var inputKey = _Object$keys[_i];
147210
- this.validateInput(inputKey);
147211
- if (this.extendInputMap[key]) {
147212
- this.extendInputMap[key].before[inputKey] = properties[inputKey];
147213
- } else {
147214
- this.extendInputMap[key] = {
147215
- before: _defineProperty({}, inputKey, properties[inputKey]),
147216
- after: {}
147217
- };
147218
- }
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
+ };
147219
147296
  }
147220
147297
  }
147221
147298
  }, {
147222
147299
  key: "addInputAfter",
147223
147300
  value: function addInputAfter(key, input) {
147224
147301
  this.validateInputKey(key);
147225
- var properties = input.properties || {};
147226
- for (var _i2 = 0, _Object$keys2 = Object.keys(properties); _i2 < _Object$keys2.length; _i2++) {
147227
- var inputKey = _Object$keys2[_i2];
147228
- this.validateInput(inputKey);
147229
- if (this.extendInputMap[key]) {
147230
- this.extendInputMap[key].after[inputKey] = properties[inputKey];
147231
- } else {
147232
- this.extendInputMap[key] = {
147233
- before: {},
147234
- after: _defineProperty({}, inputKey, properties[inputKey])
147235
- };
147236
- }
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
+ };
147237
147310
  }
147238
147311
  }
147239
147312
  }, {
147240
147313
  key: "setInput",
147241
147314
  value: function setInput(key, field, value) {
147242
- var schema = this.solutionSchema[key];
147243
- if (schema) {
147244
- 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
+ }
147245
147326
  return;
147246
147327
  }
147247
147328
  var findFlag = false;
147248
- for (var _i3 = 0, _Object$keys3 = Object.keys(this.extendInputMap); _i3 < _Object$keys3.length; _i3++) {
147249
- var inputKey = _Object$keys3[_i3];
147250
- var beforeSchema = this.extendInputMap[inputKey].before[key];
147251
- 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) {
147252
147338
  findFlag = true;
147253
- 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
+ }
147254
147346
  break;
147255
147347
  }
147256
- var afterSchema = this.extendInputMap[inputKey].after[key];
147257
- if (afterSchema) {
147348
+ if (afterIndex !== -1) {
147258
147349
  findFlag = true;
147259
- 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
+ }
147260
147357
  break;
147261
147358
  }
147262
147359
  }
@@ -147264,26 +147361,135 @@ var PluginInputContext = /* @__PURE__ */ function() {
147264
147361
  throw new Error("the input ".concat(key, " not found"));
147265
147362
  }
147266
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
+ }
147267
147440
  }, {
147268
147441
  key: "getFinalInputs",
147269
147442
  value: function getFinalInputs() {
147270
- var _this2 = this;
147271
- var result = {};
147272
- Object.keys(this.solutionSchema).forEach(function(key) {
147273
- var _ref = _this2.extendInputMap[key] || {
147274
- before: {},
147275
- after: {}
147276
- }, before = _ref.before, after = _ref.after;
147277
- Object.keys(before).forEach(function(beforeKey) {
147278
- return result[beforeKey] = before[beforeKey];
147279
- });
147280
- result[key] = _this2.solutionSchema[key];
147281
- Object.keys(after).forEach(function(afterKey) {
147282
- 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)));
147283
147456
  });
147284
147457
  });
147285
147458
  return result;
147286
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
+ }
147287
147493
  }, {
147288
147494
  key: "setInputValue",
147289
147495
  value: function setInputValue(value) {
@@ -147551,7 +147757,7 @@ var LifeCycle2;
147551
147757
  LifeCycle3["AfterForged"] = "afterForged";
147552
147758
  })(LifeCycle2 || (LifeCycle2 = {}));
147553
147759
  var PluginContext = /* @__PURE__ */ function() {
147554
- function PluginContext2(solutionSchema, locale) {
147760
+ function PluginContext2(inputs, locale) {
147555
147761
  var _defineProperty2;
147556
147762
  _classCallCheck(this, PluginContext2);
147557
147763
  _defineProperty(this, "generator", void 0);
@@ -147564,7 +147770,7 @@ var PluginContext = /* @__PURE__ */ function() {
147564
147770
  _defineProperty(this, "lifeCycleFuncMap", (_defineProperty2 = {}, _defineProperty(_defineProperty2, LifeCycle2.OnForged, function() {
147565
147771
  }), _defineProperty(_defineProperty2, LifeCycle2.AfterForged, function() {
147566
147772
  }), _defineProperty2));
147567
- this.inputContext = new PluginInputContext(solutionSchema);
147773
+ this.inputContext = new PluginInputContext(inputs);
147568
147774
  this.gitAPI = new PluginGitAPI();
147569
147775
  this.fileAPI = new PluginFileAPI();
147570
147776
  this.locale = locale;
@@ -147860,13 +148066,13 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
147860
148066
  }()
147861
148067
  }, {
147862
148068
  key: "getInputSchema",
147863
- value: function getInputSchema() {
147864
- var properties = {};
148069
+ value: function getInputSchema(solution) {
148070
+ var items5 = [];
147865
148071
  var _iterator = _createForOfIteratorHelper(this.plugins), _step;
147866
148072
  try {
147867
148073
  for (_iterator.s(); !(_step = _iterator.n()).done; ) {
147868
148074
  var info = _step.value;
147869
- properties = _objectSpread2(_objectSpread2({}, properties), info.context.inputContext.getFinalInputs());
148075
+ items5 = [].concat(_toConsumableArray(items5), _toConsumableArray(info.context.inputContext.getFinalInputs()));
147870
148076
  }
147871
148077
  } catch (err) {
147872
148078
  _iterator.e(err);
@@ -147874,8 +148080,9 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
147874
148080
  _iterator.f();
147875
148081
  }
147876
148082
  return {
147877
- type: "object",
147878
- properties
148083
+ key: "".concat(solution, "_plugin_schema"),
148084
+ isObject: true,
148085
+ items: items5
147879
148086
  };
147880
148087
  }
147881
148088
  }, {
@@ -147943,7 +148150,6 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
147943
148150
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) {
147944
148151
  info = _step4.value;
147945
148152
  info.context = new PluginContext(SolutionSchemas[solution], inputData.locale);
147946
- info.context.inputContext.prepare(inputData);
147947
148153
  info.module(info.context.context);
147948
148154
  }
147949
148155
  } catch (err) {
@@ -148113,11 +148319,10 @@ var getNeedRunPlugin = (context, generatorPlugin) => {
148113
148319
  };
148114
148320
  var handleTemplateFile = async (context, generator, appApi, generatorPlugin) => {
148115
148321
  const { isMonorepo } = context.config;
148116
- const { solution } = await appApi.getInputBySchemaFunc(isMonorepo ? getMonorepoNewActionSchema : getSolutionSchema, {
148322
+ const { solution } = await appApi.getInputBySchema(isMonorepo ? MonorepoNewActionSchema : SolutionSchema, {
148117
148323
  ...context.config,
148118
148324
  customPlugin: generatorPlugin?.customPlugin
148119
148325
  });
148120
- await appApi.getInputBySchemaFunc(getScenesSchema, context.config);
148121
148326
  const solutionGenerator = solution === "custom" ? BaseGenerator : isMonorepo ? SubSolutionGenerator[solution] : SolutionGenerator[solution];
148122
148327
  if (!solution || !solutionGenerator) {
148123
148328
  generator.logger.error("solution is not valid ");