fastmcp 4.20.3 → 4.20.4

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
- var _chunkX4AKKWFDcjs = require('../chunk-X4AKKWFD.cjs');
4
+ var _chunkXU6TVDEGcjs = require('../chunk-XU6TVDEG.cjs');
5
5
  require('../chunk-YO76IUZ6.cjs');
6
6
 
7
7
  // src/examples/custom-routes.ts
@@ -11,7 +11,7 @@ var users = /* @__PURE__ */ new Map([
11
11
  ["2", { email: "bob@example.com", id: "2", name: "Bob" }]
12
12
  ]);
13
13
  var requestCount = 0;
14
- var server = new (0, _chunkX4AKKWFDcjs.FastMCP)({
14
+ var server = new (0, _chunkXU6TVDEGcjs.FastMCP)({
15
15
  // Simple authentication - in production, use proper tokens/JWTs
16
16
  authenticate: async (req) => {
17
17
  const authHeader = req.headers.authorization;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  FastMCP
4
- } from "../chunk-KBWJEPOD.js";
4
+ } from "../chunk-2UDJ6Y3G.js";
5
5
  import "../chunk-LRXZYGFR.js";
6
6
 
7
7
  // src/examples/custom-routes.ts
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkX4AKKWFDcjs = require('../chunk-X4AKKWFD.cjs');
5
+ var _chunkXU6TVDEGcjs = require('../chunk-XU6TVDEG.cjs');
6
6
  require('../chunk-YO76IUZ6.cjs');
7
7
 
8
8
  // src/openapi/loadSpec.ts
@@ -122,7 +122,7 @@ async function executeRequest(options) {
122
122
  });
123
123
  const text = await response.text();
124
124
  if (!response.ok) {
125
- throw new (0, _chunkX4AKKWFDcjs.UserError)(
125
+ throw new (0, _chunkXU6TVDEGcjs.UserError)(
126
126
  `${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
127
127
  );
128
128
  }
@@ -629,7 +629,7 @@ async function fromOpenAPI(options) {
629
629
  const selected = selectRoutes(routes, options);
630
630
  const names = generateNames(selected, options.mcpNames);
631
631
  const sharedDefs = buildSharedDefs(document);
632
- const server = _nullishCoalesce(options.server, () => ( new (0, _chunkX4AKKWFDcjs.FastMCP)({
632
+ const server = _nullishCoalesce(options.server, () => ( new (0, _chunkXU6TVDEGcjs.FastMCP)({
633
633
  name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _27 => _27.info, 'optionalAccess', _28 => _28.title]))), () => ( "OpenAPI Server")),
634
634
  version: _nullishCoalesce(options.version, () => ( "1.0.0"))
635
635
  })));
@@ -675,7 +675,7 @@ async function fromOpenAPI(options) {
675
675
  continue;
676
676
  }
677
677
  const outputSchemaJson = buildOutputSchema(route, sharedDefs);
678
- const outputSchema = outputSchemaJson ? _chunkX4AKKWFDcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
678
+ const outputSchema = outputSchemaJson ? _chunkXU6TVDEGcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
679
679
  server.addTool({
680
680
  description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
681
681
  execute: async (args) => {
@@ -688,7 +688,7 @@ async function fromOpenAPI(options) {
688
688
  return resolveToolResult(result, outputSchema);
689
689
  },
690
690
  name,
691
- parameters: _chunkX4AKKWFDcjs.jsonSchemaAdapter.call(void 0, flatSchema),
691
+ parameters: _chunkXU6TVDEGcjs.jsonSchemaAdapter.call(void 0, flatSchema),
692
692
  ...outputSchema ? { outputSchema } : {}
693
693
  });
694
694
  }
@@ -2,7 +2,7 @@ import {
2
2
  FastMCP,
3
3
  UserError,
4
4
  jsonSchemaAdapter
5
- } from "../chunk-KBWJEPOD.js";
5
+ } from "../chunk-2UDJ6Y3G.js";
6
6
  import "../chunk-LRXZYGFR.js";
7
7
 
8
8
  // src/openapi/loadSpec.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastmcp",
3
- "version": "4.20.3",
3
+ "version": "4.20.4",
4
4
  "main": "dist/FastMCP.js",
5
5
  "scripts": {
6
6
  "build": "tsup",