@storm-software/linting-tools 1.133.49 → 1.133.51
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/bin/{chunk-BAL4YR7J.cjs → chunk-36C2UH4F.cjs} +93 -93
- package/bin/{chunk-YDLNZUQQ.js → chunk-3E6AM2DT.js} +2 -2
- package/bin/{chunk-REVLN7O5.js → chunk-5GSLGMCP.js} +2 -2
- package/bin/{chunk-ILFBGIR3.js → chunk-6WYSFSIO.js} +1 -1
- package/bin/{chunk-3RPEXUFX.cjs → chunk-7CWFSLH2.cjs} +5 -5
- package/bin/{chunk-XR6FLKA6.cjs → chunk-CSNJPOQI.cjs} +2 -2
- package/bin/{chunk-D6UJI7DP.cjs → chunk-DECGHVEE.cjs} +5 -5
- package/bin/{chunk-5H4LWKH4.cjs → chunk-EE22TSFU.cjs} +14 -14
- package/bin/{chunk-L5WTOL2D.cjs → chunk-G3N3XZE6.cjs} +20 -20
- package/bin/{chunk-RBJRPZR3.js → chunk-KXVYKBVV.js} +2 -2
- package/bin/{chunk-TUT2UJME.cjs → chunk-MBJJAJIB.cjs} +5 -5
- package/bin/{chunk-47WV45TG.js → chunk-NTWVGXFR.js} +1 -1
- package/bin/{chunk-V6DMPCMH.cjs → chunk-PYU4XK3V.cjs} +2 -2
- package/bin/{chunk-WAD5SGY3.cjs → chunk-RPOM7DJT.cjs} +6 -6
- package/bin/{chunk-L5FQGZ6Z.js → chunk-SLCU23SU.js} +1 -1
- package/bin/{chunk-TLJEC7ED.js → chunk-V3TBD3T6.js} +2 -2
- package/bin/{chunk-BZFLOI5H.cjs → chunk-WOVEHUFH.cjs} +2 -2
- package/bin/{chunk-NYPSIS2H.js → chunk-YNBGKRZS.js} +2 -2
- package/bin/{chunk-VFM4D3AN.js → chunk-Z2SQYHMG.js} +2 -2
- package/bin/{chunk-AFYCBDX6.js → chunk-ZT3UHNMN.js} +2 -2
- package/bin/{dist-PJ4KGJZQ.js → dist-4NPPYNEO.js} +8 -8
- package/bin/{dist-M7DIZZLD.cjs → dist-IVLTODPM.cjs} +6 -6
- package/bin/{dist-EYKW3DH5.cjs → dist-W2LWBS72.cjs} +206 -206
- package/bin/{dist-BYM6J25O.js → dist-YR43BPMG.js} +2 -2
- package/bin/{esm-3GQBUEY5.cjs → esm-RZOSJ5E7.cjs} +4 -4
- package/bin/{esm-ADLQSXNQ.js → esm-Z73JGO2Q.js} +1 -1
- package/bin/json5-UVTEU4OW.cjs +10 -0
- package/bin/json5-YTFIE75F.js +10 -0
- package/bin/{jsonc-6VU54LY4.js → jsonc-HKSFIUGL.js} +3 -3
- package/bin/jsonc-TVLJZ2Z5.cjs +15 -0
- package/bin/lint.cjs +2255 -2250
- package/bin/lint.js +315 -310
- package/bin/{multipart-parser-VPBA2QGX.cjs → multipart-parser-4KYE4TLO.cjs} +6 -6
- package/bin/{multipart-parser-QVMZG2XL.js → multipart-parser-W5BEHHKH.js} +2 -2
- package/bin/{package-json-6LRIV6MY.js → package-json-MWS5EBHM.js} +2 -2
- package/bin/{package-json-263LLBOQ.cjs → package-json-OVI6EYZB.cjs} +94 -94
- package/bin/toml-Z5LTEBLA.js +10 -0
- package/bin/toml-Z63GEZLN.cjs +10 -0
- package/bin/{utils-RNBJFYKU.cjs → utils-4TVSNFXX.cjs} +5 -5
- package/bin/{utils-VQM3WD2S.js → utils-ZASOJD4X.js} +2 -2
- package/bin/yaml-3SS4FPLN.js +10 -0
- package/bin/yaml-T7RFAZQX.cjs +10 -0
- package/package.json +3 -3
- package/bin/json5-AUMLNRGV.cjs +0 -10
- package/bin/json5-QCULZZNB.js +0 -10
- package/bin/jsonc-HY2YIICO.cjs +0 -15
- package/bin/toml-H6FCTZ54.cjs +0 -10
- package/bin/toml-UZJIHCNF.js +0 -10
- package/bin/yaml-GHSQPK4L.cjs +0 -10
- package/bin/yaml-TDU5ONQQ.js +0 -10
package/bin/lint.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
require_clean,
|
|
4
4
|
require_semver,
|
|
5
5
|
require_valid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SLCU23SU.js";
|
|
7
7
|
import {
|
|
8
8
|
basename,
|
|
9
9
|
be,
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
join,
|
|
16
16
|
readPackageJSON,
|
|
17
17
|
resolve
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-YNBGKRZS.js";
|
|
19
|
+
import "./chunk-KXVYKBVV.js";
|
|
20
|
+
import "./chunk-5GSLGMCP.js";
|
|
21
|
+
import "./chunk-ZT3UHNMN.js";
|
|
22
|
+
import "./chunk-3E6AM2DT.js";
|
|
23
|
+
import "./chunk-NTWVGXFR.js";
|
|
24
24
|
import {
|
|
25
25
|
__commonJS,
|
|
26
26
|
__dirname,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
__require,
|
|
32
32
|
__toESM,
|
|
33
33
|
init_esm_shims
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-V3TBD3T6.js";
|
|
35
35
|
|
|
36
36
|
// ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json
|
|
37
37
|
var package_exports = {};
|
|
@@ -714,9 +714,9 @@ var require_conversions = __commonJS({
|
|
|
714
714
|
const g2 = rgb[1];
|
|
715
715
|
let b = rgb[2];
|
|
716
716
|
const h = convert3.rgb.hsl(rgb)[0];
|
|
717
|
-
const
|
|
717
|
+
const w3 = 1 / 255 * Math.min(r, Math.min(g2, b));
|
|
718
718
|
b = 1 - 1 / 255 * Math.max(r, Math.max(g2, b));
|
|
719
|
-
return [h,
|
|
719
|
+
return [h, w3 * 100, b * 100];
|
|
720
720
|
};
|
|
721
721
|
convert3.rgb.cmyk = function(rgb) {
|
|
722
722
|
const r = rgb[0] / 255;
|
|
@@ -1151,7 +1151,7 @@ var require_conversions = __commonJS({
|
|
|
1151
1151
|
const pure = [0, 0, 0];
|
|
1152
1152
|
const hi = h % 1 * 6;
|
|
1153
1153
|
const v2 = hi % 1;
|
|
1154
|
-
const
|
|
1154
|
+
const w3 = 1 - v2;
|
|
1155
1155
|
let mg = 0;
|
|
1156
1156
|
switch (Math.floor(hi)) {
|
|
1157
1157
|
case 0:
|
|
@@ -1160,7 +1160,7 @@ var require_conversions = __commonJS({
|
|
|
1160
1160
|
pure[2] = 0;
|
|
1161
1161
|
break;
|
|
1162
1162
|
case 1:
|
|
1163
|
-
pure[0] =
|
|
1163
|
+
pure[0] = w3;
|
|
1164
1164
|
pure[1] = 1;
|
|
1165
1165
|
pure[2] = 0;
|
|
1166
1166
|
break;
|
|
@@ -1171,7 +1171,7 @@ var require_conversions = __commonJS({
|
|
|
1171
1171
|
break;
|
|
1172
1172
|
case 3:
|
|
1173
1173
|
pure[0] = 0;
|
|
1174
|
-
pure[1] =
|
|
1174
|
+
pure[1] = w3;
|
|
1175
1175
|
pure[2] = 1;
|
|
1176
1176
|
break;
|
|
1177
1177
|
case 4:
|
|
@@ -1182,7 +1182,7 @@ var require_conversions = __commonJS({
|
|
|
1182
1182
|
default:
|
|
1183
1183
|
pure[0] = 1;
|
|
1184
1184
|
pure[1] = 0;
|
|
1185
|
-
pure[2] =
|
|
1185
|
+
pure[2] = w3;
|
|
1186
1186
|
}
|
|
1187
1187
|
mg = (1 - c) * g2;
|
|
1188
1188
|
return [
|
|
@@ -1220,10 +1220,10 @@ var require_conversions = __commonJS({
|
|
|
1220
1220
|
return [hcg[0], (v2 - c) * 100, (1 - v2) * 100];
|
|
1221
1221
|
};
|
|
1222
1222
|
convert3.hwb.hcg = function(hwb) {
|
|
1223
|
-
const
|
|
1223
|
+
const w3 = hwb[1] / 100;
|
|
1224
1224
|
const b = hwb[2] / 100;
|
|
1225
1225
|
const v2 = 1 - b;
|
|
1226
|
-
const c = v2 -
|
|
1226
|
+
const c = v2 - w3;
|
|
1227
1227
|
let g2 = 0;
|
|
1228
1228
|
if (c < 1) {
|
|
1229
1229
|
g2 = (v2 - c) / (1 - c);
|
|
@@ -211178,7 +211178,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
211178
211178
|
}
|
|
211179
211179
|
function getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes) {
|
|
211180
211180
|
const variableAssignments = map4(exposedVariableDeclarations, (v2) => factory.createShorthandPropertyAssignment(v2.symbol.name));
|
|
211181
|
-
const writeAssignments = map4(writes, (
|
|
211181
|
+
const writeAssignments = map4(writes, (w3) => factory.createShorthandPropertyAssignment(w3.symbol.name));
|
|
211182
211182
|
return variableAssignments === void 0 ? writeAssignments : writeAssignments === void 0 ? variableAssignments : variableAssignments.concat(writeAssignments);
|
|
211183
211183
|
}
|
|
211184
211184
|
function isReadonlyArray2(v2) {
|
|
@@ -261696,7 +261696,7 @@ var require_ms = __commonJS({
|
|
|
261696
261696
|
var m2 = s * 60;
|
|
261697
261697
|
var h = m2 * 60;
|
|
261698
261698
|
var d2 = h * 24;
|
|
261699
|
-
var
|
|
261699
|
+
var w3 = d2 * 7;
|
|
261700
261700
|
var y2 = d2 * 365.25;
|
|
261701
261701
|
module.exports = function(val, options) {
|
|
261702
261702
|
options = options || {};
|
|
@@ -261733,7 +261733,7 @@ var require_ms = __commonJS({
|
|
|
261733
261733
|
case "weeks":
|
|
261734
261734
|
case "week":
|
|
261735
261735
|
case "w":
|
|
261736
|
-
return n *
|
|
261736
|
+
return n * w3;
|
|
261737
261737
|
case "days":
|
|
261738
261738
|
case "day":
|
|
261739
261739
|
case "d":
|
|
@@ -263825,7 +263825,7 @@ var require_update_workspaces = __commonJS({
|
|
|
263825
263825
|
if (!newWorkspaces) {
|
|
263826
263826
|
return originalContent;
|
|
263827
263827
|
}
|
|
263828
|
-
const hasInvalidWorkspaces = () => newWorkspaces.some((
|
|
263828
|
+
const hasInvalidWorkspaces = () => newWorkspaces.some((w3) => !(typeof w3 === "string"));
|
|
263829
263829
|
if (!newWorkspaces.length || hasInvalidWorkspaces()) {
|
|
263830
263830
|
throw Object.assign(
|
|
263831
263831
|
new TypeError("workspaces should be an array of strings."),
|
|
@@ -270108,8 +270108,8 @@ var require_lib22 = __commonJS({
|
|
|
270108
270108
|
}
|
|
270109
270109
|
const mapWorkspaces = __import__npmcli_mapWorkspaces;
|
|
270110
270110
|
const workspaces = await mapWorkspaces({ cwd: p, pkg });
|
|
270111
|
-
for (const
|
|
270112
|
-
if (
|
|
270111
|
+
for (const w3 of workspaces.values()) {
|
|
270112
|
+
if (w3 === this.localPrefix) {
|
|
270113
270113
|
if (await fileExists2(this.localPrefix, ".npmrc")) {
|
|
270114
270114
|
log4.warn("config", `ignoring workspace config at ${this.localPrefix}/.npmrc`);
|
|
270115
270115
|
}
|
|
@@ -276779,12 +276779,12 @@ var require_typedarray = __commonJS({
|
|
|
276779
276779
|
function packIEEE754(v2, ebits, fbits) {
|
|
276780
276780
|
var bias = (1 << ebits - 1) - 1, s, e, f, ln, i2, bits, str2, bytes;
|
|
276781
276781
|
function roundToEven(n) {
|
|
276782
|
-
var
|
|
276782
|
+
var w3 = floor(n), f2 = n - w3;
|
|
276783
276783
|
if (f2 < 0.5)
|
|
276784
|
-
return
|
|
276784
|
+
return w3;
|
|
276785
276785
|
if (f2 > 0.5)
|
|
276786
|
-
return
|
|
276787
|
-
return
|
|
276786
|
+
return w3 + 1;
|
|
276787
|
+
return w3 % 2 ? w3 + 1 : w3;
|
|
276788
276788
|
}
|
|
276789
276789
|
if (v2 !== v2) {
|
|
276790
276790
|
e = (1 << ebits) - 1;
|
|
@@ -281982,7 +281982,7 @@ var require_which2 = __commonJS({
|
|
|
281982
281982
|
var pathExt = info.ext;
|
|
281983
281983
|
var pathExtExe = info.extExe;
|
|
281984
281984
|
var found = [];
|
|
281985
|
-
(function
|
|
281985
|
+
(function F2(i2, l) {
|
|
281986
281986
|
if (i2 === l) {
|
|
281987
281987
|
if (opt.all && found.length)
|
|
281988
281988
|
return cb(null, found);
|
|
@@ -281998,7 +281998,7 @@ var require_which2 = __commonJS({
|
|
|
281998
281998
|
}
|
|
281999
281999
|
;
|
|
282000
282000
|
(function E(ii, ll) {
|
|
282001
|
-
if (ii === ll) return
|
|
282001
|
+
if (ii === ll) return F2(i2 + 1, l);
|
|
282002
282002
|
var ext3 = pathExt[ii];
|
|
282003
282003
|
isexe(p + ext3, { pathExt: pathExtExe }, function(er, is3) {
|
|
282004
282004
|
if (!er && is3) {
|
|
@@ -283813,11 +283813,11 @@ function interpolate(target, source = {}, parse9 = (v2) => v2) {
|
|
|
283813
283813
|
}
|
|
283814
283814
|
var _normalize = (p) => p?.replace(/\\/g, "/");
|
|
283815
283815
|
var ASYNC_LOADERS = {
|
|
283816
|
-
".yaml": () => import("./yaml-
|
|
283817
|
-
".yml": () => import("./yaml-
|
|
283818
|
-
".jsonc": () => import("./jsonc-
|
|
283819
|
-
".json5": () => import("./json5-
|
|
283820
|
-
".toml": () => import("./toml-
|
|
283816
|
+
".yaml": () => import("./yaml-3SS4FPLN.js").then((r) => r.parseYAML),
|
|
283817
|
+
".yml": () => import("./yaml-3SS4FPLN.js").then((r) => r.parseYAML),
|
|
283818
|
+
".jsonc": () => import("./jsonc-HKSFIUGL.js").then((r) => r.parseJSONC),
|
|
283819
|
+
".json5": () => import("./json5-YTFIE75F.js").then((r) => r.parseJSON5),
|
|
283820
|
+
".toml": () => import("./toml-Z5LTEBLA.js").then((r) => r.parseTOML)
|
|
283821
283821
|
};
|
|
283822
283822
|
var SUPPORTED_EXTENSIONS = [
|
|
283823
283823
|
// with jiti
|
|
@@ -284017,8 +284017,8 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
284017
284017
|
}
|
|
284018
284018
|
const _merger = options.merger || defu;
|
|
284019
284019
|
if (options.giget !== false && GIGET_PREFIXES.some((prefix) => source.startsWith(prefix))) {
|
|
284020
|
-
const { downloadTemplate } = await import("./dist-
|
|
284021
|
-
const { digest } = await import("./dist-
|
|
284020
|
+
const { downloadTemplate } = await import("./dist-4NPPYNEO.js");
|
|
284021
|
+
const { digest } = await import("./dist-YR43BPMG.js");
|
|
284022
284022
|
const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
|
|
284023
284023
|
let cloneDir;
|
|
284024
284024
|
const localNodeModules = resolve(options.cwd, "node_modules");
|
|
@@ -284456,16 +284456,22 @@ var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
|
284456
284456
|
const skip3 = options.skip ?? [];
|
|
284457
284457
|
const sort = options.sort ?? true;
|
|
284458
284458
|
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
284459
|
-
${message.
|
|
284459
|
+
${message.sort(
|
|
284460
|
+
sort ? (a2, b) => !a2 && !b ? 0 : !a2 ? 1 : !b ? -1 : String(a2).localeCompare(String(b)) : void 0
|
|
284461
|
+
).map(
|
|
284460
284462
|
(item, index2) => ` ${prefix}> #${index2} = ${formatLogMessage(
|
|
284461
284463
|
item,
|
|
284462
284464
|
{ prefix: `${prefix}--`, skip: skip3, sort },
|
|
284463
284465
|
depth2 + 1
|
|
284464
284466
|
)}`
|
|
284465
284467
|
).join("\n")}` : typeof message === "object" ? `
|
|
284466
|
-
${Object.keys(message).filter(
|
|
284468
|
+
${Object.keys(message).filter(
|
|
284469
|
+
(key) => typeof key !== "string" || !skip3.map((k2) => k2.toLowerCase().trim()).includes(key.toLowerCase().trim())
|
|
284470
|
+
).sort(
|
|
284471
|
+
sort ? (a2, b) => !a2 && !b ? 0 : !a2 ? 1 : !b ? -1 : String(a2).localeCompare(String(b)) : void 0
|
|
284472
|
+
).map(
|
|
284467
284473
|
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? Object.keys(message[key]).filter(
|
|
284468
|
-
(key2) => !skip3.includes(key2)
|
|
284474
|
+
(key2) => typeof key2 !== "string" || !skip3.map((k2) => k2.toLowerCase().trim()).includes(key2.toLowerCase().trim())
|
|
284469
284475
|
).length === 0 ? "{}" : formatLogMessage(
|
|
284470
284476
|
message[key],
|
|
284471
284477
|
{ prefix: `${prefix}--`, skip: skip3, sort },
|
|
@@ -290438,7 +290444,7 @@ function findCompoundNode(root, word2, compoundCharacter, ignoreCasePrefix) {
|
|
|
290438
290444
|
const compoundPrefix = compoundCharacter || ignoreCasePrefix;
|
|
290439
290445
|
const possibleCompoundPrefix = ignoreCasePrefix && compoundCharacter ? ignoreCasePrefix + compoundCharacter : "";
|
|
290440
290446
|
const nw = word2.normalize();
|
|
290441
|
-
const
|
|
290447
|
+
const w3 = [...nw];
|
|
290442
290448
|
function determineRoot(s) {
|
|
290443
290449
|
const prefix = s.compoundPrefix;
|
|
290444
290450
|
let r = root;
|
|
@@ -290460,7 +290466,7 @@ function findCompoundNode(root, word2, compoundCharacter, ignoreCasePrefix) {
|
|
|
290460
290466
|
let node;
|
|
290461
290467
|
while (true) {
|
|
290462
290468
|
const s = stack[i2];
|
|
290463
|
-
const h =
|
|
290469
|
+
const h = w3[i2++];
|
|
290464
290470
|
const n = s.cr || s.n;
|
|
290465
290471
|
const c = h && n?.get(h) || void 0;
|
|
290466
290472
|
if (c && i2 < word2.length) {
|
|
@@ -290517,11 +290523,11 @@ function isEndOfWordNode(n) {
|
|
|
290517
290523
|
return !!n?.eow;
|
|
290518
290524
|
}
|
|
290519
290525
|
function walk(root, word2) {
|
|
290520
|
-
const
|
|
290526
|
+
const w3 = [...word2];
|
|
290521
290527
|
let n = root;
|
|
290522
290528
|
let i2 = 0;
|
|
290523
|
-
while (n && i2 <
|
|
290524
|
-
const h =
|
|
290529
|
+
while (n && i2 < w3.length) {
|
|
290530
|
+
const h = w3[i2++];
|
|
290525
290531
|
n = n.get(h);
|
|
290526
290532
|
}
|
|
290527
290533
|
return n;
|
|
@@ -290532,15 +290538,15 @@ function findLegacyCompoundNode(roots, word2, minCompoundLength) {
|
|
|
290532
290538
|
const stack = [
|
|
290533
290539
|
{ n: root, usedRoots: 1, subLength: 0, isCompound: false, cr: void 0, caseMatched: true }
|
|
290534
290540
|
];
|
|
290535
|
-
const
|
|
290536
|
-
const wLen =
|
|
290541
|
+
const w3 = word2;
|
|
290542
|
+
const wLen = w3.length;
|
|
290537
290543
|
let compoundUsed = false;
|
|
290538
290544
|
let caseMatched = true;
|
|
290539
290545
|
let i2 = 0;
|
|
290540
290546
|
let node;
|
|
290541
290547
|
while (true) {
|
|
290542
290548
|
const s = stack[i2];
|
|
290543
|
-
const h =
|
|
290549
|
+
const h = w3[i2++];
|
|
290544
290550
|
const n = s.cr || s.n;
|
|
290545
290551
|
const c = n?.get(h);
|
|
290546
290552
|
if (c && i2 < wLen) {
|
|
@@ -291609,7 +291615,7 @@ function suggestionCollector(wordToMatch, options) {
|
|
|
291609
291615
|
const sugs = /* @__PURE__ */ new Map();
|
|
291610
291616
|
let maxCost = BASE_COST * Math.min(wordToMatch.length * MAX_ALLOWED_COST_SCALE, changeLimit);
|
|
291611
291617
|
const useSeparator = compoundSeparator || (weightMap ? DEFAULT_COMPOUNDED_WORD_SEPARATOR : defaultSuggestionCollectorOptions.compoundSeparator);
|
|
291612
|
-
const fnCleanWord = !useSeparator || useSeparator === compoundSeparator ? (
|
|
291618
|
+
const fnCleanWord = !useSeparator || useSeparator === compoundSeparator ? (w3) => w3 : replaceAllFactory(useSeparator, "");
|
|
291613
291619
|
if (useSeparator && weightMap) {
|
|
291614
291620
|
addDefToWeightMap(weightMap, { map: useSeparator, insDel: 50 });
|
|
291615
291621
|
}
|
|
@@ -291637,7 +291643,7 @@ function suggestionCollector(wordToMatch, options) {
|
|
|
291637
291643
|
function adjustCost(sug) {
|
|
291638
291644
|
if (sug.isPreferred) return sug;
|
|
291639
291645
|
const words = sug.word.split(regexSeparator);
|
|
291640
|
-
const extraCost = words.map((
|
|
291646
|
+
const extraCost = words.map((w3) => wordLengthCost[w3.length] || 0).reduce((a2, b) => a2 + b, 0) + (words.length - 1) * EXTRA_WORD_COST;
|
|
291641
291647
|
return { word: sug.word, cost: sug.cost + extraCost };
|
|
291642
291648
|
}
|
|
291643
291649
|
function collectSuggestion(suggestion) {
|
|
@@ -293619,8 +293625,8 @@ var FastTrieBlobBuilder = class _FastTrieBlobBuilder {
|
|
|
293619
293625
|
return this._insert(word2);
|
|
293620
293626
|
}
|
|
293621
293627
|
const words = word2;
|
|
293622
|
-
for (const
|
|
293623
|
-
this._insert(
|
|
293628
|
+
for (const w3 of words) {
|
|
293629
|
+
this._insert(w3);
|
|
293624
293630
|
}
|
|
293625
293631
|
return this;
|
|
293626
293632
|
}
|
|
@@ -293983,7 +293989,7 @@ var ITrieImpl = class _ITrieImpl {
|
|
|
293983
293989
|
const compoundChar = this.info.compoundCharacter;
|
|
293984
293990
|
const subNodes = pipeSync(
|
|
293985
293991
|
n ? iteratorTrieWords(n) : [],
|
|
293986
|
-
opFilterSync((
|
|
293992
|
+
opFilterSync((w3) => w3[w3.length - 1] !== compoundChar),
|
|
293987
293993
|
opMapSync((suffix) => text + suffix)
|
|
293988
293994
|
);
|
|
293989
293995
|
return pipeSync(n && n.eow ? [text] : [], opAppendSync(subNodes));
|
|
@@ -294009,8 +294015,8 @@ var ITrieImpl = class _ITrieImpl {
|
|
|
294009
294015
|
const adjWord = sep8 ? replaceAllFactory(sep8, "") : (a2) => a2;
|
|
294010
294016
|
const optFilter = options.filter;
|
|
294011
294017
|
const filter6 = optFilter ? (word2, cost) => {
|
|
294012
|
-
const
|
|
294013
|
-
return !this.isForbiddenWord(
|
|
294018
|
+
const w3 = adjWord(word2);
|
|
294019
|
+
return !this.isForbiddenWord(w3) && optFilter(w3, cost);
|
|
294014
294020
|
} : (word2) => !this.isForbiddenWord(adjWord(word2));
|
|
294015
294021
|
const opts = { ...options, filter: filter6, weightMap };
|
|
294016
294022
|
return suggestAStar(this.data, text, opts);
|
|
@@ -294253,11 +294259,11 @@ function isEndOfWordNode2(n) {
|
|
|
294253
294259
|
return n?.f === FLAG_WORD;
|
|
294254
294260
|
}
|
|
294255
294261
|
function walk3(root, word2) {
|
|
294256
|
-
const
|
|
294262
|
+
const w3 = [...word2];
|
|
294257
294263
|
let n = root;
|
|
294258
294264
|
let i2 = 0;
|
|
294259
|
-
while (n && i2 <
|
|
294260
|
-
const h =
|
|
294265
|
+
while (n && i2 < w3.length) {
|
|
294266
|
+
const h = w3[i2++];
|
|
294261
294267
|
n = n.c?.[h];
|
|
294262
294268
|
}
|
|
294263
294269
|
return n;
|
|
@@ -296043,8 +296049,8 @@ function createDictionaryLineParserMapper(options) {
|
|
|
296043
296049
|
if (!stripCaseAndAccentsOnForbidden) {
|
|
296044
296050
|
doNotNormalizePrefix[forbidden] = true;
|
|
296045
296051
|
}
|
|
296046
|
-
function removeDoublePrefix(
|
|
296047
|
-
return
|
|
296052
|
+
function removeDoublePrefix(w3) {
|
|
296053
|
+
return w3.startsWith(ignoreCase2 + ignoreCase2) ? w3.slice(1) : w3;
|
|
296048
296054
|
}
|
|
296049
296055
|
function stripKeepCasePrefixAndQuotes(word2) {
|
|
296050
296056
|
word2 = word2.replaceAll(/"(.*?)"/g, "$1");
|
|
@@ -296914,7 +296920,7 @@ function charsetToRepMap(charset, replaceWith = "") {
|
|
|
296914
296920
|
return charset.split("|").flatMap((chars) => [...expandCharacterSet(chars)]).map((char) => [char, replaceWith]);
|
|
296915
296921
|
}
|
|
296916
296922
|
function expandReplaceMap(repMap) {
|
|
296917
|
-
return repMap.flatMap(([from, replaceWith]) => from.split("|").map((
|
|
296923
|
+
return repMap.flatMap(([from, replaceWith]) => from.split("|").map((w3) => [w3, replaceWith]));
|
|
296918
296924
|
}
|
|
296919
296925
|
function createMapperRegExp(repMap) {
|
|
296920
296926
|
const filteredMap = repMap.filter(([match4, _2]) => !!match4);
|
|
@@ -297099,16 +297105,16 @@ var SpellingDictionaryFromTrie = class {
|
|
|
297099
297105
|
return findResult;
|
|
297100
297106
|
}
|
|
297101
297107
|
const forms2 = wordSearchForms(mWord, this.isDictionaryCaseSensitive, ignoreCase2);
|
|
297102
|
-
for (const
|
|
297103
|
-
const findResult2 = this.trie.findWord(
|
|
297108
|
+
for (const w3 of forms2) {
|
|
297109
|
+
const findResult2 = this.trie.findWord(w3, opts);
|
|
297104
297110
|
if (findResult2.found !== false) {
|
|
297105
297111
|
return findResult2;
|
|
297106
297112
|
}
|
|
297107
297113
|
}
|
|
297108
297114
|
if (useCompounds) {
|
|
297109
297115
|
const optsUseCompounds = { ...opts, useLegacyWordCompounds: useCompounds };
|
|
297110
|
-
for (const
|
|
297111
|
-
const findResult2 = this.trie.findWord(
|
|
297116
|
+
for (const w3 of forms2) {
|
|
297117
|
+
const findResult2 = this.trie.findWord(w3, optsUseCompounds);
|
|
297112
297118
|
if (findResult2.found !== false) {
|
|
297113
297119
|
return findResult2;
|
|
297114
297120
|
}
|
|
@@ -297149,8 +297155,8 @@ var SpellingDictionaryFromTrie = class {
|
|
|
297149
297155
|
if (this.options.noSuggest)
|
|
297150
297156
|
return;
|
|
297151
297157
|
const _compoundMethod = suggestOptions.compoundMethod ?? (this.options.useCompounds ? CompoundWordsMethod.JOIN_WORDS : CompoundWordsMethod.NONE);
|
|
297152
|
-
for (const
|
|
297153
|
-
this.trie.genSuggestions(impersonateCollector(collector,
|
|
297158
|
+
for (const w3 of wordSuggestForms(collector.word)) {
|
|
297159
|
+
this.trie.genSuggestions(impersonateCollector(collector, w3), _compoundMethod);
|
|
297154
297160
|
}
|
|
297155
297161
|
}
|
|
297156
297162
|
getErrors() {
|
|
@@ -297163,19 +297169,19 @@ function createSpellingDictionaryFromTrieFile(data, name3, source, options) {
|
|
|
297163
297169
|
}
|
|
297164
297170
|
function* outerWordForms(word2, mapWord) {
|
|
297165
297171
|
const sent = /* @__PURE__ */ new Set();
|
|
297166
|
-
let
|
|
297167
|
-
const ww =
|
|
297168
|
-
yield
|
|
297169
|
-
sent.add(
|
|
297170
|
-
|
|
297171
|
-
if (
|
|
297172
|
-
yield
|
|
297173
|
-
sent.add(
|
|
297174
|
-
}
|
|
297175
|
-
|
|
297176
|
-
if (
|
|
297177
|
-
yield
|
|
297178
|
-
sent.add(
|
|
297172
|
+
let w3 = word2;
|
|
297173
|
+
const ww = w3;
|
|
297174
|
+
yield w3;
|
|
297175
|
+
sent.add(w3);
|
|
297176
|
+
w3 = word2.normalize("NFC");
|
|
297177
|
+
if (w3 !== ww) {
|
|
297178
|
+
yield w3;
|
|
297179
|
+
sent.add(w3);
|
|
297180
|
+
}
|
|
297181
|
+
w3 = word2.normalize("NFD");
|
|
297182
|
+
if (w3 !== ww && !sent.has(w3)) {
|
|
297183
|
+
yield w3;
|
|
297184
|
+
sent.add(w3);
|
|
297179
297185
|
}
|
|
297180
297186
|
for (const f of sent) {
|
|
297181
297187
|
for (const m2 of mapWord(f)) {
|
|
@@ -297685,7 +297691,7 @@ function createFlagWordsDictionary(wordList, name3, source) {
|
|
|
297685
297691
|
}
|
|
297686
297692
|
var regExpCleanIgnore = /^(!!)+/;
|
|
297687
297693
|
function buildTrieDict(words, name3, source) {
|
|
297688
|
-
const trie = buildITrieFromWords(pipeSync(words, opMapSync((
|
|
297694
|
+
const trie = buildITrieFromWords(pipeSync(words, opMapSync((w3) => "!" + w3), opMapSync((w3) => w3.replace(regExpCleanIgnore, ""))));
|
|
297689
297695
|
return new FlagWordsDictionaryTrie(trie, name3, source);
|
|
297690
297696
|
}
|
|
297691
297697
|
function bisect(values, predicate) {
|
|
@@ -297716,7 +297722,7 @@ var IgnoreWordsDictionary = class {
|
|
|
297716
297722
|
this.name = name3;
|
|
297717
297723
|
this.source = source;
|
|
297718
297724
|
this.dict = new Set(words);
|
|
297719
|
-
this.dictNonStrict = new Set(pipeSync(this.dict, opFilterSync((
|
|
297725
|
+
this.dictNonStrict = new Set(pipeSync(this.dict, opFilterSync((w3) => w3.startsWith("~")), opMapSync((w3) => w3.slice(1))));
|
|
297720
297726
|
}
|
|
297721
297727
|
/**
|
|
297722
297728
|
* A Forbidden word list does not "have" valid words.
|
|
@@ -297777,7 +297783,7 @@ var createCache3 = createAutoResolveWeakCache();
|
|
|
297777
297783
|
function createIgnoreWordsDictionary(wordList, name3, source) {
|
|
297778
297784
|
return createCache3.get(wordList, () => {
|
|
297779
297785
|
const testSpecialCharacters = /[*+]/;
|
|
297780
|
-
const words = [...parseDictionaryLines(wordList, { stripCaseAndAccents: true })].map((
|
|
297786
|
+
const words = [...parseDictionaryLines(wordList, { stripCaseAndAccents: true })].map((w3) => w3.normalize(NormalizeForm));
|
|
297781
297787
|
const hasSpecial = words.some((word2) => testSpecialCharacters.test(word2));
|
|
297782
297788
|
if (hasSpecial) {
|
|
297783
297789
|
return createSpellingDictionary(words, name3, source, {
|
|
@@ -297793,8 +297799,8 @@ function createIgnoreWordsDictionary(wordList, name3, source) {
|
|
|
297793
297799
|
|
|
297794
297800
|
// ../../node_modules/.pnpm/cspell-dictionary@8.19.4/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryCollection.js
|
|
297795
297801
|
init_esm_shims();
|
|
297796
|
-
function identityString(
|
|
297797
|
-
return
|
|
297802
|
+
function identityString(w3) {
|
|
297803
|
+
return w3;
|
|
297798
297804
|
}
|
|
297799
297805
|
var SpellingDictionaryCollectionImpl = class {
|
|
297800
297806
|
dictionaries;
|
|
@@ -303241,7 +303247,7 @@ var LIB;
|
|
|
303241
303247
|
}
|
|
303242
303248
|
static parse(t2, e2 = false) {
|
|
303243
303249
|
const r2 = u4.exec(t2);
|
|
303244
|
-
return r2 ? new d2(r2[2] || c,
|
|
303250
|
+
return r2 ? new d2(r2[2] || c, w3(r2[4] || c), w3(r2[5] || c), w3(r2[7] || c), w3(r2[9] || c), e2) : new d2(c, c, c, c, c);
|
|
303245
303251
|
}
|
|
303246
303252
|
static file(t2) {
|
|
303247
303253
|
let e2 = c;
|
|
@@ -303344,7 +303350,7 @@ var LIB;
|
|
|
303344
303350
|
}
|
|
303345
303351
|
}
|
|
303346
303352
|
const A2 = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
|
|
303347
|
-
function
|
|
303353
|
+
function w3(t2) {
|
|
303348
303354
|
return t2.match(A2) ? t2.replace(A2, ((t3) => C3(t3))) : t2;
|
|
303349
303355
|
}
|
|
303350
303356
|
var x = r(975);
|
|
@@ -305117,9 +305123,9 @@ var ImplCSpellConfigFile = class extends CSpellConfigFile {
|
|
|
305117
305123
|
addWords(words) {
|
|
305118
305124
|
if (this.readonly)
|
|
305119
305125
|
throw new Error(`Config file is readonly: ${this.url.href}`);
|
|
305120
|
-
const
|
|
305121
|
-
this.settings.words =
|
|
305122
|
-
addUniqueWordsToListAndSort(
|
|
305126
|
+
const w3 = this.settings.words || [];
|
|
305127
|
+
this.settings.words = w3;
|
|
305128
|
+
addUniqueWordsToListAndSort(w3, words);
|
|
305123
305129
|
return this;
|
|
305124
305130
|
}
|
|
305125
305131
|
};
|
|
@@ -309732,29 +309738,29 @@ function lineValidatorFactory(sDict, options) {
|
|
|
309732
309738
|
annotateIsFlagged(issue2);
|
|
309733
309739
|
if (!isFlaggedOrMinLength(issue2))
|
|
309734
309740
|
continue;
|
|
309735
|
-
for (const
|
|
309736
|
-
mismatches.push(
|
|
309741
|
+
for (const w3 of checkFullWord(issue2)) {
|
|
309742
|
+
mismatches.push(w3);
|
|
309737
309743
|
}
|
|
309738
309744
|
}
|
|
309739
309745
|
if (!mismatches.length)
|
|
309740
309746
|
return mismatches;
|
|
309741
309747
|
const hexSequences = !ignoreRandomStrings ? [] : extractHexSequences(possibleWord.text, MIN_HEX_SEQUENCE_LENGTH2).filter(
|
|
309742
309748
|
// Only consider hex sequences that are all upper case or all lower case and contain a `-` or a digit.
|
|
309743
|
-
(
|
|
309744
|
-
).map((
|
|
309749
|
+
(w3) => (w3.text === w3.text.toLowerCase() || w3.text === w3.text.toUpperCase()) && /[\d-]/.test(w3.text)
|
|
309750
|
+
).map((w3) => (w3.offset += possibleWord.offset, w3));
|
|
309745
309751
|
if (hexSequences.length) {
|
|
309746
309752
|
mismatches = filterExcludedTextOffsets(mismatches, hexSequences);
|
|
309747
309753
|
}
|
|
309748
309754
|
if (mismatches.length) {
|
|
309749
309755
|
const splitResult = split(lineSegment.segment, possibleWord.offset, splitterIsValid);
|
|
309750
|
-
const nonMatching = splitResult.words.filter((
|
|
309751
|
-
const m2 =
|
|
309756
|
+
const nonMatching = splitResult.words.filter((w3) => !w3.isFound).filter((w3) => {
|
|
309757
|
+
const m2 = w3.text.match(regExUpperCaseWithTrailingCommonEnglishSuffix);
|
|
309752
309758
|
if (!m2)
|
|
309753
309759
|
return true;
|
|
309754
|
-
const v2 = checkWord({ ...
|
|
309760
|
+
const v2 = checkWord({ ...w3, text: m2[1], line: lineSegment.line });
|
|
309755
309761
|
return v2.isFlagged || !v2.isFound;
|
|
309756
309762
|
});
|
|
309757
|
-
const filtered = filterExcludedTextOffsets(nonMatching.map((
|
|
309763
|
+
const filtered = filterExcludedTextOffsets(nonMatching.map((w3) => ({ ...w3, line: lineSegment.line })).map(annotateIsFlagged), hexSequences);
|
|
309758
309764
|
if (filtered.length < mismatches.length) {
|
|
309759
309765
|
return filtered;
|
|
309760
309766
|
}
|
|
@@ -309971,7 +309977,7 @@ function traceWord(word2, dictCollection, config2) {
|
|
|
309971
309977
|
};
|
|
309972
309978
|
const splits = split({ text: word2, offset: 0 }, 0, checkWord);
|
|
309973
309979
|
const wfSplits = splits.words.map((s) => ({ word: s.text, found: s.isFound }));
|
|
309974
|
-
const unique2 = uniqueFn((
|
|
309980
|
+
const unique2 = uniqueFn((w3) => w3.word + "|" + w3.found);
|
|
309975
309981
|
const wsFound = { word: word2, found: dictCollection.has(word2, opts) };
|
|
309976
309982
|
const wordSplits = wfSplits.some((s) => s.word === word2) ? wfSplits : [wsFound, ...wfSplits];
|
|
309977
309983
|
const traces = wordSplits.filter(unique2).map((s) => s.word).flatMap((word3) => dictCollection.dictionaries.map((dict) => ({ dict, word: word3 }))).map(({ dict, word: word3 }) => ({ dict, findResult: dict.find(word3, opts), word: word3 })).flatMap((r2) => unpackDictionaryFindResult(r2, config2));
|
|
@@ -311103,7 +311109,7 @@ function formatQuickFix(io, issue2) {
|
|
|
311103
311109
|
const preferred = issue2.suggestionsEx.filter((sug) => sug.isPreferred).map((sug) => sug.wordAdjustedToMatchCase || sug.word);
|
|
311104
311110
|
if (!preferred.length)
|
|
311105
311111
|
return "";
|
|
311106
|
-
const fixes = preferred.map((
|
|
311112
|
+
const fixes = preferred.map((w3) => io.chalk.italic(io.chalk.yellow(w3)));
|
|
311107
311113
|
return `fix: (${fixes.join(", ")})`;
|
|
311108
311114
|
}
|
|
311109
311115
|
function substitute(text, substitutions) {
|
|
@@ -330245,22 +330251,21 @@ import { fileURLToPath as fileURLToPath26 } from "node:url";
|
|
|
330245
330251
|
// ../../node_modules/.pnpm/path-scurry@2.0.2/node_modules/path-scurry/dist/esm/index.js
|
|
330246
330252
|
init_esm_shims();
|
|
330247
330253
|
|
|
330248
|
-
// ../../node_modules/.pnpm/lru-cache@11.
|
|
330254
|
+
// ../../node_modules/.pnpm/lru-cache@11.4.0/node_modules/lru-cache/dist/esm/node/index.min.js
|
|
330249
330255
|
init_esm_shims();
|
|
330250
|
-
import { tracingChannel as
|
|
330251
|
-
var
|
|
330252
|
-
var W =
|
|
330256
|
+
import { tracingChannel as j, channel as G } from "node:diagnostics_channel";
|
|
330257
|
+
var w2 = G("lru-cache:metrics");
|
|
330258
|
+
var W = j("lru-cache");
|
|
330253
330259
|
var C2 = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
330254
|
-
var D = () =>
|
|
330255
|
-
var
|
|
330260
|
+
var D = () => w2.hasSubscribers || W.hasSubscribers;
|
|
330261
|
+
var I2 = /* @__PURE__ */ new Set();
|
|
330256
330262
|
var L2 = typeof process == "object" && process ? process : {};
|
|
330257
330263
|
var P2 = (u4, e, t, i2) => {
|
|
330258
330264
|
typeof L2.emitWarning == "function" ? L2.emitWarning(u4, e, t, i2) : console.error(`[${t}] ${e}: ${u4}`);
|
|
330259
330265
|
};
|
|
330260
|
-
var H = (u4) => !
|
|
330261
|
-
var
|
|
330262
|
-
var
|
|
330263
|
-
var j = (u4) => F2(u4) ? u4 <= Math.pow(2, 8) ? Uint8Array : u4 <= Math.pow(2, 16) ? Uint16Array : u4 <= Math.pow(2, 32) ? Uint32Array : u4 <= Number.MAX_SAFE_INTEGER ? O : null : null;
|
|
330266
|
+
var H = (u4) => !I2.has(u4);
|
|
330267
|
+
var T2 = (u4) => !!u4 && u4 === Math.floor(u4) && u4 > 0 && isFinite(u4);
|
|
330268
|
+
var U2 = (u4) => T2(u4) ? u4 <= Math.pow(2, 8) ? Uint8Array : u4 <= Math.pow(2, 16) ? Uint16Array : u4 <= Math.pow(2, 32) ? Uint32Array : u4 <= Number.MAX_SAFE_INTEGER ? O : null : null;
|
|
330264
330269
|
var O = class extends Array {
|
|
330265
330270
|
constructor(e) {
|
|
330266
330271
|
super(e), this.fill(0);
|
|
@@ -330271,7 +330276,7 @@ var R2 = class u2 {
|
|
|
330271
330276
|
length;
|
|
330272
330277
|
static #o = false;
|
|
330273
330278
|
static create(e) {
|
|
330274
|
-
let t =
|
|
330279
|
+
let t = U2(e);
|
|
330275
330280
|
if (!t) return [];
|
|
330276
330281
|
u2.#o = true;
|
|
330277
330282
|
let i2 = new u2(e, t);
|
|
@@ -330290,12 +330295,12 @@ var R2 = class u2 {
|
|
|
330290
330295
|
};
|
|
330291
330296
|
var M = class u3 {
|
|
330292
330297
|
#o;
|
|
330293
|
-
#
|
|
330298
|
+
#c;
|
|
330294
330299
|
#w;
|
|
330295
|
-
#
|
|
330300
|
+
#O;
|
|
330296
330301
|
#S;
|
|
330297
330302
|
#M;
|
|
330298
|
-
#
|
|
330303
|
+
#I;
|
|
330299
330304
|
#m;
|
|
330300
330305
|
get perf() {
|
|
330301
330306
|
return this.#m;
|
|
@@ -330320,9 +330325,9 @@ var M = class u3 {
|
|
|
330320
330325
|
#s;
|
|
330321
330326
|
#i;
|
|
330322
330327
|
#t;
|
|
330323
|
-
#a;
|
|
330324
|
-
#c;
|
|
330325
330328
|
#l;
|
|
330329
|
+
#u;
|
|
330330
|
+
#a;
|
|
330326
330331
|
#h;
|
|
330327
330332
|
#y;
|
|
330328
330333
|
#r;
|
|
@@ -330331,12 +330336,12 @@ var M = class u3 {
|
|
|
330331
330336
|
#d;
|
|
330332
330337
|
#g;
|
|
330333
330338
|
#T;
|
|
330334
|
-
#
|
|
330339
|
+
#U;
|
|
330335
330340
|
#f;
|
|
330336
|
-
#
|
|
330341
|
+
#x;
|
|
330337
330342
|
static unsafeExposeInternals(e) {
|
|
330338
|
-
return { starts: e.#F, ttls: e.#d, autopurgeTimers: e.#g, sizes: e.#_, keyMap: e.#s, keyList: e.#i, valList: e.#t, next: e.#
|
|
330339
|
-
return e.#
|
|
330343
|
+
return { starts: e.#F, ttls: e.#d, autopurgeTimers: e.#g, sizes: e.#_, keyMap: e.#s, keyList: e.#i, valList: e.#t, next: e.#l, prev: e.#u, get head() {
|
|
330344
|
+
return e.#a;
|
|
330340
330345
|
}, get tail() {
|
|
330341
330346
|
return e.#h;
|
|
330342
330347
|
}, free: e.#y, isBackgroundFetch: (t) => e.#e(t), backgroundFetch: (t, i2, s, n) => e.#P(t, i2, s, n), moveToTail: (t) => e.#L(t), indexes: (t) => e.#A(t), rindexes: (t) => e.#z(t), isStale: (t) => e.#p(t) };
|
|
@@ -330345,7 +330350,7 @@ var M = class u3 {
|
|
|
330345
330350
|
return this.#o;
|
|
330346
330351
|
}
|
|
330347
330352
|
get maxSize() {
|
|
330348
|
-
return this.#
|
|
330353
|
+
return this.#c;
|
|
330349
330354
|
}
|
|
330350
330355
|
get calculatedSize() {
|
|
330351
330356
|
return this.#b;
|
|
@@ -330357,42 +330362,42 @@ var M = class u3 {
|
|
|
330357
330362
|
return this.#M;
|
|
330358
330363
|
}
|
|
330359
330364
|
get memoMethod() {
|
|
330360
|
-
return this.#
|
|
330365
|
+
return this.#I;
|
|
330361
330366
|
}
|
|
330362
330367
|
get dispose() {
|
|
330363
330368
|
return this.#w;
|
|
330364
330369
|
}
|
|
330365
330370
|
get onInsert() {
|
|
330366
|
-
return this.#
|
|
330371
|
+
return this.#O;
|
|
330367
330372
|
}
|
|
330368
330373
|
get disposeAfter() {
|
|
330369
330374
|
return this.#S;
|
|
330370
330375
|
}
|
|
330371
330376
|
constructor(e) {
|
|
330372
|
-
let { max: t = 0, ttl: i2, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet:
|
|
330377
|
+
let { max: t = 0, ttl: i2, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: r, updateAgeOnHas: h, allowStale: a2, dispose: o, onInsert: p, disposeAfter: m2, noDisposeOnSet: _2, noUpdateTTL: c, maxSize: d2 = 0, maxEntrySize: f = 0, sizeCalculation: y2, fetchMethod: l, memoMethod: S2, noDeleteOnFetchRejection: F2, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: g2, allowStaleOnFetchAbort: A2, ignoreFetchAbort: z, perf: x } = e;
|
|
330373
330378
|
if (x !== void 0 && typeof x?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
330374
|
-
if (this.#m = x ?? C2, t !== 0 && !
|
|
330375
|
-
let
|
|
330376
|
-
if (!
|
|
330377
|
-
if (this.#o = t, this.#
|
|
330378
|
-
if (!this.#
|
|
330379
|
+
if (this.#m = x ?? C2, t !== 0 && !T2(t)) throw new TypeError("max option must be a nonnegative integer");
|
|
330380
|
+
let E = t ? U2(t) : Array;
|
|
330381
|
+
if (!E) throw new Error("invalid max value: " + t);
|
|
330382
|
+
if (this.#o = t, this.#c = d2, this.maxEntrySize = f || this.#c, this.sizeCalculation = y2, this.sizeCalculation) {
|
|
330383
|
+
if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
330379
330384
|
if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
|
|
330380
330385
|
}
|
|
330381
|
-
if (
|
|
330382
|
-
if (this.#
|
|
330383
|
-
if (this.#M =
|
|
330384
|
-
if (this.#
|
|
330385
|
-
if (!
|
|
330386
|
+
if (S2 !== void 0 && typeof S2 != "function") throw new TypeError("memoMethod must be a function if defined");
|
|
330387
|
+
if (this.#I = S2, l !== void 0 && typeof l != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
330388
|
+
if (this.#M = l, this.#U = !!l, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: t }).fill(void 0), this.#t = Array.from({ length: t }).fill(void 0), this.#l = new E(t), this.#u = new E(t), this.#a = 0, this.#h = 0, this.#y = R2.create(t), this.#n = 0, this.#b = 0, typeof o == "function" && (this.#w = o), typeof p == "function" && (this.#O = p), typeof m2 == "function" ? (this.#S = m2, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#w, this.#x = !!this.#O, this.#f = !!this.#S, this.noDisposeOnSet = !!_2, this.noUpdateTTL = !!c, this.noDeleteOnFetchRejection = !!F2, this.allowStaleOnFetchRejection = !!g2, this.allowStaleOnFetchAbort = !!A2, this.ignoreFetchAbort = !!z, this.maxEntrySize !== 0) {
|
|
330389
|
+
if (this.#c !== 0 && !T2(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
330390
|
+
if (!T2(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
330386
330391
|
this.#X();
|
|
330387
330392
|
}
|
|
330388
|
-
if (this.allowStale = !!
|
|
330389
|
-
if (!
|
|
330393
|
+
if (this.allowStale = !!a2, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!r, this.updateAgeOnHas = !!h, this.ttlResolution = T2(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i2 || 0, this.ttl) {
|
|
330394
|
+
if (!T2(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
330390
330395
|
this.#H();
|
|
330391
330396
|
}
|
|
330392
|
-
if (this.#o === 0 && this.ttl === 0 && this.#
|
|
330393
|
-
if (!this.ttlAutopurge && !this.#o && !this.#
|
|
330394
|
-
let
|
|
330395
|
-
H(
|
|
330397
|
+
if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
330398
|
+
if (!this.ttlAutopurge && !this.#o && !this.#c) {
|
|
330399
|
+
let v2 = "LRU_CACHE_UNBOUNDED";
|
|
330400
|
+
H(v2) && (I2.add(v2), P2("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", v2, u3));
|
|
330396
330401
|
}
|
|
330397
330402
|
}
|
|
330398
330403
|
getRemainingTTL(e) {
|
|
@@ -330402,53 +330407,53 @@ var M = class u3 {
|
|
|
330402
330407
|
let e = new O(this.#o), t = new O(this.#o);
|
|
330403
330408
|
this.#d = e, this.#F = t;
|
|
330404
330409
|
let i2 = this.ttlAutopurge ? Array.from({ length: this.#o }) : void 0;
|
|
330405
|
-
this.#g = i2, this.#N = (
|
|
330406
|
-
t[
|
|
330407
|
-
}, this.#D = (
|
|
330408
|
-
t[
|
|
330409
|
-
};
|
|
330410
|
-
let s = this.ttlAutopurge ? (
|
|
330411
|
-
if (i2?.[
|
|
330412
|
-
let
|
|
330413
|
-
this.#p(
|
|
330414
|
-
},
|
|
330415
|
-
|
|
330410
|
+
this.#g = i2, this.#N = (h, a2, o = this.#m.now()) => {
|
|
330411
|
+
t[h] = a2 !== 0 ? o : 0, e[h] = a2, s(h, a2);
|
|
330412
|
+
}, this.#D = (h) => {
|
|
330413
|
+
t[h] = e[h] !== 0 ? this.#m.now() : 0, s(h, e[h]);
|
|
330414
|
+
};
|
|
330415
|
+
let s = this.ttlAutopurge ? (h, a2) => {
|
|
330416
|
+
if (i2?.[h] && (clearTimeout(i2[h]), i2[h] = void 0), a2 && a2 !== 0 && i2) {
|
|
330417
|
+
let o = setTimeout(() => {
|
|
330418
|
+
this.#p(h) && this.#E(this.#i[h], "expire");
|
|
330419
|
+
}, a2 + 1);
|
|
330420
|
+
o.unref && o.unref(), i2[h] = o;
|
|
330416
330421
|
}
|
|
330417
330422
|
} : () => {
|
|
330418
330423
|
};
|
|
330419
|
-
this.#
|
|
330420
|
-
if (e[
|
|
330421
|
-
let
|
|
330422
|
-
if (!
|
|
330423
|
-
|
|
330424
|
-
let
|
|
330425
|
-
|
|
330424
|
+
this.#v = (h, a2) => {
|
|
330425
|
+
if (e[a2]) {
|
|
330426
|
+
let o = e[a2], p = t[a2];
|
|
330427
|
+
if (!o || !p) return;
|
|
330428
|
+
h.ttl = o, h.start = p, h.now = n || r();
|
|
330429
|
+
let m2 = h.now - p;
|
|
330430
|
+
h.remainingTTL = o - m2;
|
|
330426
330431
|
}
|
|
330427
330432
|
};
|
|
330428
|
-
let n = 0,
|
|
330429
|
-
let
|
|
330433
|
+
let n = 0, r = () => {
|
|
330434
|
+
let h = this.#m.now();
|
|
330430
330435
|
if (this.ttlResolution > 0) {
|
|
330431
|
-
n =
|
|
330432
|
-
let
|
|
330433
|
-
|
|
330436
|
+
n = h;
|
|
330437
|
+
let a2 = setTimeout(() => n = 0, this.ttlResolution);
|
|
330438
|
+
a2.unref && a2.unref();
|
|
330434
330439
|
}
|
|
330435
|
-
return
|
|
330440
|
+
return h;
|
|
330436
330441
|
};
|
|
330437
|
-
this.getRemainingTTL = (
|
|
330438
|
-
let
|
|
330439
|
-
if (
|
|
330440
|
-
let
|
|
330441
|
-
if (!
|
|
330442
|
-
let
|
|
330443
|
-
return
|
|
330444
|
-
}, this.#p = (
|
|
330445
|
-
let
|
|
330446
|
-
return !!
|
|
330442
|
+
this.getRemainingTTL = (h) => {
|
|
330443
|
+
let a2 = this.#s.get(h);
|
|
330444
|
+
if (a2 === void 0) return 0;
|
|
330445
|
+
let o = e[a2], p = t[a2];
|
|
330446
|
+
if (!o || !p) return 1 / 0;
|
|
330447
|
+
let m2 = (n || r()) - p;
|
|
330448
|
+
return o - m2;
|
|
330449
|
+
}, this.#p = (h) => {
|
|
330450
|
+
let a2 = t[h], o = e[h];
|
|
330451
|
+
return !!o && !!a2 && (n || r()) - a2 > o;
|
|
330447
330452
|
};
|
|
330448
330453
|
}
|
|
330449
330454
|
#D = () => {
|
|
330450
330455
|
};
|
|
330451
|
-
#
|
|
330456
|
+
#v = () => {
|
|
330452
330457
|
};
|
|
330453
330458
|
#N = () => {
|
|
330454
330459
|
};
|
|
@@ -330457,16 +330462,16 @@ var M = class u3 {
|
|
|
330457
330462
|
let e = new O(this.#o);
|
|
330458
330463
|
this.#b = 0, this.#_ = e, this.#R = (t) => {
|
|
330459
330464
|
this.#b -= e[t], e[t] = 0;
|
|
330460
|
-
}, this.#
|
|
330465
|
+
}, this.#V = (t, i2, s, n) => {
|
|
330461
330466
|
if (this.#e(i2)) return 0;
|
|
330462
|
-
if (!
|
|
330467
|
+
if (!T2(s)) if (n) {
|
|
330463
330468
|
if (typeof n != "function") throw new TypeError("sizeCalculation must be a function");
|
|
330464
|
-
if (s = n(i2, t), !
|
|
330469
|
+
if (s = n(i2, t), !T2(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
330465
330470
|
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
330466
330471
|
return s;
|
|
330467
|
-
}, this.#
|
|
330468
|
-
if (e[t] = i2, this.#
|
|
330469
|
-
let n = this.#
|
|
330472
|
+
}, this.#j = (t, i2, s) => {
|
|
330473
|
+
if (e[t] = i2, this.#c) {
|
|
330474
|
+
let n = this.#c - e[t];
|
|
330470
330475
|
for (; this.#b > n; ) this.#G(true);
|
|
330471
330476
|
}
|
|
330472
330477
|
this.#b += e[t], s && (s.entrySize = i2, s.totalCalculatedSize = this.#b);
|
|
@@ -330474,19 +330479,19 @@ var M = class u3 {
|
|
|
330474
330479
|
}
|
|
330475
330480
|
#R = (e) => {
|
|
330476
330481
|
};
|
|
330477
|
-
#
|
|
330482
|
+
#j = (e, t, i2) => {
|
|
330478
330483
|
};
|
|
330479
|
-
#
|
|
330484
|
+
#V = (e, t, i2, s) => {
|
|
330480
330485
|
if (i2 || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
330481
330486
|
return 0;
|
|
330482
330487
|
};
|
|
330483
330488
|
*#A({ allowStale: e = this.allowStale } = {}) {
|
|
330484
|
-
if (this.#n) for (let t = this.#h; this.#
|
|
330489
|
+
if (this.#n) for (let t = this.#h; this.#B(t) && ((e || !this.#p(t)) && (yield t), t !== this.#a); ) t = this.#u[t];
|
|
330485
330490
|
}
|
|
330486
330491
|
*#z({ allowStale: e = this.allowStale } = {}) {
|
|
330487
|
-
if (this.#n) for (let t = this.#
|
|
330492
|
+
if (this.#n) for (let t = this.#a; this.#B(t) && ((e || !this.#p(t)) && (yield t), t !== this.#h); ) t = this.#l[t];
|
|
330488
330493
|
}
|
|
330489
|
-
#
|
|
330494
|
+
#B(e) {
|
|
330490
330495
|
return e !== void 0 && this.#s.get(this.#i[e]) === e;
|
|
330491
330496
|
}
|
|
330492
330497
|
*entries() {
|
|
@@ -330537,7 +330542,7 @@ var M = class u3 {
|
|
|
330537
330542
|
}
|
|
330538
330543
|
purgeStale() {
|
|
330539
330544
|
let e = false;
|
|
330540
|
-
for (let t of this.#z({ allowStale: true })) this.#p(t) && (this.#
|
|
330545
|
+
for (let t of this.#z({ allowStale: true })) this.#p(t) && (this.#E(this.#i[t], "expire"), e = true);
|
|
330541
330546
|
return e;
|
|
330542
330547
|
}
|
|
330543
330548
|
info(e) {
|
|
@@ -330547,10 +330552,10 @@ var M = class u3 {
|
|
|
330547
330552
|
if (s === void 0) return;
|
|
330548
330553
|
let n = { value: s };
|
|
330549
330554
|
if (this.#d && this.#F) {
|
|
330550
|
-
let
|
|
330551
|
-
if (
|
|
330552
|
-
let
|
|
330553
|
-
n.ttl =
|
|
330555
|
+
let r = this.#d[t], h = this.#F[t];
|
|
330556
|
+
if (r && h) {
|
|
330557
|
+
let a2 = r - (this.#m.now() - h);
|
|
330558
|
+
n.ttl = a2, n.start = Date.now();
|
|
330554
330559
|
}
|
|
330555
330560
|
}
|
|
330556
330561
|
return this.#_ && (n.size = this.#_[t]), n;
|
|
@@ -330560,13 +330565,13 @@ var M = class u3 {
|
|
|
330560
330565
|
for (let t of this.#A({ allowStale: true })) {
|
|
330561
330566
|
let i2 = this.#i[t], s = this.#t[t], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
330562
330567
|
if (n === void 0 || i2 === void 0) continue;
|
|
330563
|
-
let
|
|
330568
|
+
let r = { value: n };
|
|
330564
330569
|
if (this.#d && this.#F) {
|
|
330565
|
-
|
|
330566
|
-
let
|
|
330567
|
-
|
|
330570
|
+
r.ttl = this.#d[t];
|
|
330571
|
+
let h = this.#m.now() - this.#F[t];
|
|
330572
|
+
r.start = Math.floor(Date.now() - h);
|
|
330568
330573
|
}
|
|
330569
|
-
this.#_ && (
|
|
330574
|
+
this.#_ && (r.size = this.#_[t]), e.unshift([i2, r]);
|
|
330570
330575
|
}
|
|
330571
330576
|
return e;
|
|
330572
330577
|
}
|
|
@@ -330577,51 +330582,49 @@ var M = class u3 {
|
|
|
330577
330582
|
let s = Date.now() - i2.start;
|
|
330578
330583
|
i2.start = this.#m.now() - s;
|
|
330579
330584
|
}
|
|
330580
|
-
this.#
|
|
330585
|
+
this.#W(t, i2.value, i2);
|
|
330581
330586
|
}
|
|
330582
330587
|
}
|
|
330583
330588
|
set(e, t, i2 = {}) {
|
|
330584
|
-
let { status: s =
|
|
330585
|
-
i2.status = s, s && (s.op = "set", s.key = e, t !== void 0 && (s.value = t));
|
|
330586
|
-
let n = this.#
|
|
330587
|
-
return s &&
|
|
330588
|
-
}
|
|
330589
|
-
#
|
|
330590
|
-
let { ttl:
|
|
330591
|
-
if (t === void 0) return
|
|
330592
|
-
let { noUpdateTTL:
|
|
330593
|
-
|
|
330594
|
-
let
|
|
330595
|
-
if (this.maxEntrySize &&
|
|
330596
|
-
let
|
|
330597
|
-
if (
|
|
330589
|
+
let { status: s = w2.hasSubscribers ? {} : void 0 } = i2;
|
|
330590
|
+
i2.status = s, s && (s.op = "set", s.key = e, t !== void 0 && (s.value = t), s.cache = this);
|
|
330591
|
+
let n = this.#W(e, t, i2);
|
|
330592
|
+
return s && w2.hasSubscribers && w2.publish(s), n;
|
|
330593
|
+
}
|
|
330594
|
+
#W(e, t, i2, s) {
|
|
330595
|
+
let { ttl: n = this.ttl, start: r, noDisposeOnSet: h = this.noDisposeOnSet, sizeCalculation: a2 = this.sizeCalculation, status: o } = i2;
|
|
330596
|
+
if (t === void 0) return o && (o.set = "deleted"), this.delete(e), this;
|
|
330597
|
+
let { noUpdateTTL: p = this.noUpdateTTL } = i2, m2 = this.#e(t);
|
|
330598
|
+
o && !m2 && (o.value = t);
|
|
330599
|
+
let _2 = this.#V(e, t, i2.size || 0, a2, o);
|
|
330600
|
+
if (this.maxEntrySize && _2 > this.maxEntrySize) return this.#E(e, "set"), o && (o.set = "miss", o.maxEntrySizeExceeded = true), this;
|
|
330601
|
+
let c = this.#n === 0 ? void 0 : this.#s.get(e);
|
|
330602
|
+
if (c === void 0) c = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(false) : this.#n, this.#i[c] = e, this.#t[c] = t, this.#s.set(e, c), this.#l[this.#h] = c, this.#u[c] = this.#h, this.#h = c, this.#n++, this.#j(c, _2, o), o && (o.set = "add"), p = false, this.#x && !m2 && this.#O?.(t, e, "add");
|
|
330598
330603
|
else {
|
|
330599
|
-
this.#L(
|
|
330600
|
-
let
|
|
330601
|
-
if (t !==
|
|
330602
|
-
if (
|
|
330603
|
-
|
|
330604
|
-
let { __staleWhileFetching:
|
|
330605
|
-
|
|
330606
|
-
} else
|
|
330607
|
-
if (this.#R(
|
|
330608
|
-
|
|
330609
|
-
|
|
330610
|
-
|
|
330611
|
-
|
|
330612
|
-
|
|
330613
|
-
|
|
330614
|
-
|
|
330615
|
-
|
|
330616
|
-
let g2 = this.#r, p;
|
|
330617
|
-
for (; p = g2?.shift(); ) this.#S?.(...p);
|
|
330604
|
+
this.#L(c);
|
|
330605
|
+
let d2 = this.#t[c];
|
|
330606
|
+
if (t !== d2) {
|
|
330607
|
+
if (!h) if (this.#e(d2)) {
|
|
330608
|
+
d2 !== s && d2.__abortController.abort(new Error("replaced"));
|
|
330609
|
+
let { __staleWhileFetching: f } = d2;
|
|
330610
|
+
f !== void 0 && f !== t && (this.#T && this.#w?.(f, e, "set"), this.#f && this.#r?.push([f, e, "set"]));
|
|
330611
|
+
} else this.#T && this.#w?.(d2, e, "set"), this.#f && this.#r?.push([d2, e, "set"]);
|
|
330612
|
+
if (this.#R(c), this.#j(c, _2, o), this.#t[c] = t, !m2) {
|
|
330613
|
+
let f = d2 && this.#e(d2) ? d2.__staleWhileFetching : d2, y2 = f === void 0 ? "add" : t !== f ? "replace" : "update";
|
|
330614
|
+
o && (o.set = y2, f !== void 0 && (o.oldValue = f)), this.#x && this.onInsert?.(t, e, y2);
|
|
330615
|
+
}
|
|
330616
|
+
} else m2 || (o && (o.set = "update"), this.#x && this.onInsert?.(t, e, "update"));
|
|
330617
|
+
}
|
|
330618
|
+
if (n !== 0 && !this.#d && this.#H(), this.#d && (p || this.#N(c, n, r), o && this.#v(o, c)), !h && this.#f && this.#r) {
|
|
330619
|
+
let d2 = this.#r, f;
|
|
330620
|
+
for (; f = d2?.shift(); ) this.#S?.(...f);
|
|
330618
330621
|
}
|
|
330619
330622
|
return this;
|
|
330620
330623
|
}
|
|
330621
330624
|
pop() {
|
|
330622
330625
|
try {
|
|
330623
330626
|
for (; this.#n; ) {
|
|
330624
|
-
let e = this.#t[this.#
|
|
330627
|
+
let e = this.#t[this.#a];
|
|
330625
330628
|
if (this.#G(true), this.#e(e)) {
|
|
330626
330629
|
if (e.__staleWhileFetching) return e.__staleWhileFetching;
|
|
330627
330630
|
} else if (e !== void 0) return e;
|
|
@@ -330634,30 +330637,32 @@ var M = class u3 {
|
|
|
330634
330637
|
}
|
|
330635
330638
|
}
|
|
330636
330639
|
#G(e) {
|
|
330637
|
-
let t = this.#
|
|
330638
|
-
|
|
330640
|
+
let t = this.#a, i2 = this.#i[t], s = this.#t[t], n = this.#e(s);
|
|
330641
|
+
n && s.__abortController.abort(new Error("evicted"));
|
|
330642
|
+
let r = n ? s.__staleWhileFetching : s;
|
|
330643
|
+
return (this.#T || this.#f) && r !== void 0 && (this.#T && this.#w?.(r, i2, "evict"), this.#f && this.#r?.push([r, i2, "evict"])), this.#R(t), this.#g?.[t] && (clearTimeout(this.#g[t]), this.#g[t] = void 0), e && (this.#i[t] = void 0, this.#t[t] = void 0, this.#y.push(t)), this.#n === 1 ? (this.#a = this.#h = 0, this.#y.length = 0) : this.#a = this.#l[t], this.#s.delete(i2), this.#n--, t;
|
|
330639
330644
|
}
|
|
330640
330645
|
has(e, t = {}) {
|
|
330641
|
-
let { status: i2 =
|
|
330642
|
-
t.status = i2, i2 && (i2.op = "has", i2.key = e);
|
|
330646
|
+
let { status: i2 = w2.hasSubscribers ? {} : void 0 } = t;
|
|
330647
|
+
t.status = i2, i2 && (i2.op = "has", i2.key = e, i2.cache = this);
|
|
330643
330648
|
let s = this.#Y(e, t);
|
|
330644
|
-
return
|
|
330649
|
+
return w2.hasSubscribers && w2.publish(i2), s;
|
|
330645
330650
|
}
|
|
330646
330651
|
#Y(e, t = {}) {
|
|
330647
330652
|
let { updateAgeOnHas: i2 = this.updateAgeOnHas, status: s } = t, n = this.#s.get(e);
|
|
330648
330653
|
if (n !== void 0) {
|
|
330649
|
-
let
|
|
330650
|
-
if (this.#e(
|
|
330651
|
-
if (this.#p(n)) s && (s.has = "stale", this.#
|
|
330652
|
-
else return i2 && this.#D(n), s && (s.has = "hit", this.#
|
|
330654
|
+
let r = this.#t[n];
|
|
330655
|
+
if (this.#e(r) && r.__staleWhileFetching === void 0) return false;
|
|
330656
|
+
if (this.#p(n)) s && (s.has = "stale", this.#v(s, n));
|
|
330657
|
+
else return i2 && this.#D(n), s && (s.has = "hit", this.#v(s, n)), true;
|
|
330653
330658
|
} else s && (s.has = "miss");
|
|
330654
330659
|
return false;
|
|
330655
330660
|
}
|
|
330656
330661
|
peek(e, t = {}) {
|
|
330657
330662
|
let { status: i2 = D() ? {} : void 0 } = t;
|
|
330658
|
-
i2 && (i2.op = "peek", i2.key = e), t.status = i2;
|
|
330663
|
+
i2 && (i2.op = "peek", i2.key = e, i2.cache = this), t.status = i2;
|
|
330659
330664
|
let s = this.#J(e, t);
|
|
330660
|
-
return
|
|
330665
|
+
return w2.hasSubscribers && w2.publish(i2), s;
|
|
330661
330666
|
}
|
|
330662
330667
|
#J(e, t) {
|
|
330663
330668
|
let { status: i2, allowStale: s = this.allowStale } = t, n = this.#s.get(e);
|
|
@@ -330665,63 +330670,63 @@ var M = class u3 {
|
|
|
330665
330670
|
i2 && (i2.peek = n === void 0 ? "miss" : "stale");
|
|
330666
330671
|
return;
|
|
330667
330672
|
}
|
|
330668
|
-
let
|
|
330669
|
-
return i2 && (
|
|
330673
|
+
let r = this.#t[n], h = this.#e(r) ? r.__staleWhileFetching : r;
|
|
330674
|
+
return i2 && (h !== void 0 ? (i2.peek = "hit", i2.value = h) : i2.peek = "miss"), h;
|
|
330670
330675
|
}
|
|
330671
330676
|
#P(e, t, i2, s) {
|
|
330672
330677
|
let n = t === void 0 ? void 0 : this.#t[t];
|
|
330673
330678
|
if (this.#e(n)) return n;
|
|
330674
|
-
let
|
|
330675
|
-
|
|
330676
|
-
let
|
|
330677
|
-
let { aborted:
|
|
330678
|
-
if (i2.status && (
|
|
330679
|
-
let b =
|
|
330680
|
-
return (
|
|
330681
|
-
},
|
|
330682
|
-
let { aborted:
|
|
330683
|
-
if (this.#t[t] ===
|
|
330684
|
-
if (
|
|
330685
|
-
},
|
|
330686
|
-
let
|
|
330687
|
-
|
|
330688
|
-
(!i2.ignoreFetchAbort || i2.allowStaleOnFetchAbort) && (
|
|
330689
|
-
});
|
|
330679
|
+
let r = new AbortController(), { signal: h } = i2;
|
|
330680
|
+
h?.addEventListener("abort", () => r.abort(h.reason), { signal: r.signal });
|
|
330681
|
+
let a2 = { signal: r.signal, options: i2, context: s }, o = (f, y2 = false) => {
|
|
330682
|
+
let { aborted: l } = r.signal, S2 = i2.ignoreFetchAbort && f !== void 0, F2 = i2.ignoreFetchAbort || !!(i2.allowStaleOnFetchAbort && f !== void 0);
|
|
330683
|
+
if (i2.status && (l && !y2 ? (i2.status.fetchAborted = true, i2.status.fetchError = r.signal.reason, S2 && (i2.status.fetchAbortIgnored = true)) : i2.status.fetchResolved = true), l && !S2 && !y2) return m2(r.signal.reason, F2);
|
|
330684
|
+
let b = c, g2 = this.#t[t];
|
|
330685
|
+
return (g2 === c || g2 === void 0 && S2 && y2) && (f === void 0 ? b.__staleWhileFetching !== void 0 ? this.#t[t] = b.__staleWhileFetching : this.#E(e, "fetch") : (i2.status && (i2.status.fetchUpdated = true), this.#W(e, f, a2.options, b))), f;
|
|
330686
|
+
}, p = (f) => (i2.status && (i2.status.fetchRejected = true, i2.status.fetchError = f), m2(f, false)), m2 = (f, y2) => {
|
|
330687
|
+
let { aborted: l } = r.signal, S2 = l && i2.allowStaleOnFetchAbort, F2 = S2 || i2.allowStaleOnFetchRejection, b = F2 || i2.noDeleteOnFetchRejection, g2 = c;
|
|
330688
|
+
if (this.#t[t] === c && (!b || !y2 && g2.__staleWhileFetching === void 0 ? this.#E(e, "fetch") : S2 || (this.#t[t] = g2.__staleWhileFetching)), F2) return i2.status && g2.__staleWhileFetching !== void 0 && (i2.status.returnedStale = true), g2.__staleWhileFetching;
|
|
330689
|
+
if (g2.__returned === g2) throw f;
|
|
330690
|
+
}, _2 = (f, y2) => {
|
|
330691
|
+
let l = this.#M?.(e, n, a2);
|
|
330692
|
+
r.signal.addEventListener("abort", () => {
|
|
330693
|
+
(!i2.ignoreFetchAbort || i2.allowStaleOnFetchAbort) && (f(void 0), i2.allowStaleOnFetchAbort && (f = (S2) => o(S2, true)));
|
|
330694
|
+
}), l && l instanceof Promise ? l.then((S2) => f(S2 === void 0 ? void 0 : S2), y2) : l !== void 0 && f(l);
|
|
330690
330695
|
};
|
|
330691
330696
|
i2.status && (i2.status.fetchDispatched = true);
|
|
330692
|
-
let
|
|
330693
|
-
return t === void 0 ? (this.#
|
|
330697
|
+
let c = new Promise(_2).then(o, p), d2 = Object.assign(c, { __abortController: r, __staleWhileFetching: n, __returned: void 0 });
|
|
330698
|
+
return t === void 0 ? (this.#W(e, d2, { ...a2.options, status: void 0 }), t = this.#s.get(e)) : this.#t[t] = d2, d2;
|
|
330694
330699
|
}
|
|
330695
330700
|
#e(e) {
|
|
330696
|
-
if (!this.#
|
|
330701
|
+
if (!this.#U) return false;
|
|
330697
330702
|
let t = e;
|
|
330698
330703
|
return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof AbortController;
|
|
330699
330704
|
}
|
|
330700
330705
|
fetch(e, t = {}) {
|
|
330701
330706
|
let i2 = W.hasSubscribers, { status: s = D() ? {} : void 0 } = t;
|
|
330702
330707
|
t.status = s, s && t.context && (s.context = t.context);
|
|
330703
|
-
let n = this.#
|
|
330708
|
+
let n = this.#k(e, t);
|
|
330704
330709
|
return s && i2 && (s.trace = true, W.tracePromise(() => n, s).catch(() => {
|
|
330705
330710
|
})), n;
|
|
330706
330711
|
}
|
|
330707
|
-
async #
|
|
330708
|
-
let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl:
|
|
330709
|
-
if (
|
|
330710
|
-
let
|
|
330712
|
+
async #k(e, t = {}) {
|
|
330713
|
+
let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: r = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a2 = 0, sizeCalculation: o = this.sizeCalculation, noUpdateTTL: p = this.noUpdateTTL, noDeleteOnFetchRejection: m2 = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: _2 = this.allowStaleOnFetchRejection, ignoreFetchAbort: c = this.ignoreFetchAbort, allowStaleOnFetchAbort: d2 = this.allowStaleOnFetchAbort, context: f, forceRefresh: y2 = false, status: l, signal: S2 } = t;
|
|
330714
|
+
if (l && (l.op = "fetch", l.key = e, y2 && (l.forceRefresh = true), l.cache = this), !this.#U) return l && (l.fetch = "get"), this.#C(e, { allowStale: i2, updateAgeOnGet: s, noDeleteOnStaleGet: n, status: l });
|
|
330715
|
+
let F2 = { allowStale: i2, updateAgeOnGet: s, noDeleteOnStaleGet: n, ttl: r, noDisposeOnSet: h, size: a2, sizeCalculation: o, noUpdateTTL: p, noDeleteOnFetchRejection: m2, allowStaleOnFetchRejection: _2, allowStaleOnFetchAbort: d2, ignoreFetchAbort: c, status: l, signal: S2 }, b = this.#s.get(e);
|
|
330711
330716
|
if (b === void 0) {
|
|
330712
|
-
|
|
330713
|
-
let
|
|
330714
|
-
return
|
|
330717
|
+
l && (l.fetch = "miss");
|
|
330718
|
+
let g2 = this.#P(e, b, F2, f);
|
|
330719
|
+
return g2.__returned = g2;
|
|
330715
330720
|
} else {
|
|
330716
|
-
let
|
|
330717
|
-
if (this.#e(
|
|
330718
|
-
let
|
|
330719
|
-
return
|
|
330721
|
+
let g2 = this.#t[b];
|
|
330722
|
+
if (this.#e(g2)) {
|
|
330723
|
+
let v2 = i2 && g2.__staleWhileFetching !== void 0;
|
|
330724
|
+
return l && (l.fetch = "inflight", v2 && (l.returnedStale = true)), v2 ? g2.__staleWhileFetching : g2.__returned = g2;
|
|
330720
330725
|
}
|
|
330721
330726
|
let A2 = this.#p(b);
|
|
330722
|
-
if (!y2 && !A2) return
|
|
330723
|
-
let z = this.#P(e, b,
|
|
330724
|
-
return
|
|
330727
|
+
if (!y2 && !A2) return l && (l.fetch = "hit"), this.#L(b), s && this.#D(b), l && this.#v(l, b), g2;
|
|
330728
|
+
let z = this.#P(e, b, F2, f), E = z.__staleWhileFetching !== void 0 && i2;
|
|
330729
|
+
return l && (l.fetch = A2 ? "stale" : "refresh", E && A2 && (l.returnedStale = true)), E ? z.__staleWhileFetching : z.__returned = z;
|
|
330725
330730
|
}
|
|
330726
330731
|
}
|
|
330727
330732
|
forceFetch(e, t = {}) {
|
|
@@ -330732,52 +330737,52 @@ var M = class u3 {
|
|
|
330732
330737
|
})), n;
|
|
330733
330738
|
}
|
|
330734
330739
|
async #K(e, t = {}) {
|
|
330735
|
-
let i2 = await this.#
|
|
330740
|
+
let i2 = await this.#k(e, t);
|
|
330736
330741
|
if (i2 === void 0) throw new Error("fetch() returned undefined");
|
|
330737
330742
|
return i2;
|
|
330738
330743
|
}
|
|
330739
330744
|
memo(e, t = {}) {
|
|
330740
|
-
let { status: i2 =
|
|
330741
|
-
t.status = i2, i2 && (i2.op = "memo", i2.key = e, t.context && (i2.context = t.context));
|
|
330745
|
+
let { status: i2 = w2.hasSubscribers ? {} : void 0 } = t;
|
|
330746
|
+
t.status = i2, i2 && (i2.op = "memo", i2.key = e, t.context && (i2.context = t.context), i2.cache = this);
|
|
330742
330747
|
let s = this.#Q(e, t);
|
|
330743
|
-
return i2 && (i2.value = s),
|
|
330748
|
+
return i2 && (i2.value = s), w2.hasSubscribers && w2.publish(i2), s;
|
|
330744
330749
|
}
|
|
330745
330750
|
#Q(e, t = {}) {
|
|
330746
|
-
let i2 = this.#
|
|
330751
|
+
let i2 = this.#I;
|
|
330747
330752
|
if (!i2) throw new Error("no memoMethod provided to constructor");
|
|
330748
|
-
let { context: s, status: n, forceRefresh:
|
|
330749
|
-
n &&
|
|
330750
|
-
let
|
|
330751
|
-
if (n && (n.memo =
|
|
330752
|
-
let
|
|
330753
|
-
return n && (n.value =
|
|
330753
|
+
let { context: s, status: n, forceRefresh: r, ...h } = t;
|
|
330754
|
+
n && r && (n.forceRefresh = true);
|
|
330755
|
+
let a2 = this.#C(e, h), o = r || a2 === void 0;
|
|
330756
|
+
if (n && (n.memo = o ? "miss" : "hit", o || (n.value = a2)), !o) return a2;
|
|
330757
|
+
let p = i2(e, a2, { options: h, context: s });
|
|
330758
|
+
return n && (n.value = p), this.#W(e, p, h), p;
|
|
330754
330759
|
}
|
|
330755
330760
|
get(e, t = {}) {
|
|
330756
|
-
let { status: i2 =
|
|
330757
|
-
t.status = i2, i2 && (i2.op = "get", i2.key = e);
|
|
330761
|
+
let { status: i2 = w2.hasSubscribers ? {} : void 0 } = t;
|
|
330762
|
+
t.status = i2, i2 && (i2.op = "get", i2.key = e, i2.cache = this);
|
|
330758
330763
|
let s = this.#C(e, t);
|
|
330759
|
-
return i2 && (s !== void 0 && (i2.value = s),
|
|
330764
|
+
return i2 && (s !== void 0 && (i2.value = s), w2.hasSubscribers && w2.publish(i2)), s;
|
|
330760
330765
|
}
|
|
330761
330766
|
#C(e, t = {}) {
|
|
330762
|
-
let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status:
|
|
330763
|
-
if (
|
|
330764
|
-
|
|
330767
|
+
let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: r } = t, h = this.#s.get(e);
|
|
330768
|
+
if (h === void 0) {
|
|
330769
|
+
r && (r.get = "miss");
|
|
330765
330770
|
return;
|
|
330766
330771
|
}
|
|
330767
|
-
let
|
|
330768
|
-
return
|
|
330772
|
+
let a2 = this.#t[h], o = this.#e(a2);
|
|
330773
|
+
return r && this.#v(r, h), this.#p(h) ? o ? (r && (r.get = "stale-fetching"), i2 && a2.__staleWhileFetching !== void 0 ? (r && (r.returnedStale = true), a2.__staleWhileFetching) : void 0) : (n || this.#E(e, "expire"), r && (r.get = "stale"), i2 ? (r && (r.returnedStale = true), a2) : void 0) : (r && (r.get = o ? "fetching" : "hit"), this.#L(h), s && this.#D(h), o ? a2.__staleWhileFetching : a2);
|
|
330769
330774
|
}
|
|
330770
330775
|
#$(e, t) {
|
|
330771
|
-
this.#
|
|
330776
|
+
this.#u[t] = e, this.#l[e] = t;
|
|
330772
330777
|
}
|
|
330773
330778
|
#L(e) {
|
|
330774
|
-
e !== this.#h && (e === this.#
|
|
330779
|
+
e !== this.#h && (e === this.#a ? this.#a = this.#l[e] : this.#$(this.#u[e], this.#l[e]), this.#$(this.#h, e), this.#h = e);
|
|
330775
330780
|
}
|
|
330776
330781
|
delete(e) {
|
|
330777
|
-
return this.#
|
|
330782
|
+
return this.#E(e, "delete");
|
|
330778
330783
|
}
|
|
330779
|
-
#
|
|
330780
|
-
|
|
330784
|
+
#E(e, t) {
|
|
330785
|
+
w2.hasSubscribers && w2.publish({ op: "delete", delete: t, key: e, cache: this });
|
|
330781
330786
|
let i2 = false;
|
|
330782
330787
|
if (this.#n !== 0) {
|
|
330783
330788
|
let s = this.#s.get(e);
|
|
@@ -330785,13 +330790,13 @@ var M = class u3 {
|
|
|
330785
330790
|
else {
|
|
330786
330791
|
this.#R(s);
|
|
330787
330792
|
let n = this.#t[s];
|
|
330788
|
-
if (this.#e(n) ? n.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(n, e, t), this.#f && this.#r?.push([n, e, t])), this.#s.delete(e), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#
|
|
330789
|
-
else if (s === this.#
|
|
330793
|
+
if (this.#e(n) ? n.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(n, e, t), this.#f && this.#r?.push([n, e, t])), this.#s.delete(e), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#u[s];
|
|
330794
|
+
else if (s === this.#a) this.#a = this.#l[s];
|
|
330790
330795
|
else {
|
|
330791
|
-
let
|
|
330792
|
-
this.#
|
|
330793
|
-
let
|
|
330794
|
-
this.#
|
|
330796
|
+
let r = this.#u[s];
|
|
330797
|
+
this.#l[r] = this.#l[s];
|
|
330798
|
+
let h = this.#l[s];
|
|
330799
|
+
this.#u[h] = this.#u[s];
|
|
330795
330800
|
}
|
|
330796
330801
|
this.#n--, this.#y.push(s);
|
|
330797
330802
|
}
|
|
@@ -330819,7 +330824,7 @@ var M = class u3 {
|
|
|
330819
330824
|
for (let t of this.#g ?? []) t !== void 0 && clearTimeout(t);
|
|
330820
330825
|
this.#g?.fill(void 0);
|
|
330821
330826
|
}
|
|
330822
|
-
if (this.#_ && this.#_.fill(0), this.#
|
|
330827
|
+
if (this.#_ && this.#_.fill(0), this.#a = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
|
|
330823
330828
|
let t = this.#r, i2;
|
|
330824
330829
|
for (; i2 = t?.shift(); ) this.#S?.(...i2);
|
|
330825
330830
|
}
|
|
@@ -338452,7 +338457,7 @@ async function githubAppJwt({
|
|
|
338452
338457
|
};
|
|
338453
338458
|
}
|
|
338454
338459
|
|
|
338455
|
-
// ../../node_modules/.pnpm/toad-cache@3.7.
|
|
338460
|
+
// ../../node_modules/.pnpm/toad-cache@3.7.1/node_modules/toad-cache/dist/toad-cache.mjs
|
|
338456
338461
|
init_esm_shims();
|
|
338457
338462
|
var LruObject = class {
|
|
338458
338463
|
constructor(max4 = 1e3, ttlInMsecs = 0) {
|
|
@@ -341473,7 +341478,7 @@ async function upgradeDependency([name3, tag = "latest"]) {
|
|
|
341473
341478
|
var npmRequestLimit = (0, import_p_limit2.default)(40);
|
|
341474
341479
|
function getPackageInfo(pkgName) {
|
|
341475
341480
|
return npmRequestLimit(async () => {
|
|
341476
|
-
const getPackageJson = (await import("./package-json-
|
|
341481
|
+
const getPackageJson = (await import("./package-json-MWS5EBHM.js")).default;
|
|
341477
341482
|
return getPackageJson(pkgName, {
|
|
341478
341483
|
allVersions: true
|
|
341479
341484
|
});
|
|
@@ -342309,7 +342314,7 @@ toad-cache/dist/toad-cache.mjs:
|
|
|
342309
342314
|
(**
|
|
342310
342315
|
* toad-cache
|
|
342311
342316
|
*
|
|
342312
|
-
* @copyright
|
|
342317
|
+
* @copyright 2026 Igor Savin <kibertoad@gmail.com>
|
|
342313
342318
|
* @license MIT
|
|
342314
342319
|
* @version 3.7.0
|
|
342315
342320
|
*)
|