@modern-js/monorepo-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 +75 -317
  2. package/package.json +11 -10
package/dist/index.js CHANGED
@@ -42252,7 +42252,7 @@ var require_parse = __commonJS({
42252
42252
  return current.type === "Punctuator" ? current.value : current.type;
42253
42253
  };
42254
42254
  var is = (t) => type() === t;
42255
- var expect2 = (a) => {
42255
+ var expect = (a) => {
42256
42256
  if (!is(a)) {
42257
42257
  unexpected();
42258
42258
  }
@@ -42334,7 +42334,7 @@ var require_parse = __commonJS({
42334
42334
  while (!is(CURLY_BRACKET_CLOSE)) {
42335
42335
  if (started) {
42336
42336
  assign_comments(PREFIX_AFTER_VALUE);
42337
- expect2(COMMA);
42337
+ expect(COMMA);
42338
42338
  next();
42339
42339
  parse_comments();
42340
42340
  assign_after_comments();
@@ -42343,13 +42343,13 @@ var require_parse = __commonJS({
42343
42343
  }
42344
42344
  }
42345
42345
  started = true;
42346
- expect2("String");
42346
+ expect("String");
42347
42347
  name = JSON.parse(current.value);
42348
42348
  set_prop(name);
42349
42349
  assign_comments(PREFIX_BEFORE);
42350
42350
  next();
42351
42351
  parse_comments(PREFIX_AFTER_PROP);
42352
- expect2(COLON);
42352
+ expect(COLON);
42353
42353
  next();
42354
42354
  parse_comments(PREFIX_AFTER_COLON);
42355
42355
  obj[name] = transform(name, walk());
@@ -42377,7 +42377,7 @@ var require_parse = __commonJS({
42377
42377
  while (!is(BRACKET_CLOSE)) {
42378
42378
  if (started) {
42379
42379
  assign_comments(PREFIX_AFTER_VALUE);
42380
- expect2(COMMA);
42380
+ expect(COMMA);
42381
42381
  next();
42382
42382
  parse_comments();
42383
42383
  assign_after_comments();
@@ -84469,9 +84469,9 @@ var require_ms = __commonJS({
84469
84469
  }
84470
84470
  });
84471
84471
 
84472
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
84472
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js
84473
84473
  var require_common2 = __commonJS({
84474
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module2) {
84474
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module2) {
84475
84475
  function setup(env) {
84476
84476
  createDebug.debug = createDebug;
84477
84477
  createDebug.default = createDebug;
@@ -84632,9 +84632,9 @@ var require_common2 = __commonJS({
84632
84632
  }
84633
84633
  });
84634
84634
 
84635
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
84635
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js
84636
84636
  var require_browser = __commonJS({
84637
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports, module2) {
84637
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module2) {
84638
84638
  exports.formatArgs = formatArgs;
84639
84639
  exports.save = save;
84640
84640
  exports.load = load;
@@ -84814,27 +84814,29 @@ var require_has_flag = __commonJS({
84814
84814
  }
84815
84815
  });
84816
84816
 
84817
- // ../../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
84817
+ // ../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
84818
84818
  var require_supports_color = __commonJS({
84819
- "../../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
84819
+ "../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
84820
84820
  "use strict";
84821
84821
  var os = require("os");
84822
84822
  var tty = require("tty");
84823
84823
  var hasFlag = require_has_flag();
84824
84824
  var { env } = process;
84825
- var forceColor;
84825
+ var flagForceColor;
84826
84826
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
84827
- forceColor = 0;
84827
+ flagForceColor = 0;
84828
84828
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
84829
- forceColor = 1;
84829
+ flagForceColor = 1;
84830
84830
  }
84831
- if ("FORCE_COLOR" in env) {
84832
- if (env.FORCE_COLOR === "true") {
84833
- forceColor = 1;
84834
- } else if (env.FORCE_COLOR === "false") {
84835
- forceColor = 0;
84836
- } else {
84837
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
84831
+ function envForceColor() {
84832
+ if ("FORCE_COLOR" in env) {
84833
+ if (env.FORCE_COLOR === "true") {
84834
+ return 1;
84835
+ }
84836
+ if (env.FORCE_COLOR === "false") {
84837
+ return 0;
84838
+ }
84839
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
84838
84840
  }
84839
84841
  }
84840
84842
  function translateLevel(level) {
@@ -84848,15 +84850,22 @@ var require_supports_color = __commonJS({
84848
84850
  has16m: level >= 3
84849
84851
  };
84850
84852
  }
84851
- function supportsColor(haveStream, streamIsTTY) {
84853
+ function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
84854
+ const noFlagForceColor = envForceColor();
84855
+ if (noFlagForceColor !== void 0) {
84856
+ flagForceColor = noFlagForceColor;
84857
+ }
84858
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
84852
84859
  if (forceColor === 0) {
84853
84860
  return 0;
84854
84861
  }
84855
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
84856
- return 3;
84857
- }
84858
- if (hasFlag("color=256")) {
84859
- return 2;
84862
+ if (sniffFlags) {
84863
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
84864
+ return 3;
84865
+ }
84866
+ if (hasFlag("color=256")) {
84867
+ return 2;
84868
+ }
84860
84869
  }
84861
84870
  if (haveStream && !streamIsTTY && forceColor === void 0) {
84862
84871
  return 0;
@@ -84873,7 +84882,7 @@ var require_supports_color = __commonJS({
84873
84882
  return 1;
84874
84883
  }
84875
84884
  if ("CI" in env) {
84876
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
84885
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
84877
84886
  return 1;
84878
84887
  }
84879
84888
  return min;
@@ -84885,7 +84894,7 @@ var require_supports_color = __commonJS({
84885
84894
  return 3;
84886
84895
  }
84887
84896
  if ("TERM_PROGRAM" in env) {
84888
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
84897
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
84889
84898
  switch (env.TERM_PROGRAM) {
84890
84899
  case "iTerm.app":
84891
84900
  return version >= 3 ? 3 : 2;
@@ -84904,21 +84913,23 @@ var require_supports_color = __commonJS({
84904
84913
  }
84905
84914
  return min;
84906
84915
  }
84907
- function getSupportLevel(stream) {
84908
- const level = supportsColor(stream, stream && stream.isTTY);
84916
+ function getSupportLevel(stream, options = {}) {
84917
+ const level = supportsColor(stream, __spreadValues({
84918
+ streamIsTTY: stream && stream.isTTY
84919
+ }, options));
84909
84920
  return translateLevel(level);
84910
84921
  }
84911
84922
  module2.exports = {
84912
84923
  supportsColor: getSupportLevel,
84913
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
84914
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
84924
+ stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
84925
+ stderr: getSupportLevel({ isTTY: tty.isatty(2) })
84915
84926
  };
84916
84927
  }
84917
84928
  });
84918
84929
 
84919
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
84930
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js
84920
84931
  var require_node2 = __commonJS({
84921
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module2) {
84932
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module2) {
84922
84933
  var tty = require("tty");
84923
84934
  var util = require("util");
84924
84935
  exports.init = init;
@@ -85090,9 +85101,9 @@ var require_node2 = __commonJS({
85090
85101
  }
85091
85102
  });
85092
85103
 
85093
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
85104
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js
85094
85105
  var require_src3 = __commonJS({
85095
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module2) {
85106
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module2) {
85096
85107
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
85097
85108
  module2.exports = require_browser();
85098
85109
  } else {
@@ -115500,6 +115511,9 @@ var require_constants = __commonJS({
115500
115511
  ROUTE_SPEC_FILE: function() {
115501
115512
  return ROUTE_SPEC_FILE;
115502
115513
  },
115514
+ NESTED_ROUTE_SPEC_FILE: function() {
115515
+ return NESTED_ROUTE_SPEC_FILE;
115516
+ },
115503
115517
  MAIN_ENTRY_NAME: function() {
115504
115518
  return MAIN_ENTRY_NAME;
115505
115519
  },
@@ -115584,9 +115598,6 @@ var require_constants = __commonJS({
115584
115598
  INTERNAL_SERVER_PLUGINS: function() {
115585
115599
  return INTERNAL_SERVER_PLUGINS;
115586
115600
  },
115587
- PLUGIN_SCHEMAS: function() {
115588
- return PLUGIN_SCHEMAS;
115589
- },
115590
115601
  DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
115591
115602
  return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
115592
115603
  }
@@ -115594,6 +115605,7 @@ var require_constants = __commonJS({
115594
115605
  var _export_star = require_export_star();
115595
115606
  _export_star._(require_chainId(), exports);
115596
115607
  var ROUTE_SPEC_FILE = "route.json";
115608
+ var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
115597
115609
  var MAIN_ENTRY_NAME = "main";
115598
115610
  var SERVER_BUNDLE_DIRECTORY = "bundles";
115599
115611
  var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
@@ -115640,8 +115652,6 @@ var require_constants = __commonJS({
115640
115652
  "@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
115641
115653
  "@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
115642
115654
  "@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
115643
- // TODO: Maybe can remove it
115644
- "@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
115645
115655
  // legacy router (inner react-router-dom v5)
115646
115656
  "@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
115647
115657
  };
@@ -115672,8 +115682,6 @@ var require_constants = __commonJS({
115672
115682
  "@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
115673
115683
  "@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
115674
115684
  "@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
115675
- // TODO: Maybe can remove it
115676
- "@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
115677
115685
  // legacy router (inner react-router-dom v5)
115678
115686
  "@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
115679
115687
  };
@@ -115689,214 +115697,6 @@ var require_constants = __commonJS({
115689
115697
  [SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
115690
115698
  [SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
115691
115699
  };
115692
- var PLUGIN_SCHEMAS = {
115693
- "@modern-js/runtime": [
115694
- {
115695
- target: "runtime",
115696
- schema: {
115697
- type: "object",
115698
- additionalProperties: false
115699
- }
115700
- },
115701
- {
115702
- target: "runtimeByEntries",
115703
- schema: {
115704
- type: "object",
115705
- patternProperties: {
115706
- [ENTRY_NAME_PATTERN]: {
115707
- type: "object"
115708
- }
115709
- },
115710
- additionalProperties: false
115711
- }
115712
- }
115713
- ],
115714
- "@modern-js/plugin-swc": [
115715
- {
115716
- target: "tools.swc",
115717
- schema: {
115718
- typeof: [
115719
- "object"
115720
- ]
115721
- }
115722
- }
115723
- ],
115724
- "@modern-js/plugin-bff": [
115725
- {
115726
- target: "bff",
115727
- schema: {
115728
- type: "object",
115729
- properties: {
115730
- prefix: {
115731
- type: [
115732
- "string",
115733
- "array"
115734
- ],
115735
- items: {
115736
- type: "string"
115737
- }
115738
- },
115739
- fetcher: {
115740
- type: "string"
115741
- },
115742
- proxy: {
115743
- type: "object"
115744
- },
115745
- requestCreator: {
115746
- type: "string"
115747
- }
115748
- }
115749
- }
115750
- }
115751
- ],
115752
- "@modern-js/plugin-tailwindcss": [
115753
- {
115754
- target: "tools.tailwindcss",
115755
- schema: {
115756
- typeof: [
115757
- "object",
115758
- "function"
115759
- ]
115760
- }
115761
- }
115762
- ],
115763
- "@modern-js/plugin-proxy": [
115764
- {
115765
- target: "dev.proxy",
115766
- schema: {
115767
- typeof: [
115768
- "string",
115769
- "object"
115770
- ]
115771
- }
115772
- }
115773
- ],
115774
- "@modern-js/plugin-ssg": [
115775
- {
115776
- target: "output.ssg",
115777
- schema: {
115778
- oneOf: [
115779
- {
115780
- type: "boolean"
115781
- },
115782
- {
115783
- type: "object"
115784
- },
115785
- {
115786
- instanceof: "Function"
115787
- }
115788
- ]
115789
- }
115790
- }
115791
- ],
115792
- "@modern-js/plugin-state": [
115793
- {
115794
- target: "runtime.state",
115795
- schema: {
115796
- type: [
115797
- "boolean",
115798
- "object"
115799
- ]
115800
- }
115801
- }
115802
- ],
115803
- "@modern-js/plugin-design-token": [
115804
- // Legacy Features
115805
- {
115806
- target: "source.designSystem",
115807
- schema: {
115808
- typeof: [
115809
- "object"
115810
- ]
115811
- }
115812
- },
115813
- {
115814
- target: "source.designSystem.supportStyledComponents",
115815
- schema: {
115816
- type: [
115817
- "boolean"
115818
- ]
115819
- }
115820
- },
115821
- {
115822
- target: "designSystem",
115823
- schema: {
115824
- typeof: [
115825
- "object"
115826
- ]
115827
- }
115828
- }
115829
- ],
115830
- "@modern-js/plugin-router": [
115831
- {
115832
- target: "runtime.router",
115833
- schema: {
115834
- type: [
115835
- "boolean",
115836
- "object"
115837
- ]
115838
- }
115839
- }
115840
- ],
115841
- "@modern-js/plugin-testing": [
115842
- {
115843
- target: "testing",
115844
- schema: {
115845
- typeof: [
115846
- "object"
115847
- ]
115848
- }
115849
- },
115850
- {
115851
- target: "tools.jest",
115852
- schema: {
115853
- typeof: [
115854
- "object",
115855
- "function"
115856
- ]
115857
- }
115858
- }
115859
- ],
115860
- "@modern-js/plugin-garfish": [
115861
- {
115862
- target: "runtime.masterApp",
115863
- schema: {
115864
- type: [
115865
- "boolean",
115866
- "object"
115867
- ]
115868
- }
115869
- },
115870
- {
115871
- target: "dev.withMasterApp",
115872
- schema: {
115873
- type: [
115874
- "object"
115875
- ]
115876
- }
115877
- },
115878
- {
115879
- target: "deploy.microFrontend",
115880
- schema: {
115881
- type: [
115882
- "boolean",
115883
- "object"
115884
- ]
115885
- }
115886
- }
115887
- ],
115888
- "@modern-js/plugin-nocode": [],
115889
- "@modern-js/plugin-worker": [
115890
- {
115891
- target: "deploy.worker.ssr",
115892
- schema: {
115893
- type: [
115894
- "boolean"
115895
- ]
115896
- }
115897
- }
115898
- ]
115899
- };
115900
115700
  var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
115901
115701
  allowNamespaces: true,
115902
115702
  allExtensions: true,
@@ -116351,11 +116151,14 @@ var require_project = __commonJS({
116351
116151
  return false;
116352
116152
  }
116353
116153
  };
116354
- var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
116355
- const srcDir = _path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src");
116356
- const existSrc = yield _compiled.fs.pathExists(srcDir);
116154
+ var isApiOnly = (appDirectory, entryDir, apiDir) => __async(exports, null, function* () {
116155
+ const existApi = yield _compiled.fs.pathExists(apiDir !== null && apiDir !== void 0 ? apiDir : _path.default.join(appDirectory, "api"));
116156
+ const existSrc = yield _compiled.fs.pathExists(_path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src"));
116357
116157
  const options = (0, _compiled.minimist)((0, _commands.getArgv)());
116358
- return !existSrc || Boolean(options["api-only"]);
116158
+ if (options["api-only"]) {
116159
+ return true;
116160
+ }
116161
+ return existApi && !existSrc;
116359
116162
  });
116360
116163
  var isWebOnly = () => __async(exports, null, function* () {
116361
116164
  const options = (0, _compiled.minimist)((0, _commands.getArgv)());
@@ -116689,21 +116492,6 @@ var require_get2 = __commonJS({
116689
116492
  }
116690
116493
  });
116691
116494
 
116692
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
116693
- var require_define_property = __commonJS({
116694
- "../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
116695
- "use strict";
116696
- exports._ = exports._define_property = _define_property15;
116697
- function _define_property15(obj, key, value) {
116698
- if (key in obj) {
116699
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
116700
- } else
116701
- obj[key] = value;
116702
- return obj;
116703
- }
116704
- }
116705
- });
116706
-
116707
116495
  // ../../../toolkit/utils/dist/cjs/cli/logger.js
116708
116496
  var require_logger2 = __commonJS({
116709
116497
  "../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
@@ -116726,7 +116514,6 @@ var require_logger2 = __commonJS({
116726
116514
  return logger;
116727
116515
  }
116728
116516
  });
116729
- var _define_property15 = require_define_property();
116730
116517
  var _interop_require_default = require_interop_require_default();
116731
116518
  var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk2());
116732
116519
  var LOG_LEVEL = {
@@ -116812,10 +116599,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
116812
116599
  return longestLabel;
116813
116600
  }
116814
116601
  constructor(options = {}) {
116815
- _define_property15._(this, "level", void 0);
116816
- _define_property15._(this, "config", void 0);
116817
- _define_property15._(this, "types", void 0);
116818
- _define_property15._(this, "longestLabel", void 0);
116819
116602
  this.level = options.level || LOG_TYPES.log.level;
116820
116603
  this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
116821
116604
  this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
@@ -117496,9 +117279,10 @@ var require_prettyInstructions = __commonJS({
117496
117279
  }, []);
117497
117280
  };
117498
117281
  var prettyInstructions = (appContext, config) => {
117499
- var _config_dev;
117282
+ var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
117500
117283
  const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
117501
- 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);
117284
+ 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);
117285
+ const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
117502
117286
  const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
117503
117287
  let message = "App running at:\n\n";
117504
117288
  if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
@@ -117744,31 +117528,6 @@ var require_runtimeExports = __commonJS({
117744
117528
  }
117745
117529
  });
117746
117530
 
117747
- // ../../../toolkit/utils/dist/cjs/cli/test.js
117748
- var require_test = __commonJS({
117749
- "../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
117750
- "use strict";
117751
- Object.defineProperty(exports, "__esModule", {
117752
- value: true
117753
- });
117754
- Object.defineProperty(exports, "initSnapshotSerializer", {
117755
- enumerable: true,
117756
- get: function() {
117757
- return initSnapshotSerializer;
117758
- }
117759
- });
117760
- var initSnapshotSerializer = (root) => {
117761
- expect.addSnapshotSerializer({
117762
- test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
117763
- print: (val) => (
117764
- // eslint-disable-next-line no-nested-ternary
117765
- 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
117766
- )
117767
- });
117768
- };
117769
- }
117770
- });
117771
-
117772
117531
  // ../../../toolkit/utils/dist/cjs/cli/watch.js
117773
117532
  var require_watch = __commonJS({
117774
117533
  "../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
@@ -117865,7 +117624,6 @@ var require_cli = __commonJS({
117865
117624
  _export_star._(require_require(), exports);
117866
117625
  _export_star._(require_routes(), exports);
117867
117626
  _export_star._(require_runtimeExports(), exports);
117868
- _export_star._(require_test(), exports);
117869
117627
  _export_star._(require_watch(), exports);
117870
117628
  }
117871
117629
  });
@@ -118335,7 +118093,7 @@ function _canUsePnpm() {
118335
118093
  return _canUsePnpm.apply(this, arguments);
118336
118094
  }
118337
118095
 
118338
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
118096
+ // ../../../../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
118339
118097
  var import_lodash6 = __toESM(require_lodash2());
118340
118098
  var import_comment_json = __toESM(require_src2());
118341
118099
 
@@ -130259,10 +130017,10 @@ var Schema = (
130259
130017
  }()
130260
130018
  );
130261
130019
 
130262
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
130020
+ // ../../../../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
130263
130021
  var import_inquirer = __toESM(require_inquirer());
130264
130022
 
130265
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/transform.js
130023
+ // ../../../../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
130266
130024
  var import_lodash2 = __toESM(require_lodash2());
130267
130025
  function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
130268
130026
  try {
@@ -130609,7 +130367,7 @@ function transformForm(schema) {
130609
130367
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
130610
130368
  }
130611
130369
 
130612
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
130370
+ // ../../../../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
130613
130371
  function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
130614
130372
  try {
130615
130373
  var info = gen[key](arg);
@@ -131133,7 +130891,7 @@ function _prompt() {
131133
130891
  return _prompt.apply(this, arguments);
131134
130892
  }
131135
130893
 
131136
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/inquirer.js
130894
+ // ../../../../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
131137
130895
  function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
131138
130896
  try {
131139
130897
  var info = gen[key](arg);
@@ -131373,7 +131131,7 @@ var CLIReader = /* @__PURE__ */ function() {
131373
131131
  return CLIReader2;
131374
131132
  }();
131375
131133
 
131376
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
131134
+ // ../../../../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
131377
131135
  var import_inquirer2 = __toESM(require_inquirer2());
131378
131136
 
131379
131137
  // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
@@ -131452,7 +131210,7 @@ var I18n = class {
131452
131210
  }
131453
131211
  };
131454
131212
 
131455
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/zh.js
131213
+ // ../../../../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
131456
131214
  var ZH_LOCALE = {
131457
131215
  environment: {
131458
131216
  node_version: "请升级 Node 版本至 LIS",
@@ -131479,7 +131237,7 @@ var ZH_LOCALE = {
131479
131237
  }
131480
131238
  };
131481
131239
 
131482
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/en.js
131240
+ // ../../../../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
131483
131241
  var EN_LOCALE = {
131484
131242
  environment: {
131485
131243
  node_version: "please upgrade node to lts version",
@@ -131506,14 +131264,14 @@ var EN_LOCALE = {
131506
131264
  }
131507
131265
  };
131508
131266
 
131509
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/index.js
131267
+ // ../../../../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
131510
131268
  var i18n = new I18n();
131511
131269
  var localeKeys = i18n.init("zh", {
131512
131270
  zh: ZH_LOCALE,
131513
131271
  en: EN_LOCALE
131514
131272
  });
131515
131273
 
131516
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/transform.js
131274
+ // ../../../../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
131517
131275
  var import_lodash5 = __toESM(require_lodash2());
131518
131276
  function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
131519
131277
  try {
@@ -131722,7 +131480,7 @@ function transformInquirerSchema(questions) {
131722
131480
  return questions;
131723
131481
  }
131724
131482
 
131725
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/checkUseNvm.js
131483
+ // ../../../../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
131726
131484
  var import_path5 = __toESM(require("path"));
131727
131485
  function asyncGeneratorStep14(gen, resolve, reject, _next, _throw, key, arg) {
131728
131486
  try {
@@ -131986,7 +131744,7 @@ function _checkUseNvm() {
131986
131744
  return _checkUseNvm.apply(this, arguments);
131987
131745
  }
131988
131746
 
131989
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
131747
+ // ../../../../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
131990
131748
  function _array_like_to_array(arr, len) {
131991
131749
  if (len == null || len > arr.length)
131992
131750
  len = arr.length;
@@ -133486,7 +133244,7 @@ var ZH_LOCALE2 = {
133486
133244
  function: {
133487
133245
  self: "启用可选功能",
133488
133246
  question: "请选择功能名称",
133489
- tailwindcss: "启用 「Tailwind CSS」 支持",
133247
+ tailwindcss: "启用「Tailwind CSS」 支持",
133490
133248
  bff: "启用「BFF」功能",
133491
133249
  micro_frontend: "启用「微前端」模式",
133492
133250
  i18n: "启用「国际化(i18n)」功能",
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": [
@@ -30,19 +30,20 @@
30
30
  "@types/node": "^14",
31
31
  "jest": "^29",
32
32
  "typescript": "^5",
33
- "@modern-js/generator-utils": "3.1.20",
34
- "@modern-js/changeset-generator": "3.1.20",
35
- "@modern-js/plugin-i18n": "2.22.0",
36
- "@modern-js/packages-generator": "3.1.20",
37
- "@modern-js/base-generator": "3.1.20",
38
- "@modern-js/generator-common": "3.1.20",
39
- "@scripts/jest-config": "2.22.0",
40
- "@scripts/build": "2.22.0"
33
+ "@modern-js/base-generator": "3.1.22",
34
+ "@modern-js/generator-utils": "3.1.22",
35
+ "@modern-js/plugin-i18n": "2.23.0",
36
+ "@modern-js/packages-generator": "3.1.22",
37
+ "@modern-js/generator-common": "3.1.22",
38
+ "@modern-js/changeset-generator": "3.1.22",
39
+ "@scripts/jest-config": "2.23.0",
40
+ "@scripts/build": "2.23.0"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {
44
44
  "registry": "https://registry.npmjs.org/",
45
- "access": "public"
45
+ "access": "public",
46
+ "provenance": true
46
47
  },
47
48
  "types": "./src/index.ts",
48
49
  "scripts": {