@prisma/internals 6.6.0-dev.24 → 6.6.0-dev.25
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/Generator.js +3 -3
- package/dist/WasmPanicRegistry.js +3 -3
- package/dist/{chunk-YXD4CJDK.js → chunk-23MPYLL6.js} +27 -27
- package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
- package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
- package/dist/{chunk-5SN5JBT2.js → chunk-2T4NJDHK.js} +22 -22
- package/dist/{chunk-7XNZDY2V.js → chunk-2WR3PY2L.js} +60 -60
- package/dist/{chunk-6TXVGFQA.js → chunk-4URMCTG6.js} +6 -6
- package/dist/{chunk-BVCREFE3.js → chunk-5UTAMENR.js} +9 -9
- package/dist/{chunk-OZ67AQ5E.js → chunk-64UA4UOO.js} +8 -8
- package/dist/{chunk-TZCE3PWZ.js → chunk-6TVEFPKE.js} +7 -7
- package/dist/{chunk-MGZOEY6N.js → chunk-72UZXEBG.js} +6 -6
- package/dist/{chunk-VRT7T6MF.js → chunk-BWGDP6B5.js} +94 -105
- package/dist/{chunk-7YOCMGWK.js → chunk-BXF4VTJQ.js} +5 -5
- package/dist/{chunk-ATFQZVBS.js → chunk-CCQRDM7X.js} +10 -11
- package/dist/{chunk-HFN2WZUJ.js → chunk-D6H2JDDL.js} +8 -8
- package/dist/{chunk-4PGRSJWB.js → chunk-DG6E4UCC.js} +18 -18
- package/dist/{chunk-PIPE5DSU.js → chunk-DGZO4GAJ.js} +6 -6
- package/dist/{chunk-ZYW3HGSH.js → chunk-DYVL6P7F.js} +7 -8
- package/dist/{chunk-77BIZNY2.js → chunk-EHJNNRXK.js} +18 -18
- package/dist/{chunk-NJQWZ447.js → chunk-EIERU2IM.js} +6 -6
- package/dist/{chunk-KTBNIQ7N.js → chunk-EORSBI5P.js} +8 -8
- package/dist/{chunk-77IC3DNO.js → chunk-ETNCBIDF.js} +8 -8
- package/dist/{chunk-CZL7DCL2.js → chunk-EWKNNPH2.js} +6 -6
- package/dist/{chunk-SHJNE6T7.js → chunk-F46BPOEO.js} +7 -7
- package/dist/{chunk-M7EVD7PF.js → chunk-FRH7ZI7P.js} +19 -19
- package/dist/{chunk-S57RMXZW.js → chunk-GHHABGYW.js} +5 -5
- package/dist/{chunk-JXWKKKDF.js → chunk-GQACUSUF.js} +319 -319
- package/dist/{chunk-CHMJ5V7I.js → chunk-H5XZKD22.js} +7 -7
- package/dist/{chunk-ONHKZPSV.js → chunk-IKQFIRRX.js} +6 -6
- package/dist/{chunk-AX46XUDV.js → chunk-IMI6TYQ4.js} +18 -18
- package/dist/{chunk-5Q4NYGQV.js → chunk-JFROJGHQ.js} +5 -5
- package/dist/{chunk-4E7A3GDU.js → chunk-KR25OQ6F.js} +5 -5
- package/dist/{chunk-XLGODPZH.js → chunk-KTB2HCCO.js} +10 -10
- package/dist/{chunk-C2WD2XUT.js → chunk-KYMYLH7F.js} +971 -988
- package/dist/{chunk-ZVRFFLZI.js → chunk-LE225BZ5.js} +5 -5
- package/dist/{chunk-I7IEEULS.js → chunk-LSYWDURQ.js} +5 -5
- package/dist/{chunk-AZNLB67U.js → chunk-MBB2KJWX.js} +5 -5
- package/dist/{chunk-3VBZ5DIO.js → chunk-MC6GX7HZ.js} +17 -17
- package/dist/{chunk-TATYN3T2.js → chunk-MM4PIVNT.js} +10 -10
- package/dist/{chunk-KQOJB3ZW.js → chunk-NLYH6XB4.js} +10 -10
- package/dist/{chunk-QKRZQKZ4.js → chunk-NM6AESCR.js} +5 -5
- package/dist/{chunk-5RV3EMX6.js → chunk-ORR3O5RU.js} +57 -57
- package/dist/{chunk-ZSBSOL5F.js → chunk-PG5DWXQ5.js} +319 -319
- package/dist/{chunk-Q22BLLK3.js → chunk-PORKIX5G.js} +6 -6
- package/dist/{chunk-ADLIKZEN.js → chunk-PS4DTKFB.js} +17 -17
- package/dist/{chunk-3LJ3PARU.js → chunk-QY3IYHB3.js} +19 -19
- package/dist/{chunk-FIFK6NVL.js → chunk-R2BUFXGK.js} +9 -9
- package/dist/{chunk-GXDYIY4M.js → chunk-RAYPCPVU.js} +56 -56
- package/dist/{chunk-Z5SL4ZNA.js → chunk-SU4VTBR6.js} +18 -18
- package/dist/{chunk-UNUCCAXA.js → chunk-SYCT2PLK.js} +5 -5
- package/dist/{chunk-Y3OWT3K2.js → chunk-T7EWI7A3.js} +7 -7
- package/dist/{chunk-ZKAW5JSN.js → chunk-UETN3RLH.js} +5 -5
- package/dist/{chunk-BGFWFIPR.js → chunk-UJ725NXW.js} +5 -5
- package/dist/{chunk-53LS3WUO.js → chunk-V37JTUKZ.js} +116 -116
- package/dist/{chunk-V2ZF7ETH.js → chunk-VLGS4WJI.js} +66 -68
- package/dist/{chunk-XLF2J4OH.js → chunk-VV44YB7T.js} +6 -6
- package/dist/{chunk-6HZ4Q3EX.js → chunk-VYDFN4XN.js} +5 -5
- package/dist/{chunk-5MCWLJSR.js → chunk-WEATFJ6G.js} +10 -10
- package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
- package/dist/{chunk-L6GBFCXG.js → chunk-XXDGZSJ4.js} +12 -12
- package/dist/{chunk-3ERIN7PH.js → chunk-YBYBY7QI.js} +8 -8
- package/dist/{chunk-2MWIMEFK.js → chunk-Z4ALPGAK.js} +6 -6
- package/dist/{chunk-3BND5XB4.js → chunk-ZCVVZ6U6.js} +11 -11
- package/dist/{chunk-PFLLVWZX.js → chunk-ZGAIRZ32.js} +5 -5
- package/dist/cli/Help.js +1 -1
- package/dist/cli/checkUnsupportedDataProxy.js +55 -55
- package/dist/cli/getGeneratorSuccessMessage.js +1 -1
- package/dist/cli/getSchema.js +59 -59
- package/dist/cli/getTypescriptVersion.js +1 -1
- package/dist/cli/hashes.js +55 -55
- package/dist/cli/utils.js +5 -5
- package/dist/client/getClientEngineType.js +1 -1
- package/dist/convertCredentials.js +1 -1
- package/dist/dotenvExpand.js +1 -1
- package/dist/engine-commands/errorHelpers.js +5 -5
- package/dist/engine-commands/formatSchema.js +54 -54
- package/dist/engine-commands/getConfig.js +15 -15
- package/dist/engine-commands/getDmmf.js +12 -12
- package/dist/engine-commands/getEngineVersion.js +10 -10
- package/dist/engine-commands/getEnginesMetaInfo.js +13 -13
- package/dist/engine-commands/index.js +65 -65
- package/dist/engine-commands/lintSchema.js +11 -11
- package/dist/engine-commands/mergeSchemas.js +12 -12
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/relativizePathInPSLError.js +1 -1
- package/dist/engine-commands/validate.js +12 -12
- package/dist/errorReporting.js +7 -7
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +54 -54
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +7 -7
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +54 -54
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js +1 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +1 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +55 -55
- package/dist/get-generators/getGenerators.js +57 -57
- package/dist/get-generators/utils/binaryTypeToEngineType.js +1 -1
- package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.js +1 -1
- package/dist/get-generators/utils/engineTypeToBinaryType.js +1 -1
- package/dist/get-generators/utils/fixBinaryTargets.js +1 -1
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/get-generators/utils/getEngineVersionForGenerator.js +1 -1
- package/dist/get-generators/utils/printGeneratorConfig.js +7 -7
- package/dist/getPackedPackage.js +9 -9
- package/dist/highlight/highlight.js +1 -1
- package/dist/highlight/languages/dml.js +1 -1
- package/dist/highlight/languages/sql.js +1 -1
- package/dist/highlight/prism.js +1 -1
- package/dist/highlight/theme.js +1 -1
- package/dist/index.js +113 -113
- package/dist/logger.js +9 -9
- package/dist/{multipart-parser-32AROPTR.js → multipart-parser-3E7JBBYS.js} +7 -7
- package/dist/panic.js +7 -7
- package/dist/resolveBinary.js +9 -9
- package/dist/resolveOutput.js +1 -1
- package/dist/schemaEngineCommands.js +12 -12
- package/dist/sendPanic.js +54 -54
- package/dist/utils/__tests__/isCi.test.js +1 -1
- package/dist/utils/__tests__/isInteractive.test.js +1 -1
- package/dist/utils/__tests__/maskSchema.test.js +1 -1
- package/dist/utils/assertAlways.js +1 -1
- package/dist/utils/assertNever.js +1 -1
- package/dist/utils/binaryTargetRegex.js +1 -1
- package/dist/utils/byline.js +1 -1
- package/dist/utils/callOnce.js +1 -1
- package/dist/utils/callOnce.test.js +1 -1
- package/dist/utils/canPrompt.js +1 -1
- package/dist/utils/chmodPlusX.js +1 -1
- package/dist/utils/cloudflareD1.js +4 -4
- package/dist/utils/drawBox.js +1 -1
- package/dist/utils/extractPreviewFeatures.js +1 -1
- package/dist/utils/formatTable.js +1 -1
- package/dist/utils/formatms.js +1 -1
- package/dist/utils/fs-functional.js +12 -12
- package/dist/utils/fs-utils.js +9 -9
- package/dist/utils/getCommandWithExecutor.js +4 -4
- package/dist/utils/getEnvPaths.js +54 -54
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getMigrateConfigDir.js +1 -1
- package/dist/utils/getVersionFromPackageJson.js +4 -4
- package/dist/utils/handleEngineLoadingErrors.js +1 -1
- package/dist/utils/handlePanic.js +54 -54
- package/dist/utils/hasOwnProperty.js +1 -1
- package/dist/utils/isCi.js +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +3 -3
- package/dist/utils/isInContainer.js +1 -1
- package/dist/utils/isInNpmLifecycleHook.js +1 -1
- package/dist/utils/isInteractive.js +1 -1
- package/dist/utils/isPromiseLike.js +1 -1
- package/dist/utils/isValidJsIdentifier.js +4 -4
- package/dist/utils/keyBy.js +1 -1
- package/dist/utils/link.js +3 -3
- package/dist/utils/load.js +3 -3
- package/dist/utils/loadEnvFile.js +54 -54
- package/dist/utils/mapKeys.js +1 -1
- package/dist/utils/mapObjectValues.js +1 -1
- package/dist/utils/maskSchema.js +1 -1
- package/dist/utils/max.js +1 -1
- package/dist/utils/max.test.js +1 -1
- package/dist/utils/maybeInGitHook.js +1 -1
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/utils/now.js +1 -1
- package/dist/utils/omit.js +1 -1
- package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.js +1 -1
- package/dist/utils/parseEnvValue.js +1 -1
- package/dist/utils/path.js +1 -1
- package/dist/utils/path.test.js +1 -1
- package/dist/utils/pick.js +1 -1
- package/dist/utils/printConfigWarnings.js +1 -1
- package/dist/utils/prismaPostgres.js +1 -1
- package/dist/utils/prismaPostgres.test.js +1 -1
- package/dist/utils/schemaFileInput.js +1 -1
- package/dist/utils/serializeQueryEngineName.js +1 -1
- package/dist/utils/setClassName.js +1 -1
- package/dist/utils/toSchemasContainer.js +1 -1
- package/dist/utils/tryLoadEnvs.js +6 -6
- package/dist/utils/unique.js +1 -1
- package/dist/utils/vercelPkgPathRegex.js +1 -1
- package/dist/warnOnce.js +4 -4
- package/dist/wasm.js +6 -6
- package/package.json +8 -8
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_KYMYLH7F_exports = {};
|
30
|
+
__export(chunk_KYMYLH7F_exports, {
|
31
31
|
getPackedPackage: () => getPackedPackage,
|
32
32
|
readPackageUp: () => readPackageUp,
|
33
33
|
require_glob: () => require_glob,
|
@@ -36,14 +36,14 @@ __export(chunk_C2WD2XUT_exports, {
|
|
36
36
|
require_p_map: () => require_p_map,
|
37
37
|
toPath: () => toPath2
|
38
38
|
});
|
39
|
-
module.exports = __toCommonJS(
|
40
|
-
var
|
41
|
-
var
|
42
|
-
var
|
43
|
-
var
|
44
|
-
var
|
45
|
-
var
|
46
|
-
var
|
39
|
+
module.exports = __toCommonJS(chunk_KYMYLH7F_exports);
|
40
|
+
var import_chunk_23MPYLL6 = require("./chunk-23MPYLL6.js");
|
41
|
+
var import_chunk_2R6DII47 = require("./chunk-2R6DII47.js");
|
42
|
+
var import_chunk_H5XZKD22 = require("./chunk-H5XZKD22.js");
|
43
|
+
var import_chunk_V37JTUKZ = require("./chunk-V37JTUKZ.js");
|
44
|
+
var import_chunk_KR25OQ6F = require("./chunk-KR25OQ6F.js");
|
45
|
+
var import_chunk_6TVEFPKE = require("./chunk-6TVEFPKE.js");
|
46
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
47
47
|
var import_fs = __toESM(require("fs"));
|
48
48
|
var import_path = __toESM(require("path"));
|
49
49
|
var import_node_path = __toESM(require("node:path"));
|
@@ -56,10 +56,10 @@ var import_node_fs2 = __toESM(require("node:fs"));
|
|
56
56
|
var import_promises2 = __toESM(require("node:fs/promises"));
|
57
57
|
var import_node_path3 = __toESM(require("node:path"));
|
58
58
|
var import_node_url2 = require("node:url");
|
59
|
-
var require_lib2 = (0,
|
59
|
+
var require_lib2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
60
60
|
"../../node_modules/.pnpm/npm-normalize-package-bin@2.0.0/node_modules/npm-normalize-package-bin/lib/index.js"(exports, module2) {
|
61
61
|
"use strict";
|
62
|
-
var { join, basename } = (0,
|
62
|
+
var { join, basename } = (0, import_chunk_2ESYSVXG.__require)("path");
|
63
63
|
var normalize = (pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg);
|
64
64
|
var normalizeString = (pkg) => {
|
65
65
|
if (!pkg.name) {
|
@@ -105,12 +105,12 @@ var require_lib2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
105
105
|
module2.exports = normalize;
|
106
106
|
}
|
107
107
|
});
|
108
|
-
var require_lib3 = (0,
|
108
|
+
var require_lib3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
109
109
|
"../../node_modules/.pnpm/npm-bundled@2.0.1/node_modules/npm-bundled/lib/index.js"(exports, module2) {
|
110
110
|
"use strict";
|
111
|
-
var fs4 = (0,
|
112
|
-
var path5 = (0,
|
113
|
-
var EE = (0,
|
111
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
112
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
113
|
+
var EE = (0, import_chunk_2ESYSVXG.__require)("events").EventEmitter;
|
114
114
|
var normalizePackageBin = require_lib2();
|
115
115
|
var BundleWalker = class _BundleWalker extends EE {
|
116
116
|
constructor(opt) {
|
@@ -315,14 +315,14 @@ var require_lib3 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
315
315
|
walk.BundleWalkerSync = BundleWalkerSync;
|
316
316
|
}
|
317
317
|
});
|
318
|
-
var require_path = (0,
|
318
|
+
var require_path = (0, import_chunk_2ESYSVXG.__commonJS)({
|
319
319
|
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports, module2) {
|
320
320
|
"use strict";
|
321
321
|
var isWindows = typeof process === "object" && process && process.platform === "win32";
|
322
322
|
module2.exports = isWindows ? { sep: "\\" } : { sep: "/" };
|
323
323
|
}
|
324
324
|
});
|
325
|
-
var require_balanced_match = (0,
|
325
|
+
var require_balanced_match = (0, import_chunk_2ESYSVXG.__commonJS)({
|
326
326
|
"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module2) {
|
327
327
|
"use strict";
|
328
328
|
module2.exports = balanced;
|
@@ -378,7 +378,7 @@ var require_balanced_match = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
378
378
|
}
|
379
379
|
}
|
380
380
|
});
|
381
|
-
var require_brace_expansion = (0,
|
381
|
+
var require_brace_expansion = (0, import_chunk_2ESYSVXG.__commonJS)({
|
382
382
|
"../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module2) {
|
383
383
|
"use strict";
|
384
384
|
var balanced = require_balanced_match();
|
@@ -527,7 +527,7 @@ var require_brace_expansion = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
527
527
|
}
|
528
528
|
}
|
529
529
|
});
|
530
|
-
var require_minimatch = (0,
|
530
|
+
var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
531
531
|
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports, module2) {
|
532
532
|
"use strict";
|
533
533
|
var minimatch = module2.exports = (p, pattern, options = {}) => {
|
@@ -1082,12 +1082,12 @@ var require_minimatch = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1082
1082
|
minimatch.Minimatch = Minimatch;
|
1083
1083
|
}
|
1084
1084
|
});
|
1085
|
-
var require_lib4 = (0,
|
1085
|
+
var require_lib4 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
1086
1086
|
"../../node_modules/.pnpm/ignore-walk@5.0.1/node_modules/ignore-walk/lib/index.js"(exports, module2) {
|
1087
1087
|
"use strict";
|
1088
|
-
var fs4 = (0,
|
1089
|
-
var path5 = (0,
|
1090
|
-
var EE = (0,
|
1088
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
1089
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
1090
|
+
var EE = (0, import_chunk_2ESYSVXG.__require)("events").EventEmitter;
|
1091
1091
|
var Minimatch = require_minimatch().Minimatch;
|
1092
1092
|
var Walker = class _Walker extends EE {
|
1093
1093
|
constructor(opts) {
|
@@ -1305,12 +1305,12 @@ var require_lib4 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1305
1305
|
walk.WalkerSync = WalkerSync;
|
1306
1306
|
}
|
1307
1307
|
});
|
1308
|
-
var require_old = (0,
|
1308
|
+
var require_old = (0, import_chunk_2ESYSVXG.__commonJS)({
|
1309
1309
|
"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports) {
|
1310
1310
|
"use strict";
|
1311
|
-
var pathModule = (0,
|
1311
|
+
var pathModule = (0, import_chunk_2ESYSVXG.__require)("path");
|
1312
1312
|
var isWindows = process.platform === "win32";
|
1313
|
-
var fs4 = (0,
|
1313
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
1314
1314
|
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
1315
1315
|
function rethrow() {
|
1316
1316
|
var callback;
|
@@ -1504,7 +1504,7 @@ var require_old = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1504
1504
|
};
|
1505
1505
|
}
|
1506
1506
|
});
|
1507
|
-
var require_fs = (0,
|
1507
|
+
var require_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
1508
1508
|
"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports, module2) {
|
1509
1509
|
"use strict";
|
1510
1510
|
module2.exports = realpath;
|
@@ -1513,7 +1513,7 @@ var require_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1513
1513
|
realpath.realpathSync = realpathSync;
|
1514
1514
|
realpath.monkeypatch = monkeypatch;
|
1515
1515
|
realpath.unmonkeypatch = unmonkeypatch;
|
1516
|
-
var fs4 = (0,
|
1516
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
1517
1517
|
var origRealpath = fs4.realpath;
|
1518
1518
|
var origRealpathSync = fs4.realpathSync;
|
1519
1519
|
var version = process.version;
|
@@ -1562,7 +1562,7 @@ var require_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1562
1562
|
}
|
1563
1563
|
}
|
1564
1564
|
});
|
1565
|
-
var require_inherits_browser = (0,
|
1565
|
+
var require_inherits_browser = (0, import_chunk_2ESYSVXG.__commonJS)({
|
1566
1566
|
"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports, module2) {
|
1567
1567
|
"use strict";
|
1568
1568
|
if (typeof Object.create === "function") {
|
@@ -1593,11 +1593,11 @@ var require_inherits_browser = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1593
1593
|
}
|
1594
1594
|
}
|
1595
1595
|
});
|
1596
|
-
var require_inherits = (0,
|
1596
|
+
var require_inherits = (0, import_chunk_2ESYSVXG.__commonJS)({
|
1597
1597
|
"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports, module2) {
|
1598
1598
|
"use strict";
|
1599
1599
|
try {
|
1600
|
-
util = (0,
|
1600
|
+
util = (0, import_chunk_2ESYSVXG.__require)("util");
|
1601
1601
|
if (typeof util.inherits !== "function") throw "";
|
1602
1602
|
module2.exports = util.inherits;
|
1603
1603
|
} catch (e) {
|
@@ -1606,7 +1606,7 @@ var require_inherits = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1606
1606
|
var util;
|
1607
1607
|
}
|
1608
1608
|
});
|
1609
|
-
var require_common = (0,
|
1609
|
+
var require_common = (0, import_chunk_2ESYSVXG.__commonJS)({
|
1610
1610
|
"../../node_modules/.pnpm/glob@8.1.0/node_modules/glob/common.js"(exports) {
|
1611
1611
|
"use strict";
|
1612
1612
|
exports.setopts = setopts;
|
@@ -1619,10 +1619,10 @@ var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1619
1619
|
function ownProp(obj, field) {
|
1620
1620
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
1621
1621
|
}
|
1622
|
-
var fs4 = (0,
|
1623
|
-
var path5 = (0,
|
1622
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
1623
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
1624
1624
|
var minimatch = require_minimatch();
|
1625
|
-
var isAbsolute = (0,
|
1625
|
+
var isAbsolute = (0, import_chunk_2ESYSVXG.__require)("path").isAbsolute;
|
1626
1626
|
var Minimatch = minimatch.Minimatch;
|
1627
1627
|
function alphasort(a, b) {
|
1628
1628
|
return a.localeCompare(b, "en");
|
@@ -1803,7 +1803,7 @@ var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1803
1803
|
}
|
1804
1804
|
}
|
1805
1805
|
});
|
1806
|
-
var require_sync = (0,
|
1806
|
+
var require_sync = (0, import_chunk_2ESYSVXG.__commonJS)({
|
1807
1807
|
"../../node_modules/.pnpm/glob@8.1.0/node_modules/glob/sync.js"(exports, module2) {
|
1808
1808
|
"use strict";
|
1809
1809
|
module2.exports = globSync;
|
@@ -1812,10 +1812,10 @@ var require_sync = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1812
1812
|
var minimatch = require_minimatch();
|
1813
1813
|
var Minimatch = minimatch.Minimatch;
|
1814
1814
|
var Glob = require_glob().Glob;
|
1815
|
-
var util = (0,
|
1816
|
-
var path5 = (0,
|
1817
|
-
var assert = (0,
|
1818
|
-
var isAbsolute = (0,
|
1815
|
+
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
1816
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
1817
|
+
var assert = (0, import_chunk_2ESYSVXG.__require)("assert");
|
1818
|
+
var isAbsolute = (0, import_chunk_2ESYSVXG.__require)("path").isAbsolute;
|
1819
1819
|
var common = require_common();
|
1820
1820
|
var setopts = common.setopts;
|
1821
1821
|
var ownProp = common.ownProp;
|
@@ -2157,7 +2157,7 @@ var require_sync = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2157
2157
|
};
|
2158
2158
|
}
|
2159
2159
|
});
|
2160
|
-
var require_wrappy = (0,
|
2160
|
+
var require_wrappy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
2161
2161
|
"../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports, module2) {
|
2162
2162
|
"use strict";
|
2163
2163
|
module2.exports = wrappy;
|
@@ -2186,7 +2186,7 @@ var require_wrappy = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2186
2186
|
}
|
2187
2187
|
}
|
2188
2188
|
});
|
2189
|
-
var require_once = (0,
|
2189
|
+
var require_once = (0, import_chunk_2ESYSVXG.__commonJS)({
|
2190
2190
|
"../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports, module2) {
|
2191
2191
|
"use strict";
|
2192
2192
|
var wrappy = require_wrappy();
|
@@ -2229,7 +2229,7 @@ var require_once = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2229
2229
|
}
|
2230
2230
|
}
|
2231
2231
|
});
|
2232
|
-
var require_inflight = (0,
|
2232
|
+
var require_inflight = (0, import_chunk_2ESYSVXG.__commonJS)({
|
2233
2233
|
"../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports, module2) {
|
2234
2234
|
"use strict";
|
2235
2235
|
var wrappy = require_wrappy();
|
@@ -2274,7 +2274,7 @@ var require_inflight = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2274
2274
|
}
|
2275
2275
|
}
|
2276
2276
|
});
|
2277
|
-
var require_glob = (0,
|
2277
|
+
var require_glob = (0, import_chunk_2ESYSVXG.__commonJS)({
|
2278
2278
|
"../../node_modules/.pnpm/glob@8.1.0/node_modules/glob/glob.js"(exports, module2) {
|
2279
2279
|
"use strict";
|
2280
2280
|
module2.exports = glob;
|
@@ -2282,16 +2282,16 @@ var require_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2282
2282
|
var minimatch = require_minimatch();
|
2283
2283
|
var Minimatch = minimatch.Minimatch;
|
2284
2284
|
var inherits = require_inherits();
|
2285
|
-
var EE = (0,
|
2286
|
-
var path5 = (0,
|
2287
|
-
var assert = (0,
|
2288
|
-
var isAbsolute = (0,
|
2285
|
+
var EE = (0, import_chunk_2ESYSVXG.__require)("events").EventEmitter;
|
2286
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
2287
|
+
var assert = (0, import_chunk_2ESYSVXG.__require)("assert");
|
2288
|
+
var isAbsolute = (0, import_chunk_2ESYSVXG.__require)("path").isAbsolute;
|
2289
2289
|
var globSync = require_sync();
|
2290
2290
|
var common = require_common();
|
2291
2291
|
var setopts = common.setopts;
|
2292
2292
|
var ownProp = common.ownProp;
|
2293
2293
|
var inflight = require_inflight();
|
2294
|
-
var util = (0,
|
2294
|
+
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
2295
2295
|
var childrenIgnored = common.childrenIgnored;
|
2296
2296
|
var isIgnored = common.isIgnored;
|
2297
2297
|
var once = require_once();
|
@@ -2829,7 +2829,7 @@ var require_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2829
2829
|
};
|
2830
2830
|
}
|
2831
2831
|
});
|
2832
|
-
var require_lib5 = (0,
|
2832
|
+
var require_lib5 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
2833
2833
|
"../../node_modules/.pnpm/npm-packlist@5.1.3/node_modules/npm-packlist/lib/index.js"(exports, module2) {
|
2834
2834
|
"use strict";
|
2835
2835
|
var bundleWalk = require_lib3();
|
@@ -2838,12 +2838,12 @@ var require_lib5 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2838
2838
|
var IgnoreWalker = ignoreWalk.Walker;
|
2839
2839
|
var rootBuiltinRules = Symbol("root-builtin-rules");
|
2840
2840
|
var packageNecessaryRules = Symbol("package-necessary-rules");
|
2841
|
-
var path5 = (0,
|
2841
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
2842
2842
|
var normalizePackageBin = require_lib2();
|
2843
2843
|
var packageMustHaveFileNames = "readme|copying|license|licence";
|
2844
2844
|
var packageMustHaves = `@(${packageMustHaveFileNames}){,.*[^~$]}`;
|
2845
2845
|
var packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~$])?$`, "i");
|
2846
|
-
var fs4 = (0,
|
2846
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
2847
2847
|
var glob = require_glob();
|
2848
2848
|
var globify = (pattern) => pattern.split("\\").join("/");
|
2849
2849
|
var readOutOfTreeIgnoreFiles = (root, rel, result = "") => {
|
@@ -3168,7 +3168,7 @@ var require_lib5 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3168
3168
|
walk.Walker = Walker;
|
3169
3169
|
}
|
3170
3170
|
});
|
3171
|
-
var require_js_tokens = (0,
|
3171
|
+
var require_js_tokens = (0, import_chunk_2ESYSVXG.__commonJS)({
|
3172
3172
|
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports) {
|
3173
3173
|
"use strict";
|
3174
3174
|
Object.defineProperty(exports, "__esModule", {
|
@@ -3189,7 +3189,7 @@ var require_js_tokens = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3189
3189
|
};
|
3190
3190
|
}
|
3191
3191
|
});
|
3192
|
-
var require_escape_string_regexp = (0,
|
3192
|
+
var require_escape_string_regexp = (0, import_chunk_2ESYSVXG.__commonJS)({
|
3193
3193
|
"../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports, module2) {
|
3194
3194
|
"use strict";
|
3195
3195
|
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
@@ -3201,7 +3201,7 @@ var require_escape_string_regexp = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3201
3201
|
};
|
3202
3202
|
}
|
3203
3203
|
});
|
3204
|
-
var require_color_name = (0,
|
3204
|
+
var require_color_name = (0, import_chunk_2ESYSVXG.__commonJS)({
|
3205
3205
|
"../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports, module2) {
|
3206
3206
|
"use strict";
|
3207
3207
|
module2.exports = {
|
@@ -3356,7 +3356,7 @@ var require_color_name = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3356
3356
|
};
|
3357
3357
|
}
|
3358
3358
|
});
|
3359
|
-
var require_conversions = (0,
|
3359
|
+
var require_conversions = (0, import_chunk_2ESYSVXG.__commonJS)({
|
3360
3360
|
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports, module2) {
|
3361
3361
|
"use strict";
|
3362
3362
|
var cssKeywords = require_color_name();
|
@@ -4068,7 +4068,7 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4068
4068
|
};
|
4069
4069
|
}
|
4070
4070
|
});
|
4071
|
-
var require_route = (0,
|
4071
|
+
var require_route = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4072
4072
|
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports, module2) {
|
4073
4073
|
"use strict";
|
4074
4074
|
var conversions = require_conversions();
|
@@ -4137,7 +4137,7 @@ var require_route = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4137
4137
|
};
|
4138
4138
|
}
|
4139
4139
|
});
|
4140
|
-
var require_color_convert = (0,
|
4140
|
+
var require_color_convert = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4141
4141
|
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports, module2) {
|
4142
4142
|
"use strict";
|
4143
4143
|
var conversions = require_conversions();
|
@@ -4195,7 +4195,7 @@ var require_color_convert = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4195
4195
|
module2.exports = convert;
|
4196
4196
|
}
|
4197
4197
|
});
|
4198
|
-
var require_ansi_styles = (0,
|
4198
|
+
var require_ansi_styles = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4199
4199
|
"../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports, module2) {
|
4200
4200
|
"use strict";
|
4201
4201
|
var colorConvert = require_color_convert();
|
@@ -4336,7 +4336,7 @@ var require_ansi_styles = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4336
4336
|
});
|
4337
4337
|
}
|
4338
4338
|
});
|
4339
|
-
var require_has_flag = (0,
|
4339
|
+
var require_has_flag = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4340
4340
|
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
4341
4341
|
"use strict";
|
4342
4342
|
module2.exports = (flag, argv) => {
|
@@ -4348,10 +4348,10 @@ var require_has_flag = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4348
4348
|
};
|
4349
4349
|
}
|
4350
4350
|
});
|
4351
|
-
var require_supports_color = (0,
|
4351
|
+
var require_supports_color = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4352
4352
|
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) {
|
4353
4353
|
"use strict";
|
4354
|
-
var os = (0,
|
4354
|
+
var os = (0, import_chunk_2ESYSVXG.__require)("os");
|
4355
4355
|
var hasFlag = require_has_flag();
|
4356
4356
|
var env = process.env;
|
4357
4357
|
var forceColor;
|
@@ -4441,7 +4441,7 @@ var require_supports_color = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4441
4441
|
};
|
4442
4442
|
}
|
4443
4443
|
});
|
4444
|
-
var require_templates = (0,
|
4444
|
+
var require_templates = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4445
4445
|
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports, module2) {
|
4446
4446
|
"use strict";
|
4447
4447
|
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
@@ -4550,7 +4550,7 @@ var require_templates = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4550
4550
|
};
|
4551
4551
|
}
|
4552
4552
|
});
|
4553
|
-
var require_chalk = (0,
|
4553
|
+
var require_chalk = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4554
4554
|
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports, module2) {
|
4555
4555
|
"use strict";
|
4556
4556
|
var escapeStringRegexp = require_escape_string_regexp();
|
@@ -4715,7 +4715,7 @@ var require_chalk = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4715
4715
|
module2.exports.default = module2.exports;
|
4716
4716
|
}
|
4717
4717
|
});
|
4718
|
-
var require_lib6 = (0,
|
4718
|
+
var require_lib6 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4719
4719
|
"../../node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js"(exports) {
|
4720
4720
|
"use strict";
|
4721
4721
|
Object.defineProperty(exports, "__esModule", {
|
@@ -4724,7 +4724,7 @@ var require_lib6 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4724
4724
|
exports.default = highlight;
|
4725
4725
|
exports.shouldHighlight = shouldHighlight;
|
4726
4726
|
var _jsTokens = require_js_tokens();
|
4727
|
-
var _helperValidatorIdentifier = (0,
|
4727
|
+
var _helperValidatorIdentifier = (0, import_chunk_H5XZKD22.require_lib)();
|
4728
4728
|
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
4729
4729
|
function _getRequireWildcardCache(e) {
|
4730
4730
|
if ("function" != typeof WeakMap) return null;
|
@@ -4838,7 +4838,7 @@ var require_lib6 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4838
4838
|
}
|
4839
4839
|
}
|
4840
4840
|
});
|
4841
|
-
var require_lib7 = (0,
|
4841
|
+
var require_lib7 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
4842
4842
|
"../../node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js"(exports) {
|
4843
4843
|
"use strict";
|
4844
4844
|
Object.defineProperty(exports, "__esModule", {
|
@@ -5014,7 +5014,7 @@ ${frame}`;
|
|
5014
5014
|
}
|
5015
5015
|
}
|
5016
5016
|
});
|
5017
|
-
var require_debug = (0,
|
5017
|
+
var require_debug = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5018
5018
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/debug.js"(exports, module2) {
|
5019
5019
|
"use strict";
|
5020
5020
|
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
@@ -5022,7 +5022,7 @@ var require_debug = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5022
5022
|
module2.exports = debug;
|
5023
5023
|
}
|
5024
5024
|
});
|
5025
|
-
var require_constants = (0,
|
5025
|
+
var require_constants = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5026
5026
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/constants.js"(exports, module2) {
|
5027
5027
|
"use strict";
|
5028
5028
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
@@ -5052,7 +5052,7 @@ var require_constants = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5052
5052
|
};
|
5053
5053
|
}
|
5054
5054
|
});
|
5055
|
-
var require_re = (0,
|
5055
|
+
var require_re = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5056
5056
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/re.js"(exports, module2) {
|
5057
5057
|
"use strict";
|
5058
5058
|
var {
|
@@ -5136,7 +5136,7 @@ var require_re = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5136
5136
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
5137
5137
|
}
|
5138
5138
|
});
|
5139
|
-
var require_parse_options = (0,
|
5139
|
+
var require_parse_options = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5140
5140
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/parse-options.js"(exports, module2) {
|
5141
5141
|
"use strict";
|
5142
5142
|
var looseOption = Object.freeze({ loose: true });
|
@@ -5153,7 +5153,7 @@ var require_parse_options = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5153
5153
|
module2.exports = parseOptions;
|
5154
5154
|
}
|
5155
5155
|
});
|
5156
|
-
var require_identifiers = (0,
|
5156
|
+
var require_identifiers = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5157
5157
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/identifiers.js"(exports, module2) {
|
5158
5158
|
"use strict";
|
5159
5159
|
var numeric = /^[0-9]+$/;
|
@@ -5173,7 +5173,7 @@ var require_identifiers = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5173
5173
|
};
|
5174
5174
|
}
|
5175
5175
|
});
|
5176
|
-
var require_semver = (0,
|
5176
|
+
var require_semver = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5177
5177
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/classes/semver.js"(exports, module2) {
|
5178
5178
|
"use strict";
|
5179
5179
|
var debug = require_debug();
|
@@ -5432,7 +5432,7 @@ var require_semver = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5432
5432
|
module2.exports = SemVer;
|
5433
5433
|
}
|
5434
5434
|
});
|
5435
|
-
var require_parse = (0,
|
5435
|
+
var require_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5436
5436
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/parse.js"(exports, module2) {
|
5437
5437
|
"use strict";
|
5438
5438
|
var SemVer = require_semver();
|
@@ -5452,7 +5452,7 @@ var require_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5452
5452
|
module2.exports = parse;
|
5453
5453
|
}
|
5454
5454
|
});
|
5455
|
-
var require_valid = (0,
|
5455
|
+
var require_valid = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5456
5456
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/valid.js"(exports, module2) {
|
5457
5457
|
"use strict";
|
5458
5458
|
var parse = require_parse();
|
@@ -5463,7 +5463,7 @@ var require_valid = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5463
5463
|
module2.exports = valid;
|
5464
5464
|
}
|
5465
5465
|
});
|
5466
|
-
var require_clean = (0,
|
5466
|
+
var require_clean = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5467
5467
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/clean.js"(exports, module2) {
|
5468
5468
|
"use strict";
|
5469
5469
|
var parse = require_parse();
|
@@ -5474,7 +5474,7 @@ var require_clean = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5474
5474
|
module2.exports = clean;
|
5475
5475
|
}
|
5476
5476
|
});
|
5477
|
-
var require_spdx_license_ids = (0,
|
5477
|
+
var require_spdx_license_ids = (0, import_chunk_2ESYSVXG.__commonJS)({
|
5478
5478
|
"../../node_modules/.pnpm/spdx-license-ids@3.0.21/node_modules/spdx-license-ids/index.json"(exports, module2) {
|
5479
5479
|
module2.exports = [
|
5480
5480
|
"0BSD",
|
@@ -6128,7 +6128,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6128
6128
|
];
|
6129
6129
|
}
|
6130
6130
|
});
|
6131
|
-
var require_spdx_exceptions = (0,
|
6131
|
+
var require_spdx_exceptions = (0, import_chunk_2ESYSVXG.__commonJS)({
|
6132
6132
|
"../../node_modules/.pnpm/spdx-exceptions@2.5.0/node_modules/spdx-exceptions/index.json"(exports, module2) {
|
6133
6133
|
module2.exports = [
|
6134
6134
|
"389-exception",
|
@@ -6200,7 +6200,7 @@ var require_spdx_exceptions = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6200
6200
|
];
|
6201
6201
|
}
|
6202
6202
|
});
|
6203
|
-
var require_scan = (0,
|
6203
|
+
var require_scan = (0, import_chunk_2ESYSVXG.__commonJS)({
|
6204
6204
|
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js"(exports, module2) {
|
6205
6205
|
"use strict";
|
6206
6206
|
var licenses = [].concat(require_spdx_license_ids()).concat(require_spdx_license_ids());
|
@@ -6302,7 +6302,7 @@ var require_scan = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6302
6302
|
};
|
6303
6303
|
}
|
6304
6304
|
});
|
6305
|
-
var require_parse2 = (0,
|
6305
|
+
var require_parse2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
6306
6306
|
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js"(exports, module2) {
|
6307
6307
|
"use strict";
|
6308
6308
|
module2.exports = function(tokens) {
|
@@ -6414,7 +6414,7 @@ var require_parse2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6414
6414
|
};
|
6415
6415
|
}
|
6416
6416
|
});
|
6417
|
-
var require_spdx_expression_parse = (0,
|
6417
|
+
var require_spdx_expression_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
|
6418
6418
|
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js"(exports, module2) {
|
6419
6419
|
"use strict";
|
6420
6420
|
var scan = require_scan();
|
@@ -6424,7 +6424,7 @@ var require_spdx_expression_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6424
6424
|
};
|
6425
6425
|
}
|
6426
6426
|
});
|
6427
|
-
var require_spdx_correct = (0,
|
6427
|
+
var require_spdx_correct = (0, import_chunk_2ESYSVXG.__commonJS)({
|
6428
6428
|
"../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js"(exports, module2) {
|
6429
6429
|
"use strict";
|
6430
6430
|
var parse = require_spdx_expression_parse();
|
@@ -6741,7 +6741,7 @@ var require_spdx_correct = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6741
6741
|
}
|
6742
6742
|
}
|
6743
6743
|
});
|
6744
|
-
var require_validate_npm_package_license = (0,
|
6744
|
+
var require_validate_npm_package_license = (0, import_chunk_2ESYSVXG.__commonJS)({
|
6745
6745
|
"../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js"(exports, module2) {
|
6746
6746
|
"use strict";
|
6747
6747
|
var parse = require_spdx_expression_parse();
|
@@ -6811,7 +6811,7 @@ var require_validate_npm_package_license = (0, import_chunk_WWAWV7DQ.__commonJS)
|
|
6811
6811
|
};
|
6812
6812
|
}
|
6813
6813
|
});
|
6814
|
-
var require_commonjs = (0,
|
6814
|
+
var require_commonjs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
6815
6815
|
"../../node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/commonjs/index.js"(exports) {
|
6816
6816
|
"use strict";
|
6817
6817
|
Object.defineProperty(exports, "__esModule", { value: true });
|
@@ -6826,21 +6826,19 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6826
6826
|
var AS = globalThis.AbortSignal;
|
6827
6827
|
if (typeof AC === "undefined") {
|
6828
6828
|
AS = class AbortSignal {
|
6829
|
-
|
6830
|
-
|
6831
|
-
|
6832
|
-
|
6833
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "aborted", false);
|
6834
|
-
}
|
6829
|
+
onabort;
|
6830
|
+
_onabort = [];
|
6831
|
+
reason;
|
6832
|
+
aborted = false;
|
6835
6833
|
addEventListener(_, fn) {
|
6836
6834
|
this._onabort.push(fn);
|
6837
6835
|
}
|
6838
6836
|
};
|
6839
6837
|
AC = class AbortController {
|
6840
6838
|
constructor() {
|
6841
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "signal", new AS());
|
6842
6839
|
warnACPolyfill();
|
6843
6840
|
}
|
6841
|
+
signal = new AS();
|
6844
6842
|
abort(reason) {
|
6845
6843
|
if (this.signal.aborted)
|
6846
6844
|
return;
|
@@ -6870,26 +6868,27 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6870
6868
|
this.fill(0);
|
6871
6869
|
}
|
6872
6870
|
};
|
6873
|
-
var
|
6874
|
-
|
6875
|
-
|
6876
|
-
|
6877
|
-
|
6878
|
-
if (!(0, import_chunk_WWAWV7DQ.__privateGet)(_Stack2, _constructing)) {
|
6879
|
-
throw new TypeError("instantiate Stack using Stack.create(n)");
|
6880
|
-
}
|
6881
|
-
this.heap = new HeapCls(max);
|
6882
|
-
this.length = 0;
|
6883
|
-
}
|
6871
|
+
var Stack = class _Stack {
|
6872
|
+
heap;
|
6873
|
+
length;
|
6874
|
+
// private constructor
|
6875
|
+
static #constructing = false;
|
6884
6876
|
static create(max) {
|
6885
6877
|
const HeapCls = getUintArray(max);
|
6886
6878
|
if (!HeapCls)
|
6887
6879
|
return [];
|
6888
|
-
|
6889
|
-
const s = new
|
6890
|
-
|
6880
|
+
_Stack.#constructing = true;
|
6881
|
+
const s = new _Stack(max, HeapCls);
|
6882
|
+
_Stack.#constructing = false;
|
6891
6883
|
return s;
|
6892
6884
|
}
|
6885
|
+
constructor(max, HeapCls) {
|
6886
|
+
if (!_Stack.#constructing) {
|
6887
|
+
throw new TypeError("instantiate Stack using Stack.create(n)");
|
6888
|
+
}
|
6889
|
+
this.heap = new HeapCls(max);
|
6890
|
+
this.length = 0;
|
6891
|
+
}
|
6893
6892
|
push(n) {
|
6894
6893
|
this.heap[this.length++] = n;
|
6895
6894
|
}
|
@@ -6897,69 +6896,175 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6897
6896
|
return this.heap[--this.length];
|
6898
6897
|
}
|
6899
6898
|
};
|
6900
|
-
|
6901
|
-
|
6902
|
-
|
6903
|
-
|
6904
|
-
|
6899
|
+
var LRUCache = class _LRUCache {
|
6900
|
+
// options that cannot be changed without disaster
|
6901
|
+
#max;
|
6902
|
+
#maxSize;
|
6903
|
+
#dispose;
|
6904
|
+
#disposeAfter;
|
6905
|
+
#fetchMethod;
|
6906
|
+
#memoMethod;
|
6907
|
+
/**
|
6908
|
+
* {@link LRUCache.OptionsBase.ttl}
|
6909
|
+
*/
|
6910
|
+
ttl;
|
6911
|
+
/**
|
6912
|
+
* {@link LRUCache.OptionsBase.ttlResolution}
|
6913
|
+
*/
|
6914
|
+
ttlResolution;
|
6915
|
+
/**
|
6916
|
+
* {@link LRUCache.OptionsBase.ttlAutopurge}
|
6917
|
+
*/
|
6918
|
+
ttlAutopurge;
|
6919
|
+
/**
|
6920
|
+
* {@link LRUCache.OptionsBase.updateAgeOnGet}
|
6921
|
+
*/
|
6922
|
+
updateAgeOnGet;
|
6923
|
+
/**
|
6924
|
+
* {@link LRUCache.OptionsBase.updateAgeOnHas}
|
6925
|
+
*/
|
6926
|
+
updateAgeOnHas;
|
6927
|
+
/**
|
6928
|
+
* {@link LRUCache.OptionsBase.allowStale}
|
6929
|
+
*/
|
6930
|
+
allowStale;
|
6931
|
+
/**
|
6932
|
+
* {@link LRUCache.OptionsBase.noDisposeOnSet}
|
6933
|
+
*/
|
6934
|
+
noDisposeOnSet;
|
6935
|
+
/**
|
6936
|
+
* {@link LRUCache.OptionsBase.noUpdateTTL}
|
6937
|
+
*/
|
6938
|
+
noUpdateTTL;
|
6939
|
+
/**
|
6940
|
+
* {@link LRUCache.OptionsBase.maxEntrySize}
|
6941
|
+
*/
|
6942
|
+
maxEntrySize;
|
6943
|
+
/**
|
6944
|
+
* {@link LRUCache.OptionsBase.sizeCalculation}
|
6945
|
+
*/
|
6946
|
+
sizeCalculation;
|
6947
|
+
/**
|
6948
|
+
* {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
|
6949
|
+
*/
|
6950
|
+
noDeleteOnFetchRejection;
|
6951
|
+
/**
|
6952
|
+
* {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
|
6953
|
+
*/
|
6954
|
+
noDeleteOnStaleGet;
|
6955
|
+
/**
|
6956
|
+
* {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
|
6957
|
+
*/
|
6958
|
+
allowStaleOnFetchAbort;
|
6959
|
+
/**
|
6960
|
+
* {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
|
6961
|
+
*/
|
6962
|
+
allowStaleOnFetchRejection;
|
6963
|
+
/**
|
6964
|
+
* {@link LRUCache.OptionsBase.ignoreFetchAbort}
|
6965
|
+
*/
|
6966
|
+
ignoreFetchAbort;
|
6967
|
+
// computed properties
|
6968
|
+
#size;
|
6969
|
+
#calculatedSize;
|
6970
|
+
#keyMap;
|
6971
|
+
#keyList;
|
6972
|
+
#valList;
|
6973
|
+
#next;
|
6974
|
+
#prev;
|
6975
|
+
#head;
|
6976
|
+
#tail;
|
6977
|
+
#free;
|
6978
|
+
#disposed;
|
6979
|
+
#sizes;
|
6980
|
+
#starts;
|
6981
|
+
#ttls;
|
6982
|
+
#hasDispose;
|
6983
|
+
#hasFetchMethod;
|
6984
|
+
#hasDisposeAfter;
|
6985
|
+
/**
|
6986
|
+
* Do not call this method unless you need to inspect the
|
6987
|
+
* inner workings of the cache. If anything returned by this
|
6988
|
+
* object is modified in any way, strange breakage may occur.
|
6989
|
+
*
|
6990
|
+
* These fields are private for a reason!
|
6991
|
+
*
|
6992
|
+
* @internal
|
6993
|
+
*/
|
6994
|
+
static unsafeExposeInternals(c) {
|
6995
|
+
return {
|
6996
|
+
// properties
|
6997
|
+
starts: c.#starts,
|
6998
|
+
ttls: c.#ttls,
|
6999
|
+
sizes: c.#sizes,
|
7000
|
+
keyMap: c.#keyMap,
|
7001
|
+
keyList: c.#keyList,
|
7002
|
+
valList: c.#valList,
|
7003
|
+
next: c.#next,
|
7004
|
+
prev: c.#prev,
|
7005
|
+
get head() {
|
7006
|
+
return c.#head;
|
7007
|
+
},
|
7008
|
+
get tail() {
|
7009
|
+
return c.#tail;
|
7010
|
+
},
|
7011
|
+
free: c.#free,
|
7012
|
+
// methods
|
7013
|
+
isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
|
7014
|
+
backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
|
7015
|
+
moveToTail: (index) => c.#moveToTail(index),
|
7016
|
+
indexes: (options) => c.#indexes(options),
|
7017
|
+
rindexes: (options) => c.#rindexes(options),
|
7018
|
+
isStale: (index) => c.#isStale(index)
|
7019
|
+
};
|
7020
|
+
}
|
7021
|
+
// Protected read-only members
|
7022
|
+
/**
|
7023
|
+
* {@link LRUCache.OptionsBase.max} (read-only)
|
7024
|
+
*/
|
7025
|
+
get max() {
|
7026
|
+
return this.#max;
|
7027
|
+
}
|
7028
|
+
/**
|
7029
|
+
* {@link LRUCache.OptionsBase.maxSize} (read-only)
|
7030
|
+
*/
|
7031
|
+
get maxSize() {
|
7032
|
+
return this.#maxSize;
|
7033
|
+
}
|
7034
|
+
/**
|
7035
|
+
* The total computed size of items in the cache (read-only)
|
7036
|
+
*/
|
7037
|
+
get calculatedSize() {
|
7038
|
+
return this.#calculatedSize;
|
7039
|
+
}
|
7040
|
+
/**
|
7041
|
+
* The number of items stored in the cache (read-only)
|
7042
|
+
*/
|
7043
|
+
get size() {
|
7044
|
+
return this.#size;
|
7045
|
+
}
|
7046
|
+
/**
|
7047
|
+
* {@link LRUCache.OptionsBase.fetchMethod} (read-only)
|
7048
|
+
*/
|
7049
|
+
get fetchMethod() {
|
7050
|
+
return this.#fetchMethod;
|
7051
|
+
}
|
7052
|
+
get memoMethod() {
|
7053
|
+
return this.#memoMethod;
|
7054
|
+
}
|
7055
|
+
/**
|
7056
|
+
* {@link LRUCache.OptionsBase.dispose} (read-only)
|
7057
|
+
*/
|
7058
|
+
get dispose() {
|
7059
|
+
return this.#dispose;
|
7060
|
+
}
|
7061
|
+
/**
|
7062
|
+
* {@link LRUCache.OptionsBase.disposeAfter} (read-only)
|
7063
|
+
*/
|
7064
|
+
get disposeAfter() {
|
7065
|
+
return this.#disposeAfter;
|
7066
|
+
}
|
6905
7067
|
constructor(options) {
|
6906
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _LRUCache_instances);
|
6907
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _max);
|
6908
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _maxSize);
|
6909
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _dispose);
|
6910
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _disposeAfter);
|
6911
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _fetchMethod);
|
6912
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _memoMethod);
|
6913
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "ttl");
|
6914
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "ttlResolution");
|
6915
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "ttlAutopurge");
|
6916
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "updateAgeOnGet");
|
6917
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "updateAgeOnHas");
|
6918
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "allowStale");
|
6919
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "noDisposeOnSet");
|
6920
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "noUpdateTTL");
|
6921
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "maxEntrySize");
|
6922
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "sizeCalculation");
|
6923
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "noDeleteOnFetchRejection");
|
6924
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "noDeleteOnStaleGet");
|
6925
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "allowStaleOnFetchAbort");
|
6926
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "allowStaleOnFetchRejection");
|
6927
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "ignoreFetchAbort");
|
6928
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _size);
|
6929
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _calculatedSize);
|
6930
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _keyMap);
|
6931
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _keyList);
|
6932
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _valList);
|
6933
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _next);
|
6934
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _prev);
|
6935
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _head);
|
6936
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _tail);
|
6937
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _free);
|
6938
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _disposed);
|
6939
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _sizes);
|
6940
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _starts);
|
6941
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _ttls);
|
6942
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _hasDispose);
|
6943
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _hasFetchMethod);
|
6944
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _hasDisposeAfter);
|
6945
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _updateItemAge, () => {
|
6946
|
-
});
|
6947
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _statusTTL, () => {
|
6948
|
-
});
|
6949
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _setItemTTL, () => {
|
6950
|
-
});
|
6951
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _isStale, () => false);
|
6952
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _removeItemSize, (_i) => {
|
6953
|
-
});
|
6954
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _addItemSize, (_i, _s, _st) => {
|
6955
|
-
});
|
6956
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _requireSize, (_k, _v, size, sizeCalculation2) => {
|
6957
|
-
if (size || sizeCalculation2) {
|
6958
|
-
throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
6959
|
-
}
|
6960
|
-
return 0;
|
6961
|
-
});
|
6962
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, _a, "LRUCache");
|
6963
7068
|
const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
|
6964
7069
|
if (max !== 0 && !isPosInt(max)) {
|
6965
7070
|
throw new TypeError("max option must be a nonnegative integer");
|
@@ -6968,12 +7073,12 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6968
7073
|
if (!UintArray) {
|
6969
7074
|
throw new Error("invalid max value: " + max);
|
6970
7075
|
}
|
6971
|
-
|
6972
|
-
|
6973
|
-
this.maxEntrySize = maxEntrySize ||
|
7076
|
+
this.#max = max;
|
7077
|
+
this.#maxSize = maxSize;
|
7078
|
+
this.maxEntrySize = maxEntrySize || this.#maxSize;
|
6974
7079
|
this.sizeCalculation = sizeCalculation;
|
6975
7080
|
if (this.sizeCalculation) {
|
6976
|
-
if (!
|
7081
|
+
if (!this.#maxSize && !this.maxEntrySize) {
|
6977
7082
|
throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
6978
7083
|
}
|
6979
7084
|
if (typeof this.sizeCalculation !== "function") {
|
@@ -6983,34 +7088,34 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6983
7088
|
if (memoMethod !== void 0 && typeof memoMethod !== "function") {
|
6984
7089
|
throw new TypeError("memoMethod must be a function if defined");
|
6985
7090
|
}
|
6986
|
-
|
7091
|
+
this.#memoMethod = memoMethod;
|
6987
7092
|
if (fetchMethod !== void 0 && typeof fetchMethod !== "function") {
|
6988
7093
|
throw new TypeError("fetchMethod must be a function if specified");
|
6989
7094
|
}
|
6990
|
-
|
6991
|
-
|
6992
|
-
|
6993
|
-
|
6994
|
-
|
6995
|
-
|
6996
|
-
|
6997
|
-
|
6998
|
-
|
6999
|
-
|
7000
|
-
|
7001
|
-
|
7095
|
+
this.#fetchMethod = fetchMethod;
|
7096
|
+
this.#hasFetchMethod = !!fetchMethod;
|
7097
|
+
this.#keyMap = /* @__PURE__ */ new Map();
|
7098
|
+
this.#keyList = new Array(max).fill(void 0);
|
7099
|
+
this.#valList = new Array(max).fill(void 0);
|
7100
|
+
this.#next = new UintArray(max);
|
7101
|
+
this.#prev = new UintArray(max);
|
7102
|
+
this.#head = 0;
|
7103
|
+
this.#tail = 0;
|
7104
|
+
this.#free = Stack.create(max);
|
7105
|
+
this.#size = 0;
|
7106
|
+
this.#calculatedSize = 0;
|
7002
7107
|
if (typeof dispose === "function") {
|
7003
|
-
|
7108
|
+
this.#dispose = dispose;
|
7004
7109
|
}
|
7005
7110
|
if (typeof disposeAfter === "function") {
|
7006
|
-
|
7007
|
-
|
7111
|
+
this.#disposeAfter = disposeAfter;
|
7112
|
+
this.#disposed = [];
|
7008
7113
|
} else {
|
7009
|
-
|
7010
|
-
|
7114
|
+
this.#disposeAfter = void 0;
|
7115
|
+
this.#disposed = void 0;
|
7011
7116
|
}
|
7012
|
-
|
7013
|
-
|
7117
|
+
this.#hasDispose = !!this.#dispose;
|
7118
|
+
this.#hasDisposeAfter = !!this.#disposeAfter;
|
7014
7119
|
this.noDisposeOnSet = !!noDisposeOnSet;
|
7015
7120
|
this.noUpdateTTL = !!noUpdateTTL;
|
7016
7121
|
this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
|
@@ -7018,15 +7123,15 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7018
7123
|
this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
|
7019
7124
|
this.ignoreFetchAbort = !!ignoreFetchAbort;
|
7020
7125
|
if (this.maxEntrySize !== 0) {
|
7021
|
-
if (
|
7022
|
-
if (!isPosInt(
|
7126
|
+
if (this.#maxSize !== 0) {
|
7127
|
+
if (!isPosInt(this.#maxSize)) {
|
7023
7128
|
throw new TypeError("maxSize must be a positive integer if specified");
|
7024
7129
|
}
|
7025
7130
|
}
|
7026
7131
|
if (!isPosInt(this.maxEntrySize)) {
|
7027
7132
|
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
7028
7133
|
}
|
7029
|
-
|
7134
|
+
this.#initializeSizeTracking();
|
7030
7135
|
}
|
7031
7136
|
this.allowStale = !!allowStale;
|
7032
7137
|
this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
|
@@ -7039,135 +7144,199 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7039
7144
|
if (!isPosInt(this.ttl)) {
|
7040
7145
|
throw new TypeError("ttl must be a positive integer if specified");
|
7041
7146
|
}
|
7042
|
-
|
7147
|
+
this.#initializeTTLTracking();
|
7043
7148
|
}
|
7044
|
-
if (
|
7149
|
+
if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
|
7045
7150
|
throw new TypeError("At least one of max, maxSize, or ttl is required");
|
7046
7151
|
}
|
7047
|
-
if (!this.ttlAutopurge && !
|
7152
|
+
if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
|
7048
7153
|
const code = "LRU_CACHE_UNBOUNDED";
|
7049
7154
|
if (shouldWarn(code)) {
|
7050
7155
|
warned.add(code);
|
7051
7156
|
const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
|
7052
|
-
emitWarning(msg, "UnboundedCacheWarning", code,
|
7157
|
+
emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache);
|
7053
7158
|
}
|
7054
7159
|
}
|
7055
7160
|
}
|
7056
7161
|
/**
|
7057
|
-
*
|
7058
|
-
*
|
7059
|
-
* object is modified in any way, strange breakage may occur.
|
7060
|
-
*
|
7061
|
-
* These fields are private for a reason!
|
7062
|
-
*
|
7063
|
-
* @internal
|
7162
|
+
* Return the number of ms left in the item's TTL. If item is not in cache,
|
7163
|
+
* returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
|
7064
7164
|
*/
|
7065
|
-
|
7066
|
-
return
|
7067
|
-
|
7068
|
-
|
7069
|
-
|
7070
|
-
|
7071
|
-
|
7072
|
-
|
7073
|
-
|
7074
|
-
|
7075
|
-
|
7076
|
-
|
7077
|
-
|
7078
|
-
|
7079
|
-
|
7080
|
-
|
7081
|
-
|
7082
|
-
|
7083
|
-
|
7084
|
-
|
7085
|
-
var _a2;
|
7086
|
-
return (0, import_chunk_WWAWV7DQ.__privateMethod)(_a2 = c, _LRUCache_instances, isBackgroundFetch_fn).call(_a2, p);
|
7087
|
-
},
|
7088
|
-
backgroundFetch: (k, index, options, context) => {
|
7089
|
-
var _a2;
|
7090
|
-
return (0, import_chunk_WWAWV7DQ.__privateMethod)(_a2 = c, _LRUCache_instances, backgroundFetch_fn).call(_a2, k, index, options, context);
|
7091
|
-
},
|
7092
|
-
moveToTail: (index) => {
|
7093
|
-
var _a2;
|
7094
|
-
return (0, import_chunk_WWAWV7DQ.__privateMethod)(_a2 = c, _LRUCache_instances, moveToTail_fn).call(_a2, index);
|
7095
|
-
},
|
7096
|
-
indexes: (options) => {
|
7097
|
-
var _a2;
|
7098
|
-
return (0, import_chunk_WWAWV7DQ.__privateMethod)(_a2 = c, _LRUCache_instances, indexes_fn).call(_a2, options);
|
7099
|
-
},
|
7100
|
-
rindexes: (options) => {
|
7101
|
-
var _a2;
|
7102
|
-
return (0, import_chunk_WWAWV7DQ.__privateMethod)(_a2 = c, _LRUCache_instances, rindexes_fn).call(_a2, options);
|
7103
|
-
},
|
7104
|
-
isStale: (index) => {
|
7105
|
-
var _a2;
|
7106
|
-
return (0, import_chunk_WWAWV7DQ.__privateGet)(_a2 = c, _isStale).call(_a2, index);
|
7165
|
+
getRemainingTTL(key) {
|
7166
|
+
return this.#keyMap.has(key) ? Infinity : 0;
|
7167
|
+
}
|
7168
|
+
#initializeTTLTracking() {
|
7169
|
+
const ttls = new ZeroArray(this.#max);
|
7170
|
+
const starts = new ZeroArray(this.#max);
|
7171
|
+
this.#ttls = ttls;
|
7172
|
+
this.#starts = starts;
|
7173
|
+
this.#setItemTTL = (index, ttl, start = perf.now()) => {
|
7174
|
+
starts[index] = ttl !== 0 ? start : 0;
|
7175
|
+
ttls[index] = ttl;
|
7176
|
+
if (ttl !== 0 && this.ttlAutopurge) {
|
7177
|
+
const t = setTimeout(() => {
|
7178
|
+
if (this.#isStale(index)) {
|
7179
|
+
this.#delete(this.#keyList[index], "expire");
|
7180
|
+
}
|
7181
|
+
}, ttl + 1);
|
7182
|
+
if (t.unref) {
|
7183
|
+
t.unref();
|
7184
|
+
}
|
7107
7185
|
}
|
7108
7186
|
};
|
7187
|
+
this.#updateItemAge = (index) => {
|
7188
|
+
starts[index] = ttls[index] !== 0 ? perf.now() : 0;
|
7189
|
+
};
|
7190
|
+
this.#statusTTL = (status, index) => {
|
7191
|
+
if (ttls[index]) {
|
7192
|
+
const ttl = ttls[index];
|
7193
|
+
const start = starts[index];
|
7194
|
+
if (!ttl || !start)
|
7195
|
+
return;
|
7196
|
+
status.ttl = ttl;
|
7197
|
+
status.start = start;
|
7198
|
+
status.now = cachedNow || getNow();
|
7199
|
+
const age = status.now - start;
|
7200
|
+
status.remainingTTL = ttl - age;
|
7201
|
+
}
|
7202
|
+
};
|
7203
|
+
let cachedNow = 0;
|
7204
|
+
const getNow = () => {
|
7205
|
+
const n = perf.now();
|
7206
|
+
if (this.ttlResolution > 0) {
|
7207
|
+
cachedNow = n;
|
7208
|
+
const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
|
7209
|
+
if (t.unref) {
|
7210
|
+
t.unref();
|
7211
|
+
}
|
7212
|
+
}
|
7213
|
+
return n;
|
7214
|
+
};
|
7215
|
+
this.getRemainingTTL = (key) => {
|
7216
|
+
const index = this.#keyMap.get(key);
|
7217
|
+
if (index === void 0) {
|
7218
|
+
return 0;
|
7219
|
+
}
|
7220
|
+
const ttl = ttls[index];
|
7221
|
+
const start = starts[index];
|
7222
|
+
if (!ttl || !start) {
|
7223
|
+
return Infinity;
|
7224
|
+
}
|
7225
|
+
const age = (cachedNow || getNow()) - start;
|
7226
|
+
return ttl - age;
|
7227
|
+
};
|
7228
|
+
this.#isStale = (index) => {
|
7229
|
+
const s = starts[index];
|
7230
|
+
const t = ttls[index];
|
7231
|
+
return !!t && !!s && (cachedNow || getNow()) - s > t;
|
7232
|
+
};
|
7109
7233
|
}
|
7110
|
-
//
|
7111
|
-
|
7112
|
-
|
7113
|
-
|
7114
|
-
|
7115
|
-
|
7116
|
-
}
|
7117
|
-
|
7118
|
-
|
7119
|
-
|
7120
|
-
|
7121
|
-
|
7122
|
-
|
7123
|
-
|
7124
|
-
|
7125
|
-
|
7126
|
-
|
7127
|
-
|
7128
|
-
|
7129
|
-
|
7130
|
-
|
7131
|
-
|
7132
|
-
|
7133
|
-
|
7134
|
-
|
7135
|
-
|
7136
|
-
|
7137
|
-
|
7138
|
-
|
7139
|
-
|
7140
|
-
|
7141
|
-
|
7142
|
-
|
7234
|
+
// conditionally set private methods related to TTL
|
7235
|
+
#updateItemAge = () => {
|
7236
|
+
};
|
7237
|
+
#statusTTL = () => {
|
7238
|
+
};
|
7239
|
+
#setItemTTL = () => {
|
7240
|
+
};
|
7241
|
+
/* c8 ignore stop */
|
7242
|
+
#isStale = () => false;
|
7243
|
+
#initializeSizeTracking() {
|
7244
|
+
const sizes = new ZeroArray(this.#max);
|
7245
|
+
this.#calculatedSize = 0;
|
7246
|
+
this.#sizes = sizes;
|
7247
|
+
this.#removeItemSize = (index) => {
|
7248
|
+
this.#calculatedSize -= sizes[index];
|
7249
|
+
sizes[index] = 0;
|
7250
|
+
};
|
7251
|
+
this.#requireSize = (k, v, size, sizeCalculation) => {
|
7252
|
+
if (this.#isBackgroundFetch(v)) {
|
7253
|
+
return 0;
|
7254
|
+
}
|
7255
|
+
if (!isPosInt(size)) {
|
7256
|
+
if (sizeCalculation) {
|
7257
|
+
if (typeof sizeCalculation !== "function") {
|
7258
|
+
throw new TypeError("sizeCalculation must be a function");
|
7259
|
+
}
|
7260
|
+
size = sizeCalculation(v, k);
|
7261
|
+
if (!isPosInt(size)) {
|
7262
|
+
throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
7263
|
+
}
|
7264
|
+
} else {
|
7265
|
+
throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
7266
|
+
}
|
7267
|
+
}
|
7268
|
+
return size;
|
7269
|
+
};
|
7270
|
+
this.#addItemSize = (index, size, status) => {
|
7271
|
+
sizes[index] = size;
|
7272
|
+
if (this.#maxSize) {
|
7273
|
+
const maxSize = this.#maxSize - sizes[index];
|
7274
|
+
while (this.#calculatedSize > maxSize) {
|
7275
|
+
this.#evict(true);
|
7276
|
+
}
|
7277
|
+
}
|
7278
|
+
this.#calculatedSize += sizes[index];
|
7279
|
+
if (status) {
|
7280
|
+
status.entrySize = size;
|
7281
|
+
status.totalCalculatedSize = this.#calculatedSize;
|
7282
|
+
}
|
7283
|
+
};
|
7143
7284
|
}
|
7144
|
-
|
7145
|
-
|
7146
|
-
|
7147
|
-
|
7148
|
-
|
7285
|
+
#removeItemSize = (_i) => {
|
7286
|
+
};
|
7287
|
+
#addItemSize = (_i, _s, _st) => {
|
7288
|
+
};
|
7289
|
+
#requireSize = (_k, _v, size, sizeCalculation) => {
|
7290
|
+
if (size || sizeCalculation) {
|
7291
|
+
throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
7292
|
+
}
|
7293
|
+
return 0;
|
7294
|
+
};
|
7295
|
+
*#indexes({ allowStale = this.allowStale } = {}) {
|
7296
|
+
if (this.#size) {
|
7297
|
+
for (let i = this.#tail; true; ) {
|
7298
|
+
if (!this.#isValidIndex(i)) {
|
7299
|
+
break;
|
7300
|
+
}
|
7301
|
+
if (allowStale || !this.#isStale(i)) {
|
7302
|
+
yield i;
|
7303
|
+
}
|
7304
|
+
if (i === this.#head) {
|
7305
|
+
break;
|
7306
|
+
} else {
|
7307
|
+
i = this.#prev[i];
|
7308
|
+
}
|
7309
|
+
}
|
7310
|
+
}
|
7149
7311
|
}
|
7150
|
-
|
7151
|
-
|
7152
|
-
|
7153
|
-
|
7154
|
-
|
7312
|
+
*#rindexes({ allowStale = this.allowStale } = {}) {
|
7313
|
+
if (this.#size) {
|
7314
|
+
for (let i = this.#head; true; ) {
|
7315
|
+
if (!this.#isValidIndex(i)) {
|
7316
|
+
break;
|
7317
|
+
}
|
7318
|
+
if (allowStale || !this.#isStale(i)) {
|
7319
|
+
yield i;
|
7320
|
+
}
|
7321
|
+
if (i === this.#tail) {
|
7322
|
+
break;
|
7323
|
+
} else {
|
7324
|
+
i = this.#next[i];
|
7325
|
+
}
|
7326
|
+
}
|
7327
|
+
}
|
7155
7328
|
}
|
7156
|
-
|
7157
|
-
|
7158
|
-
* returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
|
7159
|
-
*/
|
7160
|
-
getRemainingTTL(key) {
|
7161
|
-
return (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).has(key) ? Infinity : 0;
|
7329
|
+
#isValidIndex(index) {
|
7330
|
+
return index !== void 0 && this.#keyMap.get(this.#keyList[index]) === index;
|
7162
7331
|
}
|
7163
7332
|
/**
|
7164
7333
|
* Return a generator yielding `[key, value]` pairs,
|
7165
7334
|
* in order from most recently used to least recently used.
|
7166
7335
|
*/
|
7167
7336
|
*entries() {
|
7168
|
-
for (const i of
|
7169
|
-
if (
|
7170
|
-
yield [
|
7337
|
+
for (const i of this.#indexes()) {
|
7338
|
+
if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7339
|
+
yield [this.#keyList[i], this.#valList[i]];
|
7171
7340
|
}
|
7172
7341
|
}
|
7173
7342
|
}
|
@@ -7178,9 +7347,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7178
7347
|
* in order from least recently used to most recently used.
|
7179
7348
|
*/
|
7180
7349
|
*rentries() {
|
7181
|
-
for (const i of
|
7182
|
-
if (
|
7183
|
-
yield [
|
7350
|
+
for (const i of this.#rindexes()) {
|
7351
|
+
if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7352
|
+
yield [this.#keyList[i], this.#valList[i]];
|
7184
7353
|
}
|
7185
7354
|
}
|
7186
7355
|
}
|
@@ -7189,9 +7358,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7189
7358
|
* in order from most recently used to least recently used.
|
7190
7359
|
*/
|
7191
7360
|
*keys() {
|
7192
|
-
for (const i of
|
7193
|
-
const k =
|
7194
|
-
if (k !== void 0 && !
|
7361
|
+
for (const i of this.#indexes()) {
|
7362
|
+
const k = this.#keyList[i];
|
7363
|
+
if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7195
7364
|
yield k;
|
7196
7365
|
}
|
7197
7366
|
}
|
@@ -7203,9 +7372,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7203
7372
|
* in order from least recently used to most recently used.
|
7204
7373
|
*/
|
7205
7374
|
*rkeys() {
|
7206
|
-
for (const i of
|
7207
|
-
const k =
|
7208
|
-
if (k !== void 0 && !
|
7375
|
+
for (const i of this.#rindexes()) {
|
7376
|
+
const k = this.#keyList[i];
|
7377
|
+
if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7209
7378
|
yield k;
|
7210
7379
|
}
|
7211
7380
|
}
|
@@ -7215,10 +7384,10 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7215
7384
|
* in order from most recently used to least recently used.
|
7216
7385
|
*/
|
7217
7386
|
*values() {
|
7218
|
-
for (const i of
|
7219
|
-
const v =
|
7220
|
-
if (v !== void 0 && !
|
7221
|
-
yield
|
7387
|
+
for (const i of this.#indexes()) {
|
7388
|
+
const v = this.#valList[i];
|
7389
|
+
if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7390
|
+
yield this.#valList[i];
|
7222
7391
|
}
|
7223
7392
|
}
|
7224
7393
|
}
|
@@ -7229,10 +7398,10 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7229
7398
|
* in order from least recently used to most recently used.
|
7230
7399
|
*/
|
7231
7400
|
*rvalues() {
|
7232
|
-
for (const i of
|
7233
|
-
const v =
|
7234
|
-
if (v !== void 0 && !
|
7235
|
-
yield
|
7401
|
+
for (const i of this.#rindexes()) {
|
7402
|
+
const v = this.#valList[i];
|
7403
|
+
if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7404
|
+
yield this.#valList[i];
|
7236
7405
|
}
|
7237
7406
|
}
|
7238
7407
|
}
|
@@ -7240,21 +7409,27 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7240
7409
|
* Iterating over the cache itself yields the same results as
|
7241
7410
|
* {@link LRUCache.entries}
|
7242
7411
|
*/
|
7243
|
-
[
|
7412
|
+
[Symbol.iterator]() {
|
7244
7413
|
return this.entries();
|
7245
7414
|
}
|
7415
|
+
/**
|
7416
|
+
* A String value that is used in the creation of the default string
|
7417
|
+
* description of an object. Called by the built-in method
|
7418
|
+
* `Object.prototype.toString`.
|
7419
|
+
*/
|
7420
|
+
[Symbol.toStringTag] = "LRUCache";
|
7246
7421
|
/**
|
7247
7422
|
* Find a value for which the supplied fn method returns a truthy value,
|
7248
7423
|
* similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
|
7249
7424
|
*/
|
7250
7425
|
find(fn, getOptions = {}) {
|
7251
|
-
for (const i of
|
7252
|
-
const v =
|
7253
|
-
const value =
|
7426
|
+
for (const i of this.#indexes()) {
|
7427
|
+
const v = this.#valList[i];
|
7428
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7254
7429
|
if (value === void 0)
|
7255
7430
|
continue;
|
7256
|
-
if (fn(value,
|
7257
|
-
return this.get(
|
7431
|
+
if (fn(value, this.#keyList[i], this)) {
|
7432
|
+
return this.get(this.#keyList[i], getOptions);
|
7258
7433
|
}
|
7259
7434
|
}
|
7260
7435
|
}
|
@@ -7270,12 +7445,12 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7270
7445
|
* Does not update age or recenty of use, or iterate over stale values.
|
7271
7446
|
*/
|
7272
7447
|
forEach(fn, thisp = this) {
|
7273
|
-
for (const i of
|
7274
|
-
const v =
|
7275
|
-
const value =
|
7448
|
+
for (const i of this.#indexes()) {
|
7449
|
+
const v = this.#valList[i];
|
7450
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7276
7451
|
if (value === void 0)
|
7277
7452
|
continue;
|
7278
|
-
fn.call(thisp, value,
|
7453
|
+
fn.call(thisp, value, this.#keyList[i], this);
|
7279
7454
|
}
|
7280
7455
|
}
|
7281
7456
|
/**
|
@@ -7283,12 +7458,12 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7283
7458
|
* reverse order. (ie, less recently used items are iterated over first.)
|
7284
7459
|
*/
|
7285
7460
|
rforEach(fn, thisp = this) {
|
7286
|
-
for (const i of
|
7287
|
-
const v =
|
7288
|
-
const value =
|
7461
|
+
for (const i of this.#rindexes()) {
|
7462
|
+
const v = this.#valList[i];
|
7463
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7289
7464
|
if (value === void 0)
|
7290
7465
|
continue;
|
7291
|
-
fn.call(thisp, value,
|
7466
|
+
fn.call(thisp, value, this.#keyList[i], this);
|
7292
7467
|
}
|
7293
7468
|
}
|
7294
7469
|
/**
|
@@ -7297,9 +7472,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7297
7472
|
*/
|
7298
7473
|
purgeStale() {
|
7299
7474
|
let deleted = false;
|
7300
|
-
for (const i of
|
7301
|
-
if (
|
7302
|
-
|
7475
|
+
for (const i of this.#rindexes({ allowStale: true })) {
|
7476
|
+
if (this.#isStale(i)) {
|
7477
|
+
this.#delete(this.#keyList[i], "expire");
|
7303
7478
|
deleted = true;
|
7304
7479
|
}
|
7305
7480
|
}
|
@@ -7318,25 +7493,25 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7318
7493
|
* if relevant.
|
7319
7494
|
*/
|
7320
7495
|
info(key) {
|
7321
|
-
const i =
|
7496
|
+
const i = this.#keyMap.get(key);
|
7322
7497
|
if (i === void 0)
|
7323
7498
|
return void 0;
|
7324
|
-
const v =
|
7325
|
-
const value =
|
7499
|
+
const v = this.#valList[i];
|
7500
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7326
7501
|
if (value === void 0)
|
7327
7502
|
return void 0;
|
7328
7503
|
const entry = { value };
|
7329
|
-
if (
|
7330
|
-
const ttl =
|
7331
|
-
const start =
|
7504
|
+
if (this.#ttls && this.#starts) {
|
7505
|
+
const ttl = this.#ttls[i];
|
7506
|
+
const start = this.#starts[i];
|
7332
7507
|
if (ttl && start) {
|
7333
7508
|
const remain = ttl - (perf.now() - start);
|
7334
7509
|
entry.ttl = remain;
|
7335
7510
|
entry.start = Date.now();
|
7336
7511
|
}
|
7337
7512
|
}
|
7338
|
-
if (
|
7339
|
-
entry.size =
|
7513
|
+
if (this.#sizes) {
|
7514
|
+
entry.size = this.#sizes[i];
|
7340
7515
|
}
|
7341
7516
|
return entry;
|
7342
7517
|
}
|
@@ -7355,20 +7530,20 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7355
7530
|
*/
|
7356
7531
|
dump() {
|
7357
7532
|
const arr = [];
|
7358
|
-
for (const i of
|
7359
|
-
const key =
|
7360
|
-
const v =
|
7361
|
-
const value =
|
7533
|
+
for (const i of this.#indexes({ allowStale: true })) {
|
7534
|
+
const key = this.#keyList[i];
|
7535
|
+
const v = this.#valList[i];
|
7536
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7362
7537
|
if (value === void 0 || key === void 0)
|
7363
7538
|
continue;
|
7364
7539
|
const entry = { value };
|
7365
|
-
if (
|
7366
|
-
entry.ttl =
|
7367
|
-
const age = perf.now() -
|
7540
|
+
if (this.#ttls && this.#starts) {
|
7541
|
+
entry.ttl = this.#ttls[i];
|
7542
|
+
const age = perf.now() - this.#starts[i];
|
7368
7543
|
entry.start = Math.floor(Date.now() - age);
|
7369
7544
|
}
|
7370
|
-
if (
|
7371
|
-
entry.size =
|
7545
|
+
if (this.#sizes) {
|
7546
|
+
entry.size = this.#sizes[i];
|
7372
7547
|
}
|
7373
7548
|
arr.unshift([key, entry]);
|
7374
7549
|
}
|
@@ -7424,65 +7599,64 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7424
7599
|
* `cache.delete(key)`. `undefined` is never stored in the cache.
|
7425
7600
|
*/
|
7426
7601
|
set(k, v, setOptions = {}) {
|
7427
|
-
var _a2, _b2, _c;
|
7428
7602
|
if (v === void 0) {
|
7429
7603
|
this.delete(k);
|
7430
7604
|
return this;
|
7431
7605
|
}
|
7432
7606
|
const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
|
7433
7607
|
let { noUpdateTTL = this.noUpdateTTL } = setOptions;
|
7434
|
-
const size =
|
7608
|
+
const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
|
7435
7609
|
if (this.maxEntrySize && size > this.maxEntrySize) {
|
7436
7610
|
if (status) {
|
7437
7611
|
status.set = "miss";
|
7438
7612
|
status.maxEntrySizeExceeded = true;
|
7439
7613
|
}
|
7440
|
-
|
7614
|
+
this.#delete(k, "set");
|
7441
7615
|
return this;
|
7442
7616
|
}
|
7443
|
-
let index =
|
7617
|
+
let index = this.#size === 0 ? void 0 : this.#keyMap.get(k);
|
7444
7618
|
if (index === void 0) {
|
7445
|
-
index =
|
7446
|
-
|
7447
|
-
|
7448
|
-
|
7449
|
-
|
7450
|
-
|
7451
|
-
|
7452
|
-
|
7453
|
-
|
7619
|
+
index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size;
|
7620
|
+
this.#keyList[index] = k;
|
7621
|
+
this.#valList[index] = v;
|
7622
|
+
this.#keyMap.set(k, index);
|
7623
|
+
this.#next[this.#tail] = index;
|
7624
|
+
this.#prev[index] = this.#tail;
|
7625
|
+
this.#tail = index;
|
7626
|
+
this.#size++;
|
7627
|
+
this.#addItemSize(index, size, status);
|
7454
7628
|
if (status)
|
7455
7629
|
status.set = "add";
|
7456
7630
|
noUpdateTTL = false;
|
7457
7631
|
} else {
|
7458
|
-
|
7459
|
-
const oldVal =
|
7632
|
+
this.#moveToTail(index);
|
7633
|
+
const oldVal = this.#valList[index];
|
7460
7634
|
if (v !== oldVal) {
|
7461
|
-
if (
|
7635
|
+
if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
|
7462
7636
|
oldVal.__abortController.abort(new Error("replaced"));
|
7463
7637
|
const { __staleWhileFetching: s } = oldVal;
|
7464
7638
|
if (s !== void 0 && !noDisposeOnSet) {
|
7465
|
-
if (
|
7466
|
-
|
7639
|
+
if (this.#hasDispose) {
|
7640
|
+
this.#dispose?.(s, k, "set");
|
7467
7641
|
}
|
7468
|
-
if (
|
7469
|
-
|
7642
|
+
if (this.#hasDisposeAfter) {
|
7643
|
+
this.#disposed?.push([s, k, "set"]);
|
7470
7644
|
}
|
7471
7645
|
}
|
7472
7646
|
} else if (!noDisposeOnSet) {
|
7473
|
-
if (
|
7474
|
-
|
7647
|
+
if (this.#hasDispose) {
|
7648
|
+
this.#dispose?.(oldVal, k, "set");
|
7475
7649
|
}
|
7476
|
-
if (
|
7477
|
-
|
7650
|
+
if (this.#hasDisposeAfter) {
|
7651
|
+
this.#disposed?.push([oldVal, k, "set"]);
|
7478
7652
|
}
|
7479
7653
|
}
|
7480
|
-
|
7481
|
-
|
7482
|
-
|
7654
|
+
this.#removeItemSize(index);
|
7655
|
+
this.#addItemSize(index, size, status);
|
7656
|
+
this.#valList[index] = v;
|
7483
7657
|
if (status) {
|
7484
7658
|
status.set = "replace";
|
7485
|
-
const oldValue = oldVal &&
|
7659
|
+
const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
|
7486
7660
|
if (oldValue !== void 0)
|
7487
7661
|
status.oldValue = oldValue;
|
7488
7662
|
}
|
@@ -7490,21 +7664,21 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7490
7664
|
status.set = "update";
|
7491
7665
|
}
|
7492
7666
|
}
|
7493
|
-
if (ttl !== 0 && !
|
7494
|
-
|
7667
|
+
if (ttl !== 0 && !this.#ttls) {
|
7668
|
+
this.#initializeTTLTracking();
|
7495
7669
|
}
|
7496
|
-
if (
|
7670
|
+
if (this.#ttls) {
|
7497
7671
|
if (!noUpdateTTL) {
|
7498
|
-
|
7672
|
+
this.#setItemTTL(index, ttl, start);
|
7499
7673
|
}
|
7500
7674
|
if (status)
|
7501
|
-
|
7675
|
+
this.#statusTTL(status, index);
|
7502
7676
|
}
|
7503
|
-
if (!noDisposeOnSet &&
|
7504
|
-
const dt =
|
7677
|
+
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
7678
|
+
const dt = this.#disposed;
|
7505
7679
|
let task;
|
7506
7680
|
while (task = dt?.shift()) {
|
7507
|
-
|
7681
|
+
this.#disposeAfter?.(...task);
|
7508
7682
|
}
|
7509
7683
|
}
|
7510
7684
|
return this;
|
@@ -7514,12 +7688,11 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7514
7688
|
* `undefined` if cache is empty.
|
7515
7689
|
*/
|
7516
7690
|
pop() {
|
7517
|
-
var _a2;
|
7518
7691
|
try {
|
7519
|
-
while (
|
7520
|
-
const val =
|
7521
|
-
|
7522
|
-
if (
|
7692
|
+
while (this.#size) {
|
7693
|
+
const val = this.#valList[this.#head];
|
7694
|
+
this.#evict(true);
|
7695
|
+
if (this.#isBackgroundFetch(val)) {
|
7523
7696
|
if (val.__staleWhileFetching) {
|
7524
7697
|
return val.__staleWhileFetching;
|
7525
7698
|
}
|
@@ -7528,15 +7701,45 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7528
7701
|
}
|
7529
7702
|
}
|
7530
7703
|
} finally {
|
7531
|
-
if (
|
7532
|
-
const dt =
|
7704
|
+
if (this.#hasDisposeAfter && this.#disposed) {
|
7705
|
+
const dt = this.#disposed;
|
7533
7706
|
let task;
|
7534
7707
|
while (task = dt?.shift()) {
|
7535
|
-
|
7708
|
+
this.#disposeAfter?.(...task);
|
7536
7709
|
}
|
7537
7710
|
}
|
7538
7711
|
}
|
7539
7712
|
}
|
7713
|
+
#evict(free) {
|
7714
|
+
const head = this.#head;
|
7715
|
+
const k = this.#keyList[head];
|
7716
|
+
const v = this.#valList[head];
|
7717
|
+
if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
|
7718
|
+
v.__abortController.abort(new Error("evicted"));
|
7719
|
+
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
7720
|
+
if (this.#hasDispose) {
|
7721
|
+
this.#dispose?.(v, k, "evict");
|
7722
|
+
}
|
7723
|
+
if (this.#hasDisposeAfter) {
|
7724
|
+
this.#disposed?.push([v, k, "evict"]);
|
7725
|
+
}
|
7726
|
+
}
|
7727
|
+
this.#removeItemSize(head);
|
7728
|
+
if (free) {
|
7729
|
+
this.#keyList[head] = void 0;
|
7730
|
+
this.#valList[head] = void 0;
|
7731
|
+
this.#free.push(head);
|
7732
|
+
}
|
7733
|
+
if (this.#size === 1) {
|
7734
|
+
this.#head = this.#tail = 0;
|
7735
|
+
this.#free.length = 0;
|
7736
|
+
} else {
|
7737
|
+
this.#head = this.#next[head];
|
7738
|
+
}
|
7739
|
+
this.#keyMap.delete(k);
|
7740
|
+
this.#size--;
|
7741
|
+
return head;
|
7742
|
+
}
|
7540
7743
|
/**
|
7541
7744
|
* Check if a key is in the cache, without updating the recency of use.
|
7542
7745
|
* Will return false if the item is stale, even though it is technically
|
@@ -7555,24 +7758,24 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7555
7758
|
*/
|
7556
7759
|
has(k, hasOptions = {}) {
|
7557
7760
|
const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
|
7558
|
-
const index =
|
7761
|
+
const index = this.#keyMap.get(k);
|
7559
7762
|
if (index !== void 0) {
|
7560
|
-
const v =
|
7561
|
-
if (
|
7763
|
+
const v = this.#valList[index];
|
7764
|
+
if (this.#isBackgroundFetch(v) && v.__staleWhileFetching === void 0) {
|
7562
7765
|
return false;
|
7563
7766
|
}
|
7564
|
-
if (!
|
7767
|
+
if (!this.#isStale(index)) {
|
7565
7768
|
if (updateAgeOnHas) {
|
7566
|
-
|
7769
|
+
this.#updateItemAge(index);
|
7567
7770
|
}
|
7568
7771
|
if (status) {
|
7569
7772
|
status.has = "hit";
|
7570
|
-
|
7773
|
+
this.#statusTTL(status, index);
|
7571
7774
|
}
|
7572
7775
|
return true;
|
7573
7776
|
} else if (status) {
|
7574
7777
|
status.has = "stale";
|
7575
|
-
|
7778
|
+
this.#statusTTL(status, index);
|
7576
7779
|
}
|
7577
7780
|
} else if (status) {
|
7578
7781
|
status.has = "miss";
|
@@ -7588,12 +7791,125 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7588
7791
|
*/
|
7589
7792
|
peek(k, peekOptions = {}) {
|
7590
7793
|
const { allowStale = this.allowStale } = peekOptions;
|
7591
|
-
const index =
|
7592
|
-
if (index === void 0 || !allowStale &&
|
7794
|
+
const index = this.#keyMap.get(k);
|
7795
|
+
if (index === void 0 || !allowStale && this.#isStale(index)) {
|
7593
7796
|
return;
|
7594
7797
|
}
|
7595
|
-
const v =
|
7596
|
-
return
|
7798
|
+
const v = this.#valList[index];
|
7799
|
+
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7800
|
+
}
|
7801
|
+
#backgroundFetch(k, index, options, context) {
|
7802
|
+
const v = index === void 0 ? void 0 : this.#valList[index];
|
7803
|
+
if (this.#isBackgroundFetch(v)) {
|
7804
|
+
return v;
|
7805
|
+
}
|
7806
|
+
const ac = new AC();
|
7807
|
+
const { signal } = options;
|
7808
|
+
signal?.addEventListener("abort", () => ac.abort(signal.reason), {
|
7809
|
+
signal: ac.signal
|
7810
|
+
});
|
7811
|
+
const fetchOpts = {
|
7812
|
+
signal: ac.signal,
|
7813
|
+
options,
|
7814
|
+
context
|
7815
|
+
};
|
7816
|
+
const cb = (v2, updateCache = false) => {
|
7817
|
+
const { aborted } = ac.signal;
|
7818
|
+
const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0;
|
7819
|
+
if (options.status) {
|
7820
|
+
if (aborted && !updateCache) {
|
7821
|
+
options.status.fetchAborted = true;
|
7822
|
+
options.status.fetchError = ac.signal.reason;
|
7823
|
+
if (ignoreAbort)
|
7824
|
+
options.status.fetchAbortIgnored = true;
|
7825
|
+
} else {
|
7826
|
+
options.status.fetchResolved = true;
|
7827
|
+
}
|
7828
|
+
}
|
7829
|
+
if (aborted && !ignoreAbort && !updateCache) {
|
7830
|
+
return fetchFail(ac.signal.reason);
|
7831
|
+
}
|
7832
|
+
const bf2 = p;
|
7833
|
+
if (this.#valList[index] === p) {
|
7834
|
+
if (v2 === void 0) {
|
7835
|
+
if (bf2.__staleWhileFetching) {
|
7836
|
+
this.#valList[index] = bf2.__staleWhileFetching;
|
7837
|
+
} else {
|
7838
|
+
this.#delete(k, "fetch");
|
7839
|
+
}
|
7840
|
+
} else {
|
7841
|
+
if (options.status)
|
7842
|
+
options.status.fetchUpdated = true;
|
7843
|
+
this.set(k, v2, fetchOpts.options);
|
7844
|
+
}
|
7845
|
+
}
|
7846
|
+
return v2;
|
7847
|
+
};
|
7848
|
+
const eb = (er) => {
|
7849
|
+
if (options.status) {
|
7850
|
+
options.status.fetchRejected = true;
|
7851
|
+
options.status.fetchError = er;
|
7852
|
+
}
|
7853
|
+
return fetchFail(er);
|
7854
|
+
};
|
7855
|
+
const fetchFail = (er) => {
|
7856
|
+
const { aborted } = ac.signal;
|
7857
|
+
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
7858
|
+
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
7859
|
+
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
7860
|
+
const bf2 = p;
|
7861
|
+
if (this.#valList[index] === p) {
|
7862
|
+
const del = !noDelete || bf2.__staleWhileFetching === void 0;
|
7863
|
+
if (del) {
|
7864
|
+
this.#delete(k, "fetch");
|
7865
|
+
} else if (!allowStaleAborted) {
|
7866
|
+
this.#valList[index] = bf2.__staleWhileFetching;
|
7867
|
+
}
|
7868
|
+
}
|
7869
|
+
if (allowStale) {
|
7870
|
+
if (options.status && bf2.__staleWhileFetching !== void 0) {
|
7871
|
+
options.status.returnedStale = true;
|
7872
|
+
}
|
7873
|
+
return bf2.__staleWhileFetching;
|
7874
|
+
} else if (bf2.__returned === bf2) {
|
7875
|
+
throw er;
|
7876
|
+
}
|
7877
|
+
};
|
7878
|
+
const pcall = (res, rej) => {
|
7879
|
+
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
7880
|
+
if (fmp && fmp instanceof Promise) {
|
7881
|
+
fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
|
7882
|
+
}
|
7883
|
+
ac.signal.addEventListener("abort", () => {
|
7884
|
+
if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
|
7885
|
+
res(void 0);
|
7886
|
+
if (options.allowStaleOnFetchAbort) {
|
7887
|
+
res = (v2) => cb(v2, true);
|
7888
|
+
}
|
7889
|
+
}
|
7890
|
+
});
|
7891
|
+
};
|
7892
|
+
if (options.status)
|
7893
|
+
options.status.fetchDispatched = true;
|
7894
|
+
const p = new Promise(pcall).then(cb, eb);
|
7895
|
+
const bf = Object.assign(p, {
|
7896
|
+
__abortController: ac,
|
7897
|
+
__staleWhileFetching: v,
|
7898
|
+
__returned: void 0
|
7899
|
+
});
|
7900
|
+
if (index === void 0) {
|
7901
|
+
this.set(k, bf, { ...fetchOpts.options, status: void 0 });
|
7902
|
+
index = this.#keyMap.get(k);
|
7903
|
+
} else {
|
7904
|
+
this.#valList[index] = bf;
|
7905
|
+
}
|
7906
|
+
return bf;
|
7907
|
+
}
|
7908
|
+
#isBackgroundFetch(p) {
|
7909
|
+
if (!this.#hasFetchMethod)
|
7910
|
+
return false;
|
7911
|
+
const b = p;
|
7912
|
+
return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
|
7597
7913
|
}
|
7598
7914
|
async fetch(k, fetchOptions = {}) {
|
7599
7915
|
const {
|
@@ -7617,7 +7933,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7617
7933
|
status,
|
7618
7934
|
signal
|
7619
7935
|
} = fetchOptions;
|
7620
|
-
if (!
|
7936
|
+
if (!this.#hasFetchMethod) {
|
7621
7937
|
if (status)
|
7622
7938
|
status.fetch = "get";
|
7623
7939
|
return this.get(k, {
|
@@ -7643,15 +7959,15 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7643
7959
|
status,
|
7644
7960
|
signal
|
7645
7961
|
};
|
7646
|
-
let index =
|
7962
|
+
let index = this.#keyMap.get(k);
|
7647
7963
|
if (index === void 0) {
|
7648
7964
|
if (status)
|
7649
7965
|
status.fetch = "miss";
|
7650
|
-
const p =
|
7966
|
+
const p = this.#backgroundFetch(k, index, options, context);
|
7651
7967
|
return p.__returned = p;
|
7652
7968
|
} else {
|
7653
|
-
const v =
|
7654
|
-
if (
|
7969
|
+
const v = this.#valList[index];
|
7970
|
+
if (this.#isBackgroundFetch(v)) {
|
7655
7971
|
const stale = allowStale && v.__staleWhileFetching !== void 0;
|
7656
7972
|
if (status) {
|
7657
7973
|
status.fetch = "inflight";
|
@@ -7660,19 +7976,19 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7660
7976
|
}
|
7661
7977
|
return stale ? v.__staleWhileFetching : v.__returned = v;
|
7662
7978
|
}
|
7663
|
-
const isStale =
|
7979
|
+
const isStale = this.#isStale(index);
|
7664
7980
|
if (!forceRefresh && !isStale) {
|
7665
7981
|
if (status)
|
7666
7982
|
status.fetch = "hit";
|
7667
|
-
|
7983
|
+
this.#moveToTail(index);
|
7668
7984
|
if (updateAgeOnGet) {
|
7669
|
-
|
7985
|
+
this.#updateItemAge(index);
|
7670
7986
|
}
|
7671
7987
|
if (status)
|
7672
|
-
|
7988
|
+
this.#statusTTL(status, index);
|
7673
7989
|
return v;
|
7674
7990
|
}
|
7675
|
-
const p =
|
7991
|
+
const p = this.#backgroundFetch(k, index, options, context);
|
7676
7992
|
const hasStale = p.__staleWhileFetching !== void 0;
|
7677
7993
|
const staleVal = hasStale && allowStale;
|
7678
7994
|
if (status) {
|
@@ -7690,7 +8006,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7690
8006
|
return v;
|
7691
8007
|
}
|
7692
8008
|
memo(k, memoOptions = {}) {
|
7693
|
-
const memoMethod =
|
8009
|
+
const memoMethod = this.#memoMethod;
|
7694
8010
|
if (!memoMethod) {
|
7695
8011
|
throw new Error("no memoMethod provided to constructor");
|
7696
8012
|
}
|
@@ -7713,18 +8029,18 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7713
8029
|
*/
|
7714
8030
|
get(k, getOptions = {}) {
|
7715
8031
|
const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions;
|
7716
|
-
const index =
|
8032
|
+
const index = this.#keyMap.get(k);
|
7717
8033
|
if (index !== void 0) {
|
7718
|
-
const value =
|
7719
|
-
const fetching =
|
8034
|
+
const value = this.#valList[index];
|
8035
|
+
const fetching = this.#isBackgroundFetch(value);
|
7720
8036
|
if (status)
|
7721
|
-
|
7722
|
-
if (
|
8037
|
+
this.#statusTTL(status, index);
|
8038
|
+
if (this.#isStale(index)) {
|
7723
8039
|
if (status)
|
7724
8040
|
status.get = "stale";
|
7725
8041
|
if (!fetching) {
|
7726
8042
|
if (!noDeleteOnStaleGet) {
|
7727
|
-
|
8043
|
+
this.#delete(k, "expire");
|
7728
8044
|
}
|
7729
8045
|
if (status && allowStale)
|
7730
8046
|
status.returnedStale = true;
|
@@ -7741,9 +8057,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7741
8057
|
if (fetching) {
|
7742
8058
|
return value.__staleWhileFetching;
|
7743
8059
|
}
|
7744
|
-
|
8060
|
+
this.#moveToTail(index);
|
7745
8061
|
if (updateAgeOnGet) {
|
7746
|
-
|
8062
|
+
this.#updateItemAge(index);
|
7747
8063
|
}
|
7748
8064
|
return value;
|
7749
8065
|
}
|
@@ -7751,450 +8067,126 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7751
8067
|
status.get = "miss";
|
7752
8068
|
}
|
7753
8069
|
}
|
8070
|
+
#connect(p, n) {
|
8071
|
+
this.#prev[n] = p;
|
8072
|
+
this.#next[p] = n;
|
8073
|
+
}
|
8074
|
+
#moveToTail(index) {
|
8075
|
+
if (index !== this.#tail) {
|
8076
|
+
if (index === this.#head) {
|
8077
|
+
this.#head = this.#next[index];
|
8078
|
+
} else {
|
8079
|
+
this.#connect(this.#prev[index], this.#next[index]);
|
8080
|
+
}
|
8081
|
+
this.#connect(this.#tail, index);
|
8082
|
+
this.#tail = index;
|
8083
|
+
}
|
8084
|
+
}
|
7754
8085
|
/**
|
7755
8086
|
* Deletes a key out of the cache.
|
7756
8087
|
*
|
7757
8088
|
* Returns true if the key was deleted, false otherwise.
|
7758
8089
|
*/
|
7759
8090
|
delete(k) {
|
7760
|
-
return
|
8091
|
+
return this.#delete(k, "delete");
|
7761
8092
|
}
|
7762
|
-
|
7763
|
-
|
7764
|
-
|
7765
|
-
|
7766
|
-
|
7767
|
-
|
7768
|
-
|
7769
|
-
|
7770
|
-
|
7771
|
-
|
7772
|
-
|
7773
|
-
|
7774
|
-
|
7775
|
-
|
7776
|
-
|
7777
|
-
|
7778
|
-
|
7779
|
-
|
7780
|
-
|
7781
|
-
|
7782
|
-
|
7783
|
-
|
7784
|
-
|
7785
|
-
|
7786
|
-
|
7787
|
-
|
7788
|
-
|
7789
|
-
|
7790
|
-
|
7791
|
-
|
7792
|
-
|
7793
|
-
|
7794
|
-
|
7795
|
-
|
7796
|
-
|
7797
|
-
|
7798
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _setItemTTL, (index, ttl, start = perf.now()) => {
|
7799
|
-
starts[index] = ttl !== 0 ? start : 0;
|
7800
|
-
ttls[index] = ttl;
|
7801
|
-
if (ttl !== 0 && this.ttlAutopurge) {
|
7802
|
-
const t = setTimeout(() => {
|
7803
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _isStale).call(this, index)) {
|
7804
|
-
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[index], "expire");
|
7805
|
-
}
|
7806
|
-
}, ttl + 1);
|
7807
|
-
if (t.unref) {
|
7808
|
-
t.unref();
|
7809
|
-
}
|
7810
|
-
}
|
7811
|
-
});
|
7812
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _updateItemAge, (index) => {
|
7813
|
-
starts[index] = ttls[index] !== 0 ? perf.now() : 0;
|
7814
|
-
});
|
7815
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _statusTTL, (status, index) => {
|
7816
|
-
if (ttls[index]) {
|
7817
|
-
const ttl = ttls[index];
|
7818
|
-
const start = starts[index];
|
7819
|
-
if (!ttl || !start)
|
7820
|
-
return;
|
7821
|
-
status.ttl = ttl;
|
7822
|
-
status.start = start;
|
7823
|
-
status.now = cachedNow || getNow();
|
7824
|
-
const age = status.now - start;
|
7825
|
-
status.remainingTTL = ttl - age;
|
7826
|
-
}
|
7827
|
-
});
|
7828
|
-
let cachedNow = 0;
|
7829
|
-
const getNow = () => {
|
7830
|
-
const n = perf.now();
|
7831
|
-
if (this.ttlResolution > 0) {
|
7832
|
-
cachedNow = n;
|
7833
|
-
const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
|
7834
|
-
if (t.unref) {
|
7835
|
-
t.unref();
|
7836
|
-
}
|
7837
|
-
}
|
7838
|
-
return n;
|
7839
|
-
};
|
7840
|
-
this.getRemainingTTL = (key) => {
|
7841
|
-
const index = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).get(key);
|
7842
|
-
if (index === void 0) {
|
7843
|
-
return 0;
|
7844
|
-
}
|
7845
|
-
const ttl = ttls[index];
|
7846
|
-
const start = starts[index];
|
7847
|
-
if (!ttl || !start) {
|
7848
|
-
return Infinity;
|
7849
|
-
}
|
7850
|
-
const age = (cachedNow || getNow()) - start;
|
7851
|
-
return ttl - age;
|
7852
|
-
};
|
7853
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _isStale, (index) => {
|
7854
|
-
const s = starts[index];
|
7855
|
-
const t = ttls[index];
|
7856
|
-
return !!t && !!s && (cachedNow || getNow()) - s > t;
|
7857
|
-
});
|
7858
|
-
};
|
7859
|
-
_updateItemAge = /* @__PURE__ */ new WeakMap();
|
7860
|
-
_statusTTL = /* @__PURE__ */ new WeakMap();
|
7861
|
-
_setItemTTL = /* @__PURE__ */ new WeakMap();
|
7862
|
-
_isStale = /* @__PURE__ */ new WeakMap();
|
7863
|
-
initializeSizeTracking_fn = function() {
|
7864
|
-
const sizes = new ZeroArray((0, import_chunk_WWAWV7DQ.__privateGet)(this, _max));
|
7865
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _calculatedSize, 0);
|
7866
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _sizes, sizes);
|
7867
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _removeItemSize, (index) => {
|
7868
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _calculatedSize, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _calculatedSize) - sizes[index]);
|
7869
|
-
sizes[index] = 0;
|
7870
|
-
});
|
7871
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _requireSize, (k, v, size, sizeCalculation) => {
|
7872
|
-
if ((0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isBackgroundFetch_fn).call(this, v)) {
|
7873
|
-
return 0;
|
7874
|
-
}
|
7875
|
-
if (!isPosInt(size)) {
|
7876
|
-
if (sizeCalculation) {
|
7877
|
-
if (typeof sizeCalculation !== "function") {
|
7878
|
-
throw new TypeError("sizeCalculation must be a function");
|
7879
|
-
}
|
7880
|
-
size = sizeCalculation(v, k);
|
7881
|
-
if (!isPosInt(size)) {
|
7882
|
-
throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
8093
|
+
#delete(k, reason) {
|
8094
|
+
let deleted = false;
|
8095
|
+
if (this.#size !== 0) {
|
8096
|
+
const index = this.#keyMap.get(k);
|
8097
|
+
if (index !== void 0) {
|
8098
|
+
deleted = true;
|
8099
|
+
if (this.#size === 1) {
|
8100
|
+
this.#clear(reason);
|
8101
|
+
} else {
|
8102
|
+
this.#removeItemSize(index);
|
8103
|
+
const v = this.#valList[index];
|
8104
|
+
if (this.#isBackgroundFetch(v)) {
|
8105
|
+
v.__abortController.abort(new Error("deleted"));
|
8106
|
+
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
8107
|
+
if (this.#hasDispose) {
|
8108
|
+
this.#dispose?.(v, k, reason);
|
8109
|
+
}
|
8110
|
+
if (this.#hasDisposeAfter) {
|
8111
|
+
this.#disposed?.push([v, k, reason]);
|
8112
|
+
}
|
8113
|
+
}
|
8114
|
+
this.#keyMap.delete(k);
|
8115
|
+
this.#keyList[index] = void 0;
|
8116
|
+
this.#valList[index] = void 0;
|
8117
|
+
if (index === this.#tail) {
|
8118
|
+
this.#tail = this.#prev[index];
|
8119
|
+
} else if (index === this.#head) {
|
8120
|
+
this.#head = this.#next[index];
|
8121
|
+
} else {
|
8122
|
+
const pi = this.#prev[index];
|
8123
|
+
this.#next[pi] = this.#next[index];
|
8124
|
+
const ni = this.#next[index];
|
8125
|
+
this.#prev[ni] = this.#prev[index];
|
8126
|
+
}
|
8127
|
+
this.#size--;
|
8128
|
+
this.#free.push(index);
|
7883
8129
|
}
|
7884
|
-
} else {
|
7885
|
-
throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
7886
|
-
}
|
7887
|
-
}
|
7888
|
-
return size;
|
7889
|
-
});
|
7890
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _addItemSize, (index, size, status) => {
|
7891
|
-
sizes[index] = size;
|
7892
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _maxSize)) {
|
7893
|
-
const maxSize = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _maxSize) - sizes[index];
|
7894
|
-
while ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _calculatedSize) > maxSize) {
|
7895
|
-
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, evict_fn).call(this, true);
|
7896
|
-
}
|
7897
|
-
}
|
7898
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _calculatedSize, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _calculatedSize) + sizes[index]);
|
7899
|
-
if (status) {
|
7900
|
-
status.entrySize = size;
|
7901
|
-
status.totalCalculatedSize = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _calculatedSize);
|
7902
|
-
}
|
7903
|
-
});
|
7904
|
-
};
|
7905
|
-
_removeItemSize = /* @__PURE__ */ new WeakMap();
|
7906
|
-
_addItemSize = /* @__PURE__ */ new WeakMap();
|
7907
|
-
_requireSize = /* @__PURE__ */ new WeakMap();
|
7908
|
-
indexes_fn = function* ({ allowStale = this.allowStale } = {}) {
|
7909
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size)) {
|
7910
|
-
for (let i = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _tail); true; ) {
|
7911
|
-
if (!(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isValidIndex_fn).call(this, i)) {
|
7912
|
-
break;
|
7913
|
-
}
|
7914
|
-
if (allowStale || !(0, import_chunk_WWAWV7DQ.__privateGet)(this, _isStale).call(this, i)) {
|
7915
|
-
yield i;
|
7916
|
-
}
|
7917
|
-
if (i === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head)) {
|
7918
|
-
break;
|
7919
|
-
} else {
|
7920
|
-
i = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[i];
|
7921
8130
|
}
|
7922
8131
|
}
|
7923
|
-
|
7924
|
-
|
7925
|
-
|
7926
|
-
|
7927
|
-
|
7928
|
-
if (!(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isValidIndex_fn).call(this, i)) {
|
7929
|
-
break;
|
7930
|
-
}
|
7931
|
-
if (allowStale || !(0, import_chunk_WWAWV7DQ.__privateGet)(this, _isStale).call(this, i)) {
|
7932
|
-
yield i;
|
7933
|
-
}
|
7934
|
-
if (i === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _tail)) {
|
7935
|
-
break;
|
7936
|
-
} else {
|
7937
|
-
i = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[i];
|
8132
|
+
if (this.#hasDisposeAfter && this.#disposed?.length) {
|
8133
|
+
const dt = this.#disposed;
|
8134
|
+
let task;
|
8135
|
+
while (task = dt?.shift()) {
|
8136
|
+
this.#disposeAfter?.(...task);
|
7938
8137
|
}
|
7939
8138
|
}
|
8139
|
+
return deleted;
|
7940
8140
|
}
|
7941
|
-
|
7942
|
-
|
7943
|
-
|
7944
|
-
|
7945
|
-
|
7946
|
-
var _a2;
|
7947
|
-
const head = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head);
|
7948
|
-
const k = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[head];
|
7949
|
-
const v = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[head];
|
7950
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasFetchMethod) && (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isBackgroundFetch_fn).call(this, v)) {
|
7951
|
-
v.__abortController.abort(new Error("evicted"));
|
7952
|
-
} else if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose) || (0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
7953
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose)) {
|
7954
|
-
(_a2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _dispose)) == null ? void 0 : _a2.call(this, v, k, "evict");
|
7955
|
-
}
|
7956
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
7957
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.push([v, k, "evict"]);
|
7958
|
-
}
|
7959
|
-
}
|
7960
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _removeItemSize).call(this, head);
|
7961
|
-
if (free) {
|
7962
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[head] = void 0;
|
7963
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[head] = void 0;
|
7964
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _free).push(head);
|
7965
|
-
}
|
7966
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size) === 1) {
|
7967
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, (0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, 0));
|
7968
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _free).length = 0;
|
7969
|
-
} else {
|
7970
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[head]);
|
7971
|
-
}
|
7972
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).delete(k);
|
7973
|
-
(0, import_chunk_WWAWV7DQ.__privateWrapper)(this, _size)._--;
|
7974
|
-
return head;
|
7975
|
-
};
|
7976
|
-
backgroundFetch_fn = function(k, index, options, context) {
|
7977
|
-
const v = index === void 0 ? void 0 : (0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index];
|
7978
|
-
if ((0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isBackgroundFetch_fn).call(this, v)) {
|
7979
|
-
return v;
|
8141
|
+
/**
|
8142
|
+
* Clear the cache entirely, throwing away all values.
|
8143
|
+
*/
|
8144
|
+
clear() {
|
8145
|
+
return this.#clear("delete");
|
7980
8146
|
}
|
7981
|
-
|
7982
|
-
|
7983
|
-
|
7984
|
-
|
7985
|
-
|
7986
|
-
const fetchOpts = {
|
7987
|
-
signal: ac.signal,
|
7988
|
-
options,
|
7989
|
-
context
|
7990
|
-
};
|
7991
|
-
const cb = (v2, updateCache = false) => {
|
7992
|
-
const { aborted } = ac.signal;
|
7993
|
-
const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0;
|
7994
|
-
if (options.status) {
|
7995
|
-
if (aborted && !updateCache) {
|
7996
|
-
options.status.fetchAborted = true;
|
7997
|
-
options.status.fetchError = ac.signal.reason;
|
7998
|
-
if (ignoreAbort)
|
7999
|
-
options.status.fetchAbortIgnored = true;
|
8147
|
+
#clear(reason) {
|
8148
|
+
for (const index of this.#rindexes({ allowStale: true })) {
|
8149
|
+
const v = this.#valList[index];
|
8150
|
+
if (this.#isBackgroundFetch(v)) {
|
8151
|
+
v.__abortController.abort(new Error("deleted"));
|
8000
8152
|
} else {
|
8001
|
-
|
8002
|
-
|
8003
|
-
|
8004
|
-
if (aborted && !ignoreAbort && !updateCache) {
|
8005
|
-
return fetchFail(ac.signal.reason);
|
8006
|
-
}
|
8007
|
-
const bf2 = p;
|
8008
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] === p) {
|
8009
|
-
if (v2 === void 0) {
|
8010
|
-
if (bf2.__staleWhileFetching) {
|
8011
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] = bf2.__staleWhileFetching;
|
8012
|
-
} else {
|
8013
|
-
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, k, "fetch");
|
8153
|
+
const k = this.#keyList[index];
|
8154
|
+
if (this.#hasDispose) {
|
8155
|
+
this.#dispose?.(v, k, reason);
|
8014
8156
|
}
|
8015
|
-
|
8016
|
-
|
8017
|
-
options.status.fetchUpdated = true;
|
8018
|
-
this.set(k, v2, fetchOpts.options);
|
8019
|
-
}
|
8020
|
-
}
|
8021
|
-
return v2;
|
8022
|
-
};
|
8023
|
-
const eb = (er) => {
|
8024
|
-
if (options.status) {
|
8025
|
-
options.status.fetchRejected = true;
|
8026
|
-
options.status.fetchError = er;
|
8027
|
-
}
|
8028
|
-
return fetchFail(er);
|
8029
|
-
};
|
8030
|
-
const fetchFail = (er) => {
|
8031
|
-
const { aborted } = ac.signal;
|
8032
|
-
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
8033
|
-
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
8034
|
-
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
8035
|
-
const bf2 = p;
|
8036
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] === p) {
|
8037
|
-
const del = !noDelete || bf2.__staleWhileFetching === void 0;
|
8038
|
-
if (del) {
|
8039
|
-
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, k, "fetch");
|
8040
|
-
} else if (!allowStaleAborted) {
|
8041
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] = bf2.__staleWhileFetching;
|
8042
|
-
}
|
8043
|
-
}
|
8044
|
-
if (allowStale) {
|
8045
|
-
if (options.status && bf2.__staleWhileFetching !== void 0) {
|
8046
|
-
options.status.returnedStale = true;
|
8047
|
-
}
|
8048
|
-
return bf2.__staleWhileFetching;
|
8049
|
-
} else if (bf2.__returned === bf2) {
|
8050
|
-
throw er;
|
8051
|
-
}
|
8052
|
-
};
|
8053
|
-
const pcall = (res, rej) => {
|
8054
|
-
var _a2;
|
8055
|
-
const fmp = (_a2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _fetchMethod)) == null ? void 0 : _a2.call(this, k, v, fetchOpts);
|
8056
|
-
if (fmp && fmp instanceof Promise) {
|
8057
|
-
fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
|
8058
|
-
}
|
8059
|
-
ac.signal.addEventListener("abort", () => {
|
8060
|
-
if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
|
8061
|
-
res(void 0);
|
8062
|
-
if (options.allowStaleOnFetchAbort) {
|
8063
|
-
res = (v2) => cb(v2, true);
|
8157
|
+
if (this.#hasDisposeAfter) {
|
8158
|
+
this.#disposed?.push([v, k, reason]);
|
8064
8159
|
}
|
8065
8160
|
}
|
8066
|
-
});
|
8067
|
-
};
|
8068
|
-
if (options.status)
|
8069
|
-
options.status.fetchDispatched = true;
|
8070
|
-
const p = new Promise(pcall).then(cb, eb);
|
8071
|
-
const bf = Object.assign(p, {
|
8072
|
-
__abortController: ac,
|
8073
|
-
__staleWhileFetching: v,
|
8074
|
-
__returned: void 0
|
8075
|
-
});
|
8076
|
-
if (index === void 0) {
|
8077
|
-
this.set(k, bf, { ...fetchOpts.options, status: void 0 });
|
8078
|
-
index = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).get(k);
|
8079
|
-
} else {
|
8080
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] = bf;
|
8081
|
-
}
|
8082
|
-
return bf;
|
8083
|
-
};
|
8084
|
-
isBackgroundFetch_fn = function(p) {
|
8085
|
-
if (!(0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasFetchMethod))
|
8086
|
-
return false;
|
8087
|
-
const b = p;
|
8088
|
-
return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
|
8089
|
-
};
|
8090
|
-
connect_fn = function(p, n) {
|
8091
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[n] = p;
|
8092
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[p] = n;
|
8093
|
-
};
|
8094
|
-
moveToTail_fn = function(index) {
|
8095
|
-
if (index !== (0, import_chunk_WWAWV7DQ.__privateGet)(this, _tail)) {
|
8096
|
-
if (index === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head)) {
|
8097
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index]);
|
8098
|
-
} else {
|
8099
|
-
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, connect_fn).call(this, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index], (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index]);
|
8100
8161
|
}
|
8101
|
-
|
8102
|
-
|
8103
|
-
|
8104
|
-
|
8105
|
-
|
8106
|
-
|
8107
|
-
let deleted = false;
|
8108
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size) !== 0) {
|
8109
|
-
const index = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).get(k);
|
8110
|
-
if (index !== void 0) {
|
8111
|
-
deleted = true;
|
8112
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size) === 1) {
|
8113
|
-
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, clear_fn).call(this, reason);
|
8114
|
-
} else {
|
8115
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _removeItemSize).call(this, index);
|
8116
|
-
const v = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index];
|
8117
|
-
if ((0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isBackgroundFetch_fn).call(this, v)) {
|
8118
|
-
v.__abortController.abort(new Error("deleted"));
|
8119
|
-
} else if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose) || (0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
8120
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose)) {
|
8121
|
-
(_a2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _dispose)) == null ? void 0 : _a2.call(this, v, k, reason);
|
8122
|
-
}
|
8123
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
8124
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.push([v, k, reason]);
|
8125
|
-
}
|
8126
|
-
}
|
8127
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).delete(k);
|
8128
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[index] = void 0;
|
8129
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] = void 0;
|
8130
|
-
if (index === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _tail)) {
|
8131
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index]);
|
8132
|
-
} else if (index === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head)) {
|
8133
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index]);
|
8134
|
-
} else {
|
8135
|
-
const pi = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index];
|
8136
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[pi] = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index];
|
8137
|
-
const ni = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index];
|
8138
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[ni] = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index];
|
8139
|
-
}
|
8140
|
-
(0, import_chunk_WWAWV7DQ.__privateWrapper)(this, _size)._--;
|
8141
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _free).push(index);
|
8142
|
-
}
|
8162
|
+
this.#keyMap.clear();
|
8163
|
+
this.#valList.fill(void 0);
|
8164
|
+
this.#keyList.fill(void 0);
|
8165
|
+
if (this.#ttls && this.#starts) {
|
8166
|
+
this.#ttls.fill(0);
|
8167
|
+
this.#starts.fill(0);
|
8143
8168
|
}
|
8144
|
-
|
8145
|
-
|
8146
|
-
const dt = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed);
|
8147
|
-
let task;
|
8148
|
-
while (task = dt?.shift()) {
|
8149
|
-
(_b2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposeAfter)) == null ? void 0 : _b2.call(this, ...task);
|
8169
|
+
if (this.#sizes) {
|
8170
|
+
this.#sizes.fill(0);
|
8150
8171
|
}
|
8151
|
-
|
8152
|
-
|
8153
|
-
|
8154
|
-
|
8155
|
-
|
8156
|
-
|
8157
|
-
|
8158
|
-
|
8159
|
-
|
8160
|
-
|
8161
|
-
const k = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[index];
|
8162
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose)) {
|
8163
|
-
(_a2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _dispose)) == null ? void 0 : _a2.call(this, v, k, reason);
|
8164
|
-
}
|
8165
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
8166
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.push([v, k, reason]);
|
8172
|
+
this.#head = 0;
|
8173
|
+
this.#tail = 0;
|
8174
|
+
this.#free.length = 0;
|
8175
|
+
this.#calculatedSize = 0;
|
8176
|
+
this.#size = 0;
|
8177
|
+
if (this.#hasDisposeAfter && this.#disposed) {
|
8178
|
+
const dt = this.#disposed;
|
8179
|
+
let task;
|
8180
|
+
while (task = dt?.shift()) {
|
8181
|
+
this.#disposeAfter?.(...task);
|
8167
8182
|
}
|
8168
8183
|
}
|
8169
8184
|
}
|
8170
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).clear();
|
8171
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList).fill(void 0);
|
8172
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList).fill(void 0);
|
8173
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _ttls) && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _starts)) {
|
8174
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _ttls).fill(0);
|
8175
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _starts).fill(0);
|
8176
|
-
}
|
8177
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _sizes)) {
|
8178
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _sizes).fill(0);
|
8179
|
-
}
|
8180
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, 0);
|
8181
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, 0);
|
8182
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _free).length = 0;
|
8183
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _calculatedSize, 0);
|
8184
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _size, 0);
|
8185
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter) && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)) {
|
8186
|
-
const dt = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed);
|
8187
|
-
let task;
|
8188
|
-
while (task = dt?.shift()) {
|
8189
|
-
(_b2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposeAfter)) == null ? void 0 : _b2.call(this, ...task);
|
8190
|
-
}
|
8191
|
-
}
|
8192
8185
|
};
|
8193
|
-
var LRUCache = _LRUCache;
|
8194
8186
|
exports.LRUCache = LRUCache;
|
8195
8187
|
}
|
8196
8188
|
});
|
8197
|
-
var require_hosts = (0,
|
8189
|
+
var require_hosts = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8198
8190
|
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/hosts.js"(exports, module2) {
|
8199
8191
|
"use strict";
|
8200
8192
|
var maybeJoin = (...args) => args.every((arg) => arg) ? args.join("") : "";
|
@@ -8359,10 +8351,10 @@ var require_hosts = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8359
8351
|
module2.exports = hosts;
|
8360
8352
|
}
|
8361
8353
|
});
|
8362
|
-
var require_parse_url = (0,
|
8354
|
+
var require_parse_url = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8363
8355
|
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/parse-url.js"(exports, module2) {
|
8364
8356
|
"use strict";
|
8365
|
-
var url = (0,
|
8357
|
+
var url = (0, import_chunk_2ESYSVXG.__require)("url");
|
8366
8358
|
var lastIndexOfBefore = (str, char, beforeChar) => {
|
8367
8359
|
const startPosition = str.indexOf(beforeChar);
|
8368
8360
|
return str.lastIndexOf(char, startPosition > -1 ? startPosition : Infinity);
|
@@ -8410,7 +8402,7 @@ var require_parse_url = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8410
8402
|
};
|
8411
8403
|
}
|
8412
8404
|
});
|
8413
|
-
var require_from_url = (0,
|
8405
|
+
var require_from_url = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8414
8406
|
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/from-url.js"(exports, module2) {
|
8415
8407
|
"use strict";
|
8416
8408
|
var parseUrl = require_parse_url();
|
@@ -8502,7 +8494,7 @@ var require_from_url = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8502
8494
|
};
|
8503
8495
|
}
|
8504
8496
|
});
|
8505
|
-
var require_lib8 = (0,
|
8497
|
+
var require_lib8 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8506
8498
|
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/index.js"(exports, module2) {
|
8507
8499
|
"use strict";
|
8508
8500
|
var { LRUCache } = require_commonjs();
|
@@ -8510,11 +8502,9 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8510
8502
|
var fromUrl = require_from_url();
|
8511
8503
|
var parseUrl = require_parse_url();
|
8512
8504
|
var cache = new LRUCache({ max: 1e3 });
|
8513
|
-
var
|
8514
|
-
var _GitHost = class _GitHost2 {
|
8505
|
+
var GitHost = class _GitHost {
|
8515
8506
|
constructor(type, user, auth, project, committish, defaultRepresentation, opts = {}) {
|
8516
|
-
|
8517
|
-
Object.assign(this, (0, import_chunk_WWAWV7DQ.__privateGet)(_GitHost2, _gitHosts)[type], {
|
8507
|
+
Object.assign(this, _GitHost.#gitHosts[type], {
|
8518
8508
|
type,
|
8519
8509
|
user,
|
8520
8510
|
auth,
|
@@ -8524,11 +8514,21 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8524
8514
|
opts
|
8525
8515
|
});
|
8526
8516
|
}
|
8517
|
+
static #gitHosts = { byShortcut: {}, byDomain: {} };
|
8518
|
+
static #protocols = {
|
8519
|
+
"git+ssh:": { name: "sshurl" },
|
8520
|
+
"ssh:": { name: "sshurl" },
|
8521
|
+
"git+https:": { name: "https", auth: true },
|
8522
|
+
"git:": { auth: true },
|
8523
|
+
"http:": { auth: true },
|
8524
|
+
"https:": { auth: true },
|
8525
|
+
"git+http:": { auth: true }
|
8526
|
+
};
|
8527
8527
|
static addHost(name, host) {
|
8528
|
-
|
8529
|
-
|
8530
|
-
|
8531
|
-
|
8528
|
+
_GitHost.#gitHosts[name] = host;
|
8529
|
+
_GitHost.#gitHosts.byDomain[host.domain] = name;
|
8530
|
+
_GitHost.#gitHosts.byShortcut[`${name}:`] = name;
|
8531
|
+
_GitHost.#protocols[`${name}:`] = { name };
|
8532
8532
|
}
|
8533
8533
|
static fromUrl(giturl, opts) {
|
8534
8534
|
if (typeof giturl !== "string") {
|
@@ -8537,33 +8537,50 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8537
8537
|
const key = giturl + JSON.stringify(opts || {});
|
8538
8538
|
if (!cache.has(key)) {
|
8539
8539
|
const hostArgs = fromUrl(giturl, opts, {
|
8540
|
-
gitHosts:
|
8541
|
-
protocols:
|
8540
|
+
gitHosts: _GitHost.#gitHosts,
|
8541
|
+
protocols: _GitHost.#protocols
|
8542
8542
|
});
|
8543
|
-
cache.set(key, hostArgs ? new
|
8543
|
+
cache.set(key, hostArgs ? new _GitHost(...hostArgs) : void 0);
|
8544
8544
|
}
|
8545
8545
|
return cache.get(key);
|
8546
8546
|
}
|
8547
8547
|
static parseUrl(url) {
|
8548
8548
|
return parseUrl(url);
|
8549
8549
|
}
|
8550
|
+
#fill(template, opts) {
|
8551
|
+
if (typeof template !== "function") {
|
8552
|
+
return null;
|
8553
|
+
}
|
8554
|
+
const options = { ...this, ...this.opts, ...opts };
|
8555
|
+
if (!options.path) {
|
8556
|
+
options.path = "";
|
8557
|
+
}
|
8558
|
+
if (options.path.startsWith("/")) {
|
8559
|
+
options.path = options.path.slice(1);
|
8560
|
+
}
|
8561
|
+
if (options.noCommittish) {
|
8562
|
+
options.committish = null;
|
8563
|
+
}
|
8564
|
+
const result = template(options);
|
8565
|
+
return options.noGitPlus && result.startsWith("git+") ? result.slice(4) : result;
|
8566
|
+
}
|
8550
8567
|
hash() {
|
8551
8568
|
return this.committish ? `#${this.committish}` : "";
|
8552
8569
|
}
|
8553
8570
|
ssh(opts) {
|
8554
|
-
return
|
8571
|
+
return this.#fill(this.sshtemplate, opts);
|
8555
8572
|
}
|
8556
8573
|
sshurl(opts) {
|
8557
|
-
return
|
8574
|
+
return this.#fill(this.sshurltemplate, opts);
|
8558
8575
|
}
|
8559
8576
|
browse(path5, ...args) {
|
8560
8577
|
if (typeof path5 !== "string") {
|
8561
|
-
return
|
8578
|
+
return this.#fill(this.browsetemplate, path5);
|
8562
8579
|
}
|
8563
8580
|
if (typeof args[0] !== "string") {
|
8564
|
-
return
|
8581
|
+
return this.#fill(this.browsetreetemplate, { ...args[0], path: path5 });
|
8565
8582
|
}
|
8566
|
-
return
|
8583
|
+
return this.#fill(this.browsetreetemplate, { ...args[1], fragment: args[0], path: path5 });
|
8567
8584
|
}
|
8568
8585
|
// If the path is known to be a file, then browseFile should be used. For some hosts
|
8569
8586
|
// the url is the same as browse, but for others like GitHub a file can use both `/tree/`
|
@@ -8572,36 +8589,36 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8572
8589
|
// does not redirect to a different commit.
|
8573
8590
|
browseFile(path5, ...args) {
|
8574
8591
|
if (typeof args[0] !== "string") {
|
8575
|
-
return
|
8592
|
+
return this.#fill(this.browseblobtemplate, { ...args[0], path: path5 });
|
8576
8593
|
}
|
8577
|
-
return
|
8594
|
+
return this.#fill(this.browseblobtemplate, { ...args[1], fragment: args[0], path: path5 });
|
8578
8595
|
}
|
8579
8596
|
docs(opts) {
|
8580
|
-
return
|
8597
|
+
return this.#fill(this.docstemplate, opts);
|
8581
8598
|
}
|
8582
8599
|
bugs(opts) {
|
8583
|
-
return
|
8600
|
+
return this.#fill(this.bugstemplate, opts);
|
8584
8601
|
}
|
8585
8602
|
https(opts) {
|
8586
|
-
return
|
8603
|
+
return this.#fill(this.httpstemplate, opts);
|
8587
8604
|
}
|
8588
8605
|
git(opts) {
|
8589
|
-
return
|
8606
|
+
return this.#fill(this.gittemplate, opts);
|
8590
8607
|
}
|
8591
8608
|
shortcut(opts) {
|
8592
|
-
return
|
8609
|
+
return this.#fill(this.shortcuttemplate, opts);
|
8593
8610
|
}
|
8594
8611
|
path(opts) {
|
8595
|
-
return
|
8612
|
+
return this.#fill(this.pathtemplate, opts);
|
8596
8613
|
}
|
8597
8614
|
tarball(opts) {
|
8598
|
-
return
|
8615
|
+
return this.#fill(this.tarballtemplate, { ...opts, noCommittish: false });
|
8599
8616
|
}
|
8600
8617
|
file(path5, opts) {
|
8601
|
-
return
|
8618
|
+
return this.#fill(this.filetemplate, { ...opts, path: path5 });
|
8602
8619
|
}
|
8603
8620
|
edit(path5, opts) {
|
8604
|
-
return
|
8621
|
+
return this.#fill(this.edittemplate, { ...opts, path: path5 });
|
8605
8622
|
}
|
8606
8623
|
getDefaultRepresentation() {
|
8607
8624
|
return this.default;
|
@@ -8613,53 +8630,22 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8613
8630
|
return this.sshurl(opts);
|
8614
8631
|
}
|
8615
8632
|
};
|
8616
|
-
_gitHosts = /* @__PURE__ */ new WeakMap();
|
8617
|
-
_protocols = /* @__PURE__ */ new WeakMap();
|
8618
|
-
_GitHost_instances = /* @__PURE__ */ new WeakSet();
|
8619
|
-
fill_fn = function(template, opts) {
|
8620
|
-
if (typeof template !== "function") {
|
8621
|
-
return null;
|
8622
|
-
}
|
8623
|
-
const options = { ...this, ...this.opts, ...opts };
|
8624
|
-
if (!options.path) {
|
8625
|
-
options.path = "";
|
8626
|
-
}
|
8627
|
-
if (options.path.startsWith("/")) {
|
8628
|
-
options.path = options.path.slice(1);
|
8629
|
-
}
|
8630
|
-
if (options.noCommittish) {
|
8631
|
-
options.committish = null;
|
8632
|
-
}
|
8633
|
-
const result = template(options);
|
8634
|
-
return options.noGitPlus && result.startsWith("git+") ? result.slice(4) : result;
|
8635
|
-
};
|
8636
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(_GitHost, _gitHosts, { byShortcut: {}, byDomain: {} });
|
8637
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(_GitHost, _protocols, {
|
8638
|
-
"git+ssh:": { name: "sshurl" },
|
8639
|
-
"ssh:": { name: "sshurl" },
|
8640
|
-
"git+https:": { name: "https", auth: true },
|
8641
|
-
"git:": { auth: true },
|
8642
|
-
"http:": { auth: true },
|
8643
|
-
"https:": { auth: true },
|
8644
|
-
"git+http:": { auth: true }
|
8645
|
-
});
|
8646
|
-
var GitHost = _GitHost;
|
8647
8633
|
for (const [name, host] of Object.entries(hosts)) {
|
8648
8634
|
GitHost.addHost(name, host);
|
8649
8635
|
}
|
8650
8636
|
module2.exports = GitHost;
|
8651
8637
|
}
|
8652
8638
|
});
|
8653
|
-
var require_hasown = (0,
|
8639
|
+
var require_hasown = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8654
8640
|
"../../node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(exports, module2) {
|
8655
8641
|
"use strict";
|
8656
8642
|
var call = Function.prototype.call;
|
8657
8643
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
8658
|
-
var bind = (0,
|
8644
|
+
var bind = (0, import_chunk_23MPYLL6.require_function_bind)();
|
8659
8645
|
module2.exports = bind.call(call, $hasOwn);
|
8660
8646
|
}
|
8661
8647
|
});
|
8662
|
-
var require_core = (0,
|
8648
|
+
var require_core = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8663
8649
|
"../../node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/core.json"(exports, module2) {
|
8664
8650
|
module2.exports = {
|
8665
8651
|
assert: true,
|
@@ -8821,7 +8807,7 @@ var require_core = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8821
8807
|
};
|
8822
8808
|
}
|
8823
8809
|
});
|
8824
|
-
var require_is_core_module = (0,
|
8810
|
+
var require_is_core_module = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8825
8811
|
"../../node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/index.js"(exports, module2) {
|
8826
8812
|
"use strict";
|
8827
8813
|
var hasOwn = require_hasown();
|
@@ -8882,7 +8868,7 @@ var require_is_core_module = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8882
8868
|
};
|
8883
8869
|
}
|
8884
8870
|
});
|
8885
|
-
var require_extract_description = (0,
|
8871
|
+
var require_extract_description = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8886
8872
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/extract_description.js"(exports, module2) {
|
8887
8873
|
"use strict";
|
8888
8874
|
module2.exports = extractDescription;
|
@@ -8907,7 +8893,7 @@ var require_extract_description = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8907
8893
|
}
|
8908
8894
|
}
|
8909
8895
|
});
|
8910
|
-
var require_typos = (0,
|
8896
|
+
var require_typos = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8911
8897
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/typos.json"(exports, module2) {
|
8912
8898
|
module2.exports = {
|
8913
8899
|
topLevel: {
|
@@ -8936,7 +8922,7 @@ var require_typos = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8936
8922
|
};
|
8937
8923
|
}
|
8938
8924
|
});
|
8939
|
-
var require_fixer = (0,
|
8925
|
+
var require_fixer = (0, import_chunk_2ESYSVXG.__commonJS)({
|
8940
8926
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
|
8941
8927
|
"use strict";
|
8942
8928
|
var isValidSemver = require_valid();
|
@@ -8946,7 +8932,7 @@ var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8946
8932
|
var isBuiltinModule = require_is_core_module();
|
8947
8933
|
var depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
|
8948
8934
|
var extractDescription = require_extract_description();
|
8949
|
-
var url = (0,
|
8935
|
+
var url = (0, import_chunk_2ESYSVXG.__require)("url");
|
8950
8936
|
var typos = require_typos();
|
8951
8937
|
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
8952
8938
|
module2.exports = {
|
@@ -9367,7 +9353,7 @@ var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9367
9353
|
}
|
9368
9354
|
}
|
9369
9355
|
});
|
9370
|
-
var require_warning_messages = (0,
|
9356
|
+
var require_warning_messages = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9371
9357
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/warning_messages.json"(exports, module2) {
|
9372
9358
|
module2.exports = {
|
9373
9359
|
repositories: "'repositories' (plural) Not supported. Please pick one as the 'repository' field",
|
@@ -9401,10 +9387,10 @@ var require_warning_messages = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9401
9387
|
};
|
9402
9388
|
}
|
9403
9389
|
});
|
9404
|
-
var require_make_warning = (0,
|
9390
|
+
var require_make_warning = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9405
9391
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/make_warning.js"(exports, module2) {
|
9406
9392
|
"use strict";
|
9407
|
-
var util = (0,
|
9393
|
+
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
9408
9394
|
var messages = require_warning_messages();
|
9409
9395
|
module2.exports = function() {
|
9410
9396
|
var args = Array.prototype.slice.call(arguments, 0);
|
@@ -9426,7 +9412,7 @@ var require_make_warning = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9426
9412
|
}
|
9427
9413
|
}
|
9428
9414
|
});
|
9429
|
-
var require_normalize = (0,
|
9415
|
+
var require_normalize = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9430
9416
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/normalize.js"(exports, module2) {
|
9431
9417
|
"use strict";
|
9432
9418
|
module2.exports = normalize;
|
@@ -9482,10 +9468,10 @@ var require_normalize = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9482
9468
|
}
|
9483
9469
|
}
|
9484
9470
|
});
|
9485
|
-
var require_crypto_random_string = (0,
|
9471
|
+
var require_crypto_random_string = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9486
9472
|
"../../node_modules/.pnpm/crypto-random-string@2.0.0/node_modules/crypto-random-string/index.js"(exports, module2) {
|
9487
9473
|
"use strict";
|
9488
|
-
var crypto = (0,
|
9474
|
+
var crypto = (0, import_chunk_2ESYSVXG.__require)("crypto");
|
9489
9475
|
module2.exports = (length) => {
|
9490
9476
|
if (!Number.isFinite(length)) {
|
9491
9477
|
throw new TypeError("Expected a finite number");
|
@@ -9494,17 +9480,17 @@ var require_crypto_random_string = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9494
9480
|
};
|
9495
9481
|
}
|
9496
9482
|
});
|
9497
|
-
var require_unique_string = (0,
|
9483
|
+
var require_unique_string = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9498
9484
|
"../../node_modules/.pnpm/unique-string@2.0.0/node_modules/unique-string/index.js"(exports, module2) {
|
9499
9485
|
"use strict";
|
9500
9486
|
var cryptoRandomString = require_crypto_random_string();
|
9501
9487
|
module2.exports = () => cryptoRandomString(32);
|
9502
9488
|
}
|
9503
9489
|
});
|
9504
|
-
var require_polyfills = (0,
|
9490
|
+
var require_polyfills = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9505
9491
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports, module2) {
|
9506
9492
|
"use strict";
|
9507
|
-
var constants = (0,
|
9493
|
+
var constants = (0, import_chunk_2ESYSVXG.__require)("constants");
|
9508
9494
|
var origCwd = process.cwd;
|
9509
9495
|
var cwd = null;
|
9510
9496
|
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
@@ -9788,10 +9774,10 @@ var require_polyfills = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9788
9774
|
}
|
9789
9775
|
}
|
9790
9776
|
});
|
9791
|
-
var require_legacy_streams = (0,
|
9777
|
+
var require_legacy_streams = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9792
9778
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
|
9793
9779
|
"use strict";
|
9794
|
-
var Stream = (0,
|
9780
|
+
var Stream = (0, import_chunk_2ESYSVXG.__require)("stream").Stream;
|
9795
9781
|
module2.exports = legacy;
|
9796
9782
|
function legacy(fs4) {
|
9797
9783
|
return {
|
@@ -9883,7 +9869,7 @@ var require_legacy_streams = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9883
9869
|
}
|
9884
9870
|
}
|
9885
9871
|
});
|
9886
|
-
var require_clone = (0,
|
9872
|
+
var require_clone = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9887
9873
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports, module2) {
|
9888
9874
|
"use strict";
|
9889
9875
|
module2.exports = clone;
|
@@ -9904,14 +9890,14 @@ var require_clone = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9904
9890
|
}
|
9905
9891
|
}
|
9906
9892
|
});
|
9907
|
-
var require_graceful_fs = (0,
|
9893
|
+
var require_graceful_fs = (0, import_chunk_2ESYSVXG.__commonJS)({
|
9908
9894
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
9909
9895
|
"use strict";
|
9910
|
-
var fs4 = (0,
|
9896
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
9911
9897
|
var polyfills = require_polyfills();
|
9912
9898
|
var legacy = require_legacy_streams();
|
9913
9899
|
var clone = require_clone();
|
9914
|
-
var util = (0,
|
9900
|
+
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
9915
9901
|
var gracefulQueue;
|
9916
9902
|
var previousSymbol;
|
9917
9903
|
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
@@ -9970,7 +9956,7 @@ var require_graceful_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9970
9956
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
9971
9957
|
process.on("exit", function() {
|
9972
9958
|
debug(fs4[gracefulQueue]);
|
9973
|
-
(0,
|
9959
|
+
(0, import_chunk_2ESYSVXG.__require)("assert").equal(fs4[gracefulQueue].length, 0);
|
9974
9960
|
});
|
9975
9961
|
}
|
9976
9962
|
}
|
@@ -10273,10 +10259,10 @@ var require_graceful_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10273
10259
|
}
|
10274
10260
|
}
|
10275
10261
|
});
|
10276
|
-
var require_is_path_cwd = (0,
|
10262
|
+
var require_is_path_cwd = (0, import_chunk_2ESYSVXG.__commonJS)({
|
10277
10263
|
"../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js"(exports, module2) {
|
10278
10264
|
"use strict";
|
10279
|
-
var path5 = (0,
|
10265
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
10280
10266
|
module2.exports = (path_) => {
|
10281
10267
|
let cwd = process.cwd();
|
10282
10268
|
path_ = path5.resolve(path_);
|
@@ -10288,10 +10274,10 @@ var require_is_path_cwd = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10288
10274
|
};
|
10289
10275
|
}
|
10290
10276
|
});
|
10291
|
-
var require_is_path_inside = (0,
|
10277
|
+
var require_is_path_inside = (0, import_chunk_2ESYSVXG.__commonJS)({
|
10292
10278
|
"../../node_modules/.pnpm/is-path-inside@3.0.3/node_modules/is-path-inside/index.js"(exports, module2) {
|
10293
10279
|
"use strict";
|
10294
|
-
var path5 = (0,
|
10280
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
10295
10281
|
module2.exports = (childPath, parentPath) => {
|
10296
10282
|
const relation = path5.relative(parentPath, childPath);
|
10297
10283
|
return Boolean(
|
@@ -10300,7 +10286,7 @@ var require_is_path_inside = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10300
10286
|
};
|
10301
10287
|
}
|
10302
10288
|
});
|
10303
|
-
var require_concat_map = (0,
|
10289
|
+
var require_concat_map = (0, import_chunk_2ESYSVXG.__commonJS)({
|
10304
10290
|
"../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports, module2) {
|
10305
10291
|
"use strict";
|
10306
10292
|
module2.exports = function(xs, fn) {
|
@@ -10317,7 +10303,7 @@ var require_concat_map = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10317
10303
|
};
|
10318
10304
|
}
|
10319
10305
|
});
|
10320
|
-
var require_brace_expansion2 = (0,
|
10306
|
+
var require_brace_expansion2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
10321
10307
|
"../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports, module2) {
|
10322
10308
|
"use strict";
|
10323
10309
|
var concatMap = require_concat_map();
|
@@ -10460,14 +10446,14 @@ var require_brace_expansion2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10460
10446
|
}
|
10461
10447
|
}
|
10462
10448
|
});
|
10463
|
-
var require_minimatch2 = (0,
|
10449
|
+
var require_minimatch2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
10464
10450
|
"../../node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js"(exports, module2) {
|
10465
10451
|
"use strict";
|
10466
10452
|
module2.exports = minimatch;
|
10467
10453
|
minimatch.Minimatch = Minimatch;
|
10468
10454
|
var path5 = function() {
|
10469
10455
|
try {
|
10470
|
-
return (0,
|
10456
|
+
return (0, import_chunk_2ESYSVXG.__require)("path");
|
10471
10457
|
} catch (e) {
|
10472
10458
|
}
|
10473
10459
|
}() || {
|
@@ -11032,7 +11018,7 @@ var require_minimatch2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11032
11018
|
}
|
11033
11019
|
}
|
11034
11020
|
});
|
11035
|
-
var require_path_is_absolute = (0,
|
11021
|
+
var require_path_is_absolute = (0, import_chunk_2ESYSVXG.__commonJS)({
|
11036
11022
|
"../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports, module2) {
|
11037
11023
|
"use strict";
|
11038
11024
|
function posix(path5) {
|
@@ -11050,7 +11036,7 @@ var require_path_is_absolute = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11050
11036
|
module2.exports.win32 = win32;
|
11051
11037
|
}
|
11052
11038
|
});
|
11053
|
-
var require_common2 = (0,
|
11039
|
+
var require_common2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
11054
11040
|
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js"(exports) {
|
11055
11041
|
"use strict";
|
11056
11042
|
exports.setopts = setopts;
|
@@ -11063,8 +11049,8 @@ var require_common2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11063
11049
|
function ownProp(obj, field) {
|
11064
11050
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
11065
11051
|
}
|
11066
|
-
var fs4 = (0,
|
11067
|
-
var path5 = (0,
|
11052
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
11053
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
11068
11054
|
var minimatch = require_minimatch2();
|
11069
11055
|
var isAbsolute = require_path_is_absolute();
|
11070
11056
|
var Minimatch = minimatch.Minimatch;
|
@@ -11243,7 +11229,7 @@ var require_common2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11243
11229
|
}
|
11244
11230
|
}
|
11245
11231
|
});
|
11246
|
-
var require_sync2 = (0,
|
11232
|
+
var require_sync2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
11247
11233
|
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js"(exports, module2) {
|
11248
11234
|
"use strict";
|
11249
11235
|
module2.exports = globSync;
|
@@ -11252,9 +11238,9 @@ var require_sync2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11252
11238
|
var minimatch = require_minimatch2();
|
11253
11239
|
var Minimatch = minimatch.Minimatch;
|
11254
11240
|
var Glob = require_glob2().Glob;
|
11255
|
-
var util = (0,
|
11256
|
-
var path5 = (0,
|
11257
|
-
var assert = (0,
|
11241
|
+
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
11242
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
11243
|
+
var assert = (0, import_chunk_2ESYSVXG.__require)("assert");
|
11258
11244
|
var isAbsolute = require_path_is_absolute();
|
11259
11245
|
var common = require_common2();
|
11260
11246
|
var setopts = common.setopts;
|
@@ -11597,7 +11583,7 @@ var require_sync2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11597
11583
|
};
|
11598
11584
|
}
|
11599
11585
|
});
|
11600
|
-
var require_glob2 = (0,
|
11586
|
+
var require_glob2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
11601
11587
|
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js"(exports, module2) {
|
11602
11588
|
"use strict";
|
11603
11589
|
module2.exports = glob;
|
@@ -11605,16 +11591,16 @@ var require_glob2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11605
11591
|
var minimatch = require_minimatch2();
|
11606
11592
|
var Minimatch = minimatch.Minimatch;
|
11607
11593
|
var inherits = require_inherits();
|
11608
|
-
var EE = (0,
|
11609
|
-
var path5 = (0,
|
11610
|
-
var assert = (0,
|
11594
|
+
var EE = (0, import_chunk_2ESYSVXG.__require)("events").EventEmitter;
|
11595
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
11596
|
+
var assert = (0, import_chunk_2ESYSVXG.__require)("assert");
|
11611
11597
|
var isAbsolute = require_path_is_absolute();
|
11612
11598
|
var globSync = require_sync2();
|
11613
11599
|
var common = require_common2();
|
11614
11600
|
var setopts = common.setopts;
|
11615
11601
|
var ownProp = common.ownProp;
|
11616
11602
|
var inflight = require_inflight();
|
11617
|
-
var util = (0,
|
11603
|
+
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
11618
11604
|
var childrenIgnored = common.childrenIgnored;
|
11619
11605
|
var isIgnored = common.isIgnored;
|
11620
11606
|
var once = require_once();
|
@@ -12152,12 +12138,12 @@ var require_glob2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12152
12138
|
};
|
12153
12139
|
}
|
12154
12140
|
});
|
12155
|
-
var require_rimraf = (0,
|
12141
|
+
var require_rimraf = (0, import_chunk_2ESYSVXG.__commonJS)({
|
12156
12142
|
"../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js"(exports, module2) {
|
12157
12143
|
"use strict";
|
12158
|
-
var assert = (0,
|
12159
|
-
var path5 = (0,
|
12160
|
-
var fs4 = (0,
|
12144
|
+
var assert = (0, import_chunk_2ESYSVXG.__require)("assert");
|
12145
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
12146
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
12161
12147
|
var glob = void 0;
|
12162
12148
|
try {
|
12163
12149
|
glob = require_glob2();
|
@@ -12431,10 +12417,10 @@ var require_rimraf = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12431
12417
|
rimraf.sync = rimrafSync;
|
12432
12418
|
}
|
12433
12419
|
});
|
12434
|
-
var require_clean_stack = (0,
|
12420
|
+
var require_clean_stack = (0, import_chunk_2ESYSVXG.__commonJS)({
|
12435
12421
|
"../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports, module2) {
|
12436
12422
|
"use strict";
|
12437
|
-
var os = (0,
|
12423
|
+
var os = (0, import_chunk_2ESYSVXG.__require)("os");
|
12438
12424
|
var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
|
12439
12425
|
var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
|
12440
12426
|
var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir();
|
@@ -12459,10 +12445,10 @@ var require_clean_stack = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12459
12445
|
};
|
12460
12446
|
}
|
12461
12447
|
});
|
12462
|
-
var require_aggregate_error = (0,
|
12448
|
+
var require_aggregate_error = (0, import_chunk_2ESYSVXG.__commonJS)({
|
12463
12449
|
"../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js"(exports, module2) {
|
12464
12450
|
"use strict";
|
12465
|
-
var indentString = (0,
|
12451
|
+
var indentString = (0, import_chunk_2R6DII47.require_indent_string)();
|
12466
12452
|
var cleanStack = require_clean_stack();
|
12467
12453
|
var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, "");
|
12468
12454
|
var AggregateError = class extends Error {
|
@@ -12496,7 +12482,7 @@ var require_aggregate_error = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12496
12482
|
module2.exports = AggregateError;
|
12497
12483
|
}
|
12498
12484
|
});
|
12499
|
-
var require_p_map = (0,
|
12485
|
+
var require_p_map = (0, import_chunk_2ESYSVXG.__commonJS)({
|
12500
12486
|
"../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js"(exports, module2) {
|
12501
12487
|
"use strict";
|
12502
12488
|
var AggregateError = require_aggregate_error();
|
@@ -12565,14 +12551,14 @@ var require_p_map = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12565
12551
|
};
|
12566
12552
|
}
|
12567
12553
|
});
|
12568
|
-
var require_del = (0,
|
12554
|
+
var require_del = (0, import_chunk_2ESYSVXG.__commonJS)({
|
12569
12555
|
"../../node_modules/.pnpm/del@6.1.1/node_modules/del/index.js"(exports, module2) {
|
12570
12556
|
"use strict";
|
12571
|
-
var { promisify } = (0,
|
12572
|
-
var path5 = (0,
|
12573
|
-
var globby = (0,
|
12574
|
-
var isGlob = (0,
|
12575
|
-
var slash = (0,
|
12557
|
+
var { promisify } = (0, import_chunk_2ESYSVXG.__require)("util");
|
12558
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
12559
|
+
var globby = (0, import_chunk_V37JTUKZ.require_globby)();
|
12560
|
+
var isGlob = (0, import_chunk_V37JTUKZ.require_is_glob)();
|
12561
|
+
var slash = (0, import_chunk_V37JTUKZ.require_slash)();
|
12576
12562
|
var gracefulFs = require_graceful_fs();
|
12577
12563
|
var isPathCwd = require_is_path_cwd();
|
12578
12564
|
var isPathInside = require_is_path_inside();
|
@@ -12676,17 +12662,17 @@ var require_del = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12676
12662
|
};
|
12677
12663
|
}
|
12678
12664
|
});
|
12679
|
-
var require_tempy = (0,
|
12665
|
+
var require_tempy = (0, import_chunk_2ESYSVXG.__commonJS)({
|
12680
12666
|
"../../node_modules/.pnpm/tempy@1.0.1/node_modules/tempy/index.js"(exports, module2) {
|
12681
12667
|
"use strict";
|
12682
|
-
var fs4 = (0,
|
12683
|
-
var path5 = (0,
|
12668
|
+
var fs4 = (0, import_chunk_2ESYSVXG.__require)("fs");
|
12669
|
+
var path5 = (0, import_chunk_2ESYSVXG.__require)("path");
|
12684
12670
|
var uniqueString = require_unique_string();
|
12685
|
-
var tempDir = (0,
|
12686
|
-
var isStream = (0,
|
12671
|
+
var tempDir = (0, import_chunk_6TVEFPKE.require_temp_dir)();
|
12672
|
+
var isStream = (0, import_chunk_KR25OQ6F.require_is_stream)();
|
12687
12673
|
var del = require_del();
|
12688
|
-
var stream = (0,
|
12689
|
-
var { promisify } = (0,
|
12674
|
+
var stream = (0, import_chunk_2ESYSVXG.__require)("stream");
|
12675
|
+
var { promisify } = (0, import_chunk_2ESYSVXG.__require)("util");
|
12690
12676
|
var pipeline = promisify(stream.pipeline);
|
12691
12677
|
var { writeFile } = fs4.promises;
|
12692
12678
|
var getPath = (prefix = "") => path5.join(tempDir, prefix + uniqueString());
|
@@ -12738,7 +12724,7 @@ var require_tempy = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12738
12724
|
});
|
12739
12725
|
}
|
12740
12726
|
});
|
12741
|
-
var import_npm_packlist = (0,
|
12727
|
+
var import_npm_packlist = (0, import_chunk_2ESYSVXG.__toESM)(require_lib5());
|
12742
12728
|
var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
12743
12729
|
async function findUp(name, {
|
12744
12730
|
cwd = import_node_process.default.cwd(),
|
@@ -12780,7 +12766,7 @@ function findUpSync(name, {
|
|
12780
12766
|
directory = import_node_path2.default.dirname(directory);
|
12781
12767
|
}
|
12782
12768
|
}
|
12783
|
-
var import_code_frame = (0,
|
12769
|
+
var import_code_frame = (0, import_chunk_2ESYSVXG.__toESM)(require_lib7(), 1);
|
12784
12770
|
var safeLastIndexOf = (string, searchString, index) => index < 0 ? -1 : string.lastIndexOf(searchString, index);
|
12785
12771
|
function getPosition(text, textIndex) {
|
12786
12772
|
const lineBreakBefore = safeLastIndexOf(text, "\n", textIndex - 1);
|
@@ -12799,31 +12785,28 @@ function indexToLineColumn(text, textIndex, { oneBased = false } = {}) {
|
|
12799
12785
|
return oneBased ? { line: position.line + 1, column: position.column + 1 } : position;
|
12800
12786
|
}
|
12801
12787
|
var getCodePoint = (character) => `\\u{${character.codePointAt(0).toString(16)}}`;
|
12802
|
-
var
|
12803
|
-
|
12788
|
+
var JSONError = class _JSONError extends Error {
|
12789
|
+
name = "JSONError";
|
12790
|
+
fileName;
|
12791
|
+
codeFrame;
|
12792
|
+
rawCodeFrame;
|
12793
|
+
#message;
|
12804
12794
|
constructor(message) {
|
12805
12795
|
super();
|
12806
|
-
|
12807
|
-
|
12808
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "codeFrame");
|
12809
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "rawCodeFrame");
|
12810
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _message);
|
12811
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _message, message);
|
12812
|
-
Error.captureStackTrace?.(this, _JSONError2);
|
12796
|
+
this.#message = message;
|
12797
|
+
Error.captureStackTrace?.(this, _JSONError);
|
12813
12798
|
}
|
12814
12799
|
get message() {
|
12815
12800
|
const { fileName, codeFrame } = this;
|
12816
|
-
return `${
|
12801
|
+
return `${this.#message}${fileName ? ` in ${fileName}` : ""}${codeFrame ? `
|
12817
12802
|
|
12818
12803
|
${codeFrame}
|
12819
12804
|
` : ""}`;
|
12820
12805
|
}
|
12821
12806
|
set message(message) {
|
12822
|
-
|
12807
|
+
this.#message = message;
|
12823
12808
|
}
|
12824
12809
|
};
|
12825
|
-
_message = /* @__PURE__ */ new WeakMap();
|
12826
|
-
var JSONError = _JSONError;
|
12827
12810
|
var generateCodeFrame = (string, location, highlightCode = true) => (0, import_code_frame.codeFrameColumns)(string, { start: location }, { highlightCode });
|
12828
12811
|
var getErrorLocation = (string, message) => {
|
12829
12812
|
const match = message.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);
|
@@ -12877,7 +12860,7 @@ function parseJson(string, reviver, fileName) {
|
|
12877
12860
|
}
|
12878
12861
|
throw jsonError;
|
12879
12862
|
}
|
12880
|
-
var import_normalize_package_data = (0,
|
12863
|
+
var import_normalize_package_data = (0, import_chunk_2ESYSVXG.__toESM)(require_normalize(), 1);
|
12881
12864
|
function toPath2(urlOrPath) {
|
12882
12865
|
return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
|
12883
12866
|
}
|
@@ -12917,9 +12900,9 @@ function readPackageUpSync(options) {
|
|
12917
12900
|
path: filePath
|
12918
12901
|
};
|
12919
12902
|
}
|
12920
|
-
var import_tempy = (0,
|
12903
|
+
var import_tempy = (0, import_chunk_2ESYSVXG.__toESM)(require_tempy());
|
12921
12904
|
async function getPackedPackage(name, target, packageDir) {
|
12922
|
-
packageDir = packageDir || await (0,
|
12905
|
+
packageDir = packageDir || await (0, import_chunk_23MPYLL6.resolvePkg)(name, { basedir: process.cwd() }) || await (0, import_chunk_23MPYLL6.resolvePkg)(name, { basedir: target });
|
12923
12906
|
if (!packageDir) {
|
12924
12907
|
const pkg = readPackageUpSync({
|
12925
12908
|
cwd: target,
|