fastmcp 4.22.9 → 4.22.10

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 _chunkYDWOFVQNcjs = require('../chunk-YDWOFVQN.cjs');
4
+ var _chunkRE2YJZA6cjs = require('../chunk-RE2YJZA6.cjs');
5
5
  require('../chunk-YLLBANV4.cjs');
6
6
  require('../chunk-O22SYZMC.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, _chunkYDWOFVQNcjs.FastMCP)({
15
+ var server = new (0, _chunkRE2YJZA6cjs.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-PVW7IVUE.js";
4
+ } from "../chunk-RVBVCLCO.js";
5
5
  import "../chunk-ISYL7EKR.js";
6
6
  import "../chunk-UMDUIBFW.js";
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkYDWOFVQNcjs = require('../chunk-YDWOFVQN.cjs');
5
+ var _chunkRE2YJZA6cjs = require('../chunk-RE2YJZA6.cjs');
6
6
  require('../chunk-YLLBANV4.cjs');
7
7
  require('../chunk-O22SYZMC.cjs');
8
8
 
@@ -135,7 +135,7 @@ async function executeRequest(options) {
135
135
  });
136
136
  const text = await response.text();
137
137
  if (!response.ok) {
138
- throw new (0, _chunkYDWOFVQNcjs.UserError)(
138
+ throw new (0, _chunkRE2YJZA6cjs.UserError)(
139
139
  `${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
140
140
  );
141
141
  }
@@ -237,7 +237,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
237
237
  const templateSegments = new Set(route.path.split("/"));
238
238
  for (const segment of resolvedPath.split("/")) {
239
239
  if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
240
- throw new (0, _chunkYDWOFVQNcjs.UserError)(
240
+ throw new (0, _chunkRE2YJZA6cjs.UserError)(
241
241
  `${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
242
242
  );
243
243
  }
@@ -752,7 +752,7 @@ async function fromOpenAPI(options) {
752
752
  const selected = selectRoutes(routes, options);
753
753
  const names = generateNames(selected, options.mcpNames);
754
754
  const sharedDefs = buildSharedDefs(document);
755
- const server = _nullishCoalesce(options.server, () => ( new (0, _chunkYDWOFVQNcjs.FastMCP)({
755
+ const server = _nullishCoalesce(options.server, () => ( new (0, _chunkRE2YJZA6cjs.FastMCP)({
756
756
  name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _29 => _29.info, 'optionalAccess', _30 => _30.title]))), () => ( "OpenAPI Server")),
757
757
  version: _nullishCoalesce(options.version, () => ( "1.0.0"))
758
758
  })));
@@ -798,7 +798,7 @@ async function fromOpenAPI(options) {
798
798
  continue;
799
799
  }
800
800
  const outputSchemaJson = buildOutputSchema(route, sharedDefs);
801
- const outputSchema = outputSchemaJson ? _chunkYDWOFVQNcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
801
+ const outputSchema = outputSchemaJson ? _chunkRE2YJZA6cjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
802
802
  server.addTool({
803
803
  description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
804
804
  execute: async (args) => {
@@ -811,7 +811,7 @@ async function fromOpenAPI(options) {
811
811
  return resolveToolResult(result, outputSchema);
812
812
  },
813
813
  name,
814
- parameters: _chunkYDWOFVQNcjs.jsonSchemaAdapter.call(void 0, flatSchema),
814
+ parameters: _chunkRE2YJZA6cjs.jsonSchemaAdapter.call(void 0, flatSchema),
815
815
  ...outputSchema ? { outputSchema } : {}
816
816
  });
817
817
  }
@@ -2,7 +2,7 @@ import {
2
2
  FastMCP,
3
3
  UserError,
4
4
  jsonSchemaAdapter
5
- } from "../chunk-PVW7IVUE.js";
5
+ } from "../chunk-RVBVCLCO.js";
6
6
  import "../chunk-ISYL7EKR.js";
7
7
  import "../chunk-UMDUIBFW.js";
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastmcp",
3
- "version": "4.22.9",
3
+ "version": "4.22.10",
4
4
  "main": "dist/FastMCP.js",
5
5
  "scripts": {
6
6
  "build": "tsup",