@eventvisor/core 0.23.0 → 0.24.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/CHANGELOG.md +11 -0
- package/lib/linter/conditionsSchema.d.ts +1 -301
- package/lib/linter/conditionsSchema.js +8 -14
- package/lib/linter/conditionsSchema.js.map +1 -1
- package/lib/linter/destinationSchema.d.ts +89 -1
- package/lib/linter/destinationSchema.js +0 -2
- package/lib/linter/destinationSchema.js.map +1 -1
- package/lib/linter/effectSchema.d.ts +9 -1209
- package/lib/linter/effectSchema.js +6 -3
- package/lib/linter/effectSchema.js.map +1 -1
- package/lib/linter/entitySchemas.spec.d.ts +1 -0
- package/lib/linter/entitySchemas.spec.js +169 -0
- package/lib/linter/entitySchemas.spec.js.map +1 -0
- package/lib/linter/eventSchema.js +5 -3
- package/lib/linter/eventSchema.js.map +1 -1
- package/lib/linter/lintProject.d.ts +5 -0
- package/lib/linter/lintProject.js +141 -5
- package/lib/linter/lintProject.js.map +1 -1
- package/lib/linter/lintProject.spec.d.ts +1 -0
- package/lib/linter/lintProject.spec.js +103 -0
- package/lib/linter/lintProject.spec.js.map +1 -0
- package/lib/linter/persistSchema.d.ts +4 -604
- package/lib/linter/persistSchema.js +4 -2
- package/lib/linter/persistSchema.js.map +1 -1
- package/lib/linter/printError.js +4 -0
- package/lib/linter/printError.js.map +1 -1
- package/lib/linter/sampleSchema.d.ts +13 -285
- package/lib/linter/sampleSchema.js +2 -1
- package/lib/linter/sampleSchema.js.map +1 -1
- package/lib/linter/semanticValidation.d.ts +11 -0
- package/lib/linter/semanticValidation.js +592 -0
- package/lib/linter/semanticValidation.js.map +1 -0
- package/lib/linter/semanticValidation.spec.d.ts +1 -0
- package/lib/linter/semanticValidation.spec.js +190 -0
- package/lib/linter/semanticValidation.spec.js.map +1 -0
- package/lib/linter/testSchema.d.ts +64 -3
- package/lib/linter/testSchema.js +81 -4
- package/lib/linter/testSchema.js.map +1 -1
- package/lib/linter/testSchema.spec.d.ts +1 -0
- package/lib/linter/testSchema.spec.js +260 -0
- package/lib/linter/testSchema.spec.js.map +1 -0
- package/package.json +5 -5
- package/src/linter/conditionsSchema.ts +12 -18
- package/src/linter/destinationSchema.ts +0 -3
- package/src/linter/effectSchema.ts +12 -9
- package/src/linter/entitySchemas.spec.ts +212 -0
- package/src/linter/eventSchema.ts +8 -6
- package/src/linter/lintProject.spec.ts +112 -0
- package/src/linter/lintProject.ts +134 -6
- package/src/linter/persistSchema.ts +6 -4
- package/src/linter/printError.ts +3 -0
- package/src/linter/sampleSchema.ts +3 -1
- package/src/linter/semanticValidation.spec.ts +239 -0
- package/src/linter/semanticValidation.ts +953 -0
- package/src/linter/testSchema.spec.ts +279 -0
- package/src/linter/testSchema.ts +89 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { Dependencies } from "../dependencies";
|
|
3
|
-
export declare function getSampleSchema(deps: Dependencies): z.ZodObject<{
|
|
3
|
+
export declare function getSampleSchema(deps: Dependencies): z.ZodUnion<readonly [z.ZodObject<{
|
|
4
4
|
by: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
5
5
|
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
6
6
|
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
@@ -25,307 +25,35 @@ export declare function getSampleSchema(deps: Dependencies): z.ZodObject<{
|
|
|
25
25
|
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
26
26
|
}, z.core.$strip>]>>;
|
|
27
27
|
}, z.core.$strip>]>;
|
|
28
|
-
conditions: z.ZodOptional<z.ZodUnion<readonly [z.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
matches: "matches";
|
|
34
|
-
contains: "contains";
|
|
35
|
-
after: "after";
|
|
36
|
-
before: "before";
|
|
37
|
-
equals: "equals";
|
|
38
|
-
notEquals: "notEquals";
|
|
39
|
-
exists: "exists";
|
|
40
|
-
notExists: "notExists";
|
|
41
|
-
greaterThan: "greaterThan";
|
|
42
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
43
|
-
lessThan: "lessThan";
|
|
44
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
45
|
-
notContains: "notContains";
|
|
46
|
-
semverEquals: "semverEquals";
|
|
47
|
-
semverNotEquals: "semverNotEquals";
|
|
48
|
-
semverGreaterThan: "semverGreaterThan";
|
|
49
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
50
|
-
semverLessThan: "semverLessThan";
|
|
51
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
52
|
-
notIncludes: "notIncludes";
|
|
53
|
-
notMatches: "notMatches";
|
|
54
|
-
in: "in";
|
|
55
|
-
notIn: "notIn";
|
|
56
|
-
}>;
|
|
57
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
28
|
+
conditions: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>]>>;
|
|
29
|
+
percentage: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
range: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
31
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
32
|
+
by: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
58
33
|
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
59
34
|
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
60
35
|
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
61
36
|
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
62
37
|
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
63
38
|
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
64
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
-
and: z.ZodArray<z.ZodObject<{
|
|
66
|
-
operator: z.ZodEnum<{
|
|
67
|
-
includes: "includes";
|
|
68
|
-
endsWith: "endsWith";
|
|
69
|
-
startsWith: "startsWith";
|
|
70
|
-
matches: "matches";
|
|
71
|
-
contains: "contains";
|
|
72
|
-
after: "after";
|
|
73
|
-
before: "before";
|
|
74
|
-
equals: "equals";
|
|
75
|
-
notEquals: "notEquals";
|
|
76
|
-
exists: "exists";
|
|
77
|
-
notExists: "notExists";
|
|
78
|
-
greaterThan: "greaterThan";
|
|
79
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
80
|
-
lessThan: "lessThan";
|
|
81
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
82
|
-
notContains: "notContains";
|
|
83
|
-
semverEquals: "semverEquals";
|
|
84
|
-
semverNotEquals: "semverNotEquals";
|
|
85
|
-
semverGreaterThan: "semverGreaterThan";
|
|
86
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
87
|
-
semverLessThan: "semverLessThan";
|
|
88
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
89
|
-
notIncludes: "notIncludes";
|
|
90
|
-
notMatches: "notMatches";
|
|
91
|
-
in: "in";
|
|
92
|
-
notIn: "notIn";
|
|
93
|
-
}>;
|
|
94
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
95
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
96
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
97
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
98
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
99
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
100
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
101
|
-
}, z.core.$strip>>;
|
|
102
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
-
or: z.ZodArray<z.ZodObject<{
|
|
104
|
-
operator: z.ZodEnum<{
|
|
105
|
-
includes: "includes";
|
|
106
|
-
endsWith: "endsWith";
|
|
107
|
-
startsWith: "startsWith";
|
|
108
|
-
matches: "matches";
|
|
109
|
-
contains: "contains";
|
|
110
|
-
after: "after";
|
|
111
|
-
before: "before";
|
|
112
|
-
equals: "equals";
|
|
113
|
-
notEquals: "notEquals";
|
|
114
|
-
exists: "exists";
|
|
115
|
-
notExists: "notExists";
|
|
116
|
-
greaterThan: "greaterThan";
|
|
117
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
118
|
-
lessThan: "lessThan";
|
|
119
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
120
|
-
notContains: "notContains";
|
|
121
|
-
semverEquals: "semverEquals";
|
|
122
|
-
semverNotEquals: "semverNotEquals";
|
|
123
|
-
semverGreaterThan: "semverGreaterThan";
|
|
124
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
125
|
-
semverLessThan: "semverLessThan";
|
|
126
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
127
|
-
notIncludes: "notIncludes";
|
|
128
|
-
notMatches: "notMatches";
|
|
129
|
-
in: "in";
|
|
130
|
-
notIn: "notIn";
|
|
131
|
-
}>;
|
|
132
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
133
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
134
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
135
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
136
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
137
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
138
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
139
|
-
}, z.core.$strip>>;
|
|
140
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
-
not: z.ZodArray<z.ZodObject<{
|
|
142
|
-
operator: z.ZodEnum<{
|
|
143
|
-
includes: "includes";
|
|
144
|
-
endsWith: "endsWith";
|
|
145
|
-
startsWith: "startsWith";
|
|
146
|
-
matches: "matches";
|
|
147
|
-
contains: "contains";
|
|
148
|
-
after: "after";
|
|
149
|
-
before: "before";
|
|
150
|
-
equals: "equals";
|
|
151
|
-
notEquals: "notEquals";
|
|
152
|
-
exists: "exists";
|
|
153
|
-
notExists: "notExists";
|
|
154
|
-
greaterThan: "greaterThan";
|
|
155
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
156
|
-
lessThan: "lessThan";
|
|
157
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
158
|
-
notContains: "notContains";
|
|
159
|
-
semverEquals: "semverEquals";
|
|
160
|
-
semverNotEquals: "semverNotEquals";
|
|
161
|
-
semverGreaterThan: "semverGreaterThan";
|
|
162
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
163
|
-
semverLessThan: "semverLessThan";
|
|
164
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
165
|
-
notIncludes: "notIncludes";
|
|
166
|
-
notMatches: "notMatches";
|
|
167
|
-
in: "in";
|
|
168
|
-
notIn: "notIn";
|
|
169
|
-
}>;
|
|
170
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
171
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
172
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
173
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
174
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
175
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
176
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
177
|
-
}, z.core.$strip>>;
|
|
178
|
-
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
179
|
-
operator: z.ZodEnum<{
|
|
180
|
-
includes: "includes";
|
|
181
|
-
endsWith: "endsWith";
|
|
182
|
-
startsWith: "startsWith";
|
|
183
|
-
matches: "matches";
|
|
184
|
-
contains: "contains";
|
|
185
|
-
after: "after";
|
|
186
|
-
before: "before";
|
|
187
|
-
equals: "equals";
|
|
188
|
-
notEquals: "notEquals";
|
|
189
|
-
exists: "exists";
|
|
190
|
-
notExists: "notExists";
|
|
191
|
-
greaterThan: "greaterThan";
|
|
192
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
193
|
-
lessThan: "lessThan";
|
|
194
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
195
|
-
notContains: "notContains";
|
|
196
|
-
semverEquals: "semverEquals";
|
|
197
|
-
semverNotEquals: "semverNotEquals";
|
|
198
|
-
semverGreaterThan: "semverGreaterThan";
|
|
199
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
200
|
-
semverLessThan: "semverLessThan";
|
|
201
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
202
|
-
notIncludes: "notIncludes";
|
|
203
|
-
notMatches: "notMatches";
|
|
204
|
-
in: "in";
|
|
205
|
-
notIn: "notIn";
|
|
206
|
-
}>;
|
|
207
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
39
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
208
40
|
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
209
41
|
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
210
42
|
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
211
43
|
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
212
44
|
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
213
45
|
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
214
|
-
}, z.core.$strip
|
|
215
|
-
|
|
216
|
-
operator: z.ZodEnum<{
|
|
217
|
-
includes: "includes";
|
|
218
|
-
endsWith: "endsWith";
|
|
219
|
-
startsWith: "startsWith";
|
|
220
|
-
matches: "matches";
|
|
221
|
-
contains: "contains";
|
|
222
|
-
after: "after";
|
|
223
|
-
before: "before";
|
|
224
|
-
equals: "equals";
|
|
225
|
-
notEquals: "notEquals";
|
|
226
|
-
exists: "exists";
|
|
227
|
-
notExists: "notExists";
|
|
228
|
-
greaterThan: "greaterThan";
|
|
229
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
230
|
-
lessThan: "lessThan";
|
|
231
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
232
|
-
notContains: "notContains";
|
|
233
|
-
semverEquals: "semverEquals";
|
|
234
|
-
semverNotEquals: "semverNotEquals";
|
|
235
|
-
semverGreaterThan: "semverGreaterThan";
|
|
236
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
237
|
-
semverLessThan: "semverLessThan";
|
|
238
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
239
|
-
notIncludes: "notIncludes";
|
|
240
|
-
notMatches: "notMatches";
|
|
241
|
-
in: "in";
|
|
242
|
-
notIn: "notIn";
|
|
243
|
-
}>;
|
|
244
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
245
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
246
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
247
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
248
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
249
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
250
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
251
|
-
}, z.core.$strip>>;
|
|
252
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
253
|
-
or: z.ZodArray<z.ZodObject<{
|
|
254
|
-
operator: z.ZodEnum<{
|
|
255
|
-
includes: "includes";
|
|
256
|
-
endsWith: "endsWith";
|
|
257
|
-
startsWith: "startsWith";
|
|
258
|
-
matches: "matches";
|
|
259
|
-
contains: "contains";
|
|
260
|
-
after: "after";
|
|
261
|
-
before: "before";
|
|
262
|
-
equals: "equals";
|
|
263
|
-
notEquals: "notEquals";
|
|
264
|
-
exists: "exists";
|
|
265
|
-
notExists: "notExists";
|
|
266
|
-
greaterThan: "greaterThan";
|
|
267
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
268
|
-
lessThan: "lessThan";
|
|
269
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
270
|
-
notContains: "notContains";
|
|
271
|
-
semverEquals: "semverEquals";
|
|
272
|
-
semverNotEquals: "semverNotEquals";
|
|
273
|
-
semverGreaterThan: "semverGreaterThan";
|
|
274
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
275
|
-
semverLessThan: "semverLessThan";
|
|
276
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
277
|
-
notIncludes: "notIncludes";
|
|
278
|
-
notMatches: "notMatches";
|
|
279
|
-
in: "in";
|
|
280
|
-
notIn: "notIn";
|
|
281
|
-
}>;
|
|
282
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
283
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
284
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
285
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
286
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
287
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
288
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
289
|
-
}, z.core.$strip>>;
|
|
290
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
291
|
-
not: z.ZodArray<z.ZodObject<{
|
|
292
|
-
operator: z.ZodEnum<{
|
|
293
|
-
includes: "includes";
|
|
294
|
-
endsWith: "endsWith";
|
|
295
|
-
startsWith: "startsWith";
|
|
296
|
-
matches: "matches";
|
|
297
|
-
contains: "contains";
|
|
298
|
-
after: "after";
|
|
299
|
-
before: "before";
|
|
300
|
-
equals: "equals";
|
|
301
|
-
notEquals: "notEquals";
|
|
302
|
-
exists: "exists";
|
|
303
|
-
notExists: "notExists";
|
|
304
|
-
greaterThan: "greaterThan";
|
|
305
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
306
|
-
lessThan: "lessThan";
|
|
307
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
308
|
-
notContains: "notContains";
|
|
309
|
-
semverEquals: "semverEquals";
|
|
310
|
-
semverNotEquals: "semverNotEquals";
|
|
311
|
-
semverGreaterThan: "semverGreaterThan";
|
|
312
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
313
|
-
semverLessThan: "semverLessThan";
|
|
314
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
315
|
-
notIncludes: "notIncludes";
|
|
316
|
-
notMatches: "notMatches";
|
|
317
|
-
in: "in";
|
|
318
|
-
notIn: "notIn";
|
|
319
|
-
}>;
|
|
320
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
46
|
+
}, z.core.$strip>]>>, z.ZodObject<{
|
|
47
|
+
or: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
321
48
|
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
322
49
|
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
323
50
|
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
324
51
|
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
325
52
|
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
326
53
|
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
327
|
-
}, z.core.$strip>>;
|
|
328
|
-
}, z.core.$strip>]
|
|
54
|
+
}, z.core.$strip>]>>;
|
|
55
|
+
}, z.core.$strip>]>;
|
|
56
|
+
conditions: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>]>>;
|
|
329
57
|
percentage: z.ZodOptional<z.ZodNumber>;
|
|
330
58
|
range: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
331
|
-
}, z.core.$strip>;
|
|
59
|
+
}, z.core.$strip>>]>;
|
|
@@ -44,7 +44,7 @@ function getSampleSchema(deps) {
|
|
|
44
44
|
const sampleByMultiple = z.array(sampleBySingle);
|
|
45
45
|
const sampleByOr = z.object({ or: sampleByMultiple });
|
|
46
46
|
const sampleBy = z.union([sampleBySingle, sampleByMultiple, sampleByOr]);
|
|
47
|
-
|
|
47
|
+
const sampleSchema = z
|
|
48
48
|
.object({
|
|
49
49
|
by: sampleBy,
|
|
50
50
|
conditions: (0, conditionsSchema_1.getConditionsSchema)(deps).optional(),
|
|
@@ -66,5 +66,6 @@ function getSampleSchema(deps) {
|
|
|
66
66
|
message: "Either `percentage` or `range` must be provided",
|
|
67
67
|
path: [],
|
|
68
68
|
});
|
|
69
|
+
return z.union([sampleSchema, z.array(sampleSchema)]);
|
|
69
70
|
}
|
|
70
71
|
//# sourceMappingURL=sampleSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleSchema.js","sourceRoot":"","sources":["../../src/linter/sampleSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,
|
|
1
|
+
{"version":3,"file":"sampleSchema.js","sourceRoot":"","sources":["../../src/linter/sampleSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,0CAwCC;AA9CD,uCAAyB;AAGzB,iDAA0E;AAC1E,yDAAyD;AAEzD,SAAgB,eAAe,CAAC,IAAkB;IAChD,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,MAAM,cAAc,GAAG,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,IAAA,kCAAmB,GAAE,CAAC,CAAC;IAElF,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;IACjE,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAEtD,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC,CAAC;IAEzE,MAAM,YAAY,GAAG,CAAC;SACnB,MAAM,CAAC;QACN,EAAE,EAAE,QAAQ;QACZ,UAAU,EAAE,IAAA,sCAAmB,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QAEhD,gCAAgC;QAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;QACjD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KACpE,CAAC;SACD,MAAM,CACL,CAAC,IAAI,EAAE,EAAE;QACP,eAAe;QACf,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9D,OAAO,KAAK,CAAC;QACf,CAAC;QAED,gBAAgB;QAChB,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9D,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,EACD;QACE,OAAO,EAAE,iDAAiD;QAC1D,IAAI,EAAE,EAAE;KACT,CACF,CAAC;IAEJ,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import type { Attribute, Destination, Effect, Event, Test } from "@eventvisor/types";
|
|
3
|
+
export interface LintContext {
|
|
4
|
+
attributes: Record<string, Attribute>;
|
|
5
|
+
events: Record<string, Event>;
|
|
6
|
+
destinations: Record<string, Destination>;
|
|
7
|
+
effects: Record<string, Effect>;
|
|
8
|
+
}
|
|
9
|
+
type EntityType = "attribute" | "event" | "destination" | "effect" | "test";
|
|
10
|
+
export declare function getSemanticIssues(entityType: EntityType, entity: Attribute | Event | Destination | Effect | Test, ctx: LintContext): z.ZodIssue[];
|
|
11
|
+
export {};
|