@nhtio/validation 0.1.0-master-fefe361a → 0.1.0-master-67185cae
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/index.cjs +4 -4
- package/index.cjs.map +1 -1
- package/index.d.ts +2 -1
- package/index.mjs +4 -4
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/private/index.d.ts +91 -2
- package/private/schemas.d.ts +63 -15
package/index.cjs
CHANGED
|
@@ -109523,7 +109523,7 @@ const encode = (schema) => {
|
|
|
109523
109523
|
});
|
|
109524
109524
|
}
|
|
109525
109525
|
const json$1 = JSON.stringify({
|
|
109526
|
-
version: "0.1.0-master-
|
|
109526
|
+
version: "0.1.0-master-67185cae",
|
|
109527
109527
|
schema: description$1
|
|
109528
109528
|
}, (_, value) => {
|
|
109529
109529
|
if (typeof value === "bigint") return value.toString();
|
|
@@ -109539,9 +109539,9 @@ const decode = (base64) => {
|
|
|
109539
109539
|
const description$1 = JSON.parse(json$1);
|
|
109540
109540
|
if (!isPlainObject(description$1) || !("version" in description$1) || !("schema" in description$1) || typeof description$1.version !== "string" || !isPlainObject(description$1.schema)) throw new TypeError("Not a valid encoded schema");
|
|
109541
109541
|
const { version: schemaVersion, schema } = description$1;
|
|
109542
|
-
if (import_semver.valid("0.1.0-master-
|
|
109542
|
+
if (import_semver.valid("0.1.0-master-67185cae")) {
|
|
109543
109543
|
if (!import_semver.valid(import_semver.coerce(schemaVersion))) throw new TypeError(`Invalid schema version: ${schemaVersion}`);
|
|
109544
|
-
if (import_semver.gt(import_semver.coerce(schemaVersion), "0.1.0-master-
|
|
109544
|
+
if (import_semver.gt(import_semver.coerce(schemaVersion), "0.1.0-master-67185cae")) throw new TypeError(`Schema version ${schemaVersion} is not compatible with current version 0.1.0-master-67185cae`);
|
|
109545
109545
|
}
|
|
109546
109546
|
return validator.build(schema);
|
|
109547
109547
|
};
|
|
@@ -112807,7 +112807,7 @@ const tlds = new Set(TLDS.map((tld) => tld.toLowerCase()));
|
|
|
112807
112807
|
var import_lib = __toESM(require_lib$1());
|
|
112808
112808
|
var import_lib$1 = __toESM(require_lib());
|
|
112809
112809
|
var import_lib$2 = __toESM(require_lib$2());
|
|
112810
|
-
const version = "0.1.0-master-
|
|
112810
|
+
const version = "0.1.0-master-67185cae";
|
|
112811
112811
|
Object.defineProperty(exports, "ValidationError", {
|
|
112812
112812
|
enumerable: true,
|
|
112813
112813
|
get: function() {
|