fastmcp 4.23.10 → 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.
- package/dist/FastMCP.cjs +2 -2
- package/dist/FastMCP.js +1 -1
- package/dist/{chunk-B77E3EDN.cjs → chunk-X5ITW7FV.cjs} +17 -3
- package/dist/chunk-X5ITW7FV.cjs.map +1 -0
- package/dist/{chunk-EHTAPWBU.js → chunk-XUUJOVC7.js} +17 -3
- package/dist/chunk-XUUJOVC7.js.map +1 -0
- package/dist/examples/custom-routes.cjs +2 -2
- package/dist/examples/custom-routes.js +1 -1
- package/dist/openapi/index.cjs +6 -6
- package/dist/openapi/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-B77E3EDN.cjs.map +0 -1
- package/dist/chunk-EHTAPWBU.js.map +0 -1
package/dist/FastMCP.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkX5ITW7FVcjs = require('./chunk-X5ITW7FV.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -50,5 +50,5 @@ require('./chunk-6TDYSPLC.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
exports.AuthProvider = _chunk4OWHPJELcjs.AuthProvider; exports.AzureProvider = _chunk4OWHPJELcjs.AzureProvider; exports.DiscoveryDocumentCache =
|
|
53
|
+
exports.AuthProvider = _chunk4OWHPJELcjs.AuthProvider; exports.AzureProvider = _chunk4OWHPJELcjs.AzureProvider; exports.DiscoveryDocumentCache = _chunkX5ITW7FVcjs.DiscoveryDocumentCache; exports.FastMCP = _chunkX5ITW7FVcjs.FastMCP; exports.FastMCPError = _chunkX5ITW7FVcjs.FastMCPError; exports.FastMCPSession = _chunkX5ITW7FVcjs.FastMCPSession; exports.GitHubProvider = _chunk4OWHPJELcjs.GitHubProvider; exports.GoogleProvider = _chunk4OWHPJELcjs.GoogleProvider; exports.MEDIA_FETCH_TIMEOUT_MS = _chunkX5ITW7FVcjs.MEDIA_FETCH_TIMEOUT_MS; exports.OAuthProvider = _chunk4OWHPJELcjs.OAuthProvider; exports.ServerState = _chunkX5ITW7FVcjs.ServerState; exports.SessionError = _chunkX5ITW7FVcjs.SessionError; exports.UnexpectedStateError = _chunkX5ITW7FVcjs.UnexpectedStateError; exports.UserError = _chunkX5ITW7FVcjs.UserError; exports.audioContent = _chunkX5ITW7FVcjs.audioContent; exports.getAuthSession = _chunk4OWHPJELcjs.getAuthSession; exports.imageContent = _chunkX5ITW7FVcjs.imageContent; exports.jsonSchemaAdapter = _chunkX5ITW7FVcjs.jsonSchemaAdapter; exports.requireAll = _chunk4OWHPJELcjs.requireAll; exports.requireAny = _chunk4OWHPJELcjs.requireAny; exports.requireAuth = _chunk4OWHPJELcjs.requireAuth; exports.requireRole = _chunk4OWHPJELcjs.requireRole; exports.requireScopes = _chunk4OWHPJELcjs.requireScopes;
|
|
54
54
|
//# sourceMappingURL=FastMCP.cjs.map
|
package/dist/FastMCP.js
CHANGED
|
@@ -1451,7 +1451,6 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
1451
1451
|
if (!match) {
|
|
1452
1452
|
continue;
|
|
1453
1453
|
}
|
|
1454
|
-
const uri = uriTemplate.fill(match);
|
|
1455
1454
|
const result = await resourceTemplate.load(
|
|
1456
1455
|
match,
|
|
1457
1456
|
this.#auth,
|
|
@@ -1468,7 +1467,9 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
1468
1467
|
description: resourceTemplate.description,
|
|
1469
1468
|
mimeType: _nullishCoalesce(resource2.mimeType, () => ( resourceTemplate.mimeType)),
|
|
1470
1469
|
name: resourceTemplate.name,
|
|
1471
|
-
|
|
1470
|
+
// The URI asked for. Refilling the template from `match` can
|
|
1471
|
+
// spell it differently: `{path}` refills `a,b` as `a%2Cb`.
|
|
1472
|
+
uri: _nullishCoalesce(resource2.uri, () => ( request.params.uri))
|
|
1472
1473
|
}))
|
|
1473
1474
|
};
|
|
1474
1475
|
}
|
|
@@ -1879,6 +1880,19 @@ function matchUriTemplate(template, uri) {
|
|
|
1879
1880
|
if (!match) {
|
|
1880
1881
|
return void 0;
|
|
1881
1882
|
}
|
|
1883
|
+
const scalarNames = new Set(template.varNames);
|
|
1884
|
+
for (const [expression] of template.template.matchAll(/\{[^}]*\}/g)) {
|
|
1885
|
+
if (/^\{[?&]/.test(expression) || expression.includes("*")) {
|
|
1886
|
+
for (const name of _uritemplates2.default.call(void 0, expression).varNames) {
|
|
1887
|
+
scalarNames.delete(name);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
for (const [name, value] of Object.entries(match)) {
|
|
1892
|
+
if (scalarNames.has(name) && Array.isArray(value)) {
|
|
1893
|
+
match[name] = value.join(",");
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1882
1896
|
const checksQuery = !/\{[?&]/.test(template.template);
|
|
1883
1897
|
const checksFragment = !template.template.includes("{#");
|
|
1884
1898
|
const shape = (value) => [
|
|
@@ -3341,4 +3355,4 @@ var FastMCP = class extends FastMCPEventEmitter {
|
|
|
3341
3355
|
|
|
3342
3356
|
|
|
3343
3357
|
exports.DiscoveryDocumentCache = DiscoveryDocumentCache; exports.jsonSchemaAdapter = jsonSchemaAdapter; exports.MEDIA_FETCH_TIMEOUT_MS = MEDIA_FETCH_TIMEOUT_MS; exports.imageContent = imageContent; exports.audioContent = audioContent; exports.FastMCPError = FastMCPError; exports.SessionError = SessionError; exports.UnexpectedStateError = UnexpectedStateError; exports.UserError = UserError; exports.ServerState = ServerState; exports.FastMCPSession = FastMCPSession; exports.FastMCP = FastMCP;
|
|
3344
|
-
//# sourceMappingURL=chunk-
|
|
3358
|
+
//# sourceMappingURL=chunk-X5ITW7FV.cjs.map
|