@frontmcp/utils
Advanced tools
+13
-0
@@ -31,2 +31,15 @@ /** | ||
| /** | ||
| * Walk a JSON-like value and return the first non-finite number encountered | ||
| * (`Infinity`, `-Infinity`, or `NaN`), or `undefined` if all numbers are | ||
| * finite. Used by the SDK to reject tool/resource output that would silently | ||
| * be serialized as `null` by `JSON.stringify`. | ||
| * | ||
| * Cycles in the input tree are not expected (callers run sanitizeToJson | ||
| * first, which drops them) but we guard with a WeakSet anyway. | ||
| */ | ||
| export declare function findNonFiniteNumber(value: unknown): { | ||
| path: string; | ||
| value: number; | ||
| } | undefined; | ||
| /** | ||
| * Infer MIME type from file extension or content. | ||
@@ -33,0 +46,0 @@ * |
@@ -1,1 +0,1 @@ | ||
| export { sanitizeToJson, inferMimeType } from './content'; | ||
| export { sanitizeToJson, inferMimeType, findNonFiniteNumber } from './content'; |
+1
-1
@@ -13,3 +13,3 @@ /** | ||
| export { trimSlashes, joinPath, pathResolve, pathJoin, basename, dirname, extname } from './path'; | ||
| export { sanitizeToJson, inferMimeType } from './content'; | ||
| export { sanitizeToJson, inferMimeType, findNonFiniteNumber } from './content'; | ||
| export { validateBaseUrl, buildSetCookie, parseCookies, getCookie, isLocalhost, isSecureRequest } from './http'; | ||
@@ -16,0 +16,0 @@ export type { CookieOptions, SecureDetectionRequest } from './http'; |
+2
-2
| { | ||
| "name": "@frontmcp/utils", | ||
| "version": "1.1.0", | ||
| "version": "1.1.1", | ||
| "description": "Shared utility functions for FrontMCP - string manipulation, URI handling, path utilities, and more", | ||
@@ -37,3 +37,3 @@ "author": "AgentFront <info@agentfront.dev>", | ||
| "ioredis": "^5.0.0", | ||
| "@frontmcp/lazy-zod": "1.1.0" | ||
| "@frontmcp/lazy-zod": "1.1.1" | ||
| }, | ||
@@ -40,0 +40,0 @@ "peerDependenciesMeta": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
581645
0.37%17392
0.38%