@nhtio/validation 0.1.0-master-effacff6 → 0.1.0-master-bc86d1b4
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.mjs +4 -4
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -109641,7 +109641,7 @@ const encode = (schema) => {
|
|
|
109641
109641
|
});
|
|
109642
109642
|
}
|
|
109643
109643
|
const json$1 = JSON.stringify({
|
|
109644
|
-
version: "0.1.0-master-
|
|
109644
|
+
version: "0.1.0-master-bc86d1b4",
|
|
109645
109645
|
schema: description$1
|
|
109646
109646
|
}, (_, value) => {
|
|
109647
109647
|
if (typeof value === "bigint") return value.toString();
|
|
@@ -109657,9 +109657,9 @@ const decode = (base64) => {
|
|
|
109657
109657
|
const description$1 = JSON.parse(json$1);
|
|
109658
109658
|
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");
|
|
109659
109659
|
const { version: schemaVersion, schema } = description$1;
|
|
109660
|
-
if (import_semver.valid("0.1.0-master-
|
|
109660
|
+
if (import_semver.valid("0.1.0-master-bc86d1b4")) {
|
|
109661
109661
|
if (!import_semver.valid(import_semver.coerce(schemaVersion))) throw new TypeError(`Invalid schema version: ${schemaVersion}`);
|
|
109662
|
-
if (import_semver.gt(import_semver.coerce(schemaVersion), "0.1.0-master-
|
|
109662
|
+
if (import_semver.gt(import_semver.coerce(schemaVersion), "0.1.0-master-bc86d1b4")) throw new TypeError(`Schema version ${schemaVersion} is not compatible with current version 0.1.0-master-bc86d1b4`);
|
|
109663
109663
|
}
|
|
109664
109664
|
return validator.build(schema);
|
|
109665
109665
|
};
|
|
@@ -112925,7 +112925,7 @@ const tlds = new Set(TLDS.map((tld) => tld.toLowerCase()));
|
|
|
112925
112925
|
var import_lib = __toESM(require_lib$1());
|
|
112926
112926
|
var import_lib$1 = __toESM(require_lib());
|
|
112927
112927
|
var import_lib$2 = __toESM(require_lib$2());
|
|
112928
|
-
const version = "0.1.0-master-
|
|
112928
|
+
const version = "0.1.0-master-bc86d1b4";
|
|
112929
112929
|
Object.defineProperty(exports, "ValidationError", {
|
|
112930
112930
|
enumerable: true,
|
|
112931
112931
|
get: function() {
|
package/index.mjs
CHANGED
|
@@ -109641,7 +109641,7 @@ const encode = (schema) => {
|
|
|
109641
109641
|
});
|
|
109642
109642
|
}
|
|
109643
109643
|
const json$1 = JSON.stringify({
|
|
109644
|
-
version: "0.1.0-master-
|
|
109644
|
+
version: "0.1.0-master-bc86d1b4",
|
|
109645
109645
|
schema: description$1
|
|
109646
109646
|
}, (_, value) => {
|
|
109647
109647
|
if (typeof value === "bigint") return value.toString();
|
|
@@ -109657,9 +109657,9 @@ const decode = (base64) => {
|
|
|
109657
109657
|
const description$1 = JSON.parse(json$1);
|
|
109658
109658
|
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");
|
|
109659
109659
|
const { version: schemaVersion, schema } = description$1;
|
|
109660
|
-
if (import_semver.valid("0.1.0-master-
|
|
109660
|
+
if (import_semver.valid("0.1.0-master-bc86d1b4")) {
|
|
109661
109661
|
if (!import_semver.valid(import_semver.coerce(schemaVersion))) throw new TypeError(`Invalid schema version: ${schemaVersion}`);
|
|
109662
|
-
if (import_semver.gt(import_semver.coerce(schemaVersion), "0.1.0-master-
|
|
109662
|
+
if (import_semver.gt(import_semver.coerce(schemaVersion), "0.1.0-master-bc86d1b4")) throw new TypeError(`Schema version ${schemaVersion} is not compatible with current version 0.1.0-master-bc86d1b4`);
|
|
109663
109663
|
}
|
|
109664
109664
|
return validator.build(schema);
|
|
109665
109665
|
};
|
|
@@ -112925,7 +112925,7 @@ const tlds = new Set(TLDS.map((tld) => tld.toLowerCase()));
|
|
|
112925
112925
|
var import_lib = __toESM(require_lib$1());
|
|
112926
112926
|
var import_lib$1 = __toESM(require_lib());
|
|
112927
112927
|
var import_lib$2 = __toESM(require_lib$2());
|
|
112928
|
-
const version = "0.1.0-master-
|
|
112928
|
+
const version = "0.1.0-master-bc86d1b4";
|
|
112929
112929
|
var ValidationError = import_lib$2.ValidationError;
|
|
112930
112930
|
var location = import_lib$1.location;
|
|
112931
112931
|
export { ValidationError, esm_exports as address, decode, encode, import_lib as formula, location, tlds, validator, version };
|
package/package.json
CHANGED