@neon/tools 2.14.1 → 2.14.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 +1 @@
1
- {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/lib/result.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAsC/D,eAAO,MAAM,YAAY,GAAU,KAAK,EACvC,OAAO,KAAK,KACV,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAExC,CAAC"}
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/lib/result.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA8C/D,eAAO,MAAM,YAAY,GAAU,KAAK,EACvC,OAAO,KAAK,KACV,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAExC,CAAC"}
@@ -7,6 +7,7 @@ async function toJsonSafe(value) {
7
7
  if (value instanceof Blob) return encodeBlob(value);
8
8
  if (value instanceof Date) return value.toISOString();
9
9
  if (Array.isArray(value)) return Promise.all(value.map(toJsonSafe));
10
+ if (typeof value === "object" && "toJSON" in value && typeof value.toJSON === "function") return toJsonSafe(value.toJSON());
10
11
  if (typeof value === "object") {
11
12
  const entries = await Promise.all(Object.entries(value).map(async ([key, child]) => [key, await toJsonSafe(child)]));
12
13
  return Object.fromEntries(entries);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neon/tools",
3
- "version": "2.14.1",
3
+ "version": "2.14.2",
4
4
  "description": "Agent tools for the Neon SDK ergonomic client, compatible with MCP, Eve, and Mastra.",
5
5
  "keywords": [
6
6
  "neon",