schemastery
Advanced tools
Comparing version 2.4.2 to 2.5.0
var __defProp = Object.defineProperty; | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
var __commonJS = (cb, mod) => function __require() { | ||
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; | ||
}; | ||
// community/schemastery/src/index.ts | ||
var require_src = __commonJS({ | ||
"community/schemastery/src/index.ts"(exports, module) { | ||
function isNullable(value) { | ||
return value === null || value === void 0; | ||
function isNullable(value) { | ||
return value === null || value === void 0; | ||
} | ||
__name(isNullable, "isNullable"); | ||
function isObject(data) { | ||
return data && typeof data === "object" && !Array.isArray(data); | ||
} | ||
__name(isObject, "isObject"); | ||
var kSchema = Symbol("schemastery"); | ||
var Schema = /* @__PURE__ */ __name(function(options) { | ||
const schema = /* @__PURE__ */ __name(function(data) { | ||
return Schema.resolve(data, schema)[0]; | ||
}, "schema"); | ||
Object.setPrototypeOf(schema, Schema.prototype); | ||
Object.assign(schema, options); | ||
schema.meta ||= {}; | ||
return schema; | ||
}, "Schema"); | ||
Schema.prototype = Object.create(Function.prototype); | ||
Schema.prototype[kSchema] = true; | ||
Schema.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() { | ||
return { ...this }; | ||
}, "toJSON"); | ||
Schema.prototype.toBSON = /* @__PURE__ */ __name(function toBSON() { | ||
return { ...this }; | ||
}, "toBSON"); | ||
for (const key of ["required", "hidden", "adaptive"]) { | ||
Object.assign(Schema.prototype, { | ||
[key]() { | ||
this.meta[key] = true; | ||
return this; | ||
} | ||
__name(isNullable, "isNullable"); | ||
function isObject(data) { | ||
return data && typeof data === "object" && !Array.isArray(data); | ||
}); | ||
} | ||
for (const key of ["default", "role", "link", "comment", "description", "max", "min", "step"]) { | ||
Object.assign(Schema.prototype, { | ||
[key](value) { | ||
this.meta[key] = value; | ||
return this; | ||
} | ||
__name(isObject, "isObject"); | ||
var kSchema = Symbol("schemastery"); | ||
var Schema = /* @__PURE__ */ __name(function(options) { | ||
const schema = /* @__PURE__ */ __name(function(data) { | ||
return Schema.resolve(data, schema)[0]; | ||
}, "schema"); | ||
Object.setPrototypeOf(schema, Schema.prototype); | ||
Object.assign(schema, options); | ||
schema.meta ||= {}; | ||
return schema; | ||
}, "Schema"); | ||
Schema.prototype = Object.create(Function.prototype); | ||
Schema.prototype[kSchema] = true; | ||
Schema.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() { | ||
return { ...this }; | ||
}, "toJSON"); | ||
for (const key of ["required", "hidden", "adaptive"]) { | ||
Object.assign(Schema.prototype, { | ||
[key]() { | ||
this.meta[key] = true; | ||
return this; | ||
} | ||
}); | ||
} | ||
for (const key of ["default", "role", "link", "comment", "description", "max", "min", "step"]) { | ||
Object.assign(Schema.prototype, { | ||
[key](value) { | ||
this.meta[key] = value; | ||
return this; | ||
} | ||
}); | ||
} | ||
var resolvers = {}; | ||
Schema.extend = /* @__PURE__ */ __name(function extend(type, resolve) { | ||
resolvers[type] = resolve; | ||
}, "extend"); | ||
Schema.resolve = /* @__PURE__ */ __name(function resolve(data, schema, strict) { | ||
if (!schema) | ||
return [data]; | ||
if (isNullable(data)) { | ||
if (schema.meta.required) | ||
throw new TypeError(`missing required value`); | ||
const fallback = schema.meta.default; | ||
if (isNullable(fallback)) | ||
return [data]; | ||
data = fallback; | ||
} | ||
const callback = resolvers[schema.type]; | ||
if (callback) | ||
return callback(data, schema, strict); | ||
throw new TypeError(`unsupported type "${schema.type}"`); | ||
}, "resolve"); | ||
Schema.from = /* @__PURE__ */ __name(function from(source) { | ||
if (isNullable(source)) { | ||
return Schema.any(); | ||
} else if (["string", "number", "boolean"].includes(typeof source)) { | ||
return Schema.const(source).required(); | ||
} else if (source[kSchema]) { | ||
return source; | ||
} else if (typeof source === "function") { | ||
switch (source) { | ||
case String: | ||
return Schema.string(); | ||
case Number: | ||
return Schema.number(); | ||
case Boolean: | ||
return Schema.boolean(); | ||
case Function: | ||
return Schema.function(); | ||
default: | ||
return Schema.is(source); | ||
} | ||
} else { | ||
throw new TypeError(`cannot infer schema from ${source}`); | ||
} | ||
}, "from"); | ||
Schema.natural = /* @__PURE__ */ __name(function natural() { | ||
return Schema.number().step(1).min(0); | ||
}, "natural"); | ||
Schema.percent = /* @__PURE__ */ __name(function percent() { | ||
return Schema.number().step(0.01).min(0).max(1).role("slider"); | ||
}, "percent"); | ||
Schema.extend("any", (data) => { | ||
}); | ||
} | ||
var resolvers = {}; | ||
Schema.extend = /* @__PURE__ */ __name(function extend(type, resolve2) { | ||
resolvers[type] = resolve2; | ||
}, "extend"); | ||
Schema.resolve = /* @__PURE__ */ __name(function resolve(data, schema, strict) { | ||
if (!schema) | ||
return [data]; | ||
if (isNullable(data)) { | ||
if (schema.meta.required) | ||
throw new TypeError(`missing required value`); | ||
const fallback = schema.meta.default; | ||
if (isNullable(fallback)) | ||
return [data]; | ||
}); | ||
Schema.extend("never", (data) => { | ||
throw new TypeError(`expected nullable but got ${data}`); | ||
}); | ||
Schema.extend("const", (data, { value }) => { | ||
if (data === value) | ||
return [value]; | ||
throw new TypeError(`expected ${value} but got ${data}`); | ||
}); | ||
Schema.extend("string", (data) => { | ||
if (typeof data === "string") | ||
return [data]; | ||
throw new TypeError(`expected string but got ${data}`); | ||
}); | ||
Schema.extend("number", (data, { meta }) => { | ||
const { max = Infinity, min = -Infinity, step } = meta; | ||
if (typeof data !== "number") | ||
throw new TypeError(`expected number but got ${data}`); | ||
if (data > max) | ||
throw new TypeError(`expected number <= ${max} but got ${data}`); | ||
if (data < min) | ||
throw new TypeError(`expected number >= ${min} but got ${data}`); | ||
if (step && Math.abs(data - (meta.min ?? 0)) % step >= Number.EPSILON) { | ||
throw new TypeError(`expected number multiple of ${step} but got ${data}`); | ||
} | ||
return [data]; | ||
}); | ||
Schema.extend("boolean", (data) => { | ||
if (typeof data === "boolean") | ||
return [data]; | ||
throw new TypeError(`expected boolean but got ${data}`); | ||
}); | ||
Schema.extend("function", (data) => { | ||
if (typeof data === "function") | ||
return [data]; | ||
throw new TypeError(`expected function but got ${data}`); | ||
}); | ||
Schema.extend("is", (data, { callback }) => { | ||
if (data instanceof callback) | ||
return [data]; | ||
throw new TypeError(`expected ${callback.name} but got ${data}`); | ||
}); | ||
function property(data, key, schema) { | ||
const [value, adapted] = Schema.resolve(data[key], schema); | ||
if (!isNullable(adapted)) | ||
data[key] = adapted; | ||
return value; | ||
data = fallback; | ||
} | ||
const callback = resolvers[schema.type]; | ||
if (callback) | ||
return callback(data, schema, strict); | ||
throw new TypeError(`unsupported type "${schema.type}"`); | ||
}, "resolve"); | ||
Schema.from = /* @__PURE__ */ __name(function from(source) { | ||
if (isNullable(source)) { | ||
return Schema.any(); | ||
} else if (["string", "number", "boolean"].includes(typeof source)) { | ||
return Schema.const(source).required(); | ||
} else if (source[kSchema]) { | ||
return source; | ||
} else if (typeof source === "function") { | ||
switch (source) { | ||
case String: | ||
return Schema.string(); | ||
case Number: | ||
return Schema.number(); | ||
case Boolean: | ||
return Schema.boolean(); | ||
case Function: | ||
return Schema.function(); | ||
default: | ||
return Schema.is(source); | ||
} | ||
__name(property, "property"); | ||
Schema.extend("array", (data, { inner }) => { | ||
if (!Array.isArray(data)) | ||
throw new TypeError(`expected array but got ${data}`); | ||
return [data.map((_, index) => property(data, index, inner))]; | ||
}); | ||
Schema.extend("dict", (data, { inner, sKey }, strict) => { | ||
if (!isObject(data)) | ||
throw new TypeError(`expected object but got ${data}`); | ||
const result = {}; | ||
for (const key in data) { | ||
let rKey; | ||
try { | ||
rKey = Schema.resolve(key, sKey)[0]; | ||
} catch (error) { | ||
if (strict) | ||
continue; | ||
throw error; | ||
} | ||
result[rKey] = property(data, key, inner); | ||
data[rKey] = data[key]; | ||
delete data[key]; | ||
} | ||
return [result]; | ||
}); | ||
Schema.extend("tuple", (data, { list }, strict) => { | ||
if (!Array.isArray(data)) | ||
throw new TypeError(`expected array but got ${data}`); | ||
const result = list.map((inner, index) => property(data, index, inner)); | ||
} else { | ||
throw new TypeError(`cannot infer schema from ${source}`); | ||
} | ||
}, "from"); | ||
Schema.natural = /* @__PURE__ */ __name(function natural() { | ||
return Schema.number().step(1).min(0); | ||
}, "natural"); | ||
Schema.percent = /* @__PURE__ */ __name(function percent() { | ||
return Schema.number().step(0.01).min(0).max(1).role("slider"); | ||
}, "percent"); | ||
Schema.extend("any", (data) => { | ||
return [data]; | ||
}); | ||
Schema.extend("never", (data) => { | ||
throw new TypeError(`expected nullable but got ${data}`); | ||
}); | ||
Schema.extend("const", (data, { value }) => { | ||
if (data === value) | ||
return [value]; | ||
throw new TypeError(`expected ${value} but got ${data}`); | ||
}); | ||
Schema.extend("string", (data) => { | ||
if (typeof data === "string") | ||
return [data]; | ||
throw new TypeError(`expected string but got ${data}`); | ||
}); | ||
Schema.extend("number", (data, { meta }) => { | ||
const { max = Infinity, min = -Infinity, step } = meta; | ||
if (typeof data !== "number") | ||
throw new TypeError(`expected number but got ${data}`); | ||
if (data > max) | ||
throw new TypeError(`expected number <= ${max} but got ${data}`); | ||
if (data < min) | ||
throw new TypeError(`expected number >= ${min} but got ${data}`); | ||
if (step && Math.abs(data - (meta.min ?? 0)) % step >= Number.EPSILON) { | ||
throw new TypeError(`expected number multiple of ${step} but got ${data}`); | ||
} | ||
return [data]; | ||
}); | ||
Schema.extend("boolean", (data) => { | ||
if (typeof data === "boolean") | ||
return [data]; | ||
throw new TypeError(`expected boolean but got ${data}`); | ||
}); | ||
Schema.extend("function", (data) => { | ||
if (typeof data === "function") | ||
return [data]; | ||
throw new TypeError(`expected function but got ${data}`); | ||
}); | ||
Schema.extend("is", (data, { callback }) => { | ||
if (data instanceof callback) | ||
return [data]; | ||
throw new TypeError(`expected ${callback.name} but got ${data}`); | ||
}); | ||
function property(data, key, schema) { | ||
const [value, adapted] = Schema.resolve(data[key], schema); | ||
if (!isNullable(adapted)) | ||
data[key] = adapted; | ||
return value; | ||
} | ||
__name(property, "property"); | ||
Schema.extend("array", (data, { inner }) => { | ||
if (!Array.isArray(data)) | ||
throw new TypeError(`expected array but got ${data}`); | ||
return [data.map((_, index) => property(data, index, inner))]; | ||
}); | ||
Schema.extend("dict", (data, { inner, sKey }, strict) => { | ||
if (!isObject(data)) | ||
throw new TypeError(`expected object but got ${data}`); | ||
const result = {}; | ||
for (const key in data) { | ||
let rKey; | ||
try { | ||
rKey = Schema.resolve(key, sKey)[0]; | ||
} catch (error) { | ||
if (strict) | ||
return [result]; | ||
result.push(...data.slice(list.length)); | ||
return [result]; | ||
}); | ||
function merge(result, data) { | ||
for (const key in data) { | ||
if (key in result) | ||
continue; | ||
result[key] = data[key]; | ||
} | ||
continue; | ||
throw error; | ||
} | ||
__name(merge, "merge"); | ||
Schema.extend("object", (data, { dict }, strict) => { | ||
if (!isObject(data)) | ||
throw new TypeError(`expected object but got ${data}`); | ||
const result = {}; | ||
for (const key in dict) { | ||
const value = property(data, key, dict[key]); | ||
if (!isNullable(value) || key in data) { | ||
result[key] = value; | ||
result[rKey] = property(data, key, inner); | ||
data[rKey] = data[key]; | ||
delete data[key]; | ||
} | ||
return [result]; | ||
}); | ||
Schema.extend("tuple", (data, { list }, strict) => { | ||
if (!Array.isArray(data)) | ||
throw new TypeError(`expected array but got ${data}`); | ||
const result = list.map((inner, index) => property(data, index, inner)); | ||
if (strict) | ||
return [result]; | ||
result.push(...data.slice(list.length)); | ||
return [result]; | ||
}); | ||
function merge(result, data) { | ||
for (const key in data) { | ||
if (key in result) | ||
continue; | ||
result[key] = data[key]; | ||
} | ||
} | ||
__name(merge, "merge"); | ||
Schema.extend("object", (data, { dict }, strict) => { | ||
if (!isObject(data)) | ||
throw new TypeError(`expected object but got ${data}`); | ||
const result = {}; | ||
for (const key in dict) { | ||
const value = property(data, key, dict[key]); | ||
if (!isNullable(value) || key in data) { | ||
result[key] = value; | ||
} | ||
} | ||
if (!strict) | ||
merge(result, data); | ||
return [result]; | ||
}); | ||
Schema.extend("union", (data, { list, toString }) => { | ||
const messages = []; | ||
for (const inner of list) { | ||
try { | ||
return Schema.resolve(data, inner); | ||
} catch (error) { | ||
messages.push(error.message); | ||
} | ||
} | ||
throw new TypeError(`expected ${toString()} but got ${JSON.stringify(data)}`); | ||
}); | ||
Schema.extend("intersect", (data, { list }, strict) => { | ||
const result = {}; | ||
for (const inner of list) { | ||
const value = Schema.resolve(data, inner, true)[0]; | ||
Object.assign(result, value); | ||
} | ||
if (!strict && isObject(data)) | ||
merge(result, data); | ||
return [result]; | ||
}); | ||
Schema.extend("transform", (data, { inner, callback }) => { | ||
const [result, adapted = data] = Schema.resolve(data, inner, true); | ||
if (isObject(data)) { | ||
const temp = {}; | ||
for (const key in result) { | ||
if (!(key in data)) | ||
continue; | ||
temp[key] = data[key]; | ||
delete data[key]; | ||
} | ||
Object.assign(data, callback(temp)); | ||
return [callback(result)]; | ||
} else { | ||
return [callback(result), callback(adapted)]; | ||
} | ||
}); | ||
function defineMethod(name, keys, format) { | ||
Object.assign(Schema, { | ||
[name](...args) { | ||
const schema = new Schema({ type: name }); | ||
schema.toString = format.bind(null, schema); | ||
keys.forEach((key, index) => { | ||
switch (key) { | ||
case "sKey": | ||
schema.sKey = Schema.from(args[index]); | ||
break; | ||
case "inner": | ||
schema.inner = Schema.from(args[index]); | ||
break; | ||
case "list": | ||
schema.list = args[index].map(Schema.from); | ||
break; | ||
case "dict": | ||
schema.dict = Object.fromEntries(Object.entries(args[index]).map(([key2, value]) => [key2, Schema.from(value)])); | ||
break; | ||
default: | ||
schema[key] = args[index]; | ||
} | ||
}); | ||
if (name === "object" || name === "dict") { | ||
schema.meta.default = {}; | ||
} else if (name === "array" || name === "tuple") { | ||
schema.meta.default = []; | ||
} else if (name === "union") { | ||
const child = schema.list.find((item) => !isNullable(item.meta.default)); | ||
if (child) | ||
schema.meta.default = child.meta.default; | ||
} | ||
if (!strict) | ||
merge(result, data); | ||
return [result]; | ||
}); | ||
Schema.extend("union", (data, { list, toString }) => { | ||
const messages = []; | ||
for (const inner of list) { | ||
try { | ||
return Schema.resolve(data, inner); | ||
} catch (error) { | ||
messages.push(error.message); | ||
} | ||
} | ||
throw new TypeError(`expected ${toString()} but got ${JSON.stringify(data)}`); | ||
}); | ||
Schema.extend("intersect", (data, { list }, strict) => { | ||
const result = {}; | ||
for (const inner of list) { | ||
const value = Schema.resolve(data, inner, true)[0]; | ||
Object.assign(result, value); | ||
} | ||
if (!strict && isObject(data)) | ||
merge(result, data); | ||
return [result]; | ||
}); | ||
Schema.extend("transform", (data, { inner, callback }) => { | ||
const [result, adapted = data] = Schema.resolve(data, inner, true); | ||
if (isObject(data)) { | ||
const temp = {}; | ||
for (const key in result) { | ||
if (!(key in data)) | ||
continue; | ||
temp[key] = data[key]; | ||
delete data[key]; | ||
} | ||
Object.assign(data, callback(temp)); | ||
return [callback(result)]; | ||
} else { | ||
return [callback(result), callback(adapted)]; | ||
} | ||
}); | ||
function defineMethod(name, keys, format) { | ||
Object.assign(Schema, { | ||
[name](...args) { | ||
const schema = new Schema({ type: name }); | ||
schema.toString = format.bind(null, schema); | ||
keys.forEach((key, index) => { | ||
switch (key) { | ||
case "sKey": | ||
schema.sKey = Schema.from(args[index]); | ||
break; | ||
case "inner": | ||
schema.inner = Schema.from(args[index]); | ||
break; | ||
case "list": | ||
schema.list = args[index].map(Schema.from); | ||
break; | ||
case "dict": | ||
schema.dict = Object.fromEntries(Object.entries(args[index]).map(([key2, value]) => [key2, Schema.from(value)])); | ||
break; | ||
default: | ||
schema[key] = args[index]; | ||
} | ||
}); | ||
if (name === "object" || name === "dict") { | ||
schema.meta.default = {}; | ||
} else if (name === "array" || name === "tuple") { | ||
schema.meta.default = []; | ||
} else if (name === "union") { | ||
const child = schema.list.find((item) => !isNullable(item.meta.default)); | ||
if (child) | ||
schema.meta.default = child.meta.default; | ||
} | ||
return schema; | ||
} | ||
}); | ||
return schema; | ||
} | ||
__name(defineMethod, "defineMethod"); | ||
defineMethod("is", ["callback"], ({ callback }) => callback.name); | ||
defineMethod("any", [], () => "any"); | ||
defineMethod("never", [], () => "never"); | ||
defineMethod("const", ["value"], ({ value }) => typeof value === "string" ? JSON.stringify(value) : value); | ||
defineMethod("string", [], () => "string"); | ||
defineMethod("number", [], () => "number"); | ||
defineMethod("boolean", [], () => "boolean"); | ||
defineMethod("function", [], () => "function"); | ||
defineMethod("array", ["inner"], ({ inner }) => `${inner.toString(true)}[]`); | ||
defineMethod("dict", ["inner", "sKey"], ({ inner, sKey }) => `{ [key: ${sKey.toString()}]: ${inner.toString()} }`); | ||
defineMethod("tuple", ["list"], ({ list }) => `[${list.map((inner) => inner.toString()).join(", ")}]`); | ||
defineMethod("object", ["dict"], ({ dict }) => { | ||
if (Object.keys(dict).length === 0) | ||
return "{}"; | ||
return `{ ${Object.entries(dict).map(([key, inner]) => { | ||
return `${key}${inner.meta.required ? "" : "?"}: ${inner.toString()}`; | ||
}).join(", ")} }`; | ||
}); | ||
defineMethod("union", ["list"], ({ list }, inline) => { | ||
const result = list.map(({ toString: format }) => format()).join(" | "); | ||
return inline ? `(${result})` : result; | ||
}); | ||
defineMethod("intersect", ["list"], ({ list }) => { | ||
return `${list.map((inner) => inner.toString(true)).join(" & ")}`; | ||
}); | ||
defineMethod("transform", ["inner", "callback"], ({ inner }, isInner) => inner.toString(isInner)); | ||
module.exports = Schema; | ||
} | ||
}); | ||
} | ||
__name(defineMethod, "defineMethod"); | ||
defineMethod("is", ["callback"], ({ callback }) => callback.name); | ||
defineMethod("any", [], () => "any"); | ||
defineMethod("never", [], () => "never"); | ||
defineMethod("const", ["value"], ({ value }) => typeof value === "string" ? JSON.stringify(value) : value); | ||
defineMethod("string", [], () => "string"); | ||
defineMethod("number", [], () => "number"); | ||
defineMethod("boolean", [], () => "boolean"); | ||
defineMethod("function", [], () => "function"); | ||
defineMethod("array", ["inner"], ({ inner }) => `${inner.toString(true)}[]`); | ||
defineMethod("dict", ["inner", "sKey"], ({ inner, sKey }) => `{ [key: ${sKey.toString()}]: ${inner.toString()} }`); | ||
defineMethod("tuple", ["list"], ({ list }) => `[${list.map((inner) => inner.toString()).join(", ")}]`); | ||
defineMethod("object", ["dict"], ({ dict }) => { | ||
if (Object.keys(dict).length === 0) | ||
return "{}"; | ||
return `{ ${Object.entries(dict).map(([key, inner]) => { | ||
return `${key}${inner.meta.required ? "" : "?"}: ${inner.toString()}`; | ||
}).join(", ")} }`; | ||
}); | ||
export default require_src(); | ||
defineMethod("union", ["list"], ({ list }, inline) => { | ||
const result = list.map(({ toString: format }) => format()).join(" | "); | ||
return inline ? `(${result})` : result; | ||
}); | ||
defineMethod("intersect", ["list"], ({ list }) => { | ||
return `${list.map((inner) => inner.toString(true)).join(" & ")}`; | ||
}); | ||
defineMethod("transform", ["inner", "callback"], ({ inner }, isInner) => inner.toString(isInner)); | ||
var src_default = Schema; | ||
export { | ||
src_default as default | ||
}; | ||
//# sourceMappingURL=browser.js.map |
@@ -12,2 +12,3 @@ declare type Dict<T = any, K extends string = string> = { | ||
toJSON(): Schema.Base<T>; | ||
toBSON(): Schema.Base<T>; | ||
required(): Schema<S, T>; | ||
@@ -94,2 +95,2 @@ hidden(): Schema<S, T>; | ||
declare const Schema: Schema.Static; | ||
export = Schema; | ||
export default Schema; |
@@ -17,5 +17,14 @@ var __defProp = Object.defineProperty; | ||
}; | ||
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
var __export = (target, all) => { | ||
__markAsModule(target); | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
// community/schemastery/src/index.ts | ||
__export(exports, { | ||
default: () => src_default | ||
}); | ||
function isNullable(value) { | ||
@@ -44,2 +53,5 @@ return value === null || value === void 0; | ||
}, "toJSON"); | ||
Schema.prototype.toBSON = /* @__PURE__ */ __name(function toBSON() { | ||
return __spreadValues({}, this); | ||
}, "toBSON"); | ||
for (const key of ["required", "hidden", "adaptive"]) { | ||
@@ -318,3 +330,5 @@ Object.assign(Schema.prototype, { | ||
defineMethod("transform", ["inner", "callback"], ({ inner }, isInner) => inner.toString(isInner)); | ||
module.exports = Schema; | ||
var src_default = Schema; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = {}); | ||
//# sourceMappingURL=node.js.map |
{ | ||
"name": "schemastery", | ||
"description": "type driven schema validator", | ||
"version": "2.4.2", | ||
"main": "lib/node.js", | ||
"version": "2.5.0", | ||
"main": "index.js", | ||
"module": "lib/browser.js", | ||
@@ -38,2 +38,2 @@ "typings": "lib/index.d.ts", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
10
734
80107