@modern-js/monorepo-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 +58 -46
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -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 {
@@ -117496,9 +117507,10 @@ var require_prettyInstructions = __commonJS({
117496
117507
  }, []);
117497
117508
  };
117498
117509
  var prettyInstructions = (appContext, config) => {
117499
- var _config_dev;
117510
+ var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
117500
117511
  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);
117512
+ 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);
117513
+ const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
117502
117514
  const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
117503
117515
  let message = "App running at:\n\n";
117504
117516
  if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
@@ -118335,7 +118347,7 @@ function _canUsePnpm() {
118335
118347
  return _canUsePnpm.apply(this, arguments);
118336
118348
  }
118337
118349
 
118338
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
118350
+ // ../../../../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
118351
  var import_lodash6 = __toESM(require_lodash2());
118340
118352
  var import_comment_json = __toESM(require_src2());
118341
118353
 
@@ -130259,10 +130271,10 @@ var Schema = (
130259
130271
  }()
130260
130272
  );
130261
130273
 
130262
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
130274
+ // ../../../../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
130275
  var import_inquirer = __toESM(require_inquirer());
130264
130276
 
130265
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/transform.js
130277
+ // ../../../../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
130278
  var import_lodash2 = __toESM(require_lodash2());
130267
130279
  function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
130268
130280
  try {
@@ -130609,7 +130621,7 @@ function transformForm(schema) {
130609
130621
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
130610
130622
  }
130611
130623
 
130612
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
130624
+ // ../../../../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
130625
  function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
130614
130626
  try {
130615
130627
  var info = gen[key](arg);
@@ -131133,7 +131145,7 @@ function _prompt() {
131133
131145
  return _prompt.apply(this, arguments);
131134
131146
  }
131135
131147
 
131136
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/inquirer.js
131148
+ // ../../../../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
131149
  function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
131138
131150
  try {
131139
131151
  var info = gen[key](arg);
@@ -131373,7 +131385,7 @@ var CLIReader = /* @__PURE__ */ function() {
131373
131385
  return CLIReader2;
131374
131386
  }();
131375
131387
 
131376
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
131388
+ // ../../../../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
131389
  var import_inquirer2 = __toESM(require_inquirer2());
131378
131390
 
131379
131391
  // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
@@ -131452,7 +131464,7 @@ var I18n = class {
131452
131464
  }
131453
131465
  };
131454
131466
 
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
131467
+ // ../../../../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
131468
  var ZH_LOCALE = {
131457
131469
  environment: {
131458
131470
  node_version: "请升级 Node 版本至 LIS",
@@ -131479,7 +131491,7 @@ var ZH_LOCALE = {
131479
131491
  }
131480
131492
  };
131481
131493
 
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
131494
+ // ../../../../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
131495
  var EN_LOCALE = {
131484
131496
  environment: {
131485
131497
  node_version: "please upgrade node to lts version",
@@ -131506,14 +131518,14 @@ var EN_LOCALE = {
131506
131518
  }
131507
131519
  };
131508
131520
 
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
131521
+ // ../../../../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
131522
  var i18n = new I18n();
131511
131523
  var localeKeys = i18n.init("zh", {
131512
131524
  zh: ZH_LOCALE,
131513
131525
  en: EN_LOCALE
131514
131526
  });
131515
131527
 
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
131528
+ // ../../../../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
131529
  var import_lodash5 = __toESM(require_lodash2());
131518
131530
  function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
131519
131531
  try {
@@ -131722,7 +131734,7 @@ function transformInquirerSchema(questions) {
131722
131734
  return questions;
131723
131735
  }
131724
131736
 
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
131737
+ // ../../../../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
131738
  var import_path5 = __toESM(require("path"));
131727
131739
  function asyncGeneratorStep14(gen, resolve, reject, _next, _throw, key, arg) {
131728
131740
  try {
@@ -131986,7 +131998,7 @@ function _checkUseNvm() {
131986
131998
  return _checkUseNvm.apply(this, arguments);
131987
131999
  }
131988
132000
 
131989
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
132001
+ // ../../../../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
132002
  function _array_like_to_array(arr, len) {
131991
132003
  if (len == null || len > arr.length)
131992
132004
  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": [
@@ -30,14 +30,14 @@
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.21",
34
+ "@modern-js/plugin-i18n": "2.22.1",
35
+ "@modern-js/packages-generator": "3.1.21",
36
+ "@modern-js/generator-utils": "3.1.21",
37
+ "@modern-js/generator-common": "3.1.21",
38
+ "@modern-js/changeset-generator": "3.1.21",
39
+ "@scripts/build": "2.22.1",
40
+ "@scripts/jest-config": "2.22.1"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {