@modern-js/packages-generator 3.1.39 → 3.2.1

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 +71 -55
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -100947,7 +100947,7 @@ var require_js_yaml2 = __commonJS({
100947
100947
  var require_debug2 = __commonJS({
100948
100948
  "../../../toolkit/utils/dist/compiled/debug/index.js"(exports, module2) {
100949
100949
  (() => {
100950
- var e = { 20: (e2, t2, r2) => {
100950
+ var e = { 434: (e2, t2, r2) => {
100951
100951
  t2.formatArgs = formatArgs;
100952
100952
  t2.save = save;
100953
100953
  t2.load = load;
@@ -101021,7 +101021,7 @@ var require_debug2 = __commonJS({
101021
101021
  } catch (e3) {
101022
101022
  }
101023
101023
  }
101024
- e2.exports = r2(530)(t2);
101024
+ e2.exports = r2(290)(t2);
101025
101025
  const { formatters: s } = e2.exports;
101026
101026
  s.j = function(e3) {
101027
101027
  try {
@@ -101030,7 +101030,7 @@ var require_debug2 = __commonJS({
101030
101030
  return "[UnexpectedJSONParseError]: " + e4.message;
101031
101031
  }
101032
101032
  };
101033
- }, 530: (e2, t2, r2) => {
101033
+ }, 290: (e2, t2, r2) => {
101034
101034
  function setup(e3) {
101035
101035
  createDebug.debug = createDebug;
101036
101036
  createDebug.default = createDebug;
@@ -101180,13 +101180,13 @@ var require_debug2 = __commonJS({
101180
101180
  return createDebug;
101181
101181
  }
101182
101182
  e2.exports = setup;
101183
- }, 731: (e2, t2, r2) => {
101183
+ }, 372: (e2, t2, r2) => {
101184
101184
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
101185
- e2.exports = r2(20);
101185
+ e2.exports = r2(434);
101186
101186
  } else {
101187
- e2.exports = r2(689);
101187
+ e2.exports = r2(970);
101188
101188
  }
101189
- }, 689: (e2, t2, r2) => {
101189
+ }, 970: (e2, t2, r2) => {
101190
101190
  const s = r2(224);
101191
101191
  const n = r2(837);
101192
101192
  t2.init = init;
@@ -101199,7 +101199,7 @@ var require_debug2 = __commonJS({
101199
101199
  }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
101200
101200
  t2.colors = [6, 2, 3, 4, 5, 1];
101201
101201
  try {
101202
- const e3 = r2(242);
101202
+ const e3 = r2(332);
101203
101203
  if (e3 && (e3.stderr || e3).level >= 2) {
101204
101204
  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];
101205
101205
  }
@@ -101261,7 +101261,7 @@ var require_debug2 = __commonJS({
101261
101261
  e3.inspectOpts[r3[s2]] = t2.inspectOpts[r3[s2]];
101262
101262
  }
101263
101263
  }
101264
- e2.exports = r2(530)(t2);
101264
+ e2.exports = r2(290)(t2);
101265
101265
  const { formatters: o } = e2.exports;
101266
101266
  o.o = function(e3) {
101267
101267
  this.inspectOpts.colors = this.useColors;
@@ -101271,13 +101271,14 @@ var require_debug2 = __commonJS({
101271
101271
  this.inspectOpts.colors = this.useColors;
101272
101272
  return n.inspect(e3, this.inspectOpts);
101273
101273
  };
101274
- }, 975: (e2) => {
101274
+ }, 419: (e2) => {
101275
101275
  "use strict";
101276
- e2.exports = (e3, t2 = process.argv) => {
101276
+ e2.exports = (e3, t2) => {
101277
+ t2 = t2 || process.argv;
101277
101278
  const r2 = e3.startsWith("-") ? "" : e3.length === 1 ? "-" : "--";
101278
101279
  const s = t2.indexOf(r2 + e3);
101279
101280
  const n = t2.indexOf("--");
101280
- return s !== -1 && (n === -1 || s < n);
101281
+ return s !== -1 && (n === -1 ? true : s < n);
101281
101282
  };
101282
101283
  }, 367: (e2) => {
101283
101284
  var t2 = 1e3;
@@ -101386,26 +101387,19 @@ var require_debug2 = __commonJS({
101386
101387
  var n2 = t3 >= r3 * 1.5;
101387
101388
  return Math.round(e3 / r3) + " " + s2 + (n2 ? "s" : "");
101388
101389
  }
101389
- }, 242: (e2, t2, r2) => {
101390
+ }, 332: (e2, t2, r2) => {
101390
101391
  "use strict";
101391
101392
  const s = r2(37);
101392
- const n = r2(224);
101393
- const o = r2(975);
101394
- const { env: a } = process;
101395
- let c;
101396
- if (o("no-color") || o("no-colors") || o("color=false") || o("color=never")) {
101397
- c = 0;
101398
- } else if (o("color") || o("colors") || o("color=true") || o("color=always")) {
101399
- c = 1;
101393
+ const n = r2(419);
101394
+ const o = process.env;
101395
+ let a;
101396
+ if (n("no-color") || n("no-colors") || n("color=false")) {
101397
+ a = false;
101398
+ } else if (n("color") || n("colors") || n("color=true") || n("color=always")) {
101399
+ a = true;
101400
101400
  }
101401
- if ("FORCE_COLOR" in a) {
101402
- if (a.FORCE_COLOR === "true") {
101403
- c = 1;
101404
- } else if (a.FORCE_COLOR === "false") {
101405
- c = 0;
101406
- } else {
101407
- c = a.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(a.FORCE_COLOR, 10), 3);
101408
- }
101401
+ if ("FORCE_COLOR" in o) {
101402
+ a = o.FORCE_COLOR.length === 0 || parseInt(o.FORCE_COLOR, 10) !== 0;
101409
101403
  }
101410
101404
  function translateLevel(e3) {
101411
101405
  if (e3 === 0) {
@@ -101413,67 +101407,67 @@ var require_debug2 = __commonJS({
101413
101407
  }
101414
101408
  return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
101415
101409
  }
101416
- function supportsColor(e3, t3) {
101417
- if (c === 0) {
101410
+ function supportsColor(e3) {
101411
+ if (a === false) {
101418
101412
  return 0;
101419
101413
  }
101420
- if (o("color=16m") || o("color=full") || o("color=truecolor")) {
101414
+ if (n("color=16m") || n("color=full") || n("color=truecolor")) {
101421
101415
  return 3;
101422
101416
  }
101423
- if (o("color=256")) {
101417
+ if (n("color=256")) {
101424
101418
  return 2;
101425
101419
  }
101426
- if (e3 && !t3 && c === void 0) {
101420
+ if (e3 && !e3.isTTY && a !== true) {
101427
101421
  return 0;
101428
101422
  }
101429
- const r3 = c || 0;
101430
- if (a.TERM === "dumb") {
101431
- return r3;
101432
- }
101423
+ const t3 = a ? 1 : 0;
101433
101424
  if (process.platform === "win32") {
101434
101425
  const e4 = s.release().split(".");
101435
- if (Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
101426
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
101436
101427
  return Number(e4[2]) >= 14931 ? 3 : 2;
101437
101428
  }
101438
101429
  return 1;
101439
101430
  }
101440
- if ("CI" in a) {
101441
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((e4) => e4 in a) || a.CI_NAME === "codeship") {
101431
+ if ("CI" in o) {
101432
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((e4) => e4 in o) || o.CI_NAME === "codeship") {
101442
101433
  return 1;
101443
101434
  }
101444
- return r3;
101435
+ return t3;
101445
101436
  }
101446
- if ("TEAMCITY_VERSION" in a) {
101447
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION) ? 1 : 0;
101437
+ if ("TEAMCITY_VERSION" in o) {
101438
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION) ? 1 : 0;
101448
101439
  }
101449
- if (a.COLORTERM === "truecolor") {
101440
+ if (o.COLORTERM === "truecolor") {
101450
101441
  return 3;
101451
101442
  }
101452
- if ("TERM_PROGRAM" in a) {
101453
- const e4 = parseInt((a.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
101454
- switch (a.TERM_PROGRAM) {
101443
+ if ("TERM_PROGRAM" in o) {
101444
+ const e4 = parseInt((o.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
101445
+ switch (o.TERM_PROGRAM) {
101455
101446
  case "iTerm.app":
101456
101447
  return e4 >= 3 ? 3 : 2;
101457
101448
  case "Apple_Terminal":
101458
101449
  return 2;
101459
101450
  }
101460
101451
  }
101461
- if (/-256(color)?$/i.test(a.TERM)) {
101452
+ if (/-256(color)?$/i.test(o.TERM)) {
101462
101453
  return 2;
101463
101454
  }
101464
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)) {
101455
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)) {
101465
101456
  return 1;
101466
101457
  }
101467
- if ("COLORTERM" in a) {
101458
+ if ("COLORTERM" in o) {
101468
101459
  return 1;
101469
101460
  }
101470
- return r3;
101461
+ if (o.TERM === "dumb") {
101462
+ return t3;
101463
+ }
101464
+ return t3;
101471
101465
  }
101472
101466
  function getSupportLevel(e3) {
101473
- const t3 = supportsColor(e3, e3 && e3.isTTY);
101467
+ const t3 = supportsColor(e3);
101474
101468
  return translateLevel(t3);
101475
101469
  }
101476
- e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, n.isatty(1))), stderr: translateLevel(supportsColor(true, n.isatty(2))) };
101470
+ e2.exports = { supportsColor: getSupportLevel, stdout: getSupportLevel(process.stdout), stderr: getSupportLevel(process.stderr) };
101477
101471
  }, 37: (e2) => {
101478
101472
  "use strict";
101479
101473
  e2.exports = require("os");
@@ -101503,7 +101497,7 @@ var require_debug2 = __commonJS({
101503
101497
  }
101504
101498
  if (typeof __nccwpck_require__ !== "undefined")
101505
101499
  __nccwpck_require__.ab = __dirname + "/";
101506
- var r = __nccwpck_require__(731);
101500
+ var r = __nccwpck_require__(372);
101507
101501
  module2.exports = r;
101508
101502
  })();
101509
101503
  }
@@ -119341,6 +119335,27 @@ var require_watch2 = __commonJS({
119341
119335
  }
119342
119336
  });
119343
119337
 
119338
+ // ../../../toolkit/utils/dist/cjs/cli/config.js
119339
+ var require_config6 = __commonJS({
119340
+ "../../../toolkit/utils/dist/cjs/cli/config.js"(exports) {
119341
+ "use strict";
119342
+ Object.defineProperty(exports, "__esModule", {
119343
+ value: true
119344
+ });
119345
+ Object.defineProperty(exports, "isOverriddenConfigKey", {
119346
+ enumerable: true,
119347
+ get: function() {
119348
+ return isOverriddenConfigKey;
119349
+ }
119350
+ });
119351
+ var isOverriddenConfigKey = (key) => [
119352
+ "removeConsole",
119353
+ "enableInlineScripts",
119354
+ "enableInlineStyles"
119355
+ ].includes(key);
119356
+ }
119357
+ });
119358
+
119344
119359
  // ../../../toolkit/utils/dist/cjs/cli/index.js
119345
119360
  var require_cli2 = __commonJS({
119346
119361
  "../../../toolkit/utils/dist/cjs/cli/index.js"(exports) {
@@ -119368,6 +119383,7 @@ var require_cli2 = __commonJS({
119368
119383
  _export_star._(require_require2(), exports);
119369
119384
  _export_star._(require_runtimeExports2(), exports);
119370
119385
  _export_star._(require_watch2(), exports);
119386
+ _export_star._(require_config6(), exports);
119371
119387
  }
119372
119388
  });
119373
119389
 
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.1",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -30,10 +30,10 @@
30
30
  "@types/node": "^14",
31
31
  "jest": "^29",
32
32
  "typescript": "^5",
33
- "@scripts/build": "2.33.1",
34
- "@modern-js/generator-utils": "3.1.39",
35
- "@modern-js/generator-common": "3.1.39",
36
- "@scripts/jest-config": "2.33.1"
33
+ "@scripts/jest-config": "2.35.0",
34
+ "@modern-js/generator-utils": "3.2.1",
35
+ "@modern-js/generator-common": "3.2.1",
36
+ "@scripts/build": "2.35.0"
37
37
  },
38
38
  "sideEffects": false,
39
39
  "publishConfig": {