web3-validator
Advanced tools
Comparing version 2.0.0 to 2.0.1-dev.1cdc86c.0
@@ -9,3 +9,3 @@ "use strict"; | ||
const errors_js_1 = require("./errors.js"); | ||
const formats_1 = __importDefault(require("./formats")); | ||
const formats_js_1 = __importDefault(require("./formats.js")); | ||
const convertToZod = (schema) => { | ||
@@ -45,3 +45,3 @@ if ((!(schema === null || schema === void 0 ? void 0 : schema.type) || (schema === null || schema === void 0 ? void 0 : schema.type) === 'object') && (schema === null || schema === void 0 ? void 0 : schema.properties)) { | ||
if (schema === null || schema === void 0 ? void 0 : schema.format) { | ||
return zod_1.z.any().refine(formats_1.default[schema.format], (value) => ({ | ||
return zod_1.z.any().refine(formats_js_1.default[schema.format], (value) => ({ | ||
params: { value, format: schema.format }, | ||
@@ -48,0 +48,0 @@ })); |
import { z, ZodIssueCode } from 'zod'; | ||
import { Web3ValidatorError } from './errors.js'; | ||
import formats from './formats'; | ||
import formats from './formats.js'; | ||
const convertToZod = (schema) => { | ||
@@ -5,0 +5,0 @@ if ((!(schema === null || schema === void 0 ? void 0 : schema.type) || (schema === null || schema === void 0 ? void 0 : schema.type) === 'object') && (schema === null || schema === void 0 ? void 0 : schema.properties)) { |
{ | ||
"name": "web3-validator", | ||
"version": "2.0.0", | ||
"version": "2.0.1-dev.1cdc86c.0+1cdc86c", | ||
"description": "JSON-Schema compatible validator for web3", | ||
@@ -50,4 +50,4 @@ "main": "./lib/commonjs/index.js", | ||
"util": "^0.12.5", | ||
"web3-errors": "^1.1.0", | ||
"web3-types": "^1.1.0", | ||
"web3-errors": "1.1.1-dev.1cdc86c.0+1cdc86c", | ||
"web3-types": "1.1.1-dev.1cdc86c.0+1cdc86c", | ||
"zod": "^3.21.4" | ||
@@ -69,3 +69,3 @@ }, | ||
}, | ||
"gitHead": "af3bad15061c7615f7e2ce75509acf624c9d567b" | ||
"gitHead": "1cdc86cd1543615cc30279199ed890d8abd285b1" | ||
} |
@@ -19,2 +19,3 @@ /* | ||
import { AbiParameter } from 'web3-types'; | ||
// eslint-disable-next-line require-extensions/require-extensions | ||
import { ShortValidationSchema } from '../types'; | ||
@@ -21,0 +22,0 @@ |
@@ -24,3 +24,3 @@ /* | ||
import { Json, JsonSchema } from './types.js'; | ||
import formats from './formats'; | ||
import formats from './formats.js'; | ||
@@ -27,0 +27,0 @@ const convertToZod = (schema: JsonSchema): ZodType => { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
925983
5436
2
1
- Removedweb3-errors@1.3.0(transitive)
- Removedweb3-types@1.9.0(transitive)