@modern-js/repo-generator 3.1.20 → 3.1.21

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 +60 -48
  2. package/package.json +12 -12
package/dist/index.js CHANGED
@@ -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 {
@@ -124799,9 +124810,10 @@ var require_prettyInstructions = __commonJS({
124799
124810
  }, []);
124800
124811
  };
124801
124812
  var prettyInstructions = (appContext, config) => {
124802
- var _config_dev;
124813
+ var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
124803
124814
  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);
124815
+ 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);
124816
+ const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
124805
124817
  const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
124806
124818
  let message = "App running at:\n\n";
124807
124819
  if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
@@ -126094,7 +126106,7 @@ var mime = Import.lazy("../compiled/mime-types", require);
126094
126106
  var chokidar = Import.lazy("../compiled/chokidar", require);
126095
126107
  var inquirer = Import.lazy("../compiled/inquirer", require);
126096
126108
 
126097
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
126109
+ // ../../../../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
126110
  var import_lodash7 = __toESM(require_lodash3());
126099
126111
  var import_comment_json = __toESM(require_src2());
126100
126112
 
@@ -131937,7 +131949,7 @@ var FsAPI = /* @__PURE__ */ function() {
131937
131949
  return FsAPI2;
131938
131950
  }();
131939
131951
 
131940
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/index.js
131952
+ // ../../../../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
131953
  var import_lodash3 = __toESM(require_lodash3());
131942
131954
 
131943
131955
  // ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
@@ -141572,10 +141584,10 @@ var Schema = (
141572
141584
  }()
141573
141585
  );
141574
141586
 
141575
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
141587
+ // ../../../../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
141588
  var import_inquirer = __toESM(require_inquirer());
141577
141589
 
141578
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/transform.js
141590
+ // ../../../../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
141591
  var import_lodash2 = __toESM(require_lodash3());
141580
141592
  function asyncGeneratorStep20(gen, resolve, reject, _next, _throw, key, arg) {
141581
141593
  try {
@@ -141922,7 +141934,7 @@ function transformForm(schema) {
141922
141934
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
141923
141935
  }
141924
141936
 
141925
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
141937
+ // ../../../../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
141938
  function asyncGeneratorStep21(gen, resolve, reject, _next, _throw, key, arg) {
141927
141939
  try {
141928
141940
  var info = gen[key](arg);
@@ -142446,7 +142458,7 @@ function _prompt() {
142446
142458
  return _prompt.apply(this, arguments);
142447
142459
  }
142448
142460
 
142449
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/inquirer.js
142461
+ // ../../../../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
142462
  function asyncGeneratorStep22(gen, resolve, reject, _next, _throw, key, arg) {
142451
142463
  try {
142452
142464
  var info = gen[key](arg);
@@ -142686,7 +142698,7 @@ var CLIReader = /* @__PURE__ */ function() {
142686
142698
  return CLIReader2;
142687
142699
  }();
142688
142700
 
142689
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/index.js
142701
+ // ../../../../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
142702
  function asyncGeneratorStep23(gen, resolve, reject, _next, _throw, key, arg) {
142691
142703
  try {
142692
142704
  var info = gen[key](arg);
@@ -142904,7 +142916,7 @@ var FormilyAPI = /* @__PURE__ */ function() {
142904
142916
  return FormilyAPI2;
142905
142917
  }();
142906
142918
 
142907
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
142919
+ // ../../../../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
142920
  var import_inquirer3 = __toESM(require_inquirer2());
142909
142921
 
142910
142922
  // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
@@ -142983,7 +142995,7 @@ var I18n = class {
142983
142995
  }
142984
142996
  };
142985
142997
 
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
142998
+ // ../../../../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
142999
  var ZH_LOCALE = {
142988
143000
  environment: {
142989
143001
  node_version: "请升级 Node 版本至 LIS",
@@ -143010,7 +143022,7 @@ var ZH_LOCALE = {
143010
143022
  }
143011
143023
  };
143012
143024
 
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
143025
+ // ../../../../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
143026
  var EN_LOCALE = {
143015
143027
  environment: {
143016
143028
  node_version: "please upgrade node to lts version",
@@ -143037,14 +143049,14 @@ var EN_LOCALE = {
143037
143049
  }
143038
143050
  };
143039
143051
 
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
143052
+ // ../../../../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
143053
  var i18n = new I18n();
143042
143054
  var localeKeys = i18n.init("zh", {
143043
143055
  zh: ZH_LOCALE,
143044
143056
  en: EN_LOCALE
143045
143057
  });
143046
143058
 
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
143059
+ // ../../../../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
143060
  var import_lodash6 = __toESM(require_lodash3());
143049
143061
  function asyncGeneratorStep24(gen, resolve, reject, _next, _throw, key, arg) {
143050
143062
  try {
@@ -143253,7 +143265,7 @@ function transformInquirerSchema(questions) {
143253
143265
  return questions;
143254
143266
  }
143255
143267
 
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
143268
+ // ../../../../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
143269
  var import_path10 = __toESM(require("path"));
143258
143270
  function asyncGeneratorStep25(gen, resolve, reject, _next, _throw, key, arg) {
143259
143271
  try {
@@ -143517,7 +143529,7 @@ function _checkUseNvm() {
143517
143529
  return _checkUseNvm.apply(this, arguments);
143518
143530
  }
143519
143531
 
143520
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
143532
+ // ../../../../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
143533
  function _array_like_to_array2(arr, len) {
143522
143534
  if (len == null || len > arr.length)
143523
143535
  len = arr.length;
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.21",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -29,17 +29,17 @@
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.21",
33
+ "@modern-js/module-generator": "3.1.21",
34
+ "@modern-js/monorepo-generator": "3.1.21",
35
+ "@modern-js/mwa-generator": "3.1.21",
36
+ "@modern-js/doc-generator": "3.1.21",
37
+ "@modern-js/generator-utils": "3.1.21",
38
+ "@modern-js/generator-plugin": "3.1.21",
39
+ "@modern-js/base-generator": "3.1.21",
40
+ "@modern-js/utils": "2.22.1",
41
+ "@scripts/build": "2.22.1",
42
+ "@scripts/jest-config": "2.22.1"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "publishConfig": {