@wix/bex-utils 2.61.0 → 2.63.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.
@@ -6508,9 +6508,9 @@ var require_buildURL = __commonJS({
6508
6508
  }
6509
6509
  });
6510
6510
 
6511
- // ../../node_modules/debug/node_modules/ms/index.js
6511
+ // ../../node_modules/ms/index.js
6512
6512
  var require_ms = __commonJS({
6513
- "../../node_modules/debug/node_modules/ms/index.js"(exports2, module2) {
6513
+ "../../node_modules/ms/index.js"(exports2, module2) {
6514
6514
  "use strict";
6515
6515
  var s = 1e3;
6516
6516
  var m = s * 60;
@@ -6729,50 +6729,64 @@ var require_common = __commonJS({
6729
6729
  createDebug.namespaces = namespaces;
6730
6730
  createDebug.names = [];
6731
6731
  createDebug.skips = [];
6732
- let i;
6733
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
6734
- const len = split.length;
6735
- for (i = 0; i < len; i++) {
6736
- if (!split[i]) {
6737
- continue;
6738
- }
6739
- namespaces = split[i].replace(/\*/g, ".*?");
6740
- if (namespaces[0] === "-") {
6741
- createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
6732
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
6733
+ for (const ns of split) {
6734
+ if (ns[0] === "-") {
6735
+ createDebug.skips.push(ns.slice(1));
6742
6736
  } else {
6743
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
6737
+ createDebug.names.push(ns);
6744
6738
  }
6745
6739
  }
6746
6740
  }
6741
+ function matchesTemplate(search, template) {
6742
+ let searchIndex = 0;
6743
+ let templateIndex = 0;
6744
+ let starIndex = -1;
6745
+ let matchIndex = 0;
6746
+ while (searchIndex < search.length) {
6747
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
6748
+ if (template[templateIndex] === "*") {
6749
+ starIndex = templateIndex;
6750
+ matchIndex = searchIndex;
6751
+ templateIndex++;
6752
+ } else {
6753
+ searchIndex++;
6754
+ templateIndex++;
6755
+ }
6756
+ } else if (starIndex !== -1) {
6757
+ templateIndex = starIndex + 1;
6758
+ matchIndex++;
6759
+ searchIndex = matchIndex;
6760
+ } else {
6761
+ return false;
6762
+ }
6763
+ }
6764
+ while (templateIndex < template.length && template[templateIndex] === "*") {
6765
+ templateIndex++;
6766
+ }
6767
+ return templateIndex === template.length;
6768
+ }
6747
6769
  function disable() {
6748
6770
  const namespaces = [
6749
- ...createDebug.names.map(toNamespace),
6750
- ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
6771
+ ...createDebug.names,
6772
+ ...createDebug.skips.map((namespace) => "-" + namespace)
6751
6773
  ].join(",");
6752
6774
  createDebug.enable("");
6753
6775
  return namespaces;
6754
6776
  }
6755
6777
  function enabled(name) {
6756
- if (name[name.length - 1] === "*") {
6757
- return true;
6758
- }
6759
- let i;
6760
- let len;
6761
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
6762
- if (createDebug.skips[i].test(name)) {
6778
+ for (const skip of createDebug.skips) {
6779
+ if (matchesTemplate(name, skip)) {
6763
6780
  return false;
6764
6781
  }
6765
6782
  }
6766
- for (i = 0, len = createDebug.names.length; i < len; i++) {
6767
- if (createDebug.names[i].test(name)) {
6783
+ for (const ns of createDebug.names) {
6784
+ if (matchesTemplate(name, ns)) {
6768
6785
  return true;
6769
6786
  }
6770
6787
  }
6771
6788
  return false;
6772
6789
  }
6773
- function toNamespace(regexp) {
6774
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
6775
- }
6776
6790
  function coerce(val) {
6777
6791
  if (val instanceof Error) {
6778
6792
  return val.stack || val.message;
@@ -6934,7 +6948,7 @@ var require_browser = __commonJS({
6934
6948
  function load() {
6935
6949
  let r;
6936
6950
  try {
6937
- r = exports2.storage.getItem("debug");
6951
+ r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
6938
6952
  } catch (error) {
6939
6953
  }
6940
6954
  if (!r && typeof process !== "undefined" && "env" in process) {