@modern-js/server-generator 3.1.39 → 3.2.0

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 +81 -65
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -12240,7 +12240,7 @@ var require_js_yaml = __commonJS({
12240
12240
  var require_debug = __commonJS({
12241
12241
  "../../../toolkit/utils/dist/compiled/debug/index.js"(exports, module2) {
12242
12242
  (() => {
12243
- var e = { 20: (e2, t2, r2) => {
12243
+ var e = { 434: (e2, t2, r2) => {
12244
12244
  t2.formatArgs = formatArgs;
12245
12245
  t2.save = save;
12246
12246
  t2.load = load;
@@ -12314,7 +12314,7 @@ var require_debug = __commonJS({
12314
12314
  } catch (e3) {
12315
12315
  }
12316
12316
  }
12317
- e2.exports = r2(530)(t2);
12317
+ e2.exports = r2(290)(t2);
12318
12318
  const { formatters: s } = e2.exports;
12319
12319
  s.j = function(e3) {
12320
12320
  try {
@@ -12323,7 +12323,7 @@ var require_debug = __commonJS({
12323
12323
  return "[UnexpectedJSONParseError]: " + e4.message;
12324
12324
  }
12325
12325
  };
12326
- }, 530: (e2, t2, r2) => {
12326
+ }, 290: (e2, t2, r2) => {
12327
12327
  function setup(e3) {
12328
12328
  createDebug.debug = createDebug;
12329
12329
  createDebug.default = createDebug;
@@ -12473,13 +12473,13 @@ var require_debug = __commonJS({
12473
12473
  return createDebug;
12474
12474
  }
12475
12475
  e2.exports = setup;
12476
- }, 731: (e2, t2, r2) => {
12476
+ }, 372: (e2, t2, r2) => {
12477
12477
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
12478
- e2.exports = r2(20);
12478
+ e2.exports = r2(434);
12479
12479
  } else {
12480
- e2.exports = r2(689);
12480
+ e2.exports = r2(970);
12481
12481
  }
12482
- }, 689: (e2, t2, r2) => {
12482
+ }, 970: (e2, t2, r2) => {
12483
12483
  const s = r2(224);
12484
12484
  const n = r2(837);
12485
12485
  t2.init = init;
@@ -12492,7 +12492,7 @@ var require_debug = __commonJS({
12492
12492
  }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
12493
12493
  t2.colors = [6, 2, 3, 4, 5, 1];
12494
12494
  try {
12495
- const e3 = r2(242);
12495
+ const e3 = r2(332);
12496
12496
  if (e3 && (e3.stderr || e3).level >= 2) {
12497
12497
  t2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
12498
12498
  }
@@ -12554,7 +12554,7 @@ var require_debug = __commonJS({
12554
12554
  e3.inspectOpts[r3[s2]] = t2.inspectOpts[r3[s2]];
12555
12555
  }
12556
12556
  }
12557
- e2.exports = r2(530)(t2);
12557
+ e2.exports = r2(290)(t2);
12558
12558
  const { formatters: o } = e2.exports;
12559
12559
  o.o = function(e3) {
12560
12560
  this.inspectOpts.colors = this.useColors;
@@ -12564,13 +12564,14 @@ var require_debug = __commonJS({
12564
12564
  this.inspectOpts.colors = this.useColors;
12565
12565
  return n.inspect(e3, this.inspectOpts);
12566
12566
  };
12567
- }, 975: (e2) => {
12567
+ }, 419: (e2) => {
12568
12568
  "use strict";
12569
- e2.exports = (e3, t2 = process.argv) => {
12569
+ e2.exports = (e3, t2) => {
12570
+ t2 = t2 || process.argv;
12570
12571
  const r2 = e3.startsWith("-") ? "" : e3.length === 1 ? "-" : "--";
12571
12572
  const s = t2.indexOf(r2 + e3);
12572
12573
  const n = t2.indexOf("--");
12573
- return s !== -1 && (n === -1 || s < n);
12574
+ return s !== -1 && (n === -1 ? true : s < n);
12574
12575
  };
12575
12576
  }, 367: (e2) => {
12576
12577
  var t2 = 1e3;
@@ -12679,26 +12680,19 @@ var require_debug = __commonJS({
12679
12680
  var n2 = t3 >= r3 * 1.5;
12680
12681
  return Math.round(e3 / r3) + " " + s2 + (n2 ? "s" : "");
12681
12682
  }
12682
- }, 242: (e2, t2, r2) => {
12683
+ }, 332: (e2, t2, r2) => {
12683
12684
  "use strict";
12684
12685
  const s = r2(37);
12685
- const n = r2(224);
12686
- const o = r2(975);
12687
- const { env: a } = process;
12688
- let c;
12689
- if (o("no-color") || o("no-colors") || o("color=false") || o("color=never")) {
12690
- c = 0;
12691
- } else if (o("color") || o("colors") || o("color=true") || o("color=always")) {
12692
- c = 1;
12686
+ const n = r2(419);
12687
+ const o = process.env;
12688
+ let a;
12689
+ if (n("no-color") || n("no-colors") || n("color=false")) {
12690
+ a = false;
12691
+ } else if (n("color") || n("colors") || n("color=true") || n("color=always")) {
12692
+ a = true;
12693
12693
  }
12694
- if ("FORCE_COLOR" in a) {
12695
- if (a.FORCE_COLOR === "true") {
12696
- c = 1;
12697
- } else if (a.FORCE_COLOR === "false") {
12698
- c = 0;
12699
- } else {
12700
- c = a.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(a.FORCE_COLOR, 10), 3);
12701
- }
12694
+ if ("FORCE_COLOR" in o) {
12695
+ a = o.FORCE_COLOR.length === 0 || parseInt(o.FORCE_COLOR, 10) !== 0;
12702
12696
  }
12703
12697
  function translateLevel(e3) {
12704
12698
  if (e3 === 0) {
@@ -12706,67 +12700,67 @@ var require_debug = __commonJS({
12706
12700
  }
12707
12701
  return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
12708
12702
  }
12709
- function supportsColor(e3, t3) {
12710
- if (c === 0) {
12703
+ function supportsColor(e3) {
12704
+ if (a === false) {
12711
12705
  return 0;
12712
12706
  }
12713
- if (o("color=16m") || o("color=full") || o("color=truecolor")) {
12707
+ if (n("color=16m") || n("color=full") || n("color=truecolor")) {
12714
12708
  return 3;
12715
12709
  }
12716
- if (o("color=256")) {
12710
+ if (n("color=256")) {
12717
12711
  return 2;
12718
12712
  }
12719
- if (e3 && !t3 && c === void 0) {
12713
+ if (e3 && !e3.isTTY && a !== true) {
12720
12714
  return 0;
12721
12715
  }
12722
- const r3 = c || 0;
12723
- if (a.TERM === "dumb") {
12724
- return r3;
12725
- }
12716
+ const t3 = a ? 1 : 0;
12726
12717
  if (process.platform === "win32") {
12727
12718
  const e4 = s.release().split(".");
12728
- if (Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
12719
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
12729
12720
  return Number(e4[2]) >= 14931 ? 3 : 2;
12730
12721
  }
12731
12722
  return 1;
12732
12723
  }
12733
- if ("CI" in a) {
12734
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((e4) => e4 in a) || a.CI_NAME === "codeship") {
12724
+ if ("CI" in o) {
12725
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((e4) => e4 in o) || o.CI_NAME === "codeship") {
12735
12726
  return 1;
12736
12727
  }
12737
- return r3;
12728
+ return t3;
12738
12729
  }
12739
- if ("TEAMCITY_VERSION" in a) {
12740
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION) ? 1 : 0;
12730
+ if ("TEAMCITY_VERSION" in o) {
12731
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION) ? 1 : 0;
12741
12732
  }
12742
- if (a.COLORTERM === "truecolor") {
12733
+ if (o.COLORTERM === "truecolor") {
12743
12734
  return 3;
12744
12735
  }
12745
- if ("TERM_PROGRAM" in a) {
12746
- const e4 = parseInt((a.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
12747
- switch (a.TERM_PROGRAM) {
12736
+ if ("TERM_PROGRAM" in o) {
12737
+ const e4 = parseInt((o.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
12738
+ switch (o.TERM_PROGRAM) {
12748
12739
  case "iTerm.app":
12749
12740
  return e4 >= 3 ? 3 : 2;
12750
12741
  case "Apple_Terminal":
12751
12742
  return 2;
12752
12743
  }
12753
12744
  }
12754
- if (/-256(color)?$/i.test(a.TERM)) {
12745
+ if (/-256(color)?$/i.test(o.TERM)) {
12755
12746
  return 2;
12756
12747
  }
12757
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)) {
12748
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)) {
12758
12749
  return 1;
12759
12750
  }
12760
- if ("COLORTERM" in a) {
12751
+ if ("COLORTERM" in o) {
12761
12752
  return 1;
12762
12753
  }
12763
- return r3;
12754
+ if (o.TERM === "dumb") {
12755
+ return t3;
12756
+ }
12757
+ return t3;
12764
12758
  }
12765
12759
  function getSupportLevel(e3) {
12766
- const t3 = supportsColor(e3, e3 && e3.isTTY);
12760
+ const t3 = supportsColor(e3);
12767
12761
  return translateLevel(t3);
12768
12762
  }
12769
- e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, n.isatty(1))), stderr: translateLevel(supportsColor(true, n.isatty(2))) };
12763
+ e2.exports = { supportsColor: getSupportLevel, stdout: getSupportLevel(process.stdout), stderr: getSupportLevel(process.stderr) };
12770
12764
  }, 37: (e2) => {
12771
12765
  "use strict";
12772
12766
  e2.exports = require("os");
@@ -12796,7 +12790,7 @@ var require_debug = __commonJS({
12796
12790
  }
12797
12791
  if (typeof __nccwpck_require__ !== "undefined")
12798
12792
  __nccwpck_require__.ab = __dirname + "/";
12799
- var r = __nccwpck_require__(731);
12793
+ var r = __nccwpck_require__(372);
12800
12794
  module2.exports = r;
12801
12795
  })();
12802
12796
  }
@@ -36306,6 +36300,27 @@ var require_watch = __commonJS({
36306
36300
  }
36307
36301
  });
36308
36302
 
36303
+ // ../../../toolkit/utils/dist/cjs/cli/config.js
36304
+ var require_config3 = __commonJS({
36305
+ "../../../toolkit/utils/dist/cjs/cli/config.js"(exports) {
36306
+ "use strict";
36307
+ Object.defineProperty(exports, "__esModule", {
36308
+ value: true
36309
+ });
36310
+ Object.defineProperty(exports, "isOverriddenConfigKey", {
36311
+ enumerable: true,
36312
+ get: function() {
36313
+ return isOverriddenConfigKey;
36314
+ }
36315
+ });
36316
+ var isOverriddenConfigKey = (key) => [
36317
+ "removeConsole",
36318
+ "enableInlineScripts",
36319
+ "enableInlineStyles"
36320
+ ].includes(key);
36321
+ }
36322
+ });
36323
+
36309
36324
  // ../../../toolkit/utils/dist/cjs/cli/index.js
36310
36325
  var require_cli = __commonJS({
36311
36326
  "../../../toolkit/utils/dist/cjs/cli/index.js"(exports) {
@@ -36333,6 +36348,7 @@ var require_cli = __commonJS({
36333
36348
  _export_star._(require_require(), exports);
36334
36349
  _export_star._(require_runtimeExports(), exports);
36335
36350
  _export_star._(require_watch(), exports);
36351
+ _export_star._(require_config3(), exports);
36336
36352
  }
36337
36353
  });
36338
36354
 
@@ -66201,7 +66217,7 @@ var require_type2 = __commonJS({
66201
66217
  });
66202
66218
 
66203
66219
  // ../../../../node_modules/.pnpm/@modern-js+utils@2.32.1_react-dom@18.2.0_react@18.2.0/node_modules/@modern-js/utils/dist/cjs/cli/is/config.js
66204
- var require_config3 = __commonJS({
66220
+ var require_config4 = __commonJS({
66205
66221
  "../../../../node_modules/.pnpm/@modern-js+utils@2.32.1_react-dom@18.2.0_react@18.2.0/node_modules/@modern-js/utils/dist/cjs/cli/is/config.js"(exports) {
66206
66222
  "use strict";
66207
66223
  Object.defineProperty(exports, "__esModule", {
@@ -66527,7 +66543,7 @@ var require_is2 = __commonJS({
66527
66543
  _export_star._(require_env2(), exports);
66528
66544
  _export_star._(require_platform2(), exports);
66529
66545
  _export_star._(require_type2(), exports);
66530
- _export_star._(require_config3(), exports);
66546
+ _export_star._(require_config4(), exports);
66531
66547
  _export_star._(require_project2(), exports);
66532
66548
  }
66533
66549
  });
@@ -66737,7 +66753,7 @@ var require_data2 = __commonJS({
66737
66753
  });
66738
66754
 
66739
66755
  // ../../../../node_modules/.pnpm/@modern-js+utils@2.32.1_react-dom@18.2.0_react@18.2.0/node_modules/@modern-js/utils/dist/cjs/cli/get/config.js
66740
- var require_config4 = __commonJS({
66756
+ var require_config5 = __commonJS({
66741
66757
  "../../../../node_modules/.pnpm/@modern-js+utils@2.32.1_react-dom@18.2.0_react@18.2.0/node_modules/@modern-js/utils/dist/cjs/cli/get/config.js"(exports) {
66742
66758
  "use strict";
66743
66759
  Object.defineProperty(exports, "__esModule", {
@@ -66796,7 +66812,7 @@ var require_get2 = __commonJS({
66796
66812
  var _constants = require_constants2();
66797
66813
  var _fs = require_fs2();
66798
66814
  _export_star._(require_data2(), exports);
66799
- _export_star._(require_config4(), exports);
66815
+ _export_star._(require_config5(), exports);
66800
66816
  var getServerConfig = async (appDirectory, configFile) => {
66801
66817
  const configFilePath = (0, _fs.findExists)(_constants.CONFIG_FILE_EXTENSIONS.map((extension) => _path.default.resolve(appDirectory, `${configFile}${extension}`)));
66802
66818
  return configFilePath;
@@ -84211,7 +84227,7 @@ var require_Subscription = __commonJS({
84211
84227
  });
84212
84228
 
84213
84229
  // ../../../../node_modules/.pnpm/rxjs@7.8.0/node_modules/rxjs/dist/cjs/internal/config.js
84214
- var require_config5 = __commonJS({
84230
+ var require_config6 = __commonJS({
84215
84231
  "../../../../node_modules/.pnpm/rxjs@7.8.0/node_modules/rxjs/dist/cjs/internal/config.js"(exports) {
84216
84232
  "use strict";
84217
84233
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -84285,7 +84301,7 @@ var require_reportUnhandledError = __commonJS({
84285
84301
  "use strict";
84286
84302
  Object.defineProperty(exports, "__esModule", { value: true });
84287
84303
  exports.reportUnhandledError = void 0;
84288
- var config_1 = require_config5();
84304
+ var config_1 = require_config6();
84289
84305
  var timeoutProvider_1 = require_timeoutProvider();
84290
84306
  function reportUnhandledError(err) {
84291
84307
  timeoutProvider_1.timeoutProvider.setTimeout(function() {
@@ -84347,7 +84363,7 @@ var require_errorContext = __commonJS({
84347
84363
  "use strict";
84348
84364
  Object.defineProperty(exports, "__esModule", { value: true });
84349
84365
  exports.captureError = exports.errorContext = void 0;
84350
- var config_1 = require_config5();
84366
+ var config_1 = require_config6();
84351
84367
  var context = null;
84352
84368
  function errorContext(cb) {
84353
84369
  if (config_1.config.useDeprecatedSynchronousErrorHandling) {
@@ -84407,7 +84423,7 @@ var require_Subscriber = __commonJS({
84407
84423
  exports.EMPTY_OBSERVER = exports.SafeSubscriber = exports.Subscriber = void 0;
84408
84424
  var isFunction_1 = require_isFunction2();
84409
84425
  var Subscription_1 = require_Subscription();
84410
- var config_1 = require_config5();
84426
+ var config_1 = require_config6();
84411
84427
  var reportUnhandledError_1 = require_reportUnhandledError();
84412
84428
  var noop_1 = require_noop();
84413
84429
  var NotificationFactories_1 = require_NotificationFactories();
@@ -84648,7 +84664,7 @@ var require_Observable = __commonJS({
84648
84664
  var Subscription_1 = require_Subscription();
84649
84665
  var observable_1 = require_observable();
84650
84666
  var pipe_1 = require_pipe();
84651
- var config_1 = require_config5();
84667
+ var config_1 = require_config6();
84652
84668
  var isFunction_1 = require_isFunction2();
84653
84669
  var errorContext_1 = require_errorContext();
84654
84670
  var Observable = function() {
@@ -93127,7 +93143,7 @@ var require_cjs3 = __commonJS({
93127
93143
  return never_2.NEVER;
93128
93144
  } });
93129
93145
  __exportStar(require_types(), exports);
93130
- var config_1 = require_config5();
93146
+ var config_1 = require_config6();
93131
93147
  Object.defineProperty(exports, "config", { enumerable: true, get: function() {
93132
93148
  return config_1.config;
93133
93149
  } });
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.39",
18
+ "version": "3.2.0",
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
- "@modern-js/generator-common": "3.1.39",
35
- "@scripts/build": "2.33.1",
36
- "@scripts/jest-config": "2.33.1",
37
- "@modern-js/generator-utils": "3.1.39",
38
- "@modern-js/dependence-generator": "3.1.39"
34
+ "@modern-js/generator-common": "3.2.0",
35
+ "@scripts/jest-config": "2.34.0",
36
+ "@modern-js/dependence-generator": "3.2.0",
37
+ "@scripts/build": "2.34.0",
38
+ "@modern-js/generator-utils": "3.2.0"
39
39
  },
40
40
  "sideEffects": false,
41
41
  "publishConfig": {