@orpc/zod 1.7.2 → 1.7.4
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/index.mjs +2 -2
- package/dist/zod4/index.mjs +2 -2
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
@@ -129,7 +129,7 @@ class ZodSmartCoercionPlugin {
|
|
129
129
|
options.clientInterceptors ??= [];
|
130
130
|
options.clientInterceptors.unshift((options2) => {
|
131
131
|
const inputSchema = options2.procedure["~orpc"].inputSchema;
|
132
|
-
if (!inputSchema || inputSchema["~standard"].vendor !== "zod") {
|
132
|
+
if (!inputSchema || inputSchema["~standard"].vendor !== "zod" || "_zod" in inputSchema) {
|
133
133
|
return options2.next();
|
134
134
|
}
|
135
135
|
const coercedInput = zodCoerceInternal(inputSchema, options2.input);
|
@@ -401,7 +401,7 @@ class ZodToJsonSchemaConverter {
|
|
401
401
|
this.anyJsonSchema = options.anyJsonSchema ?? {};
|
402
402
|
}
|
403
403
|
condition(schema) {
|
404
|
-
return schema !== void 0 && schema["~standard"].vendor === "zod";
|
404
|
+
return schema !== void 0 && schema["~standard"].vendor === "zod" && !("_zod" in schema);
|
405
405
|
}
|
406
406
|
convert(schema, options, lazyDepth = 0, isHandledCustomJSONSchema = false, isHandledZodDescription = false, structureDepth = 0) {
|
407
407
|
const def = schema._def;
|
package/dist/zod4/index.mjs
CHANGED
@@ -8,7 +8,7 @@ class experimental_ZodSmartCoercionPlugin {
|
|
8
8
|
options.clientInterceptors ??= [];
|
9
9
|
options.clientInterceptors.unshift((options2) => {
|
10
10
|
const inputSchema = options2.procedure["~orpc"].inputSchema;
|
11
|
-
if (!inputSchema || inputSchema["~standard"].vendor !== "zod") {
|
11
|
+
if (!inputSchema || inputSchema["~standard"].vendor !== "zod" || !("_zod" in inputSchema)) {
|
12
12
|
return options2.next();
|
13
13
|
}
|
14
14
|
const coercedInput = this.#coerce(inputSchema, options2.input);
|
@@ -289,7 +289,7 @@ class ZodToJsonSchemaConverter {
|
|
289
289
|
this.interceptors = options.interceptors ?? [];
|
290
290
|
}
|
291
291
|
condition(schema) {
|
292
|
-
return schema !== void 0 && schema["~standard"].vendor === "zod";
|
292
|
+
return schema !== void 0 && schema["~standard"].vendor === "zod" && "_zod" in schema;
|
293
293
|
}
|
294
294
|
convert(schema, options) {
|
295
295
|
return this.#convert(schema, options, 0, 0);
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/zod",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.7.
|
4
|
+
"version": "1.7.4",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -30,15 +30,15 @@
|
|
30
30
|
],
|
31
31
|
"peerDependencies": {
|
32
32
|
"zod": ">=3.25.0",
|
33
|
-
"@orpc/contract": "1.7.
|
34
|
-
"@orpc/server": "1.7.
|
33
|
+
"@orpc/contract": "1.7.4",
|
34
|
+
"@orpc/server": "1.7.4"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
37
|
"escape-string-regexp": "^5.0.0",
|
38
38
|
"wildcard-match": "^5.1.3",
|
39
|
-
"@orpc/
|
40
|
-
"@orpc/json-schema": "1.7.
|
41
|
-
"@orpc/
|
39
|
+
"@orpc/openapi": "1.7.4",
|
40
|
+
"@orpc/json-schema": "1.7.4",
|
41
|
+
"@orpc/shared": "1.7.4"
|
42
42
|
},
|
43
43
|
"devDependencies": {
|
44
44
|
"zod": "^4.0.5"
|