@modern-js/repo-generator 3.1.20 → 3.1.22

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 +77 -321
  2. package/package.json +14 -13
package/dist/index.js CHANGED
@@ -42247,7 +42247,7 @@ var require_parse = __commonJS({
42247
42247
  return current.type === "Punctuator" ? current.value : current.type;
42248
42248
  };
42249
42249
  var is = (t) => type() === t;
42250
- var expect2 = (a) => {
42250
+ var expect = (a) => {
42251
42251
  if (!is(a)) {
42252
42252
  unexpected();
42253
42253
  }
@@ -42329,7 +42329,7 @@ var require_parse = __commonJS({
42329
42329
  while (!is(CURLY_BRACKET_CLOSE)) {
42330
42330
  if (started) {
42331
42331
  assign_comments(PREFIX_AFTER_VALUE);
42332
- expect2(COMMA);
42332
+ expect(COMMA);
42333
42333
  next();
42334
42334
  parse_comments();
42335
42335
  assign_after_comments();
@@ -42338,13 +42338,13 @@ var require_parse = __commonJS({
42338
42338
  }
42339
42339
  }
42340
42340
  started = true;
42341
- expect2("String");
42341
+ expect("String");
42342
42342
  name = JSON.parse(current.value);
42343
42343
  set_prop(name);
42344
42344
  assign_comments(PREFIX_BEFORE);
42345
42345
  next();
42346
42346
  parse_comments(PREFIX_AFTER_PROP);
42347
- expect2(COLON);
42347
+ expect(COLON);
42348
42348
  next();
42349
42349
  parse_comments(PREFIX_AFTER_COLON);
42350
42350
  obj[name] = transform(name, walk());
@@ -42372,7 +42372,7 @@ var require_parse = __commonJS({
42372
42372
  while (!is(BRACKET_CLOSE)) {
42373
42373
  if (started) {
42374
42374
  assign_comments(PREFIX_AFTER_VALUE);
42375
- expect2(COMMA);
42375
+ expect(COMMA);
42376
42376
  next();
42377
42377
  parse_comments();
42378
42378
  assign_after_comments();
@@ -43484,9 +43484,9 @@ var require_ms = __commonJS({
43484
43484
  }
43485
43485
  });
43486
43486
 
43487
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
43487
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js
43488
43488
  var require_common2 = __commonJS({
43489
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module2) {
43489
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module2) {
43490
43490
  function setup(env) {
43491
43491
  createDebug.debug = createDebug;
43492
43492
  createDebug.default = createDebug;
@@ -43647,9 +43647,9 @@ var require_common2 = __commonJS({
43647
43647
  }
43648
43648
  });
43649
43649
 
43650
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
43650
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js
43651
43651
  var require_browser = __commonJS({
43652
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports, module2) {
43652
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module2) {
43653
43653
  exports.formatArgs = formatArgs;
43654
43654
  exports.save = save;
43655
43655
  exports.load = load;
@@ -43829,27 +43829,29 @@ var require_has_flag = __commonJS({
43829
43829
  }
43830
43830
  });
43831
43831
 
43832
- // ../../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
43832
+ // ../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
43833
43833
  var require_supports_color = __commonJS({
43834
- "../../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
43834
+ "../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
43835
43835
  "use strict";
43836
43836
  var os2 = require("os");
43837
43837
  var tty = require("tty");
43838
43838
  var hasFlag = require_has_flag();
43839
43839
  var { env } = process;
43840
- var forceColor;
43840
+ var flagForceColor;
43841
43841
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
43842
- forceColor = 0;
43842
+ flagForceColor = 0;
43843
43843
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
43844
- forceColor = 1;
43844
+ flagForceColor = 1;
43845
43845
  }
43846
- if ("FORCE_COLOR" in env) {
43847
- if (env.FORCE_COLOR === "true") {
43848
- forceColor = 1;
43849
- } else if (env.FORCE_COLOR === "false") {
43850
- forceColor = 0;
43851
- } else {
43852
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
43846
+ function envForceColor() {
43847
+ if ("FORCE_COLOR" in env) {
43848
+ if (env.FORCE_COLOR === "true") {
43849
+ return 1;
43850
+ }
43851
+ if (env.FORCE_COLOR === "false") {
43852
+ return 0;
43853
+ }
43854
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
43853
43855
  }
43854
43856
  }
43855
43857
  function translateLevel(level) {
@@ -43863,15 +43865,22 @@ var require_supports_color = __commonJS({
43863
43865
  has16m: level >= 3
43864
43866
  };
43865
43867
  }
43866
- function supportsColor(haveStream, streamIsTTY) {
43868
+ function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
43869
+ const noFlagForceColor = envForceColor();
43870
+ if (noFlagForceColor !== void 0) {
43871
+ flagForceColor = noFlagForceColor;
43872
+ }
43873
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
43867
43874
  if (forceColor === 0) {
43868
43875
  return 0;
43869
43876
  }
43870
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
43871
- return 3;
43872
- }
43873
- if (hasFlag("color=256")) {
43874
- return 2;
43877
+ if (sniffFlags) {
43878
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
43879
+ return 3;
43880
+ }
43881
+ if (hasFlag("color=256")) {
43882
+ return 2;
43883
+ }
43875
43884
  }
43876
43885
  if (haveStream && !streamIsTTY && forceColor === void 0) {
43877
43886
  return 0;
@@ -43888,7 +43897,7 @@ var require_supports_color = __commonJS({
43888
43897
  return 1;
43889
43898
  }
43890
43899
  if ("CI" in env) {
43891
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
43900
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
43892
43901
  return 1;
43893
43902
  }
43894
43903
  return min;
@@ -43900,7 +43909,7 @@ var require_supports_color = __commonJS({
43900
43909
  return 3;
43901
43910
  }
43902
43911
  if ("TERM_PROGRAM" in env) {
43903
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
43912
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
43904
43913
  switch (env.TERM_PROGRAM) {
43905
43914
  case "iTerm.app":
43906
43915
  return version >= 3 ? 3 : 2;
@@ -43919,21 +43928,23 @@ var require_supports_color = __commonJS({
43919
43928
  }
43920
43929
  return min;
43921
43930
  }
43922
- function getSupportLevel(stream) {
43923
- const level = supportsColor(stream, stream && stream.isTTY);
43931
+ function getSupportLevel(stream, options = {}) {
43932
+ const level = supportsColor(stream, __spreadValues({
43933
+ streamIsTTY: stream && stream.isTTY
43934
+ }, options));
43924
43935
  return translateLevel(level);
43925
43936
  }
43926
43937
  module2.exports = {
43927
43938
  supportsColor: getSupportLevel,
43928
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
43929
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
43939
+ stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
43940
+ stderr: getSupportLevel({ isTTY: tty.isatty(2) })
43930
43941
  };
43931
43942
  }
43932
43943
  });
43933
43944
 
43934
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
43945
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js
43935
43946
  var require_node = __commonJS({
43936
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module2) {
43947
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module2) {
43937
43948
  var tty = require("tty");
43938
43949
  var util = require("util");
43939
43950
  exports.init = init;
@@ -44105,9 +44116,9 @@ var require_node = __commonJS({
44105
44116
  }
44106
44117
  });
44107
44118
 
44108
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
44119
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js
44109
44120
  var require_src3 = __commonJS({
44110
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module2) {
44121
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module2) {
44111
44122
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
44112
44123
  module2.exports = require_browser();
44113
44124
  } else {
@@ -122803,6 +122814,9 @@ var require_constants2 = __commonJS({
122803
122814
  ROUTE_SPEC_FILE: function() {
122804
122815
  return ROUTE_SPEC_FILE;
122805
122816
  },
122817
+ NESTED_ROUTE_SPEC_FILE: function() {
122818
+ return NESTED_ROUTE_SPEC_FILE;
122819
+ },
122806
122820
  MAIN_ENTRY_NAME: function() {
122807
122821
  return MAIN_ENTRY_NAME;
122808
122822
  },
@@ -122887,9 +122901,6 @@ var require_constants2 = __commonJS({
122887
122901
  INTERNAL_SERVER_PLUGINS: function() {
122888
122902
  return INTERNAL_SERVER_PLUGINS;
122889
122903
  },
122890
- PLUGIN_SCHEMAS: function() {
122891
- return PLUGIN_SCHEMAS;
122892
- },
122893
122904
  DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
122894
122905
  return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
122895
122906
  }
@@ -122897,6 +122908,7 @@ var require_constants2 = __commonJS({
122897
122908
  var _export_star = require_export_star();
122898
122909
  _export_star._(require_chainId(), exports);
122899
122910
  var ROUTE_SPEC_FILE = "route.json";
122911
+ var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
122900
122912
  var MAIN_ENTRY_NAME = "main";
122901
122913
  var SERVER_BUNDLE_DIRECTORY = "bundles";
122902
122914
  var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
@@ -122943,8 +122955,6 @@ var require_constants2 = __commonJS({
122943
122955
  "@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
122944
122956
  "@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
122945
122957
  "@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
122946
- // TODO: Maybe can remove it
122947
- "@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
122948
122958
  // legacy router (inner react-router-dom v5)
122949
122959
  "@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
122950
122960
  };
@@ -122975,8 +122985,6 @@ var require_constants2 = __commonJS({
122975
122985
  "@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
122976
122986
  "@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
122977
122987
  "@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
122978
- // TODO: Maybe can remove it
122979
- "@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
122980
122988
  // legacy router (inner react-router-dom v5)
122981
122989
  "@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
122982
122990
  };
@@ -122992,214 +123000,6 @@ var require_constants2 = __commonJS({
122992
123000
  [SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
122993
123001
  [SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
122994
123002
  };
122995
- var PLUGIN_SCHEMAS = {
122996
- "@modern-js/runtime": [
122997
- {
122998
- target: "runtime",
122999
- schema: {
123000
- type: "object",
123001
- additionalProperties: false
123002
- }
123003
- },
123004
- {
123005
- target: "runtimeByEntries",
123006
- schema: {
123007
- type: "object",
123008
- patternProperties: {
123009
- [ENTRY_NAME_PATTERN]: {
123010
- type: "object"
123011
- }
123012
- },
123013
- additionalProperties: false
123014
- }
123015
- }
123016
- ],
123017
- "@modern-js/plugin-swc": [
123018
- {
123019
- target: "tools.swc",
123020
- schema: {
123021
- typeof: [
123022
- "object"
123023
- ]
123024
- }
123025
- }
123026
- ],
123027
- "@modern-js/plugin-bff": [
123028
- {
123029
- target: "bff",
123030
- schema: {
123031
- type: "object",
123032
- properties: {
123033
- prefix: {
123034
- type: [
123035
- "string",
123036
- "array"
123037
- ],
123038
- items: {
123039
- type: "string"
123040
- }
123041
- },
123042
- fetcher: {
123043
- type: "string"
123044
- },
123045
- proxy: {
123046
- type: "object"
123047
- },
123048
- requestCreator: {
123049
- type: "string"
123050
- }
123051
- }
123052
- }
123053
- }
123054
- ],
123055
- "@modern-js/plugin-tailwindcss": [
123056
- {
123057
- target: "tools.tailwindcss",
123058
- schema: {
123059
- typeof: [
123060
- "object",
123061
- "function"
123062
- ]
123063
- }
123064
- }
123065
- ],
123066
- "@modern-js/plugin-proxy": [
123067
- {
123068
- target: "dev.proxy",
123069
- schema: {
123070
- typeof: [
123071
- "string",
123072
- "object"
123073
- ]
123074
- }
123075
- }
123076
- ],
123077
- "@modern-js/plugin-ssg": [
123078
- {
123079
- target: "output.ssg",
123080
- schema: {
123081
- oneOf: [
123082
- {
123083
- type: "boolean"
123084
- },
123085
- {
123086
- type: "object"
123087
- },
123088
- {
123089
- instanceof: "Function"
123090
- }
123091
- ]
123092
- }
123093
- }
123094
- ],
123095
- "@modern-js/plugin-state": [
123096
- {
123097
- target: "runtime.state",
123098
- schema: {
123099
- type: [
123100
- "boolean",
123101
- "object"
123102
- ]
123103
- }
123104
- }
123105
- ],
123106
- "@modern-js/plugin-design-token": [
123107
- // Legacy Features
123108
- {
123109
- target: "source.designSystem",
123110
- schema: {
123111
- typeof: [
123112
- "object"
123113
- ]
123114
- }
123115
- },
123116
- {
123117
- target: "source.designSystem.supportStyledComponents",
123118
- schema: {
123119
- type: [
123120
- "boolean"
123121
- ]
123122
- }
123123
- },
123124
- {
123125
- target: "designSystem",
123126
- schema: {
123127
- typeof: [
123128
- "object"
123129
- ]
123130
- }
123131
- }
123132
- ],
123133
- "@modern-js/plugin-router": [
123134
- {
123135
- target: "runtime.router",
123136
- schema: {
123137
- type: [
123138
- "boolean",
123139
- "object"
123140
- ]
123141
- }
123142
- }
123143
- ],
123144
- "@modern-js/plugin-testing": [
123145
- {
123146
- target: "testing",
123147
- schema: {
123148
- typeof: [
123149
- "object"
123150
- ]
123151
- }
123152
- },
123153
- {
123154
- target: "tools.jest",
123155
- schema: {
123156
- typeof: [
123157
- "object",
123158
- "function"
123159
- ]
123160
- }
123161
- }
123162
- ],
123163
- "@modern-js/plugin-garfish": [
123164
- {
123165
- target: "runtime.masterApp",
123166
- schema: {
123167
- type: [
123168
- "boolean",
123169
- "object"
123170
- ]
123171
- }
123172
- },
123173
- {
123174
- target: "dev.withMasterApp",
123175
- schema: {
123176
- type: [
123177
- "object"
123178
- ]
123179
- }
123180
- },
123181
- {
123182
- target: "deploy.microFrontend",
123183
- schema: {
123184
- type: [
123185
- "boolean",
123186
- "object"
123187
- ]
123188
- }
123189
- }
123190
- ],
123191
- "@modern-js/plugin-nocode": [],
123192
- "@modern-js/plugin-worker": [
123193
- {
123194
- target: "deploy.worker.ssr",
123195
- schema: {
123196
- type: [
123197
- "boolean"
123198
- ]
123199
- }
123200
- }
123201
- ]
123202
- };
123203
123003
  var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
123204
123004
  allowNamespaces: true,
123205
123005
  allExtensions: true,
@@ -123654,11 +123454,14 @@ var require_project = __commonJS({
123654
123454
  return false;
123655
123455
  }
123656
123456
  };
123657
- var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
123658
- const srcDir = _path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src");
123659
- const existSrc = yield _compiled.fs.pathExists(srcDir);
123457
+ var isApiOnly = (appDirectory, entryDir, apiDir) => __async(exports, null, function* () {
123458
+ const existApi = yield _compiled.fs.pathExists(apiDir !== null && apiDir !== void 0 ? apiDir : _path.default.join(appDirectory, "api"));
123459
+ const existSrc = yield _compiled.fs.pathExists(_path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src"));
123660
123460
  const options = (0, _compiled.minimist)((0, _commands.getArgv)());
123661
- return !existSrc || Boolean(options["api-only"]);
123461
+ if (options["api-only"]) {
123462
+ return true;
123463
+ }
123464
+ return existApi && !existSrc;
123662
123465
  });
123663
123466
  var isWebOnly = () => __async(exports, null, function* () {
123664
123467
  const options = (0, _compiled.minimist)((0, _commands.getArgv)());
@@ -123992,21 +123795,6 @@ var require_get2 = __commonJS({
123992
123795
  }
123993
123796
  });
123994
123797
 
123995
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
123996
- var require_define_property = __commonJS({
123997
- "../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
123998
- "use strict";
123999
- exports._ = exports._define_property = _define_property22;
124000
- function _define_property22(obj, key, value) {
124001
- if (key in obj) {
124002
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
124003
- } else
124004
- obj[key] = value;
124005
- return obj;
124006
- }
124007
- }
124008
- });
124009
-
124010
123798
  // ../../../toolkit/utils/dist/cjs/cli/logger.js
124011
123799
  var require_logger2 = __commonJS({
124012
123800
  "../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
@@ -124029,7 +123817,6 @@ var require_logger2 = __commonJS({
124029
123817
  return logger2;
124030
123818
  }
124031
123819
  });
124032
- var _define_property22 = require_define_property();
124033
123820
  var _interop_require_default = require_interop_require_default();
124034
123821
  var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk2());
124035
123822
  var LOG_LEVEL = {
@@ -124115,10 +123902,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
124115
123902
  return longestLabel;
124116
123903
  }
124117
123904
  constructor(options = {}) {
124118
- _define_property22._(this, "level", void 0);
124119
- _define_property22._(this, "config", void 0);
124120
- _define_property22._(this, "types", void 0);
124121
- _define_property22._(this, "longestLabel", void 0);
124122
123905
  this.level = options.level || LOG_TYPES.log.level;
124123
123906
  this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
124124
123907
  this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
@@ -124799,9 +124582,10 @@ var require_prettyInstructions = __commonJS({
124799
124582
  }, []);
124800
124583
  };
124801
124584
  var prettyInstructions = (appContext, config) => {
124802
- var _config_dev;
124585
+ var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
124803
124586
  const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
124804
- const urls = getAddressUrls(config.dev.https && (0, _is.isDev)() ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
124587
+ const isHttps = (0, _is.isDev)() && ((_appContext_builder_context_devServer = (_appContext_builder = appContext.builder) === null || _appContext_builder === void 0 ? void 0 : _appContext_builder.context.devServer) === null || _appContext_builder_context_devServer === void 0 ? void 0 : _appContext_builder_context_devServer.https);
124588
+ const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
124805
124589
  const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
124806
124590
  let message = "App running at:\n\n";
124807
124591
  if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
@@ -125047,31 +124831,6 @@ var require_runtimeExports = __commonJS({
125047
124831
  }
125048
124832
  });
125049
124833
 
125050
- // ../../../toolkit/utils/dist/cjs/cli/test.js
125051
- var require_test = __commonJS({
125052
- "../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
125053
- "use strict";
125054
- Object.defineProperty(exports, "__esModule", {
125055
- value: true
125056
- });
125057
- Object.defineProperty(exports, "initSnapshotSerializer", {
125058
- enumerable: true,
125059
- get: function() {
125060
- return initSnapshotSerializer;
125061
- }
125062
- });
125063
- var initSnapshotSerializer = (root) => {
125064
- expect.addSnapshotSerializer({
125065
- test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
125066
- print: (val) => (
125067
- // eslint-disable-next-line no-nested-ternary
125068
- typeof val === "string" ? val.includes("node_modules") ? `"${val.replace(/.+node_modules/, ``).replace(/\\/g, "/")}"` : val.includes("modern.js") ? `"${val.replace(/.+modern\.js/, ``).replace(/\\/g, "/")}"` : `"${val.replace(root, "").replace(/\\/g, "/")}"` : val
125069
- )
125070
- });
125071
- };
125072
- }
125073
- });
125074
-
125075
124834
  // ../../../toolkit/utils/dist/cjs/cli/watch.js
125076
124835
  var require_watch = __commonJS({
125077
124836
  "../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
@@ -125168,7 +124927,6 @@ var require_cli = __commonJS({
125168
124927
  _export_star._(require_require(), exports);
125169
124928
  _export_star._(require_routes(), exports);
125170
124929
  _export_star._(require_runtimeExports(), exports);
125171
- _export_star._(require_test(), exports);
125172
124930
  _export_star._(require_watch(), exports);
125173
124931
  }
125174
124932
  });
@@ -126094,7 +125852,7 @@ var mime = Import.lazy("../compiled/mime-types", require);
126094
125852
  var chokidar = Import.lazy("../compiled/chokidar", require);
126095
125853
  var inquirer = Import.lazy("../compiled/inquirer", require);
126096
125854
 
126097
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
125855
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
126098
125856
  var import_lodash7 = __toESM(require_lodash3());
126099
125857
  var import_comment_json = __toESM(require_src2());
126100
125858
 
@@ -131937,7 +131695,7 @@ var FsAPI = /* @__PURE__ */ function() {
131937
131695
  return FsAPI2;
131938
131696
  }();
131939
131697
 
131940
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/index.js
131698
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/index.js
131941
131699
  var import_lodash3 = __toESM(require_lodash3());
131942
131700
 
131943
131701
  // ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
@@ -141572,10 +141330,10 @@ var Schema = (
141572
141330
  }()
141573
141331
  );
141574
141332
 
141575
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
141333
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
141576
141334
  var import_inquirer = __toESM(require_inquirer());
141577
141335
 
141578
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/transform.js
141336
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/transform.js
141579
141337
  var import_lodash2 = __toESM(require_lodash3());
141580
141338
  function asyncGeneratorStep20(gen, resolve, reject, _next, _throw, key, arg) {
141581
141339
  try {
@@ -141922,7 +141680,7 @@ function transformForm(schema) {
141922
141680
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
141923
141681
  }
141924
141682
 
141925
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
141683
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
141926
141684
  function asyncGeneratorStep21(gen, resolve, reject, _next, _throw, key, arg) {
141927
141685
  try {
141928
141686
  var info = gen[key](arg);
@@ -142446,7 +142204,7 @@ function _prompt() {
142446
142204
  return _prompt.apply(this, arguments);
142447
142205
  }
142448
142206
 
142449
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/inquirer.js
142207
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/inquirer.js
142450
142208
  function asyncGeneratorStep22(gen, resolve, reject, _next, _throw, key, arg) {
142451
142209
  try {
142452
142210
  var info = gen[key](arg);
@@ -142686,7 +142444,7 @@ var CLIReader = /* @__PURE__ */ function() {
142686
142444
  return CLIReader2;
142687
142445
  }();
142688
142446
 
142689
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/index.js
142447
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/index.js
142690
142448
  function asyncGeneratorStep23(gen, resolve, reject, _next, _throw, key, arg) {
142691
142449
  try {
142692
142450
  var info = gen[key](arg);
@@ -142904,7 +142662,7 @@ var FormilyAPI = /* @__PURE__ */ function() {
142904
142662
  return FormilyAPI2;
142905
142663
  }();
142906
142664
 
142907
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
142665
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
142908
142666
  var import_inquirer3 = __toESM(require_inquirer2());
142909
142667
 
142910
142668
  // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
@@ -142983,7 +142741,7 @@ var I18n = class {
142983
142741
  }
142984
142742
  };
142985
142743
 
142986
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/zh.js
142744
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/zh.js
142987
142745
  var ZH_LOCALE = {
142988
142746
  environment: {
142989
142747
  node_version: "请升级 Node 版本至 LIS",
@@ -143010,7 +142768,7 @@ var ZH_LOCALE = {
143010
142768
  }
143011
142769
  };
143012
142770
 
143013
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/en.js
142771
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/en.js
143014
142772
  var EN_LOCALE = {
143015
142773
  environment: {
143016
142774
  node_version: "please upgrade node to lts version",
@@ -143037,14 +142795,14 @@ var EN_LOCALE = {
143037
142795
  }
143038
142796
  };
143039
142797
 
143040
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/index.js
142798
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/index.js
143041
142799
  var i18n = new I18n();
143042
142800
  var localeKeys = i18n.init("zh", {
143043
142801
  zh: ZH_LOCALE,
143044
142802
  en: EN_LOCALE
143045
142803
  });
143046
142804
 
143047
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/transform.js
142805
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/transform.js
143048
142806
  var import_lodash6 = __toESM(require_lodash3());
143049
142807
  function asyncGeneratorStep24(gen, resolve, reject, _next, _throw, key, arg) {
143050
142808
  try {
@@ -143253,7 +143011,7 @@ function transformInquirerSchema(questions) {
143253
143011
  return questions;
143254
143012
  }
143255
143013
 
143256
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/checkUseNvm.js
143014
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/checkUseNvm.js
143257
143015
  var import_path10 = __toESM(require("path"));
143258
143016
  function asyncGeneratorStep25(gen, resolve, reject, _next, _throw, key, arg) {
143259
143017
  try {
@@ -143517,7 +143275,7 @@ function _checkUseNvm() {
143517
143275
  return _checkUseNvm.apply(this, arguments);
143518
143276
  }
143519
143277
 
143520
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
143278
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
143521
143279
  function _array_like_to_array2(arr, len) {
143522
143280
  if (len == null || len > arr.length)
143523
143281
  len = arr.length;
@@ -144545,7 +144303,7 @@ var ZH_LOCALE2 = {
144545
144303
  function: {
144546
144304
  self: "启用可选功能",
144547
144305
  question: "请选择功能名称",
144548
- tailwindcss: "启用 「Tailwind CSS」 支持",
144306
+ tailwindcss: "启用「Tailwind CSS」 支持",
144549
144307
  bff: "启用「BFF」功能",
144550
144308
  micro_frontend: "启用「微前端」模式",
144551
144309
  i18n: "启用「国际化(i18n)」功能",
@@ -148619,8 +148377,6 @@ var src_default = (context, generator) => __async(void 0, null, function* () {
148619
148377
  }
148620
148378
  generator.logger.debug(`forge @modern-js/repo-generator succeed `);
148621
148379
  });
148622
- // Annotate the CommonJS export names for ESM import in node:
148623
- 0 && (module.exports = {});
148624
148380
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
148625
148381
  /*!
148626
148382
  * fill-range <https://github.com/jonschlinkert/fill-range>
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.20",
18
+ "version": "3.1.22",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -29,22 +29,23 @@
29
29
  "@types/node": "^14",
30
30
  "jest": "^29",
31
31
  "typescript": "^5",
32
- "@modern-js/base-generator": "3.1.20",
33
- "@modern-js/generator-utils": "3.1.20",
34
- "@modern-js/module-generator": "3.1.20",
35
- "@modern-js/monorepo-generator": "3.1.20",
36
- "@modern-js/mwa-generator": "3.1.20",
37
- "@modern-js/doc-generator": "3.1.20",
38
- "@modern-js/utils": "2.22.0",
39
- "@modern-js/generator-common": "3.1.20",
40
- "@modern-js/generator-plugin": "3.1.20",
41
- "@scripts/build": "2.22.0",
42
- "@scripts/jest-config": "2.22.0"
32
+ "@modern-js/generator-common": "3.1.22",
33
+ "@modern-js/module-generator": "3.1.22",
34
+ "@modern-js/monorepo-generator": "3.1.22",
35
+ "@modern-js/mwa-generator": "3.1.22",
36
+ "@modern-js/doc-generator": "3.1.22",
37
+ "@modern-js/utils": "2.23.0",
38
+ "@modern-js/generator-plugin": "3.1.22",
39
+ "@modern-js/base-generator": "3.1.22",
40
+ "@modern-js/generator-utils": "3.1.22",
41
+ "@scripts/jest-config": "2.23.0",
42
+ "@scripts/build": "2.23.0"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "publishConfig": {
46
46
  "registry": "https://registry.npmjs.org/",
47
- "access": "public"
47
+ "access": "public",
48
+ "provenance": true
48
49
  },
49
50
  "types": "./src/index.ts",
50
51
  "scripts": {