@jetio/validator 1.0.0
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/LICENSE +21 -0
- package/README.md +1362 -0
- package/dist/cli.js +219 -0
- package/dist/compileSchema.d.ts +148 -0
- package/dist/compileSchema.js +2199 -0
- package/dist/compileSchema.js.map +1 -0
- package/dist/formats.d.ts +41 -0
- package/dist/formats.js +166 -0
- package/dist/formats.js.map +1 -0
- package/dist/index.cjs.js +6167 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.esm.js +6148 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/jet-validator.d.ts +88 -0
- package/dist/jet-validator.js +983 -0
- package/dist/jet-validator.js.map +1 -0
- package/dist/resolver.d.ts +348 -0
- package/dist/resolver.js +2459 -0
- package/dist/resolver.js.map +1 -0
- package/dist/scripts/load-metaschemas.d.ts +1 -0
- package/dist/scripts/metaschema-loader.d.ts +2 -0
- package/dist/src/compileSchema.d.ts +148 -0
- package/dist/src/formats.d.ts +41 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/jet-validator.d.ts +88 -0
- package/dist/src/resolver.d.ts +348 -0
- package/dist/src/types/format.d.ts +7 -0
- package/dist/src/types/keywords.d.ts +78 -0
- package/dist/src/types/schema.d.ts +123 -0
- package/dist/src/types/standalone.d.ts +4 -0
- package/dist/src/types/validation.d.ts +49 -0
- package/dist/src/utilities/index.d.ts +11 -0
- package/dist/src/utilities/schema.d.ts +10 -0
- package/dist/types/format.d.ts +7 -0
- package/dist/types/format.js +3 -0
- package/dist/types/format.js.map +1 -0
- package/dist/types/keywords.d.ts +78 -0
- package/dist/types/keywords.js +4 -0
- package/dist/types/keywords.js.map +1 -0
- package/dist/types/schema.d.ts +123 -0
- package/dist/types/schema.js +3 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/types/standalone.d.ts +4 -0
- package/dist/types/standalone.js +3 -0
- package/dist/types/standalone.js.map +1 -0
- package/dist/types/validation.d.ts +49 -0
- package/dist/types/validation.js +3 -0
- package/dist/types/validation.js.map +1 -0
- package/dist/utilities/index.d.ts +11 -0
- package/dist/utilities/index.js +146 -0
- package/dist/utilities/index.js.map +1 -0
- package/dist/utilities/schema.d.ts +10 -0
- package/dist/utilities/schema.js +232 -0
- package/dist/utilities/schema.js.map +1 -0
- package/dist/validator.umd.js +6196 -0
- package/package.json +79 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.baseSchemaKeys = exports.incompatibleKeywords = void 0;
|
|
4
|
+
exports.incompatibleKeywords = {
|
|
5
|
+
string: [
|
|
6
|
+
"properties",
|
|
7
|
+
"patternProperties",
|
|
8
|
+
"additionalProperties",
|
|
9
|
+
"propertyNames",
|
|
10
|
+
"minProperties",
|
|
11
|
+
"maxProperties",
|
|
12
|
+
"items",
|
|
13
|
+
"additionalItems",
|
|
14
|
+
"minItems",
|
|
15
|
+
"maxItems",
|
|
16
|
+
"dependencies",
|
|
17
|
+
"dependentRequired",
|
|
18
|
+
"dependentSchemas",
|
|
19
|
+
"prefixItems",
|
|
20
|
+
"uniqueItems",
|
|
21
|
+
"contains",
|
|
22
|
+
"minContains",
|
|
23
|
+
"maxContains",
|
|
24
|
+
"minimum",
|
|
25
|
+
"maximum",
|
|
26
|
+
"exclusiveMinimum",
|
|
27
|
+
"exclusiveMaximum",
|
|
28
|
+
"multipleOf",
|
|
29
|
+
],
|
|
30
|
+
number: [
|
|
31
|
+
"properties",
|
|
32
|
+
"patternProperties",
|
|
33
|
+
"additionalProperties",
|
|
34
|
+
"propertyNames",
|
|
35
|
+
"minProperties",
|
|
36
|
+
"maxProperties",
|
|
37
|
+
"items",
|
|
38
|
+
"additionalItems",
|
|
39
|
+
"minItems",
|
|
40
|
+
"maxItems",
|
|
41
|
+
"minLength",
|
|
42
|
+
"maxLength",
|
|
43
|
+
"pattern",
|
|
44
|
+
"dependencies",
|
|
45
|
+
"dependentRequired",
|
|
46
|
+
"dependentSchemas",
|
|
47
|
+
"prefixItems",
|
|
48
|
+
"uniqueItems",
|
|
49
|
+
"contains",
|
|
50
|
+
"minContains",
|
|
51
|
+
"maxContains",
|
|
52
|
+
],
|
|
53
|
+
integer: [
|
|
54
|
+
"properties",
|
|
55
|
+
"patternProperties",
|
|
56
|
+
"additionalProperties",
|
|
57
|
+
"propertyNames",
|
|
58
|
+
"minProperties",
|
|
59
|
+
"maxProperties",
|
|
60
|
+
"items",
|
|
61
|
+
"additionalItems",
|
|
62
|
+
"minItems",
|
|
63
|
+
"maxItems",
|
|
64
|
+
"minLength",
|
|
65
|
+
"maxLength",
|
|
66
|
+
"pattern",
|
|
67
|
+
"dependencies",
|
|
68
|
+
"dependentRequired",
|
|
69
|
+
"dependentSchemas",
|
|
70
|
+
"prefixItems",
|
|
71
|
+
"uniqueItems",
|
|
72
|
+
"contains",
|
|
73
|
+
"minContains",
|
|
74
|
+
"maxContains",
|
|
75
|
+
],
|
|
76
|
+
boolean: [
|
|
77
|
+
"properties",
|
|
78
|
+
"patternProperties",
|
|
79
|
+
"additionalProperties",
|
|
80
|
+
"propertyNames",
|
|
81
|
+
"minProperties",
|
|
82
|
+
"maxProperties",
|
|
83
|
+
"items",
|
|
84
|
+
"additionalItems",
|
|
85
|
+
"minItems",
|
|
86
|
+
"maxItems",
|
|
87
|
+
"minLength",
|
|
88
|
+
"maxLength",
|
|
89
|
+
"pattern",
|
|
90
|
+
"minimum",
|
|
91
|
+
"maximum",
|
|
92
|
+
"exclusiveMinimum",
|
|
93
|
+
"exclusiveMaximum",
|
|
94
|
+
"multipleOf",
|
|
95
|
+
"dependencies",
|
|
96
|
+
"dependentRequired",
|
|
97
|
+
"dependentSchemas",
|
|
98
|
+
"prefixItems",
|
|
99
|
+
"uniqueItems",
|
|
100
|
+
"contains",
|
|
101
|
+
"minContains",
|
|
102
|
+
"maxContains",
|
|
103
|
+
],
|
|
104
|
+
array: [
|
|
105
|
+
"properties",
|
|
106
|
+
"patternProperties",
|
|
107
|
+
"additionalProperties",
|
|
108
|
+
"propertyNames",
|
|
109
|
+
"minProperties",
|
|
110
|
+
"maxProperties",
|
|
111
|
+
"minLength",
|
|
112
|
+
"maxLength",
|
|
113
|
+
"pattern",
|
|
114
|
+
"minimum",
|
|
115
|
+
"maximum",
|
|
116
|
+
"exclusiveMinimum",
|
|
117
|
+
"exclusiveMaximum",
|
|
118
|
+
"multipleOf",
|
|
119
|
+
"dependencies",
|
|
120
|
+
"dependentRequired",
|
|
121
|
+
"dependentSchemas",
|
|
122
|
+
],
|
|
123
|
+
object: [
|
|
124
|
+
"items",
|
|
125
|
+
"additionalItems",
|
|
126
|
+
"prefixItems",
|
|
127
|
+
"uniqueItems",
|
|
128
|
+
"contains",
|
|
129
|
+
"minContains",
|
|
130
|
+
"maxContains",
|
|
131
|
+
"minItems",
|
|
132
|
+
"maxItems",
|
|
133
|
+
"minLength",
|
|
134
|
+
"maxLength",
|
|
135
|
+
"pattern",
|
|
136
|
+
"minimum",
|
|
137
|
+
"maximum",
|
|
138
|
+
"exclusiveMinimum",
|
|
139
|
+
"exclusiveMaximum",
|
|
140
|
+
"multipleOf",
|
|
141
|
+
],
|
|
142
|
+
null: [
|
|
143
|
+
"properties",
|
|
144
|
+
"patternProperties",
|
|
145
|
+
"additionalProperties",
|
|
146
|
+
"propertyNames",
|
|
147
|
+
"minProperties",
|
|
148
|
+
"maxProperties",
|
|
149
|
+
"items",
|
|
150
|
+
"additionalItems",
|
|
151
|
+
"minItems",
|
|
152
|
+
"maxItems",
|
|
153
|
+
"minLength",
|
|
154
|
+
"maxLength",
|
|
155
|
+
"pattern",
|
|
156
|
+
"minimum",
|
|
157
|
+
"maximum",
|
|
158
|
+
"exclusiveMinimum",
|
|
159
|
+
"exclusiveMaximum",
|
|
160
|
+
"multipleOf",
|
|
161
|
+
"prefixItems",
|
|
162
|
+
"uniqueItems",
|
|
163
|
+
"contains",
|
|
164
|
+
"minContains",
|
|
165
|
+
"maxContains",
|
|
166
|
+
"dependencies",
|
|
167
|
+
"dependentRequired",
|
|
168
|
+
"dependentSchemas",
|
|
169
|
+
],
|
|
170
|
+
};
|
|
171
|
+
exports.baseSchemaKeys = new Set([
|
|
172
|
+
"$schema",
|
|
173
|
+
"$id",
|
|
174
|
+
"type",
|
|
175
|
+
"minLength",
|
|
176
|
+
"maxLength",
|
|
177
|
+
"pattern",
|
|
178
|
+
"format",
|
|
179
|
+
"minimum",
|
|
180
|
+
"maximum",
|
|
181
|
+
"exclusiveMinimum",
|
|
182
|
+
"exclusiveMaximum",
|
|
183
|
+
"multipleOf",
|
|
184
|
+
"items",
|
|
185
|
+
"prefixItems",
|
|
186
|
+
"minItems",
|
|
187
|
+
"maxItems",
|
|
188
|
+
"contains",
|
|
189
|
+
"uniqueItems",
|
|
190
|
+
"additionalItems",
|
|
191
|
+
"unevaluatedItems",
|
|
192
|
+
"minContains",
|
|
193
|
+
"maxContains",
|
|
194
|
+
"properties",
|
|
195
|
+
"maxProperties",
|
|
196
|
+
"minProperties",
|
|
197
|
+
"patternProperties",
|
|
198
|
+
"propertyNames",
|
|
199
|
+
"dependentRequired",
|
|
200
|
+
"dependentSchemas",
|
|
201
|
+
"dependencies",
|
|
202
|
+
"required",
|
|
203
|
+
"additionalProperties",
|
|
204
|
+
"unevaluatedProperties",
|
|
205
|
+
"anyOf",
|
|
206
|
+
"allOf",
|
|
207
|
+
"not",
|
|
208
|
+
"oneOf",
|
|
209
|
+
"if",
|
|
210
|
+
"then",
|
|
211
|
+
"elseIf",
|
|
212
|
+
"else",
|
|
213
|
+
"const",
|
|
214
|
+
"enum",
|
|
215
|
+
"title",
|
|
216
|
+
"description",
|
|
217
|
+
"examples",
|
|
218
|
+
"$comment",
|
|
219
|
+
"default",
|
|
220
|
+
"readOnly",
|
|
221
|
+
"writeOnly",
|
|
222
|
+
"$ref",
|
|
223
|
+
"$defs",
|
|
224
|
+
"definitions",
|
|
225
|
+
"__functionName",
|
|
226
|
+
"allFormats",
|
|
227
|
+
"$dynamicAnchor",
|
|
228
|
+
"$dynamicRef",
|
|
229
|
+
"$anchor",
|
|
230
|
+
"$vocabulary",
|
|
231
|
+
]);
|
|
232
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/utilities/schema.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,MAAM,EAAE;QACN,YAAY;QACZ,mBAAmB;QACnB,sBAAsB;QACtB,eAAe;QACf,eAAe;QACf,eAAe;QACf,OAAO;QACP,iBAAiB;QACjB,UAAU;QACV,UAAU;QACV,cAAc;QACd,mBAAmB;QACnB,kBAAkB;QAClB,aAAa;QACb,aAAa;QACb,UAAU;QACV,aAAa;QACb,aAAa;QACb,SAAS;QACT,SAAS;QACT,kBAAkB;QAClB,kBAAkB;QAClB,YAAY;KACb;IACD,MAAM,EAAE;QACN,YAAY;QACZ,mBAAmB;QACnB,sBAAsB;QACtB,eAAe;QACf,eAAe;QACf,eAAe;QACf,OAAO;QACP,iBAAiB;QACjB,UAAU;QACV,UAAU;QACV,WAAW;QACX,WAAW;QACX,SAAS;QACT,cAAc;QACd,mBAAmB;QACnB,kBAAkB;QAClB,aAAa;QACb,aAAa;QACb,UAAU;QACV,aAAa;QACb,aAAa;KACd;IACD,OAAO,EAAE;QACP,YAAY;QACZ,mBAAmB;QACnB,sBAAsB;QACtB,eAAe;QACf,eAAe;QACf,eAAe;QACf,OAAO;QACP,iBAAiB;QACjB,UAAU;QACV,UAAU;QACV,WAAW;QACX,WAAW;QACX,SAAS;QACT,cAAc;QACd,mBAAmB;QACnB,kBAAkB;QAClB,aAAa;QACb,aAAa;QACb,UAAU;QACV,aAAa;QACb,aAAa;KACd;IACD,OAAO,EAAE;QACP,YAAY;QACZ,mBAAmB;QACnB,sBAAsB;QACtB,eAAe;QACf,eAAe;QACf,eAAe;QACf,OA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