piral-cli 1.3.3-beta.6187 → 1.3.3-beta.6201

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 (95) hide show
  1. package/lib/bundler.js +25 -1
  2. package/lib/bundler.js.map +1 -1
  3. package/lib/cli.js +5 -2
  4. package/lib/cli.js.map +1 -1
  5. package/lib/commands.js +24 -1
  6. package/lib/commands.js.map +1 -1
  7. package/lib/common/importmap.js +3 -3
  8. package/lib/common/importmap.js.map +1 -1
  9. package/lib/common/io.js +5 -2
  10. package/lib/common/io.js.map +1 -1
  11. package/lib/common/log.js +24 -1
  12. package/lib/common/log.js.map +1 -1
  13. package/lib/common/npm.js +13 -13
  14. package/lib/common/npm.js.map +1 -1
  15. package/lib/external/index.js +426 -230
  16. package/lib/inject.js +24 -1
  17. package/lib/inject.js.map +1 -1
  18. package/lib/{common/clients → npm-clients}/bun.js +5 -5
  19. package/lib/npm-clients/bun.js.map +1 -0
  20. package/lib/{common/clients → npm-clients}/index.js +31 -8
  21. package/lib/npm-clients/index.js.map +1 -0
  22. package/lib/{common/clients → npm-clients}/lerna.js +4 -4
  23. package/lib/npm-clients/lerna.js.map +1 -0
  24. package/lib/{common/clients → npm-clients}/npm.js +4 -4
  25. package/lib/npm-clients/npm.js.map +1 -0
  26. package/lib/{common/clients → npm-clients}/pnp.js +4 -4
  27. package/lib/npm-clients/pnp.js.map +1 -0
  28. package/lib/{common/clients → npm-clients}/pnpm.js +4 -4
  29. package/lib/npm-clients/pnpm.js.map +1 -0
  30. package/lib/{common/clients → npm-clients}/rush.js +5 -5
  31. package/lib/npm-clients/rush.js.map +1 -0
  32. package/lib/{common/clients → npm-clients}/yarn.js +4 -4
  33. package/lib/npm-clients/yarn.js.map +1 -0
  34. package/package.json +2 -2
  35. package/src/apps/build-pilet.test.ts +1 -0
  36. package/src/apps/build-piral.test.ts +19 -12
  37. package/src/apps/new-pilet.test.ts +120 -76
  38. package/src/apps/new-piral.test.ts +100 -77
  39. package/src/apps/pack-pilet.test.ts +2 -3
  40. package/src/apps/upgrade-pilet.test.ts +1 -0
  41. package/src/bundler.test.ts +8 -7
  42. package/src/bundler.ts +2 -1
  43. package/src/cli.ts +1 -1
  44. package/src/common/archive.test.ts +10 -7
  45. package/src/common/browser.test.ts +2 -1
  46. package/src/common/compatibility.test.ts +1 -0
  47. package/src/common/envs.test.ts +2 -1
  48. package/src/common/hash.test.ts +1 -0
  49. package/src/common/http.test.ts +73 -70
  50. package/src/common/importmap.test.ts +3 -2
  51. package/src/common/importmap.ts +1 -1
  52. package/src/common/info.test.ts +1 -0
  53. package/src/common/interactive.test.ts +2 -1
  54. package/src/common/io.ts +1 -1
  55. package/src/common/merge.test.ts +1 -0
  56. package/src/common/npm.test.ts +35 -37
  57. package/src/common/npm.ts +1 -1
  58. package/src/common/pack.test.ts +11 -10
  59. package/src/common/package.test.ts +131 -92
  60. package/src/common/parallel.test.ts +1 -0
  61. package/src/common/patches.test.ts +1 -0
  62. package/src/common/port.test.ts +2 -1
  63. package/src/common/rules.test.ts +4 -3
  64. package/src/common/url.test.ts +1 -0
  65. package/src/common/utils.test.ts +1 -0
  66. package/src/common/version.test.ts +1 -0
  67. package/src/external/index.test.ts +1 -0
  68. package/src/helpers.test.ts +1 -0
  69. package/src/injectors/pilet-injector.test.ts +6 -5
  70. package/src/injectors/piral-injector.test.ts +7 -6
  71. package/src/{common/clients → npm-clients}/bun.ts +5 -5
  72. package/src/{common/clients → npm-clients}/index.ts +1 -1
  73. package/src/{common/clients → npm-clients}/lerna.ts +4 -4
  74. package/src/{common/clients → npm-clients}/npm.ts +4 -4
  75. package/src/{common/clients → npm-clients}/pnp.ts +4 -4
  76. package/src/{common/clients → npm-clients}/pnpm.ts +4 -4
  77. package/src/{common/clients → npm-clients}/rush.ts +5 -5
  78. package/src/{common/clients → npm-clients}/yarn.ts +4 -4
  79. package/src/rules/pilet-has-externals-as-peers.test.ts +4 -3
  80. package/lib/common/clients/bun.js.map +0 -1
  81. package/lib/common/clients/index.js.map +0 -1
  82. package/lib/common/clients/lerna.js.map +0 -1
  83. package/lib/common/clients/npm.js.map +0 -1
  84. package/lib/common/clients/pnp.js.map +0 -1
  85. package/lib/common/clients/pnpm.js.map +0 -1
  86. package/lib/common/clients/rush.js.map +0 -1
  87. package/lib/common/clients/yarn.js.map +0 -1
  88. /package/lib/{common/clients → npm-clients}/bun.d.ts +0 -0
  89. /package/lib/{common/clients → npm-clients}/index.d.ts +0 -0
  90. /package/lib/{common/clients → npm-clients}/lerna.d.ts +0 -0
  91. /package/lib/{common/clients → npm-clients}/npm.d.ts +0 -0
  92. /package/lib/{common/clients → npm-clients}/pnp.d.ts +0 -0
  93. /package/lib/{common/clients → npm-clients}/pnpm.d.ts +0 -0
  94. /package/lib/{common/clients → npm-clients}/rush.d.ts +0 -0
  95. /package/lib/{common/clients → npm-clients}/yarn.d.ts +0 -0
