fastmcp 4.26.0 → 4.26.2
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/README.md +16 -6
- package/dist/FastMCP.cjs +3 -3
- package/dist/FastMCP.d.cts +2 -2
- package/dist/FastMCP.d.ts +2 -2
- package/dist/FastMCP.js +2 -2
- package/dist/{OAuthProvider-CPC9zG96.d.cts → OAuthProvider-B7VDZGyx.d.cts} +55 -3
- package/dist/{OAuthProvider-CPC9zG96.d.ts → OAuthProvider-B7VDZGyx.d.ts} +55 -3
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.d.cts +17 -3
- package/dist/auth/index.d.ts +17 -3
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-LUGELV2V.js → chunk-ASOZUCE2.js} +180 -36
- package/dist/chunk-ASOZUCE2.js.map +1 -0
- package/dist/{chunk-AKHG27NY.cjs → chunk-HVKGDRTL.cjs} +286 -66
- package/dist/chunk-HVKGDRTL.cjs.map +1 -0
- package/dist/{chunk-ZHTH5HQD.cjs → chunk-UULT6NOS.cjs} +212 -68
- package/dist/chunk-UULT6NOS.cjs.map +1 -0
- package/dist/{chunk-3VYVXSBB.js → chunk-W6P57SNV.js} +272 -52
- package/dist/chunk-W6P57SNV.js.map +1 -0
- package/dist/edge/index.cjs +110 -16
- package/dist/edge/index.cjs.map +1 -1
- package/dist/edge/index.d.cts +7 -2
- package/dist/edge/index.d.ts +7 -2
- package/dist/edge/index.js +110 -16
- package/dist/edge/index.js.map +1 -1
- package/dist/examples/custom-routes.cjs +3 -3
- package/dist/examples/custom-routes.js +2 -2
- package/dist/openapi/index.cjs +8 -8
- package/dist/openapi/index.d.cts +1 -1
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-3VYVXSBB.js.map +0 -1
- package/dist/chunk-AKHG27NY.cjs.map +0 -1
- package/dist/chunk-LUGELV2V.js.map +0 -1
- package/dist/chunk-ZHTH5HQD.cjs.map +0 -1
package/dist/openapi/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var _chunkUULT6NOScjs = require('../chunk-UULT6NOS.cjs');
|
|
6
|
+
require('../chunk-HVKGDRTL.cjs');
|
|
7
7
|
require('../chunk-6TDYSPLC.cjs');
|
|
8
8
|
|
|
9
9
|
// src/openapi/loadSpec.ts
|
|
@@ -564,7 +564,7 @@ async function executeRequest(options) {
|
|
|
564
564
|
});
|
|
565
565
|
const text = await response.text();
|
|
566
566
|
if (!response.ok) {
|
|
567
|
-
throw new (0,
|
|
567
|
+
throw new (0, _chunkUULT6NOScjs.UserError)(
|
|
568
568
|
`${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
|
|
569
569
|
);
|
|
570
570
|
}
|
|
@@ -666,7 +666,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
|
|
|
666
666
|
const templateSegments = new Set(route.path.split("/"));
|
|
667
667
|
for (const segment of resolvedPath.split("/")) {
|
|
668
668
|
if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
|
|
669
|
-
throw new (0,
|
|
669
|
+
throw new (0, _chunkUULT6NOScjs.UserError)(
|
|
670
670
|
`${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
|
|
671
671
|
);
|
|
672
672
|
}
|
|
@@ -679,7 +679,7 @@ function encodeCookieValue(mapping, value) {
|
|
|
679
679
|
return encodePathComponent(text);
|
|
680
680
|
}
|
|
681
681
|
if (/[;,]/.test(text)) {
|
|
682
|
-
throw new (0,
|
|
682
|
+
throw new (0, _chunkUULT6NOScjs.UserError)(
|
|
683
683
|
`Cookie parameter "${mapping.name}" uses style "cookie" and its value contains ";" or ","`
|
|
684
684
|
);
|
|
685
685
|
}
|
|
@@ -933,7 +933,7 @@ async function fromOpenAPI(options) {
|
|
|
933
933
|
const selected = selectRoutes(routes, options);
|
|
934
934
|
const names = generateNames(selected, options.mcpNames);
|
|
935
935
|
const sharedDefs = buildSharedDefs(document);
|
|
936
|
-
const server = _nullishCoalesce(options.server, () => ( new (0,
|
|
936
|
+
const server = _nullishCoalesce(options.server, () => ( new (0, _chunkUULT6NOScjs.FastMCP)({
|
|
937
937
|
name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _35 => _35.info, 'optionalAccess', _36 => _36.title]))), () => ( "OpenAPI Server")),
|
|
938
938
|
version: _nullishCoalesce(options.version, () => ( "1.0.0"))
|
|
939
939
|
})));
|
|
@@ -979,7 +979,7 @@ async function fromOpenAPI(options) {
|
|
|
979
979
|
continue;
|
|
980
980
|
}
|
|
981
981
|
const outputSchemaJson = buildOutputSchema(route, sharedDefs);
|
|
982
|
-
const outputSchema = outputSchemaJson ?
|
|
982
|
+
const outputSchema = outputSchemaJson ? _chunkUULT6NOScjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
|
|
983
983
|
server.addTool({
|
|
984
984
|
description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
|
|
985
985
|
execute: async (args, context) => {
|
|
@@ -994,7 +994,7 @@ async function fromOpenAPI(options) {
|
|
|
994
994
|
return resolveToolResult(result, outputSchema);
|
|
995
995
|
},
|
|
996
996
|
name,
|
|
997
|
-
parameters:
|
|
997
|
+
parameters: _chunkUULT6NOScjs.jsonSchemaAdapter.call(void 0, flatSchema),
|
|
998
998
|
...outputSchema ? { outputSchema } : {}
|
|
999
999
|
});
|
|
1000
1000
|
}
|
package/dist/openapi/index.d.cts
CHANGED
package/dist/openapi/index.d.ts
CHANGED
package/dist/openapi/index.js
CHANGED