fastmcp 4.23.0 → 4.23.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.
@@ -2,8 +2,8 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkX7KNHPR4cjs = require('../chunk-X7KNHPR4.cjs');
6
- require('../chunk-YLLBANV4.cjs');
5
+ var _chunkTBJSX5UFcjs = require('../chunk-TBJSX5UF.cjs');
6
+ require('../chunk-C7TBI7A5.cjs');
7
7
  require('../chunk-O22SYZMC.cjs');
8
8
 
9
9
  // src/openapi/loadSpec.ts
@@ -140,7 +140,7 @@ async function executeRequest(options) {
140
140
  });
141
141
  const text = await response.text();
142
142
  if (!response.ok) {
143
- throw new (0, _chunkX7KNHPR4cjs.UserError)(
143
+ throw new (0, _chunkTBJSX5UFcjs.UserError)(
144
144
  `${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
145
145
  );
146
146
  }
@@ -242,7 +242,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
242
242
  const templateSegments = new Set(route.path.split("/"));
243
243
  for (const segment of resolvedPath.split("/")) {
244
244
  if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
245
- throw new (0, _chunkX7KNHPR4cjs.UserError)(
245
+ throw new (0, _chunkTBJSX5UFcjs.UserError)(
246
246
  `${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
247
247
  );
248
248
  }
@@ -776,7 +776,7 @@ async function fromOpenAPI(options) {
776
776
  const selected = selectRoutes(routes, options);
777
777
  const names = generateNames(selected, options.mcpNames);
778
778
  const sharedDefs = buildSharedDefs(document);
779
- const server = _nullishCoalesce(options.server, () => ( new (0, _chunkX7KNHPR4cjs.FastMCP)({
779
+ const server = _nullishCoalesce(options.server, () => ( new (0, _chunkTBJSX5UFcjs.FastMCP)({
780
780
  name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _32 => _32.info, 'optionalAccess', _33 => _33.title]))), () => ( "OpenAPI Server")),
781
781
  version: _nullishCoalesce(options.version, () => ( "1.0.0"))
782
782
  })));
@@ -822,7 +822,7 @@ async function fromOpenAPI(options) {
822
822
  continue;
823
823
  }
824
824
  const outputSchemaJson = buildOutputSchema(route, sharedDefs);
825
- const outputSchema = outputSchemaJson ? _chunkX7KNHPR4cjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
825
+ const outputSchema = outputSchemaJson ? _chunkTBJSX5UFcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
826
826
  server.addTool({
827
827
  description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
828
828
  execute: async (args) => {
@@ -835,7 +835,7 @@ async function fromOpenAPI(options) {
835
835
  return resolveToolResult(result, outputSchema);
836
836
  },
837
837
  name,
838
- parameters: _chunkX7KNHPR4cjs.jsonSchemaAdapter.call(void 0, flatSchema),
838
+ parameters: _chunkTBJSX5UFcjs.jsonSchemaAdapter.call(void 0, flatSchema),
839
839
  ...outputSchema ? { outputSchema } : {}
840
840
  });
841
841
  }
@@ -2,8 +2,8 @@ import {
2
2
  FastMCP,
3
3
  UserError,
4
4
  jsonSchemaAdapter
5
- } from "../chunk-ETHWZXZK.js";
6
- import "../chunk-ISYL7EKR.js";
5
+ } from "../chunk-G6TNGO7A.js";
6
+ import "../chunk-CA2EPNZF.js";
7
7
  import "../chunk-UMDUIBFW.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.23.0",
3
+ "version": "4.23.2",
4
4
  "main": "dist/FastMCP.js",
5
5
  "scripts": {
6
6
  "build": "tsup",