@@ -58638,13 +58638,14 @@ var require_ms = __commonJS({
58638
58638
  var m = s * 60;
58639
58639
  var h = m * 60;
58640
58640
  var d = h * 24;
58641
+ var w = d * 7;
58641
58642
  var y = d * 365.25;
58642
58643
  module2.exports = function(val, options) {
58643
58644
  options = options || {};
58644
58645
  var type = typeof val;
58645
58646
  if (type === "string" && val.length > 0) {
58646
58647
  return parse(val);
58647
- } else if (type === "number" && isNaN(val) === false) {
58648
+ } else if (type === "number" && isFinite(val)) {
58648
58649
  return options.long ? fmtLong(val) : fmtShort(val);
58649
58650
  }
58650
58651
  throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
@@ -58654,7 +58655,7 @@ var require_ms = __commonJS({
58654
58655
  if (str.length > 100) {
58655
58656
  return;
58656
58657
  }
58657
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
58658
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
58658
58659
  if (!match) {
58659
58660
  return;
58660
58661
  }
@@ -58667,6 +58668,10 @@ var require_ms = __commonJS({
58667
58668
  case "yr":
58668
58669
  case "y":
58669
58670
  return n * y;
58671
+ case "weeks":
58672
+ case "week":
58673
+ case "w":
58674
+ return n * w;
58670
58675
  case "days":
58671
58676
  case "day":
58672
58677
  case "d":
@@ -58700,187 +58705,324 @@ var require_ms = __commonJS({
58700
58705
  }
58701
58706
  }
58702
58707
  function fmtShort(ms) {
58703
- if (ms >= d) {
58708
+ var msAbs = Math.abs(ms);
58709
+ if (msAbs >= d) {
58704
58710
  return Math.round(ms / d) + "d";
58705
58711
  }
58706
- if (ms >= h) {
58712
+ if (msAbs >= h) {
58707
58713
  return Math.round(ms / h) + "h";
58708
58714
  }
58709
- if (ms >= m) {
58715
+ if (msAbs >= m) {
58710
58716
  return Math.round(ms / m) + "m";
58711
58717
  }
58712
- if (ms >= s) {
58718
+ if (msAbs >= s) {
58713
58719
  return Math.round(ms / s) + "s";
58714
58720
  }
58715
58721
  return ms + "ms";
58716
58722
  }
58717
58723
  function fmtLong(ms) {
58718
- return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
58719
- }
58720
- function plural(ms, n, name) {
58721
- if (ms < n) {
58722
- return;
58724
+ var msAbs = Math.abs(ms);
58725
+ if (msAbs >= d) {
58726
+ return plural(ms, msAbs, d, "day");
58727
+ }
58728
+ if (msAbs >= h) {
58729
+ return plural(ms, msAbs, h, "hour");
58723
58730
  }
58724
- if (ms < n * 1.5) {
58725
- return Math.floor(ms / n) + " " + name;
58731
+ if (msAbs >= m) {
58732
+ return plural(ms, msAbs, m, "minute");
58726
58733
  }
58727
- return Math.ceil(ms / n) + " " + name + "s";
58734
+ if (msAbs >= s) {
58735
+ return plural(ms, msAbs, s, "second");
58736
+ }
58737
+ return ms + " ms";
58738
+ }
58739
+ function plural(ms, msAbs, n, name) {
58740
+ var isPlural = msAbs >= n * 1.5;
58741
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
58728
58742
  }
58729
58743
  }
58730
58744
  });
58731
58745
 
58732
- // ../../../node_modules/debug/src/debug.js
58733
- var require_debug = __commonJS({
58734
- "../../../node_modules/debug/src/debug.js"(exports, module2) {
58735
- exports = module2.exports = createDebug.debug = createDebug["default"] = createDebug;
58736
- exports.coerce = coerce;
58737
- exports.disable = disable;
58738
- exports.enable = enable;
58739
- exports.enabled = enabled;
58740
- exports.humanize = require_ms();
58741
- exports.names = [];
58742
- exports.skips = [];
58743
- exports.formatters = {};
58744
- var prevTime;
58745
- function selectColor(namespace) {
58746
- var hash = 0, i;
58747
- for (i in namespace) {
58748
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
58749
- hash |= 0;
58750
- }
58751
- return exports.colors[Math.abs(hash) % exports.colors.length];
58752
- }
58753
- function createDebug(namespace) {
58754
- function debug() {
58755
- if (!debug.enabled)
58756
- return;
58757
- var self2 = debug;
58758
- var curr = +new Date();
58759
- var ms = curr - (prevTime || curr);
58760
- self2.diff = ms;
58761
- self2.prev = prevTime;
58762
- self2.curr = curr;
58763
- prevTime = curr;
58764
- var args = new Array(arguments.length);
58765
- for (var i = 0; i < args.length; i++) {
58766
- args[i] = arguments[i];
58767
- }
58768
- args[0] = exports.coerce(args[0]);
58769
- if (typeof args[0] !== "string") {
58770
- args.unshift("%O");
58771
- }
58772
- var index = 0;
58773
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
58774
- if (match === "%%")
58746
+ // ../../../node_modules/debug/src/common.js
58747
+ var require_common2 = __commonJS({
58748
+ "../../../node_modules/debug/src/common.js"(exports, module2) {
58749
+ function setup(env) {
58750
+ createDebug.debug = createDebug;
58751
+ createDebug.default = createDebug;
58752
+ createDebug.coerce = coerce;
58753
+ createDebug.disable = disable;
58754
+ createDebug.enable = enable;
58755
+ createDebug.enabled = enabled;
58756
+ createDebug.humanize = require_ms();
58757
+ createDebug.destroy = destroy;
58758
+ Object.keys(env).forEach((key) => {
58759
+ createDebug[key] = env[key];
58760
+ });
58761
+ createDebug.names = [];
58762
+ createDebug.skips = [];
58763
+ createDebug.formatters = {};
58764
+ function selectColor(namespace) {
58765
+ let hash = 0;
58766
+ for (let i = 0; i < namespace.length; i++) {
58767
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
58768
+ hash |= 0;
58769
+ }
58770
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
58771
+ }
58772
+ createDebug.selectColor = selectColor;
58773
+ function createDebug(namespace) {
58774
+ let prevTime;
58775
+ let enableOverride = null;
58776
+ let namespacesCache;
58777
+ let enabledCache;
58778
+ function debug(...args) {
58779
+ if (!debug.enabled) {
58780
+ return;
58781
+ }
58782
+ const self2 = debug;
58783
+ const curr = Number(new Date());
58784
+ const ms = curr - (prevTime || curr);
58785
+ self2.diff = ms;
58786
+ self2.prev = prevTime;
58787
+ self2.curr = curr;
58788
+ prevTime = curr;
58789
+ args[0] = createDebug.coerce(args[0]);
58790
+ if (typeof args[0] !== "string") {
58791
+ args.unshift("%O");
58792
+ }
58793
+ let index = 0;
58794
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
58795
+ if (match === "%%") {
58796
+ return "%";
58797
+ }
58798
+ index++;
58799
+ const formatter = createDebug.formatters[format];
58800
+ if (typeof formatter === "function") {
58801
+ const val = args[index];
58802
+ match = formatter.call(self2, val);
58803
+ args.splice(index, 1);
58804
+ index--;
58805
+ }
58775
58806
  return match;
58776
- index++;
58777
- var formatter = exports.formatters[format];
58778
- if (typeof formatter === "function") {
58779
- var val = args[index];
58780
- match = formatter.call(self2, val);
58781
- args.splice(index, 1);
58782
- index--;
58783
- }
58784
- return match;
58807
+ });
58808
+ createDebug.formatArgs.call(self2, args);
58809
+ const logFn = self2.log || createDebug.log;
58810
+ logFn.apply(self2, args);
58811
+ }
58812
+ debug.namespace = namespace;
58813
+ debug.useColors = createDebug.useColors();
58814
+ debug.color = createDebug.selectColor(namespace);
58815
+ debug.extend = extend;
58816
+ debug.destroy = createDebug.destroy;
58817
+ Object.defineProperty(debug, "enabled", {
58818
+ enumerable: true,
58819
+ configurable: false,
58820
+ get: () => {
58821
+ if (enableOverride !== null) {
58822
+ return enableOverride;
58823
+ }
58824
+ if (namespacesCache !== createDebug.namespaces) {
58825
+ namespacesCache = createDebug.namespaces;
58826
+ enabledCache = createDebug.enabled(namespace);
58827
+ }
58828
+ return enabledCache;
58829
+ },
58830
+ set: (v) => {
58831
+ enableOverride = v;
58832
+ }
58785
58833
  });
58786
- exports.formatArgs.call(self2, args);
58787
- var logFn = debug.log || exports.log || console.log.bind(console);
58788
- logFn.apply(self2, args);
58789
- }
58790
- debug.namespace = namespace;
58791
- debug.enabled = exports.enabled(namespace);
58792
- debug.useColors = exports.useColors();
58793
- debug.color = selectColor(namespace);
58794
- if (typeof exports.init === "function") {
58795
- exports.init(debug);
58796
- }
58797
- return debug;
58798
- }
58799
- function enable(namespaces) {
58800
- exports.save(namespaces);
58801
- exports.names = [];
58802
- exports.skips = [];
58803
- var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
58804
- var len = split.length;
58805
- for (var i = 0; i < len; i++) {
58806
- if (!split[i])
58807
- continue;
58808
- namespaces = split[i].replace(/\*/g, ".*?");
58809
- if (namespaces[0] === "-") {
58810
- exports.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
58811
- } else {
58812
- exports.names.push(new RegExp("^" + namespaces + "$"));
58834
+ if (typeof createDebug.init === "function") {
58835
+ createDebug.init(debug);
58836
+ }
58837
+ return debug;
58838
+ }
58839
+ function extend(namespace, delimiter) {
58840
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
58841
+ newDebug.log = this.log;
58842
+ return newDebug;
58843
+ }
58844
+ function enable(namespaces) {
58845
+ createDebug.save(namespaces);
58846
+ createDebug.namespaces = namespaces;
58847
+ createDebug.names = [];
58848
+ createDebug.skips = [];
58849
+ let i;
58850
+ const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
58851
+ const len = split.length;
58852
+ for (i = 0; i < len; i++) {
58853
+ if (!split[i]) {
58854
+ continue;
58855
+ }
58856
+ namespaces = split[i].replace(/\*/g, ".*?");
58857
+ if (namespaces[0] === "-") {
58858
+ createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
58859
+ } else {
58860
+ createDebug.names.push(new RegExp("^" + namespaces + "$"));
58861
+ }
58813
58862
  }
58814
58863
  }
58815
- }
58816
- function disable() {
58817
- exports.enable("");
58818
- }
58819
- function enabled(name) {
58820
- var i, len;
58821
- for (i = 0, len = exports.skips.length; i < len; i++) {
58822
- if (exports.skips[i].test(name)) {
58823
- return false;
58824
- }
58864
+ function disable() {
58865
+ const namespaces = [
58866
+ ...createDebug.names.map(toNamespace),
58867
+ ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
58868
+ ].join(",");
58869
+ createDebug.enable("");
58870
+ return namespaces;
58825
58871
  }
58826
- for (i = 0, len = exports.names.length; i < len; i++) {
58827
- if (exports.names[i].test(name)) {
58872
+ function enabled(name) {
58873
+ if (name[name.length - 1] === "*") {
58828
58874
  return true;
58829
58875
  }
58876
+ let i;
58877
+ let len;
58878
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
58879
+ if (createDebug.skips[i].test(name)) {
58880
+ return false;
58881
+ }
58882
+ }
58883
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
58884
+ if (createDebug.names[i].test(name)) {
58885
+ return true;
58886
+ }
58887
+ }
58888
+ return false;
58830
58889
  }
58831
- return false;
58832
- }
58833
- function coerce(val) {
58834
- if (val instanceof Error)
58835
- return val.stack || val.message;
58836
- return val;
58890
+ function toNamespace(regexp) {
58891
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
58892
+ }
58893
+ function coerce(val) {
58894
+ if (val instanceof Error) {
58895
+ return val.stack || val.message;
58896
+ }
58897
+ return val;
58898
+ }
58899
+ function destroy() {
58900
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
58901
+ }
58902
+ createDebug.enable(createDebug.load());
58903
+ return createDebug;
58837
58904
  }
58905
+ module2.exports = setup;
58838
58906
  }
58839
58907
  });
58840
58908
 
58841
58909
  // ../../../node_modules/debug/src/browser.js
58842
58910
  var require_browser = __commonJS({
58843
58911
  "../../../node_modules/debug/src/browser.js"(exports, module2) {
58844
- exports = module2.exports = require_debug();
58845
- exports.log = log;
58846
58912
  exports.formatArgs = formatArgs;
58847
58913
  exports.save = save;
58848
58914
  exports.load = load;
58849
58915
  exports.useColors = useColors;
58850
- exports.storage = typeof chrome != "undefined" && typeof chrome.storage != "undefined" ? chrome.storage.local : localstorage();
58916
+ exports.storage = localstorage();
58917
+ exports.destroy = (() => {
58918
+ let warned = false;
58919
+ return () => {
58920
+ if (!warned) {
58921
+ warned = true;
58922
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
58923
+ }
58924
+ };
58925
+ })();
58851
58926
  exports.colors = [
58852
- "lightseagreen",
58853
- "forestgreen",
58854
- "goldenrod",
58855
- "dodgerblue",
58856
- "darkorchid",
58857
- "crimson"
58927
+ "#0000CC",
58928
+ "#0000FF",
58929
+ "#0033CC",
58930
+ "#0033FF",
58931
+ "#0066CC",
58932
+ "#0066FF",
58933
+ "#0099CC",
58934
+ "#0099FF",
58935
+ "#00CC00",
58936
+ "#00CC33",
58937
+ "#00CC66",
58938
+ "#00CC99",
58939
+ "#00CCCC",
58940
+ "#00CCFF",
58941
+ "#3300CC",
58942
+ "#3300FF",
58943
+ "#3333CC",
58944
+ "#3333FF",
58945
+ "#3366CC",
58946
+ "#3366FF",
58947
+ "#3399CC",
58948
+ "#3399FF",
58949
+ "#33CC00",
58950
+ "#33CC33",
58951
+ "#33CC66",
58952
+ "#33CC99",
58953
+ "#33CCCC",
58954
+ "#33CCFF",
58955
+ "#6600CC",
58956
+ "#6600FF",
58957
+ "#6633CC",
58958
+ "#6633FF",
58959
+ "#66CC00",
58960
+ "#66CC33",
58961
+ "#9900CC",
58962
+ "#9900FF",
58963
+ "#9933CC",
58964
+ "#9933FF",
58965
+ "#99CC00",
58966
+ "#99CC33",
58967
+ "#CC0000",
58968
+ "#CC0033",
58969
+ "#CC0066",
58970
+ "#CC0099",
58971
+ "#CC00CC",
58972
+ "#CC00FF",
58973
+ "#CC3300",
58974
+ "#CC3333",
58975
+ "#CC3366",
58976
+ "#CC3399",
58977
+ "#CC33CC",
58978
+ "#CC33FF",
58979
+ "#CC6600",
58980
+ "#CC6633",
58981
+ "#CC9900",
58982
+ "#CC9933",
58983
+ "#CCCC00",
58984
+ "#CCCC33",
58985
+ "#FF0000",
58986
+ "#FF0033",
58987
+ "#FF0066",
58988
+ "#FF0099",
58989
+ "#FF00CC",
58990
+ "#FF00FF",
58991
+ "#FF3300",
58992
+ "#FF3333",
58993
+ "#FF3366",
58994
+ "#FF3399",
58995
+ "#FF33CC",
58996
+ "#FF33FF",
58997
+ "#FF6600",
58998
+ "#FF6633",
58999
+ "#FF9900",
59000
+ "#FF9933",
59001
+ "#FFCC00",
59002
+ "#FFCC33"
58858
59003
  ];
58859
59004
  function useColors() {
58860
- if (typeof window !== "undefined" && window.process && window.process.type === "renderer") {
59005
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
58861
59006
  return true;
58862
59007
  }
59008
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
59009
+ return false;
59010
+ }
58863
59011
  return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
58864
59012
  }
58865
- exports.formatters.j = function(v) {
58866
- try {
58867
- return JSON.stringify(v);
58868
- } catch (err) {
58869
- return "[UnexpectedJSONParseError]: " + err.message;
58870
- }
58871
- };
58872
59013
  function formatArgs(args) {
58873
- var useColors2 = this.useColors;
58874
- args[0] = (useColors2 ? "%c" : "") + this.namespace + (useColors2 ? " %c" : " ") + args[0] + (useColors2 ? "%c " : " ") + "+" + exports.humanize(this.diff);
58875
- if (!useColors2)
59014
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
59015
+ if (!this.useColors) {
58876
59016
  return;
58877
- var c = "color: " + this.color;
59017
+ }
59018
+ const c = "color: " + this.color;
58878
59019
  args.splice(1, 0, c, "color: inherit");
58879
- var index = 0;
58880
- var lastC = 0;
58881
- args[0].replace(/%[a-zA-Z%]/g, function(match) {
58882
- if (match === "%%")
59020
+ let index = 0;
59021
+ let lastC = 0;
59022
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
59023
+ if (match === "%%") {
58883
59024
  return;
59025
+ }
58884
59026
  index++;
58885
59027
  if (match === "%c") {
58886
59028
  lastC = index;
@@ -58888,37 +59030,44 @@ var require_browser = __commonJS({
58888
59030
  });
58889
59031
  args.splice(lastC, 0, c);
58890
59032
  }
58891
- function log() {
58892
- return typeof console === "object" && console.log && Function.prototype.apply.call(console.log, console, arguments);
58893
- }
59033
+ exports.log = console.debug || console.log || (() => {
59034
+ });
58894
59035
  function save(namespaces) {
58895
59036
  try {
58896
- if (namespaces == null) {
58897
- exports.storage.removeItem("debug");
59037
+ if (namespaces) {
59038
+ exports.storage.setItem("debug", namespaces);
58898
59039
  } else {
58899
- exports.storage.debug = namespaces;
59040
+ exports.storage.removeItem("debug");
58900
59041
  }
58901
- } catch (e) {
59042
+ } catch (error) {
58902
59043
  }
58903
59044
  }
58904
59045
  function load() {
58905
- var r;
59046
+ let r;
58906
59047
  try {
58907
- r = exports.storage.debug;
58908
- } catch (e) {
59048
+ r = exports.storage.getItem("debug");
59049
+ } catch (error) {
58909
59050
  }
58910
59051
  if (!r && typeof process !== "undefined" && "env" in process) {
58911
59052
  r = process.env.DEBUG;
58912
59053
  }
58913
59054
  return r;
58914
59055
  }
58915
- exports.enable(load());
58916
59056
  function localstorage() {
58917
59057
  try {
58918
- return window.localStorage;
58919
- } catch (e) {
59058
+ return localStorage;
59059
+ } catch (error) {
58920
59060
  }
58921
59061
  }
59062
+ module2.exports = require_common2()(exports);
59063
+ var { formatters } = module2.exports;
59064
+ formatters.j = function(v) {
59065
+ try {
59066
+ return JSON.stringify(v);
59067
+ } catch (error) {
59068
+ return "[UnexpectedJSONParseError]: " + error.message;
59069
+ }
59070
+ };
58922
59071
  }
58923
59072
  });
58924
59073
 
@@ -58927,129 +59076,176 @@ var require_node2 = __commonJS({
58927
59076
  "../../../node_modules/debug/src/node.js"(exports, module2) {
58928
59077
  var tty = require("tty");
58929
59078
  var util = require("util");
58930
- exports = module2.exports = require_debug();
58931
59079
  exports.init = init;
58932
59080
  exports.log = log;
58933
59081
  exports.formatArgs = formatArgs;
58934
59082
  exports.save = save;
58935
59083
  exports.load = load;
58936
59084
  exports.useColors = useColors;
59085
+ exports.destroy = util.deprecate(() => {
59086
+ }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
58937
59087
  exports.colors = [6, 2, 3, 4, 5, 1];
58938
- exports.inspectOpts = Object.keys(process.env).filter(function(key) {
59088
+ try {
59089
+ const supportsColor = require_supports_color();
59090
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
59091
+ exports.colors = [
59092
+ 20,
59093
+ 21,
59094
+ 26,
59095
+ 27,
59096
+ 32,
59097
+ 33,
59098
+ 38,
59099
+ 39,
59100
+ 40,
59101
+ 41,
59102
+ 42,
59103
+ 43,
59104
+ 44,
59105
+ 45,
59106
+ 56,
59107
+ 57,
59108
+ 62,
59109
+ 63,
59110
+ 68,
59111
+ 69,
59112
+ 74,
59113
+ 75,
59114
+ 76,
59115
+ 77,
59116
+ 78,
59117
+ 79,
59118
+ 80,
59119
+ 81,
59120
+ 92,
59121
+ 93,
59122
+ 98,
59123
+ 99,
59124
+ 112,
59125
+ 113,
59126
+ 128,
59127
+ 129,
59128
+ 134,
59129
+ 135,
59130
+ 148,
59131
+ 149,
59132
+ 160,
59133
+ 161,
59134
+ 162,
59135
+ 163,
59136
+ 164,
59137
+ 165,
59138
+ 166,
59139
+ 167,
59140
+ 168,
59141
+ 169,
59142
+ 170,
59143
+ 171,
59144
+ 172,
59145
+ 173,
59146
+ 178,
59147
+ 179,
59148
+ 184,
59149
+ 185,
59150
+ 196,
59151
+ 197,
59152
+ 198,
59153
+ 199,
59154
+ 200,
59155
+ 201,
59156
+ 202,
59157
+ 203,
59158
+ 204,
59159
+ 205,
59160
+ 206,
59161
+ 207,
59162
+ 208,
59163
+ 209,
59164
+ 214,
59165
+ 215,
59166
+ 220,
59167
+ 221
59168
+ ];
59169
+ }
59170
+ } catch (error) {
59171
+ }
59172
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
58939
59173
  return /^debug_/i.test(key);
58940
- }).reduce(function(obj, key) {
58941
- var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
59174
+ }).reduce((obj, key) => {
59175
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
58942
59176
  return k.toUpperCase();
58943
59177
  });
58944
- var val = process.env[key];
58945
- if (/^(yes|on|true|enabled)$/i.test(val))
59178
+ let val = process.env[key];
59179
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
58946
59180
  val = true;
58947
- else if (/^(no|off|false|disabled)$/i.test(val))
59181
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
58948
59182
  val = false;
58949
- else if (val === "null")
59183
+ } else if (val === "null") {
58950
59184
  val = null;
58951
- else
59185
+ } else {
58952
59186
  val = Number(val);
59187
+ }
58953
59188
  obj[prop] = val;
58954
59189
  return obj;
58955
59190
  }, {});
58956
- var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
58957
- if (fd !== 1 && fd !== 2) {
58958
- util.deprecate(function() {
58959
- }, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
58960
- }
58961
- var stream = fd === 1 ? process.stdout : fd === 2 ? process.stderr : createWritableStdioStream(fd);
58962
59191
  function useColors() {
58963
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(fd);
59192
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
58964
59193
  }
58965
- exports.formatters.o = function(v) {
58966
- this.inspectOpts.colors = this.useColors;
58967
- return util.inspect(v, this.inspectOpts).split("\n").map(function(str) {
58968
- return str.trim();
58969
- }).join(" ");
58970
- };
58971
- exports.formatters.O = function(v) {
58972
- this.inspectOpts.colors = this.useColors;
58973
- return util.inspect(v, this.inspectOpts);
58974
- };
58975
59194
  function formatArgs(args) {
58976
- var name = this.namespace;
58977
- var useColors2 = this.useColors;
59195
+ const { namespace: name, useColors: useColors2 } = this;
58978
59196
  if (useColors2) {
58979
- var c = this.color;
58980
- var prefix = " [3" + c + ";1m" + name + " ";
59197
+ const c = this.color;
59198
+ const colorCode = "[3" + (c < 8 ? c : "8;5;" + c);
59199
+ const prefix = ` ${colorCode};1m${name} `;
58981
59200
  args[0] = prefix + args[0].split("\n").join("\n" + prefix);
58982
- args.push("[3" + c + "m+" + exports.humanize(this.diff) + "");
59201
+ args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "");
58983
59202
  } else {
58984
- args[0] = new Date().toUTCString() + " " + name + " " + args[0];
59203
+ args[0] = getDate() + name + " " + args[0];
58985
59204
  }
58986
59205
  }
58987
- function log() {
58988
- return stream.write(util.format.apply(util, arguments) + "\n");
59206
+ function getDate() {
59207
+ if (exports.inspectOpts.hideDate) {
59208
+ return "";
59209
+ }
59210
+ return new Date().toISOString() + " ";
59211
+ }
59212
+ function log(...args) {
59213
+ return process.stderr.write(util.format(...args) + "\n");
58989
59214
  }
58990
59215
  function save(namespaces) {
58991
- if (namespaces == null) {
58992
- delete process.env.DEBUG;
58993
- } else {
59216
+ if (namespaces) {
58994
59217
  process.env.DEBUG = namespaces;
59218
+ } else {
59219
+ delete process.env.DEBUG;
58995
59220
  }
58996
59221
  }
58997
59222
  function load() {
58998
59223
  return process.env.DEBUG;
58999
59224
  }
59000
- function createWritableStdioStream(fd2) {
59001
- var stream2;
59002
- var tty_wrap = process.binding("tty_wrap");
59003
- switch (tty_wrap.guessHandleType(fd2)) {
59004
- case "TTY":
59005
- stream2 = new tty.WriteStream(fd2);
59006
- stream2._type = "tty";
59007
- if (stream2._handle && stream2._handle.unref) {
59008
- stream2._handle.unref();
59009
- }
59010
- break;
59011
- case "FILE":
59012
- var fs2 = require("fs");
59013
- stream2 = new fs2.SyncWriteStream(fd2, { autoClose: false });
59014
- stream2._type = "fs";
59015
- break;
59016
- case "PIPE":
59017
- case "TCP":
59018
- var net = require("net");
59019
- stream2 = new net.Socket({
59020
- fd: fd2,
59021
- readable: false,
59022
- writable: true
59023
- });
59024
- stream2.readable = false;
59025
- stream2.read = null;
59026
- stream2._type = "pipe";
59027
- if (stream2._handle && stream2._handle.unref) {
59028
- stream2._handle.unref();
59029
- }
59030
- break;
59031
- default:
59032
- throw new Error("Implement me. Unknown stream file type!");
59033
- }
59034
- stream2.fd = fd2;
59035
- stream2._isStdio = true;
59036
- return stream2;
59037
- }
59038
59225
  function init(debug) {
59039
59226
  debug.inspectOpts = {};
59040
- var keys = Object.keys(exports.inspectOpts);
59041
- for (var i = 0; i < keys.length; i++) {
59227
+ const keys = Object.keys(exports.inspectOpts);
59228
+ for (let i = 0; i < keys.length; i++) {
59042
59229
  debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
59043
59230
  }
59044
59231
  }
59045
- exports.enable(load());
59232
+ module2.exports = require_common2()(exports);
59233
+ var { formatters } = module2.exports;
59234
+ formatters.o = function(v) {
59235
+ this.inspectOpts.colors = this.useColors;
59236
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
59237
+ };
59238
+ formatters.O = function(v) {
59239
+ this.inspectOpts.colors = this.useColors;
59240
+ return util.inspect(v, this.inspectOpts);
59241
+ };
59046
59242
  }
59047
59243
  });
59048
59244
 
59049
59245
  // ../../../node_modules/debug/src/index.js
59050
59246
  var require_src = __commonJS({
59051
59247
  "../../../node_modules/debug/src/index.js"(exports, module2) {
59052
- if (typeof process !== "undefined" && process.type === "renderer") {
59248
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
59053
59249
  module2.exports = require_browser();
59054
59250
  } else {
59055
59251
  module2.exports = require_node2();
@@ -59058,7 +59254,7 @@ var require_src = __commonJS({
59058
59254
  });
59059
59255
 
59060
59256
  // ../../../node_modules/follow-redirects/debug.js
59061
- var require_debug2 = __commonJS({
59257
+ var require_debug = __commonJS({
59062
59258
  "../../../node_modules/follow-redirects/debug.js"(exports, module2) {
59063
59259
  var debug;
59064
59260
  module2.exports = function() {
@@ -59086,7 +59282,7 @@ var require_follow_redirects = __commonJS({
59086
59282
  var https = require("https");
59087
59283
  var Writable = require("stream").Writable;
59088
59284
  var assert = require("assert");
59089
- var debug = require_debug2();
59285
+ var debug = require_debug();
59090
59286
  var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
59091
59287
  var eventHandlers = Object.create(null);
59092
59288
  events.forEach(function(event) {