@terai/dev 0.0.0-dev-20240606194724 → 0.0.0-dev-20251119151044
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.default.js +639 -290
- package/dist/cli.default.js.map +1 -1
- package/dist/cli.default.mjs +634 -285
- package/dist/cli.default.mjs.map +1 -1
- package/dist/cli.js +639 -290
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +634 -285
- package/dist/cli.mjs.map +1 -1
- package/dist/commands/extract.js +20 -14
- package/dist/commands/extract.js.map +1 -1
- package/dist/commands/extract.mjs +12 -6
- package/dist/commands/extract.mjs.map +1 -1
- package/dist/commands/index.js +20 -14
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/index.mjs +12 -6
- package/dist/commands/index.mjs.map +1 -1
- package/dist/commands/init.js +20 -14
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.mjs +12 -6
- package/dist/commands/init.mjs.map +1 -1
- package/dist/commands/translate.js +20 -14
- package/dist/commands/translate.js.map +1 -1
- package/dist/commands/translate.mjs +12 -6
- package/dist/commands/translate.mjs.map +1 -1
- package/dist/index.js +6 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -72
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/cli.js
CHANGED
|
@@ -33,12 +33,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var getImportMetaUrl, importMetaUrl;
|
|
38
38
|
var init_cjs_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
39
|
+
"../../node_modules/.pnpm/tsup@8.5.1_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
|
-
getImportMetaUrl = () => typeof document === "undefined" ? new URL(
|
|
41
|
+
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
42
42
|
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -111,7 +111,7 @@ var require_polyfills = __commonJS({
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
if (platform === "win32") {
|
|
114
|
-
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
|
|
114
|
+
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : (function(fs$rename) {
|
|
115
115
|
function rename(from, to, cb) {
|
|
116
116
|
var start = Date.now();
|
|
117
117
|
var backoff = 0;
|
|
@@ -134,9 +134,9 @@ var require_polyfills = __commonJS({
|
|
|
134
134
|
}
|
|
135
135
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
136
136
|
return rename;
|
|
137
|
-
}(fs3.rename);
|
|
137
|
+
})(fs3.rename);
|
|
138
138
|
}
|
|
139
|
-
fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
|
|
139
|
+
fs3.read = typeof fs3.read !== "function" ? fs3.read : (function(fs$read) {
|
|
140
140
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
141
141
|
var callback;
|
|
142
142
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -153,8 +153,8 @@ var require_polyfills = __commonJS({
|
|
|
153
153
|
}
|
|
154
154
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
155
155
|
return read;
|
|
156
|
-
}(fs3.read);
|
|
157
|
-
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
156
|
+
})(fs3.read);
|
|
157
|
+
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
158
158
|
return function(fd, buffer, offset, length, position) {
|
|
159
159
|
var eagCounter = 0;
|
|
160
160
|
while (true) {
|
|
@@ -169,7 +169,7 @@ var require_polyfills = __commonJS({
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
-
}(fs3.readSync);
|
|
172
|
+
})(fs3.readSync);
|
|
173
173
|
function patchLchmod(fs4) {
|
|
174
174
|
fs4.lchmod = function(path6, mode, callback) {
|
|
175
175
|
fs4.open(
|
|
@@ -495,7 +495,7 @@ var require_graceful_fs = __commonJS({
|
|
|
495
495
|
if (!fs3[gracefulQueue]) {
|
|
496
496
|
queue = global[gracefulQueue] || [];
|
|
497
497
|
publishQueue(fs3, queue);
|
|
498
|
-
fs3.close = function(fs$close) {
|
|
498
|
+
fs3.close = (function(fs$close) {
|
|
499
499
|
function close(fd, cb) {
|
|
500
500
|
return fs$close.call(fs3, fd, function(err) {
|
|
501
501
|
if (!err) {
|
|
@@ -509,8 +509,8 @@ var require_graceful_fs = __commonJS({
|
|
|
509
509
|
value: fs$close
|
|
510
510
|
});
|
|
511
511
|
return close;
|
|
512
|
-
}(fs3.close);
|
|
513
|
-
fs3.closeSync = function(fs$closeSync) {
|
|
512
|
+
})(fs3.close);
|
|
513
|
+
fs3.closeSync = (function(fs$closeSync) {
|
|
514
514
|
function closeSync(fd) {
|
|
515
515
|
fs$closeSync.apply(fs3, arguments);
|
|
516
516
|
resetQueue();
|
|
@@ -519,7 +519,7 @@ var require_graceful_fs = __commonJS({
|
|
|
519
519
|
value: fs$closeSync
|
|
520
520
|
});
|
|
521
521
|
return closeSync;
|
|
522
|
-
}(fs3.closeSync);
|
|
522
|
+
})(fs3.closeSync);
|
|
523
523
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
524
524
|
process.on("exit", function() {
|
|
525
525
|
debug2(fs3[gracefulQueue]);
|
|
@@ -1196,14 +1196,14 @@ var require_write_file_atomic = __commonJS({
|
|
|
1196
1196
|
var typedArrayToBuffer = require_typedarray_to_buffer();
|
|
1197
1197
|
var { promisify: promisify5 } = require("util");
|
|
1198
1198
|
var activeFiles = {};
|
|
1199
|
-
var threadId = function getId() {
|
|
1199
|
+
var threadId = (function getId() {
|
|
1200
1200
|
try {
|
|
1201
1201
|
const workerThreads = require("worker_threads");
|
|
1202
1202
|
return workerThreads.threadId;
|
|
1203
1203
|
} catch (e) {
|
|
1204
1204
|
return 0;
|
|
1205
1205
|
}
|
|
1206
|
-
}();
|
|
1206
|
+
})();
|
|
1207
1207
|
var invocations = 0;
|
|
1208
1208
|
function getTmpname(filename) {
|
|
1209
1209
|
return filename + "." + MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result();
|
|
@@ -1517,9 +1517,9 @@ var require_dot_prop = __commonJS({
|
|
|
1517
1517
|
}
|
|
1518
1518
|
});
|
|
1519
1519
|
|
|
1520
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1520
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
|
|
1521
1521
|
var require_constants = __commonJS({
|
|
1522
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1522
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
1523
1523
|
"use strict";
|
|
1524
1524
|
init_cjs_shims();
|
|
1525
1525
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
@@ -1550,9 +1550,9 @@ var require_constants = __commonJS({
|
|
|
1550
1550
|
}
|
|
1551
1551
|
});
|
|
1552
1552
|
|
|
1553
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1553
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
|
|
1554
1554
|
var require_debug = __commonJS({
|
|
1555
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1555
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
1556
1556
|
"use strict";
|
|
1557
1557
|
init_cjs_shims();
|
|
1558
1558
|
var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
@@ -1561,9 +1561,9 @@ var require_debug = __commonJS({
|
|
|
1561
1561
|
}
|
|
1562
1562
|
});
|
|
1563
1563
|
|
|
1564
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1564
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
|
|
1565
1565
|
var require_re = __commonJS({
|
|
1566
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1566
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js"(exports2, module2) {
|
|
1567
1567
|
"use strict";
|
|
1568
1568
|
init_cjs_shims();
|
|
1569
1569
|
var {
|
|
@@ -1576,6 +1576,7 @@ var require_re = __commonJS({
|
|
|
1576
1576
|
var re = exports2.re = [];
|
|
1577
1577
|
var safeRe = exports2.safeRe = [];
|
|
1578
1578
|
var src = exports2.src = [];
|
|
1579
|
+
var safeSrc = exports2.safeSrc = [];
|
|
1579
1580
|
var t = exports2.t = {};
|
|
1580
1581
|
var R = 0;
|
|
1581
1582
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
@@ -1596,6 +1597,7 @@ var require_re = __commonJS({
|
|
|
1596
1597
|
debug2(name, index, value);
|
|
1597
1598
|
t[name] = index;
|
|
1598
1599
|
src[index] = value;
|
|
1600
|
+
safeSrc[index] = safe;
|
|
1599
1601
|
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
1600
1602
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
1601
1603
|
};
|
|
@@ -1604,8 +1606,8 @@ var require_re = __commonJS({
|
|
|
1604
1606
|
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
1605
1607
|
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
1606
1608
|
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
1607
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.
|
|
1608
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.
|
|
1609
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
1610
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
1609
1611
|
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
1610
1612
|
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
1611
1613
|
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
@@ -1648,9 +1650,9 @@ var require_re = __commonJS({
|
|
|
1648
1650
|
}
|
|
1649
1651
|
});
|
|
1650
1652
|
|
|
1651
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1653
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
|
|
1652
1654
|
var require_parse_options = __commonJS({
|
|
1653
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1655
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
1654
1656
|
"use strict";
|
|
1655
1657
|
init_cjs_shims();
|
|
1656
1658
|
var looseOption = Object.freeze({ loose: true });
|
|
@@ -1668,13 +1670,16 @@ var require_parse_options = __commonJS({
|
|
|
1668
1670
|
}
|
|
1669
1671
|
});
|
|
1670
1672
|
|
|
1671
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1673
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
|
|
1672
1674
|
var require_identifiers = __commonJS({
|
|
1673
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1675
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
1674
1676
|
"use strict";
|
|
1675
1677
|
init_cjs_shims();
|
|
1676
1678
|
var numeric = /^[0-9]+$/;
|
|
1677
1679
|
var compareIdentifiers = (a, b) => {
|
|
1680
|
+
if (typeof a === "number" && typeof b === "number") {
|
|
1681
|
+
return a === b ? 0 : a < b ? -1 : 1;
|
|
1682
|
+
}
|
|
1678
1683
|
const anum = numeric.test(a);
|
|
1679
1684
|
const bnum = numeric.test(b);
|
|
1680
1685
|
if (anum && bnum) {
|
|
@@ -1691,9 +1696,9 @@ var require_identifiers = __commonJS({
|
|
|
1691
1696
|
}
|
|
1692
1697
|
});
|
|
1693
1698
|
|
|
1694
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1699
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
|
|
1695
1700
|
var require_semver = __commonJS({
|
|
1696
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1701
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
1697
1702
|
"use strict";
|
|
1698
1703
|
init_cjs_shims();
|
|
1699
1704
|
var debug2 = require_debug();
|
|
@@ -1782,7 +1787,25 @@ var require_semver = __commonJS({
|
|
|
1782
1787
|
if (!(other instanceof _SemVer)) {
|
|
1783
1788
|
other = new _SemVer(other, this.options);
|
|
1784
1789
|
}
|
|
1785
|
-
|
|
1790
|
+
if (this.major < other.major) {
|
|
1791
|
+
return -1;
|
|
1792
|
+
}
|
|
1793
|
+
if (this.major > other.major) {
|
|
1794
|
+
return 1;
|
|
1795
|
+
}
|
|
1796
|
+
if (this.minor < other.minor) {
|
|
1797
|
+
return -1;
|
|
1798
|
+
}
|
|
1799
|
+
if (this.minor > other.minor) {
|
|
1800
|
+
return 1;
|
|
1801
|
+
}
|
|
1802
|
+
if (this.patch < other.patch) {
|
|
1803
|
+
return -1;
|
|
1804
|
+
}
|
|
1805
|
+
if (this.patch > other.patch) {
|
|
1806
|
+
return 1;
|
|
1807
|
+
}
|
|
1808
|
+
return 0;
|
|
1786
1809
|
}
|
|
1787
1810
|
comparePre(other) {
|
|
1788
1811
|
if (!(other instanceof _SemVer)) {
|
|
@@ -1838,6 +1861,17 @@ var require_semver = __commonJS({
|
|
|
1838
1861
|
// preminor will bump the version up to the next minor release, and immediately
|
|
1839
1862
|
// down to pre-release. premajor and prepatch work the same way.
|
|
1840
1863
|
inc(release, identifier, identifierBase) {
|
|
1864
|
+
if (release.startsWith("pre")) {
|
|
1865
|
+
if (!identifier && identifierBase === false) {
|
|
1866
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
1867
|
+
}
|
|
1868
|
+
if (identifier) {
|
|
1869
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
1870
|
+
if (!match || match[1] !== identifier) {
|
|
1871
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1841
1875
|
switch (release) {
|
|
1842
1876
|
case "premajor":
|
|
1843
1877
|
this.prerelease.length = 0;
|
|
@@ -1857,12 +1891,20 @@ var require_semver = __commonJS({
|
|
|
1857
1891
|
this.inc("patch", identifier, identifierBase);
|
|
1858
1892
|
this.inc("pre", identifier, identifierBase);
|
|
1859
1893
|
break;
|
|
1894
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
1895
|
+
// prepatch.
|
|
1860
1896
|
case "prerelease":
|
|
1861
1897
|
if (this.prerelease.length === 0) {
|
|
1862
1898
|
this.inc("patch", identifier, identifierBase);
|
|
1863
1899
|
}
|
|
1864
1900
|
this.inc("pre", identifier, identifierBase);
|
|
1865
1901
|
break;
|
|
1902
|
+
case "release":
|
|
1903
|
+
if (this.prerelease.length === 0) {
|
|
1904
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
1905
|
+
}
|
|
1906
|
+
this.prerelease.length = 0;
|
|
1907
|
+
break;
|
|
1866
1908
|
case "major":
|
|
1867
1909
|
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
1868
1910
|
this.major++;
|
|
@@ -1884,11 +1926,10 @@ var require_semver = __commonJS({
|
|
|
1884
1926
|
}
|
|
1885
1927
|
this.prerelease = [];
|
|
1886
1928
|
break;
|
|
1929
|
+
// This probably shouldn't be used publicly.
|
|
1930
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
1887
1931
|
case "pre": {
|
|
1888
1932
|
const base = Number(identifierBase) ? 1 : 0;
|
|
1889
|
-
if (!identifier && identifierBase === false) {
|
|
1890
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
1891
|
-
}
|
|
1892
1933
|
if (this.prerelease.length === 0) {
|
|
1893
1934
|
this.prerelease = [base];
|
|
1894
1935
|
} else {
|
|
@@ -1935,9 +1976,9 @@ var require_semver = __commonJS({
|
|
|
1935
1976
|
}
|
|
1936
1977
|
});
|
|
1937
1978
|
|
|
1938
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1979
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
|
|
1939
1980
|
var require_parse = __commonJS({
|
|
1940
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1981
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
1941
1982
|
"use strict";
|
|
1942
1983
|
init_cjs_shims();
|
|
1943
1984
|
var SemVer = require_semver();
|
|
@@ -1958,9 +1999,9 @@ var require_parse = __commonJS({
|
|
|
1958
1999
|
}
|
|
1959
2000
|
});
|
|
1960
2001
|
|
|
1961
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2002
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js
|
|
1962
2003
|
var require_valid = __commonJS({
|
|
1963
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2004
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
1964
2005
|
"use strict";
|
|
1965
2006
|
init_cjs_shims();
|
|
1966
2007
|
var parse = require_parse();
|
|
@@ -1972,9 +2013,9 @@ var require_valid = __commonJS({
|
|
|
1972
2013
|
}
|
|
1973
2014
|
});
|
|
1974
2015
|
|
|
1975
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2016
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js
|
|
1976
2017
|
var require_clean = __commonJS({
|
|
1977
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2018
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
1978
2019
|
"use strict";
|
|
1979
2020
|
init_cjs_shims();
|
|
1980
2021
|
var parse = require_parse();
|
|
@@ -1986,9 +2027,9 @@ var require_clean = __commonJS({
|
|
|
1986
2027
|
}
|
|
1987
2028
|
});
|
|
1988
2029
|
|
|
1989
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2030
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js
|
|
1990
2031
|
var require_inc = __commonJS({
|
|
1991
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2032
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
1992
2033
|
"use strict";
|
|
1993
2034
|
init_cjs_shims();
|
|
1994
2035
|
var SemVer = require_semver();
|
|
@@ -2011,9 +2052,9 @@ var require_inc = __commonJS({
|
|
|
2011
2052
|
}
|
|
2012
2053
|
});
|
|
2013
2054
|
|
|
2014
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2055
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js
|
|
2015
2056
|
var require_diff = __commonJS({
|
|
2016
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2057
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
2017
2058
|
"use strict";
|
|
2018
2059
|
init_cjs_shims();
|
|
2019
2060
|
var parse = require_parse();
|
|
@@ -2033,13 +2074,12 @@ var require_diff = __commonJS({
|
|
|
2033
2074
|
if (!lowVersion.patch && !lowVersion.minor) {
|
|
2034
2075
|
return "major";
|
|
2035
2076
|
}
|
|
2036
|
-
if (highVersion
|
|
2077
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
2078
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
2079
|
+
return "minor";
|
|
2080
|
+
}
|
|
2037
2081
|
return "patch";
|
|
2038
2082
|
}
|
|
2039
|
-
if (highVersion.minor) {
|
|
2040
|
-
return "minor";
|
|
2041
|
-
}
|
|
2042
|
-
return "major";
|
|
2043
2083
|
}
|
|
2044
2084
|
const prefix = highHasPre ? "pre" : "";
|
|
2045
2085
|
if (v1.major !== v2.major) {
|
|
@@ -2057,9 +2097,9 @@ var require_diff = __commonJS({
|
|
|
2057
2097
|
}
|
|
2058
2098
|
});
|
|
2059
2099
|
|
|
2060
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2100
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js
|
|
2061
2101
|
var require_major = __commonJS({
|
|
2062
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2102
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js"(exports2, module2) {
|
|
2063
2103
|
"use strict";
|
|
2064
2104
|
init_cjs_shims();
|
|
2065
2105
|
var SemVer = require_semver();
|
|
@@ -2068,9 +2108,9 @@ var require_major = __commonJS({
|
|
|
2068
2108
|
}
|
|
2069
2109
|
});
|
|
2070
2110
|
|
|
2071
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2111
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js
|
|
2072
2112
|
var require_minor = __commonJS({
|
|
2073
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2113
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js"(exports2, module2) {
|
|
2074
2114
|
"use strict";
|
|
2075
2115
|
init_cjs_shims();
|
|
2076
2116
|
var SemVer = require_semver();
|
|
@@ -2079,9 +2119,9 @@ var require_minor = __commonJS({
|
|
|
2079
2119
|
}
|
|
2080
2120
|
});
|
|
2081
2121
|
|
|
2082
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2122
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js
|
|
2083
2123
|
var require_patch = __commonJS({
|
|
2084
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2124
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js"(exports2, module2) {
|
|
2085
2125
|
"use strict";
|
|
2086
2126
|
init_cjs_shims();
|
|
2087
2127
|
var SemVer = require_semver();
|
|
@@ -2090,9 +2130,9 @@ var require_patch = __commonJS({
|
|
|
2090
2130
|
}
|
|
2091
2131
|
});
|
|
2092
2132
|
|
|
2093
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2133
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js
|
|
2094
2134
|
var require_prerelease = __commonJS({
|
|
2095
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2135
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
2096
2136
|
"use strict";
|
|
2097
2137
|
init_cjs_shims();
|
|
2098
2138
|
var parse = require_parse();
|
|
@@ -2104,9 +2144,9 @@ var require_prerelease = __commonJS({
|
|
|
2104
2144
|
}
|
|
2105
2145
|
});
|
|
2106
2146
|
|
|
2107
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2147
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
|
|
2108
2148
|
var require_compare = __commonJS({
|
|
2109
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2149
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
2110
2150
|
"use strict";
|
|
2111
2151
|
init_cjs_shims();
|
|
2112
2152
|
var SemVer = require_semver();
|
|
@@ -2115,9 +2155,9 @@ var require_compare = __commonJS({
|
|
|
2115
2155
|
}
|
|
2116
2156
|
});
|
|
2117
2157
|
|
|
2118
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2158
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js
|
|
2119
2159
|
var require_rcompare = __commonJS({
|
|
2120
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2160
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
2121
2161
|
"use strict";
|
|
2122
2162
|
init_cjs_shims();
|
|
2123
2163
|
var compare = require_compare();
|
|
@@ -2126,9 +2166,9 @@ var require_rcompare = __commonJS({
|
|
|
2126
2166
|
}
|
|
2127
2167
|
});
|
|
2128
2168
|
|
|
2129
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2169
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js
|
|
2130
2170
|
var require_compare_loose = __commonJS({
|
|
2131
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2171
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
2132
2172
|
"use strict";
|
|
2133
2173
|
init_cjs_shims();
|
|
2134
2174
|
var compare = require_compare();
|
|
@@ -2137,9 +2177,9 @@ var require_compare_loose = __commonJS({
|
|
|
2137
2177
|
}
|
|
2138
2178
|
});
|
|
2139
2179
|
|
|
2140
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2180
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js
|
|
2141
2181
|
var require_compare_build = __commonJS({
|
|
2142
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2182
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js"(exports2, module2) {
|
|
2143
2183
|
"use strict";
|
|
2144
2184
|
init_cjs_shims();
|
|
2145
2185
|
var SemVer = require_semver();
|
|
@@ -2152,9 +2192,9 @@ var require_compare_build = __commonJS({
|
|
|
2152
2192
|
}
|
|
2153
2193
|
});
|
|
2154
2194
|
|
|
2155
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2195
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js
|
|
2156
2196
|
var require_sort = __commonJS({
|
|
2157
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2197
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js"(exports2, module2) {
|
|
2158
2198
|
"use strict";
|
|
2159
2199
|
init_cjs_shims();
|
|
2160
2200
|
var compareBuild = require_compare_build();
|
|
@@ -2163,9 +2203,9 @@ var require_sort = __commonJS({
|
|
|
2163
2203
|
}
|
|
2164
2204
|
});
|
|
2165
2205
|
|
|
2166
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2206
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js
|
|
2167
2207
|
var require_rsort = __commonJS({
|
|
2168
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2208
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js"(exports2, module2) {
|
|
2169
2209
|
"use strict";
|
|
2170
2210
|
init_cjs_shims();
|
|
2171
2211
|
var compareBuild = require_compare_build();
|
|
@@ -2174,9 +2214,9 @@ var require_rsort = __commonJS({
|
|
|
2174
2214
|
}
|
|
2175
2215
|
});
|
|
2176
2216
|
|
|
2177
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2217
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
|
|
2178
2218
|
var require_gt = __commonJS({
|
|
2179
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2219
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
2180
2220
|
"use strict";
|
|
2181
2221
|
init_cjs_shims();
|
|
2182
2222
|
var compare = require_compare();
|
|
@@ -2185,9 +2225,9 @@ var require_gt = __commonJS({
|
|
|
2185
2225
|
}
|
|
2186
2226
|
});
|
|
2187
2227
|
|
|
2188
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2228
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
|
|
2189
2229
|
var require_lt = __commonJS({
|
|
2190
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2230
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
2191
2231
|
"use strict";
|
|
2192
2232
|
init_cjs_shims();
|
|
2193
2233
|
var compare = require_compare();
|
|
@@ -2196,9 +2236,9 @@ var require_lt = __commonJS({
|
|
|
2196
2236
|
}
|
|
2197
2237
|
});
|
|
2198
2238
|
|
|
2199
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2239
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
|
|
2200
2240
|
var require_eq = __commonJS({
|
|
2201
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2241
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
2202
2242
|
"use strict";
|
|
2203
2243
|
init_cjs_shims();
|
|
2204
2244
|
var compare = require_compare();
|
|
@@ -2207,9 +2247,9 @@ var require_eq = __commonJS({
|
|
|
2207
2247
|
}
|
|
2208
2248
|
});
|
|
2209
2249
|
|
|
2210
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2250
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
|
|
2211
2251
|
var require_neq = __commonJS({
|
|
2212
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2252
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
2213
2253
|
"use strict";
|
|
2214
2254
|
init_cjs_shims();
|
|
2215
2255
|
var compare = require_compare();
|
|
@@ -2218,9 +2258,9 @@ var require_neq = __commonJS({
|
|
|
2218
2258
|
}
|
|
2219
2259
|
});
|
|
2220
2260
|
|
|
2221
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2261
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
|
|
2222
2262
|
var require_gte = __commonJS({
|
|
2223
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2263
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
2224
2264
|
"use strict";
|
|
2225
2265
|
init_cjs_shims();
|
|
2226
2266
|
var compare = require_compare();
|
|
@@ -2229,9 +2269,9 @@ var require_gte = __commonJS({
|
|
|
2229
2269
|
}
|
|
2230
2270
|
});
|
|
2231
2271
|
|
|
2232
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2272
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
|
|
2233
2273
|
var require_lte = __commonJS({
|
|
2234
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2274
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
2235
2275
|
"use strict";
|
|
2236
2276
|
init_cjs_shims();
|
|
2237
2277
|
var compare = require_compare();
|
|
@@ -2240,9 +2280,9 @@ var require_lte = __commonJS({
|
|
|
2240
2280
|
}
|
|
2241
2281
|
});
|
|
2242
2282
|
|
|
2243
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2283
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
|
|
2244
2284
|
var require_cmp = __commonJS({
|
|
2245
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2285
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
2246
2286
|
"use strict";
|
|
2247
2287
|
init_cjs_shims();
|
|
2248
2288
|
var eq = require_eq();
|
|
@@ -2291,9 +2331,9 @@ var require_cmp = __commonJS({
|
|
|
2291
2331
|
}
|
|
2292
2332
|
});
|
|
2293
2333
|
|
|
2294
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2334
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
|
|
2295
2335
|
var require_coerce = __commonJS({
|
|
2296
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2336
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
2297
2337
|
"use strict";
|
|
2298
2338
|
init_cjs_shims();
|
|
2299
2339
|
var SemVer = require_semver();
|
|
@@ -2338,9 +2378,9 @@ var require_coerce = __commonJS({
|
|
|
2338
2378
|
}
|
|
2339
2379
|
});
|
|
2340
2380
|
|
|
2341
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2381
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
|
|
2342
2382
|
var require_lrucache = __commonJS({
|
|
2343
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2383
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js"(exports2, module2) {
|
|
2344
2384
|
"use strict";
|
|
2345
2385
|
init_cjs_shims();
|
|
2346
2386
|
var LRUCache = class {
|
|
@@ -2377,11 +2417,12 @@ var require_lrucache = __commonJS({
|
|
|
2377
2417
|
}
|
|
2378
2418
|
});
|
|
2379
2419
|
|
|
2380
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2420
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
|
|
2381
2421
|
var require_range = __commonJS({
|
|
2382
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2422
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js"(exports2, module2) {
|
|
2383
2423
|
"use strict";
|
|
2384
2424
|
init_cjs_shims();
|
|
2425
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
2385
2426
|
var Range = class _Range {
|
|
2386
2427
|
constructor(range, options) {
|
|
2387
2428
|
options = parseOptions(options);
|
|
@@ -2395,13 +2436,13 @@ var require_range = __commonJS({
|
|
|
2395
2436
|
if (range instanceof Comparator) {
|
|
2396
2437
|
this.raw = range.value;
|
|
2397
2438
|
this.set = [[range]];
|
|
2398
|
-
this.
|
|
2439
|
+
this.formatted = void 0;
|
|
2399
2440
|
return this;
|
|
2400
2441
|
}
|
|
2401
2442
|
this.options = options;
|
|
2402
2443
|
this.loose = !!options.loose;
|
|
2403
2444
|
this.includePrerelease = !!options.includePrerelease;
|
|
2404
|
-
this.raw = range.trim().
|
|
2445
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
2405
2446
|
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
2406
2447
|
if (!this.set.length) {
|
|
2407
2448
|
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
@@ -2420,10 +2461,27 @@ var require_range = __commonJS({
|
|
|
2420
2461
|
}
|
|
2421
2462
|
}
|
|
2422
2463
|
}
|
|
2423
|
-
this.
|
|
2464
|
+
this.formatted = void 0;
|
|
2465
|
+
}
|
|
2466
|
+
get range() {
|
|
2467
|
+
if (this.formatted === void 0) {
|
|
2468
|
+
this.formatted = "";
|
|
2469
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
2470
|
+
if (i > 0) {
|
|
2471
|
+
this.formatted += "||";
|
|
2472
|
+
}
|
|
2473
|
+
const comps = this.set[i];
|
|
2474
|
+
for (let k = 0; k < comps.length; k++) {
|
|
2475
|
+
if (k > 0) {
|
|
2476
|
+
this.formatted += " ";
|
|
2477
|
+
}
|
|
2478
|
+
this.formatted += comps[k].toString().trim();
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
return this.formatted;
|
|
2424
2483
|
}
|
|
2425
2484
|
format() {
|
|
2426
|
-
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
|
|
2427
2485
|
return this.range;
|
|
2428
2486
|
}
|
|
2429
2487
|
toString() {
|
|
@@ -2533,6 +2591,7 @@ var require_range = __commonJS({
|
|
|
2533
2591
|
return result;
|
|
2534
2592
|
};
|
|
2535
2593
|
var parseComparator = (comp, options) => {
|
|
2594
|
+
comp = comp.replace(re[t.BUILD], "");
|
|
2536
2595
|
debug2("comp", comp, options);
|
|
2537
2596
|
comp = replaceCarets(comp, options);
|
|
2538
2597
|
debug2("caret", comp);
|
|
@@ -2736,9 +2795,9 @@ var require_range = __commonJS({
|
|
|
2736
2795
|
}
|
|
2737
2796
|
});
|
|
2738
2797
|
|
|
2739
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2798
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
|
|
2740
2799
|
var require_comparator = __commonJS({
|
|
2741
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2800
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
2742
2801
|
"use strict";
|
|
2743
2802
|
init_cjs_shims();
|
|
2744
2803
|
var ANY = Symbol("SemVer ANY");
|
|
@@ -2850,9 +2909,9 @@ var require_comparator = __commonJS({
|
|
|
2850
2909
|
}
|
|
2851
2910
|
});
|
|
2852
2911
|
|
|
2853
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2912
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
|
|
2854
2913
|
var require_satisfies = __commonJS({
|
|
2855
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2914
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
2856
2915
|
"use strict";
|
|
2857
2916
|
init_cjs_shims();
|
|
2858
2917
|
var Range = require_range();
|
|
@@ -2868,9 +2927,9 @@ var require_satisfies = __commonJS({
|
|
|
2868
2927
|
}
|
|
2869
2928
|
});
|
|
2870
2929
|
|
|
2871
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2930
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js
|
|
2872
2931
|
var require_to_comparators = __commonJS({
|
|
2873
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2932
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
|
|
2874
2933
|
"use strict";
|
|
2875
2934
|
init_cjs_shims();
|
|
2876
2935
|
var Range = require_range();
|
|
@@ -2879,9 +2938,9 @@ var require_to_comparators = __commonJS({
|
|
|
2879
2938
|
}
|
|
2880
2939
|
});
|
|
2881
2940
|
|
|
2882
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2941
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js
|
|
2883
2942
|
var require_max_satisfying = __commonJS({
|
|
2884
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2943
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
|
|
2885
2944
|
"use strict";
|
|
2886
2945
|
init_cjs_shims();
|
|
2887
2946
|
var SemVer = require_semver();
|
|
@@ -2909,9 +2968,9 @@ var require_max_satisfying = __commonJS({
|
|
|
2909
2968
|
}
|
|
2910
2969
|
});
|
|
2911
2970
|
|
|
2912
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2971
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js
|
|
2913
2972
|
var require_min_satisfying = __commonJS({
|
|
2914
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2973
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
|
|
2915
2974
|
"use strict";
|
|
2916
2975
|
init_cjs_shims();
|
|
2917
2976
|
var SemVer = require_semver();
|
|
@@ -2939,9 +2998,9 @@ var require_min_satisfying = __commonJS({
|
|
|
2939
2998
|
}
|
|
2940
2999
|
});
|
|
2941
3000
|
|
|
2942
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3001
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js
|
|
2943
3002
|
var require_min_version = __commonJS({
|
|
2944
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3003
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js"(exports2, module2) {
|
|
2945
3004
|
"use strict";
|
|
2946
3005
|
init_cjs_shims();
|
|
2947
3006
|
var SemVer = require_semver();
|
|
@@ -2971,6 +3030,7 @@ var require_min_version = __commonJS({
|
|
|
2971
3030
|
compver.prerelease.push(0);
|
|
2972
3031
|
}
|
|
2973
3032
|
compver.raw = compver.format();
|
|
3033
|
+
/* fallthrough */
|
|
2974
3034
|
case "":
|
|
2975
3035
|
case ">=":
|
|
2976
3036
|
if (!setMin || gt(compver, setMin)) {
|
|
@@ -2980,6 +3040,7 @@ var require_min_version = __commonJS({
|
|
|
2980
3040
|
case "<":
|
|
2981
3041
|
case "<=":
|
|
2982
3042
|
break;
|
|
3043
|
+
/* istanbul ignore next */
|
|
2983
3044
|
default:
|
|
2984
3045
|
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
2985
3046
|
}
|
|
@@ -2997,9 +3058,9 @@ var require_min_version = __commonJS({
|
|
|
2997
3058
|
}
|
|
2998
3059
|
});
|
|
2999
3060
|
|
|
3000
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3061
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js
|
|
3001
3062
|
var require_valid2 = __commonJS({
|
|
3002
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3063
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js"(exports2, module2) {
|
|
3003
3064
|
"use strict";
|
|
3004
3065
|
init_cjs_shims();
|
|
3005
3066
|
var Range = require_range();
|
|
@@ -3014,9 +3075,9 @@ var require_valid2 = __commonJS({
|
|
|
3014
3075
|
}
|
|
3015
3076
|
});
|
|
3016
3077
|
|
|
3017
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3078
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js
|
|
3018
3079
|
var require_outside = __commonJS({
|
|
3019
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3080
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js"(exports2, module2) {
|
|
3020
3081
|
"use strict";
|
|
3021
3082
|
init_cjs_shims();
|
|
3022
3083
|
var SemVer = require_semver();
|
|
@@ -3084,9 +3145,9 @@ var require_outside = __commonJS({
|
|
|
3084
3145
|
}
|
|
3085
3146
|
});
|
|
3086
3147
|
|
|
3087
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3148
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js
|
|
3088
3149
|
var require_gtr = __commonJS({
|
|
3089
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3150
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
3090
3151
|
"use strict";
|
|
3091
3152
|
init_cjs_shims();
|
|
3092
3153
|
var outside = require_outside();
|
|
@@ -3095,9 +3156,9 @@ var require_gtr = __commonJS({
|
|
|
3095
3156
|
}
|
|
3096
3157
|
});
|
|
3097
3158
|
|
|
3098
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3159
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js
|
|
3099
3160
|
var require_ltr = __commonJS({
|
|
3100
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3161
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
3101
3162
|
"use strict";
|
|
3102
3163
|
init_cjs_shims();
|
|
3103
3164
|
var outside = require_outside();
|
|
@@ -3106,9 +3167,9 @@ var require_ltr = __commonJS({
|
|
|
3106
3167
|
}
|
|
3107
3168
|
});
|
|
3108
3169
|
|
|
3109
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3170
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js
|
|
3110
3171
|
var require_intersects = __commonJS({
|
|
3111
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3172
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js"(exports2, module2) {
|
|
3112
3173
|
"use strict";
|
|
3113
3174
|
init_cjs_shims();
|
|
3114
3175
|
var Range = require_range();
|
|
@@ -3121,9 +3182,9 @@ var require_intersects = __commonJS({
|
|
|
3121
3182
|
}
|
|
3122
3183
|
});
|
|
3123
3184
|
|
|
3124
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3185
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js
|
|
3125
3186
|
var require_simplify = __commonJS({
|
|
3126
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3187
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js"(exports2, module2) {
|
|
3127
3188
|
"use strict";
|
|
3128
3189
|
init_cjs_shims();
|
|
3129
3190
|
var satisfies = require_satisfies();
|
|
@@ -3172,9 +3233,9 @@ var require_simplify = __commonJS({
|
|
|
3172
3233
|
}
|
|
3173
3234
|
});
|
|
3174
3235
|
|
|
3175
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3236
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js
|
|
3176
3237
|
var require_subset = __commonJS({
|
|
3177
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3238
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js"(exports2, module2) {
|
|
3178
3239
|
"use strict";
|
|
3179
3240
|
init_cjs_shims();
|
|
3180
3241
|
var Range = require_range();
|
|
@@ -3335,9 +3396,9 @@ var require_subset = __commonJS({
|
|
|
3335
3396
|
}
|
|
3336
3397
|
});
|
|
3337
3398
|
|
|
3338
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3399
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js
|
|
3339
3400
|
var require_semver2 = __commonJS({
|
|
3340
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3401
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js"(exports2, module2) {
|
|
3341
3402
|
"use strict";
|
|
3342
3403
|
init_cjs_shims();
|
|
3343
3404
|
var internalRe = require_re();
|
|
@@ -3582,9 +3643,9 @@ var require_get_stream = __commonJS({
|
|
|
3582
3643
|
}
|
|
3583
3644
|
});
|
|
3584
3645
|
|
|
3585
|
-
// ../../node_modules/.pnpm/http-cache-semantics@4.
|
|
3646
|
+
// ../../node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js
|
|
3586
3647
|
var require_http_cache_semantics = __commonJS({
|
|
3587
|
-
"../../node_modules/.pnpm/http-cache-semantics@4.
|
|
3648
|
+
"../../node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js"(exports2, module2) {
|
|
3588
3649
|
"use strict";
|
|
3589
3650
|
init_cjs_shims();
|
|
3590
3651
|
var statusCodeCacheableByDefault = /* @__PURE__ */ new Set([
|
|
@@ -3674,6 +3735,17 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3674
3735
|
return parts.join(", ");
|
|
3675
3736
|
}
|
|
3676
3737
|
module2.exports = class CachePolicy {
|
|
3738
|
+
/**
|
|
3739
|
+
* Creates a new CachePolicy instance.
|
|
3740
|
+
* @param {HttpRequest} req - Incoming client request.
|
|
3741
|
+
* @param {HttpResponse} res - Received server response.
|
|
3742
|
+
* @param {Object} [options={}] - Configuration options.
|
|
3743
|
+
* @param {boolean} [options.shared=true] - Is the cache shared (a public proxy)? `false` for personal browser caches.
|
|
3744
|
+
* @param {number} [options.cacheHeuristic=0.1] - Fallback heuristic (age fraction) for cache duration.
|
|
3745
|
+
* @param {number} [options.immutableMinTimeToLive=86400000] - Minimum TTL for immutable responses in milliseconds.
|
|
3746
|
+
* @param {boolean} [options.ignoreCargoCult=false] - Detect nonsense cache headers, and override them.
|
|
3747
|
+
* @param {any} [options._fromObject] - Internal parameter for deserialization. Do not use.
|
|
3748
|
+
*/
|
|
3677
3749
|
constructor(req, res, {
|
|
3678
3750
|
shared,
|
|
3679
3751
|
cacheHeuristic,
|
|
@@ -3691,6 +3763,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3691
3763
|
this._assertRequestHasHeaders(req);
|
|
3692
3764
|
this._responseTime = this.now();
|
|
3693
3765
|
this._isShared = shared !== false;
|
|
3766
|
+
this._ignoreCargoCult = !!ignoreCargoCult;
|
|
3694
3767
|
this._cacheHeuristic = void 0 !== cacheHeuristic ? cacheHeuristic : 0.1;
|
|
3695
3768
|
this._immutableMinTtl = void 0 !== immutableMinTimeToLive ? immutableMinTimeToLive : 24 * 3600 * 1e3;
|
|
3696
3769
|
this._status = "status" in res ? res.status : 200;
|
|
@@ -3702,7 +3775,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3702
3775
|
this._noAuthorization = !req.headers.authorization;
|
|
3703
3776
|
this._reqHeaders = res.headers.vary ? req.headers : null;
|
|
3704
3777
|
this._reqcc = parseCacheControl(req.headers["cache-control"]);
|
|
3705
|
-
if (
|
|
3778
|
+
if (this._ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) {
|
|
3706
3779
|
delete this._rescc["pre-check"];
|
|
3707
3780
|
delete this._rescc["post-check"];
|
|
3708
3781
|
delete this._rescc["no-cache"];
|
|
@@ -3718,9 +3791,17 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3718
3791
|
this._rescc["no-cache"] = true;
|
|
3719
3792
|
}
|
|
3720
3793
|
}
|
|
3794
|
+
/**
|
|
3795
|
+
* You can monkey-patch it for testing.
|
|
3796
|
+
* @returns {number} Current time in milliseconds.
|
|
3797
|
+
*/
|
|
3721
3798
|
now() {
|
|
3722
3799
|
return Date.now();
|
|
3723
3800
|
}
|
|
3801
|
+
/**
|
|
3802
|
+
* Determines if the response is storable in a cache.
|
|
3803
|
+
* @returns {boolean} `false` if can never be cached.
|
|
3804
|
+
*/
|
|
3724
3805
|
storable() {
|
|
3725
3806
|
return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
|
|
3726
3807
|
// The request method is understood by the cache and defined as being cacheable, and
|
|
@@ -3736,42 +3817,142 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3736
3817
|
this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
|
|
3737
3818
|
statusCodeCacheableByDefault.has(this._status)));
|
|
3738
3819
|
}
|
|
3820
|
+
/**
|
|
3821
|
+
* @returns {boolean} true if expiration is explicitly defined.
|
|
3822
|
+
*/
|
|
3739
3823
|
_hasExplicitExpiration() {
|
|
3740
|
-
return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
|
|
3824
|
+
return !!(this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires);
|
|
3741
3825
|
}
|
|
3826
|
+
/**
|
|
3827
|
+
* @param {HttpRequest} req - a request
|
|
3828
|
+
* @throws {Error} if the headers are missing.
|
|
3829
|
+
*/
|
|
3742
3830
|
_assertRequestHasHeaders(req) {
|
|
3743
3831
|
if (!req || !req.headers) {
|
|
3744
3832
|
throw Error("Request headers missing");
|
|
3745
3833
|
}
|
|
3746
3834
|
}
|
|
3835
|
+
/**
|
|
3836
|
+
* Checks if the request matches the cache and can be satisfied from the cache immediately,
|
|
3837
|
+
* without having to make a request to the server.
|
|
3838
|
+
*
|
|
3839
|
+
* This doesn't support `stale-while-revalidate`. See `evaluateRequest()` for a more complete solution.
|
|
3840
|
+
*
|
|
3841
|
+
* @param {HttpRequest} req - The new incoming HTTP request.
|
|
3842
|
+
* @returns {boolean} `true`` if the cached response used to construct this cache policy satisfies the request without revalidation.
|
|
3843
|
+
*/
|
|
3747
3844
|
satisfiesWithoutRevalidation(req) {
|
|
3845
|
+
const result = this.evaluateRequest(req);
|
|
3846
|
+
return !result.revalidation;
|
|
3847
|
+
}
|
|
3848
|
+
/**
|
|
3849
|
+
* @param {{headers: Record<string, string>, synchronous: boolean}|undefined} revalidation - Revalidation information, if any.
|
|
3850
|
+
* @returns {{response: {headers: Record<string, string>}, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object with a cached response headers and revalidation info.
|
|
3851
|
+
*/
|
|
3852
|
+
_evaluateRequestHitResult(revalidation) {
|
|
3853
|
+
return {
|
|
3854
|
+
response: {
|
|
3855
|
+
headers: this.responseHeaders()
|
|
3856
|
+
},
|
|
3857
|
+
revalidation
|
|
3858
|
+
};
|
|
3859
|
+
}
|
|
3860
|
+
/**
|
|
3861
|
+
* @param {HttpRequest} request - new incoming
|
|
3862
|
+
* @param {boolean} synchronous - whether revalidation must be synchronous (not s-w-r).
|
|
3863
|
+
* @returns {{headers: Record<string, string>, synchronous: boolean}} An object with revalidation headers and a synchronous flag.
|
|
3864
|
+
*/
|
|
3865
|
+
_evaluateRequestRevalidation(request, synchronous) {
|
|
3866
|
+
return {
|
|
3867
|
+
synchronous,
|
|
3868
|
+
headers: this.revalidationHeaders(request)
|
|
3869
|
+
};
|
|
3870
|
+
}
|
|
3871
|
+
/**
|
|
3872
|
+
* @param {HttpRequest} request - new incoming
|
|
3873
|
+
* @returns {{response: undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}}} An object indicating no cached response and revalidation details.
|
|
3874
|
+
*/
|
|
3875
|
+
_evaluateRequestMissResult(request) {
|
|
3876
|
+
return {
|
|
3877
|
+
response: void 0,
|
|
3878
|
+
revalidation: this._evaluateRequestRevalidation(request, true)
|
|
3879
|
+
};
|
|
3880
|
+
}
|
|
3881
|
+
/**
|
|
3882
|
+
* Checks if the given request matches this cache entry, and how the cache can be used to satisfy it. Returns an object with:
|
|
3883
|
+
*
|
|
3884
|
+
* ```
|
|
3885
|
+
* {
|
|
3886
|
+
* // If defined, you must send a request to the server.
|
|
3887
|
+
* revalidation: {
|
|
3888
|
+
* headers: {}, // HTTP headers to use when sending the revalidation response
|
|
3889
|
+
* // If true, you MUST wait for a response from the server before using the cache
|
|
3890
|
+
* // If false, this is stale-while-revalidate. The cache is stale, but you can use it while you update it asynchronously.
|
|
3891
|
+
* synchronous: bool,
|
|
3892
|
+
* },
|
|
3893
|
+
* // If defined, you can use this cached response.
|
|
3894
|
+
* response: {
|
|
3895
|
+
* headers: {}, // Updated cached HTTP headers you must use when responding to the client
|
|
3896
|
+
* },
|
|
3897
|
+
* }
|
|
3898
|
+
* ```
|
|
3899
|
+
* @param {HttpRequest} req - new incoming HTTP request
|
|
3900
|
+
* @returns {{response: {headers: Record<string, string>}|undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object containing keys:
|
|
3901
|
+
* - revalidation: { headers: Record<string, string>, synchronous: boolean } Set if you should send this to the origin server
|
|
3902
|
+
* - response: { headers: Record<string, string> } Set if you can respond to the client with these cached headers
|
|
3903
|
+
*/
|
|
3904
|
+
evaluateRequest(req) {
|
|
3748
3905
|
this._assertRequestHasHeaders(req);
|
|
3906
|
+
if (this._rescc["must-revalidate"]) {
|
|
3907
|
+
return this._evaluateRequestMissResult(req);
|
|
3908
|
+
}
|
|
3909
|
+
if (!this._requestMatches(req, false)) {
|
|
3910
|
+
return this._evaluateRequestMissResult(req);
|
|
3911
|
+
}
|
|
3749
3912
|
const requestCC = parseCacheControl(req.headers["cache-control"]);
|
|
3750
3913
|
if (requestCC["no-cache"] || /no-cache/.test(req.headers.pragma)) {
|
|
3751
|
-
return
|
|
3914
|
+
return this._evaluateRequestMissResult(req);
|
|
3752
3915
|
}
|
|
3753
|
-
if (requestCC["max-age"] && this.age() > requestCC["max-age"]) {
|
|
3754
|
-
return
|
|
3916
|
+
if (requestCC["max-age"] && this.age() > toNumberOrZero(requestCC["max-age"])) {
|
|
3917
|
+
return this._evaluateRequestMissResult(req);
|
|
3755
3918
|
}
|
|
3756
|
-
if (requestCC["min-fresh"] && this.
|
|
3757
|
-
return
|
|
3919
|
+
if (requestCC["min-fresh"] && this.maxAge() - this.age() < toNumberOrZero(requestCC["min-fresh"])) {
|
|
3920
|
+
return this._evaluateRequestMissResult(req);
|
|
3758
3921
|
}
|
|
3759
3922
|
if (this.stale()) {
|
|
3760
|
-
const
|
|
3761
|
-
if (
|
|
3762
|
-
return
|
|
3923
|
+
const allowsStaleWithoutRevalidation = "max-stale" in requestCC && (true === requestCC["max-stale"] || requestCC["max-stale"] > this.age() - this.maxAge());
|
|
3924
|
+
if (allowsStaleWithoutRevalidation) {
|
|
3925
|
+
return this._evaluateRequestHitResult(void 0);
|
|
3926
|
+
}
|
|
3927
|
+
if (this.useStaleWhileRevalidate()) {
|
|
3928
|
+
return this._evaluateRequestHitResult(this._evaluateRequestRevalidation(req, false));
|
|
3763
3929
|
}
|
|
3930
|
+
return this._evaluateRequestMissResult(req);
|
|
3764
3931
|
}
|
|
3765
|
-
return this.
|
|
3932
|
+
return this._evaluateRequestHitResult(void 0);
|
|
3766
3933
|
}
|
|
3934
|
+
/**
|
|
3935
|
+
* @param {HttpRequest} req - check if this is for the same cache entry
|
|
3936
|
+
* @param {boolean} allowHeadMethod - allow a HEAD method to match.
|
|
3937
|
+
* @returns {boolean} `true` if the request matches.
|
|
3938
|
+
*/
|
|
3767
3939
|
_requestMatches(req, allowHeadMethod) {
|
|
3768
|
-
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
|
|
3940
|
+
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
|
|
3769
3941
|
(!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && // selecting header fields nominated by the stored response (if any) match those presented, and
|
|
3770
|
-
this._varyMatches(req);
|
|
3942
|
+
this._varyMatches(req));
|
|
3771
3943
|
}
|
|
3944
|
+
/**
|
|
3945
|
+
* Determines whether storing authenticated responses is allowed.
|
|
3946
|
+
* @returns {boolean} `true` if allowed.
|
|
3947
|
+
*/
|
|
3772
3948
|
_allowsStoringAuthenticated() {
|
|
3773
|
-
return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
|
|
3949
|
+
return !!(this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"]);
|
|
3774
3950
|
}
|
|
3951
|
+
/**
|
|
3952
|
+
* Checks whether the Vary header in the response matches the new request.
|
|
3953
|
+
* @param {HttpRequest} req - incoming HTTP request
|
|
3954
|
+
* @returns {boolean} `true` if the vary headers match.
|
|
3955
|
+
*/
|
|
3775
3956
|
_varyMatches(req) {
|
|
3776
3957
|
if (!this._resHeaders.vary) {
|
|
3777
3958
|
return true;
|
|
@@ -3785,6 +3966,11 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3785
3966
|
}
|
|
3786
3967
|
return true;
|
|
3787
3968
|
}
|
|
3969
|
+
/**
|
|
3970
|
+
* Creates a copy of the given headers without any hop-by-hop headers.
|
|
3971
|
+
* @param {Record<string, string>} inHeaders - old headers from the cached response
|
|
3972
|
+
* @returns {Record<string, string>} A new headers object without hop-by-hop headers.
|
|
3973
|
+
*/
|
|
3788
3974
|
_copyWithoutHopByHopHeaders(inHeaders) {
|
|
3789
3975
|
const headers = {};
|
|
3790
3976
|
for (const name in inHeaders) {
|
|
@@ -3809,6 +3995,11 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3809
3995
|
}
|
|
3810
3996
|
return headers;
|
|
3811
3997
|
}
|
|
3998
|
+
/**
|
|
3999
|
+
* Returns the response headers adjusted for serving the cached response.
|
|
4000
|
+
* Removes hop-by-hop headers and updates the Age and Date headers.
|
|
4001
|
+
* @returns {Record<string, string>} The adjusted response headers.
|
|
4002
|
+
*/
|
|
3812
4003
|
responseHeaders() {
|
|
3813
4004
|
const headers = this._copyWithoutHopByHopHeaders(this._resHeaders);
|
|
3814
4005
|
const age = this.age();
|
|
@@ -3820,8 +4011,8 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3820
4011
|
return headers;
|
|
3821
4012
|
}
|
|
3822
4013
|
/**
|
|
3823
|
-
*
|
|
3824
|
-
* @
|
|
4014
|
+
* Returns the Date header value from the response or the current time if invalid.
|
|
4015
|
+
* @returns {number} Timestamp (in milliseconds) representing the Date header or response time.
|
|
3825
4016
|
*/
|
|
3826
4017
|
date() {
|
|
3827
4018
|
const serverDate = Date.parse(this._resHeaders.date);
|
|
@@ -3833,23 +4024,27 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3833
4024
|
/**
|
|
3834
4025
|
* Value of the Age header, in seconds, updated for the current time.
|
|
3835
4026
|
* May be fractional.
|
|
3836
|
-
*
|
|
3837
|
-
* @return Number
|
|
4027
|
+
* @returns {number} The age in seconds.
|
|
3838
4028
|
*/
|
|
3839
4029
|
age() {
|
|
3840
4030
|
let age = this._ageValue();
|
|
3841
4031
|
const residentTime = (this.now() - this._responseTime) / 1e3;
|
|
3842
4032
|
return age + residentTime;
|
|
3843
4033
|
}
|
|
4034
|
+
/**
|
|
4035
|
+
* @returns {number} The Age header value as a number.
|
|
4036
|
+
*/
|
|
3844
4037
|
_ageValue() {
|
|
3845
4038
|
return toNumberOrZero(this._resHeaders.age);
|
|
3846
4039
|
}
|
|
3847
4040
|
/**
|
|
3848
|
-
*
|
|
4041
|
+
* Possibly outdated value of applicable max-age (or heuristic equivalent) in seconds.
|
|
4042
|
+
* This counts since response's `Date`.
|
|
3849
4043
|
*
|
|
3850
4044
|
* For an up-to-date value, see `timeToLive()`.
|
|
3851
4045
|
*
|
|
3852
|
-
*
|
|
4046
|
+
* Returns the maximum age (freshness lifetime) of the response in seconds.
|
|
4047
|
+
* @returns {number} The max-age value in seconds.
|
|
3853
4048
|
*/
|
|
3854
4049
|
maxAge() {
|
|
3855
4050
|
if (!this.storable() || this._rescc["no-cache"]) {
|
|
@@ -3892,24 +4087,52 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3892
4087
|
}
|
|
3893
4088
|
return defaultMinTtl;
|
|
3894
4089
|
}
|
|
4090
|
+
/**
|
|
4091
|
+
* Remaining time this cache entry may be useful for, in *milliseconds*.
|
|
4092
|
+
* You can use this as an expiration time for your cache storage.
|
|
4093
|
+
*
|
|
4094
|
+
* Prefer this method over `maxAge()`, because it includes other factors like `age` and `stale-while-revalidate`.
|
|
4095
|
+
* @returns {number} Time-to-live in milliseconds.
|
|
4096
|
+
*/
|
|
3895
4097
|
timeToLive() {
|
|
3896
4098
|
const age = this.maxAge() - this.age();
|
|
3897
4099
|
const staleIfErrorAge = age + toNumberOrZero(this._rescc["stale-if-error"]);
|
|
3898
4100
|
const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc["stale-while-revalidate"]);
|
|
3899
|
-
return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3;
|
|
4101
|
+
return Math.round(Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3);
|
|
3900
4102
|
}
|
|
4103
|
+
/**
|
|
4104
|
+
* If true, this cache entry is past its expiration date.
|
|
4105
|
+
* Note that stale cache may be useful sometimes, see `evaluateRequest()`.
|
|
4106
|
+
* @returns {boolean} `false` doesn't mean it's fresh nor usable
|
|
4107
|
+
*/
|
|
3901
4108
|
stale() {
|
|
3902
4109
|
return this.maxAge() <= this.age();
|
|
3903
4110
|
}
|
|
4111
|
+
/**
|
|
4112
|
+
* @returns {boolean} `true` if `stale-if-error` condition allows use of a stale response.
|
|
4113
|
+
*/
|
|
3904
4114
|
_useStaleIfError() {
|
|
3905
4115
|
return this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > this.age();
|
|
3906
4116
|
}
|
|
4117
|
+
/** See `evaluateRequest()` for a more complete solution
|
|
4118
|
+
* @returns {boolean} `true` if `stale-while-revalidate` is currently allowed.
|
|
4119
|
+
*/
|
|
3907
4120
|
useStaleWhileRevalidate() {
|
|
3908
|
-
|
|
4121
|
+
const swr = toNumberOrZero(this._rescc["stale-while-revalidate"]);
|
|
4122
|
+
return swr > 0 && this.maxAge() + swr > this.age();
|
|
3909
4123
|
}
|
|
4124
|
+
/**
|
|
4125
|
+
* Creates a `CachePolicy` instance from a serialized object.
|
|
4126
|
+
* @param {Object} obj - The serialized object.
|
|
4127
|
+
* @returns {CachePolicy} A new CachePolicy instance.
|
|
4128
|
+
*/
|
|
3910
4129
|
static fromObject(obj) {
|
|
3911
4130
|
return new this(void 0, void 0, { _fromObject: obj });
|
|
3912
4131
|
}
|
|
4132
|
+
/**
|
|
4133
|
+
* @param {any} obj - The serialized object.
|
|
4134
|
+
* @throws {Error} If already initialized or if the object is invalid.
|
|
4135
|
+
*/
|
|
3913
4136
|
_fromObject(obj) {
|
|
3914
4137
|
if (this._responseTime) throw Error("Reinitialized");
|
|
3915
4138
|
if (!obj || obj.v !== 1) throw Error("Invalid serialization");
|
|
@@ -3917,6 +4140,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3917
4140
|
this._isShared = obj.sh;
|
|
3918
4141
|
this._cacheHeuristic = obj.ch;
|
|
3919
4142
|
this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3;
|
|
4143
|
+
this._ignoreCargoCult = !!obj.icc;
|
|
3920
4144
|
this._status = obj.st;
|
|
3921
4145
|
this._resHeaders = obj.resh;
|
|
3922
4146
|
this._rescc = obj.rescc;
|
|
@@ -3927,6 +4151,10 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3927
4151
|
this._reqHeaders = obj.reqh;
|
|
3928
4152
|
this._reqcc = obj.reqcc;
|
|
3929
4153
|
}
|
|
4154
|
+
/**
|
|
4155
|
+
* Serializes the `CachePolicy` instance into a JSON-serializable object.
|
|
4156
|
+
* @returns {Object} The serialized object.
|
|
4157
|
+
*/
|
|
3930
4158
|
toObject() {
|
|
3931
4159
|
return {
|
|
3932
4160
|
v: 1,
|
|
@@ -3934,6 +4162,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3934
4162
|
sh: this._isShared,
|
|
3935
4163
|
ch: this._cacheHeuristic,
|
|
3936
4164
|
imm: this._immutableMinTtl,
|
|
4165
|
+
icc: this._ignoreCargoCult,
|
|
3937
4166
|
st: this._status,
|
|
3938
4167
|
resh: this._resHeaders,
|
|
3939
4168
|
rescc: this._rescc,
|
|
@@ -3951,6 +4180,8 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3951
4180
|
*
|
|
3952
4181
|
* Hop by hop headers are always stripped.
|
|
3953
4182
|
* Revalidation headers may be added or removed, depending on request.
|
|
4183
|
+
* @param {HttpRequest} incomingReq - The incoming HTTP request.
|
|
4184
|
+
* @returns {Record<string, string>} The headers for the revalidation request.
|
|
3954
4185
|
*/
|
|
3955
4186
|
revalidationHeaders(incomingReq) {
|
|
3956
4187
|
this._assertRequestHasHeaders(incomingReq);
|
|
@@ -3989,15 +4220,18 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3989
4220
|
* Returns {policy, modified} where modified is a boolean indicating
|
|
3990
4221
|
* whether the response body has been modified, and old cached body can't be used.
|
|
3991
4222
|
*
|
|
3992
|
-
* @
|
|
4223
|
+
* @param {HttpRequest} request - The latest HTTP request asking for the cached entry.
|
|
4224
|
+
* @param {HttpResponse} response - The latest revalidation HTTP response from the origin server.
|
|
4225
|
+
* @returns {{policy: CachePolicy, modified: boolean, matches: boolean}} The updated policy and modification status.
|
|
4226
|
+
* @throws {Error} If the response headers are missing.
|
|
3993
4227
|
*/
|
|
3994
4228
|
revalidatedPolicy(request, response) {
|
|
3995
4229
|
this._assertRequestHasHeaders(request);
|
|
3996
4230
|
if (this._useStaleIfError() && isErrorResponse(response)) {
|
|
3997
4231
|
return {
|
|
4232
|
+
policy: this,
|
|
3998
4233
|
modified: false,
|
|
3999
|
-
matches:
|
|
4000
|
-
policy: this
|
|
4234
|
+
matches: true
|
|
4001
4235
|
};
|
|
4002
4236
|
}
|
|
4003
4237
|
if (!response || !response.headers) {
|
|
@@ -4017,9 +4251,15 @@ var require_http_cache_semantics = __commonJS({
|
|
|
4017
4251
|
matches = true;
|
|
4018
4252
|
}
|
|
4019
4253
|
}
|
|
4254
|
+
const optionsCopy = {
|
|
4255
|
+
shared: this._isShared,
|
|
4256
|
+
cacheHeuristic: this._cacheHeuristic,
|
|
4257
|
+
immutableMinTimeToLive: this._immutableMinTtl,
|
|
4258
|
+
ignoreCargoCult: this._ignoreCargoCult
|
|
4259
|
+
};
|
|
4020
4260
|
if (!matches) {
|
|
4021
4261
|
return {
|
|
4022
|
-
policy: new this.constructor(request, response),
|
|
4262
|
+
policy: new this.constructor(request, response, optionsCopy),
|
|
4023
4263
|
// Client receiving 304 without body, even if it's invalid/mismatched has no option
|
|
4024
4264
|
// but to reuse a cached body. We don't have a good way to tell clients to do
|
|
4025
4265
|
// error recovery in such case.
|
|
@@ -4037,11 +4277,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
4037
4277
|
headers
|
|
4038
4278
|
});
|
|
4039
4279
|
return {
|
|
4040
|
-
policy: new this.constructor(request, newResponse,
|
|
4041
|
-
shared: this._isShared,
|
|
4042
|
-
cacheHeuristic: this._cacheHeuristic,
|
|
4043
|
-
immutableMinTimeToLive: this._immutableMinTtl
|
|
4044
|
-
}),
|
|
4280
|
+
policy: new this.constructor(request, newResponse, optionsCopy),
|
|
4045
4281
|
modified: false,
|
|
4046
4282
|
matches: true
|
|
4047
4283
|
};
|
|
@@ -7114,7 +7350,7 @@ var require_polyfills2 = __commonJS({
|
|
|
7114
7350
|
};
|
|
7115
7351
|
}
|
|
7116
7352
|
if (platform === "win32") {
|
|
7117
|
-
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
|
|
7353
|
+
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : (function(fs$rename) {
|
|
7118
7354
|
function rename(from, to, cb) {
|
|
7119
7355
|
var start = Date.now();
|
|
7120
7356
|
var backoff = 0;
|
|
@@ -7137,9 +7373,9 @@ var require_polyfills2 = __commonJS({
|
|
|
7137
7373
|
}
|
|
7138
7374
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
7139
7375
|
return rename;
|
|
7140
|
-
}(fs3.rename);
|
|
7376
|
+
})(fs3.rename);
|
|
7141
7377
|
}
|
|
7142
|
-
fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
|
|
7378
|
+
fs3.read = typeof fs3.read !== "function" ? fs3.read : (function(fs$read) {
|
|
7143
7379
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
7144
7380
|
var callback;
|
|
7145
7381
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -7156,8 +7392,8 @@ var require_polyfills2 = __commonJS({
|
|
|
7156
7392
|
}
|
|
7157
7393
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
7158
7394
|
return read;
|
|
7159
|
-
}(fs3.read);
|
|
7160
|
-
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
7395
|
+
})(fs3.read);
|
|
7396
|
+
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
7161
7397
|
return function(fd, buffer, offset, length, position) {
|
|
7162
7398
|
var eagCounter = 0;
|
|
7163
7399
|
while (true) {
|
|
@@ -7172,7 +7408,7 @@ var require_polyfills2 = __commonJS({
|
|
|
7172
7408
|
}
|
|
7173
7409
|
}
|
|
7174
7410
|
};
|
|
7175
|
-
}(fs3.readSync);
|
|
7411
|
+
})(fs3.readSync);
|
|
7176
7412
|
function patchLchmod(fs4) {
|
|
7177
7413
|
fs4.lchmod = function(path6, mode, callback) {
|
|
7178
7414
|
fs4.open(
|
|
@@ -7498,7 +7734,7 @@ var require_graceful_fs2 = __commonJS({
|
|
|
7498
7734
|
if (!fs3[gracefulQueue]) {
|
|
7499
7735
|
queue = global[gracefulQueue] || [];
|
|
7500
7736
|
publishQueue(fs3, queue);
|
|
7501
|
-
fs3.close = function(fs$close) {
|
|
7737
|
+
fs3.close = (function(fs$close) {
|
|
7502
7738
|
function close(fd, cb) {
|
|
7503
7739
|
return fs$close.call(fs3, fd, function(err) {
|
|
7504
7740
|
if (!err) {
|
|
@@ -7512,8 +7748,8 @@ var require_graceful_fs2 = __commonJS({
|
|
|
7512
7748
|
value: fs$close
|
|
7513
7749
|
});
|
|
7514
7750
|
return close;
|
|
7515
|
-
}(fs3.close);
|
|
7516
|
-
fs3.closeSync = function(fs$closeSync) {
|
|
7751
|
+
})(fs3.close);
|
|
7752
|
+
fs3.closeSync = (function(fs$closeSync) {
|
|
7517
7753
|
function closeSync(fd) {
|
|
7518
7754
|
fs$closeSync.apply(fs3, arguments);
|
|
7519
7755
|
resetQueue();
|
|
@@ -7522,7 +7758,7 @@ var require_graceful_fs2 = __commonJS({
|
|
|
7522
7758
|
value: fs$closeSync
|
|
7523
7759
|
});
|
|
7524
7760
|
return closeSync;
|
|
7525
|
-
}(fs3.closeSync);
|
|
7761
|
+
})(fs3.closeSync);
|
|
7526
7762
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
7527
7763
|
process.on("exit", function() {
|
|
7528
7764
|
debug2(fs3[gracefulQueue]);
|
|
@@ -7862,7 +8098,7 @@ var require_dist = __commonJS({
|
|
|
7862
8098
|
"../../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/index.js"(exports2) {
|
|
7863
8099
|
"use strict";
|
|
7864
8100
|
init_cjs_shims();
|
|
7865
|
-
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
8101
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
7866
8102
|
if (k2 === void 0) k2 = k;
|
|
7867
8103
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7868
8104
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
@@ -7871,10 +8107,10 @@ var require_dist = __commonJS({
|
|
|
7871
8107
|
} };
|
|
7872
8108
|
}
|
|
7873
8109
|
Object.defineProperty(o, k2, desc);
|
|
7874
|
-
} : function(o, m, k, k2) {
|
|
8110
|
+
}) : (function(o, m, k, k2) {
|
|
7875
8111
|
if (k2 === void 0) k2 = k;
|
|
7876
8112
|
o[k2] = m[k];
|
|
7877
|
-
});
|
|
8113
|
+
}));
|
|
7878
8114
|
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
7879
8115
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
|
|
7880
8116
|
};
|
|
@@ -8225,9 +8461,9 @@ var require_config_chain = __commonJS({
|
|
|
8225
8461
|
}
|
|
8226
8462
|
});
|
|
8227
8463
|
|
|
8228
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8464
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
|
|
8229
8465
|
var require_envKeyToSetting = __commonJS({
|
|
8230
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8466
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js"(exports2, module2) {
|
|
8231
8467
|
"use strict";
|
|
8232
8468
|
init_cjs_shims();
|
|
8233
8469
|
module2.exports = function(x) {
|
|
@@ -8301,14 +8537,20 @@ var require_dist2 = __commonJS({
|
|
|
8301
8537
|
}
|
|
8302
8538
|
});
|
|
8303
8539
|
|
|
8304
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8540
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js
|
|
8305
8541
|
var require_util = __commonJS({
|
|
8306
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8542
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js"(exports2) {
|
|
8307
8543
|
"use strict";
|
|
8308
8544
|
init_cjs_shims();
|
|
8309
8545
|
var fs3 = require("fs");
|
|
8310
8546
|
var path6 = require("path");
|
|
8311
8547
|
var { envReplace } = require_dist2();
|
|
8548
|
+
var parseKey = (key) => {
|
|
8549
|
+
if (typeof key !== "string") {
|
|
8550
|
+
return key;
|
|
8551
|
+
}
|
|
8552
|
+
return envReplace(key, process.env);
|
|
8553
|
+
};
|
|
8312
8554
|
var parseField = (types2, field, key) => {
|
|
8313
8555
|
if (typeof field !== "string") {
|
|
8314
8556
|
return field;
|
|
@@ -8330,6 +8572,7 @@ var require_util = __commonJS({
|
|
|
8330
8572
|
return true;
|
|
8331
8573
|
}
|
|
8332
8574
|
switch (field) {
|
|
8575
|
+
// eslint-disable-line default-case
|
|
8333
8576
|
case "true": {
|
|
8334
8577
|
return true;
|
|
8335
8578
|
}
|
|
@@ -8396,12 +8639,13 @@ var require_util = __commonJS({
|
|
|
8396
8639
|
exports2.envReplace = envReplace;
|
|
8397
8640
|
exports2.findPrefix = findPrefix;
|
|
8398
8641
|
exports2.parseField = parseField;
|
|
8642
|
+
exports2.parseKey = parseKey;
|
|
8399
8643
|
}
|
|
8400
8644
|
});
|
|
8401
8645
|
|
|
8402
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8646
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js
|
|
8403
8647
|
var require_types = __commonJS({
|
|
8404
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8648
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js"(exports2) {
|
|
8405
8649
|
"use strict";
|
|
8406
8650
|
init_cjs_shims();
|
|
8407
8651
|
var path6 = require("path");
|
|
@@ -8539,9 +8783,9 @@ var require_types = __commonJS({
|
|
|
8539
8783
|
}
|
|
8540
8784
|
});
|
|
8541
8785
|
|
|
8542
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8786
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js
|
|
8543
8787
|
var require_conf = __commonJS({
|
|
8544
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8788
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js"(exports2, module2) {
|
|
8545
8789
|
"use strict";
|
|
8546
8790
|
init_cjs_shims();
|
|
8547
8791
|
var { readCAFileSync } = require_dist();
|
|
@@ -8560,8 +8804,12 @@ var require_conf = __commonJS({
|
|
|
8560
8804
|
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L326-L338
|
|
8561
8805
|
add(data, marker) {
|
|
8562
8806
|
try {
|
|
8563
|
-
for (const
|
|
8564
|
-
|
|
8807
|
+
for (const [key, value] of Object.entries(data)) {
|
|
8808
|
+
const substKey = util.parseKey(key);
|
|
8809
|
+
if (substKey !== key) {
|
|
8810
|
+
delete data[key];
|
|
8811
|
+
}
|
|
8812
|
+
data[substKey] = this._parseField(value, substKey);
|
|
8565
8813
|
}
|
|
8566
8814
|
} catch (error2) {
|
|
8567
8815
|
throw error2;
|
|
@@ -8581,7 +8829,7 @@ var require_conf = __commonJS({
|
|
|
8581
8829
|
} catch (error2) {
|
|
8582
8830
|
if (error2.code === "ENOENT") {
|
|
8583
8831
|
this.add({}, marker);
|
|
8584
|
-
} else {
|
|
8832
|
+
} else if (error2.code !== "EISDIR") {
|
|
8585
8833
|
return `Issue while reading "${file}". ${error2.message}`;
|
|
8586
8834
|
}
|
|
8587
8835
|
}
|
|
@@ -8594,7 +8842,9 @@ var require_conf = __commonJS({
|
|
|
8594
8842
|
if (!env4[x]) {
|
|
8595
8843
|
return;
|
|
8596
8844
|
}
|
|
8597
|
-
|
|
8845
|
+
const key = envKeyToSetting(x.substr(11));
|
|
8846
|
+
const rawVal = env4[x];
|
|
8847
|
+
conf[key] = deserializeEnvVal(key, rawVal);
|
|
8598
8848
|
});
|
|
8599
8849
|
return super.addEnv("", conf, "env");
|
|
8600
8850
|
}
|
|
@@ -8675,13 +8925,28 @@ var require_conf = __commonJS({
|
|
|
8675
8925
|
}
|
|
8676
8926
|
}
|
|
8677
8927
|
};
|
|
8928
|
+
function deserializeEnvVal(envKey, envValue) {
|
|
8929
|
+
function deserializeList(envValue2) {
|
|
8930
|
+
const npmConfigSep = "\n\n";
|
|
8931
|
+
if (envValue2.indexOf(npmConfigSep)) {
|
|
8932
|
+
return envValue2.split(npmConfigSep);
|
|
8933
|
+
}
|
|
8934
|
+
return envValue2.split(",");
|
|
8935
|
+
}
|
|
8936
|
+
switch (envKey) {
|
|
8937
|
+
case "hoist-pattern":
|
|
8938
|
+
case "public-hoist-pattern":
|
|
8939
|
+
return deserializeList(envValue);
|
|
8940
|
+
}
|
|
8941
|
+
return envValue;
|
|
8942
|
+
}
|
|
8678
8943
|
module2.exports = Conf;
|
|
8679
8944
|
}
|
|
8680
8945
|
});
|
|
8681
8946
|
|
|
8682
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8947
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js
|
|
8683
8948
|
var require_defaults = __commonJS({
|
|
8684
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8949
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
|
|
8685
8950
|
"use strict";
|
|
8686
8951
|
init_cjs_shims();
|
|
8687
8952
|
var os6 = require("os");
|
|
@@ -8848,9 +9113,9 @@ var require_defaults = __commonJS({
|
|
|
8848
9113
|
}
|
|
8849
9114
|
});
|
|
8850
9115
|
|
|
8851
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
9116
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js
|
|
8852
9117
|
var require_npm_conf = __commonJS({
|
|
8853
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
9118
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js"(exports2, module2) {
|
|
8854
9119
|
"use strict";
|
|
8855
9120
|
init_cjs_shims();
|
|
8856
9121
|
var path6 = require("path");
|
|
@@ -8913,12 +9178,11 @@ var require_npm_conf = __commonJS({
|
|
|
8913
9178
|
}
|
|
8914
9179
|
});
|
|
8915
9180
|
|
|
8916
|
-
// ../../node_modules/.pnpm/registry-auth-token@5.0
|
|
9181
|
+
// ../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js
|
|
8917
9182
|
var require_registry_auth_token = __commonJS({
|
|
8918
|
-
"../../node_modules/.pnpm/registry-auth-token@5.0
|
|
9183
|
+
"../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js"(exports2, module2) {
|
|
8919
9184
|
"use strict";
|
|
8920
9185
|
init_cjs_shims();
|
|
8921
|
-
var url = require("url");
|
|
8922
9186
|
var npmConf = require_npm_conf();
|
|
8923
9187
|
var tokenKey = ":_authToken";
|
|
8924
9188
|
var legacyTokenKey = ":_auth";
|
|
@@ -8945,8 +9209,16 @@ var require_registry_auth_token = __commonJS({
|
|
|
8945
9209
|
checkUrl = checkUrl || options.npmrc.get("registry") || npmConf.defaults.registry;
|
|
8946
9210
|
return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc);
|
|
8947
9211
|
};
|
|
9212
|
+
function urlResolve(from, to) {
|
|
9213
|
+
const resolvedUrl = new URL(to, new URL(from.startsWith("//") ? `./${from}` : from, "resolve://"));
|
|
9214
|
+
if (resolvedUrl.protocol === "resolve:") {
|
|
9215
|
+
const { pathname, search, hash } = resolvedUrl;
|
|
9216
|
+
return pathname + search + hash;
|
|
9217
|
+
}
|
|
9218
|
+
return resolvedUrl.toString();
|
|
9219
|
+
}
|
|
8948
9220
|
function getRegistryAuthInfo(checkUrl, options) {
|
|
8949
|
-
|
|
9221
|
+
let parsed = checkUrl instanceof URL ? checkUrl : new URL(checkUrl.startsWith("//") ? `http:${checkUrl}` : checkUrl);
|
|
8950
9222
|
let pathname;
|
|
8951
9223
|
while (pathname !== "/" && parsed.pathname !== pathname) {
|
|
8952
9224
|
pathname = parsed.pathname || "/";
|
|
@@ -8956,9 +9228,9 @@ var require_registry_auth_token = __commonJS({
|
|
|
8956
9228
|
return authInfo;
|
|
8957
9229
|
}
|
|
8958
9230
|
if (!options.recursive) {
|
|
8959
|
-
return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(
|
|
9231
|
+
return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(new URL("./", parsed), options);
|
|
8960
9232
|
}
|
|
8961
|
-
parsed.pathname =
|
|
9233
|
+
parsed.pathname = urlResolve(normalizePath(pathname), "..") || "/";
|
|
8962
9234
|
}
|
|
8963
9235
|
return void 0;
|
|
8964
9236
|
}
|
|
@@ -10089,10 +10361,10 @@ var import_runtime5 = require("@terai/runtime");
|
|
|
10089
10361
|
|
|
10090
10362
|
// ../logger/dist/index.mjs
|
|
10091
10363
|
init_cjs_shims();
|
|
10092
|
-
var
|
|
10093
|
-
var
|
|
10094
|
-
var
|
|
10095
|
-
var
|
|
10364
|
+
var import_process = __toESM(require("process"), 1);
|
|
10365
|
+
var import_process2 = __toESM(require("process"), 1);
|
|
10366
|
+
var import_os = __toESM(require("os"), 1);
|
|
10367
|
+
var import_tty = __toESM(require("tty"), 1);
|
|
10096
10368
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
10097
10369
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
10098
10370
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -10277,13 +10549,13 @@ function assembleStyles() {
|
|
|
10277
10549
|
}
|
|
10278
10550
|
var ansiStyles = assembleStyles();
|
|
10279
10551
|
var ansi_styles_default = ansiStyles;
|
|
10280
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
10552
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_process2.default.argv) {
|
|
10281
10553
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
10282
10554
|
const position = argv.indexOf(prefix + flag);
|
|
10283
10555
|
const terminatorPosition = argv.indexOf("--");
|
|
10284
10556
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
10285
10557
|
}
|
|
10286
|
-
var { env } =
|
|
10558
|
+
var { env } = import_process2.default;
|
|
10287
10559
|
var flagForceColor;
|
|
10288
10560
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
10289
10561
|
flagForceColor = 0;
|
|
@@ -10339,18 +10611,18 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
10339
10611
|
if (env.TERM === "dumb") {
|
|
10340
10612
|
return min;
|
|
10341
10613
|
}
|
|
10342
|
-
if (
|
|
10343
|
-
const osRelease =
|
|
10614
|
+
if (import_process2.default.platform === "win32") {
|
|
10615
|
+
const osRelease = import_os.default.release().split(".");
|
|
10344
10616
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
10345
10617
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
10346
10618
|
}
|
|
10347
10619
|
return 1;
|
|
10348
10620
|
}
|
|
10349
10621
|
if ("CI" in env) {
|
|
10350
|
-
if ("GITHUB_ACTIONS"
|
|
10622
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
|
|
10351
10623
|
return 3;
|
|
10352
10624
|
}
|
|
10353
|
-
if (["TRAVIS", "
|
|
10625
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
10354
10626
|
return 1;
|
|
10355
10627
|
}
|
|
10356
10628
|
return min;
|
|
@@ -10364,6 +10636,12 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
10364
10636
|
if (env.TERM === "xterm-kitty") {
|
|
10365
10637
|
return 3;
|
|
10366
10638
|
}
|
|
10639
|
+
if (env.TERM === "xterm-ghostty") {
|
|
10640
|
+
return 3;
|
|
10641
|
+
}
|
|
10642
|
+
if (env.TERM === "wezterm") {
|
|
10643
|
+
return 3;
|
|
10644
|
+
}
|
|
10367
10645
|
if ("TERM_PROGRAM" in env) {
|
|
10368
10646
|
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
10369
10647
|
switch (env.TERM_PROGRAM) {
|
|
@@ -10394,8 +10672,8 @@ function createSupportsColor(stream2, options = {}) {
|
|
|
10394
10672
|
return translateLevel(level);
|
|
10395
10673
|
}
|
|
10396
10674
|
var supportsColor = {
|
|
10397
|
-
stdout: createSupportsColor({ isTTY:
|
|
10398
|
-
stderr: createSupportsColor({ isTTY:
|
|
10675
|
+
stdout: createSupportsColor({ isTTY: import_tty.default.isatty(1) }),
|
|
10676
|
+
stderr: createSupportsColor({ isTTY: import_tty.default.isatty(2) })
|
|
10399
10677
|
};
|
|
10400
10678
|
var supports_color_default = supportsColor;
|
|
10401
10679
|
function stringReplaceAll(string, substring, replacer) {
|
|
@@ -10572,11 +10850,11 @@ var chalk = createChalk();
|
|
|
10572
10850
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
10573
10851
|
var source_default = chalk;
|
|
10574
10852
|
function log(message) {
|
|
10575
|
-
return
|
|
10853
|
+
return import_process.default.stdout.write(`${message}
|
|
10576
10854
|
`);
|
|
10577
10855
|
}
|
|
10578
10856
|
function logError(message) {
|
|
10579
|
-
return
|
|
10857
|
+
return import_process.default.stderr.write(`${message}
|
|
10580
10858
|
`);
|
|
10581
10859
|
}
|
|
10582
10860
|
function logBullet(logger2, colorizePrefix, colorizeText, symbol, prefix, text) {
|
|
@@ -10642,7 +10920,7 @@ init_cjs_shims();
|
|
|
10642
10920
|
|
|
10643
10921
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
10644
10922
|
init_cjs_shims();
|
|
10645
|
-
var
|
|
10923
|
+
var import_node_process7 = __toESM(require("process"), 1);
|
|
10646
10924
|
var import_node_child_process = require("child_process");
|
|
10647
10925
|
var import_node_url5 = require("url");
|
|
10648
10926
|
var import_node_path3 = __toESM(require("path"), 1);
|
|
@@ -10651,14 +10929,14 @@ var import_node_util4 = require("util");
|
|
|
10651
10929
|
// ../../node_modules/.pnpm/configstore@6.0.0/node_modules/configstore/index.js
|
|
10652
10930
|
init_cjs_shims();
|
|
10653
10931
|
var import_path2 = __toESM(require("path"), 1);
|
|
10654
|
-
var
|
|
10932
|
+
var import_os3 = __toESM(require("os"), 1);
|
|
10655
10933
|
var import_graceful_fs = __toESM(require_graceful_fs(), 1);
|
|
10656
10934
|
|
|
10657
10935
|
// ../../node_modules/.pnpm/xdg-basedir@5.1.0/node_modules/xdg-basedir/index.js
|
|
10658
10936
|
init_cjs_shims();
|
|
10659
|
-
var
|
|
10937
|
+
var import_os2 = __toESM(require("os"), 1);
|
|
10660
10938
|
var import_path = __toESM(require("path"), 1);
|
|
10661
|
-
var homeDirectory =
|
|
10939
|
+
var homeDirectory = import_os2.default.homedir();
|
|
10662
10940
|
var { env: env2 } = process;
|
|
10663
10941
|
var xdgData = env2.XDG_DATA_HOME || (homeDirectory ? import_path.default.join(homeDirectory, ".local", "share") : void 0);
|
|
10664
10942
|
var xdgConfig = env2.XDG_CONFIG_HOME || (homeDirectory ? import_path.default.join(homeDirectory, ".config") : void 0);
|
|
@@ -10803,7 +11081,7 @@ function uniqueString() {
|
|
|
10803
11081
|
}
|
|
10804
11082
|
|
|
10805
11083
|
// ../../node_modules/.pnpm/configstore@6.0.0/node_modules/configstore/index.js
|
|
10806
|
-
var configDirectory = xdgConfig || import_path2.default.join(
|
|
11084
|
+
var configDirectory = xdgConfig || import_path2.default.join(import_os3.default.tmpdir(), uniqueString());
|
|
10807
11085
|
var permissionError = "You don't have access to this file.";
|
|
10808
11086
|
var mkdirOptions = { mode: 448, recursive: true };
|
|
10809
11087
|
var writeFileOptions = { mode: 384 };
|
|
@@ -10883,10 +11161,10 @@ ${permissionError}
|
|
|
10883
11161
|
}
|
|
10884
11162
|
};
|
|
10885
11163
|
|
|
10886
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11164
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
10887
11165
|
init_cjs_shims();
|
|
10888
11166
|
|
|
10889
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11167
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
10890
11168
|
init_cjs_shims();
|
|
10891
11169
|
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
10892
11170
|
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -11073,18 +11351,18 @@ function assembleStyles2() {
|
|
|
11073
11351
|
var ansiStyles2 = assembleStyles2();
|
|
11074
11352
|
var ansi_styles_default2 = ansiStyles2;
|
|
11075
11353
|
|
|
11076
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11354
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
11077
11355
|
init_cjs_shims();
|
|
11078
|
-
var
|
|
11079
|
-
var
|
|
11080
|
-
var
|
|
11081
|
-
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
11356
|
+
var import_node_process = __toESM(require("process"), 1);
|
|
11357
|
+
var import_node_os = __toESM(require("os"), 1);
|
|
11358
|
+
var import_node_tty = __toESM(require("tty"), 1);
|
|
11359
|
+
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
|
11082
11360
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
11083
11361
|
const position = argv.indexOf(prefix + flag);
|
|
11084
11362
|
const terminatorPosition = argv.indexOf("--");
|
|
11085
11363
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
11086
11364
|
}
|
|
11087
|
-
var { env: env3 } =
|
|
11365
|
+
var { env: env3 } = import_node_process.default;
|
|
11088
11366
|
var flagForceColor2;
|
|
11089
11367
|
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
11090
11368
|
flagForceColor2 = 0;
|
|
@@ -11140,18 +11418,18 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
11140
11418
|
if (env3.TERM === "dumb") {
|
|
11141
11419
|
return min;
|
|
11142
11420
|
}
|
|
11143
|
-
if (
|
|
11144
|
-
const osRelease =
|
|
11421
|
+
if (import_node_process.default.platform === "win32") {
|
|
11422
|
+
const osRelease = import_node_os.default.release().split(".");
|
|
11145
11423
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
11146
11424
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
11147
11425
|
}
|
|
11148
11426
|
return 1;
|
|
11149
11427
|
}
|
|
11150
11428
|
if ("CI" in env3) {
|
|
11151
|
-
if ("GITHUB_ACTIONS"
|
|
11429
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env3)) {
|
|
11152
11430
|
return 3;
|
|
11153
11431
|
}
|
|
11154
|
-
if (["TRAVIS", "
|
|
11432
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
|
|
11155
11433
|
return 1;
|
|
11156
11434
|
}
|
|
11157
11435
|
return min;
|
|
@@ -11165,6 +11443,12 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
11165
11443
|
if (env3.TERM === "xterm-kitty") {
|
|
11166
11444
|
return 3;
|
|
11167
11445
|
}
|
|
11446
|
+
if (env3.TERM === "xterm-ghostty") {
|
|
11447
|
+
return 3;
|
|
11448
|
+
}
|
|
11449
|
+
if (env3.TERM === "wezterm") {
|
|
11450
|
+
return 3;
|
|
11451
|
+
}
|
|
11168
11452
|
if ("TERM_PROGRAM" in env3) {
|
|
11169
11453
|
const version = Number.parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
11170
11454
|
switch (env3.TERM_PROGRAM) {
|
|
@@ -11195,12 +11479,12 @@ function createSupportsColor2(stream2, options = {}) {
|
|
|
11195
11479
|
return translateLevel2(level);
|
|
11196
11480
|
}
|
|
11197
11481
|
var supportsColor2 = {
|
|
11198
|
-
stdout: createSupportsColor2({ isTTY:
|
|
11199
|
-
stderr: createSupportsColor2({ isTTY:
|
|
11482
|
+
stdout: createSupportsColor2({ isTTY: import_node_tty.default.isatty(1) }),
|
|
11483
|
+
stderr: createSupportsColor2({ isTTY: import_node_tty.default.isatty(2) })
|
|
11200
11484
|
};
|
|
11201
11485
|
var supports_color_default2 = supportsColor2;
|
|
11202
11486
|
|
|
11203
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11487
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
11204
11488
|
init_cjs_shims();
|
|
11205
11489
|
function stringReplaceAll2(string, substring, replacer) {
|
|
11206
11490
|
let index = string.indexOf(substring);
|
|
@@ -11231,7 +11515,7 @@ function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
|
11231
11515
|
return returnValue;
|
|
11232
11516
|
}
|
|
11233
11517
|
|
|
11234
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11518
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
11235
11519
|
var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
|
|
11236
11520
|
var GENERATOR2 = Symbol("GENERATOR");
|
|
11237
11521
|
var STYLER2 = Symbol("STYLER");
|
|
@@ -12064,7 +12348,7 @@ var AbortError = class extends RequestError {
|
|
|
12064
12348
|
|
|
12065
12349
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/index.js
|
|
12066
12350
|
init_cjs_shims();
|
|
12067
|
-
var
|
|
12351
|
+
var import_node_process3 = __toESM(require("process"), 1);
|
|
12068
12352
|
var import_node_buffer2 = require("buffer");
|
|
12069
12353
|
var import_node_stream3 = require("stream");
|
|
12070
12354
|
var import_node_url3 = require("url");
|
|
@@ -12183,7 +12467,7 @@ var import_node_url = __toESM(require("url"), 1);
|
|
|
12183
12467
|
var import_node_crypto = __toESM(require("crypto"), 1);
|
|
12184
12468
|
var import_node_stream2 = __toESM(require("stream"), 1);
|
|
12185
12469
|
|
|
12186
|
-
// ../../node_modules/.pnpm/normalize-url@8.0
|
|
12470
|
+
// ../../node_modules/.pnpm/normalize-url@8.1.0/node_modules/normalize-url/index.js
|
|
12187
12471
|
init_cjs_shims();
|
|
12188
12472
|
var DATA_URL_DEFAULT_MIME_TYPE = "text/plain";
|
|
12189
12473
|
var DATA_URL_DEFAULT_CHARSET = "us-ascii";
|
|
@@ -12252,6 +12536,8 @@ function normalizeUrl(urlString, options) {
|
|
|
12252
12536
|
removeDirectoryIndex: false,
|
|
12253
12537
|
removeExplicitPort: false,
|
|
12254
12538
|
sortQueryParameters: true,
|
|
12539
|
+
removePath: false,
|
|
12540
|
+
transformPath: false,
|
|
12255
12541
|
...options
|
|
12256
12542
|
};
|
|
12257
12543
|
if (typeof options.defaultProtocol === "string" && !options.defaultProtocol.endsWith(":")) {
|
|
@@ -12310,7 +12596,7 @@ function normalizeUrl(urlString, options) {
|
|
|
12310
12596
|
}
|
|
12311
12597
|
if (urlObject.pathname) {
|
|
12312
12598
|
try {
|
|
12313
|
-
urlObject.pathname = decodeURI(urlObject.pathname);
|
|
12599
|
+
urlObject.pathname = decodeURI(urlObject.pathname).replace(/\\/g, "%5C");
|
|
12314
12600
|
} catch {
|
|
12315
12601
|
}
|
|
12316
12602
|
}
|
|
@@ -12325,6 +12611,14 @@ function normalizeUrl(urlString, options) {
|
|
|
12325
12611
|
urlObject.pathname = pathComponents.slice(1).join("/") + "/";
|
|
12326
12612
|
}
|
|
12327
12613
|
}
|
|
12614
|
+
if (options.removePath) {
|
|
12615
|
+
urlObject.pathname = "/";
|
|
12616
|
+
}
|
|
12617
|
+
if (options.transformPath && typeof options.transformPath === "function") {
|
|
12618
|
+
const pathComponents = urlObject.pathname.split("/").filter(Boolean);
|
|
12619
|
+
const newComponents = options.transformPath(pathComponents);
|
|
12620
|
+
urlObject.pathname = newComponents?.length > 0 ? `/${newComponents.join("/")}` : "/";
|
|
12621
|
+
}
|
|
12328
12622
|
if (urlObject.hostname) {
|
|
12329
12623
|
urlObject.hostname = urlObject.hostname.replace(/\.$/, "");
|
|
12330
12624
|
if (options.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(urlObject.hostname)) {
|
|
@@ -12349,11 +12643,17 @@ function normalizeUrl(urlString, options) {
|
|
|
12349
12643
|
}
|
|
12350
12644
|
}
|
|
12351
12645
|
if (options.sortQueryParameters) {
|
|
12646
|
+
const originalSearch = urlObject.search;
|
|
12352
12647
|
urlObject.searchParams.sort();
|
|
12353
12648
|
try {
|
|
12354
12649
|
urlObject.search = decodeURIComponent(urlObject.search);
|
|
12355
12650
|
} catch {
|
|
12356
12651
|
}
|
|
12652
|
+
const partsWithoutEquals = originalSearch.slice(1).split("&").filter((p) => p && !p.includes("="));
|
|
12653
|
+
for (const part of partsWithoutEquals) {
|
|
12654
|
+
const decoded = decodeURIComponent(part);
|
|
12655
|
+
urlObject.search = urlObject.search.replace(`?${decoded}=`, `?${decoded}`).replace(`&${decoded}=`, `&${decoded}`);
|
|
12656
|
+
}
|
|
12357
12657
|
}
|
|
12358
12658
|
if (options.removeTrailingSlash) {
|
|
12359
12659
|
urlObject.pathname = urlObject.pathname.replace(/\/$/, "");
|
|
@@ -13280,7 +13580,7 @@ var calculate_retry_delay_default = calculateRetryDelay;
|
|
|
13280
13580
|
|
|
13281
13581
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/options.js
|
|
13282
13582
|
init_cjs_shims();
|
|
13283
|
-
var
|
|
13583
|
+
var import_node_process2 = __toESM(require("process"), 1);
|
|
13284
13584
|
var import_node_util3 = require("util");
|
|
13285
13585
|
var import_node_url2 = require("url");
|
|
13286
13586
|
var import_node_tls = require("tls");
|
|
@@ -13291,7 +13591,7 @@ var import_node_https = __toESM(require("https"), 1);
|
|
|
13291
13591
|
init_cjs_shims();
|
|
13292
13592
|
var import_node_dns = require("dns");
|
|
13293
13593
|
var import_node_util2 = require("util");
|
|
13294
|
-
var
|
|
13594
|
+
var import_node_os2 = __toESM(require("os"), 1);
|
|
13295
13595
|
var { Resolver: AsyncResolver } = import_node_dns.promises;
|
|
13296
13596
|
var kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection");
|
|
13297
13597
|
var kCacheableLookupInstance = Symbol("cacheableLookupInstance");
|
|
@@ -13314,7 +13614,7 @@ var map4to6 = (entries2) => {
|
|
|
13314
13614
|
var getIfaceInfo = () => {
|
|
13315
13615
|
let has4 = false;
|
|
13316
13616
|
let has6 = false;
|
|
13317
|
-
for (const device of Object.values(
|
|
13617
|
+
for (const device of Object.values(import_node_os2.default.networkInterfaces())) {
|
|
13318
13618
|
for (const iface of device) {
|
|
13319
13619
|
if (iface.internal) {
|
|
13320
13620
|
continue;
|
|
@@ -13675,7 +13975,7 @@ function parseLinkHeader(link) {
|
|
|
13675
13975
|
}
|
|
13676
13976
|
|
|
13677
13977
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/options.js
|
|
13678
|
-
var [major, minor] =
|
|
13978
|
+
var [major, minor] = import_node_process2.default.versions.node.split(".").map(Number);
|
|
13679
13979
|
function validateSearchParameters(searchParameters) {
|
|
13680
13980
|
for (const key in searchParameters) {
|
|
13681
13981
|
const value = searchParameters[key];
|
|
@@ -15306,7 +15606,7 @@ function isUnixSocketURL(url) {
|
|
|
15306
15606
|
|
|
15307
15607
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/index.js
|
|
15308
15608
|
var { buffer: getBuffer } = import_get_stream2.default;
|
|
15309
|
-
var supportsBrotli = dist_default.string(
|
|
15609
|
+
var supportsBrotli = dist_default.string(import_node_process3.default.versions.brotli);
|
|
15310
15610
|
var methodsWithoutBody = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
15311
15611
|
var cacheableStore = new WeakableMap();
|
|
15312
15612
|
var redirectCodes = /* @__PURE__ */ new Set([300, 301, 302, 303, 304, 307, 308]);
|
|
@@ -15654,7 +15954,7 @@ var Request = class _Request extends import_node_stream3.Duplex {
|
|
|
15654
15954
|
this.emit("retry", this.retryCount + 1, error2, (updatedOptions) => {
|
|
15655
15955
|
const request = new _Request(options.url, updatedOptions, options);
|
|
15656
15956
|
request.retryCount = this.retryCount + 1;
|
|
15657
|
-
|
|
15957
|
+
import_node_process3.default.nextTick(() => {
|
|
15658
15958
|
void request.flush();
|
|
15659
15959
|
});
|
|
15660
15960
|
return request;
|
|
@@ -16048,7 +16348,7 @@ var Request = class _Request extends import_node_stream3.Duplex {
|
|
|
16048
16348
|
}
|
|
16049
16349
|
_prepareCache(cache) {
|
|
16050
16350
|
if (!cacheableStore.has(cache)) {
|
|
16051
|
-
const cacheableRequest = new dist_default2((requestOptions, handler) => {
|
|
16351
|
+
const cacheableRequest = new dist_default2(((requestOptions, handler) => {
|
|
16052
16352
|
const result = requestOptions._request(requestOptions, handler);
|
|
16053
16353
|
if (dist_default.promise(result)) {
|
|
16054
16354
|
result.once = (event, handler2) => {
|
|
@@ -16075,7 +16375,7 @@ var Request = class _Request extends import_node_stream3.Duplex {
|
|
|
16075
16375
|
};
|
|
16076
16376
|
}
|
|
16077
16377
|
return result;
|
|
16078
|
-
}, cache);
|
|
16378
|
+
}), cache);
|
|
16079
16379
|
cacheableStore.set(cache, cacheableRequest.request());
|
|
16080
16380
|
}
|
|
16081
16381
|
}
|
|
@@ -16474,7 +16774,7 @@ var create = (defaults2) => {
|
|
|
16474
16774
|
configurable: false,
|
|
16475
16775
|
writable: false
|
|
16476
16776
|
});
|
|
16477
|
-
const got2 = (url, options, defaultOptions2 = defaults2.options) => {
|
|
16777
|
+
const got2 = ((url, options, defaultOptions2 = defaults2.options) => {
|
|
16478
16778
|
const request = new Request(url, options, defaultOptions2);
|
|
16479
16779
|
let promise;
|
|
16480
16780
|
const lastHandler = (normalized) => {
|
|
@@ -16511,7 +16811,7 @@ var create = (defaults2) => {
|
|
|
16511
16811
|
return result;
|
|
16512
16812
|
};
|
|
16513
16813
|
return iterateHandlers(request.options);
|
|
16514
|
-
};
|
|
16814
|
+
});
|
|
16515
16815
|
got2.extend = (...instancesOrOptions) => {
|
|
16516
16816
|
const options = new Options(void 0, void 0, defaults2.options);
|
|
16517
16817
|
const handlers = [...defaults2.handlers];
|
|
@@ -16535,7 +16835,7 @@ var create = (defaults2) => {
|
|
|
16535
16835
|
mutableDefaults: Boolean(mutableDefaults)
|
|
16536
16836
|
});
|
|
16537
16837
|
};
|
|
16538
|
-
const paginateEach = async function* (url, options) {
|
|
16838
|
+
const paginateEach = (async function* (url, options) {
|
|
16539
16839
|
let normalizedOptions = new Options(url, options, defaults2.options);
|
|
16540
16840
|
normalizedOptions.resolveBodyOnly = false;
|
|
16541
16841
|
const { pagination } = normalizedOptions;
|
|
@@ -16592,20 +16892,20 @@ var create = (defaults2) => {
|
|
|
16592
16892
|
}
|
|
16593
16893
|
numberOfRequests++;
|
|
16594
16894
|
}
|
|
16595
|
-
};
|
|
16895
|
+
});
|
|
16596
16896
|
got2.paginate = paginateEach;
|
|
16597
|
-
got2.paginate.all = async (url, options) => {
|
|
16897
|
+
got2.paginate.all = (async (url, options) => {
|
|
16598
16898
|
const results = [];
|
|
16599
16899
|
for await (const item of paginateEach(url, options)) {
|
|
16600
16900
|
results.push(item);
|
|
16601
16901
|
}
|
|
16602
16902
|
return results;
|
|
16603
|
-
};
|
|
16903
|
+
});
|
|
16604
16904
|
got2.paginate.each = paginateEach;
|
|
16605
|
-
got2.stream = (url, options) => got2(url, { ...options, isStream: true });
|
|
16905
|
+
got2.stream = ((url, options) => got2(url, { ...options, isStream: true }));
|
|
16606
16906
|
for (const method of aliases) {
|
|
16607
|
-
got2[method] = (url, options) => got2(url, { ...options, method });
|
|
16608
|
-
got2.stream[method] = (url, options) => got2(url, { ...options, method, isStream: true });
|
|
16907
|
+
got2[method] = ((url, options) => got2(url, { ...options, method }));
|
|
16908
|
+
got2.stream[method] = ((url, options) => got2(url, { ...options, method, isStream: true }));
|
|
16609
16909
|
}
|
|
16610
16910
|
if (!defaults2.mutableDefaults) {
|
|
16611
16911
|
Object.freeze(defaults2.handlers);
|
|
@@ -16730,15 +17030,15 @@ async function latestVersion(packageName, options) {
|
|
|
16730
17030
|
return version;
|
|
16731
17031
|
}
|
|
16732
17032
|
|
|
16733
|
-
// ../../node_modules/.pnpm/is-npm@6.
|
|
17033
|
+
// ../../node_modules/.pnpm/is-npm@6.1.0/node_modules/is-npm/index.js
|
|
16734
17034
|
init_cjs_shims();
|
|
16735
|
-
var
|
|
16736
|
-
var packageJson2 =
|
|
16737
|
-
var userAgent =
|
|
16738
|
-
var
|
|
16739
|
-
var
|
|
16740
|
-
var
|
|
16741
|
-
var
|
|
17035
|
+
var import_node_process4 = __toESM(require("process"), 1);
|
|
17036
|
+
var packageJson2 = import_node_process4.default.env.npm_package_json;
|
|
17037
|
+
var userAgent = import_node_process4.default.env.npm_config_user_agent;
|
|
17038
|
+
var isNpm = Boolean(userAgent?.startsWith("npm")) || Boolean(packageJson2?.endsWith("package.json"));
|
|
17039
|
+
var isYarn = Boolean(userAgent?.startsWith("yarn"));
|
|
17040
|
+
var isPnpm = Boolean(userAgent?.startsWith("pnpm"));
|
|
17041
|
+
var isBun = Boolean(userAgent?.startsWith("bun"));
|
|
16742
17042
|
var isNpmOrYarn = isNpm || isYarn;
|
|
16743
17043
|
|
|
16744
17044
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
@@ -16758,34 +17058,34 @@ var dist_default3 = isYarnGlobal;
|
|
|
16758
17058
|
|
|
16759
17059
|
// ../../node_modules/.pnpm/has-yarn@3.0.0/node_modules/has-yarn/index.js
|
|
16760
17060
|
init_cjs_shims();
|
|
16761
|
-
var
|
|
17061
|
+
var import_node_process5 = __toESM(require("process"), 1);
|
|
16762
17062
|
var import_node_path2 = __toESM(require("path"), 1);
|
|
16763
17063
|
var import_node_fs = __toESM(require("fs"), 1);
|
|
16764
|
-
function hasYarn(cwd =
|
|
17064
|
+
function hasYarn(cwd = import_node_process5.default.cwd()) {
|
|
16765
17065
|
return import_node_fs.default.existsSync(import_node_path2.default.resolve(cwd, "yarn.lock"));
|
|
16766
17066
|
}
|
|
16767
17067
|
|
|
16768
17068
|
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
16769
17069
|
init_cjs_shims();
|
|
16770
|
-
var
|
|
17070
|
+
var import_node_process6 = __toESM(require("process"), 1);
|
|
16771
17071
|
|
|
16772
17072
|
// ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
|
|
16773
17073
|
init_cjs_shims();
|
|
16774
17074
|
|
|
16775
|
-
// ../../node_modules/.pnpm/strip-ansi@7.1.
|
|
17075
|
+
// ../../node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
16776
17076
|
init_cjs_shims();
|
|
16777
17077
|
|
|
16778
|
-
// ../../node_modules/.pnpm/ansi-regex@6.
|
|
17078
|
+
// ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
16779
17079
|
init_cjs_shims();
|
|
16780
17080
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
16781
|
-
const
|
|
16782
|
-
|
|
16783
|
-
|
|
16784
|
-
|
|
17081
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
17082
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
17083
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
17084
|
+
const pattern = `${osc}|${csi}`;
|
|
16785
17085
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
16786
17086
|
}
|
|
16787
17087
|
|
|
16788
|
-
// ../../node_modules/.pnpm/strip-ansi@7.1.
|
|
17088
|
+
// ../../node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
16789
17089
|
var regex = ansiRegex();
|
|
16790
17090
|
function stripAnsi(string) {
|
|
16791
17091
|
if (typeof string !== "string") {
|
|
@@ -16938,7 +17238,7 @@ var import_ansi_align = __toESM(require_ansi_align(), 1);
|
|
|
16938
17238
|
// ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
|
|
16939
17239
|
init_cjs_shims();
|
|
16940
17240
|
|
|
16941
|
-
// ../../node_modules/.pnpm/ansi-styles@6.2.
|
|
17241
|
+
// ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
16942
17242
|
init_cjs_shims();
|
|
16943
17243
|
var ANSI_BACKGROUND_OFFSET3 = 10;
|
|
16944
17244
|
var wrapAnsi163 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -17038,7 +17338,7 @@ function assembleStyles3() {
|
|
|
17038
17338
|
styles5.bgColor.ansi16m = wrapAnsi16m3(ANSI_BACKGROUND_OFFSET3);
|
|
17039
17339
|
Object.defineProperties(styles5, {
|
|
17040
17340
|
rgbToAnsi256: {
|
|
17041
|
-
value
|
|
17341
|
+
value(red, green, blue) {
|
|
17042
17342
|
if (red === green && green === blue) {
|
|
17043
17343
|
if (red < 8) {
|
|
17044
17344
|
return 16;
|
|
@@ -17053,7 +17353,7 @@ function assembleStyles3() {
|
|
|
17053
17353
|
enumerable: false
|
|
17054
17354
|
},
|
|
17055
17355
|
hexToRgb: {
|
|
17056
|
-
value
|
|
17356
|
+
value(hex) {
|
|
17057
17357
|
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
17058
17358
|
if (!matches) {
|
|
17059
17359
|
return [0, 0, 0];
|
|
@@ -17078,7 +17378,7 @@ function assembleStyles3() {
|
|
|
17078
17378
|
enumerable: false
|
|
17079
17379
|
},
|
|
17080
17380
|
ansi256ToAnsi: {
|
|
17081
|
-
value
|
|
17381
|
+
value(code) {
|
|
17082
17382
|
if (code < 8) {
|
|
17083
17383
|
return 30 + code;
|
|
17084
17384
|
}
|
|
@@ -17282,7 +17582,7 @@ var NEWLINE = "\n";
|
|
|
17282
17582
|
var PAD = " ";
|
|
17283
17583
|
var NONE = "none";
|
|
17284
17584
|
var terminalColumns = () => {
|
|
17285
|
-
const { env: env4, stdout, stderr } =
|
|
17585
|
+
const { env: env4, stdout, stderr } = import_node_process6.default;
|
|
17286
17586
|
if (stdout?.columns) {
|
|
17287
17587
|
return stdout.columns;
|
|
17288
17588
|
}
|
|
@@ -17478,8 +17778,8 @@ var boxContent = (content, contentWidth, options) => {
|
|
|
17478
17778
|
return result;
|
|
17479
17779
|
};
|
|
17480
17780
|
var sanitizeOptions = (options) => {
|
|
17481
|
-
if (options.fullscreen &&
|
|
17482
|
-
let newDimensions = [
|
|
17781
|
+
if (options.fullscreen && import_node_process6.default?.stdout) {
|
|
17782
|
+
let newDimensions = [import_node_process6.default.stdout.columns, import_node_process6.default.stdout.rows];
|
|
17483
17783
|
if (typeof options.fullscreen === "function") {
|
|
17484
17784
|
newDimensions = options.fullscreen(...newDimensions);
|
|
17485
17785
|
}
|
|
@@ -17573,7 +17873,7 @@ function boxen(text, options) {
|
|
|
17573
17873
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
17574
17874
|
var import_is_ci = __toESM(require_is_ci(), 1);
|
|
17575
17875
|
|
|
17576
|
-
// ../../node_modules/.pnpm/pupa@3.
|
|
17876
|
+
// ../../node_modules/.pnpm/pupa@3.3.0/node_modules/pupa/index.js
|
|
17577
17877
|
init_cjs_shims();
|
|
17578
17878
|
|
|
17579
17879
|
// ../../node_modules/.pnpm/escape-goat@4.0.0/node_modules/escape-goat/index.js
|
|
@@ -17590,7 +17890,7 @@ function htmlEscape(strings, ...values) {
|
|
|
17590
17890
|
return output;
|
|
17591
17891
|
}
|
|
17592
17892
|
|
|
17593
|
-
// ../../node_modules/.pnpm/pupa@3.
|
|
17893
|
+
// ../../node_modules/.pnpm/pupa@3.3.0/node_modules/pupa/index.js
|
|
17594
17894
|
var MissingValueError = class extends Error {
|
|
17595
17895
|
constructor(key) {
|
|
17596
17896
|
super(`Missing a value for ${key ? `the placeholder: ${key}` : "a placeholder"}`, key);
|
|
@@ -17598,17 +17898,63 @@ var MissingValueError = class extends Error {
|
|
|
17598
17898
|
this.key = key;
|
|
17599
17899
|
}
|
|
17600
17900
|
};
|
|
17601
|
-
|
|
17901
|
+
var MissingFilterError = class extends Error {
|
|
17902
|
+
constructor(filterName) {
|
|
17903
|
+
super(`Missing filter: ${filterName}`);
|
|
17904
|
+
this.name = "MissingFilterError";
|
|
17905
|
+
this.filterName = filterName;
|
|
17906
|
+
}
|
|
17907
|
+
};
|
|
17908
|
+
function pupa(template, data, { ignoreMissing = false, transform = ({ value }) => value, filters = {} } = {}) {
|
|
17602
17909
|
if (typeof template !== "string") {
|
|
17603
17910
|
throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof template}\``);
|
|
17604
17911
|
}
|
|
17605
17912
|
if (typeof data !== "object") {
|
|
17606
17913
|
throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\``);
|
|
17607
17914
|
}
|
|
17608
|
-
const
|
|
17915
|
+
const escapedLeftBrace = "\uE000\uE001\uE002";
|
|
17916
|
+
const escapedRightBrace = "\uE003\uE004\uE005";
|
|
17917
|
+
template = template.replace(/\\{/g, escapedLeftBrace);
|
|
17918
|
+
template = template.replace(/\\}/g, escapedRightBrace);
|
|
17919
|
+
const parseKeyPath = (key) => {
|
|
17920
|
+
const segments = [];
|
|
17921
|
+
let segment = "";
|
|
17922
|
+
for (let index = 0; index < key.length; index++) {
|
|
17923
|
+
if (key[index] === "\\" && key[index + 1] === ".") {
|
|
17924
|
+
segment += ".";
|
|
17925
|
+
index++;
|
|
17926
|
+
} else if (key[index] === ".") {
|
|
17927
|
+
segments.push(segment);
|
|
17928
|
+
segment = "";
|
|
17929
|
+
} else {
|
|
17930
|
+
segment += key[index];
|
|
17931
|
+
}
|
|
17932
|
+
}
|
|
17933
|
+
segments.push(segment);
|
|
17934
|
+
return segments;
|
|
17935
|
+
};
|
|
17936
|
+
const replace = (placeholder, keyWithFilters) => {
|
|
17937
|
+
const parts = keyWithFilters.split("|").map((part) => part.trim());
|
|
17938
|
+
const key = parts[0];
|
|
17939
|
+
const filterChain = parts.slice(1);
|
|
17940
|
+
const segments = parseKeyPath(key);
|
|
17609
17941
|
let value = data;
|
|
17610
|
-
for (const property of
|
|
17611
|
-
|
|
17942
|
+
for (const property of segments) {
|
|
17943
|
+
if (value) {
|
|
17944
|
+
value = value[property];
|
|
17945
|
+
}
|
|
17946
|
+
}
|
|
17947
|
+
for (const filterName of filterChain) {
|
|
17948
|
+
const filter = filters[filterName];
|
|
17949
|
+
if (!filter) {
|
|
17950
|
+
if (ignoreMissing) {
|
|
17951
|
+
return placeholder;
|
|
17952
|
+
}
|
|
17953
|
+
throw new MissingFilterError(filterName);
|
|
17954
|
+
}
|
|
17955
|
+
if (value !== void 0) {
|
|
17956
|
+
value = filter(value);
|
|
17957
|
+
}
|
|
17612
17958
|
}
|
|
17613
17959
|
const transformedValue = transform({ value, key });
|
|
17614
17960
|
if (transformedValue === void 0) {
|
|
@@ -17619,13 +17965,16 @@ function pupa(template, data, { ignoreMissing = false, transform = ({ value }) =
|
|
|
17619
17965
|
}
|
|
17620
17966
|
return String(transformedValue);
|
|
17621
17967
|
};
|
|
17622
|
-
const
|
|
17623
|
-
const
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
}
|
|
17627
|
-
|
|
17628
|
-
|
|
17968
|
+
const keyPattern = "(\\d+|[a-z$_][\\w\\-.$\\\\]*)";
|
|
17969
|
+
const filterPattern = "(?:\\|\\s*[a-z$_][\\w$]*\\s*)*";
|
|
17970
|
+
const keyWithFiltersPattern = `(${keyPattern}\\s*${filterPattern})`;
|
|
17971
|
+
const doubleBraceRegex = new RegExp(`{{${keyWithFiltersPattern}}}`, "gi");
|
|
17972
|
+
const singleBraceRegex = new RegExp(`{${keyWithFiltersPattern}}`, "gi");
|
|
17973
|
+
template = template.replace(doubleBraceRegex, (...arguments_) => htmlEscape(replace(...arguments_)));
|
|
17974
|
+
template = template.replace(singleBraceRegex, replace);
|
|
17975
|
+
template = template.replace(new RegExp(escapedLeftBrace, "g"), "{");
|
|
17976
|
+
template = template.replace(new RegExp(escapedRightBrace, "g"), "}");
|
|
17977
|
+
return template;
|
|
17629
17978
|
}
|
|
17630
17979
|
|
|
17631
17980
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
@@ -17656,7 +18005,7 @@ var UpdateNotifier = class {
|
|
|
17656
18005
|
this._packageName = options.pkg.name;
|
|
17657
18006
|
this.#packageVersion = options.pkg.version;
|
|
17658
18007
|
this.#updateCheckInterval = typeof options.updateCheckInterval === "number" ? options.updateCheckInterval : ONE_DAY;
|
|
17659
|
-
this.#isDisabled = "NO_UPDATE_NOTIFIER" in
|
|
18008
|
+
this.#isDisabled = "NO_UPDATE_NOTIFIER" in import_node_process7.default.env || import_node_process7.default.env.NODE_ENV === "test" || import_node_process7.default.argv.includes("--no-update-notifier") || import_is_ci.default;
|
|
17660
18009
|
this._shouldNotifyInNpmScript = options.shouldNotifyInNpmScript;
|
|
17661
18010
|
if (!this.#isDisabled) {
|
|
17662
18011
|
try {
|
|
@@ -17668,7 +18017,7 @@ var UpdateNotifier = class {
|
|
|
17668
18017
|
});
|
|
17669
18018
|
} catch {
|
|
17670
18019
|
const message = source_default2.yellow((0, import_node_util4.format)(" %s update check failed ", options.pkg.name)) + (0, import_node_util4.format)("\n Try running with %s or get access ", source_default2.cyan("sudo")) + "\n to the local update config store via \n" + source_default2.cyan((0, import_node_util4.format)(" sudo chown -R $USER:$(id -gn $USER) %s ", xdgConfig));
|
|
17671
|
-
|
|
18020
|
+
import_node_process7.default.on("exit", () => {
|
|
17672
18021
|
console.error(boxen(message, { textAlignment: "center" }));
|
|
17673
18022
|
});
|
|
17674
18023
|
}
|
|
@@ -17686,7 +18035,7 @@ var UpdateNotifier = class {
|
|
|
17686
18035
|
if (Date.now() - this.config.get("lastUpdateCheck") < this.#updateCheckInterval) {
|
|
17687
18036
|
return;
|
|
17688
18037
|
}
|
|
17689
|
-
(0, import_node_child_process.spawn)(
|
|
18038
|
+
(0, import_node_child_process.spawn)(import_node_process7.default.execPath, [import_node_path3.default.join(__dirname2, "check.js"), JSON.stringify(this.#options)], {
|
|
17690
18039
|
detached: true,
|
|
17691
18040
|
stdio: "ignore"
|
|
17692
18041
|
}).unref();
|
|
@@ -17703,7 +18052,7 @@ var UpdateNotifier = class {
|
|
|
17703
18052
|
}
|
|
17704
18053
|
notify(options) {
|
|
17705
18054
|
const suppressForNpm = !this._shouldNotifyInNpmScript && isNpmOrYarn;
|
|
17706
|
-
if (!
|
|
18055
|
+
if (!import_node_process7.default.stdout.isTTY || suppressForNpm || !this.update || !import_semver3.default.gt(this.update.latest, this.update.current)) {
|
|
17707
18056
|
return this;
|
|
17708
18057
|
}
|
|
17709
18058
|
options = {
|
|
@@ -17742,12 +18091,12 @@ var UpdateNotifier = class {
|
|
|
17742
18091
|
if (options.defer === false) {
|
|
17743
18092
|
console.error(message);
|
|
17744
18093
|
} else {
|
|
17745
|
-
|
|
18094
|
+
import_node_process7.default.on("exit", () => {
|
|
17746
18095
|
console.error(message);
|
|
17747
18096
|
});
|
|
17748
|
-
|
|
18097
|
+
import_node_process7.default.on("SIGINT", () => {
|
|
17749
18098
|
console.error("");
|
|
17750
|
-
|
|
18099
|
+
import_node_process7.default.exit();
|
|
17751
18100
|
});
|
|
17752
18101
|
}
|
|
17753
18102
|
return this;
|
|
@@ -17764,7 +18113,7 @@ function updateNotifier(options) {
|
|
|
17764
18113
|
// package.json
|
|
17765
18114
|
var package_default = {
|
|
17766
18115
|
name: "@terai/dev",
|
|
17767
|
-
version: "0.0.
|
|
18116
|
+
version: "0.0.6",
|
|
17768
18117
|
description: "The user-facing package for Terai",
|
|
17769
18118
|
main: "dist/index.js",
|
|
17770
18119
|
module: "dist/index.mjs",
|
|
@@ -17799,6 +18148,7 @@ var package_default = {
|
|
|
17799
18148
|
"@terai/runtime": "workspace:*",
|
|
17800
18149
|
"@terai/translator": "workspace:*",
|
|
17801
18150
|
"@terai/utils": "workspace:*",
|
|
18151
|
+
"@terai/types": "workspace:*",
|
|
17802
18152
|
cac: "^6",
|
|
17803
18153
|
dotenv: "^1",
|
|
17804
18154
|
inquirer: "^9",
|
|
@@ -17809,7 +18159,6 @@ var package_default = {
|
|
|
17809
18159
|
devDependencies: {
|
|
17810
18160
|
"@terai/generator": "workspace:*",
|
|
17811
18161
|
"@terai/logger": "workspace:*",
|
|
17812
|
-
"@terai/types": "workspace:*",
|
|
17813
18162
|
"@types/update-notifier": "^6",
|
|
17814
18163
|
"update-notifier": "^6"
|
|
17815
18164
|
}
|