fastmcp 4.28.1 → 4.28.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cancelResponseBody
3
- } from "./chunk-PWSYODM5.js";
3
+ } from "./chunk-76OY4FEK.js";
4
4
  import {
5
5
  objectRootSchema,
6
6
  strictInputSchema,
@@ -3706,4 +3706,4 @@ export {
3706
3706
  FastMCPSession,
3707
3707
  FastMCP
3708
3708
  };
3709
- //# sourceMappingURL=chunk-NRATQX66.js.map
3709
+ //# sourceMappingURL=chunk-MBIVAKUB.js.map
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
- var _chunk2ABBQFJBcjs = require('../chunk-2ABBQFJB.cjs');
5
- require('../chunk-3FM67CFK.cjs');
4
+ var _chunkGW5MENCIcjs = require('../chunk-GW5MENCI.cjs');
5
+ require('../chunk-HZJE6ZGH.cjs');
6
6
  require('../chunk-2NZFMD6I.cjs');
7
7
 
8
8
  // src/examples/custom-routes.ts
@@ -12,7 +12,7 @@ var users = /* @__PURE__ */ new Map([
12
12
  ["2", { email: "bob@example.com", id: "2", name: "Bob" }]
13
13
  ]);
14
14
  var requestCount = 0;
15
- var server = new (0, _chunk2ABBQFJBcjs.FastMCP)({
15
+ var server = new (0, _chunkGW5MENCIcjs.FastMCP)({
16
16
  // Simple authentication - in production, use proper tokens/JWTs
17
17
  authenticate: async (req) => {
18
18
  const authHeader = req.headers.authorization;
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  FastMCP
4
- } from "../chunk-NRATQX66.js";
5
- import "../chunk-PWSYODM5.js";
4
+ } from "../chunk-MBIVAKUB.js";
5
+ import "../chunk-76OY4FEK.js";
6
6
  import "../chunk-AM3HVK4Z.js";
7
7
 
8
8
  // src/examples/custom-routes.ts
@@ -2,8 +2,8 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk2ABBQFJBcjs = require('../chunk-2ABBQFJB.cjs');
6
- require('../chunk-3FM67CFK.cjs');
5
+ var _chunkGW5MENCIcjs = require('../chunk-GW5MENCI.cjs');
6
+ require('../chunk-HZJE6ZGH.cjs');
7
7
  require('../chunk-2NZFMD6I.cjs');
8
8
 
9
9
  // src/openapi/loadSpec.ts
@@ -606,7 +606,7 @@ async function executeRequest(options) {
606
606
  });
607
607
  const text = await response.text();
608
608
  if (!response.ok) {
609
- throw new (0, _chunk2ABBQFJBcjs.UserError)(
609
+ throw new (0, _chunkGW5MENCIcjs.UserError)(
610
610
  `${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
611
611
  );
612
612
  }
@@ -709,7 +709,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
709
709
  const templateSegments = new Set(route.path.split("/"));
710
710
  for (const segment of resolvedPath.split("/")) {
711
711
  if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
712
- throw new (0, _chunk2ABBQFJBcjs.UserError)(
712
+ throw new (0, _chunkGW5MENCIcjs.UserError)(
713
713
  `${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
714
714
  );
715
715
  }
@@ -722,7 +722,7 @@ function encodeCookieValue(mapping, value) {
722
722
  return encodePathComponent(text);
723
723
  }
724
724
  if (/[;,]/.test(text)) {
725
- throw new (0, _chunk2ABBQFJBcjs.UserError)(
725
+ throw new (0, _chunkGW5MENCIcjs.UserError)(
726
726
  `Cookie parameter "${mapping.name}" uses style "cookie" and its value contains ";" or ","`
727
727
  );
728
728
  }
@@ -995,7 +995,7 @@ async function fromOpenAPI(options) {
995
995
  const selected = selectRoutes(routes, options);
996
996
  const names = generateNames(selected, options.mcpNames);
997
997
  const sharedDefs = buildSharedDefs(document);
998
- const server = _nullishCoalesce(options.server, () => ( new (0, _chunk2ABBQFJBcjs.FastMCP)({
998
+ const server = _nullishCoalesce(options.server, () => ( new (0, _chunkGW5MENCIcjs.FastMCP)({
999
999
  name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _35 => _35.info, 'optionalAccess', _36 => _36.title]))), () => ( "OpenAPI Server")),
1000
1000
  version: _nullishCoalesce(options.version, () => ( "1.0.0"))
1001
1001
  })));
@@ -1041,7 +1041,7 @@ async function fromOpenAPI(options) {
1041
1041
  continue;
1042
1042
  }
1043
1043
  const outputSchemaJson = buildOutputSchema(route, sharedDefs);
1044
- const outputSchema = outputSchemaJson ? _chunk2ABBQFJBcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
1044
+ const outputSchema = outputSchemaJson ? _chunkGW5MENCIcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
1045
1045
  server.addTool({
1046
1046
  description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
1047
1047
  execute: async (args, context) => {
@@ -1056,7 +1056,7 @@ async function fromOpenAPI(options) {
1056
1056
  return resolveToolResult(result, outputSchema);
1057
1057
  },
1058
1058
  name,
1059
- parameters: _chunk2ABBQFJBcjs.jsonSchemaAdapter.call(void 0, flatSchema),
1059
+ parameters: _chunkGW5MENCIcjs.jsonSchemaAdapter.call(void 0, flatSchema),
1060
1060
  ...outputSchema ? { outputSchema } : {}
1061
1061
  });
1062
1062
  }
@@ -2,8 +2,8 @@ import {
2
2
  FastMCP,
3
3
  UserError,
4
4
  jsonSchemaAdapter
5
- } from "../chunk-NRATQX66.js";
6
- import "../chunk-PWSYODM5.js";
5
+ } from "../chunk-MBIVAKUB.js";
6
+ import "../chunk-76OY4FEK.js";
7
7
  import "../chunk-AM3HVK4Z.js";
8
8
 
9
9
  // src/openapi/loadSpec.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastmcp",
3
- "version": "4.28.1",
3
+ "version": "4.28.2",
4
4
  "main": "dist/FastMCP.js",
5
5
  "scripts": {
6
6
  "build": "tsup",