zod 3.25.59 → 3.25.61
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/cjs/v4/core/util.js
CHANGED
|
@@ -158,6 +158,9 @@ function isObject(data) {
|
|
|
158
158
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
159
159
|
}
|
|
160
160
|
exports.allowsEval = cached(() => {
|
|
161
|
+
if (typeof navigator !== "undefined" && navigator?.userAgent.includes("Cloudflare")) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
161
164
|
try {
|
|
162
165
|
const F = Function;
|
|
163
166
|
new F("");
|
package/dist/esm/v4/core/util.js
CHANGED
|
@@ -114,6 +114,9 @@ export function isObject(data) {
|
|
|
114
114
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
115
115
|
}
|
|
116
116
|
export const allowsEval = cached(() => {
|
|
117
|
+
if (typeof navigator !== "undefined" && navigator?.userAgent.includes("Cloudflare")) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
117
120
|
try {
|
|
118
121
|
const F = Function;
|
|
119
122
|
new F("");
|
|
@@ -523,12 +523,12 @@ type OptionalInSchema = {
|
|
|
523
523
|
optin: "optional";
|
|
524
524
|
};
|
|
525
525
|
};
|
|
526
|
-
export type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ?
|
|
526
|
+
export type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? Record<string, unknown> : keyof (T & Extra) extends never ? Record<string, never> : util.Prettify<{
|
|
527
527
|
-readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"];
|
|
528
528
|
} & {
|
|
529
529
|
-readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"];
|
|
530
530
|
} & Extra>;
|
|
531
|
-
export type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ?
|
|
531
|
+
export type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? Record<string, unknown> : keyof (T & Extra) extends never ? Record<string, never> : util.Prettify<{
|
|
532
532
|
-readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"];
|
|
533
533
|
} & {
|
|
534
534
|
-readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"];
|
package/package.json
CHANGED