fastmcp 4.26.1 → 4.26.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 _chunkMT5SJOZ5cjs = require('../chunk-MT5SJOZ5.cjs');
5
- require('../chunk-UNS6EZVP.cjs');
4
+ var _chunkUULT6NOScjs = require('../chunk-UULT6NOS.cjs');
5
+ require('../chunk-HVKGDRTL.cjs');
6
6
  require('../chunk-6TDYSPLC.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, _chunkMT5SJOZ5cjs.FastMCP)({
15
+ var server = new (0, _chunkUULT6NOScjs.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-GUHJKVLX.js";
5
- import "../chunk-KYUSH4TQ.js";
4
+ } from "../chunk-ASOZUCE2.js";
5
+ import "../chunk-W6P57SNV.js";
6
6
  import "../chunk-OKKFL2M4.js";
7
7
 
8
8
  // src/examples/custom-routes.ts
@@ -2,8 +2,8 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkMT5SJOZ5cjs = require('../chunk-MT5SJOZ5.cjs');
6
- require('../chunk-UNS6EZVP.cjs');
5
+ var _chunkUULT6NOScjs = require('../chunk-UULT6NOS.cjs');
6
+ require('../chunk-HVKGDRTL.cjs');
7
7
  require('../chunk-6TDYSPLC.cjs');
8
8
 
9
9
  // src/openapi/loadSpec.ts
@@ -564,7 +564,7 @@ async function executeRequest(options) {
564
564
  });
565
565
  const text = await response.text();
566
566
  if (!response.ok) {
567
- throw new (0, _chunkMT5SJOZ5cjs.UserError)(
567
+ throw new (0, _chunkUULT6NOScjs.UserError)(
568
568
  `${options.route.method.toUpperCase()} ${path} failed with ${response.status}: ${text.slice(0, 2e3)}`
569
569
  );
570
570
  }
@@ -666,7 +666,7 @@ function assertNoSubstitutedDotSegments(route, resolvedPath) {
666
666
  const templateSegments = new Set(route.path.split("/"));
667
667
  for (const segment of resolvedPath.split("/")) {
668
668
  if ((segment === "." || segment === "..") && !templateSegments.has(segment)) {
669
- throw new (0, _chunkMT5SJOZ5cjs.UserError)(
669
+ throw new (0, _chunkUULT6NOScjs.UserError)(
670
670
  `${route.method.toUpperCase()} ${route.path}: path parameter values must not produce a "${segment}" path segment.`
671
671
  );
672
672
  }
@@ -679,7 +679,7 @@ function encodeCookieValue(mapping, value) {
679
679
  return encodePathComponent(text);
680
680
  }
681
681
  if (/[;,]/.test(text)) {
682
- throw new (0, _chunkMT5SJOZ5cjs.UserError)(
682
+ throw new (0, _chunkUULT6NOScjs.UserError)(
683
683
  `Cookie parameter "${mapping.name}" uses style "cookie" and its value contains ";" or ","`
684
684
  );
685
685
  }
@@ -933,7 +933,7 @@ async function fromOpenAPI(options) {
933
933
  const selected = selectRoutes(routes, options);
934
934
  const names = generateNames(selected, options.mcpNames);
935
935
  const sharedDefs = buildSharedDefs(document);
936
- const server = _nullishCoalesce(options.server, () => ( new (0, _chunkMT5SJOZ5cjs.FastMCP)({
936
+ const server = _nullishCoalesce(options.server, () => ( new (0, _chunkUULT6NOScjs.FastMCP)({
937
937
  name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _35 => _35.info, 'optionalAccess', _36 => _36.title]))), () => ( "OpenAPI Server")),
938
938
  version: _nullishCoalesce(options.version, () => ( "1.0.0"))
939
939
  })));
@@ -979,7 +979,7 @@ async function fromOpenAPI(options) {
979
979
  continue;
980
980
  }
981
981
  const outputSchemaJson = buildOutputSchema(route, sharedDefs);
982
- const outputSchema = outputSchemaJson ? _chunkMT5SJOZ5cjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
982
+ const outputSchema = outputSchemaJson ? _chunkUULT6NOScjs.jsonSchemaAdapter.call(void 0, outputSchemaJson) : void 0;
983
983
  server.addTool({
984
984
  description: _nullishCoalesce(route.summary, () => ( `${route.method.toUpperCase()} ${route.path}`)),
985
985
  execute: async (args, context) => {
@@ -994,7 +994,7 @@ async function fromOpenAPI(options) {
994
994
  return resolveToolResult(result, outputSchema);
995
995
  },
996
996
  name,
997
- parameters: _chunkMT5SJOZ5cjs.jsonSchemaAdapter.call(void 0, flatSchema),
997
+ parameters: _chunkUULT6NOScjs.jsonSchemaAdapter.call(void 0, flatSchema),
998
998
  ...outputSchema ? { outputSchema } : {}
999
999
  });
1000
1000
  }
@@ -11,7 +11,7 @@ import 'http';
11
11
  import 'mcp-proxy';
12
12
  import 'strict-event-emitter-types';
13
13
  import 'zod';
14
- import '../OAuthProvider-5T2VSp7V.cjs';
14
+ import '../OAuthProvider-B7VDZGyx.cjs';
15
15
  import 'node:http';
16
16
 
17
17
  /**
@@ -11,7 +11,7 @@ import 'http';
11
11
  import 'mcp-proxy';
12
12
  import 'strict-event-emitter-types';
13
13
  import 'zod';
14
- import '../OAuthProvider-5T2VSp7V.js';
14
+ import '../OAuthProvider-B7VDZGyx.js';
15
15
  import 'node:http';
16
16
 
17
17
  /**
@@ -2,8 +2,8 @@ import {
2
2
  FastMCP,
3
3
  UserError,
4
4
  jsonSchemaAdapter
5
- } from "../chunk-GUHJKVLX.js";
6
- import "../chunk-KYUSH4TQ.js";
5
+ } from "../chunk-ASOZUCE2.js";
6
+ import "../chunk-W6P57SNV.js";
7
7
  import "../chunk-OKKFL2M4.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.26.1",
3
+ "version": "4.26.2",
4
4
  "main": "dist/FastMCP.js",
5
5
  "scripts": {
6
6
  "build": "tsup",