@composio/json-schema-to-zod 0.4.1 → 0.4.3
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.
|
@@ -539,7 +539,7 @@ const toUnicodePattern = (pattern) => {
|
|
|
539
539
|
} else if (escaped === "x" || escaped === "u") {
|
|
540
540
|
const length = escaped === "x" ? 2 : 4;
|
|
541
541
|
const digits = pattern.slice(index + 2, index + 2 + length);
|
|
542
|
-
if (digits.length === length &&
|
|
542
|
+
if (digits.length === length && Array.from(digits).every((digit) => HEX_DIGIT.test(digit))) {
|
|
543
543
|
rewritten += `\\${escaped}${digits}`;
|
|
544
544
|
index += 2 + length;
|
|
545
545
|
} else {
|
|
@@ -1152,7 +1152,7 @@ const parseString = (jsonSchema, ctx) => {
|
|
|
1152
1152
|
if (maxLength !== void 0) result = backend.refine(result, (value) => codePointLength(value) <= maxLength, errorMessages?.maxLength ?? `String must contain at most ${maxLength} character(s)`);
|
|
1153
1153
|
return result;
|
|
1154
1154
|
};
|
|
1155
|
-
const codePointLength = (value) =>
|
|
1155
|
+
const codePointLength = (value) => Array.from(value).length;
|
|
1156
1156
|
const isBase64Encoding = (encoding) => typeof encoding === "string" && encoding.toLowerCase() === "base64";
|
|
1157
1157
|
|
|
1158
1158
|
// src/parsers/parse-typeless-constraints.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as composeGuards, i as buildTuple, n as InvalidPatternError, o as run, r as applyObjectPolicy, s as withPath, t as createConverter } from "./convert-
|
|
1
|
+
import { a as composeGuards, i as buildTuple, n as InvalidPatternError, o as run, r as applyObjectPolicy, s as withPath, t as createConverter } from "./convert-SbPFhwZe.mjs";
|
|
2
2
|
import * as z from "zod/v3";
|
|
3
3
|
|
|
4
4
|
// src/backend/zod-v3.ts
|
package/dist/v4.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as composeGuards, i as buildTuple, n as InvalidPatternError, o as run, r as applyObjectPolicy, s as withPath, t as createConverter } from "./convert-
|
|
1
|
+
import { a as composeGuards, i as buildTuple, n as InvalidPatternError, o as run, r as applyObjectPolicy, s as withPath, t as createConverter } from "./convert-SbPFhwZe.mjs";
|
|
2
2
|
import { version } from "zod/v4/core";
|
|
3
3
|
import * as z from "zod/v4";
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composio/json-schema-to-zod",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
],
|
|
41
41
|
"license": "ISC",
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@ai-sdk/provider-utils": "^5.0.
|
|
44
|
-
"@langchain/core": "^1.
|
|
43
|
+
"@ai-sdk/provider-utils": "^5.0.85",
|
|
44
|
+
"@langchain/core": "^1.5.1",
|
|
45
45
|
"@types/json-schema": "^7.0.15",
|
|
46
|
-
"@types/node": "^26.6.
|
|
46
|
+
"@types/node": "^26.6.11",
|
|
47
47
|
"ajv": "^8.20.0",
|
|
48
|
-
"fast-check": "^4.
|
|
48
|
+
"fast-check": "^4.11.0",
|
|
49
49
|
"tsdown": "^0.23.7",
|
|
50
50
|
"typescript": "^7.0.2",
|
|
51
51
|
"vitest": "^5.1.0",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"zod": ">=3.25.76 <5"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@cfworker/json-schema": "^4.1.
|
|
61
|
+
"@cfworker/json-schema": "^4.1.7",
|
|
62
62
|
"dequal": "^2.0.3",
|
|
63
|
-
"re2js": "^2.
|
|
63
|
+
"re2js": "^2.10.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"clean": "git clean -xdf node_modules",
|