@modern-js/bff-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 +6 -6
package/dist/index.js CHANGED
@@ -37272,9 +37272,10 @@ var require_prettyInstructions = __commonJS({
37272
37272
  }, []);
37273
37273
  };
37274
37274
  var prettyInstructions = (appContext, config) => {
37275
- var _config_dev;
37275
+ var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
37276
37276
  const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
37277
- 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);
37277
+ 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);
37278
+ const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
37278
37279
  const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
37279
37280
  let message = "App running at:\n\n";
37280
37281
  if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
@@ -116385,9 +116386,9 @@ var require_ms = __commonJS({
116385
116386
  }
116386
116387
  });
116387
116388
 
116388
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
116389
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js
116389
116390
  var require_common3 = __commonJS({
116390
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module2) {
116391
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module2) {
116391
116392
  function setup(env) {
116392
116393
  createDebug.debug = createDebug;
116393
116394
  createDebug.default = createDebug;
@@ -116548,9 +116549,9 @@ var require_common3 = __commonJS({
116548
116549
  }
116549
116550
  });
116550
116551
 
116551
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
116552
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js
116552
116553
  var require_browser = __commonJS({
116553
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports, module2) {
116554
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module2) {
116554
116555
  exports.formatArgs = formatArgs;
116555
116556
  exports.save = save;
116556
116557
  exports.load = load;
@@ -116730,27 +116731,29 @@ var require_has_flag = __commonJS({
116730
116731
  }
116731
116732
  });
116732
116733
 
116733
- // ../../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
116734
+ // ../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
116734
116735
  var require_supports_color = __commonJS({
116735
- "../../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
116736
+ "../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
116736
116737
  "use strict";
116737
116738
  var os = require("os");
116738
116739
  var tty = require("tty");
116739
116740
  var hasFlag = require_has_flag();
116740
116741
  var { env } = process;
116741
- var forceColor;
116742
+ var flagForceColor;
116742
116743
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
116743
- forceColor = 0;
116744
+ flagForceColor = 0;
116744
116745
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
116745
- forceColor = 1;
116746
+ flagForceColor = 1;
116746
116747
  }
116747
- if ("FORCE_COLOR" in env) {
116748
- if (env.FORCE_COLOR === "true") {
116749
- forceColor = 1;
116750
- } else if (env.FORCE_COLOR === "false") {
116751
- forceColor = 0;
116752
- } else {
116753
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
116748
+ function envForceColor() {
116749
+ if ("FORCE_COLOR" in env) {
116750
+ if (env.FORCE_COLOR === "true") {
116751
+ return 1;
116752
+ }
116753
+ if (env.FORCE_COLOR === "false") {
116754
+ return 0;
116755
+ }
116756
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
116754
116757
  }
116755
116758
  }
116756
116759
  function translateLevel(level) {
@@ -116764,15 +116767,22 @@ var require_supports_color = __commonJS({
116764
116767
  has16m: level >= 3
116765
116768
  };
116766
116769
  }
116767
- function supportsColor(haveStream, streamIsTTY) {
116770
+ function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
116771
+ const noFlagForceColor = envForceColor();
116772
+ if (noFlagForceColor !== void 0) {
116773
+ flagForceColor = noFlagForceColor;
116774
+ }
116775
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
116768
116776
  if (forceColor === 0) {
116769
116777
  return 0;
116770
116778
  }
116771
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
116772
- return 3;
116773
- }
116774
- if (hasFlag("color=256")) {
116775
- return 2;
116779
+ if (sniffFlags) {
116780
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
116781
+ return 3;
116782
+ }
116783
+ if (hasFlag("color=256")) {
116784
+ return 2;
116785
+ }
116776
116786
  }
116777
116787
  if (haveStream && !streamIsTTY && forceColor === void 0) {
116778
116788
  return 0;
@@ -116789,7 +116799,7 @@ var require_supports_color = __commonJS({
116789
116799
  return 1;
116790
116800
  }
116791
116801
  if ("CI" in env) {
116792
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
116802
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
116793
116803
  return 1;
116794
116804
  }
116795
116805
  return min;
@@ -116801,7 +116811,7 @@ var require_supports_color = __commonJS({
116801
116811
  return 3;
116802
116812
  }
116803
116813
  if ("TERM_PROGRAM" in env) {
116804
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
116814
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
116805
116815
  switch (env.TERM_PROGRAM) {
116806
116816
  case "iTerm.app":
116807
116817
  return version >= 3 ? 3 : 2;
@@ -116820,21 +116830,23 @@ var require_supports_color = __commonJS({
116820
116830
  }
116821
116831
  return min;
116822
116832
  }
116823
- function getSupportLevel(stream) {
116824
- const level = supportsColor(stream, stream && stream.isTTY);
116833
+ function getSupportLevel(stream, options = {}) {
116834
+ const level = supportsColor(stream, __spreadValues({
116835
+ streamIsTTY: stream && stream.isTTY
116836
+ }, options));
116825
116837
  return translateLevel(level);
116826
116838
  }
116827
116839
  module2.exports = {
116828
116840
  supportsColor: getSupportLevel,
116829
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
116830
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
116841
+ stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
116842
+ stderr: getSupportLevel({ isTTY: tty.isatty(2) })
116831
116843
  };
116832
116844
  }
116833
116845
  });
116834
116846
 
116835
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
116847
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js
116836
116848
  var require_node2 = __commonJS({
116837
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module2) {
116849
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module2) {
116838
116850
  var tty = require("tty");
116839
116851
  var util = require("util");
116840
116852
  exports.init = init;
@@ -117006,9 +117018,9 @@ var require_node2 = __commonJS({
117006
117018
  }
117007
117019
  });
117008
117020
 
117009
- // ../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
117021
+ // ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js
117010
117022
  var require_src3 = __commonJS({
117011
- "../../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module2) {
117023
+ "../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module2) {
117012
117024
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
117013
117025
  module2.exports = require_browser();
117014
117026
  } else {
@@ -118718,7 +118730,7 @@ var mime = Import.lazy("../compiled/mime-types", require);
118718
118730
  var chokidar = Import.lazy("../compiled/chokidar", require);
118719
118731
  var inquirer = Import.lazy("../compiled/inquirer", require);
118720
118732
 
118721
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
118733
+ // ../../../../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
118722
118734
  var import_lodash8 = __toESM(require_lodash4());
118723
118735
  var import_comment_json = __toESM(require_src2());
118724
118736
 
@@ -130819,10 +130831,10 @@ var Schema = (
130819
130831
  }()
130820
130832
  );
130821
130833
 
130822
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
130834
+ // ../../../../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
130823
130835
  var import_inquirer = __toESM(require_inquirer());
130824
130836
 
130825
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/transform.js
130837
+ // ../../../../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
130826
130838
  var import_lodash4 = __toESM(require_lodash4());
130827
130839
  function asyncGeneratorStep9(gen, resolve, reject, _next, _throw, key, arg) {
130828
130840
  try {
@@ -131169,7 +131181,7 @@ function transformForm(schema) {
131169
131181
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
131170
131182
  }
131171
131183
 
131172
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
131184
+ // ../../../../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
131173
131185
  function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
131174
131186
  try {
131175
131187
  var info = gen[key](arg);
@@ -131693,7 +131705,7 @@ function _prompt() {
131693
131705
  return _prompt.apply(this, arguments);
131694
131706
  }
131695
131707
 
131696
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/inquirer.js
131708
+ // ../../../../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
131697
131709
  function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
131698
131710
  try {
131699
131711
  var info = gen[key](arg);
@@ -131933,7 +131945,7 @@ var CLIReader = /* @__PURE__ */ function() {
131933
131945
  return CLIReader2;
131934
131946
  }();
131935
131947
 
131936
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
131948
+ // ../../../../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
131937
131949
  var import_inquirer2 = __toESM(require_inquirer2());
131938
131950
 
131939
131951
  // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
@@ -132012,7 +132024,7 @@ var I18n2 = class {
132012
132024
  }
132013
132025
  };
132014
132026
 
132015
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/zh.js
132027
+ // ../../../../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
132016
132028
  var ZH_LOCALE2 = {
132017
132029
  environment: {
132018
132030
  node_version: "请升级 Node 版本至 LIS",
@@ -132039,7 +132051,7 @@ var ZH_LOCALE2 = {
132039
132051
  }
132040
132052
  };
132041
132053
 
132042
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/en.js
132054
+ // ../../../../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
132043
132055
  var EN_LOCALE2 = {
132044
132056
  environment: {
132045
132057
  node_version: "please upgrade node to lts version",
@@ -132066,14 +132078,14 @@ var EN_LOCALE2 = {
132066
132078
  }
132067
132079
  };
132068
132080
 
132069
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/index.js
132081
+ // ../../../../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
132070
132082
  var i18n2 = new I18n2();
132071
132083
  var localeKeys2 = i18n2.init("zh", {
132072
132084
  zh: ZH_LOCALE2,
132073
132085
  en: EN_LOCALE2
132074
132086
  });
132075
132087
 
132076
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/transform.js
132088
+ // ../../../../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
132077
132089
  var import_lodash7 = __toESM(require_lodash4());
132078
132090
  function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
132079
132091
  try {
@@ -132282,7 +132294,7 @@ function transformInquirerSchema(questions) {
132282
132294
  return questions;
132283
132295
  }
132284
132296
 
132285
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/checkUseNvm.js
132297
+ // ../../../../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
132286
132298
  var import_path5 = __toESM(require("path"));
132287
132299
  function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
132288
132300
  try {
@@ -132546,7 +132558,7 @@ function _checkUseNvm() {
132546
132558
  return _checkUseNvm.apply(this, arguments);
132547
132559
  }
132548
132560
 
132549
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
132561
+ // ../../../../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
132550
132562
  function _array_like_to_array(arr, len) {
132551
132563
  if (len == null || len > arr.length)
132552
132564
  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
  "types": "./src/index.ts",
21
21
  "main": "./dist/index.js",
@@ -31,11 +31,11 @@
31
31
  "@types/node": "^14",
32
32
  "jest": "^29",
33
33
  "typescript": "^5",
34
- "@scripts/build": "2.22.0",
35
- "@scripts/jest-config": "2.22.0",
36
- "@modern-js/generator-common": "3.1.20",
37
- "@modern-js/plugin-i18n": "2.22.0",
38
- "@modern-js/generator-utils": "3.1.20"
34
+ "@scripts/build": "2.22.1",
35
+ "@scripts/jest-config": "2.22.1",
36
+ "@modern-js/generator-common": "3.1.21",
37
+ "@modern-js/generator-utils": "3.1.21",
38
+ "@modern-js/plugin-i18n": "2.22.1"
39
39
  },
40
40
  "sideEffects": false,
41
41
  "publishConfig": {