@terai/dev 0.0.0-dev-20240606194724 → 0.0.0-dev-20251119151044

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.
package/dist/cli.mjs CHANGED
@@ -33,12 +33,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  mod
34
34
  ));
35
35
 
36
- // ../../node_modules/.pnpm/tsup@8.1.0_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js
37
- import { fileURLToPath } from "url";
36
+ // ../../node_modules/.pnpm/tsup@8.5.1_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js
38
37
  import path from "path";
38
+ import { fileURLToPath } from "url";
39
39
  var getFilename, getDirname, __dirname, __filename;
40
40
  var init_esm_shims = __esm({
41
- "../../node_modules/.pnpm/tsup@8.1.0_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js"() {
41
+ "../../node_modules/.pnpm/tsup@8.5.1_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js"() {
42
42
  "use strict";
43
43
  getFilename = () => fileURLToPath(import.meta.url);
44
44
  getDirname = () => path.dirname(getFilename());
@@ -115,7 +115,7 @@ var require_polyfills = __commonJS({
115
115
  };
116
116
  }
117
117
  if (platform === "win32") {
118
- fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
118
+ fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : (function(fs$rename) {
119
119
  function rename(from, to, cb) {
120
120
  var start = Date.now();
121
121
  var backoff = 0;
@@ -138,9 +138,9 @@ var require_polyfills = __commonJS({
138
138
  }
139
139
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
140
140
  return rename;
141
- }(fs3.rename);
141
+ })(fs3.rename);
142
142
  }
143
- fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
143
+ fs3.read = typeof fs3.read !== "function" ? fs3.read : (function(fs$read) {
144
144
  function read(fd, buffer, offset, length, position, callback_) {
145
145
  var callback;
146
146
  if (callback_ && typeof callback_ === "function") {
@@ -157,8 +157,8 @@ var require_polyfills = __commonJS({
157
157
  }
158
158
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
159
159
  return read;
160
- }(fs3.read);
161
- fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
160
+ })(fs3.read);
161
+ fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) {
162
162
  return function(fd, buffer, offset, length, position) {
163
163
  var eagCounter = 0;
164
164
  while (true) {
@@ -173,7 +173,7 @@ var require_polyfills = __commonJS({
173
173
  }
174
174
  }
175
175
  };
176
- }(fs3.readSync);
176
+ })(fs3.readSync);
177
177
  function patchLchmod(fs4) {
178
178
  fs4.lchmod = function(path7, mode, callback) {
179
179
  fs4.open(
@@ -499,7 +499,7 @@ var require_graceful_fs = __commonJS({
499
499
  if (!fs3[gracefulQueue]) {
500
500
  queue = global[gracefulQueue] || [];
501
501
  publishQueue(fs3, queue);
502
- fs3.close = function(fs$close) {
502
+ fs3.close = (function(fs$close) {
503
503
  function close(fd, cb) {
504
504
  return fs$close.call(fs3, fd, function(err) {
505
505
  if (!err) {
@@ -513,8 +513,8 @@ var require_graceful_fs = __commonJS({
513
513
  value: fs$close
514
514
  });
515
515
  return close;
516
- }(fs3.close);
517
- fs3.closeSync = function(fs$closeSync) {
516
+ })(fs3.close);
517
+ fs3.closeSync = (function(fs$closeSync) {
518
518
  function closeSync(fd) {
519
519
  fs$closeSync.apply(fs3, arguments);
520
520
  resetQueue();
@@ -523,7 +523,7 @@ var require_graceful_fs = __commonJS({
523
523
  value: fs$closeSync
524
524
  });
525
525
  return closeSync;
526
- }(fs3.closeSync);
526
+ })(fs3.closeSync);
527
527
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
528
528
  process.on("exit", function() {
529
529
  debug2(fs3[gracefulQueue]);
@@ -1200,14 +1200,14 @@ var require_write_file_atomic = __commonJS({
1200
1200
  var typedArrayToBuffer = require_typedarray_to_buffer();
1201
1201
  var { promisify: promisify5 } = __require("util");
1202
1202
  var activeFiles = {};
1203
- var threadId = function getId() {
1203
+ var threadId = (function getId() {
1204
1204
  try {
1205
1205
  const workerThreads = __require("worker_threads");
1206
1206
  return workerThreads.threadId;
1207
1207
  } catch (e) {
1208
1208
  return 0;
1209
1209
  }
1210
- }();
1210
+ })();
1211
1211
  var invocations = 0;
1212
1212
  function getTmpname(filename) {
1213
1213
  return filename + "." + MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result();
@@ -1521,9 +1521,9 @@ var require_dot_prop = __commonJS({
1521
1521
  }
1522
1522
  });
1523
1523
 
1524
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/constants.js
1524
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
1525
1525
  var require_constants = __commonJS({
1526
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/constants.js"(exports, module2) {
1526
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports, module2) {
1527
1527
  "use strict";
1528
1528
  init_esm_shims();
1529
1529
  var SEMVER_SPEC_VERSION = "2.0.0";
@@ -1554,9 +1554,9 @@ var require_constants = __commonJS({
1554
1554
  }
1555
1555
  });
1556
1556
 
1557
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/debug.js
1557
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
1558
1558
  var require_debug = __commonJS({
1559
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/debug.js"(exports, module2) {
1559
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js"(exports, module2) {
1560
1560
  "use strict";
1561
1561
  init_esm_shims();
1562
1562
  var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
@@ -1565,9 +1565,9 @@ var require_debug = __commonJS({
1565
1565
  }
1566
1566
  });
1567
1567
 
1568
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/re.js
1568
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
1569
1569
  var require_re = __commonJS({
1570
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/re.js"(exports, module2) {
1570
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js"(exports, module2) {
1571
1571
  "use strict";
1572
1572
  init_esm_shims();
1573
1573
  var {
@@ -1580,6 +1580,7 @@ var require_re = __commonJS({
1580
1580
  var re = exports.re = [];
1581
1581
  var safeRe = exports.safeRe = [];
1582
1582
  var src = exports.src = [];
1583
+ var safeSrc = exports.safeSrc = [];
1583
1584
  var t = exports.t = {};
1584
1585
  var R = 0;
1585
1586
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
@@ -1600,6 +1601,7 @@ var require_re = __commonJS({
1600
1601
  debug2(name, index, value);
1601
1602
  t[name] = index;
1602
1603
  src[index] = value;
1604
+ safeSrc[index] = safe;
1603
1605
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
1604
1606
  safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
1605
1607
  };
@@ -1608,8 +1610,8 @@ var require_re = __commonJS({
1608
1610
  createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
1609
1611
  createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
1610
1612
  createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
1611
- createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
1612
- createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
1613
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
1614
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
1613
1615
  createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
1614
1616
  createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
1615
1617
  createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
@@ -1652,9 +1654,9 @@ var require_re = __commonJS({
1652
1654
  }
1653
1655
  });
1654
1656
 
1655
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/parse-options.js
1657
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
1656
1658
  var require_parse_options = __commonJS({
1657
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/parse-options.js"(exports, module2) {
1659
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js"(exports, module2) {
1658
1660
  "use strict";
1659
1661
  init_esm_shims();
1660
1662
  var looseOption = Object.freeze({ loose: true });
@@ -1672,13 +1674,16 @@ var require_parse_options = __commonJS({
1672
1674
  }
1673
1675
  });
1674
1676
 
1675
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/identifiers.js
1677
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
1676
1678
  var require_identifiers = __commonJS({
1677
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/identifiers.js"(exports, module2) {
1679
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports, module2) {
1678
1680
  "use strict";
1679
1681
  init_esm_shims();
1680
1682
  var numeric = /^[0-9]+$/;
1681
1683
  var compareIdentifiers = (a, b) => {
1684
+ if (typeof a === "number" && typeof b === "number") {
1685
+ return a === b ? 0 : a < b ? -1 : 1;
1686
+ }
1682
1687
  const anum = numeric.test(a);
1683
1688
  const bnum = numeric.test(b);
1684
1689
  if (anum && bnum) {
@@ -1695,9 +1700,9 @@ var require_identifiers = __commonJS({
1695
1700
  }
1696
1701
  });
1697
1702
 
1698
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/classes/semver.js
1703
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
1699
1704
  var require_semver = __commonJS({
1700
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/classes/semver.js"(exports, module2) {
1705
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js"(exports, module2) {
1701
1706
  "use strict";
1702
1707
  init_esm_shims();
1703
1708
  var debug2 = require_debug();
@@ -1786,7 +1791,25 @@ var require_semver = __commonJS({
1786
1791
  if (!(other instanceof _SemVer)) {
1787
1792
  other = new _SemVer(other, this.options);
1788
1793
  }
1789
- return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
1794
+ if (this.major < other.major) {
1795
+ return -1;
1796
+ }
1797
+ if (this.major > other.major) {
1798
+ return 1;
1799
+ }
1800
+ if (this.minor < other.minor) {
1801
+ return -1;
1802
+ }
1803
+ if (this.minor > other.minor) {
1804
+ return 1;
1805
+ }
1806
+ if (this.patch < other.patch) {
1807
+ return -1;
1808
+ }
1809
+ if (this.patch > other.patch) {
1810
+ return 1;
1811
+ }
1812
+ return 0;
1790
1813
  }
1791
1814
  comparePre(other) {
1792
1815
  if (!(other instanceof _SemVer)) {
@@ -1842,6 +1865,17 @@ var require_semver = __commonJS({
1842
1865
  // preminor will bump the version up to the next minor release, and immediately
1843
1866
  // down to pre-release. premajor and prepatch work the same way.
1844
1867
  inc(release, identifier, identifierBase) {
1868
+ if (release.startsWith("pre")) {
1869
+ if (!identifier && identifierBase === false) {
1870
+ throw new Error("invalid increment argument: identifier is empty");
1871
+ }
1872
+ if (identifier) {
1873
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
1874
+ if (!match || match[1] !== identifier) {
1875
+ throw new Error(`invalid identifier: ${identifier}`);
1876
+ }
1877
+ }
1878
+ }
1845
1879
  switch (release) {
1846
1880
  case "premajor":
1847
1881
  this.prerelease.length = 0;
@@ -1861,12 +1895,20 @@ var require_semver = __commonJS({
1861
1895
  this.inc("patch", identifier, identifierBase);
1862
1896
  this.inc("pre", identifier, identifierBase);
1863
1897
  break;
1898
+ // If the input is a non-prerelease version, this acts the same as
1899
+ // prepatch.
1864
1900
  case "prerelease":
1865
1901
  if (this.prerelease.length === 0) {
1866
1902
  this.inc("patch", identifier, identifierBase);
1867
1903
  }
1868
1904
  this.inc("pre", identifier, identifierBase);
1869
1905
  break;
1906
+ case "release":
1907
+ if (this.prerelease.length === 0) {
1908
+ throw new Error(`version ${this.raw} is not a prerelease`);
1909
+ }
1910
+ this.prerelease.length = 0;
1911
+ break;
1870
1912
  case "major":
1871
1913
  if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
1872
1914
  this.major++;
@@ -1888,11 +1930,10 @@ var require_semver = __commonJS({
1888
1930
  }
1889
1931
  this.prerelease = [];
1890
1932
  break;
1933
+ // This probably shouldn't be used publicly.
1934
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
1891
1935
  case "pre": {
1892
1936
  const base = Number(identifierBase) ? 1 : 0;
1893
- if (!identifier && identifierBase === false) {
1894
- throw new Error("invalid increment argument: identifier is empty");
1895
- }
1896
1937
  if (this.prerelease.length === 0) {
1897
1938
  this.prerelease = [base];
1898
1939
  } else {
@@ -1939,9 +1980,9 @@ var require_semver = __commonJS({
1939
1980
  }
1940
1981
  });
1941
1982
 
1942
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/parse.js
1983
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
1943
1984
  var require_parse = __commonJS({
1944
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/parse.js"(exports, module2) {
1985
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports, module2) {
1945
1986
  "use strict";
1946
1987
  init_esm_shims();
1947
1988
  var SemVer = require_semver();
@@ -1962,9 +2003,9 @@ var require_parse = __commonJS({
1962
2003
  }
1963
2004
  });
1964
2005
 
1965
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/valid.js
2006
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js
1966
2007
  var require_valid = __commonJS({
1967
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/valid.js"(exports, module2) {
2008
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports, module2) {
1968
2009
  "use strict";
1969
2010
  init_esm_shims();
1970
2011
  var parse = require_parse();
@@ -1976,9 +2017,9 @@ var require_valid = __commonJS({
1976
2017
  }
1977
2018
  });
1978
2019
 
1979
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/clean.js
2020
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js
1980
2021
  var require_clean = __commonJS({
1981
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/clean.js"(exports, module2) {
2022
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports, module2) {
1982
2023
  "use strict";
1983
2024
  init_esm_shims();
1984
2025
  var parse = require_parse();
@@ -1990,9 +2031,9 @@ var require_clean = __commonJS({
1990
2031
  }
1991
2032
  });
1992
2033
 
1993
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/inc.js
2034
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js
1994
2035
  var require_inc = __commonJS({
1995
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/inc.js"(exports, module2) {
2036
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js"(exports, module2) {
1996
2037
  "use strict";
1997
2038
  init_esm_shims();
1998
2039
  var SemVer = require_semver();
@@ -2015,9 +2056,9 @@ var require_inc = __commonJS({
2015
2056
  }
2016
2057
  });
2017
2058
 
2018
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/diff.js
2059
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js
2019
2060
  var require_diff = __commonJS({
2020
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/diff.js"(exports, module2) {
2061
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports, module2) {
2021
2062
  "use strict";
2022
2063
  init_esm_shims();
2023
2064
  var parse = require_parse();
@@ -2037,13 +2078,12 @@ var require_diff = __commonJS({
2037
2078
  if (!lowVersion.patch && !lowVersion.minor) {
2038
2079
  return "major";
2039
2080
  }
2040
- if (highVersion.patch) {
2081
+ if (lowVersion.compareMain(highVersion) === 0) {
2082
+ if (lowVersion.minor && !lowVersion.patch) {
2083
+ return "minor";
2084
+ }
2041
2085
  return "patch";
2042
2086
  }
2043
- if (highVersion.minor) {
2044
- return "minor";
2045
- }
2046
- return "major";
2047
2087
  }
2048
2088
  const prefix = highHasPre ? "pre" : "";
2049
2089
  if (v1.major !== v2.major) {
@@ -2061,9 +2101,9 @@ var require_diff = __commonJS({
2061
2101
  }
2062
2102
  });
2063
2103
 
2064
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/major.js
2104
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js
2065
2105
  var require_major = __commonJS({
2066
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/major.js"(exports, module2) {
2106
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js"(exports, module2) {
2067
2107
  "use strict";
2068
2108
  init_esm_shims();
2069
2109
  var SemVer = require_semver();
@@ -2072,9 +2112,9 @@ var require_major = __commonJS({
2072
2112
  }
2073
2113
  });
2074
2114
 
2075
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/minor.js
2115
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js
2076
2116
  var require_minor = __commonJS({
2077
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/minor.js"(exports, module2) {
2117
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js"(exports, module2) {
2078
2118
  "use strict";
2079
2119
  init_esm_shims();
2080
2120
  var SemVer = require_semver();
@@ -2083,9 +2123,9 @@ var require_minor = __commonJS({
2083
2123
  }
2084
2124
  });
2085
2125
 
2086
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/patch.js
2126
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js
2087
2127
  var require_patch = __commonJS({
2088
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/patch.js"(exports, module2) {
2128
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js"(exports, module2) {
2089
2129
  "use strict";
2090
2130
  init_esm_shims();
2091
2131
  var SemVer = require_semver();
@@ -2094,9 +2134,9 @@ var require_patch = __commonJS({
2094
2134
  }
2095
2135
  });
2096
2136
 
2097
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/prerelease.js
2137
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js
2098
2138
  var require_prerelease = __commonJS({
2099
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/prerelease.js"(exports, module2) {
2139
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports, module2) {
2100
2140
  "use strict";
2101
2141
  init_esm_shims();
2102
2142
  var parse = require_parse();
@@ -2108,9 +2148,9 @@ var require_prerelease = __commonJS({
2108
2148
  }
2109
2149
  });
2110
2150
 
2111
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/compare.js
2151
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
2112
2152
  var require_compare = __commonJS({
2113
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/compare.js"(exports, module2) {
2153
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js"(exports, module2) {
2114
2154
  "use strict";
2115
2155
  init_esm_shims();
2116
2156
  var SemVer = require_semver();
@@ -2119,9 +2159,9 @@ var require_compare = __commonJS({
2119
2159
  }
2120
2160
  });
2121
2161
 
2122
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/rcompare.js
2162
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js
2123
2163
  var require_rcompare = __commonJS({
2124
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/rcompare.js"(exports, module2) {
2164
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js"(exports, module2) {
2125
2165
  "use strict";
2126
2166
  init_esm_shims();
2127
2167
  var compare = require_compare();
@@ -2130,9 +2170,9 @@ var require_rcompare = __commonJS({
2130
2170
  }
2131
2171
  });
2132
2172
 
2133
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/compare-loose.js
2173
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js
2134
2174
  var require_compare_loose = __commonJS({
2135
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/compare-loose.js"(exports, module2) {
2175
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js"(exports, module2) {
2136
2176
  "use strict";
2137
2177
  init_esm_shims();
2138
2178
  var compare = require_compare();
@@ -2141,9 +2181,9 @@ var require_compare_loose = __commonJS({
2141
2181
  }
2142
2182
  });
2143
2183
 
2144
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/compare-build.js
2184
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js
2145
2185
  var require_compare_build = __commonJS({
2146
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/compare-build.js"(exports, module2) {
2186
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js"(exports, module2) {
2147
2187
  "use strict";
2148
2188
  init_esm_shims();
2149
2189
  var SemVer = require_semver();
@@ -2156,9 +2196,9 @@ var require_compare_build = __commonJS({
2156
2196
  }
2157
2197
  });
2158
2198
 
2159
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/sort.js
2199
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js
2160
2200
  var require_sort = __commonJS({
2161
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/sort.js"(exports, module2) {
2201
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js"(exports, module2) {
2162
2202
  "use strict";
2163
2203
  init_esm_shims();
2164
2204
  var compareBuild = require_compare_build();
@@ -2167,9 +2207,9 @@ var require_sort = __commonJS({
2167
2207
  }
2168
2208
  });
2169
2209
 
2170
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/rsort.js
2210
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js
2171
2211
  var require_rsort = __commonJS({
2172
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/rsort.js"(exports, module2) {
2212
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js"(exports, module2) {
2173
2213
  "use strict";
2174
2214
  init_esm_shims();
2175
2215
  var compareBuild = require_compare_build();
@@ -2178,9 +2218,9 @@ var require_rsort = __commonJS({
2178
2218
  }
2179
2219
  });
2180
2220
 
2181
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/gt.js
2221
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
2182
2222
  var require_gt = __commonJS({
2183
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/gt.js"(exports, module2) {
2223
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js"(exports, module2) {
2184
2224
  "use strict";
2185
2225
  init_esm_shims();
2186
2226
  var compare = require_compare();
@@ -2189,9 +2229,9 @@ var require_gt = __commonJS({
2189
2229
  }
2190
2230
  });
2191
2231
 
2192
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/lt.js
2232
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
2193
2233
  var require_lt = __commonJS({
2194
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/lt.js"(exports, module2) {
2234
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js"(exports, module2) {
2195
2235
  "use strict";
2196
2236
  init_esm_shims();
2197
2237
  var compare = require_compare();
@@ -2200,9 +2240,9 @@ var require_lt = __commonJS({
2200
2240
  }
2201
2241
  });
2202
2242
 
2203
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/eq.js
2243
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
2204
2244
  var require_eq = __commonJS({
2205
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/eq.js"(exports, module2) {
2245
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js"(exports, module2) {
2206
2246
  "use strict";
2207
2247
  init_esm_shims();
2208
2248
  var compare = require_compare();
@@ -2211,9 +2251,9 @@ var require_eq = __commonJS({
2211
2251
  }
2212
2252
  });
2213
2253
 
2214
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/neq.js
2254
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
2215
2255
  var require_neq = __commonJS({
2216
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/neq.js"(exports, module2) {
2256
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js"(exports, module2) {
2217
2257
  "use strict";
2218
2258
  init_esm_shims();
2219
2259
  var compare = require_compare();
@@ -2222,9 +2262,9 @@ var require_neq = __commonJS({
2222
2262
  }
2223
2263
  });
2224
2264
 
2225
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/gte.js
2265
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
2226
2266
  var require_gte = __commonJS({
2227
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/gte.js"(exports, module2) {
2267
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js"(exports, module2) {
2228
2268
  "use strict";
2229
2269
  init_esm_shims();
2230
2270
  var compare = require_compare();
@@ -2233,9 +2273,9 @@ var require_gte = __commonJS({
2233
2273
  }
2234
2274
  });
2235
2275
 
2236
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/lte.js
2276
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
2237
2277
  var require_lte = __commonJS({
2238
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/lte.js"(exports, module2) {
2278
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js"(exports, module2) {
2239
2279
  "use strict";
2240
2280
  init_esm_shims();
2241
2281
  var compare = require_compare();
@@ -2244,9 +2284,9 @@ var require_lte = __commonJS({
2244
2284
  }
2245
2285
  });
2246
2286
 
2247
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/cmp.js
2287
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
2248
2288
  var require_cmp = __commonJS({
2249
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/cmp.js"(exports, module2) {
2289
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js"(exports, module2) {
2250
2290
  "use strict";
2251
2291
  init_esm_shims();
2252
2292
  var eq = require_eq();
@@ -2295,9 +2335,9 @@ var require_cmp = __commonJS({
2295
2335
  }
2296
2336
  });
2297
2337
 
2298
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/coerce.js
2338
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
2299
2339
  var require_coerce = __commonJS({
2300
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/coerce.js"(exports, module2) {
2340
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports, module2) {
2301
2341
  "use strict";
2302
2342
  init_esm_shims();
2303
2343
  var SemVer = require_semver();
@@ -2342,9 +2382,9 @@ var require_coerce = __commonJS({
2342
2382
  }
2343
2383
  });
2344
2384
 
2345
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/lrucache.js
2385
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
2346
2386
  var require_lrucache = __commonJS({
2347
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/internal/lrucache.js"(exports, module2) {
2387
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js"(exports, module2) {
2348
2388
  "use strict";
2349
2389
  init_esm_shims();
2350
2390
  var LRUCache = class {
@@ -2381,11 +2421,12 @@ var require_lrucache = __commonJS({
2381
2421
  }
2382
2422
  });
2383
2423
 
2384
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/classes/range.js
2424
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
2385
2425
  var require_range = __commonJS({
2386
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/classes/range.js"(exports, module2) {
2426
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js"(exports, module2) {
2387
2427
  "use strict";
2388
2428
  init_esm_shims();
2429
+ var SPACE_CHARACTERS = /\s+/g;
2389
2430
  var Range = class _Range {
2390
2431
  constructor(range, options) {
2391
2432
  options = parseOptions(options);
@@ -2399,13 +2440,13 @@ var require_range = __commonJS({
2399
2440
  if (range instanceof Comparator) {
2400
2441
  this.raw = range.value;
2401
2442
  this.set = [[range]];
2402
- this.format();
2443
+ this.formatted = void 0;
2403
2444
  return this;
2404
2445
  }
2405
2446
  this.options = options;
2406
2447
  this.loose = !!options.loose;
2407
2448
  this.includePrerelease = !!options.includePrerelease;
2408
- this.raw = range.trim().split(/\s+/).join(" ");
2449
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
2409
2450
  this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
2410
2451
  if (!this.set.length) {
2411
2452
  throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
@@ -2424,10 +2465,27 @@ var require_range = __commonJS({
2424
2465
  }
2425
2466
  }
2426
2467
  }
2427
- this.format();
2468
+ this.formatted = void 0;
2469
+ }
2470
+ get range() {
2471
+ if (this.formatted === void 0) {
2472
+ this.formatted = "";
2473
+ for (let i = 0; i < this.set.length; i++) {
2474
+ if (i > 0) {
2475
+ this.formatted += "||";
2476
+ }
2477
+ const comps = this.set[i];
2478
+ for (let k = 0; k < comps.length; k++) {
2479
+ if (k > 0) {
2480
+ this.formatted += " ";
2481
+ }
2482
+ this.formatted += comps[k].toString().trim();
2483
+ }
2484
+ }
2485
+ }
2486
+ return this.formatted;
2428
2487
  }
2429
2488
  format() {
2430
- this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
2431
2489
  return this.range;
2432
2490
  }
2433
2491
  toString() {
@@ -2537,6 +2595,7 @@ var require_range = __commonJS({
2537
2595
  return result;
2538
2596
  };
2539
2597
  var parseComparator = (comp, options) => {
2598
+ comp = comp.replace(re[t.BUILD], "");
2540
2599
  debug2("comp", comp, options);
2541
2600
  comp = replaceCarets(comp, options);
2542
2601
  debug2("caret", comp);
@@ -2740,9 +2799,9 @@ var require_range = __commonJS({
2740
2799
  }
2741
2800
  });
2742
2801
 
2743
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/classes/comparator.js
2802
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
2744
2803
  var require_comparator = __commonJS({
2745
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/classes/comparator.js"(exports, module2) {
2804
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js"(exports, module2) {
2746
2805
  "use strict";
2747
2806
  init_esm_shims();
2748
2807
  var ANY = Symbol("SemVer ANY");
@@ -2854,9 +2913,9 @@ var require_comparator = __commonJS({
2854
2913
  }
2855
2914
  });
2856
2915
 
2857
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/satisfies.js
2916
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
2858
2917
  var require_satisfies = __commonJS({
2859
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/satisfies.js"(exports, module2) {
2918
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports, module2) {
2860
2919
  "use strict";
2861
2920
  init_esm_shims();
2862
2921
  var Range = require_range();
@@ -2872,9 +2931,9 @@ var require_satisfies = __commonJS({
2872
2931
  }
2873
2932
  });
2874
2933
 
2875
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/to-comparators.js
2934
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js
2876
2935
  var require_to_comparators = __commonJS({
2877
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/to-comparators.js"(exports, module2) {
2936
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js"(exports, module2) {
2878
2937
  "use strict";
2879
2938
  init_esm_shims();
2880
2939
  var Range = require_range();
@@ -2883,9 +2942,9 @@ var require_to_comparators = __commonJS({
2883
2942
  }
2884
2943
  });
2885
2944
 
2886
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/max-satisfying.js
2945
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js
2887
2946
  var require_max_satisfying = __commonJS({
2888
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
2947
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
2889
2948
  "use strict";
2890
2949
  init_esm_shims();
2891
2950
  var SemVer = require_semver();
@@ -2913,9 +2972,9 @@ var require_max_satisfying = __commonJS({
2913
2972
  }
2914
2973
  });
2915
2974
 
2916
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/min-satisfying.js
2975
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js
2917
2976
  var require_min_satisfying = __commonJS({
2918
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
2977
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
2919
2978
  "use strict";
2920
2979
  init_esm_shims();
2921
2980
  var SemVer = require_semver();
@@ -2943,9 +3002,9 @@ var require_min_satisfying = __commonJS({
2943
3002
  }
2944
3003
  });
2945
3004
 
2946
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/min-version.js
3005
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js
2947
3006
  var require_min_version = __commonJS({
2948
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/min-version.js"(exports, module2) {
3007
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js"(exports, module2) {
2949
3008
  "use strict";
2950
3009
  init_esm_shims();
2951
3010
  var SemVer = require_semver();
@@ -2975,6 +3034,7 @@ var require_min_version = __commonJS({
2975
3034
  compver.prerelease.push(0);
2976
3035
  }
2977
3036
  compver.raw = compver.format();
3037
+ /* fallthrough */
2978
3038
  case "":
2979
3039
  case ">=":
2980
3040
  if (!setMin || gt(compver, setMin)) {
@@ -2984,6 +3044,7 @@ var require_min_version = __commonJS({
2984
3044
  case "<":
2985
3045
  case "<=":
2986
3046
  break;
3047
+ /* istanbul ignore next */
2987
3048
  default:
2988
3049
  throw new Error(`Unexpected operation: ${comparator.operator}`);
2989
3050
  }
@@ -3001,9 +3062,9 @@ var require_min_version = __commonJS({
3001
3062
  }
3002
3063
  });
3003
3064
 
3004
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/valid.js
3065
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js
3005
3066
  var require_valid2 = __commonJS({
3006
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/valid.js"(exports, module2) {
3067
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js"(exports, module2) {
3007
3068
  "use strict";
3008
3069
  init_esm_shims();
3009
3070
  var Range = require_range();
@@ -3018,9 +3079,9 @@ var require_valid2 = __commonJS({
3018
3079
  }
3019
3080
  });
3020
3081
 
3021
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/outside.js
3082
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js
3022
3083
  var require_outside = __commonJS({
3023
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/outside.js"(exports, module2) {
3084
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js"(exports, module2) {
3024
3085
  "use strict";
3025
3086
  init_esm_shims();
3026
3087
  var SemVer = require_semver();
@@ -3088,9 +3149,9 @@ var require_outside = __commonJS({
3088
3149
  }
3089
3150
  });
3090
3151
 
3091
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/gtr.js
3152
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js
3092
3153
  var require_gtr = __commonJS({
3093
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/gtr.js"(exports, module2) {
3154
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js"(exports, module2) {
3094
3155
  "use strict";
3095
3156
  init_esm_shims();
3096
3157
  var outside = require_outside();
@@ -3099,9 +3160,9 @@ var require_gtr = __commonJS({
3099
3160
  }
3100
3161
  });
3101
3162
 
3102
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/ltr.js
3163
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js
3103
3164
  var require_ltr = __commonJS({
3104
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/ltr.js"(exports, module2) {
3165
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js"(exports, module2) {
3105
3166
  "use strict";
3106
3167
  init_esm_shims();
3107
3168
  var outside = require_outside();
@@ -3110,9 +3171,9 @@ var require_ltr = __commonJS({
3110
3171
  }
3111
3172
  });
3112
3173
 
3113
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/intersects.js
3174
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js
3114
3175
  var require_intersects = __commonJS({
3115
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/intersects.js"(exports, module2) {
3176
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js"(exports, module2) {
3116
3177
  "use strict";
3117
3178
  init_esm_shims();
3118
3179
  var Range = require_range();
@@ -3125,9 +3186,9 @@ var require_intersects = __commonJS({
3125
3186
  }
3126
3187
  });
3127
3188
 
3128
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/simplify.js
3189
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js
3129
3190
  var require_simplify = __commonJS({
3130
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/simplify.js"(exports, module2) {
3191
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js"(exports, module2) {
3131
3192
  "use strict";
3132
3193
  init_esm_shims();
3133
3194
  var satisfies = require_satisfies();
@@ -3176,9 +3237,9 @@ var require_simplify = __commonJS({
3176
3237
  }
3177
3238
  });
3178
3239
 
3179
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/subset.js
3240
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js
3180
3241
  var require_subset = __commonJS({
3181
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/ranges/subset.js"(exports, module2) {
3242
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js"(exports, module2) {
3182
3243
  "use strict";
3183
3244
  init_esm_shims();
3184
3245
  var Range = require_range();
@@ -3339,9 +3400,9 @@ var require_subset = __commonJS({
3339
3400
  }
3340
3401
  });
3341
3402
 
3342
- // ../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/index.js
3403
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js
3343
3404
  var require_semver2 = __commonJS({
3344
- "../../node_modules/.pnpm/semver@7.6.2/node_modules/semver/index.js"(exports, module2) {
3405
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js"(exports, module2) {
3345
3406
  "use strict";
3346
3407
  init_esm_shims();
3347
3408
  var internalRe = require_re();
@@ -3586,9 +3647,9 @@ var require_get_stream = __commonJS({
3586
3647
  }
3587
3648
  });
3588
3649
 
3589
- // ../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js
3650
+ // ../../node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js
3590
3651
  var require_http_cache_semantics = __commonJS({
3591
- "../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js"(exports, module2) {
3652
+ "../../node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js"(exports, module2) {
3592
3653
  "use strict";
3593
3654
  init_esm_shims();
3594
3655
  var statusCodeCacheableByDefault = /* @__PURE__ */ new Set([
@@ -3678,6 +3739,17 @@ var require_http_cache_semantics = __commonJS({
3678
3739
  return parts.join(", ");
3679
3740
  }
3680
3741
  module2.exports = class CachePolicy {
3742
+ /**
3743
+ * Creates a new CachePolicy instance.
3744
+ * @param {HttpRequest} req - Incoming client request.
3745
+ * @param {HttpResponse} res - Received server response.
3746
+ * @param {Object} [options={}] - Configuration options.
3747
+ * @param {boolean} [options.shared=true] - Is the cache shared (a public proxy)? `false` for personal browser caches.
3748
+ * @param {number} [options.cacheHeuristic=0.1] - Fallback heuristic (age fraction) for cache duration.
3749
+ * @param {number} [options.immutableMinTimeToLive=86400000] - Minimum TTL for immutable responses in milliseconds.
3750
+ * @param {boolean} [options.ignoreCargoCult=false] - Detect nonsense cache headers, and override them.
3751
+ * @param {any} [options._fromObject] - Internal parameter for deserialization. Do not use.
3752
+ */
3681
3753
  constructor(req, res, {
3682
3754
  shared,
3683
3755
  cacheHeuristic,
@@ -3695,6 +3767,7 @@ var require_http_cache_semantics = __commonJS({
3695
3767
  this._assertRequestHasHeaders(req);
3696
3768
  this._responseTime = this.now();
3697
3769
  this._isShared = shared !== false;
3770
+ this._ignoreCargoCult = !!ignoreCargoCult;
3698
3771
  this._cacheHeuristic = void 0 !== cacheHeuristic ? cacheHeuristic : 0.1;
3699
3772
  this._immutableMinTtl = void 0 !== immutableMinTimeToLive ? immutableMinTimeToLive : 24 * 3600 * 1e3;
3700
3773
  this._status = "status" in res ? res.status : 200;
@@ -3706,7 +3779,7 @@ var require_http_cache_semantics = __commonJS({
3706
3779
  this._noAuthorization = !req.headers.authorization;
3707
3780
  this._reqHeaders = res.headers.vary ? req.headers : null;
3708
3781
  this._reqcc = parseCacheControl(req.headers["cache-control"]);
3709
- if (ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) {
3782
+ if (this._ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) {
3710
3783
  delete this._rescc["pre-check"];
3711
3784
  delete this._rescc["post-check"];
3712
3785
  delete this._rescc["no-cache"];
@@ -3722,9 +3795,17 @@ var require_http_cache_semantics = __commonJS({
3722
3795
  this._rescc["no-cache"] = true;
3723
3796
  }
3724
3797
  }
3798
+ /**
3799
+ * You can monkey-patch it for testing.
3800
+ * @returns {number} Current time in milliseconds.
3801
+ */
3725
3802
  now() {
3726
3803
  return Date.now();
3727
3804
  }
3805
+ /**
3806
+ * Determines if the response is storable in a cache.
3807
+ * @returns {boolean} `false` if can never be cached.
3808
+ */
3728
3809
  storable() {
3729
3810
  return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
3730
3811
  // The request method is understood by the cache and defined as being cacheable, and
@@ -3740,42 +3821,142 @@ var require_http_cache_semantics = __commonJS({
3740
3821
  this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
3741
3822
  statusCodeCacheableByDefault.has(this._status)));
3742
3823
  }
3824
+ /**
3825
+ * @returns {boolean} true if expiration is explicitly defined.
3826
+ */
3743
3827
  _hasExplicitExpiration() {
3744
- return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
3828
+ return !!(this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires);
3745
3829
  }
3830
+ /**
3831
+ * @param {HttpRequest} req - a request
3832
+ * @throws {Error} if the headers are missing.
3833
+ */
3746
3834
  _assertRequestHasHeaders(req) {
3747
3835
  if (!req || !req.headers) {
3748
3836
  throw Error("Request headers missing");
3749
3837
  }
3750
3838
  }
3839
+ /**
3840
+ * Checks if the request matches the cache and can be satisfied from the cache immediately,
3841
+ * without having to make a request to the server.
3842
+ *
3843
+ * This doesn't support `stale-while-revalidate`. See `evaluateRequest()` for a more complete solution.
3844
+ *
3845
+ * @param {HttpRequest} req - The new incoming HTTP request.
3846
+ * @returns {boolean} `true`` if the cached response used to construct this cache policy satisfies the request without revalidation.
3847
+ */
3751
3848
  satisfiesWithoutRevalidation(req) {
3849
+ const result = this.evaluateRequest(req);
3850
+ return !result.revalidation;
3851
+ }
3852
+ /**
3853
+ * @param {{headers: Record<string, string>, synchronous: boolean}|undefined} revalidation - Revalidation information, if any.
3854
+ * @returns {{response: {headers: Record<string, string>}, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object with a cached response headers and revalidation info.
3855
+ */
3856
+ _evaluateRequestHitResult(revalidation) {
3857
+ return {
3858
+ response: {
3859
+ headers: this.responseHeaders()
3860
+ },
3861
+ revalidation
3862
+ };
3863
+ }
3864
+ /**
3865
+ * @param {HttpRequest} request - new incoming
3866
+ * @param {boolean} synchronous - whether revalidation must be synchronous (not s-w-r).
3867
+ * @returns {{headers: Record<string, string>, synchronous: boolean}} An object with revalidation headers and a synchronous flag.
3868
+ */
3869
+ _evaluateRequestRevalidation(request, synchronous) {
3870
+ return {
3871
+ synchronous,
3872
+ headers: this.revalidationHeaders(request)
3873
+ };
3874
+ }
3875
+ /**
3876
+ * @param {HttpRequest} request - new incoming
3877
+ * @returns {{response: undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}}} An object indicating no cached response and revalidation details.
3878
+ */
3879
+ _evaluateRequestMissResult(request) {
3880
+ return {
3881
+ response: void 0,
3882
+ revalidation: this._evaluateRequestRevalidation(request, true)
3883
+ };
3884
+ }
3885
+ /**
3886
+ * Checks if the given request matches this cache entry, and how the cache can be used to satisfy it. Returns an object with:
3887
+ *
3888
+ * ```
3889
+ * {
3890
+ * // If defined, you must send a request to the server.
3891
+ * revalidation: {
3892
+ * headers: {}, // HTTP headers to use when sending the revalidation response
3893
+ * // If true, you MUST wait for a response from the server before using the cache
3894
+ * // If false, this is stale-while-revalidate. The cache is stale, but you can use it while you update it asynchronously.
3895
+ * synchronous: bool,
3896
+ * },
3897
+ * // If defined, you can use this cached response.
3898
+ * response: {
3899
+ * headers: {}, // Updated cached HTTP headers you must use when responding to the client
3900
+ * },
3901
+ * }
3902
+ * ```
3903
+ * @param {HttpRequest} req - new incoming HTTP request
3904
+ * @returns {{response: {headers: Record<string, string>}|undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object containing keys:
3905
+ * - revalidation: { headers: Record<string, string>, synchronous: boolean } Set if you should send this to the origin server
3906
+ * - response: { headers: Record<string, string> } Set if you can respond to the client with these cached headers
3907
+ */
3908
+ evaluateRequest(req) {
3752
3909
  this._assertRequestHasHeaders(req);
3910
+ if (this._rescc["must-revalidate"]) {
3911
+ return this._evaluateRequestMissResult(req);
3912
+ }
3913
+ if (!this._requestMatches(req, false)) {
3914
+ return this._evaluateRequestMissResult(req);
3915
+ }
3753
3916
  const requestCC = parseCacheControl(req.headers["cache-control"]);
3754
3917
  if (requestCC["no-cache"] || /no-cache/.test(req.headers.pragma)) {
3755
- return false;
3918
+ return this._evaluateRequestMissResult(req);
3756
3919
  }
3757
- if (requestCC["max-age"] && this.age() > requestCC["max-age"]) {
3758
- return false;
3920
+ if (requestCC["max-age"] && this.age() > toNumberOrZero(requestCC["max-age"])) {
3921
+ return this._evaluateRequestMissResult(req);
3759
3922
  }
3760
- if (requestCC["min-fresh"] && this.timeToLive() < 1e3 * requestCC["min-fresh"]) {
3761
- return false;
3923
+ if (requestCC["min-fresh"] && this.maxAge() - this.age() < toNumberOrZero(requestCC["min-fresh"])) {
3924
+ return this._evaluateRequestMissResult(req);
3762
3925
  }
3763
3926
  if (this.stale()) {
3764
- const allowsStale = requestCC["max-stale"] && !this._rescc["must-revalidate"] && (true === requestCC["max-stale"] || requestCC["max-stale"] > this.age() - this.maxAge());
3765
- if (!allowsStale) {
3766
- return false;
3927
+ const allowsStaleWithoutRevalidation = "max-stale" in requestCC && (true === requestCC["max-stale"] || requestCC["max-stale"] > this.age() - this.maxAge());
3928
+ if (allowsStaleWithoutRevalidation) {
3929
+ return this._evaluateRequestHitResult(void 0);
3767
3930
  }
3931
+ if (this.useStaleWhileRevalidate()) {
3932
+ return this._evaluateRequestHitResult(this._evaluateRequestRevalidation(req, false));
3933
+ }
3934
+ return this._evaluateRequestMissResult(req);
3768
3935
  }
3769
- return this._requestMatches(req, false);
3936
+ return this._evaluateRequestHitResult(void 0);
3770
3937
  }
3938
+ /**
3939
+ * @param {HttpRequest} req - check if this is for the same cache entry
3940
+ * @param {boolean} allowHeadMethod - allow a HEAD method to match.
3941
+ * @returns {boolean} `true` if the request matches.
3942
+ */
3771
3943
  _requestMatches(req, allowHeadMethod) {
3772
- return (!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and
3944
+ return !!((!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and
3773
3945
  (!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && // selecting header fields nominated by the stored response (if any) match those presented, and
3774
- this._varyMatches(req);
3946
+ this._varyMatches(req));
3775
3947
  }
3948
+ /**
3949
+ * Determines whether storing authenticated responses is allowed.
3950
+ * @returns {boolean} `true` if allowed.
3951
+ */
3776
3952
  _allowsStoringAuthenticated() {
3777
- return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
3953
+ return !!(this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"]);
3778
3954
  }
3955
+ /**
3956
+ * Checks whether the Vary header in the response matches the new request.
3957
+ * @param {HttpRequest} req - incoming HTTP request
3958
+ * @returns {boolean} `true` if the vary headers match.
3959
+ */
3779
3960
  _varyMatches(req) {
3780
3961
  if (!this._resHeaders.vary) {
3781
3962
  return true;
@@ -3789,6 +3970,11 @@ var require_http_cache_semantics = __commonJS({
3789
3970
  }
3790
3971
  return true;
3791
3972
  }
3973
+ /**
3974
+ * Creates a copy of the given headers without any hop-by-hop headers.
3975
+ * @param {Record<string, string>} inHeaders - old headers from the cached response
3976
+ * @returns {Record<string, string>} A new headers object without hop-by-hop headers.
3977
+ */
3792
3978
  _copyWithoutHopByHopHeaders(inHeaders) {
3793
3979
  const headers = {};
3794
3980
  for (const name in inHeaders) {
@@ -3813,6 +3999,11 @@ var require_http_cache_semantics = __commonJS({
3813
3999
  }
3814
4000
  return headers;
3815
4001
  }
4002
+ /**
4003
+ * Returns the response headers adjusted for serving the cached response.
4004
+ * Removes hop-by-hop headers and updates the Age and Date headers.
4005
+ * @returns {Record<string, string>} The adjusted response headers.
4006
+ */
3816
4007
  responseHeaders() {
3817
4008
  const headers = this._copyWithoutHopByHopHeaders(this._resHeaders);
3818
4009
  const age = this.age();
@@ -3824,8 +4015,8 @@ var require_http_cache_semantics = __commonJS({
3824
4015
  return headers;
3825
4016
  }
3826
4017
  /**
3827
- * Value of the Date response header or current time if Date was invalid
3828
- * @return timestamp
4018
+ * Returns the Date header value from the response or the current time if invalid.
4019
+ * @returns {number} Timestamp (in milliseconds) representing the Date header or response time.
3829
4020
  */
3830
4021
  date() {
3831
4022
  const serverDate = Date.parse(this._resHeaders.date);
@@ -3837,23 +4028,27 @@ var require_http_cache_semantics = __commonJS({
3837
4028
  /**
3838
4029
  * Value of the Age header, in seconds, updated for the current time.
3839
4030
  * May be fractional.
3840
- *
3841
- * @return Number
4031
+ * @returns {number} The age in seconds.
3842
4032
  */
3843
4033
  age() {
3844
4034
  let age = this._ageValue();
3845
4035
  const residentTime = (this.now() - this._responseTime) / 1e3;
3846
4036
  return age + residentTime;
3847
4037
  }
4038
+ /**
4039
+ * @returns {number} The Age header value as a number.
4040
+ */
3848
4041
  _ageValue() {
3849
4042
  return toNumberOrZero(this._resHeaders.age);
3850
4043
  }
3851
4044
  /**
3852
- * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
4045
+ * Possibly outdated value of applicable max-age (or heuristic equivalent) in seconds.
4046
+ * This counts since response's `Date`.
3853
4047
  *
3854
4048
  * For an up-to-date value, see `timeToLive()`.
3855
4049
  *
3856
- * @return Number
4050
+ * Returns the maximum age (freshness lifetime) of the response in seconds.
4051
+ * @returns {number} The max-age value in seconds.
3857
4052
  */
3858
4053
  maxAge() {
3859
4054
  if (!this.storable() || this._rescc["no-cache"]) {
@@ -3896,24 +4091,52 @@ var require_http_cache_semantics = __commonJS({
3896
4091
  }
3897
4092
  return defaultMinTtl;
3898
4093
  }
4094
+ /**
4095
+ * Remaining time this cache entry may be useful for, in *milliseconds*.
4096
+ * You can use this as an expiration time for your cache storage.
4097
+ *
4098
+ * Prefer this method over `maxAge()`, because it includes other factors like `age` and `stale-while-revalidate`.
4099
+ * @returns {number} Time-to-live in milliseconds.
4100
+ */
3899
4101
  timeToLive() {
3900
4102
  const age = this.maxAge() - this.age();
3901
4103
  const staleIfErrorAge = age + toNumberOrZero(this._rescc["stale-if-error"]);
3902
4104
  const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc["stale-while-revalidate"]);
3903
- return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3;
4105
+ return Math.round(Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3);
3904
4106
  }
4107
+ /**
4108
+ * If true, this cache entry is past its expiration date.
4109
+ * Note that stale cache may be useful sometimes, see `evaluateRequest()`.
4110
+ * @returns {boolean} `false` doesn't mean it's fresh nor usable
4111
+ */
3905
4112
  stale() {
3906
4113
  return this.maxAge() <= this.age();
3907
4114
  }
4115
+ /**
4116
+ * @returns {boolean} `true` if `stale-if-error` condition allows use of a stale response.
4117
+ */
3908
4118
  _useStaleIfError() {
3909
4119
  return this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > this.age();
3910
4120
  }
4121
+ /** See `evaluateRequest()` for a more complete solution
4122
+ * @returns {boolean} `true` if `stale-while-revalidate` is currently allowed.
4123
+ */
3911
4124
  useStaleWhileRevalidate() {
3912
- return this.maxAge() + toNumberOrZero(this._rescc["stale-while-revalidate"]) > this.age();
4125
+ const swr = toNumberOrZero(this._rescc["stale-while-revalidate"]);
4126
+ return swr > 0 && this.maxAge() + swr > this.age();
3913
4127
  }
4128
+ /**
4129
+ * Creates a `CachePolicy` instance from a serialized object.
4130
+ * @param {Object} obj - The serialized object.
4131
+ * @returns {CachePolicy} A new CachePolicy instance.
4132
+ */
3914
4133
  static fromObject(obj) {
3915
4134
  return new this(void 0, void 0, { _fromObject: obj });
3916
4135
  }
4136
+ /**
4137
+ * @param {any} obj - The serialized object.
4138
+ * @throws {Error} If already initialized or if the object is invalid.
4139
+ */
3917
4140
  _fromObject(obj) {
3918
4141
  if (this._responseTime) throw Error("Reinitialized");
3919
4142
  if (!obj || obj.v !== 1) throw Error("Invalid serialization");
@@ -3921,6 +4144,7 @@ var require_http_cache_semantics = __commonJS({
3921
4144
  this._isShared = obj.sh;
3922
4145
  this._cacheHeuristic = obj.ch;
3923
4146
  this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3;
4147
+ this._ignoreCargoCult = !!obj.icc;
3924
4148
  this._status = obj.st;
3925
4149
  this._resHeaders = obj.resh;
3926
4150
  this._rescc = obj.rescc;
@@ -3931,6 +4155,10 @@ var require_http_cache_semantics = __commonJS({
3931
4155
  this._reqHeaders = obj.reqh;
3932
4156
  this._reqcc = obj.reqcc;
3933
4157
  }
4158
+ /**
4159
+ * Serializes the `CachePolicy` instance into a JSON-serializable object.
4160
+ * @returns {Object} The serialized object.
4161
+ */
3934
4162
  toObject() {
3935
4163
  return {
3936
4164
  v: 1,
@@ -3938,6 +4166,7 @@ var require_http_cache_semantics = __commonJS({
3938
4166
  sh: this._isShared,
3939
4167
  ch: this._cacheHeuristic,
3940
4168
  imm: this._immutableMinTtl,
4169
+ icc: this._ignoreCargoCult,
3941
4170
  st: this._status,
3942
4171
  resh: this._resHeaders,
3943
4172
  rescc: this._rescc,
@@ -3955,6 +4184,8 @@ var require_http_cache_semantics = __commonJS({
3955
4184
  *
3956
4185
  * Hop by hop headers are always stripped.
3957
4186
  * Revalidation headers may be added or removed, depending on request.
4187
+ * @param {HttpRequest} incomingReq - The incoming HTTP request.
4188
+ * @returns {Record<string, string>} The headers for the revalidation request.
3958
4189
  */
3959
4190
  revalidationHeaders(incomingReq) {
3960
4191
  this._assertRequestHasHeaders(incomingReq);
@@ -3993,15 +4224,18 @@ var require_http_cache_semantics = __commonJS({
3993
4224
  * Returns {policy, modified} where modified is a boolean indicating
3994
4225
  * whether the response body has been modified, and old cached body can't be used.
3995
4226
  *
3996
- * @return {Object} {policy: CachePolicy, modified: Boolean}
4227
+ * @param {HttpRequest} request - The latest HTTP request asking for the cached entry.
4228
+ * @param {HttpResponse} response - The latest revalidation HTTP response from the origin server.
4229
+ * @returns {{policy: CachePolicy, modified: boolean, matches: boolean}} The updated policy and modification status.
4230
+ * @throws {Error} If the response headers are missing.
3997
4231
  */
3998
4232
  revalidatedPolicy(request, response) {
3999
4233
  this._assertRequestHasHeaders(request);
4000
4234
  if (this._useStaleIfError() && isErrorResponse(response)) {
4001
4235
  return {
4236
+ policy: this,
4002
4237
  modified: false,
4003
- matches: false,
4004
- policy: this
4238
+ matches: true
4005
4239
  };
4006
4240
  }
4007
4241
  if (!response || !response.headers) {
@@ -4021,9 +4255,15 @@ var require_http_cache_semantics = __commonJS({
4021
4255
  matches = true;
4022
4256
  }
4023
4257
  }
4258
+ const optionsCopy = {
4259
+ shared: this._isShared,
4260
+ cacheHeuristic: this._cacheHeuristic,
4261
+ immutableMinTimeToLive: this._immutableMinTtl,
4262
+ ignoreCargoCult: this._ignoreCargoCult
4263
+ };
4024
4264
  if (!matches) {
4025
4265
  return {
4026
- policy: new this.constructor(request, response),
4266
+ policy: new this.constructor(request, response, optionsCopy),
4027
4267
  // Client receiving 304 without body, even if it's invalid/mismatched has no option
4028
4268
  // but to reuse a cached body. We don't have a good way to tell clients to do
4029
4269
  // error recovery in such case.
@@ -4041,11 +4281,7 @@ var require_http_cache_semantics = __commonJS({
4041
4281
  headers
4042
4282
  });
4043
4283
  return {
4044
- policy: new this.constructor(request, newResponse, {
4045
- shared: this._isShared,
4046
- cacheHeuristic: this._cacheHeuristic,
4047
- immutableMinTimeToLive: this._immutableMinTtl
4048
- }),
4284
+ policy: new this.constructor(request, newResponse, optionsCopy),
4049
4285
  modified: false,
4050
4286
  matches: true
4051
4287
  };
@@ -7118,7 +7354,7 @@ var require_polyfills2 = __commonJS({
7118
7354
  };
7119
7355
  }
7120
7356
  if (platform === "win32") {
7121
- fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
7357
+ fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : (function(fs$rename) {
7122
7358
  function rename(from, to, cb) {
7123
7359
  var start = Date.now();
7124
7360
  var backoff = 0;
@@ -7141,9 +7377,9 @@ var require_polyfills2 = __commonJS({
7141
7377
  }
7142
7378
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
7143
7379
  return rename;
7144
- }(fs3.rename);
7380
+ })(fs3.rename);
7145
7381
  }
7146
- fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
7382
+ fs3.read = typeof fs3.read !== "function" ? fs3.read : (function(fs$read) {
7147
7383
  function read(fd, buffer, offset, length, position, callback_) {
7148
7384
  var callback;
7149
7385
  if (callback_ && typeof callback_ === "function") {
@@ -7160,8 +7396,8 @@ var require_polyfills2 = __commonJS({
7160
7396
  }
7161
7397
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
7162
7398
  return read;
7163
- }(fs3.read);
7164
- fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
7399
+ })(fs3.read);
7400
+ fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) {
7165
7401
  return function(fd, buffer, offset, length, position) {
7166
7402
  var eagCounter = 0;
7167
7403
  while (true) {
@@ -7176,7 +7412,7 @@ var require_polyfills2 = __commonJS({
7176
7412
  }
7177
7413
  }
7178
7414
  };
7179
- }(fs3.readSync);
7415
+ })(fs3.readSync);
7180
7416
  function patchLchmod(fs4) {
7181
7417
  fs4.lchmod = function(path7, mode, callback) {
7182
7418
  fs4.open(
@@ -7502,7 +7738,7 @@ var require_graceful_fs2 = __commonJS({
7502
7738
  if (!fs3[gracefulQueue]) {
7503
7739
  queue = global[gracefulQueue] || [];
7504
7740
  publishQueue(fs3, queue);
7505
- fs3.close = function(fs$close) {
7741
+ fs3.close = (function(fs$close) {
7506
7742
  function close(fd, cb) {
7507
7743
  return fs$close.call(fs3, fd, function(err) {
7508
7744
  if (!err) {
@@ -7516,8 +7752,8 @@ var require_graceful_fs2 = __commonJS({
7516
7752
  value: fs$close
7517
7753
  });
7518
7754
  return close;
7519
- }(fs3.close);
7520
- fs3.closeSync = function(fs$closeSync) {
7755
+ })(fs3.close);
7756
+ fs3.closeSync = (function(fs$closeSync) {
7521
7757
  function closeSync(fd) {
7522
7758
  fs$closeSync.apply(fs3, arguments);
7523
7759
  resetQueue();
@@ -7526,7 +7762,7 @@ var require_graceful_fs2 = __commonJS({
7526
7762
  value: fs$closeSync
7527
7763
  });
7528
7764
  return closeSync;
7529
- }(fs3.closeSync);
7765
+ })(fs3.closeSync);
7530
7766
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
7531
7767
  process.on("exit", function() {
7532
7768
  debug2(fs3[gracefulQueue]);
@@ -7866,7 +8102,7 @@ var require_dist = __commonJS({
7866
8102
  "../../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/index.js"(exports) {
7867
8103
  "use strict";
7868
8104
  init_esm_shims();
7869
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
8105
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
7870
8106
  if (k2 === void 0) k2 = k;
7871
8107
  var desc = Object.getOwnPropertyDescriptor(m, k);
7872
8108
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -7875,10 +8111,10 @@ var require_dist = __commonJS({
7875
8111
  } };
7876
8112
  }
7877
8113
  Object.defineProperty(o, k2, desc);
7878
- } : function(o, m, k, k2) {
8114
+ }) : (function(o, m, k, k2) {
7879
8115
  if (k2 === void 0) k2 = k;
7880
8116
  o[k2] = m[k];
7881
- });
8117
+ }));
7882
8118
  var __exportStar = exports && exports.__exportStar || function(m, exports2) {
7883
8119
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
7884
8120
  };
@@ -8229,9 +8465,9 @@ var require_config_chain = __commonJS({
8229
8465
  }
8230
8466
  });
8231
8467
 
8232
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
8468
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
8233
8469
  var require_envKeyToSetting = __commonJS({
8234
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js"(exports, module2) {
8470
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js"(exports, module2) {
8235
8471
  "use strict";
8236
8472
  init_esm_shims();
8237
8473
  module2.exports = function(x) {
@@ -8305,14 +8541,20 @@ var require_dist2 = __commonJS({
8305
8541
  }
8306
8542
  });
8307
8543
 
8308
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/util.js
8544
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js
8309
8545
  var require_util = __commonJS({
8310
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/util.js"(exports) {
8546
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js"(exports) {
8311
8547
  "use strict";
8312
8548
  init_esm_shims();
8313
8549
  var fs3 = __require("fs");
8314
8550
  var path7 = __require("path");
8315
8551
  var { envReplace } = require_dist2();
8552
+ var parseKey = (key) => {
8553
+ if (typeof key !== "string") {
8554
+ return key;
8555
+ }
8556
+ return envReplace(key, process.env);
8557
+ };
8316
8558
  var parseField = (types2, field, key) => {
8317
8559
  if (typeof field !== "string") {
8318
8560
  return field;
@@ -8334,6 +8576,7 @@ var require_util = __commonJS({
8334
8576
  return true;
8335
8577
  }
8336
8578
  switch (field) {
8579
+ // eslint-disable-line default-case
8337
8580
  case "true": {
8338
8581
  return true;
8339
8582
  }
@@ -8400,12 +8643,13 @@ var require_util = __commonJS({
8400
8643
  exports.envReplace = envReplace;
8401
8644
  exports.findPrefix = findPrefix;
8402
8645
  exports.parseField = parseField;
8646
+ exports.parseKey = parseKey;
8403
8647
  }
8404
8648
  });
8405
8649
 
8406
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/types.js
8650
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js
8407
8651
  var require_types = __commonJS({
8408
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/types.js"(exports) {
8652
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js"(exports) {
8409
8653
  "use strict";
8410
8654
  init_esm_shims();
8411
8655
  var path7 = __require("path");
@@ -8543,9 +8787,9 @@ var require_types = __commonJS({
8543
8787
  }
8544
8788
  });
8545
8789
 
8546
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/conf.js
8790
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js
8547
8791
  var require_conf = __commonJS({
8548
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/conf.js"(exports, module2) {
8792
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js"(exports, module2) {
8549
8793
  "use strict";
8550
8794
  init_esm_shims();
8551
8795
  var { readCAFileSync } = require_dist();
@@ -8564,8 +8808,12 @@ var require_conf = __commonJS({
8564
8808
  // https://github.com/npm/cli/blob/latest/lib/config/core.js#L326-L338
8565
8809
  add(data, marker) {
8566
8810
  try {
8567
- for (const x of Object.keys(data)) {
8568
- data[x] = this._parseField(data[x], x);
8811
+ for (const [key, value] of Object.entries(data)) {
8812
+ const substKey = util.parseKey(key);
8813
+ if (substKey !== key) {
8814
+ delete data[key];
8815
+ }
8816
+ data[substKey] = this._parseField(value, substKey);
8569
8817
  }
8570
8818
  } catch (error2) {
8571
8819
  throw error2;
@@ -8585,7 +8833,7 @@ var require_conf = __commonJS({
8585
8833
  } catch (error2) {
8586
8834
  if (error2.code === "ENOENT") {
8587
8835
  this.add({}, marker);
8588
- } else {
8836
+ } else if (error2.code !== "EISDIR") {
8589
8837
  return `Issue while reading "${file}". ${error2.message}`;
8590
8838
  }
8591
8839
  }
@@ -8598,7 +8846,9 @@ var require_conf = __commonJS({
8598
8846
  if (!env4[x]) {
8599
8847
  return;
8600
8848
  }
8601
- conf[envKeyToSetting(x.substr(11))] = env4[x];
8849
+ const key = envKeyToSetting(x.substr(11));
8850
+ const rawVal = env4[x];
8851
+ conf[key] = deserializeEnvVal(key, rawVal);
8602
8852
  });
8603
8853
  return super.addEnv("", conf, "env");
8604
8854
  }
@@ -8679,13 +8929,28 @@ var require_conf = __commonJS({
8679
8929
  }
8680
8930
  }
8681
8931
  };
8932
+ function deserializeEnvVal(envKey, envValue) {
8933
+ function deserializeList(envValue2) {
8934
+ const npmConfigSep = "\n\n";
8935
+ if (envValue2.indexOf(npmConfigSep)) {
8936
+ return envValue2.split(npmConfigSep);
8937
+ }
8938
+ return envValue2.split(",");
8939
+ }
8940
+ switch (envKey) {
8941
+ case "hoist-pattern":
8942
+ case "public-hoist-pattern":
8943
+ return deserializeList(envValue);
8944
+ }
8945
+ return envValue;
8946
+ }
8682
8947
  module2.exports = Conf;
8683
8948
  }
8684
8949
  });
8685
8950
 
8686
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/defaults.js
8951
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js
8687
8952
  var require_defaults = __commonJS({
8688
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/lib/defaults.js"(exports) {
8953
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js"(exports) {
8689
8954
  "use strict";
8690
8955
  init_esm_shims();
8691
8956
  var os6 = __require("os");
@@ -8852,9 +9117,9 @@ var require_defaults = __commonJS({
8852
9117
  }
8853
9118
  });
8854
9119
 
8855
- // ../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/index.js
9120
+ // ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js
8856
9121
  var require_npm_conf = __commonJS({
8857
- "../../node_modules/.pnpm/@pnpm+npm-conf@2.2.2/node_modules/@pnpm/npm-conf/index.js"(exports, module2) {
9122
+ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js"(exports, module2) {
8858
9123
  "use strict";
8859
9124
  init_esm_shims();
8860
9125
  var path7 = __require("path");
@@ -8917,12 +9182,11 @@ var require_npm_conf = __commonJS({
8917
9182
  }
8918
9183
  });
8919
9184
 
8920
- // ../../node_modules/.pnpm/registry-auth-token@5.0.2/node_modules/registry-auth-token/index.js
9185
+ // ../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js
8921
9186
  var require_registry_auth_token = __commonJS({
8922
- "../../node_modules/.pnpm/registry-auth-token@5.0.2/node_modules/registry-auth-token/index.js"(exports, module2) {
9187
+ "../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js"(exports, module2) {
8923
9188
  "use strict";
8924
9189
  init_esm_shims();
8925
- var url = __require("url");
8926
9190
  var npmConf = require_npm_conf();
8927
9191
  var tokenKey = ":_authToken";
8928
9192
  var legacyTokenKey = ":_auth";
@@ -8949,8 +9213,16 @@ var require_registry_auth_token = __commonJS({
8949
9213
  checkUrl = checkUrl || options.npmrc.get("registry") || npmConf.defaults.registry;
8950
9214
  return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc);
8951
9215
  };
9216
+ function urlResolve(from, to) {
9217
+ const resolvedUrl = new URL(to, new URL(from.startsWith("//") ? `./${from}` : from, "resolve://"));
9218
+ if (resolvedUrl.protocol === "resolve:") {
9219
+ const { pathname, search, hash } = resolvedUrl;
9220
+ return pathname + search + hash;
9221
+ }
9222
+ return resolvedUrl.toString();
9223
+ }
8952
9224
  function getRegistryAuthInfo(checkUrl, options) {
8953
- const parsed = url.parse(checkUrl, false, true);
9225
+ let parsed = checkUrl instanceof URL ? checkUrl : new URL(checkUrl.startsWith("//") ? `http:${checkUrl}` : checkUrl);
8954
9226
  let pathname;
8955
9227
  while (pathname !== "/" && parsed.pathname !== pathname) {
8956
9228
  pathname = parsed.pathname || "/";
@@ -8960,9 +9232,9 @@ var require_registry_auth_token = __commonJS({
8960
9232
  return authInfo;
8961
9233
  }
8962
9234
  if (!options.recursive) {
8963
- return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(url.resolve(checkUrl, "."), options);
9235
+ return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(new URL("./", parsed), options);
8964
9236
  }
8965
- parsed.pathname = url.resolve(normalizePath(pathname), "..") || "/";
9237
+ parsed.pathname = urlResolve(normalizePath(pathname), "..") || "/";
8966
9238
  }
8967
9239
  return void 0;
8968
9240
  }
@@ -10088,10 +10360,10 @@ import { runtime as runtime4 } from "@terai/runtime";
10088
10360
 
10089
10361
  // ../logger/dist/index.mjs
10090
10362
  init_esm_shims();
10091
- import process2 from "node:process";
10092
- import process3 from "node:process";
10093
- import os from "node:os";
10094
- import tty from "node:tty";
10363
+ import process2 from "process";
10364
+ import process3 from "process";
10365
+ import os from "os";
10366
+ import tty from "tty";
10095
10367
  var ANSI_BACKGROUND_OFFSET = 10;
10096
10368
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
10097
10369
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -10346,10 +10618,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
10346
10618
  return 1;
10347
10619
  }
10348
10620
  if ("CI" in env) {
10349
- if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
10621
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
10350
10622
  return 3;
10351
10623
  }
10352
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
10624
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
10353
10625
  return 1;
10354
10626
  }
10355
10627
  return min;
@@ -10363,6 +10635,12 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
10363
10635
  if (env.TERM === "xterm-kitty") {
10364
10636
  return 3;
10365
10637
  }
10638
+ if (env.TERM === "xterm-ghostty") {
10639
+ return 3;
10640
+ }
10641
+ if (env.TERM === "wezterm") {
10642
+ return 3;
10643
+ }
10366
10644
  if ("TERM_PROGRAM" in env) {
10367
10645
  const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
10368
10646
  switch (env.TERM_PROGRAM) {
@@ -10641,11 +10919,11 @@ init_esm_shims();
10641
10919
 
10642
10920
  // ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
10643
10921
  init_esm_shims();
10644
- import process10 from "node:process";
10645
- import { spawn } from "node:child_process";
10646
- import { fileURLToPath as fileURLToPath3 } from "node:url";
10647
- import path6 from "node:path";
10648
- import { format } from "node:util";
10922
+ import process10 from "process";
10923
+ import { spawn } from "child_process";
10924
+ import { fileURLToPath as fileURLToPath3 } from "url";
10925
+ import path6 from "path";
10926
+ import { format } from "util";
10649
10927
 
10650
10928
  // ../../node_modules/.pnpm/configstore@6.0.0/node_modules/configstore/index.js
10651
10929
  init_esm_shims();
@@ -10882,10 +11160,10 @@ ${permissionError}
10882
11160
  }
10883
11161
  };
10884
11162
 
10885
- // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
11163
+ // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
10886
11164
  init_esm_shims();
10887
11165
 
10888
- // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
11166
+ // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
10889
11167
  init_esm_shims();
10890
11168
  var ANSI_BACKGROUND_OFFSET2 = 10;
10891
11169
  var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -11072,11 +11350,11 @@ function assembleStyles2() {
11072
11350
  var ansiStyles2 = assembleStyles2();
11073
11351
  var ansi_styles_default2 = ansiStyles2;
11074
11352
 
11075
- // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
11353
+ // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
11076
11354
  init_esm_shims();
11077
- import process4 from "node:process";
11078
- import os4 from "node:os";
11079
- import tty2 from "node:tty";
11355
+ import process4 from "process";
11356
+ import os4 from "os";
11357
+ import tty2 from "tty";
11080
11358
  function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process4.argv) {
11081
11359
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
11082
11360
  const position = argv.indexOf(prefix + flag);
@@ -11147,10 +11425,10 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
11147
11425
  return 1;
11148
11426
  }
11149
11427
  if ("CI" in env3) {
11150
- if ("GITHUB_ACTIONS" in env3 || "GITEA_ACTIONS" in env3) {
11428
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env3)) {
11151
11429
  return 3;
11152
11430
  }
11153
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
11431
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
11154
11432
  return 1;
11155
11433
  }
11156
11434
  return min;
@@ -11164,6 +11442,12 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
11164
11442
  if (env3.TERM === "xterm-kitty") {
11165
11443
  return 3;
11166
11444
  }
11445
+ if (env3.TERM === "xterm-ghostty") {
11446
+ return 3;
11447
+ }
11448
+ if (env3.TERM === "wezterm") {
11449
+ return 3;
11450
+ }
11167
11451
  if ("TERM_PROGRAM" in env3) {
11168
11452
  const version = Number.parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
11169
11453
  switch (env3.TERM_PROGRAM) {
@@ -11199,7 +11483,7 @@ var supportsColor2 = {
11199
11483
  };
11200
11484
  var supports_color_default2 = supportsColor2;
11201
11485
 
11202
- // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
11486
+ // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
11203
11487
  init_esm_shims();
11204
11488
  function stringReplaceAll2(string, substring, replacer) {
11205
11489
  let index = string.indexOf(substring);
@@ -11230,7 +11514,7 @@ function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
11230
11514
  return returnValue;
11231
11515
  }
11232
11516
 
11233
- // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
11517
+ // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
11234
11518
  var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
11235
11519
  var GENERATOR2 = Symbol("GENERATOR");
11236
11520
  var STYLER2 = Symbol("STYLER");
@@ -11397,8 +11681,8 @@ init_esm_shims();
11397
11681
 
11398
11682
  // ../../node_modules/.pnpm/package-json@8.1.1/node_modules/package-json/index.js
11399
11683
  init_esm_shims();
11400
- import { Agent as HttpAgent } from "node:http";
11401
- import { Agent as HttpsAgent } from "node:https";
11684
+ import { Agent as HttpAgent } from "http";
11685
+ import { Agent as HttpsAgent } from "https";
11402
11686
 
11403
11687
  // ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/index.js
11404
11688
  init_esm_shims();
@@ -11828,7 +12112,7 @@ var dist_default = is;
11828
12112
 
11829
12113
  // ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/as-promise/index.js
11830
12114
  init_esm_shims();
11831
- import { EventEmitter as EventEmitter2 } from "node:events";
12115
+ import { EventEmitter as EventEmitter2 } from "events";
11832
12116
 
11833
12117
  // ../../node_modules/.pnpm/p-cancelable@3.0.0/node_modules/p-cancelable/index.js
11834
12118
  init_esm_shims();
@@ -12063,11 +12347,11 @@ var AbortError = class extends RequestError {
12063
12347
 
12064
12348
  // ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/index.js
12065
12349
  init_esm_shims();
12066
- import process6 from "node:process";
12067
- import { Buffer as Buffer3 } from "node:buffer";
12068
- import { Duplex } from "node:stream";
12069
- import { URL as URL3, URLSearchParams as URLSearchParams2 } from "node:url";
12070
- import http2, { ServerResponse } from "node:http";
12350
+ import process6 from "process";
12351
+ import { Buffer as Buffer3 } from "buffer";
12352
+ import { Duplex } from "stream";
12353
+ import { URL as URL3, URLSearchParams as URLSearchParams2 } from "url";
12354
+ import http2, { ServerResponse } from "http";
12071
12355
 
12072
12356
  // ../../node_modules/.pnpm/@szmarczak+http-timer@5.0.1/node_modules/@szmarczak/http-timer/dist/source/index.js
12073
12357
  init_esm_shims();
@@ -12177,12 +12461,12 @@ var source_default3 = timer;
12177
12461
 
12178
12462
  // ../../node_modules/.pnpm/cacheable-request@10.2.14/node_modules/cacheable-request/dist/index.js
12179
12463
  init_esm_shims();
12180
- import EventEmitter from "node:events";
12181
- import urlLib from "node:url";
12182
- import crypto2 from "node:crypto";
12183
- import stream, { PassThrough as PassThroughStream } from "node:stream";
12464
+ import EventEmitter from "events";
12465
+ import urlLib from "url";
12466
+ import crypto2 from "crypto";
12467
+ import stream, { PassThrough as PassThroughStream } from "stream";
12184
12468
 
12185
- // ../../node_modules/.pnpm/normalize-url@8.0.1/node_modules/normalize-url/index.js
12469
+ // ../../node_modules/.pnpm/normalize-url@8.1.0/node_modules/normalize-url/index.js
12186
12470
  init_esm_shims();
12187
12471
  var DATA_URL_DEFAULT_MIME_TYPE = "text/plain";
12188
12472
  var DATA_URL_DEFAULT_CHARSET = "us-ascii";
@@ -12251,6 +12535,8 @@ function normalizeUrl(urlString, options) {
12251
12535
  removeDirectoryIndex: false,
12252
12536
  removeExplicitPort: false,
12253
12537
  sortQueryParameters: true,
12538
+ removePath: false,
12539
+ transformPath: false,
12254
12540
  ...options
12255
12541
  };
12256
12542
  if (typeof options.defaultProtocol === "string" && !options.defaultProtocol.endsWith(":")) {
@@ -12309,7 +12595,7 @@ function normalizeUrl(urlString, options) {
12309
12595
  }
12310
12596
  if (urlObject.pathname) {
12311
12597
  try {
12312
- urlObject.pathname = decodeURI(urlObject.pathname);
12598
+ urlObject.pathname = decodeURI(urlObject.pathname).replace(/\\/g, "%5C");
12313
12599
  } catch {
12314
12600
  }
12315
12601
  }
@@ -12324,6 +12610,14 @@ function normalizeUrl(urlString, options) {
12324
12610
  urlObject.pathname = pathComponents.slice(1).join("/") + "/";
12325
12611
  }
12326
12612
  }
12613
+ if (options.removePath) {
12614
+ urlObject.pathname = "/";
12615
+ }
12616
+ if (options.transformPath && typeof options.transformPath === "function") {
12617
+ const pathComponents = urlObject.pathname.split("/").filter(Boolean);
12618
+ const newComponents = options.transformPath(pathComponents);
12619
+ urlObject.pathname = newComponents?.length > 0 ? `/${newComponents.join("/")}` : "/";
12620
+ }
12327
12621
  if (urlObject.hostname) {
12328
12622
  urlObject.hostname = urlObject.hostname.replace(/\.$/, "");
12329
12623
  if (options.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(urlObject.hostname)) {
@@ -12348,11 +12642,17 @@ function normalizeUrl(urlString, options) {
12348
12642
  }
12349
12643
  }
12350
12644
  if (options.sortQueryParameters) {
12645
+ const originalSearch = urlObject.search;
12351
12646
  urlObject.searchParams.sort();
12352
12647
  try {
12353
12648
  urlObject.search = decodeURIComponent(urlObject.search);
12354
12649
  } catch {
12355
12650
  }
12651
+ const partsWithoutEquals = originalSearch.slice(1).split("&").filter((p) => p && !p.includes("="));
12652
+ for (const part of partsWithoutEquals) {
12653
+ const decoded = decodeURIComponent(part);
12654
+ urlObject.search = urlObject.search.replace(`?${decoded}=`, `?${decoded}`).replace(`&${decoded}=`, `&${decoded}`);
12655
+ }
12356
12656
  }
12357
12657
  if (options.removeTrailingSlash) {
12358
12658
  urlObject.pathname = urlObject.pathname.replace(/\/$/, "");
@@ -12383,7 +12683,7 @@ var import_http_cache_semantics = __toESM(require_http_cache_semantics(), 1);
12383
12683
 
12384
12684
  // ../../node_modules/.pnpm/responselike@3.0.0/node_modules/responselike/index.js
12385
12685
  init_esm_shims();
12386
- import { Readable as ReadableStream } from "node:stream";
12686
+ import { Readable as ReadableStream } from "stream";
12387
12687
 
12388
12688
  // ../../node_modules/.pnpm/lowercase-keys@3.0.0/node_modules/lowercase-keys/index.js
12389
12689
  init_esm_shims();
@@ -12983,8 +13283,8 @@ var FormDataEncoder = class {
12983
13283
 
12984
13284
  // ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/utils/get-body-size.js
12985
13285
  init_esm_shims();
12986
- import { Buffer as Buffer2 } from "node:buffer";
12987
- import { promisify as promisify2 } from "node:util";
13286
+ import { Buffer as Buffer2 } from "buffer";
13287
+ import { promisify as promisify2 } from "util";
12988
13288
 
12989
13289
  // ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/utils/is-form-data.js
12990
13290
  init_esm_shims();
@@ -13032,7 +13332,7 @@ function proxyEvents(from, to, events) {
13032
13332
 
13033
13333
  // ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/timed-out.js
13034
13334
  init_esm_shims();
13035
- import net from "node:net";
13335
+ import net from "net";
13036
13336
 
13037
13337
  // ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/utils/unhandle.js
13038
13338
  init_esm_shims();
@@ -13279,12 +13579,12 @@ var calculate_retry_delay_default = calculateRetryDelay;
13279
13579
 
13280
13580
  // ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/options.js
13281
13581
  init_esm_shims();
13282
- import process5 from "node:process";
13283
- import { promisify as promisify4, inspect } from "node:util";
13284
- import { URL as URL2, URLSearchParams } from "node:url";
13285
- import { checkServerIdentity } from "node:tls";
13286
- import http from "node:http";
13287
- import https from "node:https";
13582
+ import process5 from "process";
13583
+ import { promisify as promisify4, inspect } from "util";
13584
+ import { URL as URL2, URLSearchParams } from "url";
13585
+ import { checkServerIdentity } from "tls";
13586
+ import http from "http";
13587
+ import https from "https";
13288
13588
 
13289
13589
  // ../../node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js
13290
13590
  init_esm_shims();
@@ -13294,9 +13594,9 @@ import {
13294
13594
  ALL,
13295
13595
  promises as dnsPromises,
13296
13596
  lookup as dnsLookup
13297
- } from "node:dns";
13298
- import { promisify as promisify3 } from "node:util";
13299
- import os5 from "node:os";
13597
+ } from "dns";
13598
+ import { promisify as promisify3 } from "util";
13599
+ import os5 from "os";
13300
13600
  var { Resolver: AsyncResolver } = dnsPromises;
13301
13601
  var kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection");
13302
13602
  var kCacheableLookupInstance = Symbol("cacheableLookupInstance");
@@ -16053,7 +16353,7 @@ var Request = class _Request extends Duplex {
16053
16353
  }
16054
16354
  _prepareCache(cache) {
16055
16355
  if (!cacheableStore.has(cache)) {
16056
- const cacheableRequest = new dist_default2((requestOptions, handler) => {
16356
+ const cacheableRequest = new dist_default2(((requestOptions, handler) => {
16057
16357
  const result = requestOptions._request(requestOptions, handler);
16058
16358
  if (dist_default.promise(result)) {
16059
16359
  result.once = (event, handler2) => {
@@ -16080,7 +16380,7 @@ var Request = class _Request extends Duplex {
16080
16380
  };
16081
16381
  }
16082
16382
  return result;
16083
- }, cache);
16383
+ }), cache);
16084
16384
  cacheableStore.set(cache, cacheableRequest.request());
16085
16385
  }
16086
16386
  }
@@ -16479,7 +16779,7 @@ var create = (defaults2) => {
16479
16779
  configurable: false,
16480
16780
  writable: false
16481
16781
  });
16482
- const got2 = (url, options, defaultOptions2 = defaults2.options) => {
16782
+ const got2 = ((url, options, defaultOptions2 = defaults2.options) => {
16483
16783
  const request = new Request(url, options, defaultOptions2);
16484
16784
  let promise;
16485
16785
  const lastHandler = (normalized) => {
@@ -16516,7 +16816,7 @@ var create = (defaults2) => {
16516
16816
  return result;
16517
16817
  };
16518
16818
  return iterateHandlers(request.options);
16519
- };
16819
+ });
16520
16820
  got2.extend = (...instancesOrOptions) => {
16521
16821
  const options = new Options(void 0, void 0, defaults2.options);
16522
16822
  const handlers = [...defaults2.handlers];
@@ -16540,7 +16840,7 @@ var create = (defaults2) => {
16540
16840
  mutableDefaults: Boolean(mutableDefaults)
16541
16841
  });
16542
16842
  };
16543
- const paginateEach = async function* (url, options) {
16843
+ const paginateEach = (async function* (url, options) {
16544
16844
  let normalizedOptions = new Options(url, options, defaults2.options);
16545
16845
  normalizedOptions.resolveBodyOnly = false;
16546
16846
  const { pagination } = normalizedOptions;
@@ -16597,20 +16897,20 @@ var create = (defaults2) => {
16597
16897
  }
16598
16898
  numberOfRequests++;
16599
16899
  }
16600
- };
16900
+ });
16601
16901
  got2.paginate = paginateEach;
16602
- got2.paginate.all = async (url, options) => {
16902
+ got2.paginate.all = (async (url, options) => {
16603
16903
  const results = [];
16604
16904
  for await (const item of paginateEach(url, options)) {
16605
16905
  results.push(item);
16606
16906
  }
16607
16907
  return results;
16608
- };
16908
+ });
16609
16909
  got2.paginate.each = paginateEach;
16610
- got2.stream = (url, options) => got2(url, { ...options, isStream: true });
16910
+ got2.stream = ((url, options) => got2(url, { ...options, isStream: true }));
16611
16911
  for (const method of aliases) {
16612
- got2[method] = (url, options) => got2(url, { ...options, method });
16613
- got2.stream[method] = (url, options) => got2(url, { ...options, method, isStream: true });
16912
+ got2[method] = ((url, options) => got2(url, { ...options, method }));
16913
+ got2.stream[method] = ((url, options) => got2(url, { ...options, method, isStream: true }));
16614
16914
  }
16615
16915
  if (!defaults2.mutableDefaults) {
16616
16916
  Object.freeze(defaults2.handlers);
@@ -16735,15 +17035,15 @@ async function latestVersion(packageName, options) {
16735
17035
  return version;
16736
17036
  }
16737
17037
 
16738
- // ../../node_modules/.pnpm/is-npm@6.0.0/node_modules/is-npm/index.js
17038
+ // ../../node_modules/.pnpm/is-npm@6.1.0/node_modules/is-npm/index.js
16739
17039
  init_esm_shims();
16740
- import process7 from "node:process";
17040
+ import process7 from "process";
16741
17041
  var packageJson2 = process7.env.npm_package_json;
16742
17042
  var userAgent = process7.env.npm_config_user_agent;
16743
- var isNpm6 = Boolean(userAgent && userAgent.startsWith("npm"));
16744
- var isNpm7 = Boolean(packageJson2 && packageJson2.endsWith("package.json"));
16745
- var isNpm = isNpm6 || isNpm7;
16746
- var isYarn = Boolean(userAgent && userAgent.startsWith("yarn"));
17043
+ var isNpm = Boolean(userAgent?.startsWith("npm")) || Boolean(packageJson2?.endsWith("package.json"));
17044
+ var isYarn = Boolean(userAgent?.startsWith("yarn"));
17045
+ var isPnpm = Boolean(userAgent?.startsWith("pnpm"));
17046
+ var isBun = Boolean(userAgent?.startsWith("bun"));
16747
17047
  var isNpmOrYarn = isNpm || isYarn;
16748
17048
 
16749
17049
  // ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
@@ -16751,8 +17051,8 @@ var import_is_installed_globally = __toESM(require_is_installed_globally(), 1);
16751
17051
 
16752
17052
  // ../../node_modules/.pnpm/is-yarn-global@0.4.1/node_modules/is-yarn-global/dist/index.js
16753
17053
  init_esm_shims();
16754
- import path4 from "node:path";
16755
- import { fileURLToPath as fileURLToPath2 } from "node:url";
17054
+ import path4 from "path";
17055
+ import { fileURLToPath as fileURLToPath2 } from "url";
16756
17056
  var isYarnGlobal = () => {
16757
17057
  const __dirname3 = path4.dirname(fileURLToPath2(import.meta.url));
16758
17058
  const isWindows = process.platform === "win32";
@@ -16763,34 +17063,34 @@ var dist_default3 = isYarnGlobal;
16763
17063
 
16764
17064
  // ../../node_modules/.pnpm/has-yarn@3.0.0/node_modules/has-yarn/index.js
16765
17065
  init_esm_shims();
16766
- import process8 from "node:process";
16767
- import path5 from "node:path";
16768
- import fs2 from "node:fs";
17066
+ import process8 from "process";
17067
+ import path5 from "path";
17068
+ import fs2 from "fs";
16769
17069
  function hasYarn(cwd = process8.cwd()) {
16770
17070
  return fs2.existsSync(path5.resolve(cwd, "yarn.lock"));
16771
17071
  }
16772
17072
 
16773
17073
  // ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
16774
17074
  init_esm_shims();
16775
- import process9 from "node:process";
17075
+ import process9 from "process";
16776
17076
 
16777
17077
  // ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
16778
17078
  init_esm_shims();
16779
17079
 
16780
- // ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
17080
+ // ../../node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
16781
17081
  init_esm_shims();
16782
17082
 
16783
- // ../../node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
17083
+ // ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
16784
17084
  init_esm_shims();
16785
17085
  function ansiRegex({ onlyFirst = false } = {}) {
16786
- const pattern = [
16787
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
16788
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
16789
- ].join("|");
17086
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
17087
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
17088
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
17089
+ const pattern = `${osc}|${csi}`;
16790
17090
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
16791
17091
  }
16792
17092
 
16793
- // ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
17093
+ // ../../node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
16794
17094
  var regex = ansiRegex();
16795
17095
  function stripAnsi(string) {
16796
17096
  if (typeof string !== "string") {
@@ -16943,7 +17243,7 @@ var import_ansi_align = __toESM(require_ansi_align(), 1);
16943
17243
  // ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
16944
17244
  init_esm_shims();
16945
17245
 
16946
- // ../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js
17246
+ // ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
16947
17247
  init_esm_shims();
16948
17248
  var ANSI_BACKGROUND_OFFSET3 = 10;
16949
17249
  var wrapAnsi163 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -17043,7 +17343,7 @@ function assembleStyles3() {
17043
17343
  styles5.bgColor.ansi16m = wrapAnsi16m3(ANSI_BACKGROUND_OFFSET3);
17044
17344
  Object.defineProperties(styles5, {
17045
17345
  rgbToAnsi256: {
17046
- value: (red, green, blue) => {
17346
+ value(red, green, blue) {
17047
17347
  if (red === green && green === blue) {
17048
17348
  if (red < 8) {
17049
17349
  return 16;
@@ -17058,7 +17358,7 @@ function assembleStyles3() {
17058
17358
  enumerable: false
17059
17359
  },
17060
17360
  hexToRgb: {
17061
- value: (hex) => {
17361
+ value(hex) {
17062
17362
  const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
17063
17363
  if (!matches) {
17064
17364
  return [0, 0, 0];
@@ -17083,7 +17383,7 @@ function assembleStyles3() {
17083
17383
  enumerable: false
17084
17384
  },
17085
17385
  ansi256ToAnsi: {
17086
- value: (code) => {
17386
+ value(code) {
17087
17387
  if (code < 8) {
17088
17388
  return 30 + code;
17089
17389
  }
@@ -17578,7 +17878,7 @@ function boxen(text, options) {
17578
17878
  // ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
17579
17879
  var import_is_ci = __toESM(require_is_ci(), 1);
17580
17880
 
17581
- // ../../node_modules/.pnpm/pupa@3.1.0/node_modules/pupa/index.js
17881
+ // ../../node_modules/.pnpm/pupa@3.3.0/node_modules/pupa/index.js
17582
17882
  init_esm_shims();
17583
17883
 
17584
17884
  // ../../node_modules/.pnpm/escape-goat@4.0.0/node_modules/escape-goat/index.js
@@ -17595,7 +17895,7 @@ function htmlEscape(strings, ...values) {
17595
17895
  return output;
17596
17896
  }
17597
17897
 
17598
- // ../../node_modules/.pnpm/pupa@3.1.0/node_modules/pupa/index.js
17898
+ // ../../node_modules/.pnpm/pupa@3.3.0/node_modules/pupa/index.js
17599
17899
  var MissingValueError = class extends Error {
17600
17900
  constructor(key) {
17601
17901
  super(`Missing a value for ${key ? `the placeholder: ${key}` : "a placeholder"}`, key);
@@ -17603,17 +17903,63 @@ var MissingValueError = class extends Error {
17603
17903
  this.key = key;
17604
17904
  }
17605
17905
  };
17606
- function pupa(template, data, { ignoreMissing = false, transform = ({ value }) => value } = {}) {
17906
+ var MissingFilterError = class extends Error {
17907
+ constructor(filterName) {
17908
+ super(`Missing filter: ${filterName}`);
17909
+ this.name = "MissingFilterError";
17910
+ this.filterName = filterName;
17911
+ }
17912
+ };
17913
+ function pupa(template, data, { ignoreMissing = false, transform = ({ value }) => value, filters = {} } = {}) {
17607
17914
  if (typeof template !== "string") {
17608
17915
  throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof template}\``);
17609
17916
  }
17610
17917
  if (typeof data !== "object") {
17611
17918
  throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\``);
17612
17919
  }
17613
- const replace = (placeholder, key) => {
17920
+ const escapedLeftBrace = "\uE000\uE001\uE002";
17921
+ const escapedRightBrace = "\uE003\uE004\uE005";
17922
+ template = template.replace(/\\{/g, escapedLeftBrace);
17923
+ template = template.replace(/\\}/g, escapedRightBrace);
17924
+ const parseKeyPath = (key) => {
17925
+ const segments = [];
17926
+ let segment = "";
17927
+ for (let index = 0; index < key.length; index++) {
17928
+ if (key[index] === "\\" && key[index + 1] === ".") {
17929
+ segment += ".";
17930
+ index++;
17931
+ } else if (key[index] === ".") {
17932
+ segments.push(segment);
17933
+ segment = "";
17934
+ } else {
17935
+ segment += key[index];
17936
+ }
17937
+ }
17938
+ segments.push(segment);
17939
+ return segments;
17940
+ };
17941
+ const replace = (placeholder, keyWithFilters) => {
17942
+ const parts = keyWithFilters.split("|").map((part) => part.trim());
17943
+ const key = parts[0];
17944
+ const filterChain = parts.slice(1);
17945
+ const segments = parseKeyPath(key);
17614
17946
  let value = data;
17615
- for (const property of key.split(".")) {
17616
- value = value ? value[property] : void 0;
17947
+ for (const property of segments) {
17948
+ if (value) {
17949
+ value = value[property];
17950
+ }
17951
+ }
17952
+ for (const filterName of filterChain) {
17953
+ const filter = filters[filterName];
17954
+ if (!filter) {
17955
+ if (ignoreMissing) {
17956
+ return placeholder;
17957
+ }
17958
+ throw new MissingFilterError(filterName);
17959
+ }
17960
+ if (value !== void 0) {
17961
+ value = filter(value);
17962
+ }
17617
17963
  }
17618
17964
  const transformedValue = transform({ value, key });
17619
17965
  if (transformedValue === void 0) {
@@ -17624,13 +17970,16 @@ function pupa(template, data, { ignoreMissing = false, transform = ({ value }) =
17624
17970
  }
17625
17971
  return String(transformedValue);
17626
17972
  };
17627
- const composeHtmlEscape = (replacer) => (...args) => htmlEscape(replacer(...args));
17628
- const doubleBraceRegex = /{{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}}/gi;
17629
- if (doubleBraceRegex.test(template)) {
17630
- template = template.replace(doubleBraceRegex, composeHtmlEscape(replace));
17631
- }
17632
- const braceRegex = /{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}/gi;
17633
- return template.replace(braceRegex, replace);
17973
+ const keyPattern = "(\\d+|[a-z$_][\\w\\-.$\\\\]*)";
17974
+ const filterPattern = "(?:\\|\\s*[a-z$_][\\w$]*\\s*)*";
17975
+ const keyWithFiltersPattern = `(${keyPattern}\\s*${filterPattern})`;
17976
+ const doubleBraceRegex = new RegExp(`{{${keyWithFiltersPattern}}}`, "gi");
17977
+ const singleBraceRegex = new RegExp(`{${keyWithFiltersPattern}}`, "gi");
17978
+ template = template.replace(doubleBraceRegex, (...arguments_) => htmlEscape(replace(...arguments_)));
17979
+ template = template.replace(singleBraceRegex, replace);
17980
+ template = template.replace(new RegExp(escapedLeftBrace, "g"), "{");
17981
+ template = template.replace(new RegExp(escapedRightBrace, "g"), "}");
17982
+ return template;
17634
17983
  }
17635
17984
 
17636
17985
  // ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
@@ -17769,7 +18118,7 @@ function updateNotifier(options) {
17769
18118
  // package.json
17770
18119
  var package_default = {
17771
18120
  name: "@terai/dev",
17772
- version: "0.0.4",
18121
+ version: "0.0.6",
17773
18122
  description: "The user-facing package for Terai",
17774
18123
  main: "dist/index.js",
17775
18124
  module: "dist/index.mjs",
@@ -17804,6 +18153,7 @@ var package_default = {
17804
18153
  "@terai/runtime": "workspace:*",
17805
18154
  "@terai/translator": "workspace:*",
17806
18155
  "@terai/utils": "workspace:*",
18156
+ "@terai/types": "workspace:*",
17807
18157
  cac: "^6",
17808
18158
  dotenv: "^1",
17809
18159
  inquirer: "^9",
@@ -17814,7 +18164,6 @@ var package_default = {
17814
18164
  devDependencies: {
17815
18165
  "@terai/generator": "workspace:*",
17816
18166
  "@terai/logger": "workspace:*",
17817
- "@terai/types": "workspace:*",
17818
18167
  "@types/update-notifier": "^6",
17819
18168
  "update-notifier": "^6"
17820
18169
  }