el-beeswarm
Version:
<div style="display: flex; padding: 1rem; flex-direction: column; align-items: center; justify-content: center; height: 100vh; text-align: center; display: flex;
44 lines • 2.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
const context_1 = require("./compile/context");
exports.KeywordCxt = context_1.default;
// export {DefinedError} from "./vocabularies/errors"
var codegen_1 = require("./compile/codegen");
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
const core_1 = require("./core");
const jtd_1 = require("./vocabularies/jtd");
const jtd_schema_1 = require("./refs/jtd-schema");
// const META_SUPPORT_DATA = ["/properties"]
const META_SCHEMA_ID = "JTD-meta-schema";
class Ajv extends core_1.default {
constructor(opts = {}) {
var _a;
super({
...opts,
jtd: true,
messages: (_a = opts.messages) !== null && _a !== void 0 ? _a : false,
});
}
_addVocabularies() {
super._addVocabularies();
this.addVocabulary(jtd_1.default);
}
_addDefaultMetaSchema() {
super._addDefaultMetaSchema();
if (!this.opts.meta)
return;
this.addMetaSchema(jtd_schema_1.default, META_SCHEMA_ID, false);
}
defaultMeta() {
return (this.opts.defaultMeta =
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
}
}
exports.default = Ajv;
//# sourceMappingURL=jtd.js.map