fastmcp 4.29.1 → 4.29.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,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
- var _chunk5EEESM57cjs = require('../chunk-5EEESM57.cjs');
5
- require('../chunk-UHJQUSUX.cjs');
4
+ var _chunkTN6CWWVWcjs = require('../chunk-TN6CWWVW.cjs');
5
+ require('../chunk-XP4NENWX.cjs');
6
6
  require('../chunk-FBDPX4H2.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, _chunk5EEESM57cjs.FastMCP)({
15
+ var server = new (0, _chunkTN6CWWVWcjs.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-VN5SZ6IE.js";
5
- import "../chunk-RWPENEKV.js";
4
+ } from "../chunk-T7EFBHCA.js";
5
+ import "../chunk-PA3GWZUK.js";
6
6
  import "../chunk-JCKJRUCE.js";
7
7
 
8
8
  // src/examples/custom-routes.ts
@@ -2,8 +2,8 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk5EEESM57cjs = require('../chunk-5EEESM57.cjs');
6
- require('../chunk-UHJQUSUX.cjs');
5
+ var _chunkTN6CWWVWcjs = require('../chunk-TN6CWWVW.cjs');
6
+ require('../chunk-XP4NENWX.cjs');
7
7
  require('../chunk-FBDPX4H2.cjs');
8
8
 
9
9
  // src/openapi/loadSpec.ts
@@ -632,7 +632,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
632
632
  const templateSegments = new Set(route.path.split("/"));
633
633
  for (const segment of resolvedPath.split("/")) {
634
634
  if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
635
- throw new (0, _chunk5EEESM57cjs.UserError)(
635
+ throw new (0, _chunkTN6CWWVWcjs.UserError)(
636
636
  `${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
637
637
  );
638
638
  }
@@ -645,7 +645,7 @@ function encodeCookieValue(mapping, value) {
645
645
  return encodePathComponent(text);
646
646
  }
647
647
  if (/[;,]/.test(text)) {
648
- throw new (0, _chunk5EEESM57cjs.UserError)(
648
+ throw new (0, _chunkTN6CWWVWcjs.UserError)(
649
649
  `Cookie parameter "${mapping.name}" uses style "cookie" and its value contains ";" or ","`
650
650
  );
651
651
  }
@@ -780,7 +780,7 @@ async function fetchResponse(options) {
780
780
  });
781
781
  if (!response.ok) {
782
782
  const text = await response.text();
783
- throw new (0, _chunk5EEESM57cjs.UserError)(
783
+ throw new (0, _chunkTN6CWWVWcjs.UserError)(
784
784
  `${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
785
785
  );
786
786
  }
@@ -1043,7 +1043,7 @@ async function fromOpenAPI(options) {
1043
1043
  const selected = selectRoutes(routes, options);
1044
1044
  const names = generateNames(selected, options.mcpNames);
1045
1045
  const sharedDefs = buildSharedDefs(document);
1046
- const server = _nullishCoalesce(options.server, () => ( new (0, _chunk5EEESM57cjs.FastMCP)({
1046
+ const server = _nullishCoalesce(options.server, () => ( new (0, _chunkTN6CWWVWcjs.FastMCP)({
1047
1047
  name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _45 => _45.info, 'optionalAccess', _46 => _46.title]))), () => ( "OpenAPI Server")),
1048
1048
  version: _nullishCoalesce(options.version, () => ( "1.0.0"))
1049
1049
  })));
@@ -1089,7 +1089,7 @@ async function fromOpenAPI(options) {
1089
1089
  continue;
1090
1090
  }
1091
1091
  const outputSchemaJson = buildOutputSchema(route, sharedDefs);
1092
- const outputSchema = outputSchemaJson ? _chunk5EEESM57cjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
1092
+ const outputSchema = outputSchemaJson ? _chunkTN6CWWVWcjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
1093
1093
  server.addTool({
1094
1094
  description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
1095
1095
  execute: async (args, context) => {
@@ -1104,7 +1104,7 @@ async function fromOpenAPI(options) {
1104
1104
  return resolveToolResult(result, outputSchema);
1105
1105
  },
1106
1106
  name,
1107
- parameters: _chunk5EEESM57cjs.jsonSchemaAdapter.call(void 0, flatSchema),
1107
+ parameters: _chunkTN6CWWVWcjs.jsonSchemaAdapter.call(void 0, flatSchema),
1108
1108
  ...outputSchema ? { outputSchema } : {}
1109
1109
  });
1110
1110
  }
@@ -2,8 +2,8 @@ import {
2
2
  FastMCP,
3
3
  UserError,
4
4
  jsonSchemaAdapter
5
- } from "../chunk-VN5SZ6IE.js";
6
- import "../chunk-RWPENEKV.js";
5
+ } from "../chunk-T7EFBHCA.js";
6
+ import "../chunk-PA3GWZUK.js";
7
7
  import "../chunk-JCKJRUCE.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.29.1",
3
+ "version": "4.29.2",
4
4
  "main": "dist/FastMCP.js",
5
5
  "scripts": {
6
6
  "build": "tsup",