schiva 0.1.0 → 0.1.1
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/package.json +1 -1
- package/src/index.js +148 -10
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,13 +1,151 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
1
|
+
const { ClosedSchema } = require('./closed-schema');
|
|
2
|
+
const { compileErrors, compileFirstError, compileIsValid, compileType } = require('./compile');
|
|
3
|
+
const { fromJsonSchema, compileJsonSchema } = require('./json-schema');
|
|
4
|
+
const { Schema } = require('./schema');
|
|
5
|
+
const {
|
|
6
|
+
AllOfType,
|
|
7
|
+
AllOf,
|
|
8
|
+
allOf,
|
|
9
|
+
oallOf,
|
|
10
|
+
AnyType,
|
|
11
|
+
Any,
|
|
12
|
+
any,
|
|
13
|
+
oany,
|
|
14
|
+
AnyOfType,
|
|
15
|
+
AnyOf,
|
|
16
|
+
anyOf,
|
|
17
|
+
oanyOf,
|
|
18
|
+
ArrayOfType,
|
|
19
|
+
ArrayOf,
|
|
20
|
+
arrOf,
|
|
21
|
+
oarrOf,
|
|
22
|
+
BooleanType,
|
|
23
|
+
Boolean,
|
|
24
|
+
bool,
|
|
25
|
+
obool,
|
|
26
|
+
ConditionalType,
|
|
27
|
+
Conditional,
|
|
28
|
+
EnumType,
|
|
29
|
+
Enum,
|
|
30
|
+
enumt,
|
|
31
|
+
oenumt,
|
|
32
|
+
oenum,
|
|
33
|
+
FloatType,
|
|
34
|
+
Float,
|
|
35
|
+
float,
|
|
36
|
+
ofloat,
|
|
37
|
+
num,
|
|
38
|
+
onum,
|
|
39
|
+
IntegerType,
|
|
40
|
+
Integer,
|
|
41
|
+
int,
|
|
42
|
+
oint,
|
|
43
|
+
NeverType,
|
|
44
|
+
Never,
|
|
45
|
+
never,
|
|
46
|
+
NotType,
|
|
47
|
+
Not,
|
|
48
|
+
not,
|
|
49
|
+
onot,
|
|
50
|
+
ObjType,
|
|
51
|
+
Obj,
|
|
52
|
+
obj,
|
|
53
|
+
oobj,
|
|
54
|
+
OneOfType,
|
|
55
|
+
OneOf,
|
|
56
|
+
oneOf,
|
|
57
|
+
ooneOf,
|
|
58
|
+
RefType,
|
|
59
|
+
Ref,
|
|
60
|
+
StringType,
|
|
61
|
+
String,
|
|
62
|
+
str,
|
|
63
|
+
ostr,
|
|
64
|
+
ValidateType,
|
|
65
|
+
hasErrors,
|
|
66
|
+
toErrors,
|
|
67
|
+
ValuesType,
|
|
68
|
+
Values,
|
|
69
|
+
Const,
|
|
70
|
+
WhenType,
|
|
71
|
+
When,
|
|
72
|
+
isJsonType,
|
|
73
|
+
} = require('./types');
|
|
6
74
|
|
|
7
75
|
module.exports = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
76
|
+
ClosedSchema,
|
|
77
|
+
compileErrors,
|
|
78
|
+
compileFirstError,
|
|
79
|
+
compileIsValid,
|
|
80
|
+
compileType,
|
|
81
|
+
fromJsonSchema,
|
|
82
|
+
compileJsonSchema,
|
|
83
|
+
Schema,
|
|
84
|
+
AllOfType,
|
|
85
|
+
AllOf,
|
|
86
|
+
allOf,
|
|
87
|
+
oallOf,
|
|
88
|
+
AnyType,
|
|
89
|
+
Any,
|
|
90
|
+
any,
|
|
91
|
+
oany,
|
|
92
|
+
AnyOfType,
|
|
93
|
+
AnyOf,
|
|
94
|
+
anyOf,
|
|
95
|
+
oanyOf,
|
|
96
|
+
ArrayOfType,
|
|
97
|
+
ArrayOf,
|
|
98
|
+
arrOf,
|
|
99
|
+
oarrOf,
|
|
100
|
+
BooleanType,
|
|
101
|
+
Boolean,
|
|
102
|
+
bool,
|
|
103
|
+
obool,
|
|
104
|
+
ConditionalType,
|
|
105
|
+
Conditional,
|
|
106
|
+
EnumType,
|
|
107
|
+
Enum,
|
|
108
|
+
enumt,
|
|
109
|
+
oenumt,
|
|
110
|
+
oenum,
|
|
111
|
+
FloatType,
|
|
112
|
+
Float,
|
|
113
|
+
float,
|
|
114
|
+
ofloat,
|
|
115
|
+
num,
|
|
116
|
+
onum,
|
|
117
|
+
IntegerType,
|
|
118
|
+
Integer,
|
|
119
|
+
int,
|
|
120
|
+
oint,
|
|
121
|
+
NeverType,
|
|
122
|
+
Never,
|
|
123
|
+
never,
|
|
124
|
+
NotType,
|
|
125
|
+
Not,
|
|
126
|
+
not,
|
|
127
|
+
onot,
|
|
128
|
+
ObjType,
|
|
129
|
+
Obj,
|
|
130
|
+
obj,
|
|
131
|
+
oobj,
|
|
132
|
+
OneOfType,
|
|
133
|
+
OneOf,
|
|
134
|
+
oneOf,
|
|
135
|
+
ooneOf,
|
|
136
|
+
RefType,
|
|
137
|
+
Ref,
|
|
138
|
+
StringType,
|
|
139
|
+
String,
|
|
140
|
+
str,
|
|
141
|
+
ostr,
|
|
142
|
+
ValidateType,
|
|
143
|
+
hasErrors,
|
|
144
|
+
toErrors,
|
|
145
|
+
ValuesType,
|
|
146
|
+
Values,
|
|
147
|
+
Const,
|
|
148
|
+
WhenType,
|
|
149
|
+
When,
|
|
150
|
+
isJsonType,
|
|
13
151
|
};
|