web3-validator
Advanced tools
Comparing version 2.0.3-dev.54c5ed0.0 to 2.0.3-dev.66ddb7e.0
@@ -156,3 +156,12 @@ "use strict"; | ||
} | ||
lastSchema.items = childSchema; | ||
// lastSchema.items is a Schema, concat with 'childSchema' | ||
if (!Array.isArray(lastSchema.items)) { | ||
lastSchema.items = [lastSchema.items, childSchema]; | ||
} // lastSchema.items is an empty Scheme array, set it to 'childSchema' | ||
else if (lastSchema.items.length === 0) { | ||
lastSchema.items = childSchema; | ||
} // lastSchema.items is a non-empty Scheme array, append 'childSchema' | ||
else { | ||
lastSchema.items.push(childSchema); | ||
} | ||
lastSchema = childSchema; | ||
@@ -203,2 +212,3 @@ } | ||
} | ||
lastSchema = schema; | ||
} | ||
@@ -205,0 +215,0 @@ return schema; |
@@ -152,3 +152,12 @@ /* | ||
} | ||
lastSchema.items = childSchema; | ||
// lastSchema.items is a Schema, concat with 'childSchema' | ||
if (!Array.isArray(lastSchema.items)) { | ||
lastSchema.items = [lastSchema.items, childSchema]; | ||
} // lastSchema.items is an empty Scheme array, set it to 'childSchema' | ||
else if (lastSchema.items.length === 0) { | ||
lastSchema.items = childSchema; | ||
} // lastSchema.items is a non-empty Scheme array, append 'childSchema' | ||
else { | ||
lastSchema.items.push(childSchema); | ||
} | ||
lastSchema = childSchema; | ||
@@ -199,2 +208,3 @@ } | ||
} | ||
lastSchema = schema; | ||
} | ||
@@ -201,0 +211,0 @@ return schema; |
{ | ||
"name": "web3-validator", | ||
"version": "2.0.3-dev.54c5ed0.0+54c5ed0", | ||
"version": "2.0.3-dev.66ddb7e.0+66ddb7e", | ||
"description": "JSON-Schema compatible validator for web3", | ||
@@ -50,4 +50,4 @@ "main": "./lib/commonjs/index.js", | ||
"util": "^0.12.5", | ||
"web3-errors": "1.1.3-dev.54c5ed0.0+54c5ed0", | ||
"web3-types": "1.2.1-dev.54c5ed0.0+54c5ed0", | ||
"web3-errors": "1.1.3-dev.66ddb7e.0+66ddb7e", | ||
"web3-types": "1.2.1-dev.66ddb7e.0+66ddb7e", | ||
"zod": "^3.21.4" | ||
@@ -69,3 +69,3 @@ }, | ||
}, | ||
"gitHead": "54c5ed05cfa050c87e1389b3fc6b7e805696d522" | ||
"gitHead": "66ddb7e07a9547bfc6574f0f95dc2572f4b41452" | ||
} |
@@ -190,3 +190,12 @@ /* | ||
lastSchema.items = childSchema; | ||
// lastSchema.items is a Schema, concat with 'childSchema' | ||
if (!Array.isArray(lastSchema.items)) { | ||
lastSchema.items = [lastSchema.items as JsonSchema, childSchema]; | ||
} // lastSchema.items is an empty Scheme array, set it to 'childSchema' | ||
else if (lastSchema.items.length === 0) { | ||
lastSchema.items = childSchema; | ||
} // lastSchema.items is a non-empty Scheme array, append 'childSchema' | ||
else { | ||
lastSchema.items.push(childSchema); | ||
} | ||
lastSchema = childSchema; | ||
@@ -241,2 +250,3 @@ } | ||
} | ||
lastSchema = schema; | ||
} | ||
@@ -243,0 +253,0 @@ |
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
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
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
931000
5467