@conform-to/zod
Advanced tools
Comparing version 0.7.1 to 0.7.2
12
index.js
@@ -92,3 +92,3 @@ 'use strict'; | ||
var keys = ['required', 'minLength', 'maxLength', 'min', 'max', 'step', 'multiple', 'pattern']; | ||
function resolveFieldsetConstarint(schema) { | ||
function resolveFieldsetConstraint(schema) { | ||
if (schema instanceof z__namespace.ZodObject) { | ||
@@ -103,10 +103,10 @@ var result = {}; | ||
if (schema instanceof z__namespace.ZodEffects) { | ||
return resolveFieldsetConstarint(schema.innerType()); | ||
return resolveFieldsetConstraint(schema.innerType()); | ||
} else if (schema instanceof z__namespace.ZodOptional) { | ||
return resolveFieldsetConstarint(schema.unwrap()); | ||
return resolveFieldsetConstraint(schema.unwrap()); | ||
} else if (schema instanceof z__namespace.ZodIntersection) { | ||
return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, resolveFieldsetConstarint(schema._def.left)), resolveFieldsetConstarint(schema._def.right)); | ||
return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, resolveFieldsetConstraint(schema._def.left)), resolveFieldsetConstraint(schema._def.right)); | ||
} else if (schema instanceof z__namespace.ZodUnion || schema instanceof z__namespace.ZodDiscriminatedUnion) { | ||
var options = schema.options; | ||
return options.map(resolveFieldsetConstarint).reduce((prev, next) => { | ||
return options.map(resolveFieldsetConstraint).reduce((prev, next) => { | ||
var list = new Set([...Object.keys(prev), ...Object.keys(next)]); | ||
@@ -137,3 +137,3 @@ var result = {}; | ||
} | ||
return resolveFieldsetConstarint(source); | ||
return resolveFieldsetConstraint(source); | ||
} | ||
@@ -140,0 +140,0 @@ function parse(payload, config) { |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"main": "index.js", | ||
@@ -29,3 +29,3 @@ "module": "index.mjs", | ||
"peerDependencies": { | ||
"@conform-to/dom": "0.7.1", | ||
"@conform-to/dom": "0.7.2", | ||
"zod": "^3.21.0" | ||
@@ -32,0 +32,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package