@trigger.dev/schema-to-json 0.0.0-prerelease-20260909071038 → 0.0.0-prerelease-streamfix-20260909094302
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/commonjs/index.js +12 -61
- package/dist/commonjs/index.js.map +1 -1
- package/dist/esm/index.js +12 -61
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -6
package/dist/commonjs/index.js
CHANGED
|
@@ -37,7 +37,7 @@ exports.schemaToJsonSchema = schemaToJsonSchema;
|
|
|
37
37
|
exports.canConvertSchema = canConvertSchema;
|
|
38
38
|
exports.isZodSchema = isZodSchema;
|
|
39
39
|
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
40
|
-
const z4 = __importStar(require("zod/v4
|
|
40
|
+
const z4 = __importStar(require("zod/v4"));
|
|
41
41
|
const yup_to_json_schema_1 = require("@sodaru/yup-to-json-schema");
|
|
42
42
|
const effect_1 = require("effect");
|
|
43
43
|
/**
|
|
@@ -53,19 +53,8 @@ const effect_1 = require("effect");
|
|
|
53
53
|
* @returns The conversion result or undefined if conversion is not possible
|
|
54
54
|
*/
|
|
55
55
|
function schemaToJsonSchema(schema, options) {
|
|
56
|
-
if (schema === null || (typeof schema !== "object" && typeof schema !== "function")) {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
56
|
const parser = schema;
|
|
60
|
-
if (
|
|
61
|
-
const jsonSchema = convertZodSchema(parser, options);
|
|
62
|
-
if (jsonSchema) {
|
|
63
|
-
return {
|
|
64
|
-
jsonSchema: jsonSchema,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Check if schema has a built-in toJsonSchema method (e.g., ArkType)
|
|
57
|
+
// Check if schema has a built-in toJsonSchema method (e.g., ArkType, Zod 4)
|
|
69
58
|
if (typeof parser.toJsonSchema === "function") {
|
|
70
59
|
try {
|
|
71
60
|
const jsonSchema = parser.toJsonSchema();
|
|
@@ -77,6 +66,14 @@ function schemaToJsonSchema(schema, options) {
|
|
|
77
66
|
// If toJsonSchema fails, continue to other checks
|
|
78
67
|
}
|
|
79
68
|
}
|
|
69
|
+
if (isZodSchema(parser)) {
|
|
70
|
+
const jsonSchema = convertZodSchema(parser, options);
|
|
71
|
+
if (jsonSchema) {
|
|
72
|
+
return {
|
|
73
|
+
jsonSchema: jsonSchema,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
80
77
|
// Check if it's a TypeBox schema (has Static and Kind symbols)
|
|
81
78
|
if (parser[Symbol.for("TypeBox.Kind")] !== undefined) {
|
|
82
79
|
// TypeBox schemas are already JSON Schema compliant
|
|
@@ -115,15 +112,10 @@ function isZodSchema(schema) {
|
|
|
115
112
|
return isZod3Schema(schema) || isZod4Schema(schema);
|
|
116
113
|
}
|
|
117
114
|
function isZod3Schema(schema) {
|
|
118
|
-
return
|
|
119
|
-
schema !== null &&
|
|
120
|
-
"_def" in schema &&
|
|
121
|
-
"parse" in schema &&
|
|
122
|
-
"parseAsync" in schema &&
|
|
123
|
-
"safeParse" in schema);
|
|
115
|
+
return "_def" in schema && "parse" in schema && "parseAsync" in schema && "safeParse" in schema;
|
|
124
116
|
}
|
|
125
117
|
function isZod4Schema(schema) {
|
|
126
|
-
return
|
|
118
|
+
return "_zod" in schema;
|
|
127
119
|
}
|
|
128
120
|
function convertZodSchema(schema, options) {
|
|
129
121
|
if (isZod4Schema(schema)) {
|
|
@@ -146,49 +138,8 @@ function convertZod4Schema(schema, options) {
|
|
|
146
138
|
target: "draft-7",
|
|
147
139
|
io: "output",
|
|
148
140
|
reused: useReferences ? "ref" : "inline",
|
|
149
|
-
override: ({ zodSchema, jsonSchema }) => {
|
|
150
|
-
const def = zodSchema._zod.def;
|
|
151
|
-
if (def.type === "undefined") {
|
|
152
|
-
throw new Error("Undefined cannot be represented in JSON Schema");
|
|
153
|
-
}
|
|
154
|
-
if (def.type === "object" && jsonSchema.required) {
|
|
155
|
-
// Early Zod 4 permalinks do not propagate optional output through unions.
|
|
156
|
-
const required = jsonSchema.required.filter((key) => {
|
|
157
|
-
const field = def.shape[key];
|
|
158
|
-
return !field || field._zod.optout === "optional" || !hasOptionalOutput(field);
|
|
159
|
-
});
|
|
160
|
-
if (required.length > 0) {
|
|
161
|
-
jsonSchema.required = required;
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
delete jsonSchema.required;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
141
|
});
|
|
169
142
|
}
|
|
170
|
-
function hasOptionalOutput(schema, seen = new Set()) {
|
|
171
|
-
if (schema._zod.optout === "optional")
|
|
172
|
-
return true;
|
|
173
|
-
if (seen.has(schema))
|
|
174
|
-
return false;
|
|
175
|
-
seen.add(schema);
|
|
176
|
-
const def = schema._zod.def;
|
|
177
|
-
switch (def.type) {
|
|
178
|
-
case "union":
|
|
179
|
-
return def.options.some((option) => hasOptionalOutput(option, seen));
|
|
180
|
-
case "nullable":
|
|
181
|
-
case "readonly":
|
|
182
|
-
case "catch":
|
|
183
|
-
return hasOptionalOutput(def.innerType, seen);
|
|
184
|
-
case "lazy":
|
|
185
|
-
return hasOptionalOutput(def.getter(), seen);
|
|
186
|
-
case "pipe":
|
|
187
|
-
return hasOptionalOutput(def.out, seen);
|
|
188
|
-
default:
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
143
|
function isYupSchema(schema) {
|
|
193
144
|
return "spec" in schema && "_typeCheck" in schema;
|
|
194
145
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2DAAqD;AACrD,MAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE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YAAY,CAAC,MAAM,EAAE;QAC7B,MAAM,EAAE,SAAS;QACjB,EAAE,EAAE,QAAQ;QACZ,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ;KACzC,CAAe,CAAC;AACnB,CAAC;AAED,SAAS,WAAW,CAAC,MAAW;IAC9B,OAAO,MAAM,IAAI,MAAM,IAAI,YAAY,IAAI,MAAM,CAAC;AACpD,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAW;IACnC,IAAI,CAAC;QACH,OAAO,IAAA,kCAAa,EAAC,MAAM,CAAe,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,MAAW;IACjC,OAAO,KAAK,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC;AAClG,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAW;IACtC,IAAI,CAAC;QACH,OAAO,mBAAgB,CAAC,IAAI,CAAC,MAAM,CAAe,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
2
|
-
import * as z4 from "zod/v4
|
|
2
|
+
import * as z4 from "zod/v4";
|
|
3
3
|
import { convertSchema } from "@sodaru/yup-to-json-schema";
|
|
4
4
|
import { JSONSchema as EffectJSONSchema } from "effect";
|
|
5
5
|
/**
|
|
@@ -15,19 +15,8 @@ import { JSONSchema as EffectJSONSchema } from "effect";
|
|
|
15
15
|
* @returns The conversion result or undefined if conversion is not possible
|
|
16
16
|
*/
|
|
17
17
|
export function schemaToJsonSchema(schema, options) {
|
|
18
|
-
if (schema === null || (typeof schema !== "object" && typeof schema !== "function")) {
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
18
|
const parser = schema;
|
|
22
|
-
if (
|
|
23
|
-
const jsonSchema = convertZodSchema(parser, options);
|
|
24
|
-
if (jsonSchema) {
|
|
25
|
-
return {
|
|
26
|
-
jsonSchema: jsonSchema,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
// Check if schema has a built-in toJsonSchema method (e.g., ArkType)
|
|
19
|
+
// Check if schema has a built-in toJsonSchema method (e.g., ArkType, Zod 4)
|
|
31
20
|
if (typeof parser.toJsonSchema === "function") {
|
|
32
21
|
try {
|
|
33
22
|
const jsonSchema = parser.toJsonSchema();
|
|
@@ -39,6 +28,14 @@ export function schemaToJsonSchema(schema, options) {
|
|
|
39
28
|
// If toJsonSchema fails, continue to other checks
|
|
40
29
|
}
|
|
41
30
|
}
|
|
31
|
+
if (isZodSchema(parser)) {
|
|
32
|
+
const jsonSchema = convertZodSchema(parser, options);
|
|
33
|
+
if (jsonSchema) {
|
|
34
|
+
return {
|
|
35
|
+
jsonSchema: jsonSchema,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
42
39
|
// Check if it's a TypeBox schema (has Static and Kind symbols)
|
|
43
40
|
if (parser[Symbol.for("TypeBox.Kind")] !== undefined) {
|
|
44
41
|
// TypeBox schemas are already JSON Schema compliant
|
|
@@ -77,15 +74,10 @@ export function isZodSchema(schema) {
|
|
|
77
74
|
return isZod3Schema(schema) || isZod4Schema(schema);
|
|
78
75
|
}
|
|
79
76
|
function isZod3Schema(schema) {
|
|
80
|
-
return
|
|
81
|
-
schema !== null &&
|
|
82
|
-
"_def" in schema &&
|
|
83
|
-
"parse" in schema &&
|
|
84
|
-
"parseAsync" in schema &&
|
|
85
|
-
"safeParse" in schema);
|
|
77
|
+
return "_def" in schema && "parse" in schema && "parseAsync" in schema && "safeParse" in schema;
|
|
86
78
|
}
|
|
87
79
|
function isZod4Schema(schema) {
|
|
88
|
-
return
|
|
80
|
+
return "_zod" in schema;
|
|
89
81
|
}
|
|
90
82
|
function convertZodSchema(schema, options) {
|
|
91
83
|
if (isZod4Schema(schema)) {
|
|
@@ -108,49 +100,8 @@ function convertZod4Schema(schema, options) {
|
|
|
108
100
|
target: "draft-7",
|
|
109
101
|
io: "output",
|
|
110
102
|
reused: useReferences ? "ref" : "inline",
|
|
111
|
-
override: ({ zodSchema, jsonSchema }) => {
|
|
112
|
-
const def = zodSchema._zod.def;
|
|
113
|
-
if (def.type === "undefined") {
|
|
114
|
-
throw new Error("Undefined cannot be represented in JSON Schema");
|
|
115
|
-
}
|
|
116
|
-
if (def.type === "object" && jsonSchema.required) {
|
|
117
|
-
// Early Zod 4 permalinks do not propagate optional output through unions.
|
|
118
|
-
const required = jsonSchema.required.filter((key) => {
|
|
119
|
-
const field = def.shape[key];
|
|
120
|
-
return !field || field._zod.optout === "optional" || !hasOptionalOutput(field);
|
|
121
|
-
});
|
|
122
|
-
if (required.length > 0) {
|
|
123
|
-
jsonSchema.required = required;
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
delete jsonSchema.required;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
103
|
});
|
|
131
104
|
}
|
|
132
|
-
function hasOptionalOutput(schema, seen = new Set()) {
|
|
133
|
-
if (schema._zod.optout === "optional")
|
|
134
|
-
return true;
|
|
135
|
-
if (seen.has(schema))
|
|
136
|
-
return false;
|
|
137
|
-
seen.add(schema);
|
|
138
|
-
const def = schema._zod.def;
|
|
139
|
-
switch (def.type) {
|
|
140
|
-
case "union":
|
|
141
|
-
return def.options.some((option) => hasOptionalOutput(option, seen));
|
|
142
|
-
case "nullable":
|
|
143
|
-
case "readonly":
|
|
144
|
-
case "catch":
|
|
145
|
-
return hasOptionalOutput(def.innerType, seen);
|
|
146
|
-
case "lazy":
|
|
147
|
-
return hasOptionalOutput(def.getter(), seen);
|
|
148
|
-
case "pipe":
|
|
149
|
-
return hasOptionalOutput(def.out, seen);
|
|
150
|
-
default:
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
105
|
function isYupSchema(schema) {
|
|
155
106
|
return "spec" in schema && "_typeCheck" in schema;
|
|
156
107
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAsBxD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAc,EACd,OAA2B;IAE3B,MAAM,MAAM,GAAG,MAAa,CAAC;IAE7B,4EAA4E;IAC5E,IAAI,OAAO,MAAM,CAAC,YAAY,KAAK,UAAU,EAAE,CAAC;QAC9C,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;YAEzC,OAAO;gBACL,UAAU;aACX,CAAC;QACJ,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,kDAAkD;QACpD,CAAC;IACH,CAAC;IAED,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;QACxB,MAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAErD,IAAI,UAAU,EAAE,CAAC;YACf,OAAO;gBACL,UAAU,EAAE,UAAU;aACvB,CAAC;QACJ,CA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AAQ,CAAC;AAClG,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAW;IACtC,IAAI,CAAC;QACH,OAAO,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAe,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trigger.dev/schema-to-json",
|
|
3
|
-
"version": "0.0.0-prerelease-
|
|
3
|
+
"version": "0.0.0-prerelease-streamfix-20260909094302",
|
|
4
4
|
"description": "Convert various schema validation libraries to JSON Schema",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"zod-to-json-schema": "^3.
|
|
34
|
+
"zod-to-json-schema": "^3.24.0",
|
|
35
35
|
"@sodaru/yup-to-json-schema": "^2",
|
|
36
|
-
"zod": "
|
|
36
|
+
"zod": "3.25.76",
|
|
37
37
|
"effect": "^3",
|
|
38
|
-
"@trigger.dev/core": "0.0.0-prerelease-
|
|
38
|
+
"@trigger.dev/core": "0.0.0-prerelease-streamfix-20260909094302"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"arktype": "^2.0.0",
|
|
@@ -45,12 +45,10 @@
|
|
|
45
45
|
"@sinclair/typebox": "^0.34.3",
|
|
46
46
|
"valibot": "^1.1.0",
|
|
47
47
|
"yup": "^1.7.0",
|
|
48
|
-
"zod-v3-floor": "npm:zod@3.25.56",
|
|
49
48
|
"rimraf": "6.0.1",
|
|
50
49
|
"@arethetypeswrong/cli": "^0.18.5"
|
|
51
50
|
},
|
|
52
51
|
"peerDependencies": {
|
|
53
|
-
"zod": "^3.25.56 || ^4.0.0",
|
|
54
52
|
"arktype": ">=2.0.0",
|
|
55
53
|
"runtypes": ">=5.0.0",
|
|
56
54
|
"superstruct": ">=0.14.2",
|