@introspection-ai/recipes 0.36.1 → 0.37.0
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/agents.d.ts.map +1 -1
- package/dist/agents.js +46 -11
- package/dist/agents.js.map +1 -1
- package/dist/ask-user-question.d.ts +82 -0
- package/dist/ask-user-question.d.ts.map +1 -0
- package/dist/ask-user-question.js +314 -0
- package/dist/ask-user-question.js.map +1 -0
- package/dist/child/agent-completions.d.ts +2 -1
- package/dist/child/agent-completions.d.ts.map +1 -1
- package/dist/child/agent-completions.js +4 -3
- package/dist/child/agent-completions.js.map +1 -1
- package/dist/connector-tools.d.ts.map +1 -1
- package/dist/connector-tools.js +10 -2
- package/dist/connector-tools.js.map +1 -1
- package/dist/documents/index.d.ts +6 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +3 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/module.d.ts +51 -0
- package/dist/documents/module.d.ts.map +1 -0
- package/dist/documents/module.js +116 -0
- package/dist/documents/module.js.map +1 -0
- package/dist/documents/tools.d.ts +40 -0
- package/dist/documents/tools.d.ts.map +1 -0
- package/dist/documents/tools.js +327 -0
- package/dist/documents/tools.js.map +1 -0
- package/dist/documents/types.d.ts +144 -0
- package/dist/documents/types.d.ts.map +1 -0
- package/dist/documents/types.js +10 -0
- package/dist/documents/types.js.map +1 -0
- package/dist/extensions.d.ts +2 -0
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +3 -0
- package/dist/extensions.js.map +1 -1
- package/dist/interaction-tui.d.ts +1 -1
- package/dist/interaction-tui.d.ts.map +1 -1
- package/dist/interaction-tui.js +2 -2
- package/dist/interaction-tui.js.map +1 -1
- package/dist/mcp-chunks/{auth-command-GMMLBU24.js → auth-command-M7TQE3AL.js} +26 -23
- package/dist/mcp-chunks/call-arguments-GCXZA4HC.js +16 -0
- package/dist/mcp-chunks/{call-command-2VF6IKAZ.js → call-command-7LD7UEFK.js} +33 -33
- package/dist/mcp-chunks/{chunk-TYL2NVXI.js → chunk-2AKSS7WR.js} +2 -2
- package/dist/mcp-chunks/{chunk-LZUKBEQZ.js → chunk-2YV72LUA.js} +12 -12
- package/dist/mcp-chunks/{chunk-2JTXIMGE.js → chunk-3ETUDW7N.js} +1 -1
- package/dist/mcp-chunks/{chunk-5UK2JLTN.js → chunk-3FRLDHVD.js} +5 -5
- package/dist/mcp-chunks/{chunk-ENBJFQ6H.js → chunk-3HSC6NHZ.js} +1 -1
- package/dist/mcp-chunks/{chunk-IHOU2BEL.js → chunk-3LENTPGE.js} +2 -2
- package/dist/mcp-chunks/{chunk-ZJWZY54X.js → chunk-3P3KGT4H.js} +2 -2
- package/dist/mcp-chunks/{chunk-IMXPLUKE.js → chunk-3SXP4S2A.js} +2 -2
- package/dist/mcp-chunks/{chunk-22WCLO4D.js → chunk-5Z6WSV5D.js} +5 -5
- package/dist/mcp-chunks/{chunk-QNZGFUKC.js → chunk-63L6SHK3.js} +2 -2
- package/dist/mcp-chunks/{chunk-OI3RTQXY.js → chunk-66VSGFXA.js} +1 -1
- package/dist/mcp-chunks/{chunk-DUBQHYW4.js → chunk-6O42UGLI.js} +9 -9
- package/dist/mcp-chunks/{chunk-R4OYHQ4V.js → chunk-6P3KAQ5N.js} +1 -1
- package/dist/mcp-chunks/{chunk-5OO6WVPL.js → chunk-7U5NSQ5T.js} +1 -1
- package/dist/mcp-chunks/{chunk-O2C3HXGS.js → chunk-B6S43WID.js} +1 -1
- package/dist/mcp-chunks/{chunk-VWPKJFK4.js → chunk-BHXCAVFP.js} +1 -1
- package/dist/mcp-chunks/{chunk-WXNGATQ7.js → chunk-BUOGKTKK.js} +2 -1
- package/dist/mcp-chunks/{chunk-4U4BUXQD.js → chunk-CXST5CVH.js} +33 -17
- package/dist/mcp-chunks/{chunk-YWFQPA4D.js → chunk-DU4SDPEV.js} +2 -2
- package/dist/mcp-chunks/{chunk-ZI5XYM4C.js → chunk-E76ZUBOJ.js} +4 -4
- package/dist/mcp-chunks/{chunk-D2SZ7KRY.js → chunk-ELHS763C.js} +1 -1
- package/dist/mcp-chunks/{chunk-RHXZKYM7.js → chunk-F2X4Y2TQ.js} +1 -1
- package/dist/mcp-chunks/{chunk-6XC5JJWD.js → chunk-GTETFUPQ.js} +28 -25
- package/dist/mcp-chunks/{chunk-UQUM7ICD.js → chunk-GZ53GNFP.js} +10 -10
- package/dist/mcp-chunks/{chunk-LUVLTUKR.js → chunk-H5PBSJP3.js} +1 -1
- package/dist/mcp-chunks/{chunk-FLUF2FRN.js → chunk-HNQSUT44.js} +3 -3
- package/dist/mcp-chunks/{chunk-CN5KSNWG.js → chunk-I6UFV7RW.js} +1 -1
- package/dist/mcp-chunks/{chunk-OSTHIELS.js → chunk-IRARVOUM.js} +1 -1
- package/dist/mcp-chunks/{webapi-NNCZGUMZ.js → chunk-IRSL7JRH.js} +255 -249
- package/dist/mcp-chunks/{chunk-ZXIF7MKN.js → chunk-IWCVZ46B.js} +2 -2
- package/dist/mcp-chunks/{chunk-RZZO3ZD4.js → chunk-JEHI2YU4.js} +3 -3
- package/dist/mcp-chunks/{chunk-ANNJGB6F.js → chunk-JTPTAO4M.js} +13 -13
- package/dist/mcp-chunks/{chunk-U5QZHPCC.js → chunk-KJ5FPQF6.js} +1 -1
- package/dist/mcp-chunks/{chunk-7IVXKYTI.js → chunk-L2MSWQDL.js} +1 -1
- package/dist/mcp-chunks/{chunk-DBNBEWRX.js → chunk-MEQXX43K.js} +1 -1
- package/dist/mcp-chunks/{chunk-3AAF3FSI.js → chunk-MHUMLEBO.js} +1 -1
- package/dist/mcp-chunks/{chunk-HFHIY5TO.js → chunk-N2U2FODH.js} +4 -4
- package/dist/mcp-chunks/{chunk-YFCNRWLV.js → chunk-N6YUOYDS.js} +2 -2
- package/dist/mcp-chunks/{chunk-C4TJGC4F.js → chunk-O3RTM5HD.js} +1 -1
- package/dist/mcp-chunks/{chunk-35LLRCRA.js → chunk-O7SIXJM6.js} +1308 -912
- package/dist/mcp-chunks/{chunk-QDFL757K.js → chunk-PSE442BC.js} +91 -77
- package/dist/mcp-chunks/{chunk-YPSODIQX.js → chunk-QNXOIF5U.js} +15 -14
- package/dist/mcp-chunks/{chunk-RKQC2EE6.js → chunk-RUF27IUF.js} +2 -2
- package/dist/mcp-chunks/{chunk-SS7V7GVT.js → chunk-S2F7DDP5.js} +4 -4
- package/dist/mcp-chunks/{chunk-D65GOMYV.js → chunk-TC2JPBFB.js} +2 -2
- package/dist/mcp-chunks/{chunk-7BVYBZ4J.js → chunk-THRMUZZD.js} +39 -14
- package/dist/mcp-chunks/{chunk-P5YLK5G2.js → chunk-UFV6SVQG.js} +11 -11
- package/dist/mcp-chunks/{chunk-LISNXOIQ.js → chunk-US63Y6XE.js} +1 -1
- package/dist/mcp-chunks/{chunk-BIVX2WFX.js → chunk-UVEZNUN3.js} +285 -322
- package/dist/mcp-chunks/{chunk-HI6VG5LR.js → chunk-UVRJ3AAD.js} +2 -2
- package/dist/mcp-chunks/{chunk-6TIU2CDB.js → chunk-V42T3QNK.js} +456 -64
- package/dist/mcp-chunks/{chunk-347GOMV4.js → chunk-WDWSA7RL.js} +4 -4
- package/dist/mcp-chunks/{chunk-4PN2J74H.js → chunk-WQL7FJQ3.js} +4 -4
- package/dist/mcp-chunks/{chunk-LRGMFF5S.js → chunk-ZEA3Y5ZD.js} +7 -7
- package/dist/mcp-chunks/{cli-4OQD3H4N.js → cli-IYD7Y7MO.js} +67 -67
- package/dist/mcp-chunks/client-5MNBV3Z7.js +32 -0
- package/dist/mcp-chunks/{config-command-72TCIWPV.js → config-command-6DXILFNO.js} +129 -34
- package/dist/mcp-chunks/daemon-command-V3B3EMXD.js +32 -0
- package/dist/mcp-chunks/{dist-74UCKZK5.js → dist-Q7WSCBBK.js} +74 -55
- package/dist/mcp-chunks/{emit-ts-command-KD4ON2SE.js → emit-ts-command-NDCDFDRM.js} +17 -17
- package/dist/mcp-chunks/{generate-cli-runner-HWGI6HPL.js → generate-cli-runner-PW5WJ7KI.js} +136 -92
- package/dist/mcp-chunks/generated-daemon-runtime-3C4NWGAU.js +32 -0
- package/dist/mcp-chunks/{inspect-cli-command-FT5JSB7V.js → inspect-cli-command-4MGF5CPP.js} +9 -9
- package/dist/mcp-chunks/{launch-AHLKP2VM.js → launch-UG7IH27P.js} +1 -1
- package/dist/mcp-chunks/{lifecycle-BJDITFWN.js → lifecycle-QBYGUHQ3.js} +1 -1
- package/dist/mcp-chunks/{list-command-YKF7RN6Y.js → list-command-SDITI3ZM.js} +36 -35
- package/dist/mcp-chunks/{output-utils-LYB5IJRD.js → output-utils-YTMZTA7J.js} +3 -3
- package/dist/mcp-chunks/{prompt-CH6TK0bC-B3USYOND.js → prompt-DkftHXS7-N7UENQ4C.js} +1 -1
- package/dist/mcp-chunks/{record-command-MJW3Z5E5.js → record-command-JGTMATYI.js} +5 -5
- package/dist/mcp-chunks/{replay-command-5ZHBUOLE.js → replay-command-S2VAC4RW.js} +6 -6
- package/dist/mcp-chunks/{resource-command-L4I24AX5.js → resource-command-SRFQQROJ.js} +9 -9
- package/dist/mcp-chunks/{result-utils-5WRI66KV.js → result-utils-JASGNHXK.js} +3 -3
- package/dist/mcp-chunks/runtime-RMI3XCYJ.js +39 -0
- package/dist/mcp-chunks/{runtime-wrapper-WFMNIHD5.js → runtime-wrapper-7HYO3NM5.js} +3 -3
- package/dist/mcp-chunks/{serve-command-KNCSJUXS.js → serve-command-UF5SVREV.js} +1111 -697
- package/dist/mcp-chunks/{timeouts-2ZHGSB3R.js → timeouts-BJWDJEMH.js} +3 -3
- package/dist/mcp-chunks/{vault-command-7EDL45AA.js → vault-command-EYOIFWEY.js} +5 -4
- package/dist/mcp-chunks/webapi-WMMA3OEC.js +82 -0
- package/dist/mcp-daemon.js +28 -27
- package/dist/mcp-run-worker.js +28 -27
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +6 -0
- package/dist/pi-extension.js.map +1 -1
- package/dist/recipe/package.d.ts +7 -0
- package/dist/recipe/package.d.ts.map +1 -1
- package/dist/recipe/package.js +69 -0
- package/dist/recipe/package.js.map +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +6 -0
- package/dist/session.js.map +1 -1
- package/docs/agent-composition.md +8 -0
- package/docs/documents.md +249 -0
- package/docs/index.md +1 -0
- package/docs/interactions.md +76 -8
- package/docs/mcp-configuration.md +10 -5
- package/docs/recipe-format.md +69 -1
- package/package.json +10 -6
- package/dist/mcp-chunks/call-arguments-WSURHOLV.js +0 -16
- package/dist/mcp-chunks/client-LXKCCVMT.js +0 -31
- package/dist/mcp-chunks/daemon-command-QHS3ACBM.js +0 -31
- package/dist/mcp-chunks/generated-daemon-runtime-7ORS5KBR.js +0 -31
- package/dist/mcp-chunks/runtime-IKWDQLZF.js +0 -38
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__export
|
|
4
4
|
} from "./chunk-LRKZP7DJ.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/chunk-DYPzFuB5.mjs
|
|
7
7
|
var __create = Object.create;
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -43,7 +43,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
43
43
|
enumerable: true
|
|
44
44
|
}) : target, mod));
|
|
45
45
|
|
|
46
|
-
// node_modules/.pnpm/mcporter@0.
|
|
46
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/dialects-BAIiebX0.mjs
|
|
47
47
|
var DRAFT_2020_12_URIS = /* @__PURE__ */ new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]);
|
|
48
48
|
var DRAFT_2019_09_URIS = /* @__PURE__ */ new Set(["https://json-schema.org/draft/2019-09/schema", "http://json-schema.org/draft/2019-09/schema"]);
|
|
49
49
|
var DRAFT_07_URIS = /* @__PURE__ */ new Set(["https://json-schema.org/draft-07/schema", "http://json-schema.org/draft-07/schema"]);
|
|
@@ -60,7 +60,7 @@ function declaredDialect(schema, remedy) {
|
|
|
60
60
|
throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${schema.$schema.slice(0, 200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${remedy}`);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
// node_modules/.pnpm/mcporter@0.
|
|
63
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/external.js
|
|
64
64
|
var external_exports = {};
|
|
65
65
|
__export(external_exports, {
|
|
66
66
|
$brand: () => $brand,
|
|
@@ -323,7 +323,7 @@ __export(external_exports, {
|
|
|
323
323
|
xor: () => xor
|
|
324
324
|
});
|
|
325
325
|
|
|
326
|
-
// node_modules/.pnpm/mcporter@0.
|
|
326
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/index.js
|
|
327
327
|
var core_exports2 = {};
|
|
328
328
|
__export(core_exports2, {
|
|
329
329
|
$ZodAny: () => $ZodAny,
|
|
@@ -640,7 +640,7 @@ __export(core_exports2, {
|
|
|
640
640
|
withParser: () => withParser
|
|
641
641
|
});
|
|
642
642
|
|
|
643
|
-
// node_modules/.pnpm/mcporter@0.
|
|
643
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/util.js
|
|
644
644
|
var util_exports = {};
|
|
645
645
|
__export(util_exports, {
|
|
646
646
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -1496,7 +1496,7 @@ function constantCatch(value) {
|
|
|
1496
1496
|
return fn;
|
|
1497
1497
|
}
|
|
1498
1498
|
|
|
1499
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1499
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/core.js
|
|
1500
1500
|
var _a;
|
|
1501
1501
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1502
1502
|
status: "aborted"
|
|
@@ -1618,7 +1618,7 @@ function config(newConfig) {
|
|
|
1618
1618
|
return globalConfig;
|
|
1619
1619
|
}
|
|
1620
1620
|
|
|
1621
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1621
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/errors.js
|
|
1622
1622
|
function _getMessage() {
|
|
1623
1623
|
const internals = this._zod;
|
|
1624
1624
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -1810,7 +1810,7 @@ function prettifyError(error62) {
|
|
|
1810
1810
|
return lines.join("\n");
|
|
1811
1811
|
}
|
|
1812
1812
|
|
|
1813
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1813
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/parse.js
|
|
1814
1814
|
function finalizeParams(callee, params) {
|
|
1815
1815
|
return { callee: params?.callee ?? callee, Err: params?.Err };
|
|
1816
1816
|
}
|
|
@@ -1970,7 +1970,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1970
1970
|
};
|
|
1971
1971
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
1972
1972
|
|
|
1973
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1973
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/regexes.js
|
|
1974
1974
|
var regexes_exports = {};
|
|
1975
1975
|
__export(regexes_exports, {
|
|
1976
1976
|
anyString: () => anyString,
|
|
@@ -2142,7 +2142,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
2142
2142
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
2143
2143
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
2144
2144
|
|
|
2145
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2145
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/checks.js
|
|
2146
2146
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2147
2147
|
var _a3;
|
|
2148
2148
|
inst._zod ?? (inst._zod = {});
|
|
@@ -2618,7 +2618,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
2618
2618
|
};
|
|
2619
2619
|
});
|
|
2620
2620
|
|
|
2621
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2621
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/doc.js
|
|
2622
2622
|
var Doc = class {
|
|
2623
2623
|
constructor(args = [], closed = {}) {
|
|
2624
2624
|
this.content = [];
|
|
@@ -2659,14 +2659,14 @@ ${content.join("\n")}
|
|
|
2659
2659
|
}
|
|
2660
2660
|
};
|
|
2661
2661
|
|
|
2662
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2662
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/versions.js
|
|
2663
2663
|
var version = {
|
|
2664
2664
|
major: 4,
|
|
2665
2665
|
minor: 6,
|
|
2666
2666
|
patch: 7
|
|
2667
2667
|
};
|
|
2668
2668
|
|
|
2669
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2669
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/schemas.js
|
|
2670
2670
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2671
2671
|
var _a3;
|
|
2672
2672
|
inst ?? (inst = {});
|
|
@@ -5108,7 +5108,7 @@ function handleRefineResult(result, payload, input2, inst) {
|
|
|
5108
5108
|
}
|
|
5109
5109
|
}
|
|
5110
5110
|
|
|
5111
|
-
// node_modules/.pnpm/mcporter@0.
|
|
5111
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/memoizer.js
|
|
5112
5112
|
var $ZodCyclicError = class extends Error {
|
|
5113
5113
|
constructor() {
|
|
5114
5114
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -5385,7 +5385,7 @@ function isBackEdge(ctx, value) {
|
|
|
5385
5385
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
5386
5386
|
}
|
|
5387
5387
|
|
|
5388
|
-
// node_modules/.pnpm/mcporter@0.
|
|
5388
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/index.js
|
|
5389
5389
|
var locales_exports = {};
|
|
5390
5390
|
__export(locales_exports, {
|
|
5391
5391
|
ar: () => ar_default,
|
|
@@ -5453,7 +5453,7 @@ __export(locales_exports, {
|
|
|
5453
5453
|
zhTW: () => zh_TW_default
|
|
5454
5454
|
});
|
|
5455
5455
|
|
|
5456
|
-
// node_modules/.pnpm/mcporter@0.
|
|
5456
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ar.js
|
|
5457
5457
|
var error = () => {
|
|
5458
5458
|
const Sizable = {
|
|
5459
5459
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -5565,7 +5565,7 @@ function ar_default() {
|
|
|
5565
5565
|
};
|
|
5566
5566
|
}
|
|
5567
5567
|
|
|
5568
|
-
// node_modules/.pnpm/mcporter@0.
|
|
5568
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/az.js
|
|
5569
5569
|
var error2 = () => {
|
|
5570
5570
|
const Sizable = {
|
|
5571
5571
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -5676,7 +5676,7 @@ function az_default() {
|
|
|
5676
5676
|
};
|
|
5677
5677
|
}
|
|
5678
5678
|
|
|
5679
|
-
// node_modules/.pnpm/mcporter@0.
|
|
5679
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/be.js
|
|
5680
5680
|
function getBelarusianPlural(count, one, few, many) {
|
|
5681
5681
|
const absCount = Math.abs(count);
|
|
5682
5682
|
const lastDigit = absCount % 10;
|
|
@@ -5845,7 +5845,7 @@ function be_default() {
|
|
|
5845
5845
|
};
|
|
5846
5846
|
}
|
|
5847
5847
|
|
|
5848
|
-
// node_modules/.pnpm/mcporter@0.
|
|
5848
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/bg.js
|
|
5849
5849
|
var error4 = () => {
|
|
5850
5850
|
const Sizable = {
|
|
5851
5851
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -5971,7 +5971,7 @@ function bg_default() {
|
|
|
5971
5971
|
};
|
|
5972
5972
|
}
|
|
5973
5973
|
|
|
5974
|
-
// node_modules/.pnpm/mcporter@0.
|
|
5974
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/bn.js
|
|
5975
5975
|
var error5 = () => {
|
|
5976
5976
|
const Sizable = {
|
|
5977
5977
|
string: { unit: "\u0985\u0995\u09CD\u09B7\u09B0", verb: "\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7" },
|
|
@@ -6085,7 +6085,7 @@ function bn_default() {
|
|
|
6085
6085
|
};
|
|
6086
6086
|
}
|
|
6087
6087
|
|
|
6088
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6088
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ca.js
|
|
6089
6089
|
var error6 = () => {
|
|
6090
6090
|
const Sizable = {
|
|
6091
6091
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -6199,7 +6199,7 @@ function ca_default() {
|
|
|
6199
6199
|
};
|
|
6200
6200
|
}
|
|
6201
6201
|
|
|
6202
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6202
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ckb.js
|
|
6203
6203
|
var error7 = () => {
|
|
6204
6204
|
const Sizable = {
|
|
6205
6205
|
string: { unit: "\u067E\u06CC\u062A", verb: "\u0628\u06CE\u062A" },
|
|
@@ -6332,7 +6332,7 @@ function ckb_default() {
|
|
|
6332
6332
|
};
|
|
6333
6333
|
}
|
|
6334
6334
|
|
|
6335
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6335
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/cs.js
|
|
6336
6336
|
var error8 = () => {
|
|
6337
6337
|
const Sizable = {
|
|
6338
6338
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -6449,7 +6449,7 @@ function cs_default() {
|
|
|
6449
6449
|
};
|
|
6450
6450
|
}
|
|
6451
6451
|
|
|
6452
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6452
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/da.js
|
|
6453
6453
|
var error9 = () => {
|
|
6454
6454
|
const Sizable = {
|
|
6455
6455
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -6570,7 +6570,7 @@ function da_default() {
|
|
|
6570
6570
|
};
|
|
6571
6571
|
}
|
|
6572
6572
|
|
|
6573
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6573
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/de.js
|
|
6574
6574
|
var error10 = () => {
|
|
6575
6575
|
const Sizable = {
|
|
6576
6576
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -6684,7 +6684,7 @@ function de_default() {
|
|
|
6684
6684
|
};
|
|
6685
6685
|
}
|
|
6686
6686
|
|
|
6687
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6687
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/el.js
|
|
6688
6688
|
var error11 = () => {
|
|
6689
6689
|
const Sizable = {
|
|
6690
6690
|
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
@@ -6797,7 +6797,7 @@ function el_default() {
|
|
|
6797
6797
|
};
|
|
6798
6798
|
}
|
|
6799
6799
|
|
|
6800
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6800
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/en.js
|
|
6801
6801
|
var error12 = () => {
|
|
6802
6802
|
const Sizable = {
|
|
6803
6803
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -6922,7 +6922,7 @@ function en_default() {
|
|
|
6922
6922
|
};
|
|
6923
6923
|
}
|
|
6924
6924
|
|
|
6925
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6925
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/eo.js
|
|
6926
6926
|
var error13 = () => {
|
|
6927
6927
|
const Sizable = {
|
|
6928
6928
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -7037,7 +7037,7 @@ function eo_default() {
|
|
|
7037
7037
|
};
|
|
7038
7038
|
}
|
|
7039
7039
|
|
|
7040
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7040
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/es.js
|
|
7041
7041
|
var error14 = () => {
|
|
7042
7042
|
const Sizable = {
|
|
7043
7043
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -7174,7 +7174,7 @@ function es_default() {
|
|
|
7174
7174
|
};
|
|
7175
7175
|
}
|
|
7176
7176
|
|
|
7177
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7177
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/fa.js
|
|
7178
7178
|
var error15 = () => {
|
|
7179
7179
|
const Sizable = {
|
|
7180
7180
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -7294,7 +7294,7 @@ function fa_default() {
|
|
|
7294
7294
|
};
|
|
7295
7295
|
}
|
|
7296
7296
|
|
|
7297
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7297
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/fi.js
|
|
7298
7298
|
var error16 = () => {
|
|
7299
7299
|
const Sizable = {
|
|
7300
7300
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
@@ -7412,7 +7412,7 @@ function fi_default() {
|
|
|
7412
7412
|
};
|
|
7413
7413
|
}
|
|
7414
7414
|
|
|
7415
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7415
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/fr.js
|
|
7416
7416
|
var error17 = () => {
|
|
7417
7417
|
const Sizable = {
|
|
7418
7418
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7542,7 +7542,7 @@ function fr_default() {
|
|
|
7542
7542
|
};
|
|
7543
7543
|
}
|
|
7544
7544
|
|
|
7545
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7545
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/fr-CA.js
|
|
7546
7546
|
var error18 = () => {
|
|
7547
7547
|
const Sizable = {
|
|
7548
7548
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7655,7 +7655,7 @@ function fr_CA_default() {
|
|
|
7655
7655
|
};
|
|
7656
7656
|
}
|
|
7657
7657
|
|
|
7658
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7658
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/gu.js
|
|
7659
7659
|
var error19 = () => {
|
|
7660
7660
|
const Sizable = {
|
|
7661
7661
|
string: { unit: "\u0A85\u0A95\u0ACD\u0AB7\u0AB0", verb: "\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F" },
|
|
@@ -7769,7 +7769,7 @@ function gu_default() {
|
|
|
7769
7769
|
};
|
|
7770
7770
|
}
|
|
7771
7771
|
|
|
7772
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7772
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/he.js
|
|
7773
7773
|
var error20 = () => {
|
|
7774
7774
|
const TypeNames = {
|
|
7775
7775
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
@@ -7971,7 +7971,7 @@ function he_default() {
|
|
|
7971
7971
|
};
|
|
7972
7972
|
}
|
|
7973
7973
|
|
|
7974
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7974
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/hi.js
|
|
7975
7975
|
var error21 = () => {
|
|
7976
7976
|
const Sizable = {
|
|
7977
7977
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" },
|
|
@@ -8083,7 +8083,7 @@ function hi_default() {
|
|
|
8083
8083
|
};
|
|
8084
8084
|
}
|
|
8085
8085
|
|
|
8086
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8086
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/hr.js
|
|
8087
8087
|
var error22 = () => {
|
|
8088
8088
|
const Sizable = {
|
|
8089
8089
|
string: { unit: "znakova", verb: "imati" },
|
|
@@ -8210,7 +8210,7 @@ function hr_default() {
|
|
|
8210
8210
|
};
|
|
8211
8211
|
}
|
|
8212
8212
|
|
|
8213
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8213
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/hu.js
|
|
8214
8214
|
var error23 = () => {
|
|
8215
8215
|
const Sizable = {
|
|
8216
8216
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -8324,7 +8324,7 @@ function hu_default() {
|
|
|
8324
8324
|
};
|
|
8325
8325
|
}
|
|
8326
8326
|
|
|
8327
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8327
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/hy.js
|
|
8328
8328
|
function getArmenianPlural(count, one, many) {
|
|
8329
8329
|
return Math.abs(count) === 1 ? one : many;
|
|
8330
8330
|
}
|
|
@@ -8483,7 +8483,7 @@ function hy_default() {
|
|
|
8483
8483
|
};
|
|
8484
8484
|
}
|
|
8485
8485
|
|
|
8486
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8486
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/id.js
|
|
8487
8487
|
var error25 = () => {
|
|
8488
8488
|
const Sizable = {
|
|
8489
8489
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -8595,7 +8595,7 @@ function id_default() {
|
|
|
8595
8595
|
};
|
|
8596
8596
|
}
|
|
8597
8597
|
|
|
8598
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8598
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/is.js
|
|
8599
8599
|
var error26 = () => {
|
|
8600
8600
|
const Sizable = {
|
|
8601
8601
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
@@ -8710,7 +8710,7 @@ function is_default() {
|
|
|
8710
8710
|
};
|
|
8711
8711
|
}
|
|
8712
8712
|
|
|
8713
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8713
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/it.js
|
|
8714
8714
|
var error27 = () => {
|
|
8715
8715
|
const Sizable = {
|
|
8716
8716
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -8824,7 +8824,7 @@ function it_default() {
|
|
|
8824
8824
|
};
|
|
8825
8825
|
}
|
|
8826
8826
|
|
|
8827
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8827
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ja.js
|
|
8828
8828
|
var error28 = () => {
|
|
8829
8829
|
const Sizable = {
|
|
8830
8830
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
@@ -8937,7 +8937,7 @@ function ja_default() {
|
|
|
8937
8937
|
};
|
|
8938
8938
|
}
|
|
8939
8939
|
|
|
8940
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8940
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ka.js
|
|
8941
8941
|
var error29 = () => {
|
|
8942
8942
|
const Sizable = {
|
|
8943
8943
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -9055,7 +9055,7 @@ function ka_default() {
|
|
|
9055
9055
|
};
|
|
9056
9056
|
}
|
|
9057
9057
|
|
|
9058
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9058
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/km.js
|
|
9059
9059
|
var error30 = () => {
|
|
9060
9060
|
const Sizable = {
|
|
9061
9061
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -9171,12 +9171,12 @@ function km_default() {
|
|
|
9171
9171
|
};
|
|
9172
9172
|
}
|
|
9173
9173
|
|
|
9174
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9174
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/kh.js
|
|
9175
9175
|
function kh_default() {
|
|
9176
9176
|
return km_default();
|
|
9177
9177
|
}
|
|
9178
9178
|
|
|
9179
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9179
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/kn.js
|
|
9180
9180
|
var error31 = () => {
|
|
9181
9181
|
const Sizable = {
|
|
9182
9182
|
string: { unit: "\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1", verb: "\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1" },
|
|
@@ -9292,7 +9292,7 @@ function kn_default() {
|
|
|
9292
9292
|
};
|
|
9293
9293
|
}
|
|
9294
9294
|
|
|
9295
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9295
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ko.js
|
|
9296
9296
|
var error32 = () => {
|
|
9297
9297
|
const Sizable = {
|
|
9298
9298
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
@@ -9409,7 +9409,7 @@ function ko_default() {
|
|
|
9409
9409
|
};
|
|
9410
9410
|
}
|
|
9411
9411
|
|
|
9412
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9412
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/lt.js
|
|
9413
9413
|
var capitalizeFirstCharacter = (text) => {
|
|
9414
9414
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
9415
9415
|
};
|
|
@@ -9617,7 +9617,7 @@ function lt_default() {
|
|
|
9617
9617
|
};
|
|
9618
9618
|
}
|
|
9619
9619
|
|
|
9620
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9620
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/mk.js
|
|
9621
9621
|
var error34 = () => {
|
|
9622
9622
|
const Sizable = {
|
|
9623
9623
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -9732,7 +9732,7 @@ function mk_default() {
|
|
|
9732
9732
|
};
|
|
9733
9733
|
}
|
|
9734
9734
|
|
|
9735
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9735
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ms.js
|
|
9736
9736
|
var error35 = () => {
|
|
9737
9737
|
const Sizable = {
|
|
9738
9738
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -9845,7 +9845,7 @@ function ms_default() {
|
|
|
9845
9845
|
};
|
|
9846
9846
|
}
|
|
9847
9847
|
|
|
9848
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9848
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ne.js
|
|
9849
9849
|
var error36 = () => {
|
|
9850
9850
|
const Sizable = {
|
|
9851
9851
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B" },
|
|
@@ -9957,7 +9957,7 @@ function ne_default() {
|
|
|
9957
9957
|
};
|
|
9958
9958
|
}
|
|
9959
9959
|
|
|
9960
|
-
// node_modules/.pnpm/mcporter@0.
|
|
9960
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/nl.js
|
|
9961
9961
|
var error37 = () => {
|
|
9962
9962
|
const Sizable = {
|
|
9963
9963
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -10073,7 +10073,7 @@ function nl_default() {
|
|
|
10073
10073
|
};
|
|
10074
10074
|
}
|
|
10075
10075
|
|
|
10076
|
-
// node_modules/.pnpm/mcporter@0.
|
|
10076
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/nn.js
|
|
10077
10077
|
var error38 = () => {
|
|
10078
10078
|
const Sizable = {
|
|
10079
10079
|
string: { unit: "teikn", verb: "\xE5 ha" },
|
|
@@ -10187,7 +10187,7 @@ function nn_default() {
|
|
|
10187
10187
|
};
|
|
10188
10188
|
}
|
|
10189
10189
|
|
|
10190
|
-
// node_modules/.pnpm/mcporter@0.
|
|
10190
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/no.js
|
|
10191
10191
|
var error39 = () => {
|
|
10192
10192
|
const Sizable = {
|
|
10193
10193
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
@@ -10301,7 +10301,7 @@ function no_default() {
|
|
|
10301
10301
|
};
|
|
10302
10302
|
}
|
|
10303
10303
|
|
|
10304
|
-
// node_modules/.pnpm/mcporter@0.
|
|
10304
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ota.js
|
|
10305
10305
|
var error40 = () => {
|
|
10306
10306
|
const Sizable = {
|
|
10307
10307
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
@@ -10416,7 +10416,7 @@ function ota_default() {
|
|
|
10416
10416
|
};
|
|
10417
10417
|
}
|
|
10418
10418
|
|
|
10419
|
-
// node_modules/.pnpm/mcporter@0.
|
|
10419
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ps.js
|
|
10420
10420
|
var error41 = () => {
|
|
10421
10421
|
const Sizable = {
|
|
10422
10422
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -10536,7 +10536,7 @@ function ps_default() {
|
|
|
10536
10536
|
};
|
|
10537
10537
|
}
|
|
10538
10538
|
|
|
10539
|
-
// node_modules/.pnpm/mcporter@0.
|
|
10539
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/pl.js
|
|
10540
10540
|
var error42 = () => {
|
|
10541
10541
|
const Sizable = {
|
|
10542
10542
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
@@ -10651,7 +10651,7 @@ function pl_default() {
|
|
|
10651
10651
|
};
|
|
10652
10652
|
}
|
|
10653
10653
|
|
|
10654
|
-
// node_modules/.pnpm/mcporter@0.
|
|
10654
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/pt.js
|
|
10655
10655
|
var error43 = () => {
|
|
10656
10656
|
const Sizable = {
|
|
10657
10657
|
string: { unit: "caracteres" },
|
|
@@ -10795,7 +10795,7 @@ function pt_default() {
|
|
|
10795
10795
|
};
|
|
10796
10796
|
}
|
|
10797
10797
|
|
|
10798
|
-
// node_modules/.pnpm/mcporter@0.
|
|
10798
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/pt-BR.js
|
|
10799
10799
|
var error44 = () => {
|
|
10800
10800
|
const Sizable = {
|
|
10801
10801
|
string: { unit: "caracteres" },
|
|
@@ -10940,7 +10940,7 @@ function pt_BR_default() {
|
|
|
10940
10940
|
};
|
|
10941
10941
|
}
|
|
10942
10942
|
|
|
10943
|
-
// node_modules/.pnpm/mcporter@0.
|
|
10943
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ro.js
|
|
10944
10944
|
var error45 = () => {
|
|
10945
10945
|
const Sizable = {
|
|
10946
10946
|
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
@@ -11063,7 +11063,7 @@ function ro_default() {
|
|
|
11063
11063
|
};
|
|
11064
11064
|
}
|
|
11065
11065
|
|
|
11066
|
-
// node_modules/.pnpm/mcporter@0.
|
|
11066
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ru.js
|
|
11067
11067
|
function getRussianPlural(count, one, few, many) {
|
|
11068
11068
|
const absCount = Math.abs(count);
|
|
11069
11069
|
const lastDigit = absCount % 10;
|
|
@@ -11232,7 +11232,7 @@ function ru_default() {
|
|
|
11232
11232
|
};
|
|
11233
11233
|
}
|
|
11234
11234
|
|
|
11235
|
-
// node_modules/.pnpm/mcporter@0.
|
|
11235
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/sk.js
|
|
11236
11236
|
var error47 = () => {
|
|
11237
11237
|
const Sizable = {
|
|
11238
11238
|
string: { unit: "znakov", verb: "ma\u0165" },
|
|
@@ -11349,7 +11349,7 @@ function sk_default() {
|
|
|
11349
11349
|
};
|
|
11350
11350
|
}
|
|
11351
11351
|
|
|
11352
|
-
// node_modules/.pnpm/mcporter@0.
|
|
11352
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/sl.js
|
|
11353
11353
|
var error48 = () => {
|
|
11354
11354
|
const Sizable = {
|
|
11355
11355
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -11464,7 +11464,7 @@ function sl_default() {
|
|
|
11464
11464
|
};
|
|
11465
11465
|
}
|
|
11466
11466
|
|
|
11467
|
-
// node_modules/.pnpm/mcporter@0.
|
|
11467
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/sv.js
|
|
11468
11468
|
var error49 = () => {
|
|
11469
11469
|
const Sizable = {
|
|
11470
11470
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -11580,7 +11580,7 @@ function sv_default() {
|
|
|
11580
11580
|
};
|
|
11581
11581
|
}
|
|
11582
11582
|
|
|
11583
|
-
// node_modules/.pnpm/mcporter@0.
|
|
11583
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ta.js
|
|
11584
11584
|
var error50 = () => {
|
|
11585
11585
|
const Sizable = {
|
|
11586
11586
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -11696,7 +11696,7 @@ function ta_default() {
|
|
|
11696
11696
|
};
|
|
11697
11697
|
}
|
|
11698
11698
|
|
|
11699
|
-
// node_modules/.pnpm/mcporter@0.
|
|
11699
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/tg.js
|
|
11700
11700
|
var error51 = () => {
|
|
11701
11701
|
const Sizable = {
|
|
11702
11702
|
string: { unit: "\u0430\u043B\u043E\u043C\u0430\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
|
|
@@ -11813,7 +11813,7 @@ function tg_default() {
|
|
|
11813
11813
|
};
|
|
11814
11814
|
}
|
|
11815
11815
|
|
|
11816
|
-
// node_modules/.pnpm/mcporter@0.
|
|
11816
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/th.js
|
|
11817
11817
|
var error52 = () => {
|
|
11818
11818
|
const Sizable = {
|
|
11819
11819
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -11929,7 +11929,7 @@ function th_default() {
|
|
|
11929
11929
|
};
|
|
11930
11930
|
}
|
|
11931
11931
|
|
|
11932
|
-
// node_modules/.pnpm/mcporter@0.
|
|
11932
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/tk.js
|
|
11933
11933
|
var error53 = () => {
|
|
11934
11934
|
const Sizable = {
|
|
11935
11935
|
string: { unit: "simwol", verb: "bolmaly" },
|
|
@@ -12037,7 +12037,7 @@ function tk_default() {
|
|
|
12037
12037
|
};
|
|
12038
12038
|
}
|
|
12039
12039
|
|
|
12040
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12040
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/tr.js
|
|
12041
12041
|
var error54 = () => {
|
|
12042
12042
|
const Sizable = {
|
|
12043
12043
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
@@ -12148,7 +12148,7 @@ function tr_default() {
|
|
|
12148
12148
|
};
|
|
12149
12149
|
}
|
|
12150
12150
|
|
|
12151
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12151
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/uk.js
|
|
12152
12152
|
var error55 = () => {
|
|
12153
12153
|
const Sizable = {
|
|
12154
12154
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -12262,12 +12262,12 @@ function uk_default() {
|
|
|
12262
12262
|
};
|
|
12263
12263
|
}
|
|
12264
12264
|
|
|
12265
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12265
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ua.js
|
|
12266
12266
|
function ua_default() {
|
|
12267
12267
|
return uk_default();
|
|
12268
12268
|
}
|
|
12269
12269
|
|
|
12270
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12270
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/ur.js
|
|
12271
12271
|
var error56 = () => {
|
|
12272
12272
|
const Sizable = {
|
|
12273
12273
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -12383,7 +12383,7 @@ function ur_default() {
|
|
|
12383
12383
|
};
|
|
12384
12384
|
}
|
|
12385
12385
|
|
|
12386
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12386
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/uz.js
|
|
12387
12387
|
var error57 = () => {
|
|
12388
12388
|
const Sizable = {
|
|
12389
12389
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
@@ -12497,7 +12497,7 @@ function uz_default() {
|
|
|
12497
12497
|
};
|
|
12498
12498
|
}
|
|
12499
12499
|
|
|
12500
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12500
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/vi.js
|
|
12501
12501
|
var error58 = () => {
|
|
12502
12502
|
const Sizable = {
|
|
12503
12503
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
@@ -12611,7 +12611,7 @@ function vi_default() {
|
|
|
12611
12611
|
};
|
|
12612
12612
|
}
|
|
12613
12613
|
|
|
12614
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12614
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/zh-CN.js
|
|
12615
12615
|
var error59 = () => {
|
|
12616
12616
|
const Sizable = {
|
|
12617
12617
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
@@ -12726,7 +12726,7 @@ function zh_CN_default() {
|
|
|
12726
12726
|
};
|
|
12727
12727
|
}
|
|
12728
12728
|
|
|
12729
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12729
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/zh-TW.js
|
|
12730
12730
|
var error60 = () => {
|
|
12731
12731
|
const Sizable = {
|
|
12732
12732
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
@@ -12839,7 +12839,7 @@ function zh_TW_default() {
|
|
|
12839
12839
|
};
|
|
12840
12840
|
}
|
|
12841
12841
|
|
|
12842
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12842
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/locales/yo.js
|
|
12843
12843
|
var error61 = () => {
|
|
12844
12844
|
const Sizable = {
|
|
12845
12845
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
@@ -12952,7 +12952,7 @@ function yo_default() {
|
|
|
12952
12952
|
};
|
|
12953
12953
|
}
|
|
12954
12954
|
|
|
12955
|
-
// node_modules/.pnpm/mcporter@0.
|
|
12955
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/registries.js
|
|
12956
12956
|
var _a2;
|
|
12957
12957
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
12958
12958
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
@@ -13002,7 +13002,7 @@ function registry() {
|
|
|
13002
13002
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
13003
13003
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
13004
13004
|
|
|
13005
|
-
// node_modules/.pnpm/mcporter@0.
|
|
13005
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/compile.js
|
|
13006
13006
|
var INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
|
|
13007
13007
|
var FALLBACK_FLAG = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
13008
13008
|
var ZodCompileAsyncError = class extends Error {
|
|
@@ -14612,7 +14612,7 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
|
|
|
14612
14612
|
return accessor;
|
|
14613
14613
|
}
|
|
14614
14614
|
|
|
14615
|
-
// node_modules/.pnpm/mcporter@0.
|
|
14615
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/api.js
|
|
14616
14616
|
function snapshotChecks(def) {
|
|
14617
14617
|
if (def.checks)
|
|
14618
14618
|
def.checks = [...def.checks];
|
|
@@ -15671,7 +15671,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
15671
15671
|
return inst;
|
|
15672
15672
|
}
|
|
15673
15673
|
|
|
15674
|
-
// node_modules/.pnpm/mcporter@0.
|
|
15674
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/to-json-schema.js
|
|
15675
15675
|
function assignProps(target, ...sources) {
|
|
15676
15676
|
for (const source of sources) {
|
|
15677
15677
|
for (const key of Reflect.ownKeys(source)) {
|
|
@@ -16201,7 +16201,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
16201
16201
|
return finalize(ctx, schema);
|
|
16202
16202
|
};
|
|
16203
16203
|
|
|
16204
|
-
// node_modules/.pnpm/mcporter@0.
|
|
16204
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/json-schema-processors.js
|
|
16205
16205
|
var narrowMin = (agg, key, value) => {
|
|
16206
16206
|
if (agg[key] === void 0 || value > agg[key])
|
|
16207
16207
|
agg[key] = value;
|
|
@@ -16949,7 +16949,7 @@ function toJSONSchema(input2, params) {
|
|
|
16949
16949
|
return finalize(ctx, input2);
|
|
16950
16950
|
}
|
|
16951
16951
|
|
|
16952
|
-
// node_modules/.pnpm/mcporter@0.
|
|
16952
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/json-schema-generator.js
|
|
16953
16953
|
var JSONSchemaGenerator = class {
|
|
16954
16954
|
/** @deprecated Access via ctx instead */
|
|
16955
16955
|
get metadataRegistry() {
|
|
@@ -17027,10 +17027,10 @@ var JSONSchemaGenerator = class {
|
|
|
17027
17027
|
}
|
|
17028
17028
|
};
|
|
17029
17029
|
|
|
17030
|
-
// node_modules/.pnpm/mcporter@0.
|
|
17030
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/json-schema.js
|
|
17031
17031
|
var json_schema_exports = {};
|
|
17032
17032
|
|
|
17033
|
-
// node_modules/.pnpm/mcporter@0.
|
|
17033
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/schemas.js
|
|
17034
17034
|
var schemas_exports2 = {};
|
|
17035
17035
|
__export(schemas_exports2, {
|
|
17036
17036
|
ZodAny: () => ZodAny,
|
|
@@ -17211,7 +17211,7 @@ __export(schemas_exports2, {
|
|
|
17211
17211
|
xor: () => xor
|
|
17212
17212
|
});
|
|
17213
17213
|
|
|
17214
|
-
// node_modules/.pnpm/mcporter@0.
|
|
17214
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/checks.js
|
|
17215
17215
|
var checks_exports2 = {};
|
|
17216
17216
|
__export(checks_exports2, {
|
|
17217
17217
|
endsWith: () => _endsWith,
|
|
@@ -17246,7 +17246,7 @@ __export(checks_exports2, {
|
|
|
17246
17246
|
uppercase: () => _uppercase
|
|
17247
17247
|
});
|
|
17248
17248
|
|
|
17249
|
-
// node_modules/.pnpm/mcporter@0.
|
|
17249
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/errors.js
|
|
17250
17250
|
var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
17251
17251
|
function _lazyMethod(proto, key, make) {
|
|
17252
17252
|
Object.defineProperty(proto, key, {
|
|
@@ -17292,7 +17292,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, void 0
|
|
|
17292
17292
|
Parent: Error
|
|
17293
17293
|
});
|
|
17294
17294
|
|
|
17295
|
-
// node_modules/.pnpm/mcporter@0.
|
|
17295
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/parse.js
|
|
17296
17296
|
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
17297
17297
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
17298
17298
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -17306,7 +17306,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
17306
17306
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
17307
17307
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
17308
17308
|
|
|
17309
|
-
// node_modules/.pnpm/mcporter@0.
|
|
17309
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/schemas.js
|
|
17310
17310
|
function _ensureDefaultLocale() {
|
|
17311
17311
|
if (!globalConfig.localeError)
|
|
17312
17312
|
config(en_default());
|
|
@@ -18771,7 +18771,7 @@ function preprocess(fn, schema) {
|
|
|
18771
18771
|
});
|
|
18772
18772
|
}
|
|
18773
18773
|
|
|
18774
|
-
// node_modules/.pnpm/mcporter@0.
|
|
18774
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/compat.js
|
|
18775
18775
|
var ZodIssueCode = {
|
|
18776
18776
|
invalid_type: "invalid_type",
|
|
18777
18777
|
too_big: "too_big",
|
|
@@ -18797,7 +18797,7 @@ var ZodFirstPartyTypeKind;
|
|
|
18797
18797
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
18798
18798
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
18799
18799
|
|
|
18800
|
-
// node_modules/.pnpm/mcporter@0.
|
|
18800
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/iso.js
|
|
18801
18801
|
var iso_exports = {};
|
|
18802
18802
|
__export(iso_exports, {
|
|
18803
18803
|
ZodISODate: () => ZodISODate,
|
|
@@ -18822,7 +18822,7 @@ function duration2(params) {
|
|
|
18822
18822
|
return _isoDuration(ZodISODuration, params);
|
|
18823
18823
|
}
|
|
18824
18824
|
|
|
18825
|
-
// node_modules/.pnpm/mcporter@0.
|
|
18825
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/from-json-schema.js
|
|
18826
18826
|
var z = {
|
|
18827
18827
|
...schemas_exports2,
|
|
18828
18828
|
...checks_exports2,
|
|
@@ -19555,7 +19555,7 @@ function fromJSONSchema(schema, params) {
|
|
|
19555
19555
|
return convertSchema(normalized, ctx);
|
|
19556
19556
|
}
|
|
19557
19557
|
|
|
19558
|
-
// node_modules/.pnpm/mcporter@0.
|
|
19558
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/core/visit.js
|
|
19559
19559
|
var RESOLVING = /* @__PURE__ */ Symbol("z.visit/resolving");
|
|
19560
19560
|
function visit(schema, fnOrHandlers) {
|
|
19561
19561
|
const fn = typeof fnOrHandlers === "function" ? fnOrHandlers : (node2, rewritten) => {
|
|
@@ -19710,7 +19710,7 @@ function visit(schema, fnOrHandlers) {
|
|
|
19710
19710
|
return run(schema);
|
|
19711
19711
|
}
|
|
19712
19712
|
|
|
19713
|
-
// node_modules/.pnpm/mcporter@0.
|
|
19713
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/deep-partial.js
|
|
19714
19714
|
function deepPartial(schema) {
|
|
19715
19715
|
return visit(schema, {
|
|
19716
19716
|
object: (s) => s.partial(),
|
|
@@ -19722,7 +19722,7 @@ function deepPartial(schema) {
|
|
|
19722
19722
|
});
|
|
19723
19723
|
}
|
|
19724
19724
|
|
|
19725
|
-
// node_modules/.pnpm/mcporter@0.
|
|
19725
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/in-out.js
|
|
19726
19726
|
function withChecks(side, checks) {
|
|
19727
19727
|
if (!checks?.length)
|
|
19728
19728
|
return side;
|
|
@@ -19752,7 +19752,7 @@ function output(schema) {
|
|
|
19752
19752
|
});
|
|
19753
19753
|
}
|
|
19754
19754
|
|
|
19755
|
-
// node_modules/.pnpm/mcporter@0.
|
|
19755
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/zod/v4/classic/coerce.js
|
|
19756
19756
|
var coerce_exports = {};
|
|
19757
19757
|
__export(coerce_exports, {
|
|
19758
19758
|
bigint: () => bigint3,
|
|
@@ -19777,7 +19777,7 @@ function date4(params) {
|
|
|
19777
19777
|
return _coercedDate(ZodDate, params);
|
|
19778
19778
|
}
|
|
19779
19779
|
|
|
19780
|
-
// node_modules/.pnpm/mcporter@0.
|
|
19780
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/core/dist/schemas-DscsoNZN.mjs
|
|
19781
19781
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
19782
19782
|
var SUPPORTED_PROTOCOL_VERSIONS = [
|
|
19783
19783
|
LATEST_PROTOCOL_VERSION,
|
|
@@ -20565,6 +20565,8 @@ var ServerResultSchema = union([
|
|
|
20565
20565
|
ListToolsResultSchema,
|
|
20566
20566
|
SubscriptionsListenResultSchema
|
|
20567
20567
|
]);
|
|
20568
|
+
|
|
20569
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/core/dist/auth-UMQCo-ad.mjs
|
|
20568
20570
|
var SafeUrlSchema = url().superRefine((val, ctx) => {
|
|
20569
20571
|
if (!URL.canParse(val)) {
|
|
20570
20572
|
ctx.addIssue({
|
|
@@ -20718,7 +20720,7 @@ var OAuthTokenRevocationRequestSchema = object({
|
|
|
20718
20720
|
token_type_hint: string2().optional()
|
|
20719
20721
|
}).strip();
|
|
20720
20722
|
|
|
20721
|
-
// node_modules/.pnpm/mcporter@0.
|
|
20723
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/src-CeKsbNLO.mjs
|
|
20722
20724
|
var BRANDS = /* @__PURE__ */ Symbol.for("mcp.sdk.errorBrands");
|
|
20723
20725
|
function stampErrorBrands(instance, ctor) {
|
|
20724
20726
|
const brands = /* @__PURE__ */ new Set();
|
|
@@ -23638,12 +23640,12 @@ var RFC9110_TOKEN = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
|
23638
23640
|
var PERMITTED_X_MCP_HEADER_TYPES = /* @__PURE__ */ new Set([
|
|
23639
23641
|
"string",
|
|
23640
23642
|
"integer",
|
|
23641
|
-
"boolean"
|
|
23642
|
-
"number"
|
|
23643
|
+
"boolean"
|
|
23643
23644
|
]);
|
|
23644
23645
|
function scanXMcpHeaderDeclarations(inputSchema) {
|
|
23645
23646
|
const declarations = [];
|
|
23646
23647
|
const seenLower = /* @__PURE__ */ new Map();
|
|
23648
|
+
let numberFault;
|
|
23647
23649
|
const visit2 = (node2, path, reachable) => {
|
|
23648
23650
|
if (node2 === null || typeof node2 !== "object") return void 0;
|
|
23649
23651
|
const schema = node2;
|
|
@@ -23653,7 +23655,11 @@ function scanXMcpHeaderDeclarations(inputSchema) {
|
|
|
23653
23655
|
if (typeof raw !== "string" || raw.length === 0) return `${pathName(path)}: x-mcp-header MUST be a non-empty string`;
|
|
23654
23656
|
if (!RFC9110_TOKEN.test(raw)) return `${pathName(path)}: x-mcp-header '${raw}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;
|
|
23655
23657
|
const type = typeof schema.type === "string" ? schema.type : void 0;
|
|
23656
|
-
if (type === void 0 || !PERMITTED_X_MCP_HEADER_TYPES.has(type))
|
|
23658
|
+
if (type === void 0 || !PERMITTED_X_MCP_HEADER_TYPES.has(type)) {
|
|
23659
|
+
const fault$1 = `${pathName(path)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${type ?? "<none>"}`;
|
|
23660
|
+
if (type !== "number") return fault$1;
|
|
23661
|
+
numberFault ??= fault$1;
|
|
23662
|
+
}
|
|
23657
23663
|
const lower = raw.toLowerCase();
|
|
23658
23664
|
const prior = seenLower.get(lower);
|
|
23659
23665
|
if (prior !== void 0) return `x-mcp-header '${raw}' is not case-insensitively unique (also declared as '${prior}')`;
|
|
@@ -23680,12 +23686,17 @@ function scanXMcpHeaderDeclarations(inputSchema) {
|
|
|
23680
23686
|
}
|
|
23681
23687
|
};
|
|
23682
23688
|
const fault = visit2(inputSchema, [], true);
|
|
23683
|
-
|
|
23689
|
+
if (fault !== void 0) return {
|
|
23690
|
+
valid: false,
|
|
23691
|
+
reason: numberFault ?? fault
|
|
23692
|
+
};
|
|
23693
|
+
return numberFault === void 0 ? {
|
|
23684
23694
|
valid: true,
|
|
23685
23695
|
declarations
|
|
23686
23696
|
} : {
|
|
23687
23697
|
valid: false,
|
|
23688
|
-
reason:
|
|
23698
|
+
reason: numberFault,
|
|
23699
|
+
declarations
|
|
23689
23700
|
};
|
|
23690
23701
|
}
|
|
23691
23702
|
var NON_REACHABLE_SUBSCHEMA_KEYWORDS = [
|
|
@@ -23917,15 +23928,18 @@ function standardSchemaToJsonSchema(schema, io = "input") {
|
|
|
23917
23928
|
...result
|
|
23918
23929
|
};
|
|
23919
23930
|
}
|
|
23920
|
-
|
|
23931
|
+
var LOCAL_DEFINITION_REF = /^#\/(\$defs|definitions)\/([^/~%]+)$/;
|
|
23932
|
+
function isProvablyObjectShapedRoot(schema, root = schema) {
|
|
23921
23933
|
if ("properties" in schema || "patternProperties" in schema || "additionalProperties" in schema || "required" in schema) return true;
|
|
23934
|
+
const ref = typeof schema.$ref === "string" && LOCAL_DEFINITION_REF.exec(schema.$ref);
|
|
23935
|
+
if (ref && root[ref[1]]?.[ref[2]]?.type === "object") return true;
|
|
23922
23936
|
for (const key of [
|
|
23923
23937
|
"oneOf",
|
|
23924
23938
|
"anyOf",
|
|
23925
23939
|
"allOf"
|
|
23926
23940
|
]) {
|
|
23927
23941
|
const members2 = schema[key];
|
|
23928
|
-
if (Array.isArray(members2) && members2.length > 0) return members2.every((m) => m !== null && typeof m === "object" && (m.type === "object" || isProvablyObjectShapedRoot(m)));
|
|
23942
|
+
if (Array.isArray(members2) && members2.length > 0) return members2.every((m) => m !== null && typeof m === "object" && (m.type === "object" || isProvablyObjectShapedRoot(m, "$id" in m ? {} : root)));
|
|
23929
23943
|
}
|
|
23930
23944
|
return false;
|
|
23931
23945
|
}
|
|
@@ -25522,7 +25536,7 @@ function unfollowedRedirect(url2, response) {
|
|
|
25522
25536
|
return `Redirect to ${target.href} not followed; use that URL as the endpoint if it is the intended server`;
|
|
25523
25537
|
}
|
|
25524
25538
|
|
|
25525
|
-
// node_modules/.pnpm/mcporter@0.
|
|
25539
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/ajvProvider-BIwGVY6G.mjs
|
|
25526
25540
|
var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
25527
25541
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25528
25542
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
|
@@ -28204,6 +28218,22 @@ var require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28204
28218
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
28205
28219
|
const isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
28206
28220
|
const isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
28221
|
+
const isPort = RegExp.prototype.test.bind(/^\d*$/u);
|
|
28222
|
+
const isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
28223
|
+
const isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
28224
|
+
const isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
|
|
28225
|
+
const isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
|
|
28226
|
+
const isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
|
|
28227
|
+
const BYTE_HEX = new Array(256);
|
|
28228
|
+
{
|
|
28229
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
28230
|
+
for (let i = 0; i < 256; i++) BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
|
|
28231
|
+
}
|
|
28232
|
+
function percentEncodeNonAscii(cp) {
|
|
28233
|
+
if (cp < 2048) return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
28234
|
+
if (cp < 65536) return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
28235
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
28236
|
+
}
|
|
28207
28237
|
function stringArrayToHexStripped(input2) {
|
|
28208
28238
|
let acc = "";
|
|
28209
28239
|
let code = 0;
|
|
@@ -28222,83 +28252,120 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28222
28252
|
}
|
|
28223
28253
|
return acc;
|
|
28224
28254
|
}
|
|
28255
|
+
const isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
|
|
28256
|
+
const isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
|
|
28257
|
+
const isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
|
|
28225
28258
|
const nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
|
|
28226
|
-
function
|
|
28227
|
-
|
|
28228
|
-
|
|
28229
|
-
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
if (hex3 !== "") address.push(hex3);
|
|
28234
|
-
else {
|
|
28235
|
-
output2.error = true;
|
|
28236
|
-
return false;
|
|
28259
|
+
function isZoneIdentifier(zone) {
|
|
28260
|
+
if (zone.length === 0) return false;
|
|
28261
|
+
for (let i = 0; i < zone.length; i++) {
|
|
28262
|
+
if (isZoneCharacter(zone[i])) continue;
|
|
28263
|
+
if (zone[i] === "%" && i + 2 < zone.length && isHexPair(zone.slice(i + 1, i + 3))) {
|
|
28264
|
+
i += 2;
|
|
28265
|
+
continue;
|
|
28237
28266
|
}
|
|
28238
|
-
|
|
28267
|
+
return false;
|
|
28239
28268
|
}
|
|
28240
28269
|
return true;
|
|
28241
28270
|
}
|
|
28242
|
-
function
|
|
28243
|
-
let
|
|
28244
|
-
|
|
28245
|
-
|
|
28246
|
-
|
|
28247
|
-
|
|
28248
|
-
|
|
28249
|
-
|
|
28250
|
-
|
|
28251
|
-
|
|
28252
|
-
|
|
28253
|
-
|
|
28254
|
-
|
|
28255
|
-
|
|
28256
|
-
|
|
28257
|
-
|
|
28258
|
-
|
|
28259
|
-
|
|
28260
|
-
|
|
28261
|
-
|
|
28262
|
-
|
|
28263
|
-
|
|
28264
|
-
|
|
28265
|
-
|
|
28266
|
-
|
|
28267
|
-
|
|
28268
|
-
|
|
28269
|
-
|
|
28270
|
-
|
|
28271
|
-
|
|
28271
|
+
function compressIPv6ZeroRun(hextets) {
|
|
28272
|
+
let bestStart = -1;
|
|
28273
|
+
let bestLength = 0;
|
|
28274
|
+
let runStart = -1;
|
|
28275
|
+
let runLength = 0;
|
|
28276
|
+
for (let i = 0; i < hextets.length; i++) if (hextets[i] === "0") {
|
|
28277
|
+
if (runStart === -1) runStart = i;
|
|
28278
|
+
runLength++;
|
|
28279
|
+
if (runLength > bestLength) {
|
|
28280
|
+
bestLength = runLength;
|
|
28281
|
+
bestStart = runStart;
|
|
28282
|
+
}
|
|
28283
|
+
} else {
|
|
28284
|
+
runStart = -1;
|
|
28285
|
+
runLength = 0;
|
|
28286
|
+
}
|
|
28287
|
+
if (bestLength < 2) return hextets.join(":");
|
|
28288
|
+
const head = hextets.slice(0, bestStart).join(":");
|
|
28289
|
+
const tail = hextets.slice(bestStart + bestLength).join(":");
|
|
28290
|
+
return head + "::" + tail;
|
|
28291
|
+
}
|
|
28292
|
+
function normalizeIPv6Address(input2) {
|
|
28293
|
+
const compression = input2.indexOf("::");
|
|
28294
|
+
if (compression !== -1 && input2.indexOf("::", compression + 1) !== -1) return void 0;
|
|
28295
|
+
const left = compression === -1 ? input2.split(":") : input2.slice(0, compression).split(":");
|
|
28296
|
+
const right = compression === -1 ? [] : input2.slice(compression + 2).split(":");
|
|
28297
|
+
if (compression !== -1) {
|
|
28298
|
+
if (left.length === 1 && left[0] === "") left.length = 0;
|
|
28299
|
+
if (right.length === 1 && right[0] === "") right.length = 0;
|
|
28300
|
+
}
|
|
28301
|
+
const parts = left.concat(right);
|
|
28302
|
+
let hextetCount = 0;
|
|
28303
|
+
for (let i = 0; i < parts.length; i++) {
|
|
28304
|
+
const part = parts[i];
|
|
28305
|
+
if (part === "") return void 0;
|
|
28306
|
+
if (part.indexOf(".") !== -1) {
|
|
28307
|
+
if (i !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part)) return void 0;
|
|
28308
|
+
hextetCount += 2;
|
|
28272
28309
|
continue;
|
|
28273
28310
|
}
|
|
28311
|
+
if (!isHextet(part)) return void 0;
|
|
28312
|
+
parts[i] = parseInt(part, 16).toString(16);
|
|
28313
|
+
hextetCount++;
|
|
28274
28314
|
}
|
|
28275
|
-
if (
|
|
28276
|
-
|
|
28277
|
-
|
|
28278
|
-
|
|
28279
|
-
return
|
|
28315
|
+
if (compression === -1) {
|
|
28316
|
+
if (hextetCount !== 8) return void 0;
|
|
28317
|
+
return compressIPv6ZeroRun(parts);
|
|
28318
|
+
}
|
|
28319
|
+
if (hextetCount >= 8) return void 0;
|
|
28320
|
+
const expanded = parts.slice(0, left.length);
|
|
28321
|
+
for (let i = hextetCount; i < 8; i++) expanded.push("0");
|
|
28322
|
+
for (let i = left.length; i < parts.length; i++) expanded.push(parts[i]);
|
|
28323
|
+
return compressIPv6ZeroRun(expanded);
|
|
28280
28324
|
}
|
|
28281
28325
|
function normalizeIPv6(host) {
|
|
28282
|
-
|
|
28326
|
+
const bracketed = host[0] === "[" && host[host.length - 1] === "]";
|
|
28327
|
+
if ((host[0] === "[" || host[host.length - 1] === "]") && !bracketed) return {
|
|
28283
28328
|
host,
|
|
28284
|
-
isIPV6: false
|
|
28329
|
+
isIPV6: false,
|
|
28330
|
+
error: true
|
|
28285
28331
|
};
|
|
28286
|
-
|
|
28287
|
-
if (
|
|
28288
|
-
|
|
28289
|
-
let escapedHost = ipv63.address;
|
|
28290
|
-
if (ipv63.zone) {
|
|
28291
|
-
newHost += "%" + ipv63.zone;
|
|
28292
|
-
escapedHost += "%25" + ipv63.zone;
|
|
28293
|
-
}
|
|
28332
|
+
let input2 = bracketed ? host.slice(1, -1) : host;
|
|
28333
|
+
if (bracketed && isIPvFuture(input2)) {
|
|
28334
|
+
input2 = input2.toLowerCase();
|
|
28294
28335
|
return {
|
|
28295
|
-
host:
|
|
28296
|
-
|
|
28297
|
-
|
|
28336
|
+
host: `[${input2}]`,
|
|
28337
|
+
escapedHost: input2,
|
|
28338
|
+
isIPV6: false,
|
|
28339
|
+
isIPVFuture: true
|
|
28340
|
+
};
|
|
28341
|
+
}
|
|
28342
|
+
if (findToken(input2, ":") < 2) return {
|
|
28343
|
+
host,
|
|
28344
|
+
isIPV6: false,
|
|
28345
|
+
error: bracketed
|
|
28346
|
+
};
|
|
28347
|
+
let zoneIdentifier = "";
|
|
28348
|
+
const zoneSeparator = input2.indexOf("%");
|
|
28349
|
+
if (zoneSeparator !== -1) {
|
|
28350
|
+
const separatorLength = input2.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
|
|
28351
|
+
zoneIdentifier = input2.slice(zoneSeparator + separatorLength);
|
|
28352
|
+
if (!isZoneIdentifier(zoneIdentifier)) return {
|
|
28353
|
+
host,
|
|
28354
|
+
isIPV6: false,
|
|
28355
|
+
error: true
|
|
28298
28356
|
};
|
|
28299
|
-
|
|
28357
|
+
input2 = input2.slice(0, zoneSeparator);
|
|
28358
|
+
}
|
|
28359
|
+
const address = normalizeIPv6Address(input2);
|
|
28360
|
+
if (address === void 0) return {
|
|
28300
28361
|
host,
|
|
28301
|
-
isIPV6: false
|
|
28362
|
+
isIPV6: false,
|
|
28363
|
+
error: true
|
|
28364
|
+
};
|
|
28365
|
+
return {
|
|
28366
|
+
host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
|
|
28367
|
+
escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
|
|
28368
|
+
isIPV6: true
|
|
28302
28369
|
};
|
|
28303
28370
|
}
|
|
28304
28371
|
function findToken(str, token) {
|
|
@@ -28374,41 +28441,225 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28374
28441
|
}
|
|
28375
28442
|
return output2.join("");
|
|
28376
28443
|
}
|
|
28377
|
-
|
|
28378
|
-
|
|
28379
|
-
|
|
28380
|
-
|
|
28381
|
-
|
|
28382
|
-
|
|
28383
|
-
|
|
28384
|
-
|
|
28385
|
-
|
|
28444
|
+
const HOST_DELIMS = {
|
|
28445
|
+
"@": "%40",
|
|
28446
|
+
"/": "%2F",
|
|
28447
|
+
"?": "%3F",
|
|
28448
|
+
"#": "%23",
|
|
28449
|
+
":": "%3A"
|
|
28450
|
+
};
|
|
28451
|
+
const HOST_DELIM_RE = /[@/?#:]/g;
|
|
28452
|
+
const HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
28453
|
+
function reescapeHostDelimiters(host, isIP) {
|
|
28454
|
+
const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
|
|
28455
|
+
re.lastIndex = 0;
|
|
28456
|
+
return host.replace(re, (ch) => HOST_DELIMS[ch]);
|
|
28457
|
+
}
|
|
28458
|
+
function normalizePercentEncoding(input2, decodeUnreserved = false) {
|
|
28459
|
+
if (input2.indexOf("%") === -1) return input2;
|
|
28460
|
+
let output2 = "";
|
|
28461
|
+
for (let i = 0; i < input2.length; i++) {
|
|
28462
|
+
if (input2[i] === "%" && i + 2 < input2.length) {
|
|
28463
|
+
const hex3 = input2.slice(i + 1, i + 3);
|
|
28464
|
+
if (isHexPair(hex3)) {
|
|
28465
|
+
const normalizedHex = hex3.toUpperCase();
|
|
28466
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
28467
|
+
if (decodeUnreserved && isUnreserved(decoded)) output2 += decoded;
|
|
28468
|
+
else output2 += "%" + normalizedHex;
|
|
28469
|
+
i += 2;
|
|
28470
|
+
continue;
|
|
28471
|
+
}
|
|
28472
|
+
}
|
|
28473
|
+
output2 += input2[i];
|
|
28474
|
+
}
|
|
28475
|
+
return output2;
|
|
28476
|
+
}
|
|
28477
|
+
function normalizePathEncoding(input2) {
|
|
28478
|
+
let output2 = "";
|
|
28479
|
+
for (let i = 0; i < input2.length; i++) {
|
|
28480
|
+
const ch = input2[i];
|
|
28481
|
+
if (ch === "%" && i + 2 < input2.length) {
|
|
28482
|
+
const hex3 = input2.slice(i + 1, i + 3);
|
|
28483
|
+
if (isHexPair(hex3)) {
|
|
28484
|
+
const normalizedHex = hex3.toUpperCase();
|
|
28485
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
28486
|
+
if (decoded !== "." && isUnreserved(decoded)) output2 += decoded;
|
|
28487
|
+
else output2 += "%" + normalizedHex;
|
|
28488
|
+
i += 2;
|
|
28489
|
+
continue;
|
|
28490
|
+
}
|
|
28491
|
+
}
|
|
28492
|
+
if (isPathCharacter(ch)) output2 += ch;
|
|
28493
|
+
else {
|
|
28494
|
+
const code = input2.charCodeAt(i);
|
|
28495
|
+
if (code < 128) output2 += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
28496
|
+
else if (code < 55296 || code > 57343) output2 += percentEncodeNonAscii(code);
|
|
28497
|
+
else if (code <= 56319 && i + 1 < input2.length) {
|
|
28498
|
+
const low = input2.charCodeAt(i + 1);
|
|
28499
|
+
if (low >= 56320 && low <= 57343) {
|
|
28500
|
+
output2 += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
28501
|
+
i++;
|
|
28502
|
+
} else output2 += percentEncodeNonAscii(65533);
|
|
28503
|
+
} else output2 += percentEncodeNonAscii(65533);
|
|
28504
|
+
}
|
|
28505
|
+
}
|
|
28506
|
+
return output2;
|
|
28507
|
+
}
|
|
28508
|
+
function serializePathEncoding(input2, pathNoScheme = false) {
|
|
28509
|
+
let output2 = "";
|
|
28510
|
+
let firstSegment = pathNoScheme && input2[0] !== "/";
|
|
28511
|
+
for (let i = 0; i < input2.length; i++) {
|
|
28512
|
+
const ch = input2[i];
|
|
28513
|
+
if (ch === "%" && i + 2 < input2.length) {
|
|
28514
|
+
const hex3 = input2.slice(i + 1, i + 3);
|
|
28515
|
+
if (isHexPair(hex3)) {
|
|
28516
|
+
output2 += "%" + hex3.toUpperCase();
|
|
28517
|
+
i += 2;
|
|
28518
|
+
continue;
|
|
28519
|
+
}
|
|
28520
|
+
}
|
|
28521
|
+
if (ch === "/") firstSegment = false;
|
|
28522
|
+
if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) output2 += ch;
|
|
28523
|
+
else {
|
|
28524
|
+
const code = input2.charCodeAt(i);
|
|
28525
|
+
if (code < 128) output2 += BYTE_HEX[code];
|
|
28526
|
+
else if (code < 55296 || code > 57343) output2 += percentEncodeNonAscii(code);
|
|
28527
|
+
else if (code <= 56319 && i + 1 < input2.length) {
|
|
28528
|
+
const low = input2.charCodeAt(i + 1);
|
|
28529
|
+
if (low >= 56320 && low <= 57343) {
|
|
28530
|
+
output2 += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
28531
|
+
i++;
|
|
28532
|
+
} else output2 += percentEncodeNonAscii(65533);
|
|
28533
|
+
} else output2 += percentEncodeNonAscii(65533);
|
|
28534
|
+
}
|
|
28535
|
+
}
|
|
28536
|
+
return output2;
|
|
28537
|
+
}
|
|
28538
|
+
function encodeComponent(input2, isAllowed) {
|
|
28539
|
+
let output2 = "";
|
|
28540
|
+
for (let i = 0; i < input2.length; i++) {
|
|
28541
|
+
const ch = input2[i];
|
|
28542
|
+
if (ch === "%" && i + 2 < input2.length) {
|
|
28543
|
+
const hex3 = input2.slice(i + 1, i + 3);
|
|
28544
|
+
if (isHexPair(hex3)) {
|
|
28545
|
+
output2 += "%" + hex3.toUpperCase();
|
|
28546
|
+
i += 2;
|
|
28547
|
+
continue;
|
|
28548
|
+
}
|
|
28549
|
+
}
|
|
28550
|
+
if (isAllowed(ch)) output2 += ch;
|
|
28551
|
+
else {
|
|
28552
|
+
const code = input2.charCodeAt(i);
|
|
28553
|
+
if (code < 128) output2 += BYTE_HEX[code];
|
|
28554
|
+
else if (code < 55296 || code > 57343) output2 += percentEncodeNonAscii(code);
|
|
28555
|
+
else if (code <= 56319 && i + 1 < input2.length) {
|
|
28556
|
+
const low = input2.charCodeAt(i + 1);
|
|
28557
|
+
if (low >= 56320 && low <= 57343) {
|
|
28558
|
+
output2 += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
28559
|
+
i++;
|
|
28560
|
+
} else output2 += percentEncodeNonAscii(65533);
|
|
28561
|
+
} else output2 += percentEncodeNonAscii(65533);
|
|
28562
|
+
}
|
|
28563
|
+
}
|
|
28564
|
+
return output2;
|
|
28565
|
+
}
|
|
28566
|
+
function encodeUserinfo(input2) {
|
|
28567
|
+
return encodeComponent(input2, isUserinfoCharacter);
|
|
28568
|
+
}
|
|
28569
|
+
function encodeQuery(input2) {
|
|
28570
|
+
return encodeComponent(input2, isQueryFragmentCharacter);
|
|
28571
|
+
}
|
|
28572
|
+
function encodeFragment(input2) {
|
|
28573
|
+
return encodeComponent(input2, isQueryFragmentCharacter);
|
|
28574
|
+
}
|
|
28575
|
+
function isEscapeSafe(cp) {
|
|
28576
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
28577
|
+
}
|
|
28578
|
+
function normalizeQueryFragmentEncoding(input2) {
|
|
28579
|
+
let output2 = "";
|
|
28580
|
+
for (let i = 0; i < input2.length; i++) {
|
|
28581
|
+
const ch = input2[i];
|
|
28582
|
+
if (ch === "%" && i + 2 < input2.length) {
|
|
28583
|
+
const hex3 = input2.slice(i + 1, i + 3);
|
|
28584
|
+
if (isHexPair(hex3)) {
|
|
28585
|
+
const normalizedHex = hex3.toUpperCase();
|
|
28586
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
28587
|
+
if (isUnreserved(decoded)) output2 += decoded;
|
|
28588
|
+
else output2 += "%" + normalizedHex;
|
|
28589
|
+
i += 2;
|
|
28590
|
+
continue;
|
|
28591
|
+
}
|
|
28592
|
+
}
|
|
28593
|
+
if (isQueryFragmentCharacter(ch)) output2 += ch;
|
|
28594
|
+
else {
|
|
28595
|
+
const code = input2.charCodeAt(i);
|
|
28596
|
+
if (code < 128) output2 += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
28597
|
+
else if (code < 55296 || code > 57343) output2 += percentEncodeNonAscii(code);
|
|
28598
|
+
else if (code <= 56319 && i + 1 < input2.length) {
|
|
28599
|
+
const low = input2.charCodeAt(i + 1);
|
|
28600
|
+
if (low >= 56320 && low <= 57343) {
|
|
28601
|
+
output2 += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
28602
|
+
i++;
|
|
28603
|
+
} else output2 += percentEncodeNonAscii(65533);
|
|
28604
|
+
} else output2 += percentEncodeNonAscii(65533);
|
|
28605
|
+
}
|
|
28606
|
+
}
|
|
28607
|
+
return output2;
|
|
28608
|
+
}
|
|
28609
|
+
function escapePreservingEscapes(input2) {
|
|
28610
|
+
let output2 = "";
|
|
28611
|
+
for (let i = 0; i < input2.length; i++) {
|
|
28612
|
+
if (input2[i] === "%" && i + 2 < input2.length) {
|
|
28613
|
+
const hex3 = input2.slice(i + 1, i + 3);
|
|
28614
|
+
if (isHexPair(hex3)) {
|
|
28615
|
+
output2 += "%" + hex3.toUpperCase();
|
|
28616
|
+
i += 2;
|
|
28617
|
+
continue;
|
|
28618
|
+
}
|
|
28619
|
+
}
|
|
28620
|
+
output2 += escape(input2[i]);
|
|
28621
|
+
}
|
|
28622
|
+
return output2;
|
|
28386
28623
|
}
|
|
28387
28624
|
function recomposeAuthority(component) {
|
|
28388
28625
|
const uriTokens = [];
|
|
28389
28626
|
if (component.userinfo !== void 0) {
|
|
28390
|
-
uriTokens.push(component.userinfo);
|
|
28627
|
+
uriTokens.push(encodeUserinfo(component.userinfo));
|
|
28391
28628
|
uriTokens.push("@");
|
|
28392
28629
|
}
|
|
28393
28630
|
if (component.host !== void 0) {
|
|
28394
|
-
let host =
|
|
28631
|
+
let host = component.host;
|
|
28395
28632
|
if (!isIPv4(host)) {
|
|
28396
|
-
|
|
28397
|
-
if (ipV6res.isIPV6
|
|
28398
|
-
|
|
28633
|
+
let ipV6res = normalizeIPv6(host);
|
|
28634
|
+
if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
|
|
28635
|
+
host = normalizePercentEncoding(host, true);
|
|
28636
|
+
ipV6res = normalizeIPv6(host);
|
|
28637
|
+
}
|
|
28638
|
+
if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) host = `[${ipV6res.escapedHost}]`;
|
|
28639
|
+
else host = reescapeHostDelimiters(host, false);
|
|
28399
28640
|
}
|
|
28400
28641
|
uriTokens.push(host);
|
|
28401
28642
|
}
|
|
28402
28643
|
if (typeof component.port === "number" || typeof component.port === "string") {
|
|
28644
|
+
const port = String(component.port);
|
|
28645
|
+
if (!isPort(port)) throw new TypeError("URI port is malformed.");
|
|
28403
28646
|
uriTokens.push(":");
|
|
28404
|
-
uriTokens.push(
|
|
28647
|
+
uriTokens.push(port);
|
|
28405
28648
|
}
|
|
28406
28649
|
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
28407
28650
|
}
|
|
28408
28651
|
module.exports = {
|
|
28409
28652
|
nonSimpleDomain,
|
|
28410
28653
|
recomposeAuthority,
|
|
28411
|
-
|
|
28654
|
+
reescapeHostDelimiters,
|
|
28655
|
+
normalizePercentEncoding,
|
|
28656
|
+
normalizePathEncoding,
|
|
28657
|
+
serializePathEncoding,
|
|
28658
|
+
normalizeQueryFragmentEncoding,
|
|
28659
|
+
encodeUserinfo,
|
|
28660
|
+
encodeQuery,
|
|
28661
|
+
encodeFragment,
|
|
28662
|
+
escapePreservingEscapes,
|
|
28412
28663
|
removeDotSegments,
|
|
28413
28664
|
isIPv4,
|
|
28414
28665
|
isUUID,
|
|
@@ -28418,7 +28669,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28418
28669
|
}));
|
|
28419
28670
|
var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
28420
28671
|
const { isUUID } = require_utils();
|
|
28421
|
-
const URN_REG =
|
|
28672
|
+
const URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
28422
28673
|
const supportedSchemeNames = [
|
|
28423
28674
|
"http",
|
|
28424
28675
|
"https",
|
|
@@ -28460,9 +28711,10 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28460
28711
|
wsComponent.secure = void 0;
|
|
28461
28712
|
}
|
|
28462
28713
|
if (wsComponent.resourceName) {
|
|
28463
|
-
const
|
|
28714
|
+
const queryIndex = wsComponent.resourceName.indexOf("?");
|
|
28715
|
+
const path = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
|
|
28464
28716
|
wsComponent.path = path && path !== "/" ? path : void 0;
|
|
28465
|
-
wsComponent.query =
|
|
28717
|
+
wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
|
|
28466
28718
|
wsComponent.resourceName = void 0;
|
|
28467
28719
|
}
|
|
28468
28720
|
wsComponent.fragment = void 0;
|
|
@@ -28474,7 +28726,7 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28474
28726
|
return urnComponent;
|
|
28475
28727
|
}
|
|
28476
28728
|
const matches = urnComponent.path.match(URN_REG);
|
|
28477
|
-
if (matches) {
|
|
28729
|
+
if (matches && matches[0] === urnComponent.path) {
|
|
28478
28730
|
const scheme = options.scheme || urnComponent.scheme || "urn";
|
|
28479
28731
|
urnComponent.nid = matches[1].toLowerCase();
|
|
28480
28732
|
urnComponent.nss = matches[2];
|
|
@@ -28564,16 +28816,32 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28564
28816
|
};
|
|
28565
28817
|
}));
|
|
28566
28818
|
var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
28567
|
-
const { normalizeIPv6, removeDotSegments, recomposeAuthority,
|
|
28819
|
+
const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
28568
28820
|
const { SCHEMES, getSchemeHandler } = require_schemes();
|
|
28821
|
+
const VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
28822
|
+
const MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
28823
|
+
function decodeValidScheme(scheme) {
|
|
28824
|
+
const decodedScheme = unescape(String(scheme));
|
|
28825
|
+
if (!VALID_SCHEME.test(decodedScheme)) throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
28826
|
+
return decodedScheme;
|
|
28827
|
+
}
|
|
28569
28828
|
function normalize(uri, options) {
|
|
28570
|
-
if (typeof uri === "string") uri =
|
|
28829
|
+
if (typeof uri === "string") uri = normalizeString(uri, options);
|
|
28571
28830
|
else if (typeof uri === "object") uri = parse3(serialize(uri, options), options);
|
|
28572
28831
|
return uri;
|
|
28573
28832
|
}
|
|
28574
28833
|
function resolve(baseURI, relativeURI, options) {
|
|
28575
28834
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
28576
|
-
const
|
|
28835
|
+
const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed, malformedPercentEncoding: baseMalformedPercentEncoding, malformedSchemeSpecific: baseMalformedSchemeSpecific, malformedHost: baseMalformedHost, malformedScheme: baseMalformedScheme } = parseWithStatus(baseURI, schemelessOptions);
|
|
28836
|
+
const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed, malformedPercentEncoding: relativeMalformedPercentEncoding, malformedSchemeSpecific: relativeMalformedSchemeSpecific, malformedHost: relativeMalformedHost, malformedScheme: relativeMalformedScheme } = parseWithStatus(relativeURI, schemelessOptions);
|
|
28837
|
+
if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
28838
|
+
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
28839
|
+
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
28840
|
+
const resolvedHost = resolved.host;
|
|
28841
|
+
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
28842
|
+
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
28843
|
+
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
|
|
28844
|
+
if (resolved.error && !encodedASCIIHost) throw new Error(resolved.error);
|
|
28577
28845
|
schemelessOptions.skipEscape = true;
|
|
28578
28846
|
return serialize(resolved, schemelessOptions);
|
|
28579
28847
|
}
|
|
@@ -28623,27 +28891,9 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28623
28891
|
return target;
|
|
28624
28892
|
}
|
|
28625
28893
|
function equal(uriA, uriB, options) {
|
|
28626
|
-
|
|
28627
|
-
|
|
28628
|
-
|
|
28629
|
-
...options,
|
|
28630
|
-
skipEscape: true
|
|
28631
|
-
});
|
|
28632
|
-
} else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), {
|
|
28633
|
-
...options,
|
|
28634
|
-
skipEscape: true
|
|
28635
|
-
});
|
|
28636
|
-
if (typeof uriB === "string") {
|
|
28637
|
-
uriB = unescape(uriB);
|
|
28638
|
-
uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), {
|
|
28639
|
-
...options,
|
|
28640
|
-
skipEscape: true
|
|
28641
|
-
});
|
|
28642
|
-
} else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), {
|
|
28643
|
-
...options,
|
|
28644
|
-
skipEscape: true
|
|
28645
|
-
});
|
|
28646
|
-
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
28894
|
+
const normalizedA = normalizeComparableURI(uriA, options);
|
|
28895
|
+
const normalizedB = normalizeComparableURI(uriB, options);
|
|
28896
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;
|
|
28647
28897
|
}
|
|
28648
28898
|
function serialize(cmpts, opts) {
|
|
28649
28899
|
const component = {
|
|
@@ -28664,13 +28914,17 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28664
28914
|
};
|
|
28665
28915
|
const options = Object.assign({}, opts);
|
|
28666
28916
|
const uriTokens = [];
|
|
28917
|
+
if (component.scheme) component.scheme = decodeValidScheme(component.scheme);
|
|
28667
28918
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
28668
28919
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
28669
|
-
|
|
28670
|
-
|
|
28671
|
-
|
|
28672
|
-
|
|
28673
|
-
if (options.reference !== "suffix" && component.scheme)
|
|
28920
|
+
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
28921
|
+
const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
|
|
28922
|
+
if (component.path !== void 0) if (!options.skipEscape) component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
28923
|
+
else component.path = normalizePercentEncoding(component.path);
|
|
28924
|
+
if (options.reference !== "suffix" && component.scheme) {
|
|
28925
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
28926
|
+
uriTokens.push(component.scheme, ":");
|
|
28927
|
+
}
|
|
28674
28928
|
const authority = recomposeAuthority(component);
|
|
28675
28929
|
if (authority !== void 0) {
|
|
28676
28930
|
if (options.reference !== "suffix") uriTokens.push("//");
|
|
@@ -28680,15 +28934,47 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28680
28934
|
if (component.path !== void 0) {
|
|
28681
28935
|
let s = component.path;
|
|
28682
28936
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s);
|
|
28937
|
+
if (pathNoScheme) s = serializePathEncoding(s, true);
|
|
28683
28938
|
if (authority === void 0 && s[0] === "/" && s[1] === "/") s = "/%2F" + s.slice(2);
|
|
28684
28939
|
uriTokens.push(s);
|
|
28685
28940
|
}
|
|
28686
|
-
if (component.query !== void 0) uriTokens.push("?", component.query);
|
|
28687
|
-
if (component.fragment !== void 0) uriTokens.push("#", component.fragment);
|
|
28941
|
+
if (component.query !== void 0) uriTokens.push("?", encodeQuery(component.query));
|
|
28942
|
+
if (component.fragment !== void 0) uriTokens.push("#", encodeFragment(component.fragment));
|
|
28688
28943
|
return uriTokens.join("");
|
|
28689
28944
|
}
|
|
28690
28945
|
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
28691
|
-
|
|
28946
|
+
const AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
28947
|
+
const AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
|
|
28948
|
+
function getParseError(parsed, matches) {
|
|
28949
|
+
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") return 'URI path must start with "/" when authority is present.';
|
|
28950
|
+
if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) return "URI port is malformed.";
|
|
28951
|
+
}
|
|
28952
|
+
function hasMalformedPercentEncoding(component) {
|
|
28953
|
+
if (component === void 0) return false;
|
|
28954
|
+
let percent = component.indexOf("%");
|
|
28955
|
+
while (percent !== -1) {
|
|
28956
|
+
if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) return true;
|
|
28957
|
+
percent = component.indexOf("%", percent + 3);
|
|
28958
|
+
}
|
|
28959
|
+
return false;
|
|
28960
|
+
}
|
|
28961
|
+
function isIPLiteral(host) {
|
|
28962
|
+
return host[0] === "[" && host[host.length - 1] === "]";
|
|
28963
|
+
}
|
|
28964
|
+
function hasMalformedComponentPercentEncoding(matches) {
|
|
28965
|
+
const host = matches[4];
|
|
28966
|
+
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
28967
|
+
}
|
|
28968
|
+
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
28969
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) try {
|
|
28970
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
28971
|
+
} catch (e) {
|
|
28972
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
28973
|
+
return true;
|
|
28974
|
+
}
|
|
28975
|
+
return false;
|
|
28976
|
+
}
|
|
28977
|
+
function parseWithStatus(uri, opts) {
|
|
28692
28978
|
const options = Object.assign({}, opts);
|
|
28693
28979
|
const parsed = {
|
|
28694
28980
|
scheme: void 0,
|
|
@@ -28699,9 +28985,34 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28699
28985
|
query: void 0,
|
|
28700
28986
|
fragment: void 0
|
|
28701
28987
|
};
|
|
28988
|
+
let malformedAuthorityOrPort = false;
|
|
28989
|
+
let malformedPercentEncoding = false;
|
|
28990
|
+
let malformedSchemeSpecific = false;
|
|
28991
|
+
let malformedHost = false;
|
|
28992
|
+
let malformedIPLiteral = false;
|
|
28993
|
+
let malformedScheme = false;
|
|
28702
28994
|
let isIP = false;
|
|
28703
28995
|
if (options.reference === "suffix") if (options.scheme) uri = options.scheme + ":" + uri;
|
|
28704
28996
|
else uri = "//" + uri;
|
|
28997
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
28998
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
28999
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
29000
|
+
malformedAuthorityOrPort = true;
|
|
29001
|
+
}
|
|
29002
|
+
const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
|
|
29003
|
+
if (introducerMatch !== null) {
|
|
29004
|
+
const region = introducerMatch[1];
|
|
29005
|
+
const normalizedRegion = region.replace(/[\t\n\r]/g, "");
|
|
29006
|
+
if (normalizedRegion.length >= 2) {
|
|
29007
|
+
if (normalizedRegion.slice(0, 2) !== "//") {
|
|
29008
|
+
parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
|
|
29009
|
+
malformedAuthorityOrPort = true;
|
|
29010
|
+
} else if (region.length !== normalizedRegion.length) {
|
|
29011
|
+
parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
|
|
29012
|
+
malformedAuthorityOrPort = true;
|
|
29013
|
+
}
|
|
29014
|
+
}
|
|
29015
|
+
}
|
|
28705
29016
|
const matches = uri.match(URI_PARSE);
|
|
28706
29017
|
if (matches) {
|
|
28707
29018
|
parsed.scheme = matches[1];
|
|
@@ -28711,11 +29022,33 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28711
29022
|
parsed.path = matches[6] || "";
|
|
28712
29023
|
parsed.query = matches[7];
|
|
28713
29024
|
parsed.fragment = matches[8];
|
|
29025
|
+
if (parsed.scheme !== void 0) {
|
|
29026
|
+
const decodedScheme = unescape(parsed.scheme);
|
|
29027
|
+
if (VALID_SCHEME.test(decodedScheme)) parsed.scheme = decodedScheme.toLowerCase();
|
|
29028
|
+
else {
|
|
29029
|
+
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
29030
|
+
malformedScheme = true;
|
|
29031
|
+
}
|
|
29032
|
+
}
|
|
29033
|
+
malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
|
|
29034
|
+
if (malformedPercentEncoding) parsed.error = parsed.error || "URI contains malformed percent-encoding.";
|
|
28714
29035
|
if (isNaN(parsed.port)) parsed.port = matches[5];
|
|
29036
|
+
const parseError = getParseError(parsed, matches);
|
|
29037
|
+
if (parseError !== void 0) {
|
|
29038
|
+
parsed.error = parsed.error || parseError;
|
|
29039
|
+
malformedAuthorityOrPort = true;
|
|
29040
|
+
}
|
|
28715
29041
|
if (parsed.host) if (isIPv4(parsed.host) === false) {
|
|
29042
|
+
const bracketedIPLiteral = isIPLiteral(parsed.host);
|
|
29043
|
+
const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
|
|
28716
29044
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
28717
|
-
|
|
28718
|
-
|
|
29045
|
+
isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
|
|
29046
|
+
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
29047
|
+
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
29048
|
+
if (malformedIPLiteral) {
|
|
29049
|
+
parsed.error = parsed.error || "URI host is malformed.";
|
|
29050
|
+
malformedAuthorityOrPort = true;
|
|
29051
|
+
}
|
|
28719
29052
|
} else isIP = true;
|
|
28720
29053
|
if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) parsed.reference = "same-document";
|
|
28721
29054
|
else if (parsed.scheme === void 0) parsed.reference = "relative";
|
|
@@ -28723,24 +29056,58 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28723
29056
|
else parsed.reference = "uri";
|
|
28724
29057
|
if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
28725
29058
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
28726
|
-
if (!
|
|
28727
|
-
|
|
28728
|
-
|
|
28729
|
-
|
|
28730
|
-
|
|
28731
|
-
}
|
|
29059
|
+
if (!malformedIPLiteral) malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
29060
|
+
if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
|
|
29061
|
+
let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
29062
|
+
if (!isIP) host = normalizePercentEncoding(host.toLowerCase());
|
|
29063
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
28732
29064
|
}
|
|
28733
29065
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
28734
|
-
if (
|
|
28735
|
-
|
|
28736
|
-
|
|
28737
|
-
|
|
28738
|
-
|
|
28739
|
-
|
|
29066
|
+
if (parsed.path) parsed.path = normalizePathEncoding(parsed.path);
|
|
29067
|
+
if (parsed.query) parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
29068
|
+
if (parsed.fragment) parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
29069
|
+
}
|
|
29070
|
+
if (schemeHandler && schemeHandler.parse) {
|
|
29071
|
+
schemeHandler.parse(parsed, options);
|
|
29072
|
+
if (schemeHandler === SCHEMES.urn && parsed.nid === void 0) malformedSchemeSpecific = true;
|
|
28740
29073
|
}
|
|
28741
|
-
if (schemeHandler && schemeHandler.parse) schemeHandler.parse(parsed, options);
|
|
28742
29074
|
} else parsed.error = parsed.error || "URI can not be parsed.";
|
|
28743
|
-
return
|
|
29075
|
+
return {
|
|
29076
|
+
parsed,
|
|
29077
|
+
malformedAuthorityOrPort,
|
|
29078
|
+
malformedPercentEncoding,
|
|
29079
|
+
malformedSchemeSpecific,
|
|
29080
|
+
malformedHost,
|
|
29081
|
+
malformedScheme
|
|
29082
|
+
};
|
|
29083
|
+
}
|
|
29084
|
+
function parse3(uri, opts) {
|
|
29085
|
+
return parseWithStatus(uri, opts).parsed;
|
|
29086
|
+
}
|
|
29087
|
+
function normalizeString(uri, opts) {
|
|
29088
|
+
return normalizeStringWithStatus(uri, opts).normalized;
|
|
29089
|
+
}
|
|
29090
|
+
function normalizeStringWithStatus(uri, opts) {
|
|
29091
|
+
const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
|
|
29092
|
+
return {
|
|
29093
|
+
normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
|
|
29094
|
+
malformedAuthorityOrPort,
|
|
29095
|
+
malformedPercentEncoding,
|
|
29096
|
+
malformedSchemeSpecific,
|
|
29097
|
+
malformedHost,
|
|
29098
|
+
malformedScheme
|
|
29099
|
+
};
|
|
29100
|
+
}
|
|
29101
|
+
function normalizeComparableURI(uri, opts) {
|
|
29102
|
+
if (typeof uri !== "string" && typeof uri !== "object") return;
|
|
29103
|
+
let value;
|
|
29104
|
+
try {
|
|
29105
|
+
value = typeof uri === "string" ? uri : serialize(uri, opts);
|
|
29106
|
+
} catch {
|
|
29107
|
+
return;
|
|
29108
|
+
}
|
|
29109
|
+
const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
|
|
29110
|
+
return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? void 0 : normalized;
|
|
28744
29111
|
}
|
|
28745
29112
|
const fastUri = {
|
|
28746
29113
|
SCHEMES,
|
|
@@ -32532,10 +32899,10 @@ var AjvJsonSchemaValidator = class {
|
|
|
32532
32899
|
};
|
|
32533
32900
|
var Ajv = import_ajv.Ajv;
|
|
32534
32901
|
|
|
32535
|
-
// node_modules/.pnpm/mcporter@0.
|
|
32902
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs
|
|
32536
32903
|
var CORS_IS_POSSIBLE = false;
|
|
32537
32904
|
|
|
32538
|
-
// node_modules/.pnpm/mcporter@0.
|
|
32905
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/pkce-challenge/dist/index.node.js
|
|
32539
32906
|
var crypto;
|
|
32540
32907
|
crypto = globalThis.crypto?.webcrypto ?? // Node.js [18-16] REPL
|
|
32541
32908
|
globalThis.crypto ?? // Node.js >18
|
|
@@ -32578,665 +32945,162 @@ async function pkceChallenge(length) {
|
|
|
32578
32945
|
};
|
|
32579
32946
|
}
|
|
32580
32947
|
|
|
32581
|
-
// node_modules/.pnpm/mcporter@0.
|
|
32582
|
-
var
|
|
32583
|
-
|
|
32584
|
-
|
|
32948
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/public-CvV4ZHkX.mjs
|
|
32949
|
+
var OAuthClientFlowError = class extends Error {
|
|
32950
|
+
static {
|
|
32951
|
+
Object.defineProperty(this, "mcpBrand", { value: "mcp.OAuthClientFlowError" });
|
|
32952
|
+
}
|
|
32953
|
+
static [Symbol.hasInstance](value) {
|
|
32954
|
+
return brandedHasInstance(this, value);
|
|
32955
|
+
}
|
|
32956
|
+
/**
|
|
32957
|
+
* Brand-based type guard: equivalent to `value instanceof this`, as an
|
|
32958
|
+
* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads
|
|
32959
|
+
* the caller's own brand via `this`, so every branded subclass gets a
|
|
32960
|
+
* correctly-scoped guard by inheritance. Must be invoked on the class —
|
|
32961
|
+
* in callback position write `v => SdkError.isInstance(v)`, not
|
|
32962
|
+
* `.filter(SdkError.isInstance)` (detached calls throw rather than
|
|
32963
|
+
* silently matching nothing).
|
|
32964
|
+
*/
|
|
32965
|
+
static isInstance(value) {
|
|
32966
|
+
if (typeof this !== "function") throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");
|
|
32967
|
+
return brandedHasInstance(this, value);
|
|
32968
|
+
}
|
|
32969
|
+
constructor(message) {
|
|
32970
|
+
super(message);
|
|
32971
|
+
this.name = new.target.name;
|
|
32972
|
+
stampErrorBrands(this, new.target);
|
|
32585
32973
|
}
|
|
32586
32974
|
};
|
|
32587
|
-
var
|
|
32588
|
-
|
|
32589
|
-
|
|
32590
|
-
function noop(_arg) {
|
|
32591
|
-
}
|
|
32592
|
-
function createParser(config2) {
|
|
32593
|
-
if (typeof config2 == "function")
|
|
32594
|
-
throw new TypeError(
|
|
32595
|
-
"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?"
|
|
32596
|
-
);
|
|
32597
|
-
const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config2, pendingFragments = [];
|
|
32598
|
-
let pendingFragmentsLength = 0, isFirstChunk = true, id, data = "", dataLines = 0, eventType, terminated = false;
|
|
32599
|
-
function feed(chunk) {
|
|
32600
|
-
if (terminated)
|
|
32601
|
-
throw new Error(
|
|
32602
|
-
"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing."
|
|
32603
|
-
);
|
|
32604
|
-
if (isFirstChunk && (isFirstChunk = false, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
|
|
32605
|
-
const trailing2 = processLines(chunk);
|
|
32606
|
-
trailing2 !== "" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();
|
|
32607
|
-
return;
|
|
32608
|
-
}
|
|
32609
|
-
if (chunk.indexOf(`
|
|
32610
|
-
`) === -1 && chunk.indexOf("\r") === -1) {
|
|
32611
|
-
pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();
|
|
32612
|
-
return;
|
|
32613
|
-
}
|
|
32614
|
-
pendingFragments.push(chunk);
|
|
32615
|
-
const input2 = pendingFragments.join("");
|
|
32616
|
-
pendingFragments.length = 0, pendingFragmentsLength = 0;
|
|
32617
|
-
const trailing = processLines(input2);
|
|
32618
|
-
trailing !== "" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();
|
|
32975
|
+
var IssuerMismatchError = class extends OAuthClientFlowError {
|
|
32976
|
+
static {
|
|
32977
|
+
Object.defineProperty(this, "mcpBrand", { value: "mcp.IssuerMismatchError" });
|
|
32619
32978
|
}
|
|
32620
|
-
|
|
32621
|
-
|
|
32622
|
-
|
|
32623
|
-
|
|
32624
|
-
|
|
32625
|
-
|
|
32979
|
+
/** Which check failed — metadata echo (RFC 8414 §3.3) or authorization-response `iss` (RFC 9207). */
|
|
32980
|
+
kind;
|
|
32981
|
+
/** The issuer the client expected (from validated metadata / discovery input). */
|
|
32982
|
+
expected;
|
|
32983
|
+
/** The issuer value that was received. Attacker-controllable on the `'authorization_response'` path. */
|
|
32984
|
+
received;
|
|
32985
|
+
constructor(kind, expected, received) {
|
|
32986
|
+
super(`Issuer mismatch in ${kind === "metadata" ? "authorization server metadata (RFC 8414 \xA73.3)" : "authorization response (RFC 9207)"}: expected ${JSON.stringify(expected)}, received ${JSON.stringify(received)}`);
|
|
32987
|
+
this.kind = kind;
|
|
32988
|
+
this.expected = expected;
|
|
32989
|
+
this.received = received;
|
|
32626
32990
|
}
|
|
32627
|
-
|
|
32628
|
-
|
|
32629
|
-
|
|
32630
|
-
|
|
32631
|
-
`, searchIndex);
|
|
32632
|
-
for (; lfIndex !== -1; ) {
|
|
32633
|
-
if (searchIndex === lfIndex) {
|
|
32634
|
-
dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
|
|
32635
|
-
`, searchIndex);
|
|
32636
|
-
continue;
|
|
32637
|
-
}
|
|
32638
|
-
const firstCharCode = chunk.charCodeAt(searchIndex);
|
|
32639
|
-
if (isDataPrefix(chunk, searchIndex, firstCharCode)) {
|
|
32640
|
-
const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
|
|
32641
|
-
if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {
|
|
32642
|
-
onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
|
|
32643
|
-
`, searchIndex);
|
|
32644
|
-
continue;
|
|
32645
|
-
}
|
|
32646
|
-
data = dataLines === 0 ? value : `${data}
|
|
32647
|
-
${value}`, dataLines++;
|
|
32648
|
-
} else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
|
|
32649
|
-
chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,
|
|
32650
|
-
lfIndex
|
|
32651
|
-
) || void 0 : parseLine(chunk, searchIndex, lfIndex);
|
|
32652
|
-
searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
|
|
32653
|
-
`, searchIndex);
|
|
32654
|
-
}
|
|
32655
|
-
return chunk.slice(searchIndex);
|
|
32656
|
-
}
|
|
32657
|
-
for (; searchIndex < chunk.length; ) {
|
|
32658
|
-
const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
|
|
32659
|
-
`, searchIndex);
|
|
32660
|
-
let lineEnd = -1;
|
|
32661
|
-
if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
|
|
32662
|
-
break;
|
|
32663
|
-
parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;
|
|
32664
|
-
}
|
|
32665
|
-
return chunk.slice(searchIndex);
|
|
32991
|
+
};
|
|
32992
|
+
var RegistrationRejectedError = class extends OAuthClientFlowError {
|
|
32993
|
+
static {
|
|
32994
|
+
Object.defineProperty(this, "mcpBrand", { value: "mcp.RegistrationRejectedError" });
|
|
32666
32995
|
}
|
|
32667
|
-
|
|
32668
|
-
|
|
32669
|
-
|
|
32670
|
-
|
|
32671
|
-
|
|
32672
|
-
|
|
32673
|
-
|
|
32674
|
-
|
|
32675
|
-
|
|
32676
|
-
|
|
32677
|
-
|
|
32678
|
-
}
|
|
32679
|
-
if (isEventPrefix(chunk, start, firstCharCode)) {
|
|
32680
|
-
eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;
|
|
32681
|
-
return;
|
|
32682
|
-
}
|
|
32683
|
-
if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
|
|
32684
|
-
const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
|
|
32685
|
-
value2.includes("\0") || (id = value2);
|
|
32686
|
-
return;
|
|
32687
|
-
}
|
|
32688
|
-
if (firstCharCode === 58) {
|
|
32689
|
-
if (onComment) {
|
|
32690
|
-
const line2 = chunk.slice(start, end);
|
|
32691
|
-
onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));
|
|
32692
|
-
}
|
|
32693
|
-
return;
|
|
32694
|
-
}
|
|
32695
|
-
const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
|
|
32696
|
-
if (fieldSeparatorIndex === -1) {
|
|
32697
|
-
processField(line, "", line);
|
|
32698
|
-
return;
|
|
32699
|
-
}
|
|
32700
|
-
const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
|
|
32701
|
-
processField(field, value, line);
|
|
32996
|
+
/** HTTP status code returned by the registration endpoint. */
|
|
32997
|
+
status;
|
|
32998
|
+
/** Raw response body text (typically an RFC 7591 error JSON document). */
|
|
32999
|
+
body;
|
|
33000
|
+
/** The exact client metadata that was POSTed (after SDK defaults were applied). */
|
|
33001
|
+
submittedMetadata;
|
|
33002
|
+
constructor(args) {
|
|
33003
|
+
super(`Dynamic Client Registration rejected (HTTP ${args.status}): ${args.body}`);
|
|
33004
|
+
this.status = args.status;
|
|
33005
|
+
this.body = args.body;
|
|
33006
|
+
this.submittedMetadata = args.submittedMetadata;
|
|
32702
33007
|
}
|
|
32703
|
-
|
|
32704
|
-
|
|
32705
|
-
|
|
32706
|
-
|
|
32707
|
-
break;
|
|
32708
|
-
case "data":
|
|
32709
|
-
data = dataLines === 0 ? value : `${data}
|
|
32710
|
-
${value}`, dataLines++;
|
|
32711
|
-
break;
|
|
32712
|
-
case "id":
|
|
32713
|
-
value.includes("\0") || (id = value);
|
|
32714
|
-
break;
|
|
32715
|
-
case "retry":
|
|
32716
|
-
/^\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(
|
|
32717
|
-
new ParseError(`Invalid \`retry\` value: "${value}"`, {
|
|
32718
|
-
type: "invalid-retry",
|
|
32719
|
-
value,
|
|
32720
|
-
line
|
|
32721
|
-
})
|
|
32722
|
-
);
|
|
32723
|
-
break;
|
|
32724
|
-
default:
|
|
32725
|
-
onError(
|
|
32726
|
-
new ParseError(
|
|
32727
|
-
`Unknown field "${field.length > 20 ? `${field.slice(0, 20)}\u2026` : field}"`,
|
|
32728
|
-
{ type: "unknown-field", field, value, line }
|
|
32729
|
-
)
|
|
32730
|
-
);
|
|
32731
|
-
break;
|
|
32732
|
-
}
|
|
33008
|
+
};
|
|
33009
|
+
var InsecureTokenEndpointError = class extends OAuthClientFlowError {
|
|
33010
|
+
static {
|
|
33011
|
+
Object.defineProperty(this, "mcpBrand", { value: "mcp.InsecureTokenEndpointError" });
|
|
32733
33012
|
}
|
|
32734
|
-
|
|
32735
|
-
|
|
32736
|
-
|
|
32737
|
-
|
|
32738
|
-
|
|
32739
|
-
}), id = void 0, data = "", dataLines = 0, eventType = void 0;
|
|
33013
|
+
/** The token endpoint URL that was rejected. */
|
|
33014
|
+
tokenEndpoint;
|
|
33015
|
+
constructor(tokenEndpoint) {
|
|
33016
|
+
super(`Refusing to send credentials to non-https token endpoint '${tokenEndpoint}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`);
|
|
33017
|
+
this.tokenEndpoint = tokenEndpoint;
|
|
32740
33018
|
}
|
|
32741
|
-
|
|
32742
|
-
|
|
32743
|
-
|
|
32744
|
-
|
|
32745
|
-
}
|
|
32746
|
-
isFirstChunk = true, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = false;
|
|
33019
|
+
};
|
|
33020
|
+
var AuthorizationServerMismatchError = class extends OAuthClientFlowError {
|
|
33021
|
+
static {
|
|
33022
|
+
Object.defineProperty(this, "mcpBrand", { value: "mcp.AuthorizationServerMismatchError" });
|
|
32747
33023
|
}
|
|
32748
|
-
|
|
32749
|
-
}
|
|
32750
|
-
|
|
32751
|
-
|
|
32752
|
-
}
|
|
32753
|
-
function isEventPrefix(chunk, i, firstCharCode) {
|
|
32754
|
-
return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
|
|
32755
|
-
}
|
|
32756
|
-
|
|
32757
|
-
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/node_modules/eventsource/dist/index.js
|
|
32758
|
-
var ErrorEvent = class extends Event {
|
|
32759
|
-
/**
|
|
32760
|
-
* Constructs a new `ErrorEvent` instance. This is typically not called directly,
|
|
32761
|
-
* but rather emitted by the `EventSource` object when an error occurs.
|
|
32762
|
-
*
|
|
32763
|
-
* @param type - The type of the event (should be "error")
|
|
32764
|
-
* @param errorEventInitDict - Optional properties to include in the error event
|
|
32765
|
-
*/
|
|
32766
|
-
constructor(type, errorEventInitDict) {
|
|
32767
|
-
var _a3, _b;
|
|
32768
|
-
super(type), this.code = (_a3 = errorEventInitDict == null ? void 0 : errorEventInitDict.code) != null ? _a3 : void 0, this.message = (_b = errorEventInitDict == null ? void 0 : errorEventInitDict.message) != null ? _b : void 0;
|
|
33024
|
+
constructor(recordedIssuer, currentIssuer) {
|
|
33025
|
+
super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(recordedIssuer)} but this call resolved ${JSON.stringify(currentIssuer)}; refusing to present them to a different authorization server`);
|
|
33026
|
+
this.recordedIssuer = recordedIssuer;
|
|
33027
|
+
this.currentIssuer = currentIssuer;
|
|
32769
33028
|
}
|
|
32770
|
-
|
|
32771
|
-
|
|
32772
|
-
|
|
32773
|
-
|
|
32774
|
-
*
|
|
32775
|
-
* This is automatically called by Node.js when you `console.log` an instance of this class.
|
|
32776
|
-
*
|
|
32777
|
-
* @param _depth - The current depth
|
|
32778
|
-
* @param options - The options passed to `util.inspect`
|
|
32779
|
-
* @param inspect - The inspect function to use (prevents having to import it from `util`)
|
|
32780
|
-
* @returns A string representation of the error
|
|
32781
|
-
*/
|
|
32782
|
-
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")](_depth, options, inspect) {
|
|
32783
|
-
return inspect(inspectableError(this), options);
|
|
33029
|
+
};
|
|
33030
|
+
var InsufficientScopeError = class extends OAuthClientFlowError {
|
|
33031
|
+
static {
|
|
33032
|
+
Object.defineProperty(this, "mcpBrand", { value: "mcp.InsufficientScopeError" });
|
|
32784
33033
|
}
|
|
32785
|
-
/**
|
|
32786
|
-
|
|
32787
|
-
|
|
32788
|
-
|
|
32789
|
-
|
|
32790
|
-
|
|
32791
|
-
|
|
32792
|
-
|
|
32793
|
-
|
|
32794
|
-
|
|
32795
|
-
|
|
32796
|
-
[/* @__PURE__ */ Symbol.for("Deno.customInspect")](inspect, options) {
|
|
32797
|
-
return inspect(inspectableError(this), options);
|
|
33034
|
+
/** The `scope` value from the `WWW-Authenticate` challenge — the scopes the resource server says are required. */
|
|
33035
|
+
requiredScope;
|
|
33036
|
+
/** The `resource_metadata` URL from the `WWW-Authenticate` challenge, if present. */
|
|
33037
|
+
resourceMetadataUrl;
|
|
33038
|
+
/** The `error_description` from the `WWW-Authenticate` challenge, if present. */
|
|
33039
|
+
errorDescription;
|
|
33040
|
+
constructor(init) {
|
|
33041
|
+
super(`Insufficient scope${init.requiredScope ? `: required "${init.requiredScope}"` : ""}`);
|
|
33042
|
+
this.requiredScope = init.requiredScope;
|
|
33043
|
+
this.resourceMetadataUrl = init.resourceMetadataUrl;
|
|
33044
|
+
this.errorDescription = init.errorDescription;
|
|
32798
33045
|
}
|
|
32799
33046
|
};
|
|
32800
|
-
function
|
|
32801
|
-
|
|
32802
|
-
|
|
33047
|
+
function discardIfIssuerMismatch(stored, issuer, opts) {
|
|
33048
|
+
if (!stored) return void 0;
|
|
33049
|
+
if (typeof stored.issuer !== "string") {
|
|
33050
|
+
if (opts?.canPersistStamp !== false) console.warn("[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.");
|
|
33051
|
+
return stored.issuer === void 0 ? stored : {
|
|
33052
|
+
...stored,
|
|
33053
|
+
issuer: void 0
|
|
33054
|
+
};
|
|
33055
|
+
}
|
|
33056
|
+
return issuersMatch(stored.issuer, issuer) ? stored : void 0;
|
|
32803
33057
|
}
|
|
32804
|
-
function
|
|
32805
|
-
return
|
|
33058
|
+
function issuersMatch(a, b) {
|
|
33059
|
+
return a === b || a.endsWith("/") && a.slice(0, -1) === b || b.endsWith("/") && b.slice(0, -1) === a;
|
|
32806
33060
|
}
|
|
32807
|
-
function
|
|
33061
|
+
function isOAuthClientProvider(provider) {
|
|
33062
|
+
if (provider == null) return false;
|
|
33063
|
+
const p = provider;
|
|
33064
|
+
return typeof p.tokens === "function" && typeof p.clientInformation === "function";
|
|
33065
|
+
}
|
|
33066
|
+
async function handleOAuthUnauthorized(provider, ctx, extraAuthOptions, options) {
|
|
33067
|
+
const { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(ctx.response);
|
|
33068
|
+
if (await auth(provider, {
|
|
33069
|
+
serverUrl: ctx.serverUrl,
|
|
33070
|
+
resourceMetadataUrl,
|
|
33071
|
+
scope,
|
|
33072
|
+
fetchFn: options?.fetchFn ?? ctx.fetchFn,
|
|
33073
|
+
...extraAuthOptions
|
|
33074
|
+
}) !== "AUTHORIZED") throw new UnauthorizedError();
|
|
33075
|
+
}
|
|
33076
|
+
function adaptOAuthProvider(provider, extraAuthOptions) {
|
|
33077
|
+
const tokensByAccessToken = /* @__PURE__ */ new Map();
|
|
32808
33078
|
return {
|
|
32809
|
-
|
|
32810
|
-
|
|
32811
|
-
|
|
32812
|
-
|
|
32813
|
-
|
|
32814
|
-
|
|
32815
|
-
|
|
32816
|
-
}
|
|
32817
|
-
|
|
32818
|
-
|
|
32819
|
-
|
|
32820
|
-
|
|
32821
|
-
|
|
32822
|
-
|
|
32823
|
-
|
|
32824
|
-
|
|
32825
|
-
|
|
32826
|
-
|
|
32827
|
-
|
|
32828
|
-
|
|
32829
|
-
|
|
32830
|
-
|
|
32831
|
-
|
|
32832
|
-
|
|
32833
|
-
|
|
32834
|
-
var _parser;
|
|
32835
|
-
var _onError;
|
|
32836
|
-
var _onMessage;
|
|
32837
|
-
var _onOpen;
|
|
32838
|
-
var _EventSource_instances;
|
|
32839
|
-
var connect_fn;
|
|
32840
|
-
var _onFetchResponse;
|
|
32841
|
-
var _onFetchError;
|
|
32842
|
-
var getRequestOptions_fn;
|
|
32843
|
-
var _onEvent;
|
|
32844
|
-
var _onRetryChange;
|
|
32845
|
-
var failConnection_fn;
|
|
32846
|
-
var scheduleReconnect_fn;
|
|
32847
|
-
var _reconnect;
|
|
32848
|
-
var EventSource = class extends EventTarget {
|
|
32849
|
-
constructor(url2, eventSourceInitDict) {
|
|
32850
|
-
var _a3, _b;
|
|
32851
|
-
super(), __privateAdd(this, _EventSource_instances), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, __privateAdd(this, _readyState), __privateAdd(this, _url2), __privateAdd(this, _redirectUrl), __privateAdd(this, _withCredentials), __privateAdd(this, _fetch), __privateAdd(this, _reconnectInterval), __privateAdd(this, _reconnectTimer), __privateAdd(this, _lastEventId, null), __privateAdd(this, _controller), __privateAdd(this, _parser), __privateAdd(this, _onError, null), __privateAdd(this, _onMessage, null), __privateAdd(this, _onOpen, null), __privateAdd(this, _onFetchResponse, async (response) => {
|
|
32852
|
-
var _a22;
|
|
32853
|
-
__privateGet(this, _parser).reset();
|
|
32854
|
-
const { body, redirected, status, headers } = response;
|
|
32855
|
-
if (status === 204) {
|
|
32856
|
-
__privateMethod(this, _EventSource_instances, failConnection_fn).call(this, "Server sent HTTP 204, not reconnecting", 204), this.close();
|
|
32857
|
-
return;
|
|
32858
|
-
}
|
|
32859
|
-
if (redirected ? __privateSet(this, _redirectUrl, new URL(response.url)) : __privateSet(this, _redirectUrl, void 0), status !== 200) {
|
|
32860
|
-
__privateMethod(this, _EventSource_instances, failConnection_fn).call(this, `Non-200 status code (${status})`, status);
|
|
32861
|
-
return;
|
|
32862
|
-
}
|
|
32863
|
-
if (!(headers.get("content-type") || "").startsWith("text/event-stream")) {
|
|
32864
|
-
__privateMethod(this, _EventSource_instances, failConnection_fn).call(this, 'Invalid content type, expected "text/event-stream"', status);
|
|
32865
|
-
return;
|
|
32866
|
-
}
|
|
32867
|
-
if (__privateGet(this, _readyState) === this.CLOSED)
|
|
32868
|
-
return;
|
|
32869
|
-
__privateSet(this, _readyState, this.OPEN);
|
|
32870
|
-
const openEvent = new Event("open");
|
|
32871
|
-
if ((_a22 = __privateGet(this, _onOpen)) == null || _a22.call(this, openEvent), this.dispatchEvent(openEvent), typeof body != "object" || !body || !("getReader" in body)) {
|
|
32872
|
-
__privateMethod(this, _EventSource_instances, failConnection_fn).call(this, "Invalid response body, expected a web ReadableStream", status), this.close();
|
|
32873
|
-
return;
|
|
32874
|
-
}
|
|
32875
|
-
const decoder = new TextDecoder(), reader = body.getReader();
|
|
32876
|
-
let open2 = true;
|
|
32877
|
-
do {
|
|
32878
|
-
const { done, value } = await reader.read();
|
|
32879
|
-
value && __privateGet(this, _parser).feed(decoder.decode(value, { stream: !done })), done && (open2 = false, __privateGet(this, _parser).reset(), __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this));
|
|
32880
|
-
} while (open2);
|
|
32881
|
-
}), __privateAdd(this, _onFetchError, (err) => {
|
|
32882
|
-
__privateSet(this, _controller, void 0), !(err.name === "AbortError" || err.type === "aborted") && __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this, flattenError2(err));
|
|
32883
|
-
}), __privateAdd(this, _onEvent, (event) => {
|
|
32884
|
-
typeof event.id == "string" && __privateSet(this, _lastEventId, event.id);
|
|
32885
|
-
const messageEvent = new MessageEvent(event.event || "message", {
|
|
32886
|
-
data: event.data,
|
|
32887
|
-
origin: __privateGet(this, _redirectUrl) ? __privateGet(this, _redirectUrl).origin : __privateGet(this, _url2).origin,
|
|
32888
|
-
lastEventId: event.id || ""
|
|
32889
|
-
});
|
|
32890
|
-
__privateGet(this, _onMessage) && (!event.event || event.event === "message") && __privateGet(this, _onMessage).call(this, messageEvent), this.dispatchEvent(messageEvent);
|
|
32891
|
-
}), __privateAdd(this, _onRetryChange, (value) => {
|
|
32892
|
-
__privateSet(this, _reconnectInterval, value);
|
|
32893
|
-
}), __privateAdd(this, _reconnect, () => {
|
|
32894
|
-
__privateSet(this, _reconnectTimer, void 0), __privateGet(this, _readyState) === this.CONNECTING && __privateMethod(this, _EventSource_instances, connect_fn).call(this);
|
|
32895
|
-
});
|
|
32896
|
-
try {
|
|
32897
|
-
if (url2 instanceof URL)
|
|
32898
|
-
__privateSet(this, _url2, url2);
|
|
32899
|
-
else if (typeof url2 == "string")
|
|
32900
|
-
__privateSet(this, _url2, new URL(url2, getBaseURL()));
|
|
32901
|
-
else
|
|
32902
|
-
throw new Error("Invalid URL");
|
|
32903
|
-
} catch {
|
|
32904
|
-
throw syntaxError("An invalid or illegal string was specified");
|
|
32905
|
-
}
|
|
32906
|
-
__privateSet(this, _parser, createParser({
|
|
32907
|
-
onEvent: __privateGet(this, _onEvent),
|
|
32908
|
-
onRetry: __privateGet(this, _onRetryChange)
|
|
32909
|
-
})), __privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _reconnectInterval, 3e3), __privateSet(this, _fetch, (_a3 = eventSourceInitDict == null ? void 0 : eventSourceInitDict.fetch) != null ? _a3 : globalThis.fetch), __privateSet(this, _withCredentials, (_b = eventSourceInitDict == null ? void 0 : eventSourceInitDict.withCredentials) != null ? _b : false), __privateMethod(this, _EventSource_instances, connect_fn).call(this);
|
|
32910
|
-
}
|
|
32911
|
-
/**
|
|
32912
|
-
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
32913
|
-
*
|
|
32914
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
32915
|
-
*
|
|
32916
|
-
* Note: typed as `number` instead of `0 | 1 | 2` for compatibility with the `EventSource` interface,
|
|
32917
|
-
* defined in the TypeScript `dom` library.
|
|
32918
|
-
*
|
|
32919
|
-
* @public
|
|
32920
|
-
*/
|
|
32921
|
-
get readyState() {
|
|
32922
|
-
return __privateGet(this, _readyState);
|
|
32923
|
-
}
|
|
32924
|
-
/**
|
|
32925
|
-
* Returns the URL providing the event stream.
|
|
32926
|
-
*
|
|
32927
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
32928
|
-
*
|
|
32929
|
-
* @public
|
|
32930
|
-
*/
|
|
32931
|
-
get url() {
|
|
32932
|
-
return __privateGet(this, _url2).href;
|
|
32933
|
-
}
|
|
32934
|
-
/**
|
|
32935
|
-
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
32936
|
-
*
|
|
32937
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
32938
|
-
*/
|
|
32939
|
-
get withCredentials() {
|
|
32940
|
-
return __privateGet(this, _withCredentials);
|
|
32941
|
-
}
|
|
32942
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
32943
|
-
get onerror() {
|
|
32944
|
-
return __privateGet(this, _onError);
|
|
32945
|
-
}
|
|
32946
|
-
set onerror(value) {
|
|
32947
|
-
__privateSet(this, _onError, value);
|
|
32948
|
-
}
|
|
32949
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
32950
|
-
get onmessage() {
|
|
32951
|
-
return __privateGet(this, _onMessage);
|
|
32952
|
-
}
|
|
32953
|
-
set onmessage(value) {
|
|
32954
|
-
__privateSet(this, _onMessage, value);
|
|
32955
|
-
}
|
|
32956
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
32957
|
-
get onopen() {
|
|
32958
|
-
return __privateGet(this, _onOpen);
|
|
32959
|
-
}
|
|
32960
|
-
set onopen(value) {
|
|
32961
|
-
__privateSet(this, _onOpen, value);
|
|
32962
|
-
}
|
|
32963
|
-
addEventListener(type, listener, options) {
|
|
32964
|
-
const listen = listener;
|
|
32965
|
-
super.addEventListener(type, listen, options);
|
|
32966
|
-
}
|
|
32967
|
-
removeEventListener(type, listener, options) {
|
|
32968
|
-
const listen = listener;
|
|
32969
|
-
super.removeEventListener(type, listen, options);
|
|
32970
|
-
}
|
|
32971
|
-
/**
|
|
32972
|
-
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
32973
|
-
*
|
|
32974
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
32975
|
-
*
|
|
32976
|
-
* @public
|
|
32977
|
-
*/
|
|
32978
|
-
close() {
|
|
32979
|
-
__privateGet(this, _reconnectTimer) && clearTimeout(__privateGet(this, _reconnectTimer)), __privateGet(this, _readyState) !== this.CLOSED && (__privateGet(this, _controller) && __privateGet(this, _controller).abort(), __privateSet(this, _readyState, this.CLOSED), __privateSet(this, _controller, void 0));
|
|
32980
|
-
}
|
|
32981
|
-
};
|
|
32982
|
-
_readyState = /* @__PURE__ */ new WeakMap(), _url2 = /* @__PURE__ */ new WeakMap(), _redirectUrl = /* @__PURE__ */ new WeakMap(), _withCredentials = /* @__PURE__ */ new WeakMap(), _fetch = /* @__PURE__ */ new WeakMap(), _reconnectInterval = /* @__PURE__ */ new WeakMap(), _reconnectTimer = /* @__PURE__ */ new WeakMap(), _lastEventId = /* @__PURE__ */ new WeakMap(), _controller = /* @__PURE__ */ new WeakMap(), _parser = /* @__PURE__ */ new WeakMap(), _onError = /* @__PURE__ */ new WeakMap(), _onMessage = /* @__PURE__ */ new WeakMap(), _onOpen = /* @__PURE__ */ new WeakMap(), _EventSource_instances = /* @__PURE__ */ new WeakSet(), /**
|
|
32983
|
-
* Connect to the given URL and start receiving events
|
|
32984
|
-
*
|
|
32985
|
-
* @internal
|
|
32986
|
-
*/
|
|
32987
|
-
connect_fn = function() {
|
|
32988
|
-
__privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _controller, new AbortController()), __privateGet(this, _fetch)(__privateGet(this, _url2), __privateMethod(this, _EventSource_instances, getRequestOptions_fn).call(this)).then(__privateGet(this, _onFetchResponse)).catch(__privateGet(this, _onFetchError));
|
|
32989
|
-
}, _onFetchResponse = /* @__PURE__ */ new WeakMap(), _onFetchError = /* @__PURE__ */ new WeakMap(), /**
|
|
32990
|
-
* Get request options for the `fetch()` request
|
|
32991
|
-
*
|
|
32992
|
-
* @returns The request options
|
|
32993
|
-
* @internal
|
|
32994
|
-
*/
|
|
32995
|
-
getRequestOptions_fn = function() {
|
|
32996
|
-
var _a3;
|
|
32997
|
-
const init = {
|
|
32998
|
-
// [spec] Let `corsAttributeState` be `Anonymous`…
|
|
32999
|
-
// [spec] …will have their mode set to "cors"…
|
|
33000
|
-
mode: "cors",
|
|
33001
|
-
redirect: "follow",
|
|
33002
|
-
headers: { Accept: "text/event-stream", ...__privateGet(this, _lastEventId) ? { "Last-Event-ID": __privateGet(this, _lastEventId) } : void 0 },
|
|
33003
|
-
cache: "no-store",
|
|
33004
|
-
signal: (_a3 = __privateGet(this, _controller)) == null ? void 0 : _a3.signal
|
|
33005
|
-
};
|
|
33006
|
-
return "window" in globalThis && (init.credentials = this.withCredentials ? "include" : "same-origin"), init;
|
|
33007
|
-
}, _onEvent = /* @__PURE__ */ new WeakMap(), _onRetryChange = /* @__PURE__ */ new WeakMap(), /**
|
|
33008
|
-
* Handles the process referred to in the EventSource specification as "failing a connection".
|
|
33009
|
-
*
|
|
33010
|
-
* @param error - The error causing the connection to fail
|
|
33011
|
-
* @param code - The HTTP status code, if available
|
|
33012
|
-
* @internal
|
|
33013
|
-
*/
|
|
33014
|
-
failConnection_fn = function(message, code) {
|
|
33015
|
-
var _a3;
|
|
33016
|
-
__privateGet(this, _readyState) !== this.CLOSED && __privateSet(this, _readyState, this.CLOSED);
|
|
33017
|
-
const errorEvent = new ErrorEvent("error", { code, message });
|
|
33018
|
-
(_a3 = __privateGet(this, _onError)) == null || _a3.call(this, errorEvent), this.dispatchEvent(errorEvent);
|
|
33019
|
-
}, /**
|
|
33020
|
-
* Schedules a reconnection attempt against the EventSource endpoint.
|
|
33021
|
-
*
|
|
33022
|
-
* @param message - The error causing the connection to fail
|
|
33023
|
-
* @param code - The HTTP status code, if available
|
|
33024
|
-
* @internal
|
|
33025
|
-
*/
|
|
33026
|
-
scheduleReconnect_fn = function(message, code) {
|
|
33027
|
-
var _a3;
|
|
33028
|
-
if (__privateGet(this, _readyState) === this.CLOSED)
|
|
33029
|
-
return;
|
|
33030
|
-
__privateSet(this, _readyState, this.CONNECTING);
|
|
33031
|
-
const errorEvent = new ErrorEvent("error", { code, message });
|
|
33032
|
-
(_a3 = __privateGet(this, _onError)) == null || _a3.call(this, errorEvent), this.dispatchEvent(errorEvent), __privateSet(this, _reconnectTimer, setTimeout(__privateGet(this, _reconnect), __privateGet(this, _reconnectInterval)));
|
|
33033
|
-
}, _reconnect = /* @__PURE__ */ new WeakMap(), /**
|
|
33034
|
-
* ReadyState representing an EventSource currently trying to connect
|
|
33035
|
-
*
|
|
33036
|
-
* @public
|
|
33037
|
-
*/
|
|
33038
|
-
EventSource.CONNECTING = 0, /**
|
|
33039
|
-
* ReadyState representing an EventSource connection that is open (eg connected)
|
|
33040
|
-
*
|
|
33041
|
-
* @public
|
|
33042
|
-
*/
|
|
33043
|
-
EventSource.OPEN = 1, /**
|
|
33044
|
-
* ReadyState representing an EventSource connection that is closed (eg disconnected)
|
|
33045
|
-
*
|
|
33046
|
-
* @public
|
|
33047
|
-
*/
|
|
33048
|
-
EventSource.CLOSED = 2;
|
|
33049
|
-
function getBaseURL() {
|
|
33050
|
-
const doc = "document" in globalThis ? globalThis.document : void 0;
|
|
33051
|
-
return doc && typeof doc == "object" && "baseURI" in doc && typeof doc.baseURI == "string" ? doc.baseURI : void 0;
|
|
33052
|
-
}
|
|
33053
|
-
|
|
33054
|
-
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/node_modules/eventsource-parser/dist/stream.js
|
|
33055
|
-
var EventSourceParserStream = class extends TransformStream {
|
|
33056
|
-
constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
|
|
33057
|
-
let parser;
|
|
33058
|
-
super({
|
|
33059
|
-
start(controller) {
|
|
33060
|
-
parser = createParser({
|
|
33061
|
-
onEvent: (event) => {
|
|
33062
|
-
controller.enqueue(event);
|
|
33063
|
-
},
|
|
33064
|
-
onError(error62) {
|
|
33065
|
-
typeof onError == "function" && onError(error62), (onError === "terminate" || error62.type === "max-buffer-size-exceeded") && controller.error(error62);
|
|
33066
|
-
},
|
|
33067
|
-
onRetry,
|
|
33068
|
-
onComment,
|
|
33069
|
-
maxBufferSize
|
|
33070
|
-
});
|
|
33071
|
-
},
|
|
33072
|
-
transform(chunk) {
|
|
33073
|
-
parser.feed(chunk);
|
|
33074
|
-
}
|
|
33075
|
-
});
|
|
33076
|
-
}
|
|
33077
|
-
};
|
|
33078
|
-
|
|
33079
|
-
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/index.mjs
|
|
33080
|
-
var OAuthClientFlowError = class extends Error {
|
|
33081
|
-
static {
|
|
33082
|
-
Object.defineProperty(this, "mcpBrand", { value: "mcp.OAuthClientFlowError" });
|
|
33083
|
-
}
|
|
33084
|
-
static [Symbol.hasInstance](value) {
|
|
33085
|
-
return brandedHasInstance(this, value);
|
|
33086
|
-
}
|
|
33087
|
-
/**
|
|
33088
|
-
* Brand-based type guard: equivalent to `value instanceof this`, as an
|
|
33089
|
-
* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads
|
|
33090
|
-
* the caller's own brand via `this`, so every branded subclass gets a
|
|
33091
|
-
* correctly-scoped guard by inheritance. Must be invoked on the class —
|
|
33092
|
-
* in callback position write `v => SdkError.isInstance(v)`, not
|
|
33093
|
-
* `.filter(SdkError.isInstance)` (detached calls throw rather than
|
|
33094
|
-
* silently matching nothing).
|
|
33095
|
-
*/
|
|
33096
|
-
static isInstance(value) {
|
|
33097
|
-
if (typeof this !== "function") throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");
|
|
33098
|
-
return brandedHasInstance(this, value);
|
|
33099
|
-
}
|
|
33100
|
-
constructor(message) {
|
|
33101
|
-
super(message);
|
|
33102
|
-
this.name = new.target.name;
|
|
33103
|
-
stampErrorBrands(this, new.target);
|
|
33104
|
-
}
|
|
33105
|
-
};
|
|
33106
|
-
var IssuerMismatchError = class extends OAuthClientFlowError {
|
|
33107
|
-
static {
|
|
33108
|
-
Object.defineProperty(this, "mcpBrand", { value: "mcp.IssuerMismatchError" });
|
|
33109
|
-
}
|
|
33110
|
-
/** Which check failed — metadata echo (RFC 8414 §3.3) or authorization-response `iss` (RFC 9207). */
|
|
33111
|
-
kind;
|
|
33112
|
-
/** The issuer the client expected (from validated metadata / discovery input). */
|
|
33113
|
-
expected;
|
|
33114
|
-
/** The issuer value that was received. Attacker-controllable on the `'authorization_response'` path. */
|
|
33115
|
-
received;
|
|
33116
|
-
constructor(kind, expected, received) {
|
|
33117
|
-
super(`Issuer mismatch in ${kind === "metadata" ? "authorization server metadata (RFC 8414 \xA73.3)" : "authorization response (RFC 9207)"}: expected ${JSON.stringify(expected)}, received ${JSON.stringify(received)}`);
|
|
33118
|
-
this.kind = kind;
|
|
33119
|
-
this.expected = expected;
|
|
33120
|
-
this.received = received;
|
|
33121
|
-
}
|
|
33122
|
-
};
|
|
33123
|
-
var RegistrationRejectedError = class extends OAuthClientFlowError {
|
|
33124
|
-
static {
|
|
33125
|
-
Object.defineProperty(this, "mcpBrand", { value: "mcp.RegistrationRejectedError" });
|
|
33126
|
-
}
|
|
33127
|
-
/** HTTP status code returned by the registration endpoint. */
|
|
33128
|
-
status;
|
|
33129
|
-
/** Raw response body text (typically an RFC 7591 error JSON document). */
|
|
33130
|
-
body;
|
|
33131
|
-
/** The exact client metadata that was POSTed (after SDK defaults were applied). */
|
|
33132
|
-
submittedMetadata;
|
|
33133
|
-
constructor(args) {
|
|
33134
|
-
super(`Dynamic Client Registration rejected (HTTP ${args.status}): ${args.body}`);
|
|
33135
|
-
this.status = args.status;
|
|
33136
|
-
this.body = args.body;
|
|
33137
|
-
this.submittedMetadata = args.submittedMetadata;
|
|
33138
|
-
}
|
|
33139
|
-
};
|
|
33140
|
-
var InsecureTokenEndpointError = class extends OAuthClientFlowError {
|
|
33141
|
-
static {
|
|
33142
|
-
Object.defineProperty(this, "mcpBrand", { value: "mcp.InsecureTokenEndpointError" });
|
|
33143
|
-
}
|
|
33144
|
-
/** The token endpoint URL that was rejected. */
|
|
33145
|
-
tokenEndpoint;
|
|
33146
|
-
constructor(tokenEndpoint) {
|
|
33147
|
-
super(`Refusing to send credentials to non-https token endpoint '${tokenEndpoint}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`);
|
|
33148
|
-
this.tokenEndpoint = tokenEndpoint;
|
|
33149
|
-
}
|
|
33150
|
-
};
|
|
33151
|
-
var AuthorizationServerMismatchError = class extends OAuthClientFlowError {
|
|
33152
|
-
static {
|
|
33153
|
-
Object.defineProperty(this, "mcpBrand", { value: "mcp.AuthorizationServerMismatchError" });
|
|
33154
|
-
}
|
|
33155
|
-
constructor(recordedIssuer, currentIssuer) {
|
|
33156
|
-
super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(recordedIssuer)} but this call resolved ${JSON.stringify(currentIssuer)}; refusing to present them to a different authorization server`);
|
|
33157
|
-
this.recordedIssuer = recordedIssuer;
|
|
33158
|
-
this.currentIssuer = currentIssuer;
|
|
33159
|
-
}
|
|
33160
|
-
};
|
|
33161
|
-
var InsufficientScopeError = class extends OAuthClientFlowError {
|
|
33162
|
-
static {
|
|
33163
|
-
Object.defineProperty(this, "mcpBrand", { value: "mcp.InsufficientScopeError" });
|
|
33164
|
-
}
|
|
33165
|
-
/** The `scope` value from the `WWW-Authenticate` challenge — the scopes the resource server says are required. */
|
|
33166
|
-
requiredScope;
|
|
33167
|
-
/** The `resource_metadata` URL from the `WWW-Authenticate` challenge, if present. */
|
|
33168
|
-
resourceMetadataUrl;
|
|
33169
|
-
/** The `error_description` from the `WWW-Authenticate` challenge, if present. */
|
|
33170
|
-
errorDescription;
|
|
33171
|
-
constructor(init) {
|
|
33172
|
-
super(`Insufficient scope${init.requiredScope ? `: required "${init.requiredScope}"` : ""}`);
|
|
33173
|
-
this.requiredScope = init.requiredScope;
|
|
33174
|
-
this.resourceMetadataUrl = init.resourceMetadataUrl;
|
|
33175
|
-
this.errorDescription = init.errorDescription;
|
|
33176
|
-
}
|
|
33177
|
-
};
|
|
33178
|
-
function discardIfIssuerMismatch(stored, issuer, opts) {
|
|
33179
|
-
if (!stored) return void 0;
|
|
33180
|
-
if (typeof stored.issuer !== "string") {
|
|
33181
|
-
if (opts?.canPersistStamp !== false) console.warn("[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.");
|
|
33182
|
-
return stored.issuer === void 0 ? stored : {
|
|
33183
|
-
...stored,
|
|
33184
|
-
issuer: void 0
|
|
33185
|
-
};
|
|
33186
|
-
}
|
|
33187
|
-
return issuersMatch(stored.issuer, issuer) ? stored : void 0;
|
|
33188
|
-
}
|
|
33189
|
-
function issuersMatch(a, b) {
|
|
33190
|
-
return a === b || a.endsWith("/") && a.slice(0, -1) === b || b.endsWith("/") && b.slice(0, -1) === a;
|
|
33191
|
-
}
|
|
33192
|
-
function isOAuthClientProvider(provider) {
|
|
33193
|
-
if (provider == null) return false;
|
|
33194
|
-
const p = provider;
|
|
33195
|
-
return typeof p.tokens === "function" && typeof p.clientInformation === "function";
|
|
33196
|
-
}
|
|
33197
|
-
async function handleOAuthUnauthorized(provider, ctx, extraAuthOptions, options) {
|
|
33198
|
-
const { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(ctx.response);
|
|
33199
|
-
if (await auth(provider, {
|
|
33200
|
-
serverUrl: ctx.serverUrl,
|
|
33201
|
-
resourceMetadataUrl,
|
|
33202
|
-
scope,
|
|
33203
|
-
fetchFn: options?.fetchFn ?? ctx.fetchFn,
|
|
33204
|
-
...extraAuthOptions
|
|
33205
|
-
}) !== "AUTHORIZED") throw new UnauthorizedError();
|
|
33206
|
-
}
|
|
33207
|
-
function presentedBearerToken(headers) {
|
|
33208
|
-
const authorization = headers.get("authorization");
|
|
33209
|
-
const match = authorization?.match(/^Bearer\s+(.+)$/i);
|
|
33210
|
-
return match?.[1];
|
|
33211
|
-
}
|
|
33212
|
-
function adaptOAuthProvider(provider, extraAuthOptions) {
|
|
33213
|
-
const tokensByAccessToken = /* @__PURE__ */ new Map();
|
|
33214
|
-
return {
|
|
33215
|
-
token: async () => {
|
|
33216
|
-
const tokens = await provider.tokens();
|
|
33217
|
-
if (tokens?.access_token) {
|
|
33218
|
-
if (!tokensByAccessToken.has(tokens.access_token) && tokensByAccessToken.size >= 8) {
|
|
33219
|
-
tokensByAccessToken.delete(tokensByAccessToken.keys().next().value);
|
|
33220
|
-
}
|
|
33221
|
-
tokensByAccessToken.set(tokens.access_token, tokens);
|
|
33222
|
-
}
|
|
33223
|
-
return tokens?.access_token;
|
|
33224
|
-
},
|
|
33225
|
-
onUnauthorized: async (ctx) => {
|
|
33226
|
-
const presentedTokens = ctx.presentedToken ? tokensByAccessToken.get(ctx.presentedToken) : void 0;
|
|
33227
|
-
if (ctx.presentedToken) tokensByAccessToken.delete(ctx.presentedToken);
|
|
33228
|
-
const continueDefault = async (options) => handleOAuthUnauthorized(provider, ctx, extraAuthOptions, options);
|
|
33229
|
-
if (provider.onOAuthUnauthorized) {
|
|
33230
|
-
await provider.onOAuthUnauthorized({
|
|
33231
|
-
response: ctx.response,
|
|
33232
|
-
serverUrl: ctx.serverUrl,
|
|
33233
|
-
fetchFn: ctx.fetchFn,
|
|
33234
|
-
presentedTokens
|
|
33235
|
-
}, continueDefault);
|
|
33236
|
-
return;
|
|
33237
|
-
}
|
|
33238
|
-
await continueDefault();
|
|
33239
|
-
}
|
|
33079
|
+
token: async () => {
|
|
33080
|
+
const tokens = await provider.tokens();
|
|
33081
|
+
if (tokens?.access_token) {
|
|
33082
|
+
if (!tokensByAccessToken.has(tokens.access_token) && tokensByAccessToken.size >= 8) {
|
|
33083
|
+
tokensByAccessToken.delete(tokensByAccessToken.keys().next().value);
|
|
33084
|
+
}
|
|
33085
|
+
tokensByAccessToken.set(tokens.access_token, tokens);
|
|
33086
|
+
}
|
|
33087
|
+
return tokens?.access_token;
|
|
33088
|
+
},
|
|
33089
|
+
onUnauthorized: async (ctx) => {
|
|
33090
|
+
const presentedTokens = ctx.presentedToken ? tokensByAccessToken.get(ctx.presentedToken) : void 0;
|
|
33091
|
+
if (ctx.presentedToken) tokensByAccessToken.delete(ctx.presentedToken);
|
|
33092
|
+
const continueDefault = async (options) => handleOAuthUnauthorized(provider, ctx, extraAuthOptions, options);
|
|
33093
|
+
if (provider.onOAuthUnauthorized) {
|
|
33094
|
+
await provider.onOAuthUnauthorized({
|
|
33095
|
+
response: ctx.response,
|
|
33096
|
+
serverUrl: ctx.serverUrl,
|
|
33097
|
+
fetchFn: ctx.fetchFn,
|
|
33098
|
+
presentedTokens
|
|
33099
|
+
}, continueDefault);
|
|
33100
|
+
return;
|
|
33101
|
+
}
|
|
33102
|
+
await continueDefault();
|
|
33103
|
+
}
|
|
33240
33104
|
};
|
|
33241
33105
|
}
|
|
33242
33106
|
var UnauthorizedError = class extends Error {
|
|
@@ -33560,12 +33424,14 @@ async function authInternal(provider, { serverUrl, authorizationCode, iss, scope
|
|
|
33560
33424
|
await provider.saveTokens(tokens, infoCtx);
|
|
33561
33425
|
}
|
|
33562
33426
|
if (tokens?.refresh_token && !forceReauthorization) {
|
|
33427
|
+
const refreshScope = await provider.scopeForRefresh?.(tokens);
|
|
33563
33428
|
let newTokens;
|
|
33564
33429
|
try {
|
|
33565
33430
|
newTokens = await refreshAuthorization(authorizationServerUrl, {
|
|
33566
33431
|
metadata,
|
|
33567
33432
|
clientInformation,
|
|
33568
33433
|
refreshToken: tokens.refresh_token,
|
|
33434
|
+
scope: refreshScope,
|
|
33569
33435
|
resource,
|
|
33570
33436
|
addClientAuthentication: provider.addClientAuthentication,
|
|
33571
33437
|
dpop: await provider.dpop?.(),
|
|
@@ -33856,21 +33722,25 @@ async function executeTokenRequest(authorizationServerUrl, { metadata, tokenRequ
|
|
|
33856
33722
|
throw parseError;
|
|
33857
33723
|
}
|
|
33858
33724
|
}
|
|
33859
|
-
async function refreshAuthorization(authorizationServerUrl, { metadata, clientInformation, refreshToken, resource, addClientAuthentication, dpop, fetchFn }) {
|
|
33725
|
+
async function refreshAuthorization(authorizationServerUrl, { metadata, clientInformation, refreshToken, scope, resource, addClientAuthentication, dpop, fetchFn }) {
|
|
33726
|
+
const tokenRequestParams = new URLSearchParams({
|
|
33727
|
+
grant_type: "refresh_token",
|
|
33728
|
+
refresh_token: refreshToken
|
|
33729
|
+
});
|
|
33730
|
+
if (scope) tokenRequestParams.set("scope", scope);
|
|
33731
|
+
const tokens = await executeTokenRequest(authorizationServerUrl, {
|
|
33732
|
+
metadata,
|
|
33733
|
+
tokenRequestParams,
|
|
33734
|
+
clientInformation,
|
|
33735
|
+
addClientAuthentication,
|
|
33736
|
+
resource,
|
|
33737
|
+
dpop,
|
|
33738
|
+
fetchFn
|
|
33739
|
+
});
|
|
33860
33740
|
return {
|
|
33861
33741
|
refresh_token: refreshToken,
|
|
33862
|
-
...
|
|
33863
|
-
|
|
33864
|
-
tokenRequestParams: new URLSearchParams({
|
|
33865
|
-
grant_type: "refresh_token",
|
|
33866
|
-
refresh_token: refreshToken
|
|
33867
|
-
}),
|
|
33868
|
-
clientInformation,
|
|
33869
|
-
addClientAuthentication,
|
|
33870
|
-
resource,
|
|
33871
|
-
dpop,
|
|
33872
|
-
fetchFn
|
|
33873
|
-
})
|
|
33742
|
+
...tokens,
|
|
33743
|
+
...scope && !tokens.scope && { scope }
|
|
33874
33744
|
};
|
|
33875
33745
|
}
|
|
33876
33746
|
async function fetchToken(provider, authorizationServerUrl, { metadata, resource, authorizationCode, iss, scope, fetchFn } = {}) {
|
|
@@ -34919,6 +34789,7 @@ var LIST_CHANGED_EVICTIONS = {
|
|
|
34919
34789
|
"notifications/resources/list_changed": ["resources/list", "resources/templates/list"]
|
|
34920
34790
|
};
|
|
34921
34791
|
var DEFAULT_LIST_MAX_PAGES = 64;
|
|
34792
|
+
var clientInternals = {};
|
|
34922
34793
|
var Client = class extends Protocol {
|
|
34923
34794
|
_serverCapabilities;
|
|
34924
34795
|
_serverVersion;
|
|
@@ -34963,6 +34834,11 @@ var Client = class extends Protocol {
|
|
|
34963
34834
|
_autoOpenedSubscription;
|
|
34964
34835
|
/** Backing store for {@linkcode getDiscoverResult}. Per-connection. */
|
|
34965
34836
|
_discoverResult;
|
|
34837
|
+
static {
|
|
34838
|
+
clientInternals.enforceStrictCapabilities = (client) => client._enforceStrictCapabilities;
|
|
34839
|
+
clientInternals.walkPages = (client, method, fetchPage, items) => client._walkPages(method, fetchPage, items);
|
|
34840
|
+
clientInternals.readResource = (client, params, options) => client._readResource(params, options);
|
|
34841
|
+
}
|
|
34966
34842
|
/**
|
|
34967
34843
|
* Clears every per-connection field in one place. Called at the start of
|
|
34968
34844
|
* each fresh (non-resuming) connect and from `close()`, so a stale
|
|
@@ -35649,10 +35525,25 @@ var Client = class extends Protocol {
|
|
|
35649
35525
|
async _listAllPages(method, baseParams, options, items, finalize2) {
|
|
35650
35526
|
const bypass = options?.cacheMode === "bypass";
|
|
35651
35527
|
const generation = this._cache.captureGeneration(method);
|
|
35652
|
-
const
|
|
35653
|
-
|
|
35654
|
-
|
|
35655
|
-
|
|
35528
|
+
const fetchPage = (cursor) => {
|
|
35529
|
+
const params = cursor === void 0 ? baseParams && { ...baseParams } : {
|
|
35530
|
+
...baseParams,
|
|
35531
|
+
cursor
|
|
35532
|
+
};
|
|
35533
|
+
return this.request({
|
|
35534
|
+
method,
|
|
35535
|
+
...params && { params }
|
|
35536
|
+
}, options);
|
|
35537
|
+
};
|
|
35538
|
+
const acc = await this._walkPages(method, fetchPage, items);
|
|
35539
|
+
delete acc.nextCursor;
|
|
35540
|
+
finalize2?.(acc);
|
|
35541
|
+
if (bypass) return acc;
|
|
35542
|
+
await this._cache.write(method, acc, generation, this._freshness(acc));
|
|
35543
|
+
return acc;
|
|
35544
|
+
}
|
|
35545
|
+
async _walkPages(method, fetchPage, items) {
|
|
35546
|
+
const acc = await fetchPage(void 0);
|
|
35656
35547
|
let cursor = acc.nextCursor;
|
|
35657
35548
|
let previous = acc;
|
|
35658
35549
|
let pages = 1;
|
|
@@ -35661,23 +35552,13 @@ var Client = class extends Protocol {
|
|
|
35661
35552
|
method,
|
|
35662
35553
|
listMaxPages: this._listMaxPages
|
|
35663
35554
|
});
|
|
35664
|
-
const page = await
|
|
35665
|
-
method,
|
|
35666
|
-
params: {
|
|
35667
|
-
...baseParams,
|
|
35668
|
-
cursor
|
|
35669
|
-
}
|
|
35670
|
-
}, options);
|
|
35555
|
+
const page = await fetchPage(cursor);
|
|
35671
35556
|
if (page.nextCursor === cursor && JSON.stringify(items(page)) === JSON.stringify(items(previous))) break;
|
|
35672
35557
|
items(acc).push(...items(page));
|
|
35673
35558
|
previous = page;
|
|
35674
35559
|
cursor = page.nextCursor;
|
|
35675
35560
|
pages++;
|
|
35676
35561
|
}
|
|
35677
|
-
delete acc.nextCursor;
|
|
35678
|
-
finalize2?.(acc);
|
|
35679
|
-
if (bypass) return acc;
|
|
35680
|
-
await this._cache.write(method, acc, generation, this._freshness(acc));
|
|
35681
35562
|
return acc;
|
|
35682
35563
|
}
|
|
35683
35564
|
/**
|
|
@@ -35793,8 +35674,15 @@ var Client = class extends Protocol {
|
|
|
35793
35674
|
* unbounded).
|
|
35794
35675
|
*/
|
|
35795
35676
|
async readResource(params, options) {
|
|
35677
|
+
const { result } = await this._readResource(params, options);
|
|
35678
|
+
return result;
|
|
35679
|
+
}
|
|
35680
|
+
async _readResource(params, options) {
|
|
35796
35681
|
const hit = await this._serveFromCache("resources/read", params.uri, options);
|
|
35797
|
-
if (hit !== void 0) return
|
|
35682
|
+
if (hit !== void 0) return {
|
|
35683
|
+
result: hit,
|
|
35684
|
+
cached: true
|
|
35685
|
+
};
|
|
35798
35686
|
const generation = this._cache.captureGeneration("resources/read", params.uri);
|
|
35799
35687
|
const result = await this.request({
|
|
35800
35688
|
method: "resources/read",
|
|
@@ -35805,7 +35693,10 @@ var Client = class extends Protocol {
|
|
|
35805
35693
|
if (freshness.expiresAt > this._cache.now()) await this._cache.write("resources/read", result, generation, freshness);
|
|
35806
35694
|
else if (options?.cacheMode === "refresh") await this._cache.evictKey("resources/read", params.uri);
|
|
35807
35695
|
}
|
|
35808
|
-
return
|
|
35696
|
+
return {
|
|
35697
|
+
result,
|
|
35698
|
+
cached: false
|
|
35699
|
+
};
|
|
35809
35700
|
}
|
|
35810
35701
|
/** Subscribes to change notifications for a resource. The server must support resource subscriptions. */
|
|
35811
35702
|
async subscribeResource(params, options) {
|
|
@@ -36272,6 +36163,511 @@ var Client = class extends Protocol {
|
|
|
36272
36163
|
return this.notification({ method: "notifications/roots/list_changed" });
|
|
36273
36164
|
}
|
|
36274
36165
|
};
|
|
36166
|
+
|
|
36167
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/eventsource-parser/dist/index.js
|
|
36168
|
+
var ParseError = class extends Error {
|
|
36169
|
+
constructor(message, options) {
|
|
36170
|
+
super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
|
|
36171
|
+
}
|
|
36172
|
+
};
|
|
36173
|
+
var LF = 10;
|
|
36174
|
+
var CR = 13;
|
|
36175
|
+
var SPACE = 32;
|
|
36176
|
+
function noop(_arg) {
|
|
36177
|
+
}
|
|
36178
|
+
function createParser(config2) {
|
|
36179
|
+
if (typeof config2 == "function")
|
|
36180
|
+
throw new TypeError(
|
|
36181
|
+
"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?"
|
|
36182
|
+
);
|
|
36183
|
+
const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config2, pendingFragments = [];
|
|
36184
|
+
let pendingFragmentsLength = 0, isFirstChunk = true, id, data = "", dataLines = 0, eventType, terminated = false;
|
|
36185
|
+
function feed(chunk) {
|
|
36186
|
+
if (terminated)
|
|
36187
|
+
throw new Error(
|
|
36188
|
+
"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing."
|
|
36189
|
+
);
|
|
36190
|
+
if (isFirstChunk && (isFirstChunk = false, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
|
|
36191
|
+
const trailing2 = processLines(chunk);
|
|
36192
|
+
trailing2 !== "" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();
|
|
36193
|
+
return;
|
|
36194
|
+
}
|
|
36195
|
+
if (chunk.indexOf(`
|
|
36196
|
+
`) === -1 && chunk.indexOf("\r") === -1) {
|
|
36197
|
+
pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();
|
|
36198
|
+
return;
|
|
36199
|
+
}
|
|
36200
|
+
pendingFragments.push(chunk);
|
|
36201
|
+
const input2 = pendingFragments.join("");
|
|
36202
|
+
pendingFragments.length = 0, pendingFragmentsLength = 0;
|
|
36203
|
+
const trailing = processLines(input2);
|
|
36204
|
+
trailing !== "" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();
|
|
36205
|
+
}
|
|
36206
|
+
function checkBufferSize() {
|
|
36207
|
+
maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = true, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = "", dataLines = 0, eventType = void 0, onError(
|
|
36208
|
+
new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {
|
|
36209
|
+
type: "max-buffer-size-exceeded"
|
|
36210
|
+
})
|
|
36211
|
+
)));
|
|
36212
|
+
}
|
|
36213
|
+
function processLines(chunk) {
|
|
36214
|
+
let searchIndex = 0;
|
|
36215
|
+
if (chunk.indexOf("\r") === -1) {
|
|
36216
|
+
let lfIndex = chunk.indexOf(`
|
|
36217
|
+
`, searchIndex);
|
|
36218
|
+
for (; lfIndex !== -1; ) {
|
|
36219
|
+
if (searchIndex === lfIndex) {
|
|
36220
|
+
dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
|
|
36221
|
+
`, searchIndex);
|
|
36222
|
+
continue;
|
|
36223
|
+
}
|
|
36224
|
+
const firstCharCode = chunk.charCodeAt(searchIndex);
|
|
36225
|
+
if (isDataPrefix(chunk, searchIndex, firstCharCode)) {
|
|
36226
|
+
const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
|
|
36227
|
+
if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {
|
|
36228
|
+
onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
|
|
36229
|
+
`, searchIndex);
|
|
36230
|
+
continue;
|
|
36231
|
+
}
|
|
36232
|
+
data = dataLines === 0 ? value : `${data}
|
|
36233
|
+
${value}`, dataLines++;
|
|
36234
|
+
} else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
|
|
36235
|
+
chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,
|
|
36236
|
+
lfIndex
|
|
36237
|
+
) || void 0 : parseLine(chunk, searchIndex, lfIndex);
|
|
36238
|
+
searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
|
|
36239
|
+
`, searchIndex);
|
|
36240
|
+
}
|
|
36241
|
+
return chunk.slice(searchIndex);
|
|
36242
|
+
}
|
|
36243
|
+
for (; searchIndex < chunk.length; ) {
|
|
36244
|
+
const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
|
|
36245
|
+
`, searchIndex);
|
|
36246
|
+
let lineEnd = -1;
|
|
36247
|
+
if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
|
|
36248
|
+
break;
|
|
36249
|
+
parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;
|
|
36250
|
+
}
|
|
36251
|
+
return chunk.slice(searchIndex);
|
|
36252
|
+
}
|
|
36253
|
+
function parseLine(chunk, start, end) {
|
|
36254
|
+
if (start === end) {
|
|
36255
|
+
dispatchEvent();
|
|
36256
|
+
return;
|
|
36257
|
+
}
|
|
36258
|
+
const firstCharCode = chunk.charCodeAt(start);
|
|
36259
|
+
if (isDataPrefix(chunk, start, firstCharCode)) {
|
|
36260
|
+
const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);
|
|
36261
|
+
data = dataLines === 0 ? value2 : `${data}
|
|
36262
|
+
${value2}`, dataLines++;
|
|
36263
|
+
return;
|
|
36264
|
+
}
|
|
36265
|
+
if (isEventPrefix(chunk, start, firstCharCode)) {
|
|
36266
|
+
eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;
|
|
36267
|
+
return;
|
|
36268
|
+
}
|
|
36269
|
+
if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
|
|
36270
|
+
const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
|
|
36271
|
+
value2.includes("\0") || (id = value2);
|
|
36272
|
+
return;
|
|
36273
|
+
}
|
|
36274
|
+
if (firstCharCode === 58) {
|
|
36275
|
+
if (onComment) {
|
|
36276
|
+
const line2 = chunk.slice(start, end);
|
|
36277
|
+
onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));
|
|
36278
|
+
}
|
|
36279
|
+
return;
|
|
36280
|
+
}
|
|
36281
|
+
const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
|
|
36282
|
+
if (fieldSeparatorIndex === -1) {
|
|
36283
|
+
processField(line, "", line);
|
|
36284
|
+
return;
|
|
36285
|
+
}
|
|
36286
|
+
const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
|
|
36287
|
+
processField(field, value, line);
|
|
36288
|
+
}
|
|
36289
|
+
function processField(field, value, line) {
|
|
36290
|
+
switch (field) {
|
|
36291
|
+
case "event":
|
|
36292
|
+
eventType = value || void 0;
|
|
36293
|
+
break;
|
|
36294
|
+
case "data":
|
|
36295
|
+
data = dataLines === 0 ? value : `${data}
|
|
36296
|
+
${value}`, dataLines++;
|
|
36297
|
+
break;
|
|
36298
|
+
case "id":
|
|
36299
|
+
value.includes("\0") || (id = value);
|
|
36300
|
+
break;
|
|
36301
|
+
case "retry":
|
|
36302
|
+
/^\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(
|
|
36303
|
+
new ParseError(`Invalid \`retry\` value: "${value}"`, {
|
|
36304
|
+
type: "invalid-retry",
|
|
36305
|
+
value,
|
|
36306
|
+
line
|
|
36307
|
+
})
|
|
36308
|
+
);
|
|
36309
|
+
break;
|
|
36310
|
+
default:
|
|
36311
|
+
onError(
|
|
36312
|
+
new ParseError(
|
|
36313
|
+
`Unknown field "${field.length > 20 ? `${field.slice(0, 20)}\u2026` : field}"`,
|
|
36314
|
+
{ type: "unknown-field", field, value, line }
|
|
36315
|
+
)
|
|
36316
|
+
);
|
|
36317
|
+
break;
|
|
36318
|
+
}
|
|
36319
|
+
}
|
|
36320
|
+
function dispatchEvent() {
|
|
36321
|
+
dataLines > 0 && onEvent({
|
|
36322
|
+
id,
|
|
36323
|
+
event: eventType,
|
|
36324
|
+
data
|
|
36325
|
+
}), id = void 0, data = "", dataLines = 0, eventType = void 0;
|
|
36326
|
+
}
|
|
36327
|
+
function reset(options = {}) {
|
|
36328
|
+
if (options.consume && pendingFragments.length > 0) {
|
|
36329
|
+
const incompleteLine = pendingFragments.join("");
|
|
36330
|
+
parseLine(incompleteLine, 0, incompleteLine.length);
|
|
36331
|
+
}
|
|
36332
|
+
isFirstChunk = true, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = false;
|
|
36333
|
+
}
|
|
36334
|
+
return { feed, reset };
|
|
36335
|
+
}
|
|
36336
|
+
function isDataPrefix(chunk, i, firstCharCode) {
|
|
36337
|
+
return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;
|
|
36338
|
+
}
|
|
36339
|
+
function isEventPrefix(chunk, i, firstCharCode) {
|
|
36340
|
+
return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
|
|
36341
|
+
}
|
|
36342
|
+
|
|
36343
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/eventsource/dist/index.js
|
|
36344
|
+
var ErrorEvent = class extends Event {
|
|
36345
|
+
/**
|
|
36346
|
+
* Constructs a new `ErrorEvent` instance. This is typically not called directly,
|
|
36347
|
+
* but rather emitted by the `EventSource` object when an error occurs.
|
|
36348
|
+
*
|
|
36349
|
+
* @param type - The type of the event (should be "error")
|
|
36350
|
+
* @param errorEventInitDict - Optional properties to include in the error event
|
|
36351
|
+
*/
|
|
36352
|
+
constructor(type, errorEventInitDict) {
|
|
36353
|
+
var _a3, _b;
|
|
36354
|
+
super(type), this.code = (_a3 = errorEventInitDict == null ? void 0 : errorEventInitDict.code) != null ? _a3 : void 0, this.message = (_b = errorEventInitDict == null ? void 0 : errorEventInitDict.message) != null ? _b : void 0;
|
|
36355
|
+
}
|
|
36356
|
+
/**
|
|
36357
|
+
* Node.js "hides" the `message` and `code` properties of the `ErrorEvent` instance,
|
|
36358
|
+
* when it is `console.log`'ed. This makes it harder to debug errors. To ease debugging,
|
|
36359
|
+
* we explicitly include the properties in the `inspect` method.
|
|
36360
|
+
*
|
|
36361
|
+
* This is automatically called by Node.js when you `console.log` an instance of this class.
|
|
36362
|
+
*
|
|
36363
|
+
* @param _depth - The current depth
|
|
36364
|
+
* @param options - The options passed to `util.inspect`
|
|
36365
|
+
* @param inspect - The inspect function to use (prevents having to import it from `util`)
|
|
36366
|
+
* @returns A string representation of the error
|
|
36367
|
+
*/
|
|
36368
|
+
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")](_depth, options, inspect) {
|
|
36369
|
+
return inspect(inspectableError(this), options);
|
|
36370
|
+
}
|
|
36371
|
+
/**
|
|
36372
|
+
* Deno "hides" the `message` and `code` properties of the `ErrorEvent` instance,
|
|
36373
|
+
* when it is `console.log`'ed. This makes it harder to debug errors. To ease debugging,
|
|
36374
|
+
* we explicitly include the properties in the `inspect` method.
|
|
36375
|
+
*
|
|
36376
|
+
* This is automatically called by Deno when you `console.log` an instance of this class.
|
|
36377
|
+
*
|
|
36378
|
+
* @param inspect - The inspect function to use (prevents having to import it from `util`)
|
|
36379
|
+
* @param options - The options passed to `Deno.inspect`
|
|
36380
|
+
* @returns A string representation of the error
|
|
36381
|
+
*/
|
|
36382
|
+
[/* @__PURE__ */ Symbol.for("Deno.customInspect")](inspect, options) {
|
|
36383
|
+
return inspect(inspectableError(this), options);
|
|
36384
|
+
}
|
|
36385
|
+
};
|
|
36386
|
+
function syntaxError(message) {
|
|
36387
|
+
const DomException = globalThis.DOMException;
|
|
36388
|
+
return typeof DomException == "function" ? new DomException(message, "SyntaxError") : new SyntaxError(message);
|
|
36389
|
+
}
|
|
36390
|
+
function flattenError2(err) {
|
|
36391
|
+
return err instanceof Error ? "errors" in err && Array.isArray(err.errors) ? err.errors.map(flattenError2).join(", ") : "cause" in err && err.cause instanceof Error ? `${err}: ${flattenError2(err.cause)}` : err.message : `${err}`;
|
|
36392
|
+
}
|
|
36393
|
+
function inspectableError(err) {
|
|
36394
|
+
return {
|
|
36395
|
+
type: err.type,
|
|
36396
|
+
message: err.message,
|
|
36397
|
+
code: err.code,
|
|
36398
|
+
defaultPrevented: err.defaultPrevented,
|
|
36399
|
+
cancelable: err.cancelable,
|
|
36400
|
+
timeStamp: err.timeStamp
|
|
36401
|
+
};
|
|
36402
|
+
}
|
|
36403
|
+
var __typeError = (msg) => {
|
|
36404
|
+
throw TypeError(msg);
|
|
36405
|
+
};
|
|
36406
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
36407
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
36408
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
36409
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
36410
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
36411
|
+
var _readyState;
|
|
36412
|
+
var _url2;
|
|
36413
|
+
var _redirectUrl;
|
|
36414
|
+
var _withCredentials;
|
|
36415
|
+
var _fetch;
|
|
36416
|
+
var _reconnectInterval;
|
|
36417
|
+
var _reconnectTimer;
|
|
36418
|
+
var _lastEventId;
|
|
36419
|
+
var _controller;
|
|
36420
|
+
var _parser;
|
|
36421
|
+
var _onError;
|
|
36422
|
+
var _onMessage;
|
|
36423
|
+
var _onOpen;
|
|
36424
|
+
var _EventSource_instances;
|
|
36425
|
+
var connect_fn;
|
|
36426
|
+
var _onFetchResponse;
|
|
36427
|
+
var _onFetchError;
|
|
36428
|
+
var getRequestOptions_fn;
|
|
36429
|
+
var _onEvent;
|
|
36430
|
+
var _onRetryChange;
|
|
36431
|
+
var failConnection_fn;
|
|
36432
|
+
var scheduleReconnect_fn;
|
|
36433
|
+
var _reconnect;
|
|
36434
|
+
var EventSource = class extends EventTarget {
|
|
36435
|
+
constructor(url2, eventSourceInitDict) {
|
|
36436
|
+
var _a3, _b;
|
|
36437
|
+
super(), __privateAdd(this, _EventSource_instances), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, __privateAdd(this, _readyState), __privateAdd(this, _url2), __privateAdd(this, _redirectUrl), __privateAdd(this, _withCredentials), __privateAdd(this, _fetch), __privateAdd(this, _reconnectInterval), __privateAdd(this, _reconnectTimer), __privateAdd(this, _lastEventId, null), __privateAdd(this, _controller), __privateAdd(this, _parser), __privateAdd(this, _onError, null), __privateAdd(this, _onMessage, null), __privateAdd(this, _onOpen, null), __privateAdd(this, _onFetchResponse, async (response) => {
|
|
36438
|
+
var _a22;
|
|
36439
|
+
__privateGet(this, _parser).reset();
|
|
36440
|
+
const { body, redirected, status, headers } = response;
|
|
36441
|
+
if (status === 204) {
|
|
36442
|
+
__privateMethod(this, _EventSource_instances, failConnection_fn).call(this, "Server sent HTTP 204, not reconnecting", 204), this.close();
|
|
36443
|
+
return;
|
|
36444
|
+
}
|
|
36445
|
+
if (redirected ? __privateSet(this, _redirectUrl, new URL(response.url)) : __privateSet(this, _redirectUrl, void 0), status !== 200) {
|
|
36446
|
+
__privateMethod(this, _EventSource_instances, failConnection_fn).call(this, `Non-200 status code (${status})`, status);
|
|
36447
|
+
return;
|
|
36448
|
+
}
|
|
36449
|
+
if (!(headers.get("content-type") || "").startsWith("text/event-stream")) {
|
|
36450
|
+
__privateMethod(this, _EventSource_instances, failConnection_fn).call(this, 'Invalid content type, expected "text/event-stream"', status);
|
|
36451
|
+
return;
|
|
36452
|
+
}
|
|
36453
|
+
if (__privateGet(this, _readyState) === this.CLOSED)
|
|
36454
|
+
return;
|
|
36455
|
+
__privateSet(this, _readyState, this.OPEN);
|
|
36456
|
+
const openEvent = new Event("open");
|
|
36457
|
+
if ((_a22 = __privateGet(this, _onOpen)) == null || _a22.call(this, openEvent), this.dispatchEvent(openEvent), typeof body != "object" || !body || !("getReader" in body)) {
|
|
36458
|
+
__privateMethod(this, _EventSource_instances, failConnection_fn).call(this, "Invalid response body, expected a web ReadableStream", status), this.close();
|
|
36459
|
+
return;
|
|
36460
|
+
}
|
|
36461
|
+
const decoder = new TextDecoder(), reader = body.getReader();
|
|
36462
|
+
let open2 = true;
|
|
36463
|
+
do {
|
|
36464
|
+
const { done, value } = await reader.read();
|
|
36465
|
+
value && __privateGet(this, _parser).feed(decoder.decode(value, { stream: !done })), done && (open2 = false, __privateGet(this, _parser).reset(), __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this));
|
|
36466
|
+
} while (open2);
|
|
36467
|
+
}), __privateAdd(this, _onFetchError, (err) => {
|
|
36468
|
+
__privateSet(this, _controller, void 0), !(err.name === "AbortError" || err.type === "aborted") && __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this, flattenError2(err));
|
|
36469
|
+
}), __privateAdd(this, _onEvent, (event) => {
|
|
36470
|
+
typeof event.id == "string" && __privateSet(this, _lastEventId, event.id);
|
|
36471
|
+
const messageEvent = new MessageEvent(event.event || "message", {
|
|
36472
|
+
data: event.data,
|
|
36473
|
+
origin: __privateGet(this, _redirectUrl) ? __privateGet(this, _redirectUrl).origin : __privateGet(this, _url2).origin,
|
|
36474
|
+
lastEventId: event.id || ""
|
|
36475
|
+
});
|
|
36476
|
+
__privateGet(this, _onMessage) && (!event.event || event.event === "message") && __privateGet(this, _onMessage).call(this, messageEvent), this.dispatchEvent(messageEvent);
|
|
36477
|
+
}), __privateAdd(this, _onRetryChange, (value) => {
|
|
36478
|
+
__privateSet(this, _reconnectInterval, value);
|
|
36479
|
+
}), __privateAdd(this, _reconnect, () => {
|
|
36480
|
+
__privateSet(this, _reconnectTimer, void 0), __privateGet(this, _readyState) === this.CONNECTING && __privateMethod(this, _EventSource_instances, connect_fn).call(this);
|
|
36481
|
+
});
|
|
36482
|
+
try {
|
|
36483
|
+
if (url2 instanceof URL)
|
|
36484
|
+
__privateSet(this, _url2, url2);
|
|
36485
|
+
else if (typeof url2 == "string")
|
|
36486
|
+
__privateSet(this, _url2, new URL(url2, getBaseURL()));
|
|
36487
|
+
else
|
|
36488
|
+
throw new Error("Invalid URL");
|
|
36489
|
+
} catch {
|
|
36490
|
+
throw syntaxError("An invalid or illegal string was specified");
|
|
36491
|
+
}
|
|
36492
|
+
__privateSet(this, _parser, createParser({
|
|
36493
|
+
onEvent: __privateGet(this, _onEvent),
|
|
36494
|
+
onRetry: __privateGet(this, _onRetryChange)
|
|
36495
|
+
})), __privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _reconnectInterval, 3e3), __privateSet(this, _fetch, (_a3 = eventSourceInitDict == null ? void 0 : eventSourceInitDict.fetch) != null ? _a3 : globalThis.fetch), __privateSet(this, _withCredentials, (_b = eventSourceInitDict == null ? void 0 : eventSourceInitDict.withCredentials) != null ? _b : false), __privateMethod(this, _EventSource_instances, connect_fn).call(this);
|
|
36496
|
+
}
|
|
36497
|
+
/**
|
|
36498
|
+
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
36499
|
+
*
|
|
36500
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
36501
|
+
*
|
|
36502
|
+
* Note: typed as `number` instead of `0 | 1 | 2` for compatibility with the `EventSource` interface,
|
|
36503
|
+
* defined in the TypeScript `dom` library.
|
|
36504
|
+
*
|
|
36505
|
+
* @public
|
|
36506
|
+
*/
|
|
36507
|
+
get readyState() {
|
|
36508
|
+
return __privateGet(this, _readyState);
|
|
36509
|
+
}
|
|
36510
|
+
/**
|
|
36511
|
+
* Returns the URL providing the event stream.
|
|
36512
|
+
*
|
|
36513
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
36514
|
+
*
|
|
36515
|
+
* @public
|
|
36516
|
+
*/
|
|
36517
|
+
get url() {
|
|
36518
|
+
return __privateGet(this, _url2).href;
|
|
36519
|
+
}
|
|
36520
|
+
/**
|
|
36521
|
+
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
36522
|
+
*
|
|
36523
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
36524
|
+
*/
|
|
36525
|
+
get withCredentials() {
|
|
36526
|
+
return __privateGet(this, _withCredentials);
|
|
36527
|
+
}
|
|
36528
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
36529
|
+
get onerror() {
|
|
36530
|
+
return __privateGet(this, _onError);
|
|
36531
|
+
}
|
|
36532
|
+
set onerror(value) {
|
|
36533
|
+
__privateSet(this, _onError, value);
|
|
36534
|
+
}
|
|
36535
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
36536
|
+
get onmessage() {
|
|
36537
|
+
return __privateGet(this, _onMessage);
|
|
36538
|
+
}
|
|
36539
|
+
set onmessage(value) {
|
|
36540
|
+
__privateSet(this, _onMessage, value);
|
|
36541
|
+
}
|
|
36542
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
36543
|
+
get onopen() {
|
|
36544
|
+
return __privateGet(this, _onOpen);
|
|
36545
|
+
}
|
|
36546
|
+
set onopen(value) {
|
|
36547
|
+
__privateSet(this, _onOpen, value);
|
|
36548
|
+
}
|
|
36549
|
+
addEventListener(type, listener, options) {
|
|
36550
|
+
const listen = listener;
|
|
36551
|
+
super.addEventListener(type, listen, options);
|
|
36552
|
+
}
|
|
36553
|
+
removeEventListener(type, listener, options) {
|
|
36554
|
+
const listen = listener;
|
|
36555
|
+
super.removeEventListener(type, listen, options);
|
|
36556
|
+
}
|
|
36557
|
+
/**
|
|
36558
|
+
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
36559
|
+
*
|
|
36560
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
36561
|
+
*
|
|
36562
|
+
* @public
|
|
36563
|
+
*/
|
|
36564
|
+
close() {
|
|
36565
|
+
__privateGet(this, _reconnectTimer) && clearTimeout(__privateGet(this, _reconnectTimer)), __privateGet(this, _readyState) !== this.CLOSED && (__privateGet(this, _controller) && __privateGet(this, _controller).abort(), __privateSet(this, _readyState, this.CLOSED), __privateSet(this, _controller, void 0));
|
|
36566
|
+
}
|
|
36567
|
+
};
|
|
36568
|
+
_readyState = /* @__PURE__ */ new WeakMap(), _url2 = /* @__PURE__ */ new WeakMap(), _redirectUrl = /* @__PURE__ */ new WeakMap(), _withCredentials = /* @__PURE__ */ new WeakMap(), _fetch = /* @__PURE__ */ new WeakMap(), _reconnectInterval = /* @__PURE__ */ new WeakMap(), _reconnectTimer = /* @__PURE__ */ new WeakMap(), _lastEventId = /* @__PURE__ */ new WeakMap(), _controller = /* @__PURE__ */ new WeakMap(), _parser = /* @__PURE__ */ new WeakMap(), _onError = /* @__PURE__ */ new WeakMap(), _onMessage = /* @__PURE__ */ new WeakMap(), _onOpen = /* @__PURE__ */ new WeakMap(), _EventSource_instances = /* @__PURE__ */ new WeakSet(), /**
|
|
36569
|
+
* Connect to the given URL and start receiving events
|
|
36570
|
+
*
|
|
36571
|
+
* @internal
|
|
36572
|
+
*/
|
|
36573
|
+
connect_fn = function() {
|
|
36574
|
+
__privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _controller, new AbortController()), __privateGet(this, _fetch)(__privateGet(this, _url2), __privateMethod(this, _EventSource_instances, getRequestOptions_fn).call(this)).then(__privateGet(this, _onFetchResponse)).catch(__privateGet(this, _onFetchError));
|
|
36575
|
+
}, _onFetchResponse = /* @__PURE__ */ new WeakMap(), _onFetchError = /* @__PURE__ */ new WeakMap(), /**
|
|
36576
|
+
* Get request options for the `fetch()` request
|
|
36577
|
+
*
|
|
36578
|
+
* @returns The request options
|
|
36579
|
+
* @internal
|
|
36580
|
+
*/
|
|
36581
|
+
getRequestOptions_fn = function() {
|
|
36582
|
+
var _a3;
|
|
36583
|
+
const init = {
|
|
36584
|
+
// [spec] Let `corsAttributeState` be `Anonymous`…
|
|
36585
|
+
// [spec] …will have their mode set to "cors"…
|
|
36586
|
+
mode: "cors",
|
|
36587
|
+
redirect: "follow",
|
|
36588
|
+
headers: { Accept: "text/event-stream", ...__privateGet(this, _lastEventId) ? { "Last-Event-ID": __privateGet(this, _lastEventId) } : void 0 },
|
|
36589
|
+
cache: "no-store",
|
|
36590
|
+
signal: (_a3 = __privateGet(this, _controller)) == null ? void 0 : _a3.signal
|
|
36591
|
+
};
|
|
36592
|
+
return "window" in globalThis && (init.credentials = this.withCredentials ? "include" : "same-origin"), init;
|
|
36593
|
+
}, _onEvent = /* @__PURE__ */ new WeakMap(), _onRetryChange = /* @__PURE__ */ new WeakMap(), /**
|
|
36594
|
+
* Handles the process referred to in the EventSource specification as "failing a connection".
|
|
36595
|
+
*
|
|
36596
|
+
* @param error - The error causing the connection to fail
|
|
36597
|
+
* @param code - The HTTP status code, if available
|
|
36598
|
+
* @internal
|
|
36599
|
+
*/
|
|
36600
|
+
failConnection_fn = function(message, code) {
|
|
36601
|
+
var _a3;
|
|
36602
|
+
__privateGet(this, _readyState) !== this.CLOSED && __privateSet(this, _readyState, this.CLOSED);
|
|
36603
|
+
const errorEvent = new ErrorEvent("error", { code, message });
|
|
36604
|
+
(_a3 = __privateGet(this, _onError)) == null || _a3.call(this, errorEvent), this.dispatchEvent(errorEvent);
|
|
36605
|
+
}, /**
|
|
36606
|
+
* Schedules a reconnection attempt against the EventSource endpoint.
|
|
36607
|
+
*
|
|
36608
|
+
* @param message - The error causing the connection to fail
|
|
36609
|
+
* @param code - The HTTP status code, if available
|
|
36610
|
+
* @internal
|
|
36611
|
+
*/
|
|
36612
|
+
scheduleReconnect_fn = function(message, code) {
|
|
36613
|
+
var _a3;
|
|
36614
|
+
if (__privateGet(this, _readyState) === this.CLOSED)
|
|
36615
|
+
return;
|
|
36616
|
+
__privateSet(this, _readyState, this.CONNECTING);
|
|
36617
|
+
const errorEvent = new ErrorEvent("error", { code, message });
|
|
36618
|
+
(_a3 = __privateGet(this, _onError)) == null || _a3.call(this, errorEvent), this.dispatchEvent(errorEvent), __privateSet(this, _reconnectTimer, setTimeout(__privateGet(this, _reconnect), __privateGet(this, _reconnectInterval)));
|
|
36619
|
+
}, _reconnect = /* @__PURE__ */ new WeakMap(), /**
|
|
36620
|
+
* ReadyState representing an EventSource currently trying to connect
|
|
36621
|
+
*
|
|
36622
|
+
* @public
|
|
36623
|
+
*/
|
|
36624
|
+
EventSource.CONNECTING = 0, /**
|
|
36625
|
+
* ReadyState representing an EventSource connection that is open (eg connected)
|
|
36626
|
+
*
|
|
36627
|
+
* @public
|
|
36628
|
+
*/
|
|
36629
|
+
EventSource.OPEN = 1, /**
|
|
36630
|
+
* ReadyState representing an EventSource connection that is closed (eg disconnected)
|
|
36631
|
+
*
|
|
36632
|
+
* @public
|
|
36633
|
+
*/
|
|
36634
|
+
EventSource.CLOSED = 2;
|
|
36635
|
+
function getBaseURL() {
|
|
36636
|
+
const doc = "document" in globalThis ? globalThis.document : void 0;
|
|
36637
|
+
return doc && typeof doc == "object" && "baseURI" in doc && typeof doc.baseURI == "string" ? doc.baseURI : void 0;
|
|
36638
|
+
}
|
|
36639
|
+
|
|
36640
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/eventsource-parser/dist/stream.js
|
|
36641
|
+
var EventSourceParserStream = class extends TransformStream {
|
|
36642
|
+
constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
|
|
36643
|
+
let parser;
|
|
36644
|
+
super({
|
|
36645
|
+
start(controller) {
|
|
36646
|
+
parser = createParser({
|
|
36647
|
+
onEvent: (event) => {
|
|
36648
|
+
controller.enqueue(event);
|
|
36649
|
+
},
|
|
36650
|
+
onError(error62) {
|
|
36651
|
+
typeof onError == "function" && onError(error62), (onError === "terminate" || error62.type === "max-buffer-size-exceeded") && controller.error(error62);
|
|
36652
|
+
},
|
|
36653
|
+
onRetry,
|
|
36654
|
+
onComment,
|
|
36655
|
+
maxBufferSize
|
|
36656
|
+
});
|
|
36657
|
+
},
|
|
36658
|
+
transform(chunk) {
|
|
36659
|
+
parser.feed(chunk);
|
|
36660
|
+
}
|
|
36661
|
+
});
|
|
36662
|
+
}
|
|
36663
|
+
};
|
|
36664
|
+
|
|
36665
|
+
// node_modules/.pnpm/mcporter@0.16.1/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/index.mjs
|
|
36666
|
+
function presentedBearerToken(headers) {
|
|
36667
|
+
const authorization = headers.get("authorization");
|
|
36668
|
+
const match = authorization?.match(/^Bearer\s+(.+)$/i);
|
|
36669
|
+
return match?.[1];
|
|
36670
|
+
}
|
|
36275
36671
|
function hasDpopChallenge(wwwAuthenticate) {
|
|
36276
36672
|
return /(?:^|,)\s*dpop(?:\s|$|,)/i.test(wwwAuthenticate);
|
|
36277
36673
|
}
|