Initial commit
This commit is contained in:
17
node_modules/ajv-draft-04/dist/index.d.ts
generated
vendored
Normal file
17
node_modules/ajv-draft-04/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { AnySchemaObject, Options } from "ajv/dist/core";
|
||||
import AjvCore from "ajv/dist/core";
|
||||
declare class Ajv extends AjvCore {
|
||||
constructor(opts?: Options);
|
||||
_addVocabularies(): void;
|
||||
_addDefaultMetaSchema(): void;
|
||||
defaultMeta(): string | AnySchemaObject | undefined;
|
||||
}
|
||||
export default Ajv;
|
||||
export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, SchemaValidateFunction, ErrorObject, ErrorNoParams, } from "ajv/dist/types";
|
||||
export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions, } from "ajv/dist/core";
|
||||
export { SchemaCxt, SchemaObjCxt } from "ajv/dist/core";
|
||||
export { KeywordCxt } from "ajv/dist/core";
|
||||
export { DefinedError } from "ajv/dist/core";
|
||||
export { JSONType } from "ajv/dist/core";
|
||||
export { JSONSchemaType } from "ajv/dist/core";
|
||||
export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "ajv/dist/core";
|
||||
50
node_modules/ajv-draft-04/dist/index.js
generated
vendored
Normal file
50
node_modules/ajv-draft-04/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
||||
const core_1 = require("ajv/dist/core");
|
||||
const draft4_1 = require("./vocabulary/draft4");
|
||||
const discriminator_1 = require("ajv/dist/vocabularies/discriminator");
|
||||
const draft4MetaSchema = require("./refs/json-schema-draft-04.json");
|
||||
const META_SUPPORT_DATA = ["/properties"];
|
||||
const META_SCHEMA_ID = "http://json-schema.org/draft-04/schema";
|
||||
class Ajv extends core_1.default {
|
||||
constructor(opts = {}) {
|
||||
super({
|
||||
...opts,
|
||||
schemaId: "id",
|
||||
});
|
||||
}
|
||||
_addVocabularies() {
|
||||
super._addVocabularies();
|
||||
draft4_1.default.forEach((v) => this.addVocabulary(v));
|
||||
if (this.opts.discriminator)
|
||||
this.addKeyword(discriminator_1.default);
|
||||
}
|
||||
_addDefaultMetaSchema() {
|
||||
super._addDefaultMetaSchema();
|
||||
if (!this.opts.meta)
|
||||
return;
|
||||
const metaSchema = this.opts.$data
|
||||
? this.$dataMetaSchema(draft4MetaSchema, META_SUPPORT_DATA)
|
||||
: draft4MetaSchema;
|
||||
this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
|
||||
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
||||
}
|
||||
defaultMeta() {
|
||||
return (this.opts.defaultMeta =
|
||||
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
||||
}
|
||||
}
|
||||
module.exports = exports = Ajv;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = Ajv;
|
||||
var core_2 = require("ajv/dist/core");
|
||||
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return core_2.KeywordCxt; } });
|
||||
var core_3 = require("ajv/dist/core");
|
||||
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return core_3._; } });
|
||||
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return core_3.str; } });
|
||||
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return core_3.stringify; } });
|
||||
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return core_3.nil; } });
|
||||
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return core_3.Name; } });
|
||||
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return core_3.CodeGen; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/ajv-draft-04/dist/index.js.map
generated
vendored
Normal file
1
node_modules/ajv-draft-04/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,wCAAmC;AACnC,gDAAoD;AACpD,uEAA+D;AAC/D,qEAAoE;AAEpE,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC,CAAA;AAEzC,MAAM,cAAc,GAAG,wCAAwC,CAAA;AAE/D,MAAM,GAAI,SAAQ,cAAO;IACvB,YAAY,OAAgB,EAAE;QAC5B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,QAAQ,EAAE,IAAI;SACf,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,gBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;QACxD,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,IAAI,CAAC,UAAU,CAAC,uBAAa,CAAC,CAAA;IAC7D,CAAC;IAED,qBAAqB;QACnB,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAM;QAC3B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK;YAChC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;YAC3D,CAAC,CAAC,gBAAgB,CAAA;QACpB,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,CAAC,CAAA;QACrD,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,GAAG,cAAc,CAAA;IAC7D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;YAC3B,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,CAAC;CACF;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,GAAG,CAAA;AAC9B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,GAAG,CAAA;AAiClB,sCAAwC;AAAhC,kGAAA,UAAU,OAAA;AAIlB,sCAAyF;AAAjF,yFAAA,CAAC,OAAA;AAAE,2FAAA,GAAG,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,2FAAA,GAAG,OAAA;AAAE,4FAAA,IAAI,OAAA;AAAQ,+FAAA,OAAO,OAAA"}
|
||||
138
node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json
generated
vendored
Normal file
138
node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json
generated
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"id": "http://json-schema.org/draft-04/schema#",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"description": "Core schema meta-schema",
|
||||
"definitions": {
|
||||
"schemaArray": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "#"}
|
||||
},
|
||||
"positiveInteger": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"positiveIntegerDefault0": {
|
||||
"allOf": [{"$ref": "#/definitions/positiveInteger"}, {"default": 0}]
|
||||
},
|
||||
"simpleTypes": {
|
||||
"enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
|
||||
},
|
||||
"stringArray": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"minItems": 1,
|
||||
"uniqueItems": true
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": {},
|
||||
"multipleOf": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true
|
||||
},
|
||||
"maximum": {
|
||||
"type": "number"
|
||||
},
|
||||
"exclusiveMaximum": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"minimum": {
|
||||
"type": "number"
|
||||
},
|
||||
"exclusiveMinimum": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"maxLength": {"$ref": "#/definitions/positiveInteger"},
|
||||
"minLength": {"$ref": "#/definitions/positiveIntegerDefault0"},
|
||||
"pattern": {
|
||||
"type": "string",
|
||||
"format": "regex"
|
||||
},
|
||||
"additionalItems": {
|
||||
"anyOf": [{"type": "boolean"}, {"$ref": "#"}],
|
||||
"default": {}
|
||||
},
|
||||
"items": {
|
||||
"anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}],
|
||||
"default": {}
|
||||
},
|
||||
"maxItems": {"$ref": "#/definitions/positiveInteger"},
|
||||
"minItems": {"$ref": "#/definitions/positiveIntegerDefault0"},
|
||||
"uniqueItems": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"maxProperties": {"$ref": "#/definitions/positiveInteger"},
|
||||
"minProperties": {"$ref": "#/definitions/positiveIntegerDefault0"},
|
||||
"required": {"$ref": "#/definitions/stringArray"},
|
||||
"additionalProperties": {
|
||||
"anyOf": [{"type": "boolean"}, {"$ref": "#"}],
|
||||
"default": {}
|
||||
},
|
||||
"definitions": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "#"},
|
||||
"default": {}
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "#"},
|
||||
"default": {}
|
||||
},
|
||||
"patternProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "#"},
|
||||
"default": {}
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/stringArray"}]
|
||||
}
|
||||
},
|
||||
"enum": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true
|
||||
},
|
||||
"type": {
|
||||
"anyOf": [
|
||||
{"$ref": "#/definitions/simpleTypes"},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {"$ref": "#/definitions/simpleTypes"},
|
||||
"minItems": 1,
|
||||
"uniqueItems": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"allOf": {"$ref": "#/definitions/schemaArray"},
|
||||
"anyOf": {"$ref": "#/definitions/schemaArray"},
|
||||
"oneOf": {"$ref": "#/definitions/schemaArray"},
|
||||
"not": {"$ref": "#"}
|
||||
},
|
||||
"dependencies": {
|
||||
"exclusiveMaximum": ["maximum"],
|
||||
"exclusiveMinimum": ["minimum"]
|
||||
},
|
||||
"default": {}
|
||||
}
|
||||
3
node_modules/ajv-draft-04/dist/vocabulary/core.d.ts
generated
vendored
Normal file
3
node_modules/ajv-draft-04/dist/vocabulary/core.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { Vocabulary } from "ajv/dist/core";
|
||||
declare const core: Vocabulary;
|
||||
export default core;
|
||||
13
node_modules/ajv-draft-04/dist/vocabulary/core.js
generated
vendored
Normal file
13
node_modules/ajv-draft-04/dist/vocabulary/core.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const ref_1 = require("ajv/dist/vocabularies/core/ref");
|
||||
const core = [
|
||||
"$schema",
|
||||
"id",
|
||||
"$defs",
|
||||
{ keyword: "$comment" },
|
||||
"definitions",
|
||||
ref_1.default,
|
||||
];
|
||||
exports.default = core;
|
||||
//# sourceMappingURL=core.js.map
|
||||
1
node_modules/ajv-draft-04/dist/vocabulary/core.js.map
generated
vendored
Normal file
1
node_modules/ajv-draft-04/dist/vocabulary/core.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/vocabulary/core.ts"],"names":[],"mappings":";;AACA,wDAAuD;AAEvD,MAAM,IAAI,GAAe;IACvB,SAAS;IACT,IAAI;IACJ,OAAO;IACP,EAAC,OAAO,EAAE,UAAU,EAAC;IACrB,aAAa;IACb,aAAU;CACX,CAAA;AAED,kBAAe,IAAI,CAAA"}
|
||||
3
node_modules/ajv-draft-04/dist/vocabulary/draft4.d.ts
generated
vendored
Normal file
3
node_modules/ajv-draft-04/dist/vocabulary/draft4.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { Vocabulary } from "ajv/dist/core";
|
||||
declare const draft4Vocabularies: Vocabulary[];
|
||||
export default draft4Vocabularies;
|
||||
16
node_modules/ajv-draft-04/dist/vocabulary/draft4.js
generated
vendored
Normal file
16
node_modules/ajv-draft-04/dist/vocabulary/draft4.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core_1 = require("./core");
|
||||
const validation_1 = require("./validation");
|
||||
const applicator_1 = require("ajv/dist/vocabularies/applicator");
|
||||
const format_1 = require("ajv/dist/vocabularies/format");
|
||||
const metadataVocabulary = ["title", "description", "default"];
|
||||
const draft4Vocabularies = [
|
||||
core_1.default,
|
||||
validation_1.default,
|
||||
applicator_1.default(),
|
||||
format_1.default,
|
||||
metadataVocabulary,
|
||||
];
|
||||
exports.default = draft4Vocabularies;
|
||||
//# sourceMappingURL=draft4.js.map
|
||||
1
node_modules/ajv-draft-04/dist/vocabulary/draft4.js.map
generated
vendored
Normal file
1
node_modules/ajv-draft-04/dist/vocabulary/draft4.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"draft4.js","sourceRoot":"","sources":["../../src/vocabulary/draft4.ts"],"names":[],"mappings":";;AACA,iCAAmC;AACnC,6CAA2C;AAC3C,iEAAsE;AACtE,yDAA2D;AAE3D,MAAM,kBAAkB,GAAe,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;AAE1E,MAAM,kBAAkB,GAAiB;IACvC,cAAc;IACd,oBAAgB;IAChB,oBAAuB,EAAE;IACzB,gBAAgB;IAChB,kBAAkB;CACnB,CAAA;AAED,kBAAe,kBAAkB,CAAA"}
|
||||
16
node_modules/ajv-draft-04/dist/vocabulary/validation/index.d.ts
generated
vendored
Normal file
16
node_modules/ajv-draft-04/dist/vocabulary/validation/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { ErrorObject, Vocabulary } from "ajv/dist/core";
|
||||
import { LimitNumberError } from "./limitNumber";
|
||||
import { MultipleOfError } from "ajv/dist/vocabularies/validation/multipleOf";
|
||||
import { PatternError } from "ajv/dist/vocabularies/validation/pattern";
|
||||
import { RequiredError } from "ajv/dist/vocabularies/validation/required";
|
||||
import { UniqueItemsError } from "ajv/dist/vocabularies/validation/uniqueItems";
|
||||
import { ConstError } from "ajv/dist/vocabularies/validation/const";
|
||||
import { EnumError } from "ajv/dist/vocabularies/validation/enum";
|
||||
declare const validation: Vocabulary;
|
||||
export default validation;
|
||||
declare type LimitError = ErrorObject<"maxItems" | "minItems" | "minProperties" | "maxProperties" | "minLength" | "maxLength", {
|
||||
limit: number;
|
||||
}, number | {
|
||||
$data: string;
|
||||
}>;
|
||||
export declare type ValidationKeywordError = LimitError | LimitNumberError | MultipleOfError | PatternError | RequiredError | UniqueItemsError | ConstError | EnumError;
|
||||
35
node_modules/ajv-draft-04/dist/vocabulary/validation/index.js
generated
vendored
Normal file
35
node_modules/ajv-draft-04/dist/vocabulary/validation/index.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const limitNumber_1 = require("./limitNumber");
|
||||
const limitNumberExclusive_1 = require("./limitNumberExclusive");
|
||||
const multipleOf_1 = require("ajv/dist/vocabularies/validation/multipleOf");
|
||||
const limitLength_1 = require("ajv/dist/vocabularies/validation/limitLength");
|
||||
const pattern_1 = require("ajv/dist/vocabularies/validation/pattern");
|
||||
const limitProperties_1 = require("ajv/dist/vocabularies/validation/limitProperties");
|
||||
const required_1 = require("ajv/dist/vocabularies/validation/required");
|
||||
const limitItems_1 = require("ajv/dist/vocabularies/validation/limitItems");
|
||||
const uniqueItems_1 = require("ajv/dist/vocabularies/validation/uniqueItems");
|
||||
const const_1 = require("ajv/dist/vocabularies/validation/const");
|
||||
const enum_1 = require("ajv/dist/vocabularies/validation/enum");
|
||||
const validation = [
|
||||
// number
|
||||
limitNumber_1.default,
|
||||
limitNumberExclusive_1.default,
|
||||
multipleOf_1.default,
|
||||
// string
|
||||
limitLength_1.default,
|
||||
pattern_1.default,
|
||||
// object
|
||||
limitProperties_1.default,
|
||||
required_1.default,
|
||||
// array
|
||||
limitItems_1.default,
|
||||
uniqueItems_1.default,
|
||||
// any
|
||||
{ keyword: "type", schemaType: ["string", "array"] },
|
||||
{ keyword: "nullable", schemaType: "boolean" },
|
||||
const_1.default,
|
||||
enum_1.default,
|
||||
];
|
||||
exports.default = validation;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/ajv-draft-04/dist/vocabulary/validation/index.js.map
generated
vendored
Normal file
1
node_modules/ajv-draft-04/dist/vocabulary/validation/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/vocabulary/validation/index.ts"],"names":[],"mappings":";;AACA,+CAA2D;AAC3D,iEAAyD;AACzD,4EAAuF;AACvF,8EAAsE;AACtE,sEAA8E;AAC9E,sFAA8E;AAC9E,wEAAiF;AACjF,4EAAoE;AACpE,8EAA0F;AAC1F,kEAA+E;AAC/E,gEAA4E;AAE5E,MAAM,UAAU,GAAe;IAC7B,SAAS;IACT,qBAAW;IACX,8BAAoB;IACpB,oBAAU;IACV,SAAS;IACT,qBAAW;IACX,iBAAO;IACP,SAAS;IACT,yBAAe;IACf,kBAAQ;IACR,QAAQ;IACR,oBAAU;IACV,qBAAW;IACX,MAAM;IACN,EAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAC;IAClD,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAC;IAC5C,eAAY;IACZ,cAAW;CACZ,CAAA;AAED,kBAAe,UAAU,CAAA"}
|
||||
12
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.d.ts
generated
vendored
Normal file
12
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { CodeKeywordDefinition, ErrorObject } from "ajv/dist/core";
|
||||
export declare type LimitKwd = "maximum" | "minimum";
|
||||
export declare type ExclusiveLimitKwd = "exclusiveMaximum" | "exclusiveMinimum";
|
||||
declare type Comparison = "<=" | ">=" | "<" | ">";
|
||||
export declare type LimitNumberError = ErrorObject<LimitKwd, {
|
||||
limit: number;
|
||||
comparison: Comparison;
|
||||
}, number | {
|
||||
$data: string;
|
||||
}>;
|
||||
declare const def: CodeKeywordDefinition;
|
||||
export default def;
|
||||
44
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js
generated
vendored
Normal file
44
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core_1 = require("ajv/dist/core");
|
||||
const codegen_1 = require("ajv/dist/compile/codegen");
|
||||
const ops = codegen_1.operators;
|
||||
const KWDs = {
|
||||
maximum: {
|
||||
exclusive: "exclusiveMaximum",
|
||||
ops: [
|
||||
{ okStr: "<=", ok: ops.LTE, fail: ops.GT },
|
||||
{ okStr: "<", ok: ops.LT, fail: ops.GTE },
|
||||
],
|
||||
},
|
||||
minimum: {
|
||||
exclusive: "exclusiveMinimum",
|
||||
ops: [
|
||||
{ okStr: ">=", ok: ops.GTE, fail: ops.LT },
|
||||
{ okStr: ">", ok: ops.GT, fail: ops.LTE },
|
||||
],
|
||||
},
|
||||
};
|
||||
const error = {
|
||||
message: (cxt) => core_1.str `must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`,
|
||||
params: (cxt) => core_1._ `{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}`,
|
||||
};
|
||||
const def = {
|
||||
keyword: Object.keys(KWDs),
|
||||
type: "number",
|
||||
schemaType: "number",
|
||||
$data: true,
|
||||
error,
|
||||
code(cxt) {
|
||||
const { data, schemaCode } = cxt;
|
||||
cxt.fail$data(core_1._ `${data} ${kwdOp(cxt).fail} ${schemaCode} || isNaN(${data})`);
|
||||
},
|
||||
};
|
||||
function kwdOp(cxt) {
|
||||
var _a;
|
||||
const keyword = cxt.keyword;
|
||||
const opsIdx = ((_a = cxt.parentSchema) === null || _a === void 0 ? void 0 : _a[KWDs[keyword].exclusive]) ? 1 : 0;
|
||||
return KWDs[keyword].ops[opsIdx];
|
||||
}
|
||||
exports.default = def;
|
||||
//# sourceMappingURL=limitNumber.js.map
|
||||
1
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js.map
generated
vendored
Normal file
1
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"limitNumber.js","sourceRoot":"","sources":["../../../src/vocabulary/validation/limitNumber.ts"],"names":[],"mappings":";;AAOA,wCAA0C;AAC1C,sDAAkD;AAElD,MAAM,GAAG,GAAG,mBAAS,CAAA;AAmBrB,MAAM,IAAI,GAA8B;IACtC,OAAO,EAAE;QACP,SAAS,EAAE,kBAAkB;QAC7B,GAAG,EAAE;YACH,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,EAAC;YACxC,EAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,EAAC;SACxC;KACF;IACD,OAAO,EAAE;QACP,SAAS,EAAE,kBAAkB;QAC7B,GAAG,EAAE;YACH,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,EAAC;YACxC,EAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,EAAC;SACxC;KACF;CACF,CAAA;AAQD,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,UAAG,CAAA,WAAW,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,UAAU,EAAE;IACpE,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,QAAC,CAAA,gBAAgB,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,YAAY,GAAG,CAAC,UAAU,GAAG;CAChF,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IAC1B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,IAAI,EAAE,UAAU,EAAC,GAAG,GAAG,CAAA;QAC9B,GAAG,CAAC,SAAS,CAAC,QAAC,CAAA,GAAG,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,UAAU,aAAa,IAAI,GAAG,CAAC,CAAA;IAC9E,CAAC;CACF,CAAA;AAED,SAAS,KAAK,CAAC,GAAoB;;IACjC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAmB,CAAA;IACvC,MAAM,MAAM,GAAG,CAAA,MAAA,GAAG,CAAC,YAAY,0CAAG,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAClE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AAClC,CAAC;AAED,kBAAe,GAAG,CAAA"}
|
||||
3
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.d.ts
generated
vendored
Normal file
3
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { CodeKeywordDefinition } from "ajv/dist/core";
|
||||
declare const def: CodeKeywordDefinition;
|
||||
export default def;
|
||||
19
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js
generated
vendored
Normal file
19
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const KWDs = {
|
||||
exclusiveMaximum: "maximum",
|
||||
exclusiveMinimum: "minimum",
|
||||
};
|
||||
const def = {
|
||||
keyword: Object.keys(KWDs),
|
||||
type: "number",
|
||||
schemaType: "boolean",
|
||||
code({ keyword, parentSchema }) {
|
||||
const limitKwd = KWDs[keyword];
|
||||
if (parentSchema[limitKwd] === undefined) {
|
||||
throw new Error(`${keyword} can only be used with ${limitKwd}`);
|
||||
}
|
||||
},
|
||||
};
|
||||
exports.default = def;
|
||||
//# sourceMappingURL=limitNumberExclusive.js.map
|
||||
1
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js.map
generated
vendored
Normal file
1
node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"limitNumberExclusive.js","sourceRoot":"","sources":["../../../src/vocabulary/validation/limitNumberExclusive.ts"],"names":[],"mappings":";;AAQA,MAAM,IAAI,GAAyC;IACjD,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;CAC5B,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IAC1B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,SAAS;IACrB,IAAI,CAAC,EAAC,OAAO,EAAE,YAAY,EAAa;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAA4B,CAAC,CAAA;QACnD,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE;YACxC,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,0BAA0B,QAAQ,EAAE,CAAC,CAAA;SAChE;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
|
||||
Reference in New Issue
Block a user