@anzenjs/joi
Advanced tools
Comparing version 0.0.4-alpha.3 to 0.0.4-alpha.4
@@ -64,2 +64,4 @@ "use strict"; | ||
return this.resolveObjectSchema(schema.resolver()); | ||
case core_1.SchemaType.Brand: | ||
return this.resolveJoiSchema(schema.childSchema); | ||
default: | ||
@@ -66,0 +68,0 @@ throw new Error('unsupported'); |
{ | ||
"name": "@anzenjs/joi", | ||
"version": "0.0.4-alpha.3", | ||
"version": "0.0.4-alpha.4", | ||
"main": "cjs/src/index.js", | ||
@@ -21,3 +21,3 @@ "types": "cjs/src/index.d.ts", | ||
}, | ||
"gitHead": "734908eb45107c55aa2570f38d334c09fa3395be" | ||
"gitHead": "fdb2a17a16fc2cab7b94a2ef052f9662e6129ee6" | ||
} |
@@ -53,8 +53,12 @@ import { | ||
return this.resolvePrimitveSchema(schema.native) | ||
case SchemaType.Enum: | ||
return this.options.joi.only(Object.values(schema.enumValues)) | ||
case SchemaType.Optional: | ||
return this.resolveJoiSchema(schema.childSchema).optional() | ||
case SchemaType.Nullable: | ||
return this.resolveJoiSchema(schema.childSchema).allow(null) | ||
case SchemaType.List: | ||
@@ -64,2 +68,3 @@ return this.options.joi | ||
.items(this.resolveJoiSchema(schema.childSchema)) | ||
case SchemaType.Dictionary: | ||
@@ -81,2 +86,6 @@ return this.options.joi | ||
return this.resolveObjectSchema(schema.resolver()) | ||
case SchemaType.Brand: | ||
return this.resolveJoiSchema(schema.childSchema) | ||
default: | ||
@@ -83,0 +92,0 @@ throw new Error('unsupported') |
Sorry, the diff of this file is not supported yet
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
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
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
278162
2253
1