fastmcp 4.23.9 → 4.23.11

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 _chunkPV5VLW7Rcjs = require('../chunk-PV5VLW7R.cjs');
4
+ var _chunkX5ITW7FVcjs = require('../chunk-X5ITW7FV.cjs');
5
5
  require('../chunk-4OWHPJEL.cjs');
6
6
  require('../chunk-6TDYSPLC.cjs');
7
7
 
@@ -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, _chunkPV5VLW7Rcjs.FastMCP)({
15
+ var server = new (0, _chunkX5ITW7FVcjs.FastMCP)({
16
16
  // Simple authentication - in production, use proper tokens/JWTs
17
17
  authenticate: async (req) => {
18
18
  const authHeader = req.headers.authorization;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  FastMCP
4
- } from "../chunk-75ZLE5AS.js";
4
+ } from "../chunk-XUUJOVC7.js";
5
5
  import "../chunk-G44SPVP7.js";
6
6
  import "../chunk-OKKFL2M4.js";
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkPV5VLW7Rcjs = require('../chunk-PV5VLW7R.cjs');
5
+ var _chunkX5ITW7FVcjs = require('../chunk-X5ITW7FV.cjs');
6
6
  require('../chunk-4OWHPJEL.cjs');
7
7
  require('../chunk-6TDYSPLC.cjs');
8
8
 
@@ -141,7 +141,7 @@ async function executeRequest(options) {
141
141
  });
142
142
  const text = await response.text();
143
143
  if (!response.ok) {
144
- throw new (0, _chunkPV5VLW7Rcjs.UserError)(
144
+ throw new (0, _chunkX5ITW7FVcjs.UserError)(
145
145
  `${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
146
146
  );
147
147
  }
@@ -243,7 +243,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
243
243
  const templateSegments = new Set(route.path.split("/"));
244
244
  for (const segment of resolvedPath.split("/")) {
245
245
  if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
246
- throw new (0, _chunkPV5VLW7Rcjs.UserError)(
246
+ throw new (0, _chunkX5ITW7FVcjs.UserError)(
247
247
  `${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
248
248
  );
249
249
  }
@@ -783,7 +783,7 @@ async function fromOpenAPI(options) {
783
783
  const selected = selectRoutes(routes, options);
784
784
  const names = generateNames(selected, options.mcpNames);
785
785
  const sharedDefs = buildSharedDefs(document);
786
- const server = _nullishCoalesce(options.server, () => ( new (0, _chunkPV5VLW7Rcjs.FastMCP)({
786
+ const server = _nullishCoalesce(options.server, () => ( new (0, _chunkX5ITW7FVcjs.FastMCP)({
787
787
  name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _31 => _31.info, 'optionalAccess', _32 => _32.title]))), () => ( "OpenAPI Server")),
788
788
  version: _nullishCoalesce(options.version, () => ( "1.0.0"))
789
789
  })));
@@ -829,7 +829,7 @@ async function fromOpenAPI(options) {
829
829
  continue;
830
830
  }
831
831
  const outputSchemaJson = buildOutputSchema(route, sharedDefs);
832
- const outputSchema = outputSchemaJson ? _chunkPV5VLW7Rcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
832
+ const outputSchema = outputSchemaJson ? _chunkX5ITW7FVcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
833
833
  server.addTool({
834
834
  description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
835
835
  execute: async (args) => {
@@ -842,7 +842,7 @@ async function fromOpenAPI(options) {
842
842
  return resolveToolResult(result, outputSchema);
843
843
  },
844
844
  name,
845
- parameters: _chunkPV5VLW7Rcjs.jsonSchemaAdapter.call(void 0, flatSchema),
845
+ parameters: _chunkX5ITW7FVcjs.jsonSchemaAdapter.call(void 0, flatSchema),
846
846
  ...outputSchema ? { outputSchema } : {}
847
847
  });
848
848
  }
@@ -2,7 +2,7 @@ import {
2
2
  FastMCP,
3
3
  UserError,
4
4
  jsonSchemaAdapter
5
- } from "../chunk-75ZLE5AS.js";
5
+ } from "../chunk-XUUJOVC7.js";
6
6
  import "../chunk-G44SPVP7.js";
7
7
  import "../chunk-OKKFL2M4.js";
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastmcp",
3
- "version": "4.23.9",
3
+ "version": "4.23.11",
4
4
  "main": "dist/FastMCP.js",
5
5
  "scripts": {
6
6
  "build": "tsup",