@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.default.js
CHANGED
|
@@ -29,12 +29,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
mod
|
|
30
30
|
));
|
|
31
31
|
|
|
32
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
32
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js
|
|
33
33
|
var getImportMetaUrl, importMetaUrl;
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.5.1_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
|
-
getImportMetaUrl = () => typeof document === "undefined" ? new URL(
|
|
37
|
+
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;
|
|
38
38
|
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
39
39
|
}
|
|
40
40
|
});
|
|
@@ -107,7 +107,7 @@ var require_polyfills = __commonJS({
|
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
if (platform === "win32") {
|
|
110
|
-
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
|
|
110
|
+
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : (function(fs$rename) {
|
|
111
111
|
function rename(from, to, cb) {
|
|
112
112
|
var start = Date.now();
|
|
113
113
|
var backoff = 0;
|
|
@@ -130,9 +130,9 @@ var require_polyfills = __commonJS({
|
|
|
130
130
|
}
|
|
131
131
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
132
132
|
return rename;
|
|
133
|
-
}(fs3.rename);
|
|
133
|
+
})(fs3.rename);
|
|
134
134
|
}
|
|
135
|
-
fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
|
|
135
|
+
fs3.read = typeof fs3.read !== "function" ? fs3.read : (function(fs$read) {
|
|
136
136
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
137
137
|
var callback;
|
|
138
138
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -149,8 +149,8 @@ var require_polyfills = __commonJS({
|
|
|
149
149
|
}
|
|
150
150
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
151
151
|
return read;
|
|
152
|
-
}(fs3.read);
|
|
153
|
-
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
152
|
+
})(fs3.read);
|
|
153
|
+
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
154
154
|
return function(fd, buffer, offset, length, position) {
|
|
155
155
|
var eagCounter = 0;
|
|
156
156
|
while (true) {
|
|
@@ -165,7 +165,7 @@ var require_polyfills = __commonJS({
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
|
-
}(fs3.readSync);
|
|
168
|
+
})(fs3.readSync);
|
|
169
169
|
function patchLchmod(fs4) {
|
|
170
170
|
fs4.lchmod = function(path6, mode, callback) {
|
|
171
171
|
fs4.open(
|
|
@@ -491,7 +491,7 @@ var require_graceful_fs = __commonJS({
|
|
|
491
491
|
if (!fs3[gracefulQueue]) {
|
|
492
492
|
queue = global[gracefulQueue] || [];
|
|
493
493
|
publishQueue(fs3, queue);
|
|
494
|
-
fs3.close = function(fs$close) {
|
|
494
|
+
fs3.close = (function(fs$close) {
|
|
495
495
|
function close(fd, cb) {
|
|
496
496
|
return fs$close.call(fs3, fd, function(err) {
|
|
497
497
|
if (!err) {
|
|
@@ -505,8 +505,8 @@ var require_graceful_fs = __commonJS({
|
|
|
505
505
|
value: fs$close
|
|
506
506
|
});
|
|
507
507
|
return close;
|
|
508
|
-
}(fs3.close);
|
|
509
|
-
fs3.closeSync = function(fs$closeSync) {
|
|
508
|
+
})(fs3.close);
|
|
509
|
+
fs3.closeSync = (function(fs$closeSync) {
|
|
510
510
|
function closeSync(fd) {
|
|
511
511
|
fs$closeSync.apply(fs3, arguments);
|
|
512
512
|
resetQueue();
|
|
@@ -515,7 +515,7 @@ var require_graceful_fs = __commonJS({
|
|
|
515
515
|
value: fs$closeSync
|
|
516
516
|
});
|
|
517
517
|
return closeSync;
|
|
518
|
-
}(fs3.closeSync);
|
|
518
|
+
})(fs3.closeSync);
|
|
519
519
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
520
520
|
process.on("exit", function() {
|
|
521
521
|
debug2(fs3[gracefulQueue]);
|
|
@@ -1192,14 +1192,14 @@ var require_write_file_atomic = __commonJS({
|
|
|
1192
1192
|
var typedArrayToBuffer = require_typedarray_to_buffer();
|
|
1193
1193
|
var { promisify: promisify5 } = require("util");
|
|
1194
1194
|
var activeFiles = {};
|
|
1195
|
-
var threadId = function getId() {
|
|
1195
|
+
var threadId = (function getId() {
|
|
1196
1196
|
try {
|
|
1197
1197
|
const workerThreads = require("worker_threads");
|
|
1198
1198
|
return workerThreads.threadId;
|
|
1199
1199
|
} catch (e) {
|
|
1200
1200
|
return 0;
|
|
1201
1201
|
}
|
|
1202
|
-
}();
|
|
1202
|
+
})();
|
|
1203
1203
|
var invocations = 0;
|
|
1204
1204
|
function getTmpname(filename) {
|
|
1205
1205
|
return filename + "." + MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result();
|
|
@@ -1513,9 +1513,9 @@ var require_dot_prop = __commonJS({
|
|
|
1513
1513
|
}
|
|
1514
1514
|
});
|
|
1515
1515
|
|
|
1516
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1516
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
|
|
1517
1517
|
var require_constants = __commonJS({
|
|
1518
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1518
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
1519
1519
|
"use strict";
|
|
1520
1520
|
init_cjs_shims();
|
|
1521
1521
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
@@ -1546,9 +1546,9 @@ var require_constants = __commonJS({
|
|
|
1546
1546
|
}
|
|
1547
1547
|
});
|
|
1548
1548
|
|
|
1549
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1549
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
|
|
1550
1550
|
var require_debug = __commonJS({
|
|
1551
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1551
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
1552
1552
|
"use strict";
|
|
1553
1553
|
init_cjs_shims();
|
|
1554
1554
|
var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
@@ -1557,9 +1557,9 @@ var require_debug = __commonJS({
|
|
|
1557
1557
|
}
|
|
1558
1558
|
});
|
|
1559
1559
|
|
|
1560
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1560
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
|
|
1561
1561
|
var require_re = __commonJS({
|
|
1562
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1562
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js"(exports2, module2) {
|
|
1563
1563
|
"use strict";
|
|
1564
1564
|
init_cjs_shims();
|
|
1565
1565
|
var {
|
|
@@ -1572,6 +1572,7 @@ var require_re = __commonJS({
|
|
|
1572
1572
|
var re = exports2.re = [];
|
|
1573
1573
|
var safeRe = exports2.safeRe = [];
|
|
1574
1574
|
var src = exports2.src = [];
|
|
1575
|
+
var safeSrc = exports2.safeSrc = [];
|
|
1575
1576
|
var t = exports2.t = {};
|
|
1576
1577
|
var R = 0;
|
|
1577
1578
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
@@ -1592,6 +1593,7 @@ var require_re = __commonJS({
|
|
|
1592
1593
|
debug2(name, index, value);
|
|
1593
1594
|
t[name] = index;
|
|
1594
1595
|
src[index] = value;
|
|
1596
|
+
safeSrc[index] = safe;
|
|
1595
1597
|
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
1596
1598
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
1597
1599
|
};
|
|
@@ -1600,8 +1602,8 @@ var require_re = __commonJS({
|
|
|
1600
1602
|
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
1601
1603
|
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
1602
1604
|
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
1603
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.
|
|
1604
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.
|
|
1605
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
1606
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
1605
1607
|
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
1606
1608
|
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
1607
1609
|
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
@@ -1644,9 +1646,9 @@ var require_re = __commonJS({
|
|
|
1644
1646
|
}
|
|
1645
1647
|
});
|
|
1646
1648
|
|
|
1647
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1649
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
|
|
1648
1650
|
var require_parse_options = __commonJS({
|
|
1649
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1651
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
1650
1652
|
"use strict";
|
|
1651
1653
|
init_cjs_shims();
|
|
1652
1654
|
var looseOption = Object.freeze({ loose: true });
|
|
@@ -1664,13 +1666,16 @@ var require_parse_options = __commonJS({
|
|
|
1664
1666
|
}
|
|
1665
1667
|
});
|
|
1666
1668
|
|
|
1667
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1669
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
|
|
1668
1670
|
var require_identifiers = __commonJS({
|
|
1669
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1671
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
1670
1672
|
"use strict";
|
|
1671
1673
|
init_cjs_shims();
|
|
1672
1674
|
var numeric = /^[0-9]+$/;
|
|
1673
1675
|
var compareIdentifiers = (a, b) => {
|
|
1676
|
+
if (typeof a === "number" && typeof b === "number") {
|
|
1677
|
+
return a === b ? 0 : a < b ? -1 : 1;
|
|
1678
|
+
}
|
|
1674
1679
|
const anum = numeric.test(a);
|
|
1675
1680
|
const bnum = numeric.test(b);
|
|
1676
1681
|
if (anum && bnum) {
|
|
@@ -1687,9 +1692,9 @@ var require_identifiers = __commonJS({
|
|
|
1687
1692
|
}
|
|
1688
1693
|
});
|
|
1689
1694
|
|
|
1690
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1695
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
|
|
1691
1696
|
var require_semver = __commonJS({
|
|
1692
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1697
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
1693
1698
|
"use strict";
|
|
1694
1699
|
init_cjs_shims();
|
|
1695
1700
|
var debug2 = require_debug();
|
|
@@ -1778,7 +1783,25 @@ var require_semver = __commonJS({
|
|
|
1778
1783
|
if (!(other instanceof _SemVer)) {
|
|
1779
1784
|
other = new _SemVer(other, this.options);
|
|
1780
1785
|
}
|
|
1781
|
-
|
|
1786
|
+
if (this.major < other.major) {
|
|
1787
|
+
return -1;
|
|
1788
|
+
}
|
|
1789
|
+
if (this.major > other.major) {
|
|
1790
|
+
return 1;
|
|
1791
|
+
}
|
|
1792
|
+
if (this.minor < other.minor) {
|
|
1793
|
+
return -1;
|
|
1794
|
+
}
|
|
1795
|
+
if (this.minor > other.minor) {
|
|
1796
|
+
return 1;
|
|
1797
|
+
}
|
|
1798
|
+
if (this.patch < other.patch) {
|
|
1799
|
+
return -1;
|
|
1800
|
+
}
|
|
1801
|
+
if (this.patch > other.patch) {
|
|
1802
|
+
return 1;
|
|
1803
|
+
}
|
|
1804
|
+
return 0;
|
|
1782
1805
|
}
|
|
1783
1806
|
comparePre(other) {
|
|
1784
1807
|
if (!(other instanceof _SemVer)) {
|
|
@@ -1834,6 +1857,17 @@ var require_semver = __commonJS({
|
|
|
1834
1857
|
// preminor will bump the version up to the next minor release, and immediately
|
|
1835
1858
|
// down to pre-release. premajor and prepatch work the same way.
|
|
1836
1859
|
inc(release, identifier, identifierBase) {
|
|
1860
|
+
if (release.startsWith("pre")) {
|
|
1861
|
+
if (!identifier && identifierBase === false) {
|
|
1862
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
1863
|
+
}
|
|
1864
|
+
if (identifier) {
|
|
1865
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
1866
|
+
if (!match || match[1] !== identifier) {
|
|
1867
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1837
1871
|
switch (release) {
|
|
1838
1872
|
case "premajor":
|
|
1839
1873
|
this.prerelease.length = 0;
|
|
@@ -1853,12 +1887,20 @@ var require_semver = __commonJS({
|
|
|
1853
1887
|
this.inc("patch", identifier, identifierBase);
|
|
1854
1888
|
this.inc("pre", identifier, identifierBase);
|
|
1855
1889
|
break;
|
|
1890
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
1891
|
+
// prepatch.
|
|
1856
1892
|
case "prerelease":
|
|
1857
1893
|
if (this.prerelease.length === 0) {
|
|
1858
1894
|
this.inc("patch", identifier, identifierBase);
|
|
1859
1895
|
}
|
|
1860
1896
|
this.inc("pre", identifier, identifierBase);
|
|
1861
1897
|
break;
|
|
1898
|
+
case "release":
|
|
1899
|
+
if (this.prerelease.length === 0) {
|
|
1900
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
1901
|
+
}
|
|
1902
|
+
this.prerelease.length = 0;
|
|
1903
|
+
break;
|
|
1862
1904
|
case "major":
|
|
1863
1905
|
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
1864
1906
|
this.major++;
|
|
@@ -1880,11 +1922,10 @@ var require_semver = __commonJS({
|
|
|
1880
1922
|
}
|
|
1881
1923
|
this.prerelease = [];
|
|
1882
1924
|
break;
|
|
1925
|
+
// This probably shouldn't be used publicly.
|
|
1926
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
1883
1927
|
case "pre": {
|
|
1884
1928
|
const base = Number(identifierBase) ? 1 : 0;
|
|
1885
|
-
if (!identifier && identifierBase === false) {
|
|
1886
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
1887
|
-
}
|
|
1888
1929
|
if (this.prerelease.length === 0) {
|
|
1889
1930
|
this.prerelease = [base];
|
|
1890
1931
|
} else {
|
|
@@ -1931,9 +1972,9 @@ var require_semver = __commonJS({
|
|
|
1931
1972
|
}
|
|
1932
1973
|
});
|
|
1933
1974
|
|
|
1934
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1975
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
|
|
1935
1976
|
var require_parse = __commonJS({
|
|
1936
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1977
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
1937
1978
|
"use strict";
|
|
1938
1979
|
init_cjs_shims();
|
|
1939
1980
|
var SemVer = require_semver();
|
|
@@ -1954,9 +1995,9 @@ var require_parse = __commonJS({
|
|
|
1954
1995
|
}
|
|
1955
1996
|
});
|
|
1956
1997
|
|
|
1957
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
1998
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js
|
|
1958
1999
|
var require_valid = __commonJS({
|
|
1959
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2000
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
1960
2001
|
"use strict";
|
|
1961
2002
|
init_cjs_shims();
|
|
1962
2003
|
var parse = require_parse();
|
|
@@ -1968,9 +2009,9 @@ var require_valid = __commonJS({
|
|
|
1968
2009
|
}
|
|
1969
2010
|
});
|
|
1970
2011
|
|
|
1971
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2012
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js
|
|
1972
2013
|
var require_clean = __commonJS({
|
|
1973
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2014
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
1974
2015
|
"use strict";
|
|
1975
2016
|
init_cjs_shims();
|
|
1976
2017
|
var parse = require_parse();
|
|
@@ -1982,9 +2023,9 @@ var require_clean = __commonJS({
|
|
|
1982
2023
|
}
|
|
1983
2024
|
});
|
|
1984
2025
|
|
|
1985
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2026
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js
|
|
1986
2027
|
var require_inc = __commonJS({
|
|
1987
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2028
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
1988
2029
|
"use strict";
|
|
1989
2030
|
init_cjs_shims();
|
|
1990
2031
|
var SemVer = require_semver();
|
|
@@ -2007,9 +2048,9 @@ var require_inc = __commonJS({
|
|
|
2007
2048
|
}
|
|
2008
2049
|
});
|
|
2009
2050
|
|
|
2010
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2051
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js
|
|
2011
2052
|
var require_diff = __commonJS({
|
|
2012
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2053
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
2013
2054
|
"use strict";
|
|
2014
2055
|
init_cjs_shims();
|
|
2015
2056
|
var parse = require_parse();
|
|
@@ -2029,13 +2070,12 @@ var require_diff = __commonJS({
|
|
|
2029
2070
|
if (!lowVersion.patch && !lowVersion.minor) {
|
|
2030
2071
|
return "major";
|
|
2031
2072
|
}
|
|
2032
|
-
if (highVersion
|
|
2073
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
2074
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
2075
|
+
return "minor";
|
|
2076
|
+
}
|
|
2033
2077
|
return "patch";
|
|
2034
2078
|
}
|
|
2035
|
-
if (highVersion.minor) {
|
|
2036
|
-
return "minor";
|
|
2037
|
-
}
|
|
2038
|
-
return "major";
|
|
2039
2079
|
}
|
|
2040
2080
|
const prefix = highHasPre ? "pre" : "";
|
|
2041
2081
|
if (v1.major !== v2.major) {
|
|
@@ -2053,9 +2093,9 @@ var require_diff = __commonJS({
|
|
|
2053
2093
|
}
|
|
2054
2094
|
});
|
|
2055
2095
|
|
|
2056
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2096
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js
|
|
2057
2097
|
var require_major = __commonJS({
|
|
2058
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2098
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js"(exports2, module2) {
|
|
2059
2099
|
"use strict";
|
|
2060
2100
|
init_cjs_shims();
|
|
2061
2101
|
var SemVer = require_semver();
|
|
@@ -2064,9 +2104,9 @@ var require_major = __commonJS({
|
|
|
2064
2104
|
}
|
|
2065
2105
|
});
|
|
2066
2106
|
|
|
2067
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2107
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js
|
|
2068
2108
|
var require_minor = __commonJS({
|
|
2069
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2109
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js"(exports2, module2) {
|
|
2070
2110
|
"use strict";
|
|
2071
2111
|
init_cjs_shims();
|
|
2072
2112
|
var SemVer = require_semver();
|
|
@@ -2075,9 +2115,9 @@ var require_minor = __commonJS({
|
|
|
2075
2115
|
}
|
|
2076
2116
|
});
|
|
2077
2117
|
|
|
2078
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2118
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js
|
|
2079
2119
|
var require_patch = __commonJS({
|
|
2080
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2120
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js"(exports2, module2) {
|
|
2081
2121
|
"use strict";
|
|
2082
2122
|
init_cjs_shims();
|
|
2083
2123
|
var SemVer = require_semver();
|
|
@@ -2086,9 +2126,9 @@ var require_patch = __commonJS({
|
|
|
2086
2126
|
}
|
|
2087
2127
|
});
|
|
2088
2128
|
|
|
2089
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2129
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js
|
|
2090
2130
|
var require_prerelease = __commonJS({
|
|
2091
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2131
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
2092
2132
|
"use strict";
|
|
2093
2133
|
init_cjs_shims();
|
|
2094
2134
|
var parse = require_parse();
|
|
@@ -2100,9 +2140,9 @@ var require_prerelease = __commonJS({
|
|
|
2100
2140
|
}
|
|
2101
2141
|
});
|
|
2102
2142
|
|
|
2103
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2143
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
|
|
2104
2144
|
var require_compare = __commonJS({
|
|
2105
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2145
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
2106
2146
|
"use strict";
|
|
2107
2147
|
init_cjs_shims();
|
|
2108
2148
|
var SemVer = require_semver();
|
|
@@ -2111,9 +2151,9 @@ var require_compare = __commonJS({
|
|
|
2111
2151
|
}
|
|
2112
2152
|
});
|
|
2113
2153
|
|
|
2114
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2154
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js
|
|
2115
2155
|
var require_rcompare = __commonJS({
|
|
2116
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2156
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
2117
2157
|
"use strict";
|
|
2118
2158
|
init_cjs_shims();
|
|
2119
2159
|
var compare = require_compare();
|
|
@@ -2122,9 +2162,9 @@ var require_rcompare = __commonJS({
|
|
|
2122
2162
|
}
|
|
2123
2163
|
});
|
|
2124
2164
|
|
|
2125
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2165
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js
|
|
2126
2166
|
var require_compare_loose = __commonJS({
|
|
2127
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2167
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
2128
2168
|
"use strict";
|
|
2129
2169
|
init_cjs_shims();
|
|
2130
2170
|
var compare = require_compare();
|
|
@@ -2133,9 +2173,9 @@ var require_compare_loose = __commonJS({
|
|
|
2133
2173
|
}
|
|
2134
2174
|
});
|
|
2135
2175
|
|
|
2136
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2176
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js
|
|
2137
2177
|
var require_compare_build = __commonJS({
|
|
2138
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2178
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js"(exports2, module2) {
|
|
2139
2179
|
"use strict";
|
|
2140
2180
|
init_cjs_shims();
|
|
2141
2181
|
var SemVer = require_semver();
|
|
@@ -2148,9 +2188,9 @@ var require_compare_build = __commonJS({
|
|
|
2148
2188
|
}
|
|
2149
2189
|
});
|
|
2150
2190
|
|
|
2151
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2191
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js
|
|
2152
2192
|
var require_sort = __commonJS({
|
|
2153
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2193
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js"(exports2, module2) {
|
|
2154
2194
|
"use strict";
|
|
2155
2195
|
init_cjs_shims();
|
|
2156
2196
|
var compareBuild = require_compare_build();
|
|
@@ -2159,9 +2199,9 @@ var require_sort = __commonJS({
|
|
|
2159
2199
|
}
|
|
2160
2200
|
});
|
|
2161
2201
|
|
|
2162
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2202
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js
|
|
2163
2203
|
var require_rsort = __commonJS({
|
|
2164
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2204
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js"(exports2, module2) {
|
|
2165
2205
|
"use strict";
|
|
2166
2206
|
init_cjs_shims();
|
|
2167
2207
|
var compareBuild = require_compare_build();
|
|
@@ -2170,9 +2210,9 @@ var require_rsort = __commonJS({
|
|
|
2170
2210
|
}
|
|
2171
2211
|
});
|
|
2172
2212
|
|
|
2173
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2213
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
|
|
2174
2214
|
var require_gt = __commonJS({
|
|
2175
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2215
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
2176
2216
|
"use strict";
|
|
2177
2217
|
init_cjs_shims();
|
|
2178
2218
|
var compare = require_compare();
|
|
@@ -2181,9 +2221,9 @@ var require_gt = __commonJS({
|
|
|
2181
2221
|
}
|
|
2182
2222
|
});
|
|
2183
2223
|
|
|
2184
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2224
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
|
|
2185
2225
|
var require_lt = __commonJS({
|
|
2186
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2226
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
2187
2227
|
"use strict";
|
|
2188
2228
|
init_cjs_shims();
|
|
2189
2229
|
var compare = require_compare();
|
|
@@ -2192,9 +2232,9 @@ var require_lt = __commonJS({
|
|
|
2192
2232
|
}
|
|
2193
2233
|
});
|
|
2194
2234
|
|
|
2195
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2235
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
|
|
2196
2236
|
var require_eq = __commonJS({
|
|
2197
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2237
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
2198
2238
|
"use strict";
|
|
2199
2239
|
init_cjs_shims();
|
|
2200
2240
|
var compare = require_compare();
|
|
@@ -2203,9 +2243,9 @@ var require_eq = __commonJS({
|
|
|
2203
2243
|
}
|
|
2204
2244
|
});
|
|
2205
2245
|
|
|
2206
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2246
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
|
|
2207
2247
|
var require_neq = __commonJS({
|
|
2208
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2248
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
2209
2249
|
"use strict";
|
|
2210
2250
|
init_cjs_shims();
|
|
2211
2251
|
var compare = require_compare();
|
|
@@ -2214,9 +2254,9 @@ var require_neq = __commonJS({
|
|
|
2214
2254
|
}
|
|
2215
2255
|
});
|
|
2216
2256
|
|
|
2217
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2257
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
|
|
2218
2258
|
var require_gte = __commonJS({
|
|
2219
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2259
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
2220
2260
|
"use strict";
|
|
2221
2261
|
init_cjs_shims();
|
|
2222
2262
|
var compare = require_compare();
|
|
@@ -2225,9 +2265,9 @@ var require_gte = __commonJS({
|
|
|
2225
2265
|
}
|
|
2226
2266
|
});
|
|
2227
2267
|
|
|
2228
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2268
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
|
|
2229
2269
|
var require_lte = __commonJS({
|
|
2230
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2270
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
2231
2271
|
"use strict";
|
|
2232
2272
|
init_cjs_shims();
|
|
2233
2273
|
var compare = require_compare();
|
|
@@ -2236,9 +2276,9 @@ var require_lte = __commonJS({
|
|
|
2236
2276
|
}
|
|
2237
2277
|
});
|
|
2238
2278
|
|
|
2239
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2279
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
|
|
2240
2280
|
var require_cmp = __commonJS({
|
|
2241
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2281
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
2242
2282
|
"use strict";
|
|
2243
2283
|
init_cjs_shims();
|
|
2244
2284
|
var eq = require_eq();
|
|
@@ -2287,9 +2327,9 @@ var require_cmp = __commonJS({
|
|
|
2287
2327
|
}
|
|
2288
2328
|
});
|
|
2289
2329
|
|
|
2290
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2330
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
|
|
2291
2331
|
var require_coerce = __commonJS({
|
|
2292
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2332
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
2293
2333
|
"use strict";
|
|
2294
2334
|
init_cjs_shims();
|
|
2295
2335
|
var SemVer = require_semver();
|
|
@@ -2334,9 +2374,9 @@ var require_coerce = __commonJS({
|
|
|
2334
2374
|
}
|
|
2335
2375
|
});
|
|
2336
2376
|
|
|
2337
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2377
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
|
|
2338
2378
|
var require_lrucache = __commonJS({
|
|
2339
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2379
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js"(exports2, module2) {
|
|
2340
2380
|
"use strict";
|
|
2341
2381
|
init_cjs_shims();
|
|
2342
2382
|
var LRUCache = class {
|
|
@@ -2373,11 +2413,12 @@ var require_lrucache = __commonJS({
|
|
|
2373
2413
|
}
|
|
2374
2414
|
});
|
|
2375
2415
|
|
|
2376
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2416
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
|
|
2377
2417
|
var require_range = __commonJS({
|
|
2378
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2418
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js"(exports2, module2) {
|
|
2379
2419
|
"use strict";
|
|
2380
2420
|
init_cjs_shims();
|
|
2421
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
2381
2422
|
var Range = class _Range {
|
|
2382
2423
|
constructor(range, options) {
|
|
2383
2424
|
options = parseOptions(options);
|
|
@@ -2391,13 +2432,13 @@ var require_range = __commonJS({
|
|
|
2391
2432
|
if (range instanceof Comparator) {
|
|
2392
2433
|
this.raw = range.value;
|
|
2393
2434
|
this.set = [[range]];
|
|
2394
|
-
this.
|
|
2435
|
+
this.formatted = void 0;
|
|
2395
2436
|
return this;
|
|
2396
2437
|
}
|
|
2397
2438
|
this.options = options;
|
|
2398
2439
|
this.loose = !!options.loose;
|
|
2399
2440
|
this.includePrerelease = !!options.includePrerelease;
|
|
2400
|
-
this.raw = range.trim().
|
|
2441
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
2401
2442
|
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
2402
2443
|
if (!this.set.length) {
|
|
2403
2444
|
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
@@ -2416,10 +2457,27 @@ var require_range = __commonJS({
|
|
|
2416
2457
|
}
|
|
2417
2458
|
}
|
|
2418
2459
|
}
|
|
2419
|
-
this.
|
|
2460
|
+
this.formatted = void 0;
|
|
2461
|
+
}
|
|
2462
|
+
get range() {
|
|
2463
|
+
if (this.formatted === void 0) {
|
|
2464
|
+
this.formatted = "";
|
|
2465
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
2466
|
+
if (i > 0) {
|
|
2467
|
+
this.formatted += "||";
|
|
2468
|
+
}
|
|
2469
|
+
const comps = this.set[i];
|
|
2470
|
+
for (let k = 0; k < comps.length; k++) {
|
|
2471
|
+
if (k > 0) {
|
|
2472
|
+
this.formatted += " ";
|
|
2473
|
+
}
|
|
2474
|
+
this.formatted += comps[k].toString().trim();
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
return this.formatted;
|
|
2420
2479
|
}
|
|
2421
2480
|
format() {
|
|
2422
|
-
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
|
|
2423
2481
|
return this.range;
|
|
2424
2482
|
}
|
|
2425
2483
|
toString() {
|
|
@@ -2529,6 +2587,7 @@ var require_range = __commonJS({
|
|
|
2529
2587
|
return result;
|
|
2530
2588
|
};
|
|
2531
2589
|
var parseComparator = (comp, options) => {
|
|
2590
|
+
comp = comp.replace(re[t.BUILD], "");
|
|
2532
2591
|
debug2("comp", comp, options);
|
|
2533
2592
|
comp = replaceCarets(comp, options);
|
|
2534
2593
|
debug2("caret", comp);
|
|
@@ -2732,9 +2791,9 @@ var require_range = __commonJS({
|
|
|
2732
2791
|
}
|
|
2733
2792
|
});
|
|
2734
2793
|
|
|
2735
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2794
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
|
|
2736
2795
|
var require_comparator = __commonJS({
|
|
2737
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2796
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
2738
2797
|
"use strict";
|
|
2739
2798
|
init_cjs_shims();
|
|
2740
2799
|
var ANY = Symbol("SemVer ANY");
|
|
@@ -2846,9 +2905,9 @@ var require_comparator = __commonJS({
|
|
|
2846
2905
|
}
|
|
2847
2906
|
});
|
|
2848
2907
|
|
|
2849
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2908
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
|
|
2850
2909
|
var require_satisfies = __commonJS({
|
|
2851
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2910
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
2852
2911
|
"use strict";
|
|
2853
2912
|
init_cjs_shims();
|
|
2854
2913
|
var Range = require_range();
|
|
@@ -2864,9 +2923,9 @@ var require_satisfies = __commonJS({
|
|
|
2864
2923
|
}
|
|
2865
2924
|
});
|
|
2866
2925
|
|
|
2867
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2926
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js
|
|
2868
2927
|
var require_to_comparators = __commonJS({
|
|
2869
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2928
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
|
|
2870
2929
|
"use strict";
|
|
2871
2930
|
init_cjs_shims();
|
|
2872
2931
|
var Range = require_range();
|
|
@@ -2875,9 +2934,9 @@ var require_to_comparators = __commonJS({
|
|
|
2875
2934
|
}
|
|
2876
2935
|
});
|
|
2877
2936
|
|
|
2878
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2937
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js
|
|
2879
2938
|
var require_max_satisfying = __commonJS({
|
|
2880
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2939
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
|
|
2881
2940
|
"use strict";
|
|
2882
2941
|
init_cjs_shims();
|
|
2883
2942
|
var SemVer = require_semver();
|
|
@@ -2905,9 +2964,9 @@ var require_max_satisfying = __commonJS({
|
|
|
2905
2964
|
}
|
|
2906
2965
|
});
|
|
2907
2966
|
|
|
2908
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2967
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js
|
|
2909
2968
|
var require_min_satisfying = __commonJS({
|
|
2910
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2969
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
|
|
2911
2970
|
"use strict";
|
|
2912
2971
|
init_cjs_shims();
|
|
2913
2972
|
var SemVer = require_semver();
|
|
@@ -2935,9 +2994,9 @@ var require_min_satisfying = __commonJS({
|
|
|
2935
2994
|
}
|
|
2936
2995
|
});
|
|
2937
2996
|
|
|
2938
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
2997
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js
|
|
2939
2998
|
var require_min_version = __commonJS({
|
|
2940
|
-
"../../node_modules/.pnpm/semver@7.
|
|
2999
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js"(exports2, module2) {
|
|
2941
3000
|
"use strict";
|
|
2942
3001
|
init_cjs_shims();
|
|
2943
3002
|
var SemVer = require_semver();
|
|
@@ -2967,6 +3026,7 @@ var require_min_version = __commonJS({
|
|
|
2967
3026
|
compver.prerelease.push(0);
|
|
2968
3027
|
}
|
|
2969
3028
|
compver.raw = compver.format();
|
|
3029
|
+
/* fallthrough */
|
|
2970
3030
|
case "":
|
|
2971
3031
|
case ">=":
|
|
2972
3032
|
if (!setMin || gt(compver, setMin)) {
|
|
@@ -2976,6 +3036,7 @@ var require_min_version = __commonJS({
|
|
|
2976
3036
|
case "<":
|
|
2977
3037
|
case "<=":
|
|
2978
3038
|
break;
|
|
3039
|
+
/* istanbul ignore next */
|
|
2979
3040
|
default:
|
|
2980
3041
|
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
2981
3042
|
}
|
|
@@ -2993,9 +3054,9 @@ var require_min_version = __commonJS({
|
|
|
2993
3054
|
}
|
|
2994
3055
|
});
|
|
2995
3056
|
|
|
2996
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3057
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js
|
|
2997
3058
|
var require_valid2 = __commonJS({
|
|
2998
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3059
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js"(exports2, module2) {
|
|
2999
3060
|
"use strict";
|
|
3000
3061
|
init_cjs_shims();
|
|
3001
3062
|
var Range = require_range();
|
|
@@ -3010,9 +3071,9 @@ var require_valid2 = __commonJS({
|
|
|
3010
3071
|
}
|
|
3011
3072
|
});
|
|
3012
3073
|
|
|
3013
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3074
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js
|
|
3014
3075
|
var require_outside = __commonJS({
|
|
3015
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3076
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js"(exports2, module2) {
|
|
3016
3077
|
"use strict";
|
|
3017
3078
|
init_cjs_shims();
|
|
3018
3079
|
var SemVer = require_semver();
|
|
@@ -3080,9 +3141,9 @@ var require_outside = __commonJS({
|
|
|
3080
3141
|
}
|
|
3081
3142
|
});
|
|
3082
3143
|
|
|
3083
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3144
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js
|
|
3084
3145
|
var require_gtr = __commonJS({
|
|
3085
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3146
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
3086
3147
|
"use strict";
|
|
3087
3148
|
init_cjs_shims();
|
|
3088
3149
|
var outside = require_outside();
|
|
@@ -3091,9 +3152,9 @@ var require_gtr = __commonJS({
|
|
|
3091
3152
|
}
|
|
3092
3153
|
});
|
|
3093
3154
|
|
|
3094
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3155
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js
|
|
3095
3156
|
var require_ltr = __commonJS({
|
|
3096
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3157
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
3097
3158
|
"use strict";
|
|
3098
3159
|
init_cjs_shims();
|
|
3099
3160
|
var outside = require_outside();
|
|
@@ -3102,9 +3163,9 @@ var require_ltr = __commonJS({
|
|
|
3102
3163
|
}
|
|
3103
3164
|
});
|
|
3104
3165
|
|
|
3105
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3166
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js
|
|
3106
3167
|
var require_intersects = __commonJS({
|
|
3107
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3168
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js"(exports2, module2) {
|
|
3108
3169
|
"use strict";
|
|
3109
3170
|
init_cjs_shims();
|
|
3110
3171
|
var Range = require_range();
|
|
@@ -3117,9 +3178,9 @@ var require_intersects = __commonJS({
|
|
|
3117
3178
|
}
|
|
3118
3179
|
});
|
|
3119
3180
|
|
|
3120
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3181
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js
|
|
3121
3182
|
var require_simplify = __commonJS({
|
|
3122
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3183
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js"(exports2, module2) {
|
|
3123
3184
|
"use strict";
|
|
3124
3185
|
init_cjs_shims();
|
|
3125
3186
|
var satisfies = require_satisfies();
|
|
@@ -3168,9 +3229,9 @@ var require_simplify = __commonJS({
|
|
|
3168
3229
|
}
|
|
3169
3230
|
});
|
|
3170
3231
|
|
|
3171
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3232
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js
|
|
3172
3233
|
var require_subset = __commonJS({
|
|
3173
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3234
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js"(exports2, module2) {
|
|
3174
3235
|
"use strict";
|
|
3175
3236
|
init_cjs_shims();
|
|
3176
3237
|
var Range = require_range();
|
|
@@ -3331,9 +3392,9 @@ var require_subset = __commonJS({
|
|
|
3331
3392
|
}
|
|
3332
3393
|
});
|
|
3333
3394
|
|
|
3334
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
3395
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js
|
|
3335
3396
|
var require_semver2 = __commonJS({
|
|
3336
|
-
"../../node_modules/.pnpm/semver@7.
|
|
3397
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js"(exports2, module2) {
|
|
3337
3398
|
"use strict";
|
|
3338
3399
|
init_cjs_shims();
|
|
3339
3400
|
var internalRe = require_re();
|
|
@@ -3578,9 +3639,9 @@ var require_get_stream = __commonJS({
|
|
|
3578
3639
|
}
|
|
3579
3640
|
});
|
|
3580
3641
|
|
|
3581
|
-
// ../../node_modules/.pnpm/http-cache-semantics@4.
|
|
3642
|
+
// ../../node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js
|
|
3582
3643
|
var require_http_cache_semantics = __commonJS({
|
|
3583
|
-
"../../node_modules/.pnpm/http-cache-semantics@4.
|
|
3644
|
+
"../../node_modules/.pnpm/http-cache-semantics@4.2.0/node_modules/http-cache-semantics/index.js"(exports2, module2) {
|
|
3584
3645
|
"use strict";
|
|
3585
3646
|
init_cjs_shims();
|
|
3586
3647
|
var statusCodeCacheableByDefault = /* @__PURE__ */ new Set([
|
|
@@ -3670,6 +3731,17 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3670
3731
|
return parts.join(", ");
|
|
3671
3732
|
}
|
|
3672
3733
|
module2.exports = class CachePolicy {
|
|
3734
|
+
/**
|
|
3735
|
+
* Creates a new CachePolicy instance.
|
|
3736
|
+
* @param {HttpRequest} req - Incoming client request.
|
|
3737
|
+
* @param {HttpResponse} res - Received server response.
|
|
3738
|
+
* @param {Object} [options={}] - Configuration options.
|
|
3739
|
+
* @param {boolean} [options.shared=true] - Is the cache shared (a public proxy)? `false` for personal browser caches.
|
|
3740
|
+
* @param {number} [options.cacheHeuristic=0.1] - Fallback heuristic (age fraction) for cache duration.
|
|
3741
|
+
* @param {number} [options.immutableMinTimeToLive=86400000] - Minimum TTL for immutable responses in milliseconds.
|
|
3742
|
+
* @param {boolean} [options.ignoreCargoCult=false] - Detect nonsense cache headers, and override them.
|
|
3743
|
+
* @param {any} [options._fromObject] - Internal parameter for deserialization. Do not use.
|
|
3744
|
+
*/
|
|
3673
3745
|
constructor(req, res, {
|
|
3674
3746
|
shared,
|
|
3675
3747
|
cacheHeuristic,
|
|
@@ -3687,6 +3759,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3687
3759
|
this._assertRequestHasHeaders(req);
|
|
3688
3760
|
this._responseTime = this.now();
|
|
3689
3761
|
this._isShared = shared !== false;
|
|
3762
|
+
this._ignoreCargoCult = !!ignoreCargoCult;
|
|
3690
3763
|
this._cacheHeuristic = void 0 !== cacheHeuristic ? cacheHeuristic : 0.1;
|
|
3691
3764
|
this._immutableMinTtl = void 0 !== immutableMinTimeToLive ? immutableMinTimeToLive : 24 * 3600 * 1e3;
|
|
3692
3765
|
this._status = "status" in res ? res.status : 200;
|
|
@@ -3698,7 +3771,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3698
3771
|
this._noAuthorization = !req.headers.authorization;
|
|
3699
3772
|
this._reqHeaders = res.headers.vary ? req.headers : null;
|
|
3700
3773
|
this._reqcc = parseCacheControl(req.headers["cache-control"]);
|
|
3701
|
-
if (
|
|
3774
|
+
if (this._ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) {
|
|
3702
3775
|
delete this._rescc["pre-check"];
|
|
3703
3776
|
delete this._rescc["post-check"];
|
|
3704
3777
|
delete this._rescc["no-cache"];
|
|
@@ -3714,9 +3787,17 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3714
3787
|
this._rescc["no-cache"] = true;
|
|
3715
3788
|
}
|
|
3716
3789
|
}
|
|
3790
|
+
/**
|
|
3791
|
+
* You can monkey-patch it for testing.
|
|
3792
|
+
* @returns {number} Current time in milliseconds.
|
|
3793
|
+
*/
|
|
3717
3794
|
now() {
|
|
3718
3795
|
return Date.now();
|
|
3719
3796
|
}
|
|
3797
|
+
/**
|
|
3798
|
+
* Determines if the response is storable in a cache.
|
|
3799
|
+
* @returns {boolean} `false` if can never be cached.
|
|
3800
|
+
*/
|
|
3720
3801
|
storable() {
|
|
3721
3802
|
return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
|
|
3722
3803
|
// The request method is understood by the cache and defined as being cacheable, and
|
|
@@ -3732,42 +3813,142 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3732
3813
|
this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
|
|
3733
3814
|
statusCodeCacheableByDefault.has(this._status)));
|
|
3734
3815
|
}
|
|
3816
|
+
/**
|
|
3817
|
+
* @returns {boolean} true if expiration is explicitly defined.
|
|
3818
|
+
*/
|
|
3735
3819
|
_hasExplicitExpiration() {
|
|
3736
|
-
return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
|
|
3820
|
+
return !!(this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires);
|
|
3737
3821
|
}
|
|
3822
|
+
/**
|
|
3823
|
+
* @param {HttpRequest} req - a request
|
|
3824
|
+
* @throws {Error} if the headers are missing.
|
|
3825
|
+
*/
|
|
3738
3826
|
_assertRequestHasHeaders(req) {
|
|
3739
3827
|
if (!req || !req.headers) {
|
|
3740
3828
|
throw Error("Request headers missing");
|
|
3741
3829
|
}
|
|
3742
3830
|
}
|
|
3831
|
+
/**
|
|
3832
|
+
* Checks if the request matches the cache and can be satisfied from the cache immediately,
|
|
3833
|
+
* without having to make a request to the server.
|
|
3834
|
+
*
|
|
3835
|
+
* This doesn't support `stale-while-revalidate`. See `evaluateRequest()` for a more complete solution.
|
|
3836
|
+
*
|
|
3837
|
+
* @param {HttpRequest} req - The new incoming HTTP request.
|
|
3838
|
+
* @returns {boolean} `true`` if the cached response used to construct this cache policy satisfies the request without revalidation.
|
|
3839
|
+
*/
|
|
3743
3840
|
satisfiesWithoutRevalidation(req) {
|
|
3841
|
+
const result = this.evaluateRequest(req);
|
|
3842
|
+
return !result.revalidation;
|
|
3843
|
+
}
|
|
3844
|
+
/**
|
|
3845
|
+
* @param {{headers: Record<string, string>, synchronous: boolean}|undefined} revalidation - Revalidation information, if any.
|
|
3846
|
+
* @returns {{response: {headers: Record<string, string>}, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object with a cached response headers and revalidation info.
|
|
3847
|
+
*/
|
|
3848
|
+
_evaluateRequestHitResult(revalidation) {
|
|
3849
|
+
return {
|
|
3850
|
+
response: {
|
|
3851
|
+
headers: this.responseHeaders()
|
|
3852
|
+
},
|
|
3853
|
+
revalidation
|
|
3854
|
+
};
|
|
3855
|
+
}
|
|
3856
|
+
/**
|
|
3857
|
+
* @param {HttpRequest} request - new incoming
|
|
3858
|
+
* @param {boolean} synchronous - whether revalidation must be synchronous (not s-w-r).
|
|
3859
|
+
* @returns {{headers: Record<string, string>, synchronous: boolean}} An object with revalidation headers and a synchronous flag.
|
|
3860
|
+
*/
|
|
3861
|
+
_evaluateRequestRevalidation(request, synchronous) {
|
|
3862
|
+
return {
|
|
3863
|
+
synchronous,
|
|
3864
|
+
headers: this.revalidationHeaders(request)
|
|
3865
|
+
};
|
|
3866
|
+
}
|
|
3867
|
+
/**
|
|
3868
|
+
* @param {HttpRequest} request - new incoming
|
|
3869
|
+
* @returns {{response: undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}}} An object indicating no cached response and revalidation details.
|
|
3870
|
+
*/
|
|
3871
|
+
_evaluateRequestMissResult(request) {
|
|
3872
|
+
return {
|
|
3873
|
+
response: void 0,
|
|
3874
|
+
revalidation: this._evaluateRequestRevalidation(request, true)
|
|
3875
|
+
};
|
|
3876
|
+
}
|
|
3877
|
+
/**
|
|
3878
|
+
* Checks if the given request matches this cache entry, and how the cache can be used to satisfy it. Returns an object with:
|
|
3879
|
+
*
|
|
3880
|
+
* ```
|
|
3881
|
+
* {
|
|
3882
|
+
* // If defined, you must send a request to the server.
|
|
3883
|
+
* revalidation: {
|
|
3884
|
+
* headers: {}, // HTTP headers to use when sending the revalidation response
|
|
3885
|
+
* // If true, you MUST wait for a response from the server before using the cache
|
|
3886
|
+
* // If false, this is stale-while-revalidate. The cache is stale, but you can use it while you update it asynchronously.
|
|
3887
|
+
* synchronous: bool,
|
|
3888
|
+
* },
|
|
3889
|
+
* // If defined, you can use this cached response.
|
|
3890
|
+
* response: {
|
|
3891
|
+
* headers: {}, // Updated cached HTTP headers you must use when responding to the client
|
|
3892
|
+
* },
|
|
3893
|
+
* }
|
|
3894
|
+
* ```
|
|
3895
|
+
* @param {HttpRequest} req - new incoming HTTP request
|
|
3896
|
+
* @returns {{response: {headers: Record<string, string>}|undefined, revalidation: {headers: Record<string, string>, synchronous: boolean}|undefined}} An object containing keys:
|
|
3897
|
+
* - revalidation: { headers: Record<string, string>, synchronous: boolean } Set if you should send this to the origin server
|
|
3898
|
+
* - response: { headers: Record<string, string> } Set if you can respond to the client with these cached headers
|
|
3899
|
+
*/
|
|
3900
|
+
evaluateRequest(req) {
|
|
3744
3901
|
this._assertRequestHasHeaders(req);
|
|
3902
|
+
if (this._rescc["must-revalidate"]) {
|
|
3903
|
+
return this._evaluateRequestMissResult(req);
|
|
3904
|
+
}
|
|
3905
|
+
if (!this._requestMatches(req, false)) {
|
|
3906
|
+
return this._evaluateRequestMissResult(req);
|
|
3907
|
+
}
|
|
3745
3908
|
const requestCC = parseCacheControl(req.headers["cache-control"]);
|
|
3746
3909
|
if (requestCC["no-cache"] || /no-cache/.test(req.headers.pragma)) {
|
|
3747
|
-
return
|
|
3910
|
+
return this._evaluateRequestMissResult(req);
|
|
3748
3911
|
}
|
|
3749
|
-
if (requestCC["max-age"] && this.age() > requestCC["max-age"]) {
|
|
3750
|
-
return
|
|
3912
|
+
if (requestCC["max-age"] && this.age() > toNumberOrZero(requestCC["max-age"])) {
|
|
3913
|
+
return this._evaluateRequestMissResult(req);
|
|
3751
3914
|
}
|
|
3752
|
-
if (requestCC["min-fresh"] && this.
|
|
3753
|
-
return
|
|
3915
|
+
if (requestCC["min-fresh"] && this.maxAge() - this.age() < toNumberOrZero(requestCC["min-fresh"])) {
|
|
3916
|
+
return this._evaluateRequestMissResult(req);
|
|
3754
3917
|
}
|
|
3755
3918
|
if (this.stale()) {
|
|
3756
|
-
const
|
|
3757
|
-
if (
|
|
3758
|
-
return
|
|
3919
|
+
const allowsStaleWithoutRevalidation = "max-stale" in requestCC && (true === requestCC["max-stale"] || requestCC["max-stale"] > this.age() - this.maxAge());
|
|
3920
|
+
if (allowsStaleWithoutRevalidation) {
|
|
3921
|
+
return this._evaluateRequestHitResult(void 0);
|
|
3922
|
+
}
|
|
3923
|
+
if (this.useStaleWhileRevalidate()) {
|
|
3924
|
+
return this._evaluateRequestHitResult(this._evaluateRequestRevalidation(req, false));
|
|
3759
3925
|
}
|
|
3926
|
+
return this._evaluateRequestMissResult(req);
|
|
3760
3927
|
}
|
|
3761
|
-
return this.
|
|
3928
|
+
return this._evaluateRequestHitResult(void 0);
|
|
3762
3929
|
}
|
|
3930
|
+
/**
|
|
3931
|
+
* @param {HttpRequest} req - check if this is for the same cache entry
|
|
3932
|
+
* @param {boolean} allowHeadMethod - allow a HEAD method to match.
|
|
3933
|
+
* @returns {boolean} `true` if the request matches.
|
|
3934
|
+
*/
|
|
3763
3935
|
_requestMatches(req, allowHeadMethod) {
|
|
3764
|
-
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
|
|
3936
|
+
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
|
|
3765
3937
|
(!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && // selecting header fields nominated by the stored response (if any) match those presented, and
|
|
3766
|
-
this._varyMatches(req);
|
|
3938
|
+
this._varyMatches(req));
|
|
3767
3939
|
}
|
|
3940
|
+
/**
|
|
3941
|
+
* Determines whether storing authenticated responses is allowed.
|
|
3942
|
+
* @returns {boolean} `true` if allowed.
|
|
3943
|
+
*/
|
|
3768
3944
|
_allowsStoringAuthenticated() {
|
|
3769
|
-
return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
|
|
3945
|
+
return !!(this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"]);
|
|
3770
3946
|
}
|
|
3947
|
+
/**
|
|
3948
|
+
* Checks whether the Vary header in the response matches the new request.
|
|
3949
|
+
* @param {HttpRequest} req - incoming HTTP request
|
|
3950
|
+
* @returns {boolean} `true` if the vary headers match.
|
|
3951
|
+
*/
|
|
3771
3952
|
_varyMatches(req) {
|
|
3772
3953
|
if (!this._resHeaders.vary) {
|
|
3773
3954
|
return true;
|
|
@@ -3781,6 +3962,11 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3781
3962
|
}
|
|
3782
3963
|
return true;
|
|
3783
3964
|
}
|
|
3965
|
+
/**
|
|
3966
|
+
* Creates a copy of the given headers without any hop-by-hop headers.
|
|
3967
|
+
* @param {Record<string, string>} inHeaders - old headers from the cached response
|
|
3968
|
+
* @returns {Record<string, string>} A new headers object without hop-by-hop headers.
|
|
3969
|
+
*/
|
|
3784
3970
|
_copyWithoutHopByHopHeaders(inHeaders) {
|
|
3785
3971
|
const headers = {};
|
|
3786
3972
|
for (const name in inHeaders) {
|
|
@@ -3805,6 +3991,11 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3805
3991
|
}
|
|
3806
3992
|
return headers;
|
|
3807
3993
|
}
|
|
3994
|
+
/**
|
|
3995
|
+
* Returns the response headers adjusted for serving the cached response.
|
|
3996
|
+
* Removes hop-by-hop headers and updates the Age and Date headers.
|
|
3997
|
+
* @returns {Record<string, string>} The adjusted response headers.
|
|
3998
|
+
*/
|
|
3808
3999
|
responseHeaders() {
|
|
3809
4000
|
const headers = this._copyWithoutHopByHopHeaders(this._resHeaders);
|
|
3810
4001
|
const age = this.age();
|
|
@@ -3816,8 +4007,8 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3816
4007
|
return headers;
|
|
3817
4008
|
}
|
|
3818
4009
|
/**
|
|
3819
|
-
*
|
|
3820
|
-
* @
|
|
4010
|
+
* Returns the Date header value from the response or the current time if invalid.
|
|
4011
|
+
* @returns {number} Timestamp (in milliseconds) representing the Date header or response time.
|
|
3821
4012
|
*/
|
|
3822
4013
|
date() {
|
|
3823
4014
|
const serverDate = Date.parse(this._resHeaders.date);
|
|
@@ -3829,23 +4020,27 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3829
4020
|
/**
|
|
3830
4021
|
* Value of the Age header, in seconds, updated for the current time.
|
|
3831
4022
|
* May be fractional.
|
|
3832
|
-
*
|
|
3833
|
-
* @return Number
|
|
4023
|
+
* @returns {number} The age in seconds.
|
|
3834
4024
|
*/
|
|
3835
4025
|
age() {
|
|
3836
4026
|
let age = this._ageValue();
|
|
3837
4027
|
const residentTime = (this.now() - this._responseTime) / 1e3;
|
|
3838
4028
|
return age + residentTime;
|
|
3839
4029
|
}
|
|
4030
|
+
/**
|
|
4031
|
+
* @returns {number} The Age header value as a number.
|
|
4032
|
+
*/
|
|
3840
4033
|
_ageValue() {
|
|
3841
4034
|
return toNumberOrZero(this._resHeaders.age);
|
|
3842
4035
|
}
|
|
3843
4036
|
/**
|
|
3844
|
-
*
|
|
4037
|
+
* Possibly outdated value of applicable max-age (or heuristic equivalent) in seconds.
|
|
4038
|
+
* This counts since response's `Date`.
|
|
3845
4039
|
*
|
|
3846
4040
|
* For an up-to-date value, see `timeToLive()`.
|
|
3847
4041
|
*
|
|
3848
|
-
*
|
|
4042
|
+
* Returns the maximum age (freshness lifetime) of the response in seconds.
|
|
4043
|
+
* @returns {number} The max-age value in seconds.
|
|
3849
4044
|
*/
|
|
3850
4045
|
maxAge() {
|
|
3851
4046
|
if (!this.storable() || this._rescc["no-cache"]) {
|
|
@@ -3888,24 +4083,52 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3888
4083
|
}
|
|
3889
4084
|
return defaultMinTtl;
|
|
3890
4085
|
}
|
|
4086
|
+
/**
|
|
4087
|
+
* Remaining time this cache entry may be useful for, in *milliseconds*.
|
|
4088
|
+
* You can use this as an expiration time for your cache storage.
|
|
4089
|
+
*
|
|
4090
|
+
* Prefer this method over `maxAge()`, because it includes other factors like `age` and `stale-while-revalidate`.
|
|
4091
|
+
* @returns {number} Time-to-live in milliseconds.
|
|
4092
|
+
*/
|
|
3891
4093
|
timeToLive() {
|
|
3892
4094
|
const age = this.maxAge() - this.age();
|
|
3893
4095
|
const staleIfErrorAge = age + toNumberOrZero(this._rescc["stale-if-error"]);
|
|
3894
4096
|
const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc["stale-while-revalidate"]);
|
|
3895
|
-
return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3;
|
|
4097
|
+
return Math.round(Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3);
|
|
3896
4098
|
}
|
|
4099
|
+
/**
|
|
4100
|
+
* If true, this cache entry is past its expiration date.
|
|
4101
|
+
* Note that stale cache may be useful sometimes, see `evaluateRequest()`.
|
|
4102
|
+
* @returns {boolean} `false` doesn't mean it's fresh nor usable
|
|
4103
|
+
*/
|
|
3897
4104
|
stale() {
|
|
3898
4105
|
return this.maxAge() <= this.age();
|
|
3899
4106
|
}
|
|
4107
|
+
/**
|
|
4108
|
+
* @returns {boolean} `true` if `stale-if-error` condition allows use of a stale response.
|
|
4109
|
+
*/
|
|
3900
4110
|
_useStaleIfError() {
|
|
3901
4111
|
return this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > this.age();
|
|
3902
4112
|
}
|
|
4113
|
+
/** See `evaluateRequest()` for a more complete solution
|
|
4114
|
+
* @returns {boolean} `true` if `stale-while-revalidate` is currently allowed.
|
|
4115
|
+
*/
|
|
3903
4116
|
useStaleWhileRevalidate() {
|
|
3904
|
-
|
|
4117
|
+
const swr = toNumberOrZero(this._rescc["stale-while-revalidate"]);
|
|
4118
|
+
return swr > 0 && this.maxAge() + swr > this.age();
|
|
3905
4119
|
}
|
|
4120
|
+
/**
|
|
4121
|
+
* Creates a `CachePolicy` instance from a serialized object.
|
|
4122
|
+
* @param {Object} obj - The serialized object.
|
|
4123
|
+
* @returns {CachePolicy} A new CachePolicy instance.
|
|
4124
|
+
*/
|
|
3906
4125
|
static fromObject(obj) {
|
|
3907
4126
|
return new this(void 0, void 0, { _fromObject: obj });
|
|
3908
4127
|
}
|
|
4128
|
+
/**
|
|
4129
|
+
* @param {any} obj - The serialized object.
|
|
4130
|
+
* @throws {Error} If already initialized or if the object is invalid.
|
|
4131
|
+
*/
|
|
3909
4132
|
_fromObject(obj) {
|
|
3910
4133
|
if (this._responseTime) throw Error("Reinitialized");
|
|
3911
4134
|
if (!obj || obj.v !== 1) throw Error("Invalid serialization");
|
|
@@ -3913,6 +4136,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3913
4136
|
this._isShared = obj.sh;
|
|
3914
4137
|
this._cacheHeuristic = obj.ch;
|
|
3915
4138
|
this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3;
|
|
4139
|
+
this._ignoreCargoCult = !!obj.icc;
|
|
3916
4140
|
this._status = obj.st;
|
|
3917
4141
|
this._resHeaders = obj.resh;
|
|
3918
4142
|
this._rescc = obj.rescc;
|
|
@@ -3923,6 +4147,10 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3923
4147
|
this._reqHeaders = obj.reqh;
|
|
3924
4148
|
this._reqcc = obj.reqcc;
|
|
3925
4149
|
}
|
|
4150
|
+
/**
|
|
4151
|
+
* Serializes the `CachePolicy` instance into a JSON-serializable object.
|
|
4152
|
+
* @returns {Object} The serialized object.
|
|
4153
|
+
*/
|
|
3926
4154
|
toObject() {
|
|
3927
4155
|
return {
|
|
3928
4156
|
v: 1,
|
|
@@ -3930,6 +4158,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3930
4158
|
sh: this._isShared,
|
|
3931
4159
|
ch: this._cacheHeuristic,
|
|
3932
4160
|
imm: this._immutableMinTtl,
|
|
4161
|
+
icc: this._ignoreCargoCult,
|
|
3933
4162
|
st: this._status,
|
|
3934
4163
|
resh: this._resHeaders,
|
|
3935
4164
|
rescc: this._rescc,
|
|
@@ -3947,6 +4176,8 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3947
4176
|
*
|
|
3948
4177
|
* Hop by hop headers are always stripped.
|
|
3949
4178
|
* Revalidation headers may be added or removed, depending on request.
|
|
4179
|
+
* @param {HttpRequest} incomingReq - The incoming HTTP request.
|
|
4180
|
+
* @returns {Record<string, string>} The headers for the revalidation request.
|
|
3950
4181
|
*/
|
|
3951
4182
|
revalidationHeaders(incomingReq) {
|
|
3952
4183
|
this._assertRequestHasHeaders(incomingReq);
|
|
@@ -3985,15 +4216,18 @@ var require_http_cache_semantics = __commonJS({
|
|
|
3985
4216
|
* Returns {policy, modified} where modified is a boolean indicating
|
|
3986
4217
|
* whether the response body has been modified, and old cached body can't be used.
|
|
3987
4218
|
*
|
|
3988
|
-
* @
|
|
4219
|
+
* @param {HttpRequest} request - The latest HTTP request asking for the cached entry.
|
|
4220
|
+
* @param {HttpResponse} response - The latest revalidation HTTP response from the origin server.
|
|
4221
|
+
* @returns {{policy: CachePolicy, modified: boolean, matches: boolean}} The updated policy and modification status.
|
|
4222
|
+
* @throws {Error} If the response headers are missing.
|
|
3989
4223
|
*/
|
|
3990
4224
|
revalidatedPolicy(request, response) {
|
|
3991
4225
|
this._assertRequestHasHeaders(request);
|
|
3992
4226
|
if (this._useStaleIfError() && isErrorResponse(response)) {
|
|
3993
4227
|
return {
|
|
4228
|
+
policy: this,
|
|
3994
4229
|
modified: false,
|
|
3995
|
-
matches:
|
|
3996
|
-
policy: this
|
|
4230
|
+
matches: true
|
|
3997
4231
|
};
|
|
3998
4232
|
}
|
|
3999
4233
|
if (!response || !response.headers) {
|
|
@@ -4013,9 +4247,15 @@ var require_http_cache_semantics = __commonJS({
|
|
|
4013
4247
|
matches = true;
|
|
4014
4248
|
}
|
|
4015
4249
|
}
|
|
4250
|
+
const optionsCopy = {
|
|
4251
|
+
shared: this._isShared,
|
|
4252
|
+
cacheHeuristic: this._cacheHeuristic,
|
|
4253
|
+
immutableMinTimeToLive: this._immutableMinTtl,
|
|
4254
|
+
ignoreCargoCult: this._ignoreCargoCult
|
|
4255
|
+
};
|
|
4016
4256
|
if (!matches) {
|
|
4017
4257
|
return {
|
|
4018
|
-
policy: new this.constructor(request, response),
|
|
4258
|
+
policy: new this.constructor(request, response, optionsCopy),
|
|
4019
4259
|
// Client receiving 304 without body, even if it's invalid/mismatched has no option
|
|
4020
4260
|
// but to reuse a cached body. We don't have a good way to tell clients to do
|
|
4021
4261
|
// error recovery in such case.
|
|
@@ -4033,11 +4273,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
4033
4273
|
headers
|
|
4034
4274
|
});
|
|
4035
4275
|
return {
|
|
4036
|
-
policy: new this.constructor(request, newResponse,
|
|
4037
|
-
shared: this._isShared,
|
|
4038
|
-
cacheHeuristic: this._cacheHeuristic,
|
|
4039
|
-
immutableMinTimeToLive: this._immutableMinTtl
|
|
4040
|
-
}),
|
|
4276
|
+
policy: new this.constructor(request, newResponse, optionsCopy),
|
|
4041
4277
|
modified: false,
|
|
4042
4278
|
matches: true
|
|
4043
4279
|
};
|
|
@@ -7110,7 +7346,7 @@ var require_polyfills2 = __commonJS({
|
|
|
7110
7346
|
};
|
|
7111
7347
|
}
|
|
7112
7348
|
if (platform === "win32") {
|
|
7113
|
-
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
|
|
7349
|
+
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : (function(fs$rename) {
|
|
7114
7350
|
function rename(from, to, cb) {
|
|
7115
7351
|
var start = Date.now();
|
|
7116
7352
|
var backoff = 0;
|
|
@@ -7133,9 +7369,9 @@ var require_polyfills2 = __commonJS({
|
|
|
7133
7369
|
}
|
|
7134
7370
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
7135
7371
|
return rename;
|
|
7136
|
-
}(fs3.rename);
|
|
7372
|
+
})(fs3.rename);
|
|
7137
7373
|
}
|
|
7138
|
-
fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
|
|
7374
|
+
fs3.read = typeof fs3.read !== "function" ? fs3.read : (function(fs$read) {
|
|
7139
7375
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
7140
7376
|
var callback;
|
|
7141
7377
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -7152,8 +7388,8 @@ var require_polyfills2 = __commonJS({
|
|
|
7152
7388
|
}
|
|
7153
7389
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
7154
7390
|
return read;
|
|
7155
|
-
}(fs3.read);
|
|
7156
|
-
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
7391
|
+
})(fs3.read);
|
|
7392
|
+
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
7157
7393
|
return function(fd, buffer, offset, length, position) {
|
|
7158
7394
|
var eagCounter = 0;
|
|
7159
7395
|
while (true) {
|
|
@@ -7168,7 +7404,7 @@ var require_polyfills2 = __commonJS({
|
|
|
7168
7404
|
}
|
|
7169
7405
|
}
|
|
7170
7406
|
};
|
|
7171
|
-
}(fs3.readSync);
|
|
7407
|
+
})(fs3.readSync);
|
|
7172
7408
|
function patchLchmod(fs4) {
|
|
7173
7409
|
fs4.lchmod = function(path6, mode, callback) {
|
|
7174
7410
|
fs4.open(
|
|
@@ -7494,7 +7730,7 @@ var require_graceful_fs2 = __commonJS({
|
|
|
7494
7730
|
if (!fs3[gracefulQueue]) {
|
|
7495
7731
|
queue = global[gracefulQueue] || [];
|
|
7496
7732
|
publishQueue(fs3, queue);
|
|
7497
|
-
fs3.close = function(fs$close) {
|
|
7733
|
+
fs3.close = (function(fs$close) {
|
|
7498
7734
|
function close(fd, cb) {
|
|
7499
7735
|
return fs$close.call(fs3, fd, function(err) {
|
|
7500
7736
|
if (!err) {
|
|
@@ -7508,8 +7744,8 @@ var require_graceful_fs2 = __commonJS({
|
|
|
7508
7744
|
value: fs$close
|
|
7509
7745
|
});
|
|
7510
7746
|
return close;
|
|
7511
|
-
}(fs3.close);
|
|
7512
|
-
fs3.closeSync = function(fs$closeSync) {
|
|
7747
|
+
})(fs3.close);
|
|
7748
|
+
fs3.closeSync = (function(fs$closeSync) {
|
|
7513
7749
|
function closeSync(fd) {
|
|
7514
7750
|
fs$closeSync.apply(fs3, arguments);
|
|
7515
7751
|
resetQueue();
|
|
@@ -7518,7 +7754,7 @@ var require_graceful_fs2 = __commonJS({
|
|
|
7518
7754
|
value: fs$closeSync
|
|
7519
7755
|
});
|
|
7520
7756
|
return closeSync;
|
|
7521
|
-
}(fs3.closeSync);
|
|
7757
|
+
})(fs3.closeSync);
|
|
7522
7758
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
7523
7759
|
process.on("exit", function() {
|
|
7524
7760
|
debug2(fs3[gracefulQueue]);
|
|
@@ -7858,7 +8094,7 @@ var require_dist = __commonJS({
|
|
|
7858
8094
|
"../../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/index.js"(exports2) {
|
|
7859
8095
|
"use strict";
|
|
7860
8096
|
init_cjs_shims();
|
|
7861
|
-
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
8097
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
7862
8098
|
if (k2 === void 0) k2 = k;
|
|
7863
8099
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7864
8100
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
@@ -7867,10 +8103,10 @@ var require_dist = __commonJS({
|
|
|
7867
8103
|
} };
|
|
7868
8104
|
}
|
|
7869
8105
|
Object.defineProperty(o, k2, desc);
|
|
7870
|
-
} : function(o, m, k, k2) {
|
|
8106
|
+
}) : (function(o, m, k, k2) {
|
|
7871
8107
|
if (k2 === void 0) k2 = k;
|
|
7872
8108
|
o[k2] = m[k];
|
|
7873
|
-
});
|
|
8109
|
+
}));
|
|
7874
8110
|
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
7875
8111
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
|
|
7876
8112
|
};
|
|
@@ -8221,9 +8457,9 @@ var require_config_chain = __commonJS({
|
|
|
8221
8457
|
}
|
|
8222
8458
|
});
|
|
8223
8459
|
|
|
8224
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8460
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
|
|
8225
8461
|
var require_envKeyToSetting = __commonJS({
|
|
8226
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8462
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js"(exports2, module2) {
|
|
8227
8463
|
"use strict";
|
|
8228
8464
|
init_cjs_shims();
|
|
8229
8465
|
module2.exports = function(x) {
|
|
@@ -8297,14 +8533,20 @@ var require_dist2 = __commonJS({
|
|
|
8297
8533
|
}
|
|
8298
8534
|
});
|
|
8299
8535
|
|
|
8300
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8536
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js
|
|
8301
8537
|
var require_util = __commonJS({
|
|
8302
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8538
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js"(exports2) {
|
|
8303
8539
|
"use strict";
|
|
8304
8540
|
init_cjs_shims();
|
|
8305
8541
|
var fs3 = require("fs");
|
|
8306
8542
|
var path6 = require("path");
|
|
8307
8543
|
var { envReplace } = require_dist2();
|
|
8544
|
+
var parseKey = (key) => {
|
|
8545
|
+
if (typeof key !== "string") {
|
|
8546
|
+
return key;
|
|
8547
|
+
}
|
|
8548
|
+
return envReplace(key, process.env);
|
|
8549
|
+
};
|
|
8308
8550
|
var parseField = (types2, field, key) => {
|
|
8309
8551
|
if (typeof field !== "string") {
|
|
8310
8552
|
return field;
|
|
@@ -8326,6 +8568,7 @@ var require_util = __commonJS({
|
|
|
8326
8568
|
return true;
|
|
8327
8569
|
}
|
|
8328
8570
|
switch (field) {
|
|
8571
|
+
// eslint-disable-line default-case
|
|
8329
8572
|
case "true": {
|
|
8330
8573
|
return true;
|
|
8331
8574
|
}
|
|
@@ -8392,12 +8635,13 @@ var require_util = __commonJS({
|
|
|
8392
8635
|
exports2.envReplace = envReplace;
|
|
8393
8636
|
exports2.findPrefix = findPrefix;
|
|
8394
8637
|
exports2.parseField = parseField;
|
|
8638
|
+
exports2.parseKey = parseKey;
|
|
8395
8639
|
}
|
|
8396
8640
|
});
|
|
8397
8641
|
|
|
8398
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8642
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js
|
|
8399
8643
|
var require_types = __commonJS({
|
|
8400
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8644
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js"(exports2) {
|
|
8401
8645
|
"use strict";
|
|
8402
8646
|
init_cjs_shims();
|
|
8403
8647
|
var path6 = require("path");
|
|
@@ -8535,9 +8779,9 @@ var require_types = __commonJS({
|
|
|
8535
8779
|
}
|
|
8536
8780
|
});
|
|
8537
8781
|
|
|
8538
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8782
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js
|
|
8539
8783
|
var require_conf = __commonJS({
|
|
8540
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8784
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js"(exports2, module2) {
|
|
8541
8785
|
"use strict";
|
|
8542
8786
|
init_cjs_shims();
|
|
8543
8787
|
var { readCAFileSync } = require_dist();
|
|
@@ -8556,8 +8800,12 @@ var require_conf = __commonJS({
|
|
|
8556
8800
|
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L326-L338
|
|
8557
8801
|
add(data, marker) {
|
|
8558
8802
|
try {
|
|
8559
|
-
for (const
|
|
8560
|
-
|
|
8803
|
+
for (const [key, value] of Object.entries(data)) {
|
|
8804
|
+
const substKey = util.parseKey(key);
|
|
8805
|
+
if (substKey !== key) {
|
|
8806
|
+
delete data[key];
|
|
8807
|
+
}
|
|
8808
|
+
data[substKey] = this._parseField(value, substKey);
|
|
8561
8809
|
}
|
|
8562
8810
|
} catch (error2) {
|
|
8563
8811
|
throw error2;
|
|
@@ -8577,7 +8825,7 @@ var require_conf = __commonJS({
|
|
|
8577
8825
|
} catch (error2) {
|
|
8578
8826
|
if (error2.code === "ENOENT") {
|
|
8579
8827
|
this.add({}, marker);
|
|
8580
|
-
} else {
|
|
8828
|
+
} else if (error2.code !== "EISDIR") {
|
|
8581
8829
|
return `Issue while reading "${file}". ${error2.message}`;
|
|
8582
8830
|
}
|
|
8583
8831
|
}
|
|
@@ -8590,7 +8838,9 @@ var require_conf = __commonJS({
|
|
|
8590
8838
|
if (!env4[x]) {
|
|
8591
8839
|
return;
|
|
8592
8840
|
}
|
|
8593
|
-
|
|
8841
|
+
const key = envKeyToSetting(x.substr(11));
|
|
8842
|
+
const rawVal = env4[x];
|
|
8843
|
+
conf[key] = deserializeEnvVal(key, rawVal);
|
|
8594
8844
|
});
|
|
8595
8845
|
return super.addEnv("", conf, "env");
|
|
8596
8846
|
}
|
|
@@ -8671,13 +8921,28 @@ var require_conf = __commonJS({
|
|
|
8671
8921
|
}
|
|
8672
8922
|
}
|
|
8673
8923
|
};
|
|
8924
|
+
function deserializeEnvVal(envKey, envValue) {
|
|
8925
|
+
function deserializeList(envValue2) {
|
|
8926
|
+
const npmConfigSep = "\n\n";
|
|
8927
|
+
if (envValue2.indexOf(npmConfigSep)) {
|
|
8928
|
+
return envValue2.split(npmConfigSep);
|
|
8929
|
+
}
|
|
8930
|
+
return envValue2.split(",");
|
|
8931
|
+
}
|
|
8932
|
+
switch (envKey) {
|
|
8933
|
+
case "hoist-pattern":
|
|
8934
|
+
case "public-hoist-pattern":
|
|
8935
|
+
return deserializeList(envValue);
|
|
8936
|
+
}
|
|
8937
|
+
return envValue;
|
|
8938
|
+
}
|
|
8674
8939
|
module2.exports = Conf;
|
|
8675
8940
|
}
|
|
8676
8941
|
});
|
|
8677
8942
|
|
|
8678
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8943
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js
|
|
8679
8944
|
var require_defaults = __commonJS({
|
|
8680
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
8945
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
|
|
8681
8946
|
"use strict";
|
|
8682
8947
|
init_cjs_shims();
|
|
8683
8948
|
var os6 = require("os");
|
|
@@ -8844,9 +9109,9 @@ var require_defaults = __commonJS({
|
|
|
8844
9109
|
}
|
|
8845
9110
|
});
|
|
8846
9111
|
|
|
8847
|
-
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
9112
|
+
// ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js
|
|
8848
9113
|
var require_npm_conf = __commonJS({
|
|
8849
|
-
"../../node_modules/.pnpm/@pnpm+npm-conf@2.
|
|
9114
|
+
"../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js"(exports2, module2) {
|
|
8850
9115
|
"use strict";
|
|
8851
9116
|
init_cjs_shims();
|
|
8852
9117
|
var path6 = require("path");
|
|
@@ -8909,12 +9174,11 @@ var require_npm_conf = __commonJS({
|
|
|
8909
9174
|
}
|
|
8910
9175
|
});
|
|
8911
9176
|
|
|
8912
|
-
// ../../node_modules/.pnpm/registry-auth-token@5.0
|
|
9177
|
+
// ../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js
|
|
8913
9178
|
var require_registry_auth_token = __commonJS({
|
|
8914
|
-
"../../node_modules/.pnpm/registry-auth-token@5.0
|
|
9179
|
+
"../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js"(exports2, module2) {
|
|
8915
9180
|
"use strict";
|
|
8916
9181
|
init_cjs_shims();
|
|
8917
|
-
var url = require("url");
|
|
8918
9182
|
var npmConf = require_npm_conf();
|
|
8919
9183
|
var tokenKey = ":_authToken";
|
|
8920
9184
|
var legacyTokenKey = ":_auth";
|
|
@@ -8941,8 +9205,16 @@ var require_registry_auth_token = __commonJS({
|
|
|
8941
9205
|
checkUrl = checkUrl || options.npmrc.get("registry") || npmConf.defaults.registry;
|
|
8942
9206
|
return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc);
|
|
8943
9207
|
};
|
|
9208
|
+
function urlResolve(from, to) {
|
|
9209
|
+
const resolvedUrl = new URL(to, new URL(from.startsWith("//") ? `./${from}` : from, "resolve://"));
|
|
9210
|
+
if (resolvedUrl.protocol === "resolve:") {
|
|
9211
|
+
const { pathname, search, hash } = resolvedUrl;
|
|
9212
|
+
return pathname + search + hash;
|
|
9213
|
+
}
|
|
9214
|
+
return resolvedUrl.toString();
|
|
9215
|
+
}
|
|
8944
9216
|
function getRegistryAuthInfo(checkUrl, options) {
|
|
8945
|
-
|
|
9217
|
+
let parsed = checkUrl instanceof URL ? checkUrl : new URL(checkUrl.startsWith("//") ? `http:${checkUrl}` : checkUrl);
|
|
8946
9218
|
let pathname;
|
|
8947
9219
|
while (pathname !== "/" && parsed.pathname !== pathname) {
|
|
8948
9220
|
pathname = parsed.pathname || "/";
|
|
@@ -8952,9 +9224,9 @@ var require_registry_auth_token = __commonJS({
|
|
|
8952
9224
|
return authInfo;
|
|
8953
9225
|
}
|
|
8954
9226
|
if (!options.recursive) {
|
|
8955
|
-
return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(
|
|
9227
|
+
return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(new URL("./", parsed), options);
|
|
8956
9228
|
}
|
|
8957
|
-
parsed.pathname =
|
|
9229
|
+
parsed.pathname = urlResolve(normalizePath(pathname), "..") || "/";
|
|
8958
9230
|
}
|
|
8959
9231
|
return void 0;
|
|
8960
9232
|
}
|
|
@@ -10083,10 +10355,10 @@ var import_runtime5 = require("@terai/runtime");
|
|
|
10083
10355
|
|
|
10084
10356
|
// ../logger/dist/index.mjs
|
|
10085
10357
|
init_cjs_shims();
|
|
10086
|
-
var
|
|
10087
|
-
var
|
|
10088
|
-
var
|
|
10089
|
-
var
|
|
10358
|
+
var import_process = __toESM(require("process"), 1);
|
|
10359
|
+
var import_process2 = __toESM(require("process"), 1);
|
|
10360
|
+
var import_os = __toESM(require("os"), 1);
|
|
10361
|
+
var import_tty = __toESM(require("tty"), 1);
|
|
10090
10362
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
10091
10363
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
10092
10364
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -10271,13 +10543,13 @@ function assembleStyles() {
|
|
|
10271
10543
|
}
|
|
10272
10544
|
var ansiStyles = assembleStyles();
|
|
10273
10545
|
var ansi_styles_default = ansiStyles;
|
|
10274
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
10546
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_process2.default.argv) {
|
|
10275
10547
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
10276
10548
|
const position = argv.indexOf(prefix + flag);
|
|
10277
10549
|
const terminatorPosition = argv.indexOf("--");
|
|
10278
10550
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
10279
10551
|
}
|
|
10280
|
-
var { env } =
|
|
10552
|
+
var { env } = import_process2.default;
|
|
10281
10553
|
var flagForceColor;
|
|
10282
10554
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
10283
10555
|
flagForceColor = 0;
|
|
@@ -10333,18 +10605,18 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
10333
10605
|
if (env.TERM === "dumb") {
|
|
10334
10606
|
return min;
|
|
10335
10607
|
}
|
|
10336
|
-
if (
|
|
10337
|
-
const osRelease =
|
|
10608
|
+
if (import_process2.default.platform === "win32") {
|
|
10609
|
+
const osRelease = import_os.default.release().split(".");
|
|
10338
10610
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
10339
10611
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
10340
10612
|
}
|
|
10341
10613
|
return 1;
|
|
10342
10614
|
}
|
|
10343
10615
|
if ("CI" in env) {
|
|
10344
|
-
if ("GITHUB_ACTIONS"
|
|
10616
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
|
|
10345
10617
|
return 3;
|
|
10346
10618
|
}
|
|
10347
|
-
if (["TRAVIS", "
|
|
10619
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
10348
10620
|
return 1;
|
|
10349
10621
|
}
|
|
10350
10622
|
return min;
|
|
@@ -10358,6 +10630,12 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
10358
10630
|
if (env.TERM === "xterm-kitty") {
|
|
10359
10631
|
return 3;
|
|
10360
10632
|
}
|
|
10633
|
+
if (env.TERM === "xterm-ghostty") {
|
|
10634
|
+
return 3;
|
|
10635
|
+
}
|
|
10636
|
+
if (env.TERM === "wezterm") {
|
|
10637
|
+
return 3;
|
|
10638
|
+
}
|
|
10361
10639
|
if ("TERM_PROGRAM" in env) {
|
|
10362
10640
|
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
10363
10641
|
switch (env.TERM_PROGRAM) {
|
|
@@ -10388,8 +10666,8 @@ function createSupportsColor(stream2, options = {}) {
|
|
|
10388
10666
|
return translateLevel(level);
|
|
10389
10667
|
}
|
|
10390
10668
|
var supportsColor = {
|
|
10391
|
-
stdout: createSupportsColor({ isTTY:
|
|
10392
|
-
stderr: createSupportsColor({ isTTY:
|
|
10669
|
+
stdout: createSupportsColor({ isTTY: import_tty.default.isatty(1) }),
|
|
10670
|
+
stderr: createSupportsColor({ isTTY: import_tty.default.isatty(2) })
|
|
10393
10671
|
};
|
|
10394
10672
|
var supports_color_default = supportsColor;
|
|
10395
10673
|
function stringReplaceAll(string, substring, replacer) {
|
|
@@ -10566,11 +10844,11 @@ var chalk = createChalk();
|
|
|
10566
10844
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
10567
10845
|
var source_default = chalk;
|
|
10568
10846
|
function log(message) {
|
|
10569
|
-
return
|
|
10847
|
+
return import_process.default.stdout.write(`${message}
|
|
10570
10848
|
`);
|
|
10571
10849
|
}
|
|
10572
10850
|
function logError(message) {
|
|
10573
|
-
return
|
|
10851
|
+
return import_process.default.stderr.write(`${message}
|
|
10574
10852
|
`);
|
|
10575
10853
|
}
|
|
10576
10854
|
function logBullet(logger2, colorizePrefix, colorizeText, symbol, prefix, text) {
|
|
@@ -10636,7 +10914,7 @@ init_cjs_shims();
|
|
|
10636
10914
|
|
|
10637
10915
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
10638
10916
|
init_cjs_shims();
|
|
10639
|
-
var
|
|
10917
|
+
var import_node_process7 = __toESM(require("process"), 1);
|
|
10640
10918
|
var import_node_child_process = require("child_process");
|
|
10641
10919
|
var import_node_url5 = require("url");
|
|
10642
10920
|
var import_node_path3 = __toESM(require("path"), 1);
|
|
@@ -10645,14 +10923,14 @@ var import_node_util4 = require("util");
|
|
|
10645
10923
|
// ../../node_modules/.pnpm/configstore@6.0.0/node_modules/configstore/index.js
|
|
10646
10924
|
init_cjs_shims();
|
|
10647
10925
|
var import_path2 = __toESM(require("path"), 1);
|
|
10648
|
-
var
|
|
10926
|
+
var import_os3 = __toESM(require("os"), 1);
|
|
10649
10927
|
var import_graceful_fs = __toESM(require_graceful_fs(), 1);
|
|
10650
10928
|
|
|
10651
10929
|
// ../../node_modules/.pnpm/xdg-basedir@5.1.0/node_modules/xdg-basedir/index.js
|
|
10652
10930
|
init_cjs_shims();
|
|
10653
|
-
var
|
|
10931
|
+
var import_os2 = __toESM(require("os"), 1);
|
|
10654
10932
|
var import_path = __toESM(require("path"), 1);
|
|
10655
|
-
var homeDirectory =
|
|
10933
|
+
var homeDirectory = import_os2.default.homedir();
|
|
10656
10934
|
var { env: env2 } = process;
|
|
10657
10935
|
var xdgData = env2.XDG_DATA_HOME || (homeDirectory ? import_path.default.join(homeDirectory, ".local", "share") : void 0);
|
|
10658
10936
|
var xdgConfig = env2.XDG_CONFIG_HOME || (homeDirectory ? import_path.default.join(homeDirectory, ".config") : void 0);
|
|
@@ -10797,7 +11075,7 @@ function uniqueString() {
|
|
|
10797
11075
|
}
|
|
10798
11076
|
|
|
10799
11077
|
// ../../node_modules/.pnpm/configstore@6.0.0/node_modules/configstore/index.js
|
|
10800
|
-
var configDirectory = xdgConfig || import_path2.default.join(
|
|
11078
|
+
var configDirectory = xdgConfig || import_path2.default.join(import_os3.default.tmpdir(), uniqueString());
|
|
10801
11079
|
var permissionError = "You don't have access to this file.";
|
|
10802
11080
|
var mkdirOptions = { mode: 448, recursive: true };
|
|
10803
11081
|
var writeFileOptions = { mode: 384 };
|
|
@@ -10877,10 +11155,10 @@ ${permissionError}
|
|
|
10877
11155
|
}
|
|
10878
11156
|
};
|
|
10879
11157
|
|
|
10880
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11158
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
10881
11159
|
init_cjs_shims();
|
|
10882
11160
|
|
|
10883
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11161
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
10884
11162
|
init_cjs_shims();
|
|
10885
11163
|
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
10886
11164
|
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -11067,18 +11345,18 @@ function assembleStyles2() {
|
|
|
11067
11345
|
var ansiStyles2 = assembleStyles2();
|
|
11068
11346
|
var ansi_styles_default2 = ansiStyles2;
|
|
11069
11347
|
|
|
11070
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11348
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
11071
11349
|
init_cjs_shims();
|
|
11072
|
-
var
|
|
11073
|
-
var
|
|
11074
|
-
var
|
|
11075
|
-
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
11350
|
+
var import_node_process = __toESM(require("process"), 1);
|
|
11351
|
+
var import_node_os = __toESM(require("os"), 1);
|
|
11352
|
+
var import_node_tty = __toESM(require("tty"), 1);
|
|
11353
|
+
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
|
11076
11354
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
11077
11355
|
const position = argv.indexOf(prefix + flag);
|
|
11078
11356
|
const terminatorPosition = argv.indexOf("--");
|
|
11079
11357
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
11080
11358
|
}
|
|
11081
|
-
var { env: env3 } =
|
|
11359
|
+
var { env: env3 } = import_node_process.default;
|
|
11082
11360
|
var flagForceColor2;
|
|
11083
11361
|
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
11084
11362
|
flagForceColor2 = 0;
|
|
@@ -11134,18 +11412,18 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
11134
11412
|
if (env3.TERM === "dumb") {
|
|
11135
11413
|
return min;
|
|
11136
11414
|
}
|
|
11137
|
-
if (
|
|
11138
|
-
const osRelease =
|
|
11415
|
+
if (import_node_process.default.platform === "win32") {
|
|
11416
|
+
const osRelease = import_node_os.default.release().split(".");
|
|
11139
11417
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
11140
11418
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
11141
11419
|
}
|
|
11142
11420
|
return 1;
|
|
11143
11421
|
}
|
|
11144
11422
|
if ("CI" in env3) {
|
|
11145
|
-
if ("GITHUB_ACTIONS"
|
|
11423
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env3)) {
|
|
11146
11424
|
return 3;
|
|
11147
11425
|
}
|
|
11148
|
-
if (["TRAVIS", "
|
|
11426
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
|
|
11149
11427
|
return 1;
|
|
11150
11428
|
}
|
|
11151
11429
|
return min;
|
|
@@ -11159,6 +11437,12 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
11159
11437
|
if (env3.TERM === "xterm-kitty") {
|
|
11160
11438
|
return 3;
|
|
11161
11439
|
}
|
|
11440
|
+
if (env3.TERM === "xterm-ghostty") {
|
|
11441
|
+
return 3;
|
|
11442
|
+
}
|
|
11443
|
+
if (env3.TERM === "wezterm") {
|
|
11444
|
+
return 3;
|
|
11445
|
+
}
|
|
11162
11446
|
if ("TERM_PROGRAM" in env3) {
|
|
11163
11447
|
const version = Number.parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
11164
11448
|
switch (env3.TERM_PROGRAM) {
|
|
@@ -11189,12 +11473,12 @@ function createSupportsColor2(stream2, options = {}) {
|
|
|
11189
11473
|
return translateLevel2(level);
|
|
11190
11474
|
}
|
|
11191
11475
|
var supportsColor2 = {
|
|
11192
|
-
stdout: createSupportsColor2({ isTTY:
|
|
11193
|
-
stderr: createSupportsColor2({ isTTY:
|
|
11476
|
+
stdout: createSupportsColor2({ isTTY: import_node_tty.default.isatty(1) }),
|
|
11477
|
+
stderr: createSupportsColor2({ isTTY: import_node_tty.default.isatty(2) })
|
|
11194
11478
|
};
|
|
11195
11479
|
var supports_color_default2 = supportsColor2;
|
|
11196
11480
|
|
|
11197
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11481
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
11198
11482
|
init_cjs_shims();
|
|
11199
11483
|
function stringReplaceAll2(string, substring, replacer) {
|
|
11200
11484
|
let index = string.indexOf(substring);
|
|
@@ -11225,7 +11509,7 @@ function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
|
11225
11509
|
return returnValue;
|
|
11226
11510
|
}
|
|
11227
11511
|
|
|
11228
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
11512
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
11229
11513
|
var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
|
|
11230
11514
|
var GENERATOR2 = Symbol("GENERATOR");
|
|
11231
11515
|
var STYLER2 = Symbol("STYLER");
|
|
@@ -12058,7 +12342,7 @@ var AbortError = class extends RequestError {
|
|
|
12058
12342
|
|
|
12059
12343
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/index.js
|
|
12060
12344
|
init_cjs_shims();
|
|
12061
|
-
var
|
|
12345
|
+
var import_node_process3 = __toESM(require("process"), 1);
|
|
12062
12346
|
var import_node_buffer2 = require("buffer");
|
|
12063
12347
|
var import_node_stream3 = require("stream");
|
|
12064
12348
|
var import_node_url3 = require("url");
|
|
@@ -12177,7 +12461,7 @@ var import_node_url = __toESM(require("url"), 1);
|
|
|
12177
12461
|
var import_node_crypto = __toESM(require("crypto"), 1);
|
|
12178
12462
|
var import_node_stream2 = __toESM(require("stream"), 1);
|
|
12179
12463
|
|
|
12180
|
-
// ../../node_modules/.pnpm/normalize-url@8.0
|
|
12464
|
+
// ../../node_modules/.pnpm/normalize-url@8.1.0/node_modules/normalize-url/index.js
|
|
12181
12465
|
init_cjs_shims();
|
|
12182
12466
|
var DATA_URL_DEFAULT_MIME_TYPE = "text/plain";
|
|
12183
12467
|
var DATA_URL_DEFAULT_CHARSET = "us-ascii";
|
|
@@ -12246,6 +12530,8 @@ function normalizeUrl(urlString, options) {
|
|
|
12246
12530
|
removeDirectoryIndex: false,
|
|
12247
12531
|
removeExplicitPort: false,
|
|
12248
12532
|
sortQueryParameters: true,
|
|
12533
|
+
removePath: false,
|
|
12534
|
+
transformPath: false,
|
|
12249
12535
|
...options
|
|
12250
12536
|
};
|
|
12251
12537
|
if (typeof options.defaultProtocol === "string" && !options.defaultProtocol.endsWith(":")) {
|
|
@@ -12304,7 +12590,7 @@ function normalizeUrl(urlString, options) {
|
|
|
12304
12590
|
}
|
|
12305
12591
|
if (urlObject.pathname) {
|
|
12306
12592
|
try {
|
|
12307
|
-
urlObject.pathname = decodeURI(urlObject.pathname);
|
|
12593
|
+
urlObject.pathname = decodeURI(urlObject.pathname).replace(/\\/g, "%5C");
|
|
12308
12594
|
} catch {
|
|
12309
12595
|
}
|
|
12310
12596
|
}
|
|
@@ -12319,6 +12605,14 @@ function normalizeUrl(urlString, options) {
|
|
|
12319
12605
|
urlObject.pathname = pathComponents.slice(1).join("/") + "/";
|
|
12320
12606
|
}
|
|
12321
12607
|
}
|
|
12608
|
+
if (options.removePath) {
|
|
12609
|
+
urlObject.pathname = "/";
|
|
12610
|
+
}
|
|
12611
|
+
if (options.transformPath && typeof options.transformPath === "function") {
|
|
12612
|
+
const pathComponents = urlObject.pathname.split("/").filter(Boolean);
|
|
12613
|
+
const newComponents = options.transformPath(pathComponents);
|
|
12614
|
+
urlObject.pathname = newComponents?.length > 0 ? `/${newComponents.join("/")}` : "/";
|
|
12615
|
+
}
|
|
12322
12616
|
if (urlObject.hostname) {
|
|
12323
12617
|
urlObject.hostname = urlObject.hostname.replace(/\.$/, "");
|
|
12324
12618
|
if (options.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(urlObject.hostname)) {
|
|
@@ -12343,11 +12637,17 @@ function normalizeUrl(urlString, options) {
|
|
|
12343
12637
|
}
|
|
12344
12638
|
}
|
|
12345
12639
|
if (options.sortQueryParameters) {
|
|
12640
|
+
const originalSearch = urlObject.search;
|
|
12346
12641
|
urlObject.searchParams.sort();
|
|
12347
12642
|
try {
|
|
12348
12643
|
urlObject.search = decodeURIComponent(urlObject.search);
|
|
12349
12644
|
} catch {
|
|
12350
12645
|
}
|
|
12646
|
+
const partsWithoutEquals = originalSearch.slice(1).split("&").filter((p) => p && !p.includes("="));
|
|
12647
|
+
for (const part of partsWithoutEquals) {
|
|
12648
|
+
const decoded = decodeURIComponent(part);
|
|
12649
|
+
urlObject.search = urlObject.search.replace(`?${decoded}=`, `?${decoded}`).replace(`&${decoded}=`, `&${decoded}`);
|
|
12650
|
+
}
|
|
12351
12651
|
}
|
|
12352
12652
|
if (options.removeTrailingSlash) {
|
|
12353
12653
|
urlObject.pathname = urlObject.pathname.replace(/\/$/, "");
|
|
@@ -13274,7 +13574,7 @@ var calculate_retry_delay_default = calculateRetryDelay;
|
|
|
13274
13574
|
|
|
13275
13575
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/options.js
|
|
13276
13576
|
init_cjs_shims();
|
|
13277
|
-
var
|
|
13577
|
+
var import_node_process2 = __toESM(require("process"), 1);
|
|
13278
13578
|
var import_node_util3 = require("util");
|
|
13279
13579
|
var import_node_url2 = require("url");
|
|
13280
13580
|
var import_node_tls = require("tls");
|
|
@@ -13285,7 +13585,7 @@ var import_node_https = __toESM(require("https"), 1);
|
|
|
13285
13585
|
init_cjs_shims();
|
|
13286
13586
|
var import_node_dns = require("dns");
|
|
13287
13587
|
var import_node_util2 = require("util");
|
|
13288
|
-
var
|
|
13588
|
+
var import_node_os2 = __toESM(require("os"), 1);
|
|
13289
13589
|
var { Resolver: AsyncResolver } = import_node_dns.promises;
|
|
13290
13590
|
var kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection");
|
|
13291
13591
|
var kCacheableLookupInstance = Symbol("cacheableLookupInstance");
|
|
@@ -13308,7 +13608,7 @@ var map4to6 = (entries2) => {
|
|
|
13308
13608
|
var getIfaceInfo = () => {
|
|
13309
13609
|
let has4 = false;
|
|
13310
13610
|
let has6 = false;
|
|
13311
|
-
for (const device of Object.values(
|
|
13611
|
+
for (const device of Object.values(import_node_os2.default.networkInterfaces())) {
|
|
13312
13612
|
for (const iface of device) {
|
|
13313
13613
|
if (iface.internal) {
|
|
13314
13614
|
continue;
|
|
@@ -13669,7 +13969,7 @@ function parseLinkHeader(link) {
|
|
|
13669
13969
|
}
|
|
13670
13970
|
|
|
13671
13971
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/options.js
|
|
13672
|
-
var [major, minor] =
|
|
13972
|
+
var [major, minor] = import_node_process2.default.versions.node.split(".").map(Number);
|
|
13673
13973
|
function validateSearchParameters(searchParameters) {
|
|
13674
13974
|
for (const key in searchParameters) {
|
|
13675
13975
|
const value = searchParameters[key];
|
|
@@ -15300,7 +15600,7 @@ function isUnixSocketURL(url) {
|
|
|
15300
15600
|
|
|
15301
15601
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/index.js
|
|
15302
15602
|
var { buffer: getBuffer } = import_get_stream2.default;
|
|
15303
|
-
var supportsBrotli = dist_default.string(
|
|
15603
|
+
var supportsBrotli = dist_default.string(import_node_process3.default.versions.brotli);
|
|
15304
15604
|
var methodsWithoutBody = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
15305
15605
|
var cacheableStore = new WeakableMap();
|
|
15306
15606
|
var redirectCodes = /* @__PURE__ */ new Set([300, 301, 302, 303, 304, 307, 308]);
|
|
@@ -15648,7 +15948,7 @@ var Request = class _Request extends import_node_stream3.Duplex {
|
|
|
15648
15948
|
this.emit("retry", this.retryCount + 1, error2, (updatedOptions) => {
|
|
15649
15949
|
const request = new _Request(options.url, updatedOptions, options);
|
|
15650
15950
|
request.retryCount = this.retryCount + 1;
|
|
15651
|
-
|
|
15951
|
+
import_node_process3.default.nextTick(() => {
|
|
15652
15952
|
void request.flush();
|
|
15653
15953
|
});
|
|
15654
15954
|
return request;
|
|
@@ -16042,7 +16342,7 @@ var Request = class _Request extends import_node_stream3.Duplex {
|
|
|
16042
16342
|
}
|
|
16043
16343
|
_prepareCache(cache) {
|
|
16044
16344
|
if (!cacheableStore.has(cache)) {
|
|
16045
|
-
const cacheableRequest = new dist_default2((requestOptions, handler) => {
|
|
16345
|
+
const cacheableRequest = new dist_default2(((requestOptions, handler) => {
|
|
16046
16346
|
const result = requestOptions._request(requestOptions, handler);
|
|
16047
16347
|
if (dist_default.promise(result)) {
|
|
16048
16348
|
result.once = (event, handler2) => {
|
|
@@ -16069,7 +16369,7 @@ var Request = class _Request extends import_node_stream3.Duplex {
|
|
|
16069
16369
|
};
|
|
16070
16370
|
}
|
|
16071
16371
|
return result;
|
|
16072
|
-
}, cache);
|
|
16372
|
+
}), cache);
|
|
16073
16373
|
cacheableStore.set(cache, cacheableRequest.request());
|
|
16074
16374
|
}
|
|
16075
16375
|
}
|
|
@@ -16468,7 +16768,7 @@ var create = (defaults2) => {
|
|
|
16468
16768
|
configurable: false,
|
|
16469
16769
|
writable: false
|
|
16470
16770
|
});
|
|
16471
|
-
const got2 = (url, options, defaultOptions2 = defaults2.options) => {
|
|
16771
|
+
const got2 = ((url, options, defaultOptions2 = defaults2.options) => {
|
|
16472
16772
|
const request = new Request(url, options, defaultOptions2);
|
|
16473
16773
|
let promise;
|
|
16474
16774
|
const lastHandler = (normalized) => {
|
|
@@ -16505,7 +16805,7 @@ var create = (defaults2) => {
|
|
|
16505
16805
|
return result;
|
|
16506
16806
|
};
|
|
16507
16807
|
return iterateHandlers(request.options);
|
|
16508
|
-
};
|
|
16808
|
+
});
|
|
16509
16809
|
got2.extend = (...instancesOrOptions) => {
|
|
16510
16810
|
const options = new Options(void 0, void 0, defaults2.options);
|
|
16511
16811
|
const handlers = [...defaults2.handlers];
|
|
@@ -16529,7 +16829,7 @@ var create = (defaults2) => {
|
|
|
16529
16829
|
mutableDefaults: Boolean(mutableDefaults)
|
|
16530
16830
|
});
|
|
16531
16831
|
};
|
|
16532
|
-
const paginateEach = async function* (url, options) {
|
|
16832
|
+
const paginateEach = (async function* (url, options) {
|
|
16533
16833
|
let normalizedOptions = new Options(url, options, defaults2.options);
|
|
16534
16834
|
normalizedOptions.resolveBodyOnly = false;
|
|
16535
16835
|
const { pagination } = normalizedOptions;
|
|
@@ -16586,20 +16886,20 @@ var create = (defaults2) => {
|
|
|
16586
16886
|
}
|
|
16587
16887
|
numberOfRequests++;
|
|
16588
16888
|
}
|
|
16589
|
-
};
|
|
16889
|
+
});
|
|
16590
16890
|
got2.paginate = paginateEach;
|
|
16591
|
-
got2.paginate.all = async (url, options) => {
|
|
16891
|
+
got2.paginate.all = (async (url, options) => {
|
|
16592
16892
|
const results = [];
|
|
16593
16893
|
for await (const item of paginateEach(url, options)) {
|
|
16594
16894
|
results.push(item);
|
|
16595
16895
|
}
|
|
16596
16896
|
return results;
|
|
16597
|
-
};
|
|
16897
|
+
});
|
|
16598
16898
|
got2.paginate.each = paginateEach;
|
|
16599
|
-
got2.stream = (url, options) => got2(url, { ...options, isStream: true });
|
|
16899
|
+
got2.stream = ((url, options) => got2(url, { ...options, isStream: true }));
|
|
16600
16900
|
for (const method of aliases) {
|
|
16601
|
-
got2[method] = (url, options) => got2(url, { ...options, method });
|
|
16602
|
-
got2.stream[method] = (url, options) => got2(url, { ...options, method, isStream: true });
|
|
16901
|
+
got2[method] = ((url, options) => got2(url, { ...options, method }));
|
|
16902
|
+
got2.stream[method] = ((url, options) => got2(url, { ...options, method, isStream: true }));
|
|
16603
16903
|
}
|
|
16604
16904
|
if (!defaults2.mutableDefaults) {
|
|
16605
16905
|
Object.freeze(defaults2.handlers);
|
|
@@ -16724,15 +17024,15 @@ async function latestVersion(packageName, options) {
|
|
|
16724
17024
|
return version;
|
|
16725
17025
|
}
|
|
16726
17026
|
|
|
16727
|
-
// ../../node_modules/.pnpm/is-npm@6.
|
|
17027
|
+
// ../../node_modules/.pnpm/is-npm@6.1.0/node_modules/is-npm/index.js
|
|
16728
17028
|
init_cjs_shims();
|
|
16729
|
-
var
|
|
16730
|
-
var packageJson2 =
|
|
16731
|
-
var userAgent =
|
|
16732
|
-
var
|
|
16733
|
-
var
|
|
16734
|
-
var
|
|
16735
|
-
var
|
|
17029
|
+
var import_node_process4 = __toESM(require("process"), 1);
|
|
17030
|
+
var packageJson2 = import_node_process4.default.env.npm_package_json;
|
|
17031
|
+
var userAgent = import_node_process4.default.env.npm_config_user_agent;
|
|
17032
|
+
var isNpm = Boolean(userAgent?.startsWith("npm")) || Boolean(packageJson2?.endsWith("package.json"));
|
|
17033
|
+
var isYarn = Boolean(userAgent?.startsWith("yarn"));
|
|
17034
|
+
var isPnpm = Boolean(userAgent?.startsWith("pnpm"));
|
|
17035
|
+
var isBun = Boolean(userAgent?.startsWith("bun"));
|
|
16736
17036
|
var isNpmOrYarn = isNpm || isYarn;
|
|
16737
17037
|
|
|
16738
17038
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
@@ -16752,34 +17052,34 @@ var dist_default3 = isYarnGlobal;
|
|
|
16752
17052
|
|
|
16753
17053
|
// ../../node_modules/.pnpm/has-yarn@3.0.0/node_modules/has-yarn/index.js
|
|
16754
17054
|
init_cjs_shims();
|
|
16755
|
-
var
|
|
17055
|
+
var import_node_process5 = __toESM(require("process"), 1);
|
|
16756
17056
|
var import_node_path2 = __toESM(require("path"), 1);
|
|
16757
17057
|
var import_node_fs = __toESM(require("fs"), 1);
|
|
16758
|
-
function hasYarn(cwd =
|
|
17058
|
+
function hasYarn(cwd = import_node_process5.default.cwd()) {
|
|
16759
17059
|
return import_node_fs.default.existsSync(import_node_path2.default.resolve(cwd, "yarn.lock"));
|
|
16760
17060
|
}
|
|
16761
17061
|
|
|
16762
17062
|
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
16763
17063
|
init_cjs_shims();
|
|
16764
|
-
var
|
|
17064
|
+
var import_node_process6 = __toESM(require("process"), 1);
|
|
16765
17065
|
|
|
16766
17066
|
// ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
|
|
16767
17067
|
init_cjs_shims();
|
|
16768
17068
|
|
|
16769
|
-
// ../../node_modules/.pnpm/strip-ansi@7.1.
|
|
17069
|
+
// ../../node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
16770
17070
|
init_cjs_shims();
|
|
16771
17071
|
|
|
16772
|
-
// ../../node_modules/.pnpm/ansi-regex@6.
|
|
17072
|
+
// ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
16773
17073
|
init_cjs_shims();
|
|
16774
17074
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
16775
|
-
const
|
|
16776
|
-
|
|
16777
|
-
|
|
16778
|
-
|
|
17075
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
17076
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
17077
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
17078
|
+
const pattern = `${osc}|${csi}`;
|
|
16779
17079
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
16780
17080
|
}
|
|
16781
17081
|
|
|
16782
|
-
// ../../node_modules/.pnpm/strip-ansi@7.1.
|
|
17082
|
+
// ../../node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
16783
17083
|
var regex = ansiRegex();
|
|
16784
17084
|
function stripAnsi(string) {
|
|
16785
17085
|
if (typeof string !== "string") {
|
|
@@ -16932,7 +17232,7 @@ var import_ansi_align = __toESM(require_ansi_align(), 1);
|
|
|
16932
17232
|
// ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
|
|
16933
17233
|
init_cjs_shims();
|
|
16934
17234
|
|
|
16935
|
-
// ../../node_modules/.pnpm/ansi-styles@6.2.
|
|
17235
|
+
// ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
16936
17236
|
init_cjs_shims();
|
|
16937
17237
|
var ANSI_BACKGROUND_OFFSET3 = 10;
|
|
16938
17238
|
var wrapAnsi163 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -17032,7 +17332,7 @@ function assembleStyles3() {
|
|
|
17032
17332
|
styles5.bgColor.ansi16m = wrapAnsi16m3(ANSI_BACKGROUND_OFFSET3);
|
|
17033
17333
|
Object.defineProperties(styles5, {
|
|
17034
17334
|
rgbToAnsi256: {
|
|
17035
|
-
value
|
|
17335
|
+
value(red, green, blue) {
|
|
17036
17336
|
if (red === green && green === blue) {
|
|
17037
17337
|
if (red < 8) {
|
|
17038
17338
|
return 16;
|
|
@@ -17047,7 +17347,7 @@ function assembleStyles3() {
|
|
|
17047
17347
|
enumerable: false
|
|
17048
17348
|
},
|
|
17049
17349
|
hexToRgb: {
|
|
17050
|
-
value
|
|
17350
|
+
value(hex) {
|
|
17051
17351
|
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
17052
17352
|
if (!matches) {
|
|
17053
17353
|
return [0, 0, 0];
|
|
@@ -17072,7 +17372,7 @@ function assembleStyles3() {
|
|
|
17072
17372
|
enumerable: false
|
|
17073
17373
|
},
|
|
17074
17374
|
ansi256ToAnsi: {
|
|
17075
|
-
value
|
|
17375
|
+
value(code) {
|
|
17076
17376
|
if (code < 8) {
|
|
17077
17377
|
return 30 + code;
|
|
17078
17378
|
}
|
|
@@ -17276,7 +17576,7 @@ var NEWLINE = "\n";
|
|
|
17276
17576
|
var PAD = " ";
|
|
17277
17577
|
var NONE = "none";
|
|
17278
17578
|
var terminalColumns = () => {
|
|
17279
|
-
const { env: env4, stdout, stderr } =
|
|
17579
|
+
const { env: env4, stdout, stderr } = import_node_process6.default;
|
|
17280
17580
|
if (stdout?.columns) {
|
|
17281
17581
|
return stdout.columns;
|
|
17282
17582
|
}
|
|
@@ -17472,8 +17772,8 @@ var boxContent = (content, contentWidth, options) => {
|
|
|
17472
17772
|
return result;
|
|
17473
17773
|
};
|
|
17474
17774
|
var sanitizeOptions = (options) => {
|
|
17475
|
-
if (options.fullscreen &&
|
|
17476
|
-
let newDimensions = [
|
|
17775
|
+
if (options.fullscreen && import_node_process6.default?.stdout) {
|
|
17776
|
+
let newDimensions = [import_node_process6.default.stdout.columns, import_node_process6.default.stdout.rows];
|
|
17477
17777
|
if (typeof options.fullscreen === "function") {
|
|
17478
17778
|
newDimensions = options.fullscreen(...newDimensions);
|
|
17479
17779
|
}
|
|
@@ -17567,7 +17867,7 @@ function boxen(text, options) {
|
|
|
17567
17867
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
17568
17868
|
var import_is_ci = __toESM(require_is_ci(), 1);
|
|
17569
17869
|
|
|
17570
|
-
// ../../node_modules/.pnpm/pupa@3.
|
|
17870
|
+
// ../../node_modules/.pnpm/pupa@3.3.0/node_modules/pupa/index.js
|
|
17571
17871
|
init_cjs_shims();
|
|
17572
17872
|
|
|
17573
17873
|
// ../../node_modules/.pnpm/escape-goat@4.0.0/node_modules/escape-goat/index.js
|
|
@@ -17584,7 +17884,7 @@ function htmlEscape(strings, ...values) {
|
|
|
17584
17884
|
return output;
|
|
17585
17885
|
}
|
|
17586
17886
|
|
|
17587
|
-
// ../../node_modules/.pnpm/pupa@3.
|
|
17887
|
+
// ../../node_modules/.pnpm/pupa@3.3.0/node_modules/pupa/index.js
|
|
17588
17888
|
var MissingValueError = class extends Error {
|
|
17589
17889
|
constructor(key) {
|
|
17590
17890
|
super(`Missing a value for ${key ? `the placeholder: ${key}` : "a placeholder"}`, key);
|
|
@@ -17592,17 +17892,63 @@ var MissingValueError = class extends Error {
|
|
|
17592
17892
|
this.key = key;
|
|
17593
17893
|
}
|
|
17594
17894
|
};
|
|
17595
|
-
|
|
17895
|
+
var MissingFilterError = class extends Error {
|
|
17896
|
+
constructor(filterName) {
|
|
17897
|
+
super(`Missing filter: ${filterName}`);
|
|
17898
|
+
this.name = "MissingFilterError";
|
|
17899
|
+
this.filterName = filterName;
|
|
17900
|
+
}
|
|
17901
|
+
};
|
|
17902
|
+
function pupa(template, data, { ignoreMissing = false, transform = ({ value }) => value, filters = {} } = {}) {
|
|
17596
17903
|
if (typeof template !== "string") {
|
|
17597
17904
|
throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof template}\``);
|
|
17598
17905
|
}
|
|
17599
17906
|
if (typeof data !== "object") {
|
|
17600
17907
|
throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\``);
|
|
17601
17908
|
}
|
|
17602
|
-
const
|
|
17909
|
+
const escapedLeftBrace = "\uE000\uE001\uE002";
|
|
17910
|
+
const escapedRightBrace = "\uE003\uE004\uE005";
|
|
17911
|
+
template = template.replace(/\\{/g, escapedLeftBrace);
|
|
17912
|
+
template = template.replace(/\\}/g, escapedRightBrace);
|
|
17913
|
+
const parseKeyPath = (key) => {
|
|
17914
|
+
const segments = [];
|
|
17915
|
+
let segment = "";
|
|
17916
|
+
for (let index = 0; index < key.length; index++) {
|
|
17917
|
+
if (key[index] === "\\" && key[index + 1] === ".") {
|
|
17918
|
+
segment += ".";
|
|
17919
|
+
index++;
|
|
17920
|
+
} else if (key[index] === ".") {
|
|
17921
|
+
segments.push(segment);
|
|
17922
|
+
segment = "";
|
|
17923
|
+
} else {
|
|
17924
|
+
segment += key[index];
|
|
17925
|
+
}
|
|
17926
|
+
}
|
|
17927
|
+
segments.push(segment);
|
|
17928
|
+
return segments;
|
|
17929
|
+
};
|
|
17930
|
+
const replace = (placeholder, keyWithFilters) => {
|
|
17931
|
+
const parts = keyWithFilters.split("|").map((part) => part.trim());
|
|
17932
|
+
const key = parts[0];
|
|
17933
|
+
const filterChain = parts.slice(1);
|
|
17934
|
+
const segments = parseKeyPath(key);
|
|
17603
17935
|
let value = data;
|
|
17604
|
-
for (const property of
|
|
17605
|
-
|
|
17936
|
+
for (const property of segments) {
|
|
17937
|
+
if (value) {
|
|
17938
|
+
value = value[property];
|
|
17939
|
+
}
|
|
17940
|
+
}
|
|
17941
|
+
for (const filterName of filterChain) {
|
|
17942
|
+
const filter = filters[filterName];
|
|
17943
|
+
if (!filter) {
|
|
17944
|
+
if (ignoreMissing) {
|
|
17945
|
+
return placeholder;
|
|
17946
|
+
}
|
|
17947
|
+
throw new MissingFilterError(filterName);
|
|
17948
|
+
}
|
|
17949
|
+
if (value !== void 0) {
|
|
17950
|
+
value = filter(value);
|
|
17951
|
+
}
|
|
17606
17952
|
}
|
|
17607
17953
|
const transformedValue = transform({ value, key });
|
|
17608
17954
|
if (transformedValue === void 0) {
|
|
@@ -17613,13 +17959,16 @@ function pupa(template, data, { ignoreMissing = false, transform = ({ value }) =
|
|
|
17613
17959
|
}
|
|
17614
17960
|
return String(transformedValue);
|
|
17615
17961
|
};
|
|
17616
|
-
const
|
|
17617
|
-
const
|
|
17618
|
-
|
|
17619
|
-
|
|
17620
|
-
}
|
|
17621
|
-
|
|
17622
|
-
|
|
17962
|
+
const keyPattern = "(\\d+|[a-z$_][\\w\\-.$\\\\]*)";
|
|
17963
|
+
const filterPattern = "(?:\\|\\s*[a-z$_][\\w$]*\\s*)*";
|
|
17964
|
+
const keyWithFiltersPattern = `(${keyPattern}\\s*${filterPattern})`;
|
|
17965
|
+
const doubleBraceRegex = new RegExp(`{{${keyWithFiltersPattern}}}`, "gi");
|
|
17966
|
+
const singleBraceRegex = new RegExp(`{${keyWithFiltersPattern}}`, "gi");
|
|
17967
|
+
template = template.replace(doubleBraceRegex, (...arguments_) => htmlEscape(replace(...arguments_)));
|
|
17968
|
+
template = template.replace(singleBraceRegex, replace);
|
|
17969
|
+
template = template.replace(new RegExp(escapedLeftBrace, "g"), "{");
|
|
17970
|
+
template = template.replace(new RegExp(escapedRightBrace, "g"), "}");
|
|
17971
|
+
return template;
|
|
17623
17972
|
}
|
|
17624
17973
|
|
|
17625
17974
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
@@ -17650,7 +17999,7 @@ var UpdateNotifier = class {
|
|
|
17650
17999
|
this._packageName = options.pkg.name;
|
|
17651
18000
|
this.#packageVersion = options.pkg.version;
|
|
17652
18001
|
this.#updateCheckInterval = typeof options.updateCheckInterval === "number" ? options.updateCheckInterval : ONE_DAY;
|
|
17653
|
-
this.#isDisabled = "NO_UPDATE_NOTIFIER" in
|
|
18002
|
+
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;
|
|
17654
18003
|
this._shouldNotifyInNpmScript = options.shouldNotifyInNpmScript;
|
|
17655
18004
|
if (!this.#isDisabled) {
|
|
17656
18005
|
try {
|
|
@@ -17662,7 +18011,7 @@ var UpdateNotifier = class {
|
|
|
17662
18011
|
});
|
|
17663
18012
|
} catch {
|
|
17664
18013
|
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));
|
|
17665
|
-
|
|
18014
|
+
import_node_process7.default.on("exit", () => {
|
|
17666
18015
|
console.error(boxen(message, { textAlignment: "center" }));
|
|
17667
18016
|
});
|
|
17668
18017
|
}
|
|
@@ -17680,7 +18029,7 @@ var UpdateNotifier = class {
|
|
|
17680
18029
|
if (Date.now() - this.config.get("lastUpdateCheck") < this.#updateCheckInterval) {
|
|
17681
18030
|
return;
|
|
17682
18031
|
}
|
|
17683
|
-
(0, import_node_child_process.spawn)(
|
|
18032
|
+
(0, import_node_child_process.spawn)(import_node_process7.default.execPath, [import_node_path3.default.join(__dirname2, "check.js"), JSON.stringify(this.#options)], {
|
|
17684
18033
|
detached: true,
|
|
17685
18034
|
stdio: "ignore"
|
|
17686
18035
|
}).unref();
|
|
@@ -17697,7 +18046,7 @@ var UpdateNotifier = class {
|
|
|
17697
18046
|
}
|
|
17698
18047
|
notify(options) {
|
|
17699
18048
|
const suppressForNpm = !this._shouldNotifyInNpmScript && isNpmOrYarn;
|
|
17700
|
-
if (!
|
|
18049
|
+
if (!import_node_process7.default.stdout.isTTY || suppressForNpm || !this.update || !import_semver3.default.gt(this.update.latest, this.update.current)) {
|
|
17701
18050
|
return this;
|
|
17702
18051
|
}
|
|
17703
18052
|
options = {
|
|
@@ -17736,12 +18085,12 @@ var UpdateNotifier = class {
|
|
|
17736
18085
|
if (options.defer === false) {
|
|
17737
18086
|
console.error(message);
|
|
17738
18087
|
} else {
|
|
17739
|
-
|
|
18088
|
+
import_node_process7.default.on("exit", () => {
|
|
17740
18089
|
console.error(message);
|
|
17741
18090
|
});
|
|
17742
|
-
|
|
18091
|
+
import_node_process7.default.on("SIGINT", () => {
|
|
17743
18092
|
console.error("");
|
|
17744
|
-
|
|
18093
|
+
import_node_process7.default.exit();
|
|
17745
18094
|
});
|
|
17746
18095
|
}
|
|
17747
18096
|
return this;
|
|
@@ -17758,7 +18107,7 @@ function updateNotifier(options) {
|
|
|
17758
18107
|
// package.json
|
|
17759
18108
|
var package_default = {
|
|
17760
18109
|
name: "@terai/dev",
|
|
17761
|
-
version: "0.0.
|
|
18110
|
+
version: "0.0.6",
|
|
17762
18111
|
description: "The user-facing package for Terai",
|
|
17763
18112
|
main: "dist/index.js",
|
|
17764
18113
|
module: "dist/index.mjs",
|
|
@@ -17793,6 +18142,7 @@ var package_default = {
|
|
|
17793
18142
|
"@terai/runtime": "workspace:*",
|
|
17794
18143
|
"@terai/translator": "workspace:*",
|
|
17795
18144
|
"@terai/utils": "workspace:*",
|
|
18145
|
+
"@terai/types": "workspace:*",
|
|
17796
18146
|
cac: "^6",
|
|
17797
18147
|
dotenv: "^1",
|
|
17798
18148
|
inquirer: "^9",
|
|
@@ -17803,7 +18153,6 @@ var package_default = {
|
|
|
17803
18153
|
devDependencies: {
|
|
17804
18154
|
"@terai/generator": "workspace:*",
|
|
17805
18155
|
"@terai/logger": "workspace:*",
|
|
17806
|
-
"@terai/types": "workspace:*",
|
|
17807
18156
|
"@types/update-notifier": "^6",
|
|
17808
18157
|
"update-notifier": "^6"
|
|
17809
18158
|
}
|