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