@prisma/internals 6.6.0-dev.6 → 6.6.0-dev.61
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.d.ts +23 -5
- package/dist/Generator.js +5 -3
- package/dist/WasmPanicRegistry.js +3 -3
- package/dist/{chunk-PIPE5DSU.js → chunk-2H6XXXKO.js} +18 -21
- package/dist/chunk-2IMW37JH.js +900 -0
- package/dist/chunk-2QTAK7KO.js +101 -0
- package/dist/{chunk-XLGODPZH.js → chunk-3DQANJMY.js} +12 -12
- package/dist/{chunk-O342S7ZQ.js → chunk-4BUV4ESE.js} +22 -26
- package/dist/{chunk-WWAWV7DQ.js → chunk-4VNS5WPM.js} +3 -33
- package/dist/{chunk-KQOJB3ZW.js → chunk-5AI4FIZ3.js} +10 -10
- package/dist/{chunk-7MD6344A.js → chunk-5DBOS77Y.js} +3 -5
- package/dist/{chunk-TZCE3PWZ.js → chunk-5VQNKCKW.js} +7 -7
- package/dist/{chunk-YXD4CJDK.js → chunk-67I7CEQJ.js} +30 -31
- package/dist/{chunk-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
- package/dist/{chunk-ESBSOM7H.js → chunk-6WQVUWQM.js} +5 -5
- package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
- package/dist/{chunk-C4KFH4DG.js → chunk-A6IRWWSZ.js} +10 -9
- package/dist/{chunk-BGFWFIPR.js → chunk-AZV6HVKA.js} +5 -5
- package/dist/{chunk-ZYW3HGSH.js → chunk-BPDMLM32.js} +49 -17
- package/dist/{chunk-5MCWLJSR.js → chunk-CR3XKUEA.js} +10 -10
- package/dist/{chunk-TSJICM5S.js → chunk-CRVLHWC5.js} +5 -5
- package/dist/{chunk-NON34H7K.js → chunk-CW6KQ3VH.js} +30 -34
- package/dist/{chunk-SHJNE6T7.js → chunk-D4VDA2TZ.js} +7 -7
- package/dist/{chunk-Q22BLLK3.js → chunk-D4VZUY3O.js} +6 -6
- package/dist/{chunk-KTBNIQ7N.js → chunk-DKSUHQGA.js} +8 -8
- package/dist/{chunk-EUTJYQDW.js → chunk-DODIJPCS.js} +13 -25
- package/dist/{chunk-UNUCCAXA.js → chunk-DTPFRZWV.js} +5 -5
- package/dist/{chunk-NJQWZ447.js → chunk-EPXBOIA5.js} +6 -6
- package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
- package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
- package/dist/{chunk-I7L2MZHS.js → chunk-GNKWZC7O.js} +11 -15
- package/dist/{chunk-OE6YQBXZ.js → chunk-GOOL567Z.js} +11 -10
- package/dist/{chunk-L6GBFCXG.js → chunk-HAGJ64PM.js} +142 -155
- package/dist/{chunk-3ERIN7PH.js → chunk-HG3YOAAE.js} +10 -10
- package/dist/{chunk-GXDYIY4M.js → chunk-IDINCQMN.js} +56 -57
- package/dist/{chunk-B3FIG77N.js → chunk-IJP44JMI.js} +23 -27
- package/dist/{chunk-ZRU4X7P5.js → chunk-IYVKGIB2.js} +11 -15
- package/dist/{chunk-EXVN2NDU.js → chunk-JETLVL4E.js} +5 -5
- package/dist/{chunk-VNUGIB23.js → chunk-JHF7CF7M.js} +5 -5
- package/dist/{chunk-53LS3WUO.js → chunk-JOIIWB3U.js} +116 -116
- package/dist/{chunk-CZL7DCL2.js → chunk-JYMY3OAI.js} +6 -6
- package/dist/{chunk-TATYN3T2.js → chunk-KB5DKCI4.js} +29 -29
- package/dist/{chunk-LKTTJWFT.js → chunk-KDP6C3CB.js} +5 -5
- package/dist/{chunk-ATFQZVBS.js → chunk-LMVSIVKQ.js} +9 -14
- package/dist/{chunk-HNUYQRMW.js → chunk-LOQLID3N.js} +23 -27
- package/dist/{chunk-ZKAW5JSN.js → chunk-LRJ4X43J.js} +5 -5
- package/dist/{chunk-ONHKZPSV.js → chunk-LRU47BGE.js} +6 -6
- package/dist/{chunk-C2WD2XUT.js → chunk-MJIP3FY5.js} +968 -1220
- package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.js} +5 -5
- package/dist/{chunk-V2ZF7ETH.js → chunk-NVNI2SRU.js} +66 -68
- package/dist/{chunk-O3UVWF5W.js → chunk-OE4XGY7B.js} +30 -34
- package/dist/{chunk-JHQHVXIR.js → chunk-OSHZ4P3G.js} +6 -7
- package/dist/{chunk-IPKE37QC.js → chunk-PFYALFCY.js} +6 -5
- package/dist/{chunk-DQS4NTNF.js → chunk-QJ72IP2K.js} +46 -79
- package/dist/chunk-QXNNDOVP.js +900 -0
- package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
- package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
- package/dist/{chunk-GRHK5FCK.js → chunk-SKDR2FJB.js} +5 -5
- package/dist/{chunk-VXJLHQT3.js → chunk-T5MMBF2S.js} +9 -9
- package/dist/{chunk-YHZJOEOE.js → chunk-TN4KCTWC.js} +22 -26
- package/dist/{chunk-Y3OWT3K2.js → chunk-TQFONRJP.js} +7 -7
- package/dist/{chunk-3BND5XB4.js → chunk-UTJGRVMG.js} +11 -11
- package/dist/{chunk-7RSJWEVV.js → chunk-UUO3P3VK.js} +46 -79
- package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
- package/dist/{chunk-6TXVGFQA.js → chunk-WSZXPLJQ.js} +11 -11
- package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
- package/dist/{chunk-PB6AJZNB.js → chunk-XHEEFWQQ.js} +9 -9
- package/dist/{chunk-2MWIMEFK.js → chunk-XLTQGAI2.js} +6 -6
- package/dist/chunk-YR5KNFKN.js +1834 -0
- package/dist/{chunk-AZNLB67U.js → chunk-ZJWZK45Z.js} +5 -5
- package/dist/chunk-ZSINRHD4.js +43 -0
- package/dist/cli/Help.js +1 -1
- package/dist/cli/checkUnsupportedDataProxy.d.ts +12 -17
- package/dist/cli/checkUnsupportedDataProxy.js +75 -78
- package/dist/cli/directoryConfig.d.ts +7 -0
- package/dist/cli/directoryConfig.js +25 -0
- package/dist/cli/getGeneratorSuccessMessage.js +1 -1
- package/dist/cli/getSchema.d.ts +3 -28
- package/dist/cli/getSchema.js +78 -82
- package/dist/cli/getTypescriptVersion.js +1 -1
- package/dist/cli/hashes.d.ts +1 -2
- package/dist/cli/hashes.js +75 -78
- package/dist/cli/schemaContext.d.ts +59 -0
- package/dist/cli/schemaContext.js +133 -0
- package/dist/cli/utils.js +5 -5
- package/dist/client/getClientEngineType.d.ts +1 -1
- package/dist/client/getClientEngineType.js +1 -1
- package/dist/convertCredentials.d.ts +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 +74 -77
- package/dist/engine-commands/getConfig.d.ts +1 -5
- package/dist/engine-commands/getConfig.js +16 -17
- package/dist/engine-commands/getDmmf.d.ts +3 -6
- package/dist/engine-commands/getDmmf.js +13 -14
- package/dist/engine-commands/getEngineVersion.js +12 -12
- package/dist/engine-commands/getEnginesMetaInfo.js +15 -15
- package/dist/engine-commands/index.js +85 -88
- package/dist/engine-commands/lintSchema.d.ts +1 -1
- package/dist/engine-commands/lintSchema.js +11 -12
- package/dist/engine-commands/mergeSchemas.js +13 -14
- package/dist/engine-commands/queryEngineCommons.js +8 -8
- package/dist/engine-commands/relativizePathInPSLError.js +1 -1
- package/dist/engine-commands/validate.js +13 -14
- package/dist/errorReporting.d.ts +0 -1
- package/dist/errorReporting.js +7 -7
- package/dist/get-generators/getGenerators.d.ts +22 -9
- package/dist/get-generators/getGenerators.js +77 -80
- package/dist/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
- package/dist/get-generators/utils/binaryTypeToEngineType.js +1 -1
- package/dist/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
- package/dist/get-generators/utils/engineTypeToBinaryType.js +1 -1
- package/dist/get-generators/utils/fixBinaryTargets.d.ts +1 -1
- package/dist/get-generators/utils/fixBinaryTargets.js +1 -1
- package/dist/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
- package/dist/get-generators/utils/getEngineVersionForGenerator.js +1 -1
- package/dist/get-generators/utils/printGeneratorConfig.d.ts +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.d.ts +7 -7
- package/dist/index.js +141 -145
- package/dist/logger.js +9 -9
- package/dist/migrateTypes.d.ts +63 -0
- package/dist/{multipart-parser-32AROPTR.js → multipart-parser-3AFJFP6K.js} +7 -7
- package/dist/panic.d.ts +1 -4
- package/dist/panic.js +7 -7
- package/dist/resolveBinary.js +10 -10
- package/dist/resolveOutput.js +1 -1
- package/dist/resolvePkg.d.ts +7 -0
- package/dist/{get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js → resolvePkg.js} +6 -6
- package/dist/schemaEngineCommands.js +13 -13
- package/dist/sendPanic.js +7 -111
- package/dist/types.d.ts +1 -1
- 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 +3 -3
- 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 +4 -4
- 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.d.ts +2 -2
- package/dist/utils/extractPreviewFeatures.js +3 -3
- 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.d.ts +1 -1
- package/dist/utils/getEnvPaths.js +74 -77
- package/dist/utils/getGitHubIssueUrl.js +5 -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 +13 -110
- 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 +74 -77
- 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.d.ts +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.d.ts +0 -4
- package/dist/utils/schemaFileInput.js +3 -7
- package/dist/utils/serializeQueryEngineName.js +1 -1
- package/dist/utils/setClassName.js +1 -1
- package/dist/utils/toSchemasContainer.d.ts +2 -3
- package/dist/utils/toSchemasContainer.js +4 -5
- 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 +13 -12
- package/dist/chunk-77IC3DNO.js +0 -35
- package/dist/chunk-AOQIUJT4.js +0 -41
- package/dist/chunk-KQKHO2IC.js +0 -15631
- package/dist/chunk-MGZOEY6N.js +0 -28
- package/dist/chunk-O2CGGO6D.js +0 -15631
- package/dist/chunk-S57RMXZW.js +0 -28
- package/dist/chunk-VRT7T6MF.js +0 -4959
- package/dist/chunk-YRBRUREX.js +0 -57
- package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +0 -135
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +0 -29
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +0 -135
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +0 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +0 -17
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +0 -136
- package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
- package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.js +0 -25
@@ -26,24 +26,21 @@ 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_MJIP3FY5_exports = {};
|
30
|
+
__export(chunk_MJIP3FY5_exports, {
|
31
31
|
getPackedPackage: () => getPackedPackage,
|
32
32
|
readPackageUp: () => readPackageUp,
|
33
|
-
require_glob: () => require_glob,
|
34
|
-
require_inherits: () => require_inherits,
|
35
|
-
require_minimatch: () => require_minimatch,
|
36
33
|
require_p_map: () => require_p_map,
|
37
34
|
toPath: () => toPath2
|
38
35
|
});
|
39
|
-
module.exports = __toCommonJS(
|
40
|
-
var
|
41
|
-
var
|
42
|
-
var
|
43
|
-
var
|
44
|
-
var
|
45
|
-
var
|
46
|
-
var
|
36
|
+
module.exports = __toCommonJS(chunk_MJIP3FY5_exports);
|
37
|
+
var import_chunk_KDP6C3CB = require("./chunk-KDP6C3CB.js");
|
38
|
+
var import_chunk_UZTXEBTM = require("./chunk-UZTXEBTM.js");
|
39
|
+
var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
|
40
|
+
var import_chunk_67I7CEQJ = require("./chunk-67I7CEQJ.js");
|
41
|
+
var import_chunk_MM4ARWWY = require("./chunk-MM4ARWWY.js");
|
42
|
+
var import_chunk_5VQNKCKW = require("./chunk-5VQNKCKW.js");
|
43
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
47
44
|
var import_fs = __toESM(require("fs"));
|
48
45
|
var import_path = __toESM(require("path"));
|
49
46
|
var import_node_path = __toESM(require("node:path"));
|
@@ -56,10 +53,10 @@ var import_node_fs2 = __toESM(require("node:fs"));
|
|
56
53
|
var import_promises2 = __toESM(require("node:fs/promises"));
|
57
54
|
var import_node_path3 = __toESM(require("node:path"));
|
58
55
|
var import_node_url2 = require("node:url");
|
59
|
-
var require_lib2 = (0,
|
56
|
+
var require_lib2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
60
57
|
"../../node_modules/.pnpm/npm-normalize-package-bin@2.0.0/node_modules/npm-normalize-package-bin/lib/index.js"(exports, module2) {
|
61
58
|
"use strict";
|
62
|
-
var { join, basename } = (0,
|
59
|
+
var { join, basename } = (0, import_chunk_4VNS5WPM.__require)("path");
|
63
60
|
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
61
|
var normalizeString = (pkg) => {
|
65
62
|
if (!pkg.name) {
|
@@ -105,12 +102,12 @@ var require_lib2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
105
102
|
module2.exports = normalize;
|
106
103
|
}
|
107
104
|
});
|
108
|
-
var require_lib3 = (0,
|
105
|
+
var require_lib3 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
109
106
|
"../../node_modules/.pnpm/npm-bundled@2.0.1/node_modules/npm-bundled/lib/index.js"(exports, module2) {
|
110
107
|
"use strict";
|
111
|
-
var fs4 = (0,
|
112
|
-
var path5 = (0,
|
113
|
-
var EE = (0,
|
108
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
109
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
110
|
+
var EE = (0, import_chunk_4VNS5WPM.__require)("events").EventEmitter;
|
114
111
|
var normalizePackageBin = require_lib2();
|
115
112
|
var BundleWalker = class _BundleWalker extends EE {
|
116
113
|
constructor(opt) {
|
@@ -315,14 +312,14 @@ var require_lib3 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
315
312
|
walk.BundleWalkerSync = BundleWalkerSync;
|
316
313
|
}
|
317
314
|
});
|
318
|
-
var require_path = (0,
|
315
|
+
var require_path = (0, import_chunk_4VNS5WPM.__commonJS)({
|
319
316
|
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports, module2) {
|
320
317
|
"use strict";
|
321
318
|
var isWindows = typeof process === "object" && process && process.platform === "win32";
|
322
319
|
module2.exports = isWindows ? { sep: "\\" } : { sep: "/" };
|
323
320
|
}
|
324
321
|
});
|
325
|
-
var require_balanced_match = (0,
|
322
|
+
var require_balanced_match = (0, import_chunk_4VNS5WPM.__commonJS)({
|
326
323
|
"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module2) {
|
327
324
|
"use strict";
|
328
325
|
module2.exports = balanced;
|
@@ -378,7 +375,7 @@ var require_balanced_match = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
378
375
|
}
|
379
376
|
}
|
380
377
|
});
|
381
|
-
var require_brace_expansion = (0,
|
378
|
+
var require_brace_expansion = (0, import_chunk_4VNS5WPM.__commonJS)({
|
382
379
|
"../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module2) {
|
383
380
|
"use strict";
|
384
381
|
var balanced = require_balanced_match();
|
@@ -527,7 +524,7 @@ var require_brace_expansion = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
527
524
|
}
|
528
525
|
}
|
529
526
|
});
|
530
|
-
var require_minimatch = (0,
|
527
|
+
var require_minimatch = (0, import_chunk_4VNS5WPM.__commonJS)({
|
531
528
|
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports, module2) {
|
532
529
|
"use strict";
|
533
530
|
var minimatch = module2.exports = (p, pattern, options = {}) => {
|
@@ -1082,12 +1079,12 @@ var require_minimatch = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1082
1079
|
minimatch.Minimatch = Minimatch;
|
1083
1080
|
}
|
1084
1081
|
});
|
1085
|
-
var require_lib4 = (0,
|
1082
|
+
var require_lib4 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
1086
1083
|
"../../node_modules/.pnpm/ignore-walk@5.0.1/node_modules/ignore-walk/lib/index.js"(exports, module2) {
|
1087
1084
|
"use strict";
|
1088
|
-
var fs4 = (0,
|
1089
|
-
var path5 = (0,
|
1090
|
-
var EE = (0,
|
1085
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
1086
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
1087
|
+
var EE = (0, import_chunk_4VNS5WPM.__require)("events").EventEmitter;
|
1091
1088
|
var Minimatch = require_minimatch().Minimatch;
|
1092
1089
|
var Walker = class _Walker extends EE {
|
1093
1090
|
constructor(opts) {
|
@@ -1305,12 +1302,12 @@ var require_lib4 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1305
1302
|
walk.WalkerSync = WalkerSync;
|
1306
1303
|
}
|
1307
1304
|
});
|
1308
|
-
var require_old = (0,
|
1305
|
+
var require_old = (0, import_chunk_4VNS5WPM.__commonJS)({
|
1309
1306
|
"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports) {
|
1310
1307
|
"use strict";
|
1311
|
-
var pathModule = (0,
|
1308
|
+
var pathModule = (0, import_chunk_4VNS5WPM.__require)("path");
|
1312
1309
|
var isWindows = process.platform === "win32";
|
1313
|
-
var fs4 = (0,
|
1310
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
1314
1311
|
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
1315
1312
|
function rethrow() {
|
1316
1313
|
var callback;
|
@@ -1504,7 +1501,7 @@ var require_old = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1504
1501
|
};
|
1505
1502
|
}
|
1506
1503
|
});
|
1507
|
-
var require_fs = (0,
|
1504
|
+
var require_fs = (0, import_chunk_4VNS5WPM.__commonJS)({
|
1508
1505
|
"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports, module2) {
|
1509
1506
|
"use strict";
|
1510
1507
|
module2.exports = realpath;
|
@@ -1513,7 +1510,7 @@ var require_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1513
1510
|
realpath.realpathSync = realpathSync;
|
1514
1511
|
realpath.monkeypatch = monkeypatch;
|
1515
1512
|
realpath.unmonkeypatch = unmonkeypatch;
|
1516
|
-
var fs4 = (0,
|
1513
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
1517
1514
|
var origRealpath = fs4.realpath;
|
1518
1515
|
var origRealpathSync = fs4.realpathSync;
|
1519
1516
|
var version = process.version;
|
@@ -1562,7 +1559,7 @@ var require_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1562
1559
|
}
|
1563
1560
|
}
|
1564
1561
|
});
|
1565
|
-
var require_inherits_browser = (0,
|
1562
|
+
var require_inherits_browser = (0, import_chunk_4VNS5WPM.__commonJS)({
|
1566
1563
|
"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports, module2) {
|
1567
1564
|
"use strict";
|
1568
1565
|
if (typeof Object.create === "function") {
|
@@ -1593,11 +1590,11 @@ var require_inherits_browser = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1593
1590
|
}
|
1594
1591
|
}
|
1595
1592
|
});
|
1596
|
-
var require_inherits = (0,
|
1593
|
+
var require_inherits = (0, import_chunk_4VNS5WPM.__commonJS)({
|
1597
1594
|
"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports, module2) {
|
1598
1595
|
"use strict";
|
1599
1596
|
try {
|
1600
|
-
util = (0,
|
1597
|
+
util = (0, import_chunk_4VNS5WPM.__require)("util");
|
1601
1598
|
if (typeof util.inherits !== "function") throw "";
|
1602
1599
|
module2.exports = util.inherits;
|
1603
1600
|
} catch (e) {
|
@@ -1606,7 +1603,7 @@ var require_inherits = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1606
1603
|
var util;
|
1607
1604
|
}
|
1608
1605
|
});
|
1609
|
-
var require_common = (0,
|
1606
|
+
var require_common = (0, import_chunk_4VNS5WPM.__commonJS)({
|
1610
1607
|
"../../node_modules/.pnpm/glob@8.1.0/node_modules/glob/common.js"(exports) {
|
1611
1608
|
"use strict";
|
1612
1609
|
exports.setopts = setopts;
|
@@ -1619,10 +1616,10 @@ var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1619
1616
|
function ownProp(obj, field) {
|
1620
1617
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
1621
1618
|
}
|
1622
|
-
var fs4 = (0,
|
1623
|
-
var path5 = (0,
|
1619
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
1620
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
1624
1621
|
var minimatch = require_minimatch();
|
1625
|
-
var isAbsolute = (0,
|
1622
|
+
var isAbsolute = (0, import_chunk_4VNS5WPM.__require)("path").isAbsolute;
|
1626
1623
|
var Minimatch = minimatch.Minimatch;
|
1627
1624
|
function alphasort(a, b) {
|
1628
1625
|
return a.localeCompare(b, "en");
|
@@ -1803,7 +1800,7 @@ var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1803
1800
|
}
|
1804
1801
|
}
|
1805
1802
|
});
|
1806
|
-
var require_sync = (0,
|
1803
|
+
var require_sync = (0, import_chunk_4VNS5WPM.__commonJS)({
|
1807
1804
|
"../../node_modules/.pnpm/glob@8.1.0/node_modules/glob/sync.js"(exports, module2) {
|
1808
1805
|
"use strict";
|
1809
1806
|
module2.exports = globSync;
|
@@ -1812,10 +1809,10 @@ var require_sync = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
1812
1809
|
var minimatch = require_minimatch();
|
1813
1810
|
var Minimatch = minimatch.Minimatch;
|
1814
1811
|
var Glob = require_glob().Glob;
|
1815
|
-
var util = (0,
|
1816
|
-
var path5 = (0,
|
1817
|
-
var assert = (0,
|
1818
|
-
var isAbsolute = (0,
|
1812
|
+
var util = (0, import_chunk_4VNS5WPM.__require)("util");
|
1813
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
1814
|
+
var assert = (0, import_chunk_4VNS5WPM.__require)("assert");
|
1815
|
+
var isAbsolute = (0, import_chunk_4VNS5WPM.__require)("path").isAbsolute;
|
1819
1816
|
var common = require_common();
|
1820
1817
|
var setopts = common.setopts;
|
1821
1818
|
var ownProp = common.ownProp;
|
@@ -2157,7 +2154,7 @@ var require_sync = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2157
2154
|
};
|
2158
2155
|
}
|
2159
2156
|
});
|
2160
|
-
var require_wrappy = (0,
|
2157
|
+
var require_wrappy = (0, import_chunk_4VNS5WPM.__commonJS)({
|
2161
2158
|
"../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports, module2) {
|
2162
2159
|
"use strict";
|
2163
2160
|
module2.exports = wrappy;
|
@@ -2186,7 +2183,7 @@ var require_wrappy = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2186
2183
|
}
|
2187
2184
|
}
|
2188
2185
|
});
|
2189
|
-
var require_once = (0,
|
2186
|
+
var require_once = (0, import_chunk_4VNS5WPM.__commonJS)({
|
2190
2187
|
"../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports, module2) {
|
2191
2188
|
"use strict";
|
2192
2189
|
var wrappy = require_wrappy();
|
@@ -2229,7 +2226,7 @@ var require_once = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2229
2226
|
}
|
2230
2227
|
}
|
2231
2228
|
});
|
2232
|
-
var require_inflight = (0,
|
2229
|
+
var require_inflight = (0, import_chunk_4VNS5WPM.__commonJS)({
|
2233
2230
|
"../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports, module2) {
|
2234
2231
|
"use strict";
|
2235
2232
|
var wrappy = require_wrappy();
|
@@ -2274,7 +2271,7 @@ var require_inflight = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2274
2271
|
}
|
2275
2272
|
}
|
2276
2273
|
});
|
2277
|
-
var require_glob = (0,
|
2274
|
+
var require_glob = (0, import_chunk_4VNS5WPM.__commonJS)({
|
2278
2275
|
"../../node_modules/.pnpm/glob@8.1.0/node_modules/glob/glob.js"(exports, module2) {
|
2279
2276
|
"use strict";
|
2280
2277
|
module2.exports = glob;
|
@@ -2282,16 +2279,16 @@ var require_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2282
2279
|
var minimatch = require_minimatch();
|
2283
2280
|
var Minimatch = minimatch.Minimatch;
|
2284
2281
|
var inherits = require_inherits();
|
2285
|
-
var EE = (0,
|
2286
|
-
var path5 = (0,
|
2287
|
-
var assert = (0,
|
2288
|
-
var isAbsolute = (0,
|
2282
|
+
var EE = (0, import_chunk_4VNS5WPM.__require)("events").EventEmitter;
|
2283
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
2284
|
+
var assert = (0, import_chunk_4VNS5WPM.__require)("assert");
|
2285
|
+
var isAbsolute = (0, import_chunk_4VNS5WPM.__require)("path").isAbsolute;
|
2289
2286
|
var globSync = require_sync();
|
2290
2287
|
var common = require_common();
|
2291
2288
|
var setopts = common.setopts;
|
2292
2289
|
var ownProp = common.ownProp;
|
2293
2290
|
var inflight = require_inflight();
|
2294
|
-
var util = (0,
|
2291
|
+
var util = (0, import_chunk_4VNS5WPM.__require)("util");
|
2295
2292
|
var childrenIgnored = common.childrenIgnored;
|
2296
2293
|
var isIgnored = common.isIgnored;
|
2297
2294
|
var once = require_once();
|
@@ -2829,7 +2826,7 @@ var require_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2829
2826
|
};
|
2830
2827
|
}
|
2831
2828
|
});
|
2832
|
-
var require_lib5 = (0,
|
2829
|
+
var require_lib5 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
2833
2830
|
"../../node_modules/.pnpm/npm-packlist@5.1.3/node_modules/npm-packlist/lib/index.js"(exports, module2) {
|
2834
2831
|
"use strict";
|
2835
2832
|
var bundleWalk = require_lib3();
|
@@ -2838,12 +2835,12 @@ var require_lib5 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2838
2835
|
var IgnoreWalker = ignoreWalk.Walker;
|
2839
2836
|
var rootBuiltinRules = Symbol("root-builtin-rules");
|
2840
2837
|
var packageNecessaryRules = Symbol("package-necessary-rules");
|
2841
|
-
var path5 = (0,
|
2838
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
2842
2839
|
var normalizePackageBin = require_lib2();
|
2843
2840
|
var packageMustHaveFileNames = "readme|copying|license|licence";
|
2844
2841
|
var packageMustHaves = `@(${packageMustHaveFileNames}){,.*[^~$]}`;
|
2845
2842
|
var packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~$])?$`, "i");
|
2846
|
-
var fs4 = (0,
|
2843
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
2847
2844
|
var glob = require_glob();
|
2848
2845
|
var globify = (pattern) => pattern.split("\\").join("/");
|
2849
2846
|
var readOutOfTreeIgnoreFiles = (root, rel, result = "") => {
|
@@ -3168,7 +3165,7 @@ var require_lib5 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3168
3165
|
walk.Walker = Walker;
|
3169
3166
|
}
|
3170
3167
|
});
|
3171
|
-
var require_js_tokens = (0,
|
3168
|
+
var require_js_tokens = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3172
3169
|
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports) {
|
3173
3170
|
"use strict";
|
3174
3171
|
Object.defineProperty(exports, "__esModule", {
|
@@ -3189,7 +3186,7 @@ var require_js_tokens = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3189
3186
|
};
|
3190
3187
|
}
|
3191
3188
|
});
|
3192
|
-
var require_escape_string_regexp = (0,
|
3189
|
+
var require_escape_string_regexp = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3193
3190
|
"../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports, module2) {
|
3194
3191
|
"use strict";
|
3195
3192
|
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
@@ -3201,7 +3198,7 @@ var require_escape_string_regexp = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3201
3198
|
};
|
3202
3199
|
}
|
3203
3200
|
});
|
3204
|
-
var require_color_name = (0,
|
3201
|
+
var require_color_name = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3205
3202
|
"../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports, module2) {
|
3206
3203
|
"use strict";
|
3207
3204
|
module2.exports = {
|
@@ -3356,7 +3353,7 @@ var require_color_name = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3356
3353
|
};
|
3357
3354
|
}
|
3358
3355
|
});
|
3359
|
-
var require_conversions = (0,
|
3356
|
+
var require_conversions = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3360
3357
|
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports, module2) {
|
3361
3358
|
"use strict";
|
3362
3359
|
var cssKeywords = require_color_name();
|
@@ -4068,7 +4065,7 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4068
4065
|
};
|
4069
4066
|
}
|
4070
4067
|
});
|
4071
|
-
var require_route = (0,
|
4068
|
+
var require_route = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4072
4069
|
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports, module2) {
|
4073
4070
|
"use strict";
|
4074
4071
|
var conversions = require_conversions();
|
@@ -4137,7 +4134,7 @@ var require_route = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4137
4134
|
};
|
4138
4135
|
}
|
4139
4136
|
});
|
4140
|
-
var require_color_convert = (0,
|
4137
|
+
var require_color_convert = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4141
4138
|
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports, module2) {
|
4142
4139
|
"use strict";
|
4143
4140
|
var conversions = require_conversions();
|
@@ -4195,7 +4192,7 @@ var require_color_convert = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4195
4192
|
module2.exports = convert;
|
4196
4193
|
}
|
4197
4194
|
});
|
4198
|
-
var require_ansi_styles = (0,
|
4195
|
+
var require_ansi_styles = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4199
4196
|
"../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports, module2) {
|
4200
4197
|
"use strict";
|
4201
4198
|
var colorConvert = require_color_convert();
|
@@ -4336,7 +4333,7 @@ var require_ansi_styles = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4336
4333
|
});
|
4337
4334
|
}
|
4338
4335
|
});
|
4339
|
-
var require_has_flag = (0,
|
4336
|
+
var require_has_flag = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4340
4337
|
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
4341
4338
|
"use strict";
|
4342
4339
|
module2.exports = (flag, argv) => {
|
@@ -4348,10 +4345,10 @@ var require_has_flag = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4348
4345
|
};
|
4349
4346
|
}
|
4350
4347
|
});
|
4351
|
-
var require_supports_color = (0,
|
4348
|
+
var require_supports_color = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4352
4349
|
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) {
|
4353
4350
|
"use strict";
|
4354
|
-
var os = (0,
|
4351
|
+
var os = (0, import_chunk_4VNS5WPM.__require)("os");
|
4355
4352
|
var hasFlag = require_has_flag();
|
4356
4353
|
var env = process.env;
|
4357
4354
|
var forceColor;
|
@@ -4441,7 +4438,7 @@ var require_supports_color = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4441
4438
|
};
|
4442
4439
|
}
|
4443
4440
|
});
|
4444
|
-
var require_templates = (0,
|
4441
|
+
var require_templates = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4445
4442
|
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports, module2) {
|
4446
4443
|
"use strict";
|
4447
4444
|
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
@@ -4550,7 +4547,7 @@ var require_templates = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4550
4547
|
};
|
4551
4548
|
}
|
4552
4549
|
});
|
4553
|
-
var require_chalk = (0,
|
4550
|
+
var require_chalk = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4554
4551
|
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports, module2) {
|
4555
4552
|
"use strict";
|
4556
4553
|
var escapeStringRegexp = require_escape_string_regexp();
|
@@ -4715,7 +4712,7 @@ var require_chalk = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4715
4712
|
module2.exports.default = module2.exports;
|
4716
4713
|
}
|
4717
4714
|
});
|
4718
|
-
var require_lib6 = (0,
|
4715
|
+
var require_lib6 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4719
4716
|
"../../node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js"(exports) {
|
4720
4717
|
"use strict";
|
4721
4718
|
Object.defineProperty(exports, "__esModule", {
|
@@ -4724,7 +4721,7 @@ var require_lib6 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4724
4721
|
exports.default = highlight;
|
4725
4722
|
exports.shouldHighlight = shouldHighlight;
|
4726
4723
|
var _jsTokens = require_js_tokens();
|
4727
|
-
var _helperValidatorIdentifier = (0,
|
4724
|
+
var _helperValidatorIdentifier = (0, import_chunk_UZTXEBTM.require_lib)();
|
4728
4725
|
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
4729
4726
|
function _getRequireWildcardCache(e) {
|
4730
4727
|
if ("function" != typeof WeakMap) return null;
|
@@ -4838,7 +4835,7 @@ var require_lib6 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4838
4835
|
}
|
4839
4836
|
}
|
4840
4837
|
});
|
4841
|
-
var require_lib7 = (0,
|
4838
|
+
var require_lib7 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4842
4839
|
"../../node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js"(exports) {
|
4843
4840
|
"use strict";
|
4844
4841
|
Object.defineProperty(exports, "__esModule", {
|
@@ -5014,7 +5011,7 @@ ${frame}`;
|
|
5014
5011
|
}
|
5015
5012
|
}
|
5016
5013
|
});
|
5017
|
-
var require_debug = (0,
|
5014
|
+
var require_debug = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5018
5015
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/debug.js"(exports, module2) {
|
5019
5016
|
"use strict";
|
5020
5017
|
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 +5019,7 @@ var require_debug = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5022
5019
|
module2.exports = debug;
|
5023
5020
|
}
|
5024
5021
|
});
|
5025
|
-
var require_constants = (0,
|
5022
|
+
var require_constants = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5026
5023
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/constants.js"(exports, module2) {
|
5027
5024
|
"use strict";
|
5028
5025
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
@@ -5052,7 +5049,7 @@ var require_constants = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5052
5049
|
};
|
5053
5050
|
}
|
5054
5051
|
});
|
5055
|
-
var require_re = (0,
|
5052
|
+
var require_re = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5056
5053
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/re.js"(exports, module2) {
|
5057
5054
|
"use strict";
|
5058
5055
|
var {
|
@@ -5136,7 +5133,7 @@ var require_re = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5136
5133
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
5137
5134
|
}
|
5138
5135
|
});
|
5139
|
-
var require_parse_options = (0,
|
5136
|
+
var require_parse_options = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5140
5137
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/parse-options.js"(exports, module2) {
|
5141
5138
|
"use strict";
|
5142
5139
|
var looseOption = Object.freeze({ loose: true });
|
@@ -5153,7 +5150,7 @@ var require_parse_options = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5153
5150
|
module2.exports = parseOptions;
|
5154
5151
|
}
|
5155
5152
|
});
|
5156
|
-
var require_identifiers = (0,
|
5153
|
+
var require_identifiers = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5157
5154
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/identifiers.js"(exports, module2) {
|
5158
5155
|
"use strict";
|
5159
5156
|
var numeric = /^[0-9]+$/;
|
@@ -5173,7 +5170,7 @@ var require_identifiers = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5173
5170
|
};
|
5174
5171
|
}
|
5175
5172
|
});
|
5176
|
-
var require_semver = (0,
|
5173
|
+
var require_semver = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5177
5174
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/classes/semver.js"(exports, module2) {
|
5178
5175
|
"use strict";
|
5179
5176
|
var debug = require_debug();
|
@@ -5432,7 +5429,7 @@ var require_semver = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5432
5429
|
module2.exports = SemVer;
|
5433
5430
|
}
|
5434
5431
|
});
|
5435
|
-
var require_parse = (0,
|
5432
|
+
var require_parse = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5436
5433
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/parse.js"(exports, module2) {
|
5437
5434
|
"use strict";
|
5438
5435
|
var SemVer = require_semver();
|
@@ -5452,7 +5449,7 @@ var require_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5452
5449
|
module2.exports = parse;
|
5453
5450
|
}
|
5454
5451
|
});
|
5455
|
-
var require_valid = (0,
|
5452
|
+
var require_valid = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5456
5453
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/valid.js"(exports, module2) {
|
5457
5454
|
"use strict";
|
5458
5455
|
var parse = require_parse();
|
@@ -5463,7 +5460,7 @@ var require_valid = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5463
5460
|
module2.exports = valid;
|
5464
5461
|
}
|
5465
5462
|
});
|
5466
|
-
var require_clean = (0,
|
5463
|
+
var require_clean = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5467
5464
|
"../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/clean.js"(exports, module2) {
|
5468
5465
|
"use strict";
|
5469
5466
|
var parse = require_parse();
|
@@ -5474,7 +5471,7 @@ var require_clean = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5474
5471
|
module2.exports = clean;
|
5475
5472
|
}
|
5476
5473
|
});
|
5477
|
-
var require_spdx_license_ids = (0,
|
5474
|
+
var require_spdx_license_ids = (0, import_chunk_4VNS5WPM.__commonJS)({
|
5478
5475
|
"../../node_modules/.pnpm/spdx-license-ids@3.0.21/node_modules/spdx-license-ids/index.json"(exports, module2) {
|
5479
5476
|
module2.exports = [
|
5480
5477
|
"0BSD",
|
@@ -6128,7 +6125,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6128
6125
|
];
|
6129
6126
|
}
|
6130
6127
|
});
|
6131
|
-
var require_spdx_exceptions = (0,
|
6128
|
+
var require_spdx_exceptions = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6132
6129
|
"../../node_modules/.pnpm/spdx-exceptions@2.5.0/node_modules/spdx-exceptions/index.json"(exports, module2) {
|
6133
6130
|
module2.exports = [
|
6134
6131
|
"389-exception",
|
@@ -6200,7 +6197,7 @@ var require_spdx_exceptions = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6200
6197
|
];
|
6201
6198
|
}
|
6202
6199
|
});
|
6203
|
-
var require_scan = (0,
|
6200
|
+
var require_scan = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6204
6201
|
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js"(exports, module2) {
|
6205
6202
|
"use strict";
|
6206
6203
|
var licenses = [].concat(require_spdx_license_ids()).concat(require_spdx_license_ids());
|
@@ -6302,7 +6299,7 @@ var require_scan = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6302
6299
|
};
|
6303
6300
|
}
|
6304
6301
|
});
|
6305
|
-
var require_parse2 = (0,
|
6302
|
+
var require_parse2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6306
6303
|
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js"(exports, module2) {
|
6307
6304
|
"use strict";
|
6308
6305
|
module2.exports = function(tokens) {
|
@@ -6414,7 +6411,7 @@ var require_parse2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6414
6411
|
};
|
6415
6412
|
}
|
6416
6413
|
});
|
6417
|
-
var require_spdx_expression_parse = (0,
|
6414
|
+
var require_spdx_expression_parse = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6418
6415
|
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js"(exports, module2) {
|
6419
6416
|
"use strict";
|
6420
6417
|
var scan = require_scan();
|
@@ -6424,7 +6421,7 @@ var require_spdx_expression_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6424
6421
|
};
|
6425
6422
|
}
|
6426
6423
|
});
|
6427
|
-
var require_spdx_correct = (0,
|
6424
|
+
var require_spdx_correct = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6428
6425
|
"../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js"(exports, module2) {
|
6429
6426
|
"use strict";
|
6430
6427
|
var parse = require_spdx_expression_parse();
|
@@ -6741,7 +6738,7 @@ var require_spdx_correct = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6741
6738
|
}
|
6742
6739
|
}
|
6743
6740
|
});
|
6744
|
-
var require_validate_npm_package_license = (0,
|
6741
|
+
var require_validate_npm_package_license = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6745
6742
|
"../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js"(exports, module2) {
|
6746
6743
|
"use strict";
|
6747
6744
|
var parse = require_spdx_expression_parse();
|
@@ -6811,7 +6808,7 @@ var require_validate_npm_package_license = (0, import_chunk_WWAWV7DQ.__commonJS)
|
|
6811
6808
|
};
|
6812
6809
|
}
|
6813
6810
|
});
|
6814
|
-
var require_commonjs = (0,
|
6811
|
+
var require_commonjs = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6815
6812
|
"../../node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/commonjs/index.js"(exports) {
|
6816
6813
|
"use strict";
|
6817
6814
|
Object.defineProperty(exports, "__esModule", { value: true });
|
@@ -6826,21 +6823,19 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6826
6823
|
var AS = globalThis.AbortSignal;
|
6827
6824
|
if (typeof AC === "undefined") {
|
6828
6825
|
AS = class AbortSignal {
|
6829
|
-
|
6830
|
-
|
6831
|
-
|
6832
|
-
|
6833
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "aborted", false);
|
6834
|
-
}
|
6826
|
+
onabort;
|
6827
|
+
_onabort = [];
|
6828
|
+
reason;
|
6829
|
+
aborted = false;
|
6835
6830
|
addEventListener(_, fn) {
|
6836
6831
|
this._onabort.push(fn);
|
6837
6832
|
}
|
6838
6833
|
};
|
6839
6834
|
AC = class AbortController {
|
6840
6835
|
constructor() {
|
6841
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "signal", new AS());
|
6842
6836
|
warnACPolyfill();
|
6843
6837
|
}
|
6838
|
+
signal = new AS();
|
6844
6839
|
abort(reason) {
|
6845
6840
|
if (this.signal.aborted)
|
6846
6841
|
return;
|
@@ -6870,26 +6865,27 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6870
6865
|
this.fill(0);
|
6871
6866
|
}
|
6872
6867
|
};
|
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
|
-
}
|
6868
|
+
var Stack = class _Stack {
|
6869
|
+
heap;
|
6870
|
+
length;
|
6871
|
+
// private constructor
|
6872
|
+
static #constructing = false;
|
6884
6873
|
static create(max) {
|
6885
6874
|
const HeapCls = getUintArray(max);
|
6886
6875
|
if (!HeapCls)
|
6887
6876
|
return [];
|
6888
|
-
|
6889
|
-
const s = new
|
6890
|
-
|
6877
|
+
_Stack.#constructing = true;
|
6878
|
+
const s = new _Stack(max, HeapCls);
|
6879
|
+
_Stack.#constructing = false;
|
6891
6880
|
return s;
|
6892
6881
|
}
|
6882
|
+
constructor(max, HeapCls) {
|
6883
|
+
if (!_Stack.#constructing) {
|
6884
|
+
throw new TypeError("instantiate Stack using Stack.create(n)");
|
6885
|
+
}
|
6886
|
+
this.heap = new HeapCls(max);
|
6887
|
+
this.length = 0;
|
6888
|
+
}
|
6893
6889
|
push(n) {
|
6894
6890
|
this.heap[this.length++] = n;
|
6895
6891
|
}
|
@@ -6897,69 +6893,175 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6897
6893
|
return this.heap[--this.length];
|
6898
6894
|
}
|
6899
6895
|
};
|
6900
|
-
|
6901
|
-
|
6902
|
-
|
6903
|
-
|
6904
|
-
|
6896
|
+
var LRUCache = class _LRUCache {
|
6897
|
+
// options that cannot be changed without disaster
|
6898
|
+
#max;
|
6899
|
+
#maxSize;
|
6900
|
+
#dispose;
|
6901
|
+
#disposeAfter;
|
6902
|
+
#fetchMethod;
|
6903
|
+
#memoMethod;
|
6904
|
+
/**
|
6905
|
+
* {@link LRUCache.OptionsBase.ttl}
|
6906
|
+
*/
|
6907
|
+
ttl;
|
6908
|
+
/**
|
6909
|
+
* {@link LRUCache.OptionsBase.ttlResolution}
|
6910
|
+
*/
|
6911
|
+
ttlResolution;
|
6912
|
+
/**
|
6913
|
+
* {@link LRUCache.OptionsBase.ttlAutopurge}
|
6914
|
+
*/
|
6915
|
+
ttlAutopurge;
|
6916
|
+
/**
|
6917
|
+
* {@link LRUCache.OptionsBase.updateAgeOnGet}
|
6918
|
+
*/
|
6919
|
+
updateAgeOnGet;
|
6920
|
+
/**
|
6921
|
+
* {@link LRUCache.OptionsBase.updateAgeOnHas}
|
6922
|
+
*/
|
6923
|
+
updateAgeOnHas;
|
6924
|
+
/**
|
6925
|
+
* {@link LRUCache.OptionsBase.allowStale}
|
6926
|
+
*/
|
6927
|
+
allowStale;
|
6928
|
+
/**
|
6929
|
+
* {@link LRUCache.OptionsBase.noDisposeOnSet}
|
6930
|
+
*/
|
6931
|
+
noDisposeOnSet;
|
6932
|
+
/**
|
6933
|
+
* {@link LRUCache.OptionsBase.noUpdateTTL}
|
6934
|
+
*/
|
6935
|
+
noUpdateTTL;
|
6936
|
+
/**
|
6937
|
+
* {@link LRUCache.OptionsBase.maxEntrySize}
|
6938
|
+
*/
|
6939
|
+
maxEntrySize;
|
6940
|
+
/**
|
6941
|
+
* {@link LRUCache.OptionsBase.sizeCalculation}
|
6942
|
+
*/
|
6943
|
+
sizeCalculation;
|
6944
|
+
/**
|
6945
|
+
* {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
|
6946
|
+
*/
|
6947
|
+
noDeleteOnFetchRejection;
|
6948
|
+
/**
|
6949
|
+
* {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
|
6950
|
+
*/
|
6951
|
+
noDeleteOnStaleGet;
|
6952
|
+
/**
|
6953
|
+
* {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
|
6954
|
+
*/
|
6955
|
+
allowStaleOnFetchAbort;
|
6956
|
+
/**
|
6957
|
+
* {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
|
6958
|
+
*/
|
6959
|
+
allowStaleOnFetchRejection;
|
6960
|
+
/**
|
6961
|
+
* {@link LRUCache.OptionsBase.ignoreFetchAbort}
|
6962
|
+
*/
|
6963
|
+
ignoreFetchAbort;
|
6964
|
+
// computed properties
|
6965
|
+
#size;
|
6966
|
+
#calculatedSize;
|
6967
|
+
#keyMap;
|
6968
|
+
#keyList;
|
6969
|
+
#valList;
|
6970
|
+
#next;
|
6971
|
+
#prev;
|
6972
|
+
#head;
|
6973
|
+
#tail;
|
6974
|
+
#free;
|
6975
|
+
#disposed;
|
6976
|
+
#sizes;
|
6977
|
+
#starts;
|
6978
|
+
#ttls;
|
6979
|
+
#hasDispose;
|
6980
|
+
#hasFetchMethod;
|
6981
|
+
#hasDisposeAfter;
|
6982
|
+
/**
|
6983
|
+
* Do not call this method unless you need to inspect the
|
6984
|
+
* inner workings of the cache. If anything returned by this
|
6985
|
+
* object is modified in any way, strange breakage may occur.
|
6986
|
+
*
|
6987
|
+
* These fields are private for a reason!
|
6988
|
+
*
|
6989
|
+
* @internal
|
6990
|
+
*/
|
6991
|
+
static unsafeExposeInternals(c) {
|
6992
|
+
return {
|
6993
|
+
// properties
|
6994
|
+
starts: c.#starts,
|
6995
|
+
ttls: c.#ttls,
|
6996
|
+
sizes: c.#sizes,
|
6997
|
+
keyMap: c.#keyMap,
|
6998
|
+
keyList: c.#keyList,
|
6999
|
+
valList: c.#valList,
|
7000
|
+
next: c.#next,
|
7001
|
+
prev: c.#prev,
|
7002
|
+
get head() {
|
7003
|
+
return c.#head;
|
7004
|
+
},
|
7005
|
+
get tail() {
|
7006
|
+
return c.#tail;
|
7007
|
+
},
|
7008
|
+
free: c.#free,
|
7009
|
+
// methods
|
7010
|
+
isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
|
7011
|
+
backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
|
7012
|
+
moveToTail: (index) => c.#moveToTail(index),
|
7013
|
+
indexes: (options) => c.#indexes(options),
|
7014
|
+
rindexes: (options) => c.#rindexes(options),
|
7015
|
+
isStale: (index) => c.#isStale(index)
|
7016
|
+
};
|
7017
|
+
}
|
7018
|
+
// Protected read-only members
|
7019
|
+
/**
|
7020
|
+
* {@link LRUCache.OptionsBase.max} (read-only)
|
7021
|
+
*/
|
7022
|
+
get max() {
|
7023
|
+
return this.#max;
|
7024
|
+
}
|
7025
|
+
/**
|
7026
|
+
* {@link LRUCache.OptionsBase.maxSize} (read-only)
|
7027
|
+
*/
|
7028
|
+
get maxSize() {
|
7029
|
+
return this.#maxSize;
|
7030
|
+
}
|
7031
|
+
/**
|
7032
|
+
* The total computed size of items in the cache (read-only)
|
7033
|
+
*/
|
7034
|
+
get calculatedSize() {
|
7035
|
+
return this.#calculatedSize;
|
7036
|
+
}
|
7037
|
+
/**
|
7038
|
+
* The number of items stored in the cache (read-only)
|
7039
|
+
*/
|
7040
|
+
get size() {
|
7041
|
+
return this.#size;
|
7042
|
+
}
|
7043
|
+
/**
|
7044
|
+
* {@link LRUCache.OptionsBase.fetchMethod} (read-only)
|
7045
|
+
*/
|
7046
|
+
get fetchMethod() {
|
7047
|
+
return this.#fetchMethod;
|
7048
|
+
}
|
7049
|
+
get memoMethod() {
|
7050
|
+
return this.#memoMethod;
|
7051
|
+
}
|
7052
|
+
/**
|
7053
|
+
* {@link LRUCache.OptionsBase.dispose} (read-only)
|
7054
|
+
*/
|
7055
|
+
get dispose() {
|
7056
|
+
return this.#dispose;
|
7057
|
+
}
|
7058
|
+
/**
|
7059
|
+
* {@link LRUCache.OptionsBase.disposeAfter} (read-only)
|
7060
|
+
*/
|
7061
|
+
get disposeAfter() {
|
7062
|
+
return this.#disposeAfter;
|
7063
|
+
}
|
6905
7064
|
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
7065
|
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
7066
|
if (max !== 0 && !isPosInt(max)) {
|
6965
7067
|
throw new TypeError("max option must be a nonnegative integer");
|
@@ -6968,12 +7070,12 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6968
7070
|
if (!UintArray) {
|
6969
7071
|
throw new Error("invalid max value: " + max);
|
6970
7072
|
}
|
6971
|
-
|
6972
|
-
|
6973
|
-
this.maxEntrySize = maxEntrySize ||
|
7073
|
+
this.#max = max;
|
7074
|
+
this.#maxSize = maxSize;
|
7075
|
+
this.maxEntrySize = maxEntrySize || this.#maxSize;
|
6974
7076
|
this.sizeCalculation = sizeCalculation;
|
6975
7077
|
if (this.sizeCalculation) {
|
6976
|
-
if (!
|
7078
|
+
if (!this.#maxSize && !this.maxEntrySize) {
|
6977
7079
|
throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
6978
7080
|
}
|
6979
7081
|
if (typeof this.sizeCalculation !== "function") {
|
@@ -6983,34 +7085,34 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6983
7085
|
if (memoMethod !== void 0 && typeof memoMethod !== "function") {
|
6984
7086
|
throw new TypeError("memoMethod must be a function if defined");
|
6985
7087
|
}
|
6986
|
-
|
7088
|
+
this.#memoMethod = memoMethod;
|
6987
7089
|
if (fetchMethod !== void 0 && typeof fetchMethod !== "function") {
|
6988
7090
|
throw new TypeError("fetchMethod must be a function if specified");
|
6989
7091
|
}
|
6990
|
-
|
6991
|
-
|
6992
|
-
|
6993
|
-
|
6994
|
-
|
6995
|
-
|
6996
|
-
|
6997
|
-
|
6998
|
-
|
6999
|
-
|
7000
|
-
|
7001
|
-
|
7092
|
+
this.#fetchMethod = fetchMethod;
|
7093
|
+
this.#hasFetchMethod = !!fetchMethod;
|
7094
|
+
this.#keyMap = /* @__PURE__ */ new Map();
|
7095
|
+
this.#keyList = new Array(max).fill(void 0);
|
7096
|
+
this.#valList = new Array(max).fill(void 0);
|
7097
|
+
this.#next = new UintArray(max);
|
7098
|
+
this.#prev = new UintArray(max);
|
7099
|
+
this.#head = 0;
|
7100
|
+
this.#tail = 0;
|
7101
|
+
this.#free = Stack.create(max);
|
7102
|
+
this.#size = 0;
|
7103
|
+
this.#calculatedSize = 0;
|
7002
7104
|
if (typeof dispose === "function") {
|
7003
|
-
|
7105
|
+
this.#dispose = dispose;
|
7004
7106
|
}
|
7005
7107
|
if (typeof disposeAfter === "function") {
|
7006
|
-
|
7007
|
-
|
7108
|
+
this.#disposeAfter = disposeAfter;
|
7109
|
+
this.#disposed = [];
|
7008
7110
|
} else {
|
7009
|
-
|
7010
|
-
|
7111
|
+
this.#disposeAfter = void 0;
|
7112
|
+
this.#disposed = void 0;
|
7011
7113
|
}
|
7012
|
-
|
7013
|
-
|
7114
|
+
this.#hasDispose = !!this.#dispose;
|
7115
|
+
this.#hasDisposeAfter = !!this.#disposeAfter;
|
7014
7116
|
this.noDisposeOnSet = !!noDisposeOnSet;
|
7015
7117
|
this.noUpdateTTL = !!noUpdateTTL;
|
7016
7118
|
this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
|
@@ -7018,15 +7120,15 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7018
7120
|
this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
|
7019
7121
|
this.ignoreFetchAbort = !!ignoreFetchAbort;
|
7020
7122
|
if (this.maxEntrySize !== 0) {
|
7021
|
-
if (
|
7022
|
-
if (!isPosInt(
|
7123
|
+
if (this.#maxSize !== 0) {
|
7124
|
+
if (!isPosInt(this.#maxSize)) {
|
7023
7125
|
throw new TypeError("maxSize must be a positive integer if specified");
|
7024
7126
|
}
|
7025
7127
|
}
|
7026
7128
|
if (!isPosInt(this.maxEntrySize)) {
|
7027
7129
|
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
7028
7130
|
}
|
7029
|
-
|
7131
|
+
this.#initializeSizeTracking();
|
7030
7132
|
}
|
7031
7133
|
this.allowStale = !!allowStale;
|
7032
7134
|
this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
|
@@ -7039,135 +7141,199 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7039
7141
|
if (!isPosInt(this.ttl)) {
|
7040
7142
|
throw new TypeError("ttl must be a positive integer if specified");
|
7041
7143
|
}
|
7042
|
-
|
7144
|
+
this.#initializeTTLTracking();
|
7043
7145
|
}
|
7044
|
-
if (
|
7146
|
+
if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
|
7045
7147
|
throw new TypeError("At least one of max, maxSize, or ttl is required");
|
7046
7148
|
}
|
7047
|
-
if (!this.ttlAutopurge && !
|
7149
|
+
if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
|
7048
7150
|
const code = "LRU_CACHE_UNBOUNDED";
|
7049
7151
|
if (shouldWarn(code)) {
|
7050
7152
|
warned.add(code);
|
7051
7153
|
const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
|
7052
|
-
emitWarning(msg, "UnboundedCacheWarning", code,
|
7154
|
+
emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache);
|
7053
7155
|
}
|
7054
7156
|
}
|
7055
7157
|
}
|
7056
7158
|
/**
|
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
|
7159
|
+
* Return the number of ms left in the item's TTL. If item is not in cache,
|
7160
|
+
* returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
|
7064
7161
|
*/
|
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);
|
7162
|
+
getRemainingTTL(key) {
|
7163
|
+
return this.#keyMap.has(key) ? Infinity : 0;
|
7164
|
+
}
|
7165
|
+
#initializeTTLTracking() {
|
7166
|
+
const ttls = new ZeroArray(this.#max);
|
7167
|
+
const starts = new ZeroArray(this.#max);
|
7168
|
+
this.#ttls = ttls;
|
7169
|
+
this.#starts = starts;
|
7170
|
+
this.#setItemTTL = (index, ttl, start = perf.now()) => {
|
7171
|
+
starts[index] = ttl !== 0 ? start : 0;
|
7172
|
+
ttls[index] = ttl;
|
7173
|
+
if (ttl !== 0 && this.ttlAutopurge) {
|
7174
|
+
const t = setTimeout(() => {
|
7175
|
+
if (this.#isStale(index)) {
|
7176
|
+
this.#delete(this.#keyList[index], "expire");
|
7177
|
+
}
|
7178
|
+
}, ttl + 1);
|
7179
|
+
if (t.unref) {
|
7180
|
+
t.unref();
|
7181
|
+
}
|
7107
7182
|
}
|
7108
7183
|
};
|
7184
|
+
this.#updateItemAge = (index) => {
|
7185
|
+
starts[index] = ttls[index] !== 0 ? perf.now() : 0;
|
7186
|
+
};
|
7187
|
+
this.#statusTTL = (status, index) => {
|
7188
|
+
if (ttls[index]) {
|
7189
|
+
const ttl = ttls[index];
|
7190
|
+
const start = starts[index];
|
7191
|
+
if (!ttl || !start)
|
7192
|
+
return;
|
7193
|
+
status.ttl = ttl;
|
7194
|
+
status.start = start;
|
7195
|
+
status.now = cachedNow || getNow();
|
7196
|
+
const age = status.now - start;
|
7197
|
+
status.remainingTTL = ttl - age;
|
7198
|
+
}
|
7199
|
+
};
|
7200
|
+
let cachedNow = 0;
|
7201
|
+
const getNow = () => {
|
7202
|
+
const n = perf.now();
|
7203
|
+
if (this.ttlResolution > 0) {
|
7204
|
+
cachedNow = n;
|
7205
|
+
const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
|
7206
|
+
if (t.unref) {
|
7207
|
+
t.unref();
|
7208
|
+
}
|
7209
|
+
}
|
7210
|
+
return n;
|
7211
|
+
};
|
7212
|
+
this.getRemainingTTL = (key) => {
|
7213
|
+
const index = this.#keyMap.get(key);
|
7214
|
+
if (index === void 0) {
|
7215
|
+
return 0;
|
7216
|
+
}
|
7217
|
+
const ttl = ttls[index];
|
7218
|
+
const start = starts[index];
|
7219
|
+
if (!ttl || !start) {
|
7220
|
+
return Infinity;
|
7221
|
+
}
|
7222
|
+
const age = (cachedNow || getNow()) - start;
|
7223
|
+
return ttl - age;
|
7224
|
+
};
|
7225
|
+
this.#isStale = (index) => {
|
7226
|
+
const s = starts[index];
|
7227
|
+
const t = ttls[index];
|
7228
|
+
return !!t && !!s && (cachedNow || getNow()) - s > t;
|
7229
|
+
};
|
7109
7230
|
}
|
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
|
-
|
7231
|
+
// conditionally set private methods related to TTL
|
7232
|
+
#updateItemAge = () => {
|
7233
|
+
};
|
7234
|
+
#statusTTL = () => {
|
7235
|
+
};
|
7236
|
+
#setItemTTL = () => {
|
7237
|
+
};
|
7238
|
+
/* c8 ignore stop */
|
7239
|
+
#isStale = () => false;
|
7240
|
+
#initializeSizeTracking() {
|
7241
|
+
const sizes = new ZeroArray(this.#max);
|
7242
|
+
this.#calculatedSize = 0;
|
7243
|
+
this.#sizes = sizes;
|
7244
|
+
this.#removeItemSize = (index) => {
|
7245
|
+
this.#calculatedSize -= sizes[index];
|
7246
|
+
sizes[index] = 0;
|
7247
|
+
};
|
7248
|
+
this.#requireSize = (k, v, size, sizeCalculation) => {
|
7249
|
+
if (this.#isBackgroundFetch(v)) {
|
7250
|
+
return 0;
|
7251
|
+
}
|
7252
|
+
if (!isPosInt(size)) {
|
7253
|
+
if (sizeCalculation) {
|
7254
|
+
if (typeof sizeCalculation !== "function") {
|
7255
|
+
throw new TypeError("sizeCalculation must be a function");
|
7256
|
+
}
|
7257
|
+
size = sizeCalculation(v, k);
|
7258
|
+
if (!isPosInt(size)) {
|
7259
|
+
throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
7260
|
+
}
|
7261
|
+
} else {
|
7262
|
+
throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
7263
|
+
}
|
7264
|
+
}
|
7265
|
+
return size;
|
7266
|
+
};
|
7267
|
+
this.#addItemSize = (index, size, status) => {
|
7268
|
+
sizes[index] = size;
|
7269
|
+
if (this.#maxSize) {
|
7270
|
+
const maxSize = this.#maxSize - sizes[index];
|
7271
|
+
while (this.#calculatedSize > maxSize) {
|
7272
|
+
this.#evict(true);
|
7273
|
+
}
|
7274
|
+
}
|
7275
|
+
this.#calculatedSize += sizes[index];
|
7276
|
+
if (status) {
|
7277
|
+
status.entrySize = size;
|
7278
|
+
status.totalCalculatedSize = this.#calculatedSize;
|
7279
|
+
}
|
7280
|
+
};
|
7140
7281
|
}
|
7141
|
-
|
7142
|
-
|
7282
|
+
#removeItemSize = (_i) => {
|
7283
|
+
};
|
7284
|
+
#addItemSize = (_i, _s, _st) => {
|
7285
|
+
};
|
7286
|
+
#requireSize = (_k, _v, size, sizeCalculation) => {
|
7287
|
+
if (size || sizeCalculation) {
|
7288
|
+
throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
7289
|
+
}
|
7290
|
+
return 0;
|
7291
|
+
};
|
7292
|
+
*#indexes({ allowStale = this.allowStale } = {}) {
|
7293
|
+
if (this.#size) {
|
7294
|
+
for (let i = this.#tail; true; ) {
|
7295
|
+
if (!this.#isValidIndex(i)) {
|
7296
|
+
break;
|
7297
|
+
}
|
7298
|
+
if (allowStale || !this.#isStale(i)) {
|
7299
|
+
yield i;
|
7300
|
+
}
|
7301
|
+
if (i === this.#head) {
|
7302
|
+
break;
|
7303
|
+
} else {
|
7304
|
+
i = this.#prev[i];
|
7305
|
+
}
|
7306
|
+
}
|
7307
|
+
}
|
7143
7308
|
}
|
7144
|
-
|
7145
|
-
|
7146
|
-
|
7147
|
-
|
7148
|
-
|
7309
|
+
*#rindexes({ allowStale = this.allowStale } = {}) {
|
7310
|
+
if (this.#size) {
|
7311
|
+
for (let i = this.#head; true; ) {
|
7312
|
+
if (!this.#isValidIndex(i)) {
|
7313
|
+
break;
|
7314
|
+
}
|
7315
|
+
if (allowStale || !this.#isStale(i)) {
|
7316
|
+
yield i;
|
7317
|
+
}
|
7318
|
+
if (i === this.#tail) {
|
7319
|
+
break;
|
7320
|
+
} else {
|
7321
|
+
i = this.#next[i];
|
7322
|
+
}
|
7323
|
+
}
|
7324
|
+
}
|
7149
7325
|
}
|
7150
|
-
|
7151
|
-
|
7152
|
-
*/
|
7153
|
-
get disposeAfter() {
|
7154
|
-
return (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposeAfter);
|
7155
|
-
}
|
7156
|
-
/**
|
7157
|
-
* Return the number of ms left in the item's TTL. If item is not in cache,
|
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;
|
7326
|
+
#isValidIndex(index) {
|
7327
|
+
return index !== void 0 && this.#keyMap.get(this.#keyList[index]) === index;
|
7162
7328
|
}
|
7163
7329
|
/**
|
7164
7330
|
* Return a generator yielding `[key, value]` pairs,
|
7165
7331
|
* in order from most recently used to least recently used.
|
7166
7332
|
*/
|
7167
7333
|
*entries() {
|
7168
|
-
for (const i of
|
7169
|
-
if (
|
7170
|
-
yield [
|
7334
|
+
for (const i of this.#indexes()) {
|
7335
|
+
if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7336
|
+
yield [this.#keyList[i], this.#valList[i]];
|
7171
7337
|
}
|
7172
7338
|
}
|
7173
7339
|
}
|
@@ -7178,9 +7344,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7178
7344
|
* in order from least recently used to most recently used.
|
7179
7345
|
*/
|
7180
7346
|
*rentries() {
|
7181
|
-
for (const i of
|
7182
|
-
if (
|
7183
|
-
yield [
|
7347
|
+
for (const i of this.#rindexes()) {
|
7348
|
+
if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7349
|
+
yield [this.#keyList[i], this.#valList[i]];
|
7184
7350
|
}
|
7185
7351
|
}
|
7186
7352
|
}
|
@@ -7189,9 +7355,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7189
7355
|
* in order from most recently used to least recently used.
|
7190
7356
|
*/
|
7191
7357
|
*keys() {
|
7192
|
-
for (const i of
|
7193
|
-
const k =
|
7194
|
-
if (k !== void 0 && !
|
7358
|
+
for (const i of this.#indexes()) {
|
7359
|
+
const k = this.#keyList[i];
|
7360
|
+
if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7195
7361
|
yield k;
|
7196
7362
|
}
|
7197
7363
|
}
|
@@ -7203,9 +7369,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7203
7369
|
* in order from least recently used to most recently used.
|
7204
7370
|
*/
|
7205
7371
|
*rkeys() {
|
7206
|
-
for (const i of
|
7207
|
-
const k =
|
7208
|
-
if (k !== void 0 && !
|
7372
|
+
for (const i of this.#rindexes()) {
|
7373
|
+
const k = this.#keyList[i];
|
7374
|
+
if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7209
7375
|
yield k;
|
7210
7376
|
}
|
7211
7377
|
}
|
@@ -7215,10 +7381,10 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7215
7381
|
* in order from most recently used to least recently used.
|
7216
7382
|
*/
|
7217
7383
|
*values() {
|
7218
|
-
for (const i of
|
7219
|
-
const v =
|
7220
|
-
if (v !== void 0 && !
|
7221
|
-
yield
|
7384
|
+
for (const i of this.#indexes()) {
|
7385
|
+
const v = this.#valList[i];
|
7386
|
+
if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7387
|
+
yield this.#valList[i];
|
7222
7388
|
}
|
7223
7389
|
}
|
7224
7390
|
}
|
@@ -7229,10 +7395,10 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7229
7395
|
* in order from least recently used to most recently used.
|
7230
7396
|
*/
|
7231
7397
|
*rvalues() {
|
7232
|
-
for (const i of
|
7233
|
-
const v =
|
7234
|
-
if (v !== void 0 && !
|
7235
|
-
yield
|
7398
|
+
for (const i of this.#rindexes()) {
|
7399
|
+
const v = this.#valList[i];
|
7400
|
+
if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) {
|
7401
|
+
yield this.#valList[i];
|
7236
7402
|
}
|
7237
7403
|
}
|
7238
7404
|
}
|
@@ -7240,21 +7406,27 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7240
7406
|
* Iterating over the cache itself yields the same results as
|
7241
7407
|
* {@link LRUCache.entries}
|
7242
7408
|
*/
|
7243
|
-
[
|
7409
|
+
[Symbol.iterator]() {
|
7244
7410
|
return this.entries();
|
7245
7411
|
}
|
7412
|
+
/**
|
7413
|
+
* A String value that is used in the creation of the default string
|
7414
|
+
* description of an object. Called by the built-in method
|
7415
|
+
* `Object.prototype.toString`.
|
7416
|
+
*/
|
7417
|
+
[Symbol.toStringTag] = "LRUCache";
|
7246
7418
|
/**
|
7247
7419
|
* Find a value for which the supplied fn method returns a truthy value,
|
7248
7420
|
* similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
|
7249
7421
|
*/
|
7250
7422
|
find(fn, getOptions = {}) {
|
7251
|
-
for (const i of
|
7252
|
-
const v =
|
7253
|
-
const value =
|
7423
|
+
for (const i of this.#indexes()) {
|
7424
|
+
const v = this.#valList[i];
|
7425
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7254
7426
|
if (value === void 0)
|
7255
7427
|
continue;
|
7256
|
-
if (fn(value,
|
7257
|
-
return this.get(
|
7428
|
+
if (fn(value, this.#keyList[i], this)) {
|
7429
|
+
return this.get(this.#keyList[i], getOptions);
|
7258
7430
|
}
|
7259
7431
|
}
|
7260
7432
|
}
|
@@ -7270,12 +7442,12 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7270
7442
|
* Does not update age or recenty of use, or iterate over stale values.
|
7271
7443
|
*/
|
7272
7444
|
forEach(fn, thisp = this) {
|
7273
|
-
for (const i of
|
7274
|
-
const v =
|
7275
|
-
const value =
|
7445
|
+
for (const i of this.#indexes()) {
|
7446
|
+
const v = this.#valList[i];
|
7447
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7276
7448
|
if (value === void 0)
|
7277
7449
|
continue;
|
7278
|
-
fn.call(thisp, value,
|
7450
|
+
fn.call(thisp, value, this.#keyList[i], this);
|
7279
7451
|
}
|
7280
7452
|
}
|
7281
7453
|
/**
|
@@ -7283,12 +7455,12 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7283
7455
|
* reverse order. (ie, less recently used items are iterated over first.)
|
7284
7456
|
*/
|
7285
7457
|
rforEach(fn, thisp = this) {
|
7286
|
-
for (const i of
|
7287
|
-
const v =
|
7288
|
-
const value =
|
7458
|
+
for (const i of this.#rindexes()) {
|
7459
|
+
const v = this.#valList[i];
|
7460
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7289
7461
|
if (value === void 0)
|
7290
7462
|
continue;
|
7291
|
-
fn.call(thisp, value,
|
7463
|
+
fn.call(thisp, value, this.#keyList[i], this);
|
7292
7464
|
}
|
7293
7465
|
}
|
7294
7466
|
/**
|
@@ -7297,9 +7469,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7297
7469
|
*/
|
7298
7470
|
purgeStale() {
|
7299
7471
|
let deleted = false;
|
7300
|
-
for (const i of
|
7301
|
-
if (
|
7302
|
-
|
7472
|
+
for (const i of this.#rindexes({ allowStale: true })) {
|
7473
|
+
if (this.#isStale(i)) {
|
7474
|
+
this.#delete(this.#keyList[i], "expire");
|
7303
7475
|
deleted = true;
|
7304
7476
|
}
|
7305
7477
|
}
|
@@ -7318,25 +7490,25 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7318
7490
|
* if relevant.
|
7319
7491
|
*/
|
7320
7492
|
info(key) {
|
7321
|
-
const i =
|
7493
|
+
const i = this.#keyMap.get(key);
|
7322
7494
|
if (i === void 0)
|
7323
7495
|
return void 0;
|
7324
|
-
const v =
|
7325
|
-
const value =
|
7496
|
+
const v = this.#valList[i];
|
7497
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7326
7498
|
if (value === void 0)
|
7327
7499
|
return void 0;
|
7328
7500
|
const entry = { value };
|
7329
|
-
if (
|
7330
|
-
const ttl =
|
7331
|
-
const start =
|
7501
|
+
if (this.#ttls && this.#starts) {
|
7502
|
+
const ttl = this.#ttls[i];
|
7503
|
+
const start = this.#starts[i];
|
7332
7504
|
if (ttl && start) {
|
7333
7505
|
const remain = ttl - (perf.now() - start);
|
7334
7506
|
entry.ttl = remain;
|
7335
7507
|
entry.start = Date.now();
|
7336
7508
|
}
|
7337
7509
|
}
|
7338
|
-
if (
|
7339
|
-
entry.size =
|
7510
|
+
if (this.#sizes) {
|
7511
|
+
entry.size = this.#sizes[i];
|
7340
7512
|
}
|
7341
7513
|
return entry;
|
7342
7514
|
}
|
@@ -7355,20 +7527,20 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7355
7527
|
*/
|
7356
7528
|
dump() {
|
7357
7529
|
const arr = [];
|
7358
|
-
for (const i of
|
7359
|
-
const key =
|
7360
|
-
const v =
|
7361
|
-
const value =
|
7530
|
+
for (const i of this.#indexes({ allowStale: true })) {
|
7531
|
+
const key = this.#keyList[i];
|
7532
|
+
const v = this.#valList[i];
|
7533
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7362
7534
|
if (value === void 0 || key === void 0)
|
7363
7535
|
continue;
|
7364
7536
|
const entry = { value };
|
7365
|
-
if (
|
7366
|
-
entry.ttl =
|
7367
|
-
const age = perf.now() -
|
7537
|
+
if (this.#ttls && this.#starts) {
|
7538
|
+
entry.ttl = this.#ttls[i];
|
7539
|
+
const age = perf.now() - this.#starts[i];
|
7368
7540
|
entry.start = Math.floor(Date.now() - age);
|
7369
7541
|
}
|
7370
|
-
if (
|
7371
|
-
entry.size =
|
7542
|
+
if (this.#sizes) {
|
7543
|
+
entry.size = this.#sizes[i];
|
7372
7544
|
}
|
7373
7545
|
arr.unshift([key, entry]);
|
7374
7546
|
}
|
@@ -7424,65 +7596,64 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7424
7596
|
* `cache.delete(key)`. `undefined` is never stored in the cache.
|
7425
7597
|
*/
|
7426
7598
|
set(k, v, setOptions = {}) {
|
7427
|
-
var _a2, _b2, _c;
|
7428
7599
|
if (v === void 0) {
|
7429
7600
|
this.delete(k);
|
7430
7601
|
return this;
|
7431
7602
|
}
|
7432
7603
|
const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
|
7433
7604
|
let { noUpdateTTL = this.noUpdateTTL } = setOptions;
|
7434
|
-
const size =
|
7605
|
+
const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
|
7435
7606
|
if (this.maxEntrySize && size > this.maxEntrySize) {
|
7436
7607
|
if (status) {
|
7437
7608
|
status.set = "miss";
|
7438
7609
|
status.maxEntrySizeExceeded = true;
|
7439
7610
|
}
|
7440
|
-
|
7611
|
+
this.#delete(k, "set");
|
7441
7612
|
return this;
|
7442
7613
|
}
|
7443
|
-
let index =
|
7614
|
+
let index = this.#size === 0 ? void 0 : this.#keyMap.get(k);
|
7444
7615
|
if (index === void 0) {
|
7445
|
-
index =
|
7446
|
-
|
7447
|
-
|
7448
|
-
|
7449
|
-
|
7450
|
-
|
7451
|
-
|
7452
|
-
|
7453
|
-
|
7616
|
+
index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size;
|
7617
|
+
this.#keyList[index] = k;
|
7618
|
+
this.#valList[index] = v;
|
7619
|
+
this.#keyMap.set(k, index);
|
7620
|
+
this.#next[this.#tail] = index;
|
7621
|
+
this.#prev[index] = this.#tail;
|
7622
|
+
this.#tail = index;
|
7623
|
+
this.#size++;
|
7624
|
+
this.#addItemSize(index, size, status);
|
7454
7625
|
if (status)
|
7455
7626
|
status.set = "add";
|
7456
7627
|
noUpdateTTL = false;
|
7457
7628
|
} else {
|
7458
|
-
|
7459
|
-
const oldVal =
|
7629
|
+
this.#moveToTail(index);
|
7630
|
+
const oldVal = this.#valList[index];
|
7460
7631
|
if (v !== oldVal) {
|
7461
|
-
if (
|
7632
|
+
if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
|
7462
7633
|
oldVal.__abortController.abort(new Error("replaced"));
|
7463
7634
|
const { __staleWhileFetching: s } = oldVal;
|
7464
7635
|
if (s !== void 0 && !noDisposeOnSet) {
|
7465
|
-
if (
|
7466
|
-
|
7636
|
+
if (this.#hasDispose) {
|
7637
|
+
this.#dispose?.(s, k, "set");
|
7467
7638
|
}
|
7468
|
-
if (
|
7469
|
-
|
7639
|
+
if (this.#hasDisposeAfter) {
|
7640
|
+
this.#disposed?.push([s, k, "set"]);
|
7470
7641
|
}
|
7471
7642
|
}
|
7472
7643
|
} else if (!noDisposeOnSet) {
|
7473
|
-
if (
|
7474
|
-
|
7644
|
+
if (this.#hasDispose) {
|
7645
|
+
this.#dispose?.(oldVal, k, "set");
|
7475
7646
|
}
|
7476
|
-
if (
|
7477
|
-
|
7647
|
+
if (this.#hasDisposeAfter) {
|
7648
|
+
this.#disposed?.push([oldVal, k, "set"]);
|
7478
7649
|
}
|
7479
7650
|
}
|
7480
|
-
|
7481
|
-
|
7482
|
-
|
7651
|
+
this.#removeItemSize(index);
|
7652
|
+
this.#addItemSize(index, size, status);
|
7653
|
+
this.#valList[index] = v;
|
7483
7654
|
if (status) {
|
7484
7655
|
status.set = "replace";
|
7485
|
-
const oldValue = oldVal &&
|
7656
|
+
const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
|
7486
7657
|
if (oldValue !== void 0)
|
7487
7658
|
status.oldValue = oldValue;
|
7488
7659
|
}
|
@@ -7490,21 +7661,21 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7490
7661
|
status.set = "update";
|
7491
7662
|
}
|
7492
7663
|
}
|
7493
|
-
if (ttl !== 0 && !
|
7494
|
-
|
7664
|
+
if (ttl !== 0 && !this.#ttls) {
|
7665
|
+
this.#initializeTTLTracking();
|
7495
7666
|
}
|
7496
|
-
if (
|
7667
|
+
if (this.#ttls) {
|
7497
7668
|
if (!noUpdateTTL) {
|
7498
|
-
|
7669
|
+
this.#setItemTTL(index, ttl, start);
|
7499
7670
|
}
|
7500
7671
|
if (status)
|
7501
|
-
|
7672
|
+
this.#statusTTL(status, index);
|
7502
7673
|
}
|
7503
|
-
if (!noDisposeOnSet &&
|
7504
|
-
const dt =
|
7674
|
+
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
7675
|
+
const dt = this.#disposed;
|
7505
7676
|
let task;
|
7506
7677
|
while (task = dt?.shift()) {
|
7507
|
-
|
7678
|
+
this.#disposeAfter?.(...task);
|
7508
7679
|
}
|
7509
7680
|
}
|
7510
7681
|
return this;
|
@@ -7514,12 +7685,11 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7514
7685
|
* `undefined` if cache is empty.
|
7515
7686
|
*/
|
7516
7687
|
pop() {
|
7517
|
-
var _a2;
|
7518
7688
|
try {
|
7519
|
-
while (
|
7520
|
-
const val =
|
7521
|
-
|
7522
|
-
if (
|
7689
|
+
while (this.#size) {
|
7690
|
+
const val = this.#valList[this.#head];
|
7691
|
+
this.#evict(true);
|
7692
|
+
if (this.#isBackgroundFetch(val)) {
|
7523
7693
|
if (val.__staleWhileFetching) {
|
7524
7694
|
return val.__staleWhileFetching;
|
7525
7695
|
}
|
@@ -7528,15 +7698,45 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7528
7698
|
}
|
7529
7699
|
}
|
7530
7700
|
} finally {
|
7531
|
-
if (
|
7532
|
-
const dt =
|
7701
|
+
if (this.#hasDisposeAfter && this.#disposed) {
|
7702
|
+
const dt = this.#disposed;
|
7533
7703
|
let task;
|
7534
7704
|
while (task = dt?.shift()) {
|
7535
|
-
|
7705
|
+
this.#disposeAfter?.(...task);
|
7536
7706
|
}
|
7537
7707
|
}
|
7538
7708
|
}
|
7539
7709
|
}
|
7710
|
+
#evict(free) {
|
7711
|
+
const head = this.#head;
|
7712
|
+
const k = this.#keyList[head];
|
7713
|
+
const v = this.#valList[head];
|
7714
|
+
if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
|
7715
|
+
v.__abortController.abort(new Error("evicted"));
|
7716
|
+
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
7717
|
+
if (this.#hasDispose) {
|
7718
|
+
this.#dispose?.(v, k, "evict");
|
7719
|
+
}
|
7720
|
+
if (this.#hasDisposeAfter) {
|
7721
|
+
this.#disposed?.push([v, k, "evict"]);
|
7722
|
+
}
|
7723
|
+
}
|
7724
|
+
this.#removeItemSize(head);
|
7725
|
+
if (free) {
|
7726
|
+
this.#keyList[head] = void 0;
|
7727
|
+
this.#valList[head] = void 0;
|
7728
|
+
this.#free.push(head);
|
7729
|
+
}
|
7730
|
+
if (this.#size === 1) {
|
7731
|
+
this.#head = this.#tail = 0;
|
7732
|
+
this.#free.length = 0;
|
7733
|
+
} else {
|
7734
|
+
this.#head = this.#next[head];
|
7735
|
+
}
|
7736
|
+
this.#keyMap.delete(k);
|
7737
|
+
this.#size--;
|
7738
|
+
return head;
|
7739
|
+
}
|
7540
7740
|
/**
|
7541
7741
|
* Check if a key is in the cache, without updating the recency of use.
|
7542
7742
|
* Will return false if the item is stale, even though it is technically
|
@@ -7555,24 +7755,24 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7555
7755
|
*/
|
7556
7756
|
has(k, hasOptions = {}) {
|
7557
7757
|
const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
|
7558
|
-
const index =
|
7758
|
+
const index = this.#keyMap.get(k);
|
7559
7759
|
if (index !== void 0) {
|
7560
|
-
const v =
|
7561
|
-
if (
|
7760
|
+
const v = this.#valList[index];
|
7761
|
+
if (this.#isBackgroundFetch(v) && v.__staleWhileFetching === void 0) {
|
7562
7762
|
return false;
|
7563
7763
|
}
|
7564
|
-
if (!
|
7764
|
+
if (!this.#isStale(index)) {
|
7565
7765
|
if (updateAgeOnHas) {
|
7566
|
-
|
7766
|
+
this.#updateItemAge(index);
|
7567
7767
|
}
|
7568
7768
|
if (status) {
|
7569
7769
|
status.has = "hit";
|
7570
|
-
|
7770
|
+
this.#statusTTL(status, index);
|
7571
7771
|
}
|
7572
7772
|
return true;
|
7573
7773
|
} else if (status) {
|
7574
7774
|
status.has = "stale";
|
7575
|
-
|
7775
|
+
this.#statusTTL(status, index);
|
7576
7776
|
}
|
7577
7777
|
} else if (status) {
|
7578
7778
|
status.has = "miss";
|
@@ -7588,12 +7788,125 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7588
7788
|
*/
|
7589
7789
|
peek(k, peekOptions = {}) {
|
7590
7790
|
const { allowStale = this.allowStale } = peekOptions;
|
7591
|
-
const index =
|
7592
|
-
if (index === void 0 || !allowStale &&
|
7791
|
+
const index = this.#keyMap.get(k);
|
7792
|
+
if (index === void 0 || !allowStale && this.#isStale(index)) {
|
7593
7793
|
return;
|
7594
7794
|
}
|
7595
|
-
const v =
|
7596
|
-
return
|
7795
|
+
const v = this.#valList[index];
|
7796
|
+
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
7797
|
+
}
|
7798
|
+
#backgroundFetch(k, index, options, context) {
|
7799
|
+
const v = index === void 0 ? void 0 : this.#valList[index];
|
7800
|
+
if (this.#isBackgroundFetch(v)) {
|
7801
|
+
return v;
|
7802
|
+
}
|
7803
|
+
const ac = new AC();
|
7804
|
+
const { signal } = options;
|
7805
|
+
signal?.addEventListener("abort", () => ac.abort(signal.reason), {
|
7806
|
+
signal: ac.signal
|
7807
|
+
});
|
7808
|
+
const fetchOpts = {
|
7809
|
+
signal: ac.signal,
|
7810
|
+
options,
|
7811
|
+
context
|
7812
|
+
};
|
7813
|
+
const cb = (v2, updateCache = false) => {
|
7814
|
+
const { aborted } = ac.signal;
|
7815
|
+
const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0;
|
7816
|
+
if (options.status) {
|
7817
|
+
if (aborted && !updateCache) {
|
7818
|
+
options.status.fetchAborted = true;
|
7819
|
+
options.status.fetchError = ac.signal.reason;
|
7820
|
+
if (ignoreAbort)
|
7821
|
+
options.status.fetchAbortIgnored = true;
|
7822
|
+
} else {
|
7823
|
+
options.status.fetchResolved = true;
|
7824
|
+
}
|
7825
|
+
}
|
7826
|
+
if (aborted && !ignoreAbort && !updateCache) {
|
7827
|
+
return fetchFail(ac.signal.reason);
|
7828
|
+
}
|
7829
|
+
const bf2 = p;
|
7830
|
+
if (this.#valList[index] === p) {
|
7831
|
+
if (v2 === void 0) {
|
7832
|
+
if (bf2.__staleWhileFetching) {
|
7833
|
+
this.#valList[index] = bf2.__staleWhileFetching;
|
7834
|
+
} else {
|
7835
|
+
this.#delete(k, "fetch");
|
7836
|
+
}
|
7837
|
+
} else {
|
7838
|
+
if (options.status)
|
7839
|
+
options.status.fetchUpdated = true;
|
7840
|
+
this.set(k, v2, fetchOpts.options);
|
7841
|
+
}
|
7842
|
+
}
|
7843
|
+
return v2;
|
7844
|
+
};
|
7845
|
+
const eb = (er) => {
|
7846
|
+
if (options.status) {
|
7847
|
+
options.status.fetchRejected = true;
|
7848
|
+
options.status.fetchError = er;
|
7849
|
+
}
|
7850
|
+
return fetchFail(er);
|
7851
|
+
};
|
7852
|
+
const fetchFail = (er) => {
|
7853
|
+
const { aborted } = ac.signal;
|
7854
|
+
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
7855
|
+
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
7856
|
+
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
7857
|
+
const bf2 = p;
|
7858
|
+
if (this.#valList[index] === p) {
|
7859
|
+
const del = !noDelete || bf2.__staleWhileFetching === void 0;
|
7860
|
+
if (del) {
|
7861
|
+
this.#delete(k, "fetch");
|
7862
|
+
} else if (!allowStaleAborted) {
|
7863
|
+
this.#valList[index] = bf2.__staleWhileFetching;
|
7864
|
+
}
|
7865
|
+
}
|
7866
|
+
if (allowStale) {
|
7867
|
+
if (options.status && bf2.__staleWhileFetching !== void 0) {
|
7868
|
+
options.status.returnedStale = true;
|
7869
|
+
}
|
7870
|
+
return bf2.__staleWhileFetching;
|
7871
|
+
} else if (bf2.__returned === bf2) {
|
7872
|
+
throw er;
|
7873
|
+
}
|
7874
|
+
};
|
7875
|
+
const pcall = (res, rej) => {
|
7876
|
+
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
7877
|
+
if (fmp && fmp instanceof Promise) {
|
7878
|
+
fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
|
7879
|
+
}
|
7880
|
+
ac.signal.addEventListener("abort", () => {
|
7881
|
+
if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
|
7882
|
+
res(void 0);
|
7883
|
+
if (options.allowStaleOnFetchAbort) {
|
7884
|
+
res = (v2) => cb(v2, true);
|
7885
|
+
}
|
7886
|
+
}
|
7887
|
+
});
|
7888
|
+
};
|
7889
|
+
if (options.status)
|
7890
|
+
options.status.fetchDispatched = true;
|
7891
|
+
const p = new Promise(pcall).then(cb, eb);
|
7892
|
+
const bf = Object.assign(p, {
|
7893
|
+
__abortController: ac,
|
7894
|
+
__staleWhileFetching: v,
|
7895
|
+
__returned: void 0
|
7896
|
+
});
|
7897
|
+
if (index === void 0) {
|
7898
|
+
this.set(k, bf, { ...fetchOpts.options, status: void 0 });
|
7899
|
+
index = this.#keyMap.get(k);
|
7900
|
+
} else {
|
7901
|
+
this.#valList[index] = bf;
|
7902
|
+
}
|
7903
|
+
return bf;
|
7904
|
+
}
|
7905
|
+
#isBackgroundFetch(p) {
|
7906
|
+
if (!this.#hasFetchMethod)
|
7907
|
+
return false;
|
7908
|
+
const b = p;
|
7909
|
+
return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
|
7597
7910
|
}
|
7598
7911
|
async fetch(k, fetchOptions = {}) {
|
7599
7912
|
const {
|
@@ -7617,7 +7930,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7617
7930
|
status,
|
7618
7931
|
signal
|
7619
7932
|
} = fetchOptions;
|
7620
|
-
if (!
|
7933
|
+
if (!this.#hasFetchMethod) {
|
7621
7934
|
if (status)
|
7622
7935
|
status.fetch = "get";
|
7623
7936
|
return this.get(k, {
|
@@ -7643,15 +7956,15 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7643
7956
|
status,
|
7644
7957
|
signal
|
7645
7958
|
};
|
7646
|
-
let index =
|
7959
|
+
let index = this.#keyMap.get(k);
|
7647
7960
|
if (index === void 0) {
|
7648
7961
|
if (status)
|
7649
7962
|
status.fetch = "miss";
|
7650
|
-
const p =
|
7963
|
+
const p = this.#backgroundFetch(k, index, options, context);
|
7651
7964
|
return p.__returned = p;
|
7652
7965
|
} else {
|
7653
|
-
const v =
|
7654
|
-
if (
|
7966
|
+
const v = this.#valList[index];
|
7967
|
+
if (this.#isBackgroundFetch(v)) {
|
7655
7968
|
const stale = allowStale && v.__staleWhileFetching !== void 0;
|
7656
7969
|
if (status) {
|
7657
7970
|
status.fetch = "inflight";
|
@@ -7660,19 +7973,19 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7660
7973
|
}
|
7661
7974
|
return stale ? v.__staleWhileFetching : v.__returned = v;
|
7662
7975
|
}
|
7663
|
-
const isStale =
|
7976
|
+
const isStale = this.#isStale(index);
|
7664
7977
|
if (!forceRefresh && !isStale) {
|
7665
7978
|
if (status)
|
7666
7979
|
status.fetch = "hit";
|
7667
|
-
|
7980
|
+
this.#moveToTail(index);
|
7668
7981
|
if (updateAgeOnGet) {
|
7669
|
-
|
7982
|
+
this.#updateItemAge(index);
|
7670
7983
|
}
|
7671
7984
|
if (status)
|
7672
|
-
|
7985
|
+
this.#statusTTL(status, index);
|
7673
7986
|
return v;
|
7674
7987
|
}
|
7675
|
-
const p =
|
7988
|
+
const p = this.#backgroundFetch(k, index, options, context);
|
7676
7989
|
const hasStale = p.__staleWhileFetching !== void 0;
|
7677
7990
|
const staleVal = hasStale && allowStale;
|
7678
7991
|
if (status) {
|
@@ -7690,7 +8003,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7690
8003
|
return v;
|
7691
8004
|
}
|
7692
8005
|
memo(k, memoOptions = {}) {
|
7693
|
-
const memoMethod =
|
8006
|
+
const memoMethod = this.#memoMethod;
|
7694
8007
|
if (!memoMethod) {
|
7695
8008
|
throw new Error("no memoMethod provided to constructor");
|
7696
8009
|
}
|
@@ -7713,18 +8026,18 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7713
8026
|
*/
|
7714
8027
|
get(k, getOptions = {}) {
|
7715
8028
|
const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions;
|
7716
|
-
const index =
|
8029
|
+
const index = this.#keyMap.get(k);
|
7717
8030
|
if (index !== void 0) {
|
7718
|
-
const value =
|
7719
|
-
const fetching =
|
8031
|
+
const value = this.#valList[index];
|
8032
|
+
const fetching = this.#isBackgroundFetch(value);
|
7720
8033
|
if (status)
|
7721
|
-
|
7722
|
-
if (
|
8034
|
+
this.#statusTTL(status, index);
|
8035
|
+
if (this.#isStale(index)) {
|
7723
8036
|
if (status)
|
7724
8037
|
status.get = "stale";
|
7725
8038
|
if (!fetching) {
|
7726
8039
|
if (!noDeleteOnStaleGet) {
|
7727
|
-
|
8040
|
+
this.#delete(k, "expire");
|
7728
8041
|
}
|
7729
8042
|
if (status && allowStale)
|
7730
8043
|
status.returnedStale = true;
|
@@ -7741,9 +8054,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7741
8054
|
if (fetching) {
|
7742
8055
|
return value.__staleWhileFetching;
|
7743
8056
|
}
|
7744
|
-
|
8057
|
+
this.#moveToTail(index);
|
7745
8058
|
if (updateAgeOnGet) {
|
7746
|
-
|
8059
|
+
this.#updateItemAge(index);
|
7747
8060
|
}
|
7748
8061
|
return value;
|
7749
8062
|
}
|
@@ -7751,450 +8064,126 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7751
8064
|
status.get = "miss";
|
7752
8065
|
}
|
7753
8066
|
}
|
8067
|
+
#connect(p, n) {
|
8068
|
+
this.#prev[n] = p;
|
8069
|
+
this.#next[p] = n;
|
8070
|
+
}
|
8071
|
+
#moveToTail(index) {
|
8072
|
+
if (index !== this.#tail) {
|
8073
|
+
if (index === this.#head) {
|
8074
|
+
this.#head = this.#next[index];
|
8075
|
+
} else {
|
8076
|
+
this.#connect(this.#prev[index], this.#next[index]);
|
8077
|
+
}
|
8078
|
+
this.#connect(this.#tail, index);
|
8079
|
+
this.#tail = index;
|
8080
|
+
}
|
8081
|
+
}
|
7754
8082
|
/**
|
7755
8083
|
* Deletes a key out of the cache.
|
7756
8084
|
*
|
7757
8085
|
* Returns true if the key was deleted, false otherwise.
|
7758
8086
|
*/
|
7759
8087
|
delete(k) {
|
7760
|
-
return
|
8088
|
+
return this.#delete(k, "delete");
|
7761
8089
|
}
|
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)");
|
8090
|
+
#delete(k, reason) {
|
8091
|
+
let deleted = false;
|
8092
|
+
if (this.#size !== 0) {
|
8093
|
+
const index = this.#keyMap.get(k);
|
8094
|
+
if (index !== void 0) {
|
8095
|
+
deleted = true;
|
8096
|
+
if (this.#size === 1) {
|
8097
|
+
this.#clear(reason);
|
8098
|
+
} else {
|
8099
|
+
this.#removeItemSize(index);
|
8100
|
+
const v = this.#valList[index];
|
8101
|
+
if (this.#isBackgroundFetch(v)) {
|
8102
|
+
v.__abortController.abort(new Error("deleted"));
|
8103
|
+
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
8104
|
+
if (this.#hasDispose) {
|
8105
|
+
this.#dispose?.(v, k, reason);
|
8106
|
+
}
|
8107
|
+
if (this.#hasDisposeAfter) {
|
8108
|
+
this.#disposed?.push([v, k, reason]);
|
8109
|
+
}
|
8110
|
+
}
|
8111
|
+
this.#keyMap.delete(k);
|
8112
|
+
this.#keyList[index] = void 0;
|
8113
|
+
this.#valList[index] = void 0;
|
8114
|
+
if (index === this.#tail) {
|
8115
|
+
this.#tail = this.#prev[index];
|
8116
|
+
} else if (index === this.#head) {
|
8117
|
+
this.#head = this.#next[index];
|
8118
|
+
} else {
|
8119
|
+
const pi = this.#prev[index];
|
8120
|
+
this.#next[pi] = this.#next[index];
|
8121
|
+
const ni = this.#next[index];
|
8122
|
+
this.#prev[ni] = this.#prev[index];
|
8123
|
+
}
|
8124
|
+
this.#size--;
|
8125
|
+
this.#free.push(index);
|
7883
8126
|
}
|
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
8127
|
}
|
7897
8128
|
}
|
7898
|
-
|
7899
|
-
|
7900
|
-
|
7901
|
-
|
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
|
-
}
|
7922
|
-
}
|
7923
|
-
}
|
7924
|
-
};
|
7925
|
-
rindexes_fn = function* ({ allowStale = this.allowStale } = {}) {
|
7926
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size)) {
|
7927
|
-
for (let i = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head); true; ) {
|
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];
|
8129
|
+
if (this.#hasDisposeAfter && this.#disposed?.length) {
|
8130
|
+
const dt = this.#disposed;
|
8131
|
+
let task;
|
8132
|
+
while (task = dt?.shift()) {
|
8133
|
+
this.#disposeAfter?.(...task);
|
7938
8134
|
}
|
7939
8135
|
}
|
8136
|
+
return deleted;
|
7940
8137
|
}
|
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;
|
8138
|
+
/**
|
8139
|
+
* Clear the cache entirely, throwing away all values.
|
8140
|
+
*/
|
8141
|
+
clear() {
|
8142
|
+
return this.#clear("delete");
|
7980
8143
|
}
|
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;
|
8144
|
+
#clear(reason) {
|
8145
|
+
for (const index of this.#rindexes({ allowStale: true })) {
|
8146
|
+
const v = this.#valList[index];
|
8147
|
+
if (this.#isBackgroundFetch(v)) {
|
8148
|
+
v.__abortController.abort(new Error("deleted"));
|
8000
8149
|
} 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");
|
8150
|
+
const k = this.#keyList[index];
|
8151
|
+
if (this.#hasDispose) {
|
8152
|
+
this.#dispose?.(v, k, reason);
|
8014
8153
|
}
|
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);
|
8154
|
+
if (this.#hasDisposeAfter) {
|
8155
|
+
this.#disposed?.push([v, k, reason]);
|
8064
8156
|
}
|
8065
8157
|
}
|
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
8158
|
}
|
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
|
-
}
|
8159
|
+
this.#keyMap.clear();
|
8160
|
+
this.#valList.fill(void 0);
|
8161
|
+
this.#keyList.fill(void 0);
|
8162
|
+
if (this.#ttls && this.#starts) {
|
8163
|
+
this.#ttls.fill(0);
|
8164
|
+
this.#starts.fill(0);
|
8143
8165
|
}
|
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);
|
8166
|
+
if (this.#sizes) {
|
8167
|
+
this.#sizes.fill(0);
|
8150
8168
|
}
|
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]);
|
8169
|
+
this.#head = 0;
|
8170
|
+
this.#tail = 0;
|
8171
|
+
this.#free.length = 0;
|
8172
|
+
this.#calculatedSize = 0;
|
8173
|
+
this.#size = 0;
|
8174
|
+
if (this.#hasDisposeAfter && this.#disposed) {
|
8175
|
+
const dt = this.#disposed;
|
8176
|
+
let task;
|
8177
|
+
while (task = dt?.shift()) {
|
8178
|
+
this.#disposeAfter?.(...task);
|
8167
8179
|
}
|
8168
8180
|
}
|
8169
8181
|
}
|
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
8182
|
};
|
8193
|
-
var LRUCache = _LRUCache;
|
8194
8183
|
exports.LRUCache = LRUCache;
|
8195
8184
|
}
|
8196
8185
|
});
|
8197
|
-
var require_hosts = (0,
|
8186
|
+
var require_hosts = (0, import_chunk_4VNS5WPM.__commonJS)({
|
8198
8187
|
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/hosts.js"(exports, module2) {
|
8199
8188
|
"use strict";
|
8200
8189
|
var maybeJoin = (...args) => args.every((arg) => arg) ? args.join("") : "";
|
@@ -8359,10 +8348,10 @@ var require_hosts = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8359
8348
|
module2.exports = hosts;
|
8360
8349
|
}
|
8361
8350
|
});
|
8362
|
-
var require_parse_url = (0,
|
8351
|
+
var require_parse_url = (0, import_chunk_4VNS5WPM.__commonJS)({
|
8363
8352
|
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/parse-url.js"(exports, module2) {
|
8364
8353
|
"use strict";
|
8365
|
-
var url = (0,
|
8354
|
+
var url = (0, import_chunk_4VNS5WPM.__require)("url");
|
8366
8355
|
var lastIndexOfBefore = (str, char, beforeChar) => {
|
8367
8356
|
const startPosition = str.indexOf(beforeChar);
|
8368
8357
|
return str.lastIndexOf(char, startPosition > -1 ? startPosition : Infinity);
|
@@ -8410,7 +8399,7 @@ var require_parse_url = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8410
8399
|
};
|
8411
8400
|
}
|
8412
8401
|
});
|
8413
|
-
var require_from_url = (0,
|
8402
|
+
var require_from_url = (0, import_chunk_4VNS5WPM.__commonJS)({
|
8414
8403
|
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/from-url.js"(exports, module2) {
|
8415
8404
|
"use strict";
|
8416
8405
|
var parseUrl = require_parse_url();
|
@@ -8502,7 +8491,7 @@ var require_from_url = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8502
8491
|
};
|
8503
8492
|
}
|
8504
8493
|
});
|
8505
|
-
var require_lib8 = (0,
|
8494
|
+
var require_lib8 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
8506
8495
|
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/index.js"(exports, module2) {
|
8507
8496
|
"use strict";
|
8508
8497
|
var { LRUCache } = require_commonjs();
|
@@ -8510,11 +8499,9 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8510
8499
|
var fromUrl = require_from_url();
|
8511
8500
|
var parseUrl = require_parse_url();
|
8512
8501
|
var cache = new LRUCache({ max: 1e3 });
|
8513
|
-
var
|
8514
|
-
var _GitHost = class _GitHost2 {
|
8502
|
+
var GitHost = class _GitHost {
|
8515
8503
|
constructor(type, user, auth, project, committish, defaultRepresentation, opts = {}) {
|
8516
|
-
|
8517
|
-
Object.assign(this, (0, import_chunk_WWAWV7DQ.__privateGet)(_GitHost2, _gitHosts)[type], {
|
8504
|
+
Object.assign(this, _GitHost.#gitHosts[type], {
|
8518
8505
|
type,
|
8519
8506
|
user,
|
8520
8507
|
auth,
|
@@ -8524,11 +8511,21 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8524
8511
|
opts
|
8525
8512
|
});
|
8526
8513
|
}
|
8514
|
+
static #gitHosts = { byShortcut: {}, byDomain: {} };
|
8515
|
+
static #protocols = {
|
8516
|
+
"git+ssh:": { name: "sshurl" },
|
8517
|
+
"ssh:": { name: "sshurl" },
|
8518
|
+
"git+https:": { name: "https", auth: true },
|
8519
|
+
"git:": { auth: true },
|
8520
|
+
"http:": { auth: true },
|
8521
|
+
"https:": { auth: true },
|
8522
|
+
"git+http:": { auth: true }
|
8523
|
+
};
|
8527
8524
|
static addHost(name, host) {
|
8528
|
-
|
8529
|
-
|
8530
|
-
|
8531
|
-
|
8525
|
+
_GitHost.#gitHosts[name] = host;
|
8526
|
+
_GitHost.#gitHosts.byDomain[host.domain] = name;
|
8527
|
+
_GitHost.#gitHosts.byShortcut[`${name}:`] = name;
|
8528
|
+
_GitHost.#protocols[`${name}:`] = { name };
|
8532
8529
|
}
|
8533
8530
|
static fromUrl(giturl, opts) {
|
8534
8531
|
if (typeof giturl !== "string") {
|
@@ -8537,33 +8534,50 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8537
8534
|
const key = giturl + JSON.stringify(opts || {});
|
8538
8535
|
if (!cache.has(key)) {
|
8539
8536
|
const hostArgs = fromUrl(giturl, opts, {
|
8540
|
-
gitHosts:
|
8541
|
-
protocols:
|
8537
|
+
gitHosts: _GitHost.#gitHosts,
|
8538
|
+
protocols: _GitHost.#protocols
|
8542
8539
|
});
|
8543
|
-
cache.set(key, hostArgs ? new
|
8540
|
+
cache.set(key, hostArgs ? new _GitHost(...hostArgs) : void 0);
|
8544
8541
|
}
|
8545
8542
|
return cache.get(key);
|
8546
8543
|
}
|
8547
8544
|
static parseUrl(url) {
|
8548
8545
|
return parseUrl(url);
|
8549
8546
|
}
|
8547
|
+
#fill(template, opts) {
|
8548
|
+
if (typeof template !== "function") {
|
8549
|
+
return null;
|
8550
|
+
}
|
8551
|
+
const options = { ...this, ...this.opts, ...opts };
|
8552
|
+
if (!options.path) {
|
8553
|
+
options.path = "";
|
8554
|
+
}
|
8555
|
+
if (options.path.startsWith("/")) {
|
8556
|
+
options.path = options.path.slice(1);
|
8557
|
+
}
|
8558
|
+
if (options.noCommittish) {
|
8559
|
+
options.committish = null;
|
8560
|
+
}
|
8561
|
+
const result = template(options);
|
8562
|
+
return options.noGitPlus && result.startsWith("git+") ? result.slice(4) : result;
|
8563
|
+
}
|
8550
8564
|
hash() {
|
8551
8565
|
return this.committish ? `#${this.committish}` : "";
|
8552
8566
|
}
|
8553
8567
|
ssh(opts) {
|
8554
|
-
return
|
8568
|
+
return this.#fill(this.sshtemplate, opts);
|
8555
8569
|
}
|
8556
8570
|
sshurl(opts) {
|
8557
|
-
return
|
8571
|
+
return this.#fill(this.sshurltemplate, opts);
|
8558
8572
|
}
|
8559
8573
|
browse(path5, ...args) {
|
8560
8574
|
if (typeof path5 !== "string") {
|
8561
|
-
return
|
8575
|
+
return this.#fill(this.browsetemplate, path5);
|
8562
8576
|
}
|
8563
8577
|
if (typeof args[0] !== "string") {
|
8564
|
-
return
|
8578
|
+
return this.#fill(this.browsetreetemplate, { ...args[0], path: path5 });
|
8565
8579
|
}
|
8566
|
-
return
|
8580
|
+
return this.#fill(this.browsetreetemplate, { ...args[1], fragment: args[0], path: path5 });
|
8567
8581
|
}
|
8568
8582
|
// If the path is known to be a file, then browseFile should be used. For some hosts
|
8569
8583
|
// the url is the same as browse, but for others like GitHub a file can use both `/tree/`
|
@@ -8572,36 +8586,36 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8572
8586
|
// does not redirect to a different commit.
|
8573
8587
|
browseFile(path5, ...args) {
|
8574
8588
|
if (typeof args[0] !== "string") {
|
8575
|
-
return
|
8589
|
+
return this.#fill(this.browseblobtemplate, { ...args[0], path: path5 });
|
8576
8590
|
}
|
8577
|
-
return
|
8591
|
+
return this.#fill(this.browseblobtemplate, { ...args[1], fragment: args[0], path: path5 });
|
8578
8592
|
}
|
8579
8593
|
docs(opts) {
|
8580
|
-
return
|
8594
|
+
return this.#fill(this.docstemplate, opts);
|
8581
8595
|
}
|
8582
8596
|
bugs(opts) {
|
8583
|
-
return
|
8597
|
+
return this.#fill(this.bugstemplate, opts);
|
8584
8598
|
}
|
8585
8599
|
https(opts) {
|
8586
|
-
return
|
8600
|
+
return this.#fill(this.httpstemplate, opts);
|
8587
8601
|
}
|
8588
8602
|
git(opts) {
|
8589
|
-
return
|
8603
|
+
return this.#fill(this.gittemplate, opts);
|
8590
8604
|
}
|
8591
8605
|
shortcut(opts) {
|
8592
|
-
return
|
8606
|
+
return this.#fill(this.shortcuttemplate, opts);
|
8593
8607
|
}
|
8594
8608
|
path(opts) {
|
8595
|
-
return
|
8609
|
+
return this.#fill(this.pathtemplate, opts);
|
8596
8610
|
}
|
8597
8611
|
tarball(opts) {
|
8598
|
-
return
|
8612
|
+
return this.#fill(this.tarballtemplate, { ...opts, noCommittish: false });
|
8599
8613
|
}
|
8600
8614
|
file(path5, opts) {
|
8601
|
-
return
|
8615
|
+
return this.#fill(this.filetemplate, { ...opts, path: path5 });
|
8602
8616
|
}
|
8603
8617
|
edit(path5, opts) {
|
8604
|
-
return
|
8618
|
+
return this.#fill(this.edittemplate, { ...opts, path: path5 });
|
8605
8619
|
}
|
8606
8620
|
getDefaultRepresentation() {
|
8607
8621
|
return this.default;
|
@@ -8613,276 +8627,13 @@ var require_lib8 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8613
8627
|
return this.sshurl(opts);
|
8614
8628
|
}
|
8615
8629
|
};
|
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
8630
|
for (const [name, host] of Object.entries(hosts)) {
|
8648
8631
|
GitHost.addHost(name, host);
|
8649
8632
|
}
|
8650
8633
|
module2.exports = GitHost;
|
8651
8634
|
}
|
8652
8635
|
});
|
8653
|
-
var
|
8654
|
-
"../../node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(exports, module2) {
|
8655
|
-
"use strict";
|
8656
|
-
var call = Function.prototype.call;
|
8657
|
-
var $hasOwn = Object.prototype.hasOwnProperty;
|
8658
|
-
var bind = (0, import_chunk_YXD4CJDK.require_function_bind)();
|
8659
|
-
module2.exports = bind.call(call, $hasOwn);
|
8660
|
-
}
|
8661
|
-
});
|
8662
|
-
var require_core = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
8663
|
-
"../../node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/core.json"(exports, module2) {
|
8664
|
-
module2.exports = {
|
8665
|
-
assert: true,
|
8666
|
-
"node:assert": [">= 14.18 && < 15", ">= 16"],
|
8667
|
-
"assert/strict": ">= 15",
|
8668
|
-
"node:assert/strict": ">= 16",
|
8669
|
-
async_hooks: ">= 8",
|
8670
|
-
"node:async_hooks": [">= 14.18 && < 15", ">= 16"],
|
8671
|
-
buffer_ieee754: ">= 0.5 && < 0.9.7",
|
8672
|
-
buffer: true,
|
8673
|
-
"node:buffer": [">= 14.18 && < 15", ">= 16"],
|
8674
|
-
child_process: true,
|
8675
|
-
"node:child_process": [">= 14.18 && < 15", ">= 16"],
|
8676
|
-
cluster: ">= 0.5",
|
8677
|
-
"node:cluster": [">= 14.18 && < 15", ">= 16"],
|
8678
|
-
console: true,
|
8679
|
-
"node:console": [">= 14.18 && < 15", ">= 16"],
|
8680
|
-
constants: true,
|
8681
|
-
"node:constants": [">= 14.18 && < 15", ">= 16"],
|
8682
|
-
crypto: true,
|
8683
|
-
"node:crypto": [">= 14.18 && < 15", ">= 16"],
|
8684
|
-
_debug_agent: ">= 1 && < 8",
|
8685
|
-
_debugger: "< 8",
|
8686
|
-
dgram: true,
|
8687
|
-
"node:dgram": [">= 14.18 && < 15", ">= 16"],
|
8688
|
-
diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"],
|
8689
|
-
"node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
|
8690
|
-
dns: true,
|
8691
|
-
"node:dns": [">= 14.18 && < 15", ">= 16"],
|
8692
|
-
"dns/promises": ">= 15",
|
8693
|
-
"node:dns/promises": ">= 16",
|
8694
|
-
domain: ">= 0.7.12",
|
8695
|
-
"node:domain": [">= 14.18 && < 15", ">= 16"],
|
8696
|
-
events: true,
|
8697
|
-
"node:events": [">= 14.18 && < 15", ">= 16"],
|
8698
|
-
freelist: "< 6",
|
8699
|
-
fs: true,
|
8700
|
-
"node:fs": [">= 14.18 && < 15", ">= 16"],
|
8701
|
-
"fs/promises": [">= 10 && < 10.1", ">= 14"],
|
8702
|
-
"node:fs/promises": [">= 14.18 && < 15", ">= 16"],
|
8703
|
-
_http_agent: ">= 0.11.1",
|
8704
|
-
"node:_http_agent": [">= 14.18 && < 15", ">= 16"],
|
8705
|
-
_http_client: ">= 0.11.1",
|
8706
|
-
"node:_http_client": [">= 14.18 && < 15", ">= 16"],
|
8707
|
-
_http_common: ">= 0.11.1",
|
8708
|
-
"node:_http_common": [">= 14.18 && < 15", ">= 16"],
|
8709
|
-
_http_incoming: ">= 0.11.1",
|
8710
|
-
"node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
|
8711
|
-
_http_outgoing: ">= 0.11.1",
|
8712
|
-
"node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
|
8713
|
-
_http_server: ">= 0.11.1",
|
8714
|
-
"node:_http_server": [">= 14.18 && < 15", ">= 16"],
|
8715
|
-
http: true,
|
8716
|
-
"node:http": [">= 14.18 && < 15", ">= 16"],
|
8717
|
-
http2: ">= 8.8",
|
8718
|
-
"node:http2": [">= 14.18 && < 15", ">= 16"],
|
8719
|
-
https: true,
|
8720
|
-
"node:https": [">= 14.18 && < 15", ">= 16"],
|
8721
|
-
inspector: ">= 8",
|
8722
|
-
"node:inspector": [">= 14.18 && < 15", ">= 16"],
|
8723
|
-
"inspector/promises": [">= 19"],
|
8724
|
-
"node:inspector/promises": [">= 19"],
|
8725
|
-
_linklist: "< 8",
|
8726
|
-
module: true,
|
8727
|
-
"node:module": [">= 14.18 && < 15", ">= 16"],
|
8728
|
-
net: true,
|
8729
|
-
"node:net": [">= 14.18 && < 15", ">= 16"],
|
8730
|
-
"node-inspect/lib/_inspect": ">= 7.6 && < 12",
|
8731
|
-
"node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
|
8732
|
-
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
|
8733
|
-
os: true,
|
8734
|
-
"node:os": [">= 14.18 && < 15", ">= 16"],
|
8735
|
-
path: true,
|
8736
|
-
"node:path": [">= 14.18 && < 15", ">= 16"],
|
8737
|
-
"path/posix": ">= 15.3",
|
8738
|
-
"node:path/posix": ">= 16",
|
8739
|
-
"path/win32": ">= 15.3",
|
8740
|
-
"node:path/win32": ">= 16",
|
8741
|
-
perf_hooks: ">= 8.5",
|
8742
|
-
"node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
|
8743
|
-
process: ">= 1",
|
8744
|
-
"node:process": [">= 14.18 && < 15", ">= 16"],
|
8745
|
-
punycode: ">= 0.5",
|
8746
|
-
"node:punycode": [">= 14.18 && < 15", ">= 16"],
|
8747
|
-
querystring: true,
|
8748
|
-
"node:querystring": [">= 14.18 && < 15", ">= 16"],
|
8749
|
-
readline: true,
|
8750
|
-
"node:readline": [">= 14.18 && < 15", ">= 16"],
|
8751
|
-
"readline/promises": ">= 17",
|
8752
|
-
"node:readline/promises": ">= 17",
|
8753
|
-
repl: true,
|
8754
|
-
"node:repl": [">= 14.18 && < 15", ">= 16"],
|
8755
|
-
smalloc: ">= 0.11.5 && < 3",
|
8756
|
-
_stream_duplex: ">= 0.9.4",
|
8757
|
-
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
|
8758
|
-
_stream_transform: ">= 0.9.4",
|
8759
|
-
"node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
|
8760
|
-
_stream_wrap: ">= 1.4.1",
|
8761
|
-
"node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
|
8762
|
-
_stream_passthrough: ">= 0.9.4",
|
8763
|
-
"node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
|
8764
|
-
_stream_readable: ">= 0.9.4",
|
8765
|
-
"node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
|
8766
|
-
_stream_writable: ">= 0.9.4",
|
8767
|
-
"node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
|
8768
|
-
stream: true,
|
8769
|
-
"node:stream": [">= 14.18 && < 15", ">= 16"],
|
8770
|
-
"stream/consumers": ">= 16.7",
|
8771
|
-
"node:stream/consumers": ">= 16.7",
|
8772
|
-
"stream/promises": ">= 15",
|
8773
|
-
"node:stream/promises": ">= 16",
|
8774
|
-
"stream/web": ">= 16.5",
|
8775
|
-
"node:stream/web": ">= 16.5",
|
8776
|
-
string_decoder: true,
|
8777
|
-
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
|
8778
|
-
sys: [">= 0.4 && < 0.7", ">= 0.8"],
|
8779
|
-
"node:sys": [">= 14.18 && < 15", ">= 16"],
|
8780
|
-
"test/reporters": ">= 19.9 && < 20.2",
|
8781
|
-
"node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
|
8782
|
-
"node:test": [">= 16.17 && < 17", ">= 18"],
|
8783
|
-
timers: true,
|
8784
|
-
"node:timers": [">= 14.18 && < 15", ">= 16"],
|
8785
|
-
"timers/promises": ">= 15",
|
8786
|
-
"node:timers/promises": ">= 16",
|
8787
|
-
_tls_common: ">= 0.11.13",
|
8788
|
-
"node:_tls_common": [">= 14.18 && < 15", ">= 16"],
|
8789
|
-
_tls_legacy: ">= 0.11.3 && < 10",
|
8790
|
-
_tls_wrap: ">= 0.11.3",
|
8791
|
-
"node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
|
8792
|
-
tls: true,
|
8793
|
-
"node:tls": [">= 14.18 && < 15", ">= 16"],
|
8794
|
-
trace_events: ">= 10",
|
8795
|
-
"node:trace_events": [">= 14.18 && < 15", ">= 16"],
|
8796
|
-
tty: true,
|
8797
|
-
"node:tty": [">= 14.18 && < 15", ">= 16"],
|
8798
|
-
url: true,
|
8799
|
-
"node:url": [">= 14.18 && < 15", ">= 16"],
|
8800
|
-
util: true,
|
8801
|
-
"node:util": [">= 14.18 && < 15", ">= 16"],
|
8802
|
-
"util/types": ">= 15.3",
|
8803
|
-
"node:util/types": ">= 16",
|
8804
|
-
"v8/tools/arguments": ">= 10 && < 12",
|
8805
|
-
"v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
8806
|
-
"v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
8807
|
-
"v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
8808
|
-
"v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
8809
|
-
"v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
8810
|
-
"v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
8811
|
-
v8: ">= 1",
|
8812
|
-
"node:v8": [">= 14.18 && < 15", ">= 16"],
|
8813
|
-
vm: true,
|
8814
|
-
"node:vm": [">= 14.18 && < 15", ">= 16"],
|
8815
|
-
wasi: [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
|
8816
|
-
"node:wasi": [">= 18.17 && < 19", ">= 20"],
|
8817
|
-
worker_threads: ">= 11.7",
|
8818
|
-
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
|
8819
|
-
zlib: ">= 0.5",
|
8820
|
-
"node:zlib": [">= 14.18 && < 15", ">= 16"]
|
8821
|
-
};
|
8822
|
-
}
|
8823
|
-
});
|
8824
|
-
var require_is_core_module = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
8825
|
-
"../../node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/index.js"(exports, module2) {
|
8826
|
-
"use strict";
|
8827
|
-
var hasOwn = require_hasown();
|
8828
|
-
function specifierIncluded(current, specifier) {
|
8829
|
-
var nodeParts = current.split(".");
|
8830
|
-
var parts = specifier.split(" ");
|
8831
|
-
var op = parts.length > 1 ? parts[0] : "=";
|
8832
|
-
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split(".");
|
8833
|
-
for (var i = 0; i < 3; ++i) {
|
8834
|
-
var cur = parseInt(nodeParts[i] || 0, 10);
|
8835
|
-
var ver = parseInt(versionParts[i] || 0, 10);
|
8836
|
-
if (cur === ver) {
|
8837
|
-
continue;
|
8838
|
-
}
|
8839
|
-
if (op === "<") {
|
8840
|
-
return cur < ver;
|
8841
|
-
}
|
8842
|
-
if (op === ">=") {
|
8843
|
-
return cur >= ver;
|
8844
|
-
}
|
8845
|
-
return false;
|
8846
|
-
}
|
8847
|
-
return op === ">=";
|
8848
|
-
}
|
8849
|
-
function matchesRange(current, range) {
|
8850
|
-
var specifiers = range.split(/ ?&& ?/);
|
8851
|
-
if (specifiers.length === 0) {
|
8852
|
-
return false;
|
8853
|
-
}
|
8854
|
-
for (var i = 0; i < specifiers.length; ++i) {
|
8855
|
-
if (!specifierIncluded(current, specifiers[i])) {
|
8856
|
-
return false;
|
8857
|
-
}
|
8858
|
-
}
|
8859
|
-
return true;
|
8860
|
-
}
|
8861
|
-
function versionIncluded(nodeVersion, specifierValue) {
|
8862
|
-
if (typeof specifierValue === "boolean") {
|
8863
|
-
return specifierValue;
|
8864
|
-
}
|
8865
|
-
var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion;
|
8866
|
-
if (typeof current !== "string") {
|
8867
|
-
throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required");
|
8868
|
-
}
|
8869
|
-
if (specifierValue && typeof specifierValue === "object") {
|
8870
|
-
for (var i = 0; i < specifierValue.length; ++i) {
|
8871
|
-
if (matchesRange(current, specifierValue[i])) {
|
8872
|
-
return true;
|
8873
|
-
}
|
8874
|
-
}
|
8875
|
-
return false;
|
8876
|
-
}
|
8877
|
-
return matchesRange(current, specifierValue);
|
8878
|
-
}
|
8879
|
-
var data = require_core();
|
8880
|
-
module2.exports = function isCore(x, nodeVersion) {
|
8881
|
-
return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
|
8882
|
-
};
|
8883
|
-
}
|
8884
|
-
});
|
8885
|
-
var require_extract_description = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
8636
|
+
var require_extract_description = (0, import_chunk_4VNS5WPM.__commonJS)({
|
8886
8637
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/extract_description.js"(exports, module2) {
|
8887
8638
|
"use strict";
|
8888
8639
|
module2.exports = extractDescription;
|
@@ -8907,7 +8658,7 @@ var require_extract_description = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8907
8658
|
}
|
8908
8659
|
}
|
8909
8660
|
});
|
8910
|
-
var require_typos = (0,
|
8661
|
+
var require_typos = (0, import_chunk_4VNS5WPM.__commonJS)({
|
8911
8662
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/typos.json"(exports, module2) {
|
8912
8663
|
module2.exports = {
|
8913
8664
|
topLevel: {
|
@@ -8936,17 +8687,17 @@ var require_typos = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8936
8687
|
};
|
8937
8688
|
}
|
8938
8689
|
});
|
8939
|
-
var require_fixer = (0,
|
8690
|
+
var require_fixer = (0, import_chunk_4VNS5WPM.__commonJS)({
|
8940
8691
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
|
8941
8692
|
"use strict";
|
8942
8693
|
var isValidSemver = require_valid();
|
8943
8694
|
var cleanSemver = require_clean();
|
8944
8695
|
var validateLicense = require_validate_npm_package_license();
|
8945
8696
|
var hostedGitInfo = require_lib8();
|
8946
|
-
var isBuiltinModule = require_is_core_module();
|
8697
|
+
var isBuiltinModule = (0, import_chunk_67I7CEQJ.require_is_core_module)();
|
8947
8698
|
var depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
|
8948
8699
|
var extractDescription = require_extract_description();
|
8949
|
-
var url = (0,
|
8700
|
+
var url = (0, import_chunk_4VNS5WPM.__require)("url");
|
8950
8701
|
var typos = require_typos();
|
8951
8702
|
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
8952
8703
|
module2.exports = {
|
@@ -9367,7 +9118,7 @@ var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9367
9118
|
}
|
9368
9119
|
}
|
9369
9120
|
});
|
9370
|
-
var require_warning_messages = (0,
|
9121
|
+
var require_warning_messages = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9371
9122
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/warning_messages.json"(exports, module2) {
|
9372
9123
|
module2.exports = {
|
9373
9124
|
repositories: "'repositories' (plural) Not supported. Please pick one as the 'repository' field",
|
@@ -9401,10 +9152,10 @@ var require_warning_messages = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9401
9152
|
};
|
9402
9153
|
}
|
9403
9154
|
});
|
9404
|
-
var require_make_warning = (0,
|
9155
|
+
var require_make_warning = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9405
9156
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/make_warning.js"(exports, module2) {
|
9406
9157
|
"use strict";
|
9407
|
-
var util = (0,
|
9158
|
+
var util = (0, import_chunk_4VNS5WPM.__require)("util");
|
9408
9159
|
var messages = require_warning_messages();
|
9409
9160
|
module2.exports = function() {
|
9410
9161
|
var args = Array.prototype.slice.call(arguments, 0);
|
@@ -9426,7 +9177,7 @@ var require_make_warning = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9426
9177
|
}
|
9427
9178
|
}
|
9428
9179
|
});
|
9429
|
-
var require_normalize = (0,
|
9180
|
+
var require_normalize = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9430
9181
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/normalize.js"(exports, module2) {
|
9431
9182
|
"use strict";
|
9432
9183
|
module2.exports = normalize;
|
@@ -9482,10 +9233,10 @@ var require_normalize = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9482
9233
|
}
|
9483
9234
|
}
|
9484
9235
|
});
|
9485
|
-
var require_crypto_random_string = (0,
|
9236
|
+
var require_crypto_random_string = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9486
9237
|
"../../node_modules/.pnpm/crypto-random-string@2.0.0/node_modules/crypto-random-string/index.js"(exports, module2) {
|
9487
9238
|
"use strict";
|
9488
|
-
var crypto = (0,
|
9239
|
+
var crypto = (0, import_chunk_4VNS5WPM.__require)("crypto");
|
9489
9240
|
module2.exports = (length) => {
|
9490
9241
|
if (!Number.isFinite(length)) {
|
9491
9242
|
throw new TypeError("Expected a finite number");
|
@@ -9494,17 +9245,17 @@ var require_crypto_random_string = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9494
9245
|
};
|
9495
9246
|
}
|
9496
9247
|
});
|
9497
|
-
var require_unique_string = (0,
|
9248
|
+
var require_unique_string = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9498
9249
|
"../../node_modules/.pnpm/unique-string@2.0.0/node_modules/unique-string/index.js"(exports, module2) {
|
9499
9250
|
"use strict";
|
9500
9251
|
var cryptoRandomString = require_crypto_random_string();
|
9501
9252
|
module2.exports = () => cryptoRandomString(32);
|
9502
9253
|
}
|
9503
9254
|
});
|
9504
|
-
var require_polyfills = (0,
|
9255
|
+
var require_polyfills = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9505
9256
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports, module2) {
|
9506
9257
|
"use strict";
|
9507
|
-
var constants = (0,
|
9258
|
+
var constants = (0, import_chunk_4VNS5WPM.__require)("constants");
|
9508
9259
|
var origCwd = process.cwd;
|
9509
9260
|
var cwd = null;
|
9510
9261
|
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
@@ -9788,10 +9539,10 @@ var require_polyfills = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9788
9539
|
}
|
9789
9540
|
}
|
9790
9541
|
});
|
9791
|
-
var require_legacy_streams = (0,
|
9542
|
+
var require_legacy_streams = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9792
9543
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
|
9793
9544
|
"use strict";
|
9794
|
-
var Stream = (0,
|
9545
|
+
var Stream = (0, import_chunk_4VNS5WPM.__require)("stream").Stream;
|
9795
9546
|
module2.exports = legacy;
|
9796
9547
|
function legacy(fs4) {
|
9797
9548
|
return {
|
@@ -9883,7 +9634,7 @@ var require_legacy_streams = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9883
9634
|
}
|
9884
9635
|
}
|
9885
9636
|
});
|
9886
|
-
var require_clone = (0,
|
9637
|
+
var require_clone = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9887
9638
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports, module2) {
|
9888
9639
|
"use strict";
|
9889
9640
|
module2.exports = clone;
|
@@ -9904,14 +9655,14 @@ var require_clone = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9904
9655
|
}
|
9905
9656
|
}
|
9906
9657
|
});
|
9907
|
-
var require_graceful_fs = (0,
|
9658
|
+
var require_graceful_fs = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9908
9659
|
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
9909
9660
|
"use strict";
|
9910
|
-
var fs4 = (0,
|
9661
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
9911
9662
|
var polyfills = require_polyfills();
|
9912
9663
|
var legacy = require_legacy_streams();
|
9913
9664
|
var clone = require_clone();
|
9914
|
-
var util = (0,
|
9665
|
+
var util = (0, import_chunk_4VNS5WPM.__require)("util");
|
9915
9666
|
var gracefulQueue;
|
9916
9667
|
var previousSymbol;
|
9917
9668
|
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
@@ -9970,7 +9721,7 @@ var require_graceful_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
9970
9721
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
9971
9722
|
process.on("exit", function() {
|
9972
9723
|
debug(fs4[gracefulQueue]);
|
9973
|
-
(0,
|
9724
|
+
(0, import_chunk_4VNS5WPM.__require)("assert").equal(fs4[gracefulQueue].length, 0);
|
9974
9725
|
});
|
9975
9726
|
}
|
9976
9727
|
}
|
@@ -10273,10 +10024,10 @@ var require_graceful_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10273
10024
|
}
|
10274
10025
|
}
|
10275
10026
|
});
|
10276
|
-
var require_is_path_cwd = (0,
|
10027
|
+
var require_is_path_cwd = (0, import_chunk_4VNS5WPM.__commonJS)({
|
10277
10028
|
"../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js"(exports, module2) {
|
10278
10029
|
"use strict";
|
10279
|
-
var path5 = (0,
|
10030
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
10280
10031
|
module2.exports = (path_) => {
|
10281
10032
|
let cwd = process.cwd();
|
10282
10033
|
path_ = path5.resolve(path_);
|
@@ -10288,10 +10039,10 @@ var require_is_path_cwd = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10288
10039
|
};
|
10289
10040
|
}
|
10290
10041
|
});
|
10291
|
-
var require_is_path_inside = (0,
|
10042
|
+
var require_is_path_inside = (0, import_chunk_4VNS5WPM.__commonJS)({
|
10292
10043
|
"../../node_modules/.pnpm/is-path-inside@3.0.3/node_modules/is-path-inside/index.js"(exports, module2) {
|
10293
10044
|
"use strict";
|
10294
|
-
var path5 = (0,
|
10045
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
10295
10046
|
module2.exports = (childPath, parentPath) => {
|
10296
10047
|
const relation = path5.relative(parentPath, childPath);
|
10297
10048
|
return Boolean(
|
@@ -10300,7 +10051,7 @@ var require_is_path_inside = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10300
10051
|
};
|
10301
10052
|
}
|
10302
10053
|
});
|
10303
|
-
var require_concat_map = (0,
|
10054
|
+
var require_concat_map = (0, import_chunk_4VNS5WPM.__commonJS)({
|
10304
10055
|
"../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports, module2) {
|
10305
10056
|
"use strict";
|
10306
10057
|
module2.exports = function(xs, fn) {
|
@@ -10317,7 +10068,7 @@ var require_concat_map = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10317
10068
|
};
|
10318
10069
|
}
|
10319
10070
|
});
|
10320
|
-
var require_brace_expansion2 = (0,
|
10071
|
+
var require_brace_expansion2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
10321
10072
|
"../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports, module2) {
|
10322
10073
|
"use strict";
|
10323
10074
|
var concatMap = require_concat_map();
|
@@ -10460,14 +10211,14 @@ var require_brace_expansion2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10460
10211
|
}
|
10461
10212
|
}
|
10462
10213
|
});
|
10463
|
-
var require_minimatch2 = (0,
|
10214
|
+
var require_minimatch2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
10464
10215
|
"../../node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js"(exports, module2) {
|
10465
10216
|
"use strict";
|
10466
10217
|
module2.exports = minimatch;
|
10467
10218
|
minimatch.Minimatch = Minimatch;
|
10468
10219
|
var path5 = function() {
|
10469
10220
|
try {
|
10470
|
-
return (0,
|
10221
|
+
return (0, import_chunk_4VNS5WPM.__require)("path");
|
10471
10222
|
} catch (e) {
|
10472
10223
|
}
|
10473
10224
|
}() || {
|
@@ -11032,7 +10783,7 @@ var require_minimatch2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11032
10783
|
}
|
11033
10784
|
}
|
11034
10785
|
});
|
11035
|
-
var require_path_is_absolute = (0,
|
10786
|
+
var require_path_is_absolute = (0, import_chunk_4VNS5WPM.__commonJS)({
|
11036
10787
|
"../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports, module2) {
|
11037
10788
|
"use strict";
|
11038
10789
|
function posix(path5) {
|
@@ -11050,7 +10801,7 @@ var require_path_is_absolute = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11050
10801
|
module2.exports.win32 = win32;
|
11051
10802
|
}
|
11052
10803
|
});
|
11053
|
-
var require_common2 = (0,
|
10804
|
+
var require_common2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
11054
10805
|
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js"(exports) {
|
11055
10806
|
"use strict";
|
11056
10807
|
exports.setopts = setopts;
|
@@ -11063,8 +10814,8 @@ var require_common2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11063
10814
|
function ownProp(obj, field) {
|
11064
10815
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
11065
10816
|
}
|
11066
|
-
var fs4 = (0,
|
11067
|
-
var path5 = (0,
|
10817
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
10818
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
11068
10819
|
var minimatch = require_minimatch2();
|
11069
10820
|
var isAbsolute = require_path_is_absolute();
|
11070
10821
|
var Minimatch = minimatch.Minimatch;
|
@@ -11243,7 +10994,7 @@ var require_common2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11243
10994
|
}
|
11244
10995
|
}
|
11245
10996
|
});
|
11246
|
-
var require_sync2 = (0,
|
10997
|
+
var require_sync2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
11247
10998
|
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js"(exports, module2) {
|
11248
10999
|
"use strict";
|
11249
11000
|
module2.exports = globSync;
|
@@ -11252,9 +11003,9 @@ var require_sync2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11252
11003
|
var minimatch = require_minimatch2();
|
11253
11004
|
var Minimatch = minimatch.Minimatch;
|
11254
11005
|
var Glob = require_glob2().Glob;
|
11255
|
-
var util = (0,
|
11256
|
-
var path5 = (0,
|
11257
|
-
var assert = (0,
|
11006
|
+
var util = (0, import_chunk_4VNS5WPM.__require)("util");
|
11007
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
11008
|
+
var assert = (0, import_chunk_4VNS5WPM.__require)("assert");
|
11258
11009
|
var isAbsolute = require_path_is_absolute();
|
11259
11010
|
var common = require_common2();
|
11260
11011
|
var setopts = common.setopts;
|
@@ -11597,7 +11348,7 @@ var require_sync2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11597
11348
|
};
|
11598
11349
|
}
|
11599
11350
|
});
|
11600
|
-
var require_glob2 = (0,
|
11351
|
+
var require_glob2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
11601
11352
|
"../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js"(exports, module2) {
|
11602
11353
|
"use strict";
|
11603
11354
|
module2.exports = glob;
|
@@ -11605,16 +11356,16 @@ var require_glob2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11605
11356
|
var minimatch = require_minimatch2();
|
11606
11357
|
var Minimatch = minimatch.Minimatch;
|
11607
11358
|
var inherits = require_inherits();
|
11608
|
-
var EE = (0,
|
11609
|
-
var path5 = (0,
|
11610
|
-
var assert = (0,
|
11359
|
+
var EE = (0, import_chunk_4VNS5WPM.__require)("events").EventEmitter;
|
11360
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
11361
|
+
var assert = (0, import_chunk_4VNS5WPM.__require)("assert");
|
11611
11362
|
var isAbsolute = require_path_is_absolute();
|
11612
11363
|
var globSync = require_sync2();
|
11613
11364
|
var common = require_common2();
|
11614
11365
|
var setopts = common.setopts;
|
11615
11366
|
var ownProp = common.ownProp;
|
11616
11367
|
var inflight = require_inflight();
|
11617
|
-
var util = (0,
|
11368
|
+
var util = (0, import_chunk_4VNS5WPM.__require)("util");
|
11618
11369
|
var childrenIgnored = common.childrenIgnored;
|
11619
11370
|
var isIgnored = common.isIgnored;
|
11620
11371
|
var once = require_once();
|
@@ -12152,12 +11903,12 @@ var require_glob2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12152
11903
|
};
|
12153
11904
|
}
|
12154
11905
|
});
|
12155
|
-
var require_rimraf = (0,
|
11906
|
+
var require_rimraf = (0, import_chunk_4VNS5WPM.__commonJS)({
|
12156
11907
|
"../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js"(exports, module2) {
|
12157
11908
|
"use strict";
|
12158
|
-
var assert = (0,
|
12159
|
-
var path5 = (0,
|
12160
|
-
var fs4 = (0,
|
11909
|
+
var assert = (0, import_chunk_4VNS5WPM.__require)("assert");
|
11910
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
11911
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
12161
11912
|
var glob = void 0;
|
12162
11913
|
try {
|
12163
11914
|
glob = require_glob2();
|
@@ -12431,10 +12182,10 @@ var require_rimraf = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12431
12182
|
rimraf.sync = rimrafSync;
|
12432
12183
|
}
|
12433
12184
|
});
|
12434
|
-
var require_clean_stack = (0,
|
12185
|
+
var require_clean_stack = (0, import_chunk_4VNS5WPM.__commonJS)({
|
12435
12186
|
"../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports, module2) {
|
12436
12187
|
"use strict";
|
12437
|
-
var os = (0,
|
12188
|
+
var os = (0, import_chunk_4VNS5WPM.__require)("os");
|
12438
12189
|
var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
|
12439
12190
|
var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
|
12440
12191
|
var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir();
|
@@ -12459,10 +12210,10 @@ var require_clean_stack = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12459
12210
|
};
|
12460
12211
|
}
|
12461
12212
|
});
|
12462
|
-
var require_aggregate_error = (0,
|
12213
|
+
var require_aggregate_error = (0, import_chunk_4VNS5WPM.__commonJS)({
|
12463
12214
|
"../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js"(exports, module2) {
|
12464
12215
|
"use strict";
|
12465
|
-
var indentString = (0,
|
12216
|
+
var indentString = (0, import_chunk_KDP6C3CB.require_indent_string)();
|
12466
12217
|
var cleanStack = require_clean_stack();
|
12467
12218
|
var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, "");
|
12468
12219
|
var AggregateError = class extends Error {
|
@@ -12496,7 +12247,7 @@ var require_aggregate_error = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12496
12247
|
module2.exports = AggregateError;
|
12497
12248
|
}
|
12498
12249
|
});
|
12499
|
-
var require_p_map = (0,
|
12250
|
+
var require_p_map = (0, import_chunk_4VNS5WPM.__commonJS)({
|
12500
12251
|
"../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js"(exports, module2) {
|
12501
12252
|
"use strict";
|
12502
12253
|
var AggregateError = require_aggregate_error();
|
@@ -12565,14 +12316,14 @@ var require_p_map = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12565
12316
|
};
|
12566
12317
|
}
|
12567
12318
|
});
|
12568
|
-
var require_del = (0,
|
12319
|
+
var require_del = (0, import_chunk_4VNS5WPM.__commonJS)({
|
12569
12320
|
"../../node_modules/.pnpm/del@6.1.1/node_modules/del/index.js"(exports, module2) {
|
12570
12321
|
"use strict";
|
12571
|
-
var { promisify } = (0,
|
12572
|
-
var path5 = (0,
|
12573
|
-
var globby = (0,
|
12574
|
-
var isGlob = (0,
|
12575
|
-
var slash = (0,
|
12322
|
+
var { promisify } = (0, import_chunk_4VNS5WPM.__require)("util");
|
12323
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
12324
|
+
var globby = (0, import_chunk_JOIIWB3U.require_globby)();
|
12325
|
+
var isGlob = (0, import_chunk_JOIIWB3U.require_is_glob)();
|
12326
|
+
var slash = (0, import_chunk_JOIIWB3U.require_slash)();
|
12576
12327
|
var gracefulFs = require_graceful_fs();
|
12577
12328
|
var isPathCwd = require_is_path_cwd();
|
12578
12329
|
var isPathInside = require_is_path_inside();
|
@@ -12676,17 +12427,17 @@ var require_del = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12676
12427
|
};
|
12677
12428
|
}
|
12678
12429
|
});
|
12679
|
-
var require_tempy = (0,
|
12430
|
+
var require_tempy = (0, import_chunk_4VNS5WPM.__commonJS)({
|
12680
12431
|
"../../node_modules/.pnpm/tempy@1.0.1/node_modules/tempy/index.js"(exports, module2) {
|
12681
12432
|
"use strict";
|
12682
|
-
var fs4 = (0,
|
12683
|
-
var path5 = (0,
|
12433
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
12434
|
+
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
12684
12435
|
var uniqueString = require_unique_string();
|
12685
|
-
var tempDir = (0,
|
12686
|
-
var isStream = (0,
|
12436
|
+
var tempDir = (0, import_chunk_5VQNKCKW.require_temp_dir)();
|
12437
|
+
var isStream = (0, import_chunk_MM4ARWWY.require_is_stream)();
|
12687
12438
|
var del = require_del();
|
12688
|
-
var stream = (0,
|
12689
|
-
var { promisify } = (0,
|
12439
|
+
var stream = (0, import_chunk_4VNS5WPM.__require)("stream");
|
12440
|
+
var { promisify } = (0, import_chunk_4VNS5WPM.__require)("util");
|
12690
12441
|
var pipeline = promisify(stream.pipeline);
|
12691
12442
|
var { writeFile } = fs4.promises;
|
12692
12443
|
var getPath = (prefix = "") => path5.join(tempDir, prefix + uniqueString());
|
@@ -12738,7 +12489,7 @@ var require_tempy = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
12738
12489
|
});
|
12739
12490
|
}
|
12740
12491
|
});
|
12741
|
-
var import_npm_packlist = (0,
|
12492
|
+
var import_npm_packlist = (0, import_chunk_4VNS5WPM.__toESM)(require_lib5());
|
12742
12493
|
var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
12743
12494
|
async function findUp(name, {
|
12744
12495
|
cwd = import_node_process.default.cwd(),
|
@@ -12780,7 +12531,7 @@ function findUpSync(name, {
|
|
12780
12531
|
directory = import_node_path2.default.dirname(directory);
|
12781
12532
|
}
|
12782
12533
|
}
|
12783
|
-
var import_code_frame = (0,
|
12534
|
+
var import_code_frame = (0, import_chunk_4VNS5WPM.__toESM)(require_lib7(), 1);
|
12784
12535
|
var safeLastIndexOf = (string, searchString, index) => index < 0 ? -1 : string.lastIndexOf(searchString, index);
|
12785
12536
|
function getPosition(text, textIndex) {
|
12786
12537
|
const lineBreakBefore = safeLastIndexOf(text, "\n", textIndex - 1);
|
@@ -12799,31 +12550,28 @@ function indexToLineColumn(text, textIndex, { oneBased = false } = {}) {
|
|
12799
12550
|
return oneBased ? { line: position.line + 1, column: position.column + 1 } : position;
|
12800
12551
|
}
|
12801
12552
|
var getCodePoint = (character) => `\\u{${character.codePointAt(0).toString(16)}}`;
|
12802
|
-
var
|
12803
|
-
|
12553
|
+
var JSONError = class _JSONError extends Error {
|
12554
|
+
name = "JSONError";
|
12555
|
+
fileName;
|
12556
|
+
codeFrame;
|
12557
|
+
rawCodeFrame;
|
12558
|
+
#message;
|
12804
12559
|
constructor(message) {
|
12805
12560
|
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);
|
12561
|
+
this.#message = message;
|
12562
|
+
Error.captureStackTrace?.(this, _JSONError);
|
12813
12563
|
}
|
12814
12564
|
get message() {
|
12815
12565
|
const { fileName, codeFrame } = this;
|
12816
|
-
return `${
|
12566
|
+
return `${this.#message}${fileName ? ` in ${fileName}` : ""}${codeFrame ? `
|
12817
12567
|
|
12818
12568
|
${codeFrame}
|
12819
12569
|
` : ""}`;
|
12820
12570
|
}
|
12821
12571
|
set message(message) {
|
12822
|
-
|
12572
|
+
this.#message = message;
|
12823
12573
|
}
|
12824
12574
|
};
|
12825
|
-
_message = /* @__PURE__ */ new WeakMap();
|
12826
|
-
var JSONError = _JSONError;
|
12827
12575
|
var generateCodeFrame = (string, location, highlightCode = true) => (0, import_code_frame.codeFrameColumns)(string, { start: location }, { highlightCode });
|
12828
12576
|
var getErrorLocation = (string, message) => {
|
12829
12577
|
const match = message.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);
|
@@ -12877,7 +12625,7 @@ function parseJson(string, reviver, fileName) {
|
|
12877
12625
|
}
|
12878
12626
|
throw jsonError;
|
12879
12627
|
}
|
12880
|
-
var import_normalize_package_data = (0,
|
12628
|
+
var import_normalize_package_data = (0, import_chunk_4VNS5WPM.__toESM)(require_normalize(), 1);
|
12881
12629
|
function toPath2(urlOrPath) {
|
12882
12630
|
return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
|
12883
12631
|
}
|
@@ -12917,9 +12665,9 @@ function readPackageUpSync(options) {
|
|
12917
12665
|
path: filePath
|
12918
12666
|
};
|
12919
12667
|
}
|
12920
|
-
var import_tempy = (0,
|
12668
|
+
var import_tempy = (0, import_chunk_4VNS5WPM.__toESM)(require_tempy());
|
12921
12669
|
async function getPackedPackage(name, target, packageDir) {
|
12922
|
-
packageDir = packageDir || await (0,
|
12670
|
+
packageDir = packageDir || await (0, import_chunk_67I7CEQJ.resolvePkg)(name, { basedir: process.cwd() }) || await (0, import_chunk_67I7CEQJ.resolvePkg)(name, { basedir: target });
|
12923
12671
|
if (!packageDir) {
|
12924
12672
|
const pkg = readPackageUpSync({
|
12925
12673
|
cwd: target,
|