@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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.24.0](https://github.com/eventvisor/eventvisor/compare/v0.23.0...v0.24.0) (2026-03-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* lint test specs ([#42](https://github.com/eventvisor/eventvisor/issues/42)) ([1a0d34f](https://github.com/eventvisor/eventvisor/commit/1a0d34ffde02416d5af9e22a3c30e89def5b7b3b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [0.23.0](https://github.com/eventvisor/eventvisor/compare/v0.22.0...v0.23.0) (2026-03-14)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -1,303 +1,3 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { Dependencies } from "../dependencies";
|
|
3
|
-
export declare function getConditionsSchema(deps: Dependencies): z.ZodUnion<readonly [z.
|
|
4
|
-
operator: z.ZodEnum<{
|
|
5
|
-
includes: "includes";
|
|
6
|
-
endsWith: "endsWith";
|
|
7
|
-
startsWith: "startsWith";
|
|
8
|
-
matches: "matches";
|
|
9
|
-
contains: "contains";
|
|
10
|
-
after: "after";
|
|
11
|
-
before: "before";
|
|
12
|
-
equals: "equals";
|
|
13
|
-
notEquals: "notEquals";
|
|
14
|
-
exists: "exists";
|
|
15
|
-
notExists: "notExists";
|
|
16
|
-
greaterThan: "greaterThan";
|
|
17
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
18
|
-
lessThan: "lessThan";
|
|
19
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
20
|
-
notContains: "notContains";
|
|
21
|
-
semverEquals: "semverEquals";
|
|
22
|
-
semverNotEquals: "semverNotEquals";
|
|
23
|
-
semverGreaterThan: "semverGreaterThan";
|
|
24
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
25
|
-
semverLessThan: "semverLessThan";
|
|
26
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
27
|
-
notIncludes: "notIncludes";
|
|
28
|
-
notMatches: "notMatches";
|
|
29
|
-
in: "in";
|
|
30
|
-
notIn: "notIn";
|
|
31
|
-
}>;
|
|
32
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
33
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
34
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
35
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
36
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
37
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
38
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
39
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
-
and: z.ZodArray<z.ZodObject<{
|
|
41
|
-
operator: z.ZodEnum<{
|
|
42
|
-
includes: "includes";
|
|
43
|
-
endsWith: "endsWith";
|
|
44
|
-
startsWith: "startsWith";
|
|
45
|
-
matches: "matches";
|
|
46
|
-
contains: "contains";
|
|
47
|
-
after: "after";
|
|
48
|
-
before: "before";
|
|
49
|
-
equals: "equals";
|
|
50
|
-
notEquals: "notEquals";
|
|
51
|
-
exists: "exists";
|
|
52
|
-
notExists: "notExists";
|
|
53
|
-
greaterThan: "greaterThan";
|
|
54
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
55
|
-
lessThan: "lessThan";
|
|
56
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
57
|
-
notContains: "notContains";
|
|
58
|
-
semverEquals: "semverEquals";
|
|
59
|
-
semverNotEquals: "semverNotEquals";
|
|
60
|
-
semverGreaterThan: "semverGreaterThan";
|
|
61
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
62
|
-
semverLessThan: "semverLessThan";
|
|
63
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
64
|
-
notIncludes: "notIncludes";
|
|
65
|
-
notMatches: "notMatches";
|
|
66
|
-
in: "in";
|
|
67
|
-
notIn: "notIn";
|
|
68
|
-
}>;
|
|
69
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
70
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
71
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
72
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
73
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
74
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
75
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
76
|
-
}, z.core.$strip>>;
|
|
77
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
-
or: z.ZodArray<z.ZodObject<{
|
|
79
|
-
operator: z.ZodEnum<{
|
|
80
|
-
includes: "includes";
|
|
81
|
-
endsWith: "endsWith";
|
|
82
|
-
startsWith: "startsWith";
|
|
83
|
-
matches: "matches";
|
|
84
|
-
contains: "contains";
|
|
85
|
-
after: "after";
|
|
86
|
-
before: "before";
|
|
87
|
-
equals: "equals";
|
|
88
|
-
notEquals: "notEquals";
|
|
89
|
-
exists: "exists";
|
|
90
|
-
notExists: "notExists";
|
|
91
|
-
greaterThan: "greaterThan";
|
|
92
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
93
|
-
lessThan: "lessThan";
|
|
94
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
95
|
-
notContains: "notContains";
|
|
96
|
-
semverEquals: "semverEquals";
|
|
97
|
-
semverNotEquals: "semverNotEquals";
|
|
98
|
-
semverGreaterThan: "semverGreaterThan";
|
|
99
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
100
|
-
semverLessThan: "semverLessThan";
|
|
101
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
102
|
-
notIncludes: "notIncludes";
|
|
103
|
-
notMatches: "notMatches";
|
|
104
|
-
in: "in";
|
|
105
|
-
notIn: "notIn";
|
|
106
|
-
}>;
|
|
107
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
108
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
109
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
110
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
111
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
112
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
113
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
114
|
-
}, z.core.$strip>>;
|
|
115
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
116
|
-
not: z.ZodArray<z.ZodObject<{
|
|
117
|
-
operator: z.ZodEnum<{
|
|
118
|
-
includes: "includes";
|
|
119
|
-
endsWith: "endsWith";
|
|
120
|
-
startsWith: "startsWith";
|
|
121
|
-
matches: "matches";
|
|
122
|
-
contains: "contains";
|
|
123
|
-
after: "after";
|
|
124
|
-
before: "before";
|
|
125
|
-
equals: "equals";
|
|
126
|
-
notEquals: "notEquals";
|
|
127
|
-
exists: "exists";
|
|
128
|
-
notExists: "notExists";
|
|
129
|
-
greaterThan: "greaterThan";
|
|
130
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
131
|
-
lessThan: "lessThan";
|
|
132
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
133
|
-
notContains: "notContains";
|
|
134
|
-
semverEquals: "semverEquals";
|
|
135
|
-
semverNotEquals: "semverNotEquals";
|
|
136
|
-
semverGreaterThan: "semverGreaterThan";
|
|
137
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
138
|
-
semverLessThan: "semverLessThan";
|
|
139
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
140
|
-
notIncludes: "notIncludes";
|
|
141
|
-
notMatches: "notMatches";
|
|
142
|
-
in: "in";
|
|
143
|
-
notIn: "notIn";
|
|
144
|
-
}>;
|
|
145
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
146
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
147
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
148
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
149
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
150
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
151
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
152
|
-
}, z.core.$strip>>;
|
|
153
|
-
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
154
|
-
operator: z.ZodEnum<{
|
|
155
|
-
includes: "includes";
|
|
156
|
-
endsWith: "endsWith";
|
|
157
|
-
startsWith: "startsWith";
|
|
158
|
-
matches: "matches";
|
|
159
|
-
contains: "contains";
|
|
160
|
-
after: "after";
|
|
161
|
-
before: "before";
|
|
162
|
-
equals: "equals";
|
|
163
|
-
notEquals: "notEquals";
|
|
164
|
-
exists: "exists";
|
|
165
|
-
notExists: "notExists";
|
|
166
|
-
greaterThan: "greaterThan";
|
|
167
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
168
|
-
lessThan: "lessThan";
|
|
169
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
170
|
-
notContains: "notContains";
|
|
171
|
-
semverEquals: "semverEquals";
|
|
172
|
-
semverNotEquals: "semverNotEquals";
|
|
173
|
-
semverGreaterThan: "semverGreaterThan";
|
|
174
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
175
|
-
semverLessThan: "semverLessThan";
|
|
176
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
177
|
-
notIncludes: "notIncludes";
|
|
178
|
-
notMatches: "notMatches";
|
|
179
|
-
in: "in";
|
|
180
|
-
notIn: "notIn";
|
|
181
|
-
}>;
|
|
182
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
183
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
184
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
185
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
186
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
187
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
188
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
189
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
-
and: z.ZodArray<z.ZodObject<{
|
|
191
|
-
operator: z.ZodEnum<{
|
|
192
|
-
includes: "includes";
|
|
193
|
-
endsWith: "endsWith";
|
|
194
|
-
startsWith: "startsWith";
|
|
195
|
-
matches: "matches";
|
|
196
|
-
contains: "contains";
|
|
197
|
-
after: "after";
|
|
198
|
-
before: "before";
|
|
199
|
-
equals: "equals";
|
|
200
|
-
notEquals: "notEquals";
|
|
201
|
-
exists: "exists";
|
|
202
|
-
notExists: "notExists";
|
|
203
|
-
greaterThan: "greaterThan";
|
|
204
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
205
|
-
lessThan: "lessThan";
|
|
206
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
207
|
-
notContains: "notContains";
|
|
208
|
-
semverEquals: "semverEquals";
|
|
209
|
-
semverNotEquals: "semverNotEquals";
|
|
210
|
-
semverGreaterThan: "semverGreaterThan";
|
|
211
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
212
|
-
semverLessThan: "semverLessThan";
|
|
213
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
214
|
-
notIncludes: "notIncludes";
|
|
215
|
-
notMatches: "notMatches";
|
|
216
|
-
in: "in";
|
|
217
|
-
notIn: "notIn";
|
|
218
|
-
}>;
|
|
219
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
220
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
221
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
222
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
223
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
224
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
225
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
226
|
-
}, z.core.$strip>>;
|
|
227
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
228
|
-
or: z.ZodArray<z.ZodObject<{
|
|
229
|
-
operator: z.ZodEnum<{
|
|
230
|
-
includes: "includes";
|
|
231
|
-
endsWith: "endsWith";
|
|
232
|
-
startsWith: "startsWith";
|
|
233
|
-
matches: "matches";
|
|
234
|
-
contains: "contains";
|
|
235
|
-
after: "after";
|
|
236
|
-
before: "before";
|
|
237
|
-
equals: "equals";
|
|
238
|
-
notEquals: "notEquals";
|
|
239
|
-
exists: "exists";
|
|
240
|
-
notExists: "notExists";
|
|
241
|
-
greaterThan: "greaterThan";
|
|
242
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
243
|
-
lessThan: "lessThan";
|
|
244
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
245
|
-
notContains: "notContains";
|
|
246
|
-
semverEquals: "semverEquals";
|
|
247
|
-
semverNotEquals: "semverNotEquals";
|
|
248
|
-
semverGreaterThan: "semverGreaterThan";
|
|
249
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
250
|
-
semverLessThan: "semverLessThan";
|
|
251
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
252
|
-
notIncludes: "notIncludes";
|
|
253
|
-
notMatches: "notMatches";
|
|
254
|
-
in: "in";
|
|
255
|
-
notIn: "notIn";
|
|
256
|
-
}>;
|
|
257
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
258
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
259
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
260
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
261
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
262
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
263
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
264
|
-
}, z.core.$strip>>;
|
|
265
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
266
|
-
not: z.ZodArray<z.ZodObject<{
|
|
267
|
-
operator: z.ZodEnum<{
|
|
268
|
-
includes: "includes";
|
|
269
|
-
endsWith: "endsWith";
|
|
270
|
-
startsWith: "startsWith";
|
|
271
|
-
matches: "matches";
|
|
272
|
-
contains: "contains";
|
|
273
|
-
after: "after";
|
|
274
|
-
before: "before";
|
|
275
|
-
equals: "equals";
|
|
276
|
-
notEquals: "notEquals";
|
|
277
|
-
exists: "exists";
|
|
278
|
-
notExists: "notExists";
|
|
279
|
-
greaterThan: "greaterThan";
|
|
280
|
-
greaterThanOrEquals: "greaterThanOrEquals";
|
|
281
|
-
lessThan: "lessThan";
|
|
282
|
-
lessThanOrEquals: "lessThanOrEquals";
|
|
283
|
-
notContains: "notContains";
|
|
284
|
-
semverEquals: "semverEquals";
|
|
285
|
-
semverNotEquals: "semverNotEquals";
|
|
286
|
-
semverGreaterThan: "semverGreaterThan";
|
|
287
|
-
semverGreaterThanOrEquals: "semverGreaterThanOrEquals";
|
|
288
|
-
semverLessThan: "semverLessThan";
|
|
289
|
-
semverLessThanOrEquals: "semverLessThanOrEquals";
|
|
290
|
-
notIncludes: "notIncludes";
|
|
291
|
-
notMatches: "notMatches";
|
|
292
|
-
in: "in";
|
|
293
|
-
notIn: "notIn";
|
|
294
|
-
}>;
|
|
295
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
296
|
-
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
297
|
-
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
298
|
-
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
299
|
-
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
300
|
-
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
301
|
-
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
302
|
-
}, z.core.$strip>>;
|
|
303
|
-
}, z.core.$strip>]>>]>;
|
|
3
|
+
export declare function getConditionsSchema(deps: Dependencies): z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>]>;
|
|
@@ -77,6 +77,7 @@ function getConditionsSchema(deps) {
|
|
|
77
77
|
"notIn",
|
|
78
78
|
]),
|
|
79
79
|
value: z.any().optional(),
|
|
80
|
+
regexFlags: z.string().optional(),
|
|
80
81
|
})
|
|
81
82
|
.refine(...(0, sourceSchema_1.getSourceBaseRefine)())
|
|
82
83
|
// @TODO: refine "value" type against each "operator"
|
|
@@ -86,21 +87,14 @@ function getConditionsSchema(deps) {
|
|
|
86
87
|
}
|
|
87
88
|
return data.value !== undefined;
|
|
88
89
|
}, { message: "Value is required for all operators except exists and notExists" });
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
const orConditionSchema = z.object({
|
|
93
|
-
or: z.array(plainConditionSchema),
|
|
94
|
-
});
|
|
95
|
-
const notConditionSchema = z.object({
|
|
96
|
-
not: z.array(plainConditionSchema),
|
|
97
|
-
});
|
|
98
|
-
const conditionSchema = z.union([
|
|
90
|
+
const stringConditionSchema = z.string();
|
|
91
|
+
const conditionSchema = z.lazy(() => z.union([
|
|
99
92
|
plainConditionSchema,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
93
|
+
z.object({ and: z.array(conditionSchema) }).strict(),
|
|
94
|
+
z.object({ or: z.array(conditionSchema) }).strict(),
|
|
95
|
+
z.object({ not: z.array(conditionSchema) }).strict(),
|
|
96
|
+
stringConditionSchema,
|
|
97
|
+
]));
|
|
104
98
|
return z.union([conditionSchema, z.array(conditionSchema)]);
|
|
105
99
|
}
|
|
106
100
|
//# sourceMappingURL=conditionsSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditionsSchema.js","sourceRoot":"","sources":["../../src/linter/conditionsSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,
|
|
1
|
+
{"version":3,"file":"conditionsSchema.js","sourceRoot":"","sources":["../../src/linter/conditionsSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,kDA6EC;AAlFD,uCAAyB;AAGzB,iDAA0E;AAE1E,SAAgB,mBAAmB,CAAC,IAAkB;IACpD,MAAM,UAAU,GAAG,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAC;IAE7C,MAAM,oBAAoB,GAAG,CAAC;SAC3B,MAAM,CAAC;QACN,GAAG,UAAU,CAAC,KAAK;QACnB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC;YACf,QAAQ;YACR,WAAW;YACX,QAAQ;YACR,WAAW;YAEX,UAAU;YACV,aAAa;YACb,qBAAqB;YACrB,UAAU;YACV,kBAAkB;YAElB,SAAS;YACT,UAAU;YACV,aAAa;YACb,YAAY;YACZ,UAAU;YAEV,kBAAkB;YAClB,cAAc;YACd,iBAAiB;YACjB,mBAAmB;YACnB,2BAA2B;YAC3B,gBAAgB;YAChB,wBAAwB;YAExB,mBAAmB;YACnB,QAAQ;YACR,OAAO;YAEP,mBAAmB;YACnB,UAAU;YACV,aAAa;YAEb,QAAQ;YACR,SAAS;YACT,YAAY;YAEZ,mBAAmB;YACnB,IAAI;YACJ,OAAO;SACR,CAAC;QACF,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAClC,CAAC;SACD,MAAM,CAAC,GAAG,IAAA,kCAAmB,GAAE,CAAC;QACjC,qDAAqD;SACpD,MAAM,CACL,CAAC,IAAI,EAAE,EAAE;QACP,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;YAChE,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC;QAClC,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC;IAClC,CAAC,EACD,EAAE,OAAO,EAAE,iEAAiE,EAAE,CAC/E,CAAC;IAEJ,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IAEzC,MAAM,eAAe,GAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAChD,CAAC,CAAC,KAAK,CAAC;QACN,oBAAoB;QACpB,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;QACpD,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;QACnD,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;QACpD,qBAAqB;KACtB,CAAC,CACH,CAAC;IAEF,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,5 +1,93 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { Dependencies } from "../dependencies";
|
|
3
3
|
export declare function getDestinationSchema(deps: Dependencies): z.ZodObject<{
|
|
4
|
-
|
|
4
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
description: z.ZodString;
|
|
6
|
+
tags: z.ZodArray<z.ZodString>;
|
|
7
|
+
transport: z.ZodString;
|
|
8
|
+
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>>>]>>;
|
|
9
|
+
sample: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
10
|
+
by: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
11
|
+
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
12
|
+
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
13
|
+
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
14
|
+
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
15
|
+
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
16
|
+
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
17
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18
|
+
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
19
|
+
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
20
|
+
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
21
|
+
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
22
|
+
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
23
|
+
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
24
|
+
}, z.core.$strip>]>>, z.ZodObject<{
|
|
25
|
+
or: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
26
|
+
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
27
|
+
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
28
|
+
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
29
|
+
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
30
|
+
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
31
|
+
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
32
|
+
}, z.core.$strip>]>>;
|
|
33
|
+
}, z.core.$strip>]>;
|
|
34
|
+
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>>>]>>;
|
|
35
|
+
percentage: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
range: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
37
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
38
|
+
by: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
39
|
+
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
40
|
+
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
41
|
+
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
42
|
+
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
43
|
+
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
44
|
+
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
45
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
46
|
+
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
47
|
+
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
48
|
+
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
49
|
+
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
50
|
+
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
51
|
+
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
52
|
+
}, z.core.$strip>]>>, z.ZodObject<{
|
|
53
|
+
or: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
54
|
+
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
55
|
+
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
56
|
+
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
57
|
+
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
58
|
+
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
59
|
+
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
60
|
+
}, z.core.$strip>]>>;
|
|
61
|
+
}, z.core.$strip>]>;
|
|
62
|
+
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>>>]>>;
|
|
63
|
+
percentage: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
range: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
65
|
+
}, z.core.$strip>>]>>;
|
|
66
|
+
transforms: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
type: z.ZodEnum<{
|
|
68
|
+
toString: "toString";
|
|
69
|
+
concat: "concat";
|
|
70
|
+
trim: "trim";
|
|
71
|
+
set: "set";
|
|
72
|
+
remove: "remove";
|
|
73
|
+
append: "append";
|
|
74
|
+
increment: "increment";
|
|
75
|
+
decrement: "decrement";
|
|
76
|
+
rename: "rename";
|
|
77
|
+
toInteger: "toInteger";
|
|
78
|
+
toDouble: "toDouble";
|
|
79
|
+
toBoolean: "toBoolean";
|
|
80
|
+
spread: "spread";
|
|
81
|
+
}>;
|
|
82
|
+
target: z.ZodOptional<z.ZodString>;
|
|
83
|
+
targetMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
84
|
+
value: z.ZodOptional<z.ZodAny>;
|
|
85
|
+
separator: z.ZodOptional<z.ZodString>;
|
|
86
|
+
source: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
87
|
+
attribute: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
88
|
+
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
89
|
+
effect: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
90
|
+
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
91
|
+
lookup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
92
|
+
}, z.core.$strip>>>;
|
|
5
93
|
}, z.core.$strict>;
|
|
@@ -35,7 +35,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.getDestinationSchema = getDestinationSchema;
|
|
37
37
|
const z = __importStar(require("zod"));
|
|
38
|
-
const jsonSchema_1 = require("./jsonSchema");
|
|
39
38
|
const tagsSchema_1 = require("./tagsSchema");
|
|
40
39
|
const conditionsSchema_1 = require("./conditionsSchema");
|
|
41
40
|
const sampleSchema_1 = require("./sampleSchema");
|
|
@@ -43,7 +42,6 @@ const transformsSchema_1 = require("./transformsSchema");
|
|
|
43
42
|
function getDestinationSchema(deps) {
|
|
44
43
|
return z
|
|
45
44
|
.object({
|
|
46
|
-
...jsonSchema_1.JSONZodSchema.shape,
|
|
47
45
|
archived: z.boolean().optional(),
|
|
48
46
|
description: z.string(),
|
|
49
47
|
tags: (0, tagsSchema_1.getTagsSchema)(deps),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destinationSchema.js","sourceRoot":"","sources":["../../src/linter/destinationSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"destinationSchema.js","sourceRoot":"","sources":["../../src/linter/destinationSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,oDAaC;AArBD,uCAAyB;AAGzB,6CAA6C;AAC7C,yDAAyD;AACzD,iDAAiD;AACjD,yDAAyD;AAEzD,SAAgB,oBAAoB,CAAC,IAAkB;IACrD,OAAO,CAAC;SACL,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,IAAI,EAAE,IAAA,0BAAa,EAAC,IAAI,CAAC;QAEzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,UAAU,EAAE,IAAA,sCAAmB,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QAChD,MAAM,EAAE,IAAA,8BAAe,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QACxC,UAAU,EAAE,IAAA,sCAAmB,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;KACjD,CAAC;SACD,MAAM,EAAE,CAAC;AACd,CAAC"}
|