@lionweb/validation 0.7.0 → 0.7.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/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/issues/LanguageIssues.d.ts +99 -0
- package/dist/issues/LanguageIssues.d.ts.map +1 -0
- package/dist/issues/LanguageIssues.js +146 -0
- package/dist/issues/LanguageIssues.js.map +1 -0
- package/dist/issues/ReferenceIssues.d.ts +43 -0
- package/dist/issues/ReferenceIssues.d.ts.map +1 -0
- package/dist/issues/ReferenceIssues.js +53 -0
- package/dist/issues/ReferenceIssues.js.map +1 -0
- package/dist/issues/SyntaxIssues.d.ts +53 -0
- package/dist/issues/SyntaxIssues.d.ts.map +1 -0
- package/dist/issues/SyntaxIssues.js +81 -0
- package/dist/issues/SyntaxIssues.js.map +1 -0
- package/dist/issues/ValidationIssue.d.ts +15 -0
- package/dist/issues/ValidationIssue.d.ts.map +1 -0
- package/dist/issues/ValidationIssue.js +17 -0
- package/dist/issues/ValidationIssue.js.map +1 -0
- package/dist/issues/index.d.ts +5 -0
- package/dist/issues/index.d.ts.map +1 -0
- package/dist/issues/index.js +5 -0
- package/dist/issues/index.js.map +1 -0
- package/dist/languages/CompositeLionWebLanguageWrapper.d.ts +24 -0
- package/dist/languages/CompositeLionWebLanguageWrapper.d.ts.map +1 -0
- package/dist/languages/CompositeLionWebLanguageWrapper.js +56 -0
- package/dist/languages/CompositeLionWebLanguageWrapper.js.map +1 -0
- package/dist/languages/LanguageRegistry.d.ts +19 -0
- package/dist/languages/LanguageRegistry.d.ts.map +1 -0
- package/dist/languages/LanguageRegistry.js +37 -0
- package/dist/languages/LanguageRegistry.js.map +1 -0
- package/dist/languages/LanguageUtils.d.ts +35 -0
- package/dist/languages/LanguageUtils.d.ts.map +1 -0
- package/dist/languages/LanguageUtils.js +54 -0
- package/dist/languages/LanguageUtils.js.map +1 -0
- package/dist/languages/LionCore-M3.json +2356 -0
- package/dist/languages/LionCore-builtins.json +372 -0
- package/dist/languages/LionWebLanguageWrapper.d.ts +31 -0
- package/dist/languages/LionWebLanguageWrapper.d.ts.map +1 -0
- package/dist/languages/LionWebLanguageWrapper.js +69 -0
- package/dist/languages/LionWebLanguageWrapper.js.map +1 -0
- package/dist/languages/MetaPointerMap.d.ts +11 -0
- package/dist/languages/MetaPointerMap.d.ts.map +1 -0
- package/dist/languages/MetaPointerMap.js +39 -0
- package/dist/languages/MetaPointerMap.js.map +1 -0
- package/dist/languages/index.d.ts +3 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +3 -0
- package/dist/languages/index.js.map +1 -0
- package/dist/runners/FileUtils.d.ts +6 -0
- package/dist/runners/FileUtils.d.ts.map +1 -0
- package/dist/runners/FileUtils.js +53 -0
- package/dist/runners/FileUtils.js.map +1 -0
- package/dist/runners/RunCheckFolder.d.ts +2 -0
- package/dist/runners/RunCheckFolder.d.ts.map +1 -0
- package/dist/runners/RunCheckFolder.js +6 -0
- package/dist/runners/RunCheckFolder.js.map +1 -0
- package/dist/runners/RunCheckFolderWithLanguage.d.ts +2 -0
- package/dist/runners/RunCheckFolderWithLanguage.d.ts.map +1 -0
- package/dist/runners/RunCheckFolderWithLanguage.js +40 -0
- package/dist/runners/RunCheckFolderWithLanguage.js.map +1 -0
- package/dist/runners/RunCheckOneFile.d.ts +2 -0
- package/dist/runners/RunCheckOneFile.d.ts.map +1 -0
- package/dist/runners/RunCheckOneFile.js +6 -0
- package/dist/runners/RunCheckOneFile.js.map +1 -0
- package/dist/runners/RunCheckOneFileWithLanguage.d.ts +2 -0
- package/dist/runners/RunCheckOneFileWithLanguage.d.ts.map +1 -0
- package/dist/runners/RunCheckOneFileWithLanguage.js +31 -0
- package/dist/runners/RunCheckOneFileWithLanguage.js.map +1 -0
- package/dist/runners/RunLioncoreDiff.d.ts +2 -0
- package/dist/runners/RunLioncoreDiff.d.ts.map +1 -0
- package/dist/runners/RunLioncoreDiff.js +22 -0
- package/dist/runners/RunLioncoreDiff.js.map +1 -0
- package/dist/runners/Utils.d.ts +7 -0
- package/dist/runners/Utils.d.ts.map +1 -0
- package/dist/runners/Utils.js +48 -0
- package/dist/runners/Utils.js.map +1 -0
- package/dist/runners/index.d.ts +3 -0
- package/dist/runners/index.d.ts.map +1 -0
- package/dist/runners/index.js +3 -0
- package/dist/runners/index.js.map +1 -0
- package/dist/validators/LionWebChunkDefinitions.d.ts +9 -0
- package/dist/validators/LionWebChunkDefinitions.d.ts.map +1 -0
- package/dist/validators/LionWebChunkDefinitions.js +100 -0
- package/dist/validators/LionWebChunkDefinitions.js.map +1 -0
- package/dist/validators/LionWebLanguageReferenceValidator.d.ts +21 -0
- package/dist/validators/LionWebLanguageReferenceValidator.d.ts.map +1 -0
- package/dist/validators/LionWebLanguageReferenceValidator.js +166 -0
- package/dist/validators/LionWebLanguageReferenceValidator.js.map +1 -0
- package/dist/validators/LionWebLanguageValidator.d.ts +23 -0
- package/dist/validators/LionWebLanguageValidator.d.ts.map +1 -0
- package/dist/validators/LionWebLanguageValidator.js +67 -0
- package/dist/validators/LionWebLanguageValidator.js.map +1 -0
- package/dist/validators/LionWebReferenceValidator.d.ts +43 -0
- package/dist/validators/LionWebReferenceValidator.d.ts.map +1 -0
- package/dist/validators/LionWebReferenceValidator.js +203 -0
- package/dist/validators/LionWebReferenceValidator.js.map +1 -0
- package/dist/validators/LionWebSyntaxValidator.d.ts +9 -0
- package/dist/validators/LionWebSyntaxValidator.d.ts.map +1 -0
- package/dist/validators/LionWebSyntaxValidator.js +11 -0
- package/dist/validators/LionWebSyntaxValidator.js.map +1 -0
- package/dist/validators/LionWebValidator.d.ts +24 -0
- package/dist/validators/LionWebValidator.d.ts.map +1 -0
- package/dist/validators/LionWebValidator.js +55 -0
- package/dist/validators/LionWebValidator.js.map +1 -0
- package/dist/validators/ValidationFunctions.d.ts +60 -0
- package/dist/validators/ValidationFunctions.d.ts.map +1 -0
- package/dist/validators/ValidationFunctions.js +104 -0
- package/dist/validators/ValidationFunctions.js.map +1 -0
- package/dist/validators/generic/SyntaxValidator.d.ts +37 -0
- package/dist/validators/generic/SyntaxValidator.d.ts.map +1 -0
- package/dist/validators/generic/SyntaxValidator.js +152 -0
- package/dist/validators/generic/SyntaxValidator.js.map +1 -0
- package/dist/validators/generic/ValidationResult.d.ts +8 -0
- package/dist/validators/generic/ValidationResult.d.ts.map +1 -0
- package/dist/validators/generic/ValidationResult.js +15 -0
- package/dist/validators/generic/ValidationResult.js.map +1 -0
- package/dist/validators/generic/index.d.ts +4 -0
- package/dist/validators/generic/index.d.ts.map +1 -0
- package/dist/validators/generic/index.js +4 -0
- package/dist/validators/generic/index.js.map +1 -0
- package/dist/validators/generic/schema/DefinitionSchema.d.ts +23 -0
- package/dist/validators/generic/schema/DefinitionSchema.d.ts.map +1 -0
- package/dist/validators/generic/schema/DefinitionSchema.js +43 -0
- package/dist/validators/generic/schema/DefinitionSchema.js.map +1 -0
- package/dist/validators/generic/schema/ValidationTypes.d.ts +101 -0
- package/dist/validators/generic/schema/ValidationTypes.d.ts.map +1 -0
- package/dist/validators/generic/schema/ValidationTypes.js +43 -0
- package/dist/validators/generic/schema/ValidationTypes.js.map +1 -0
- package/dist/validators/generic/schema/index.d.ts +3 -0
- package/dist/validators/generic/schema/index.d.ts.map +1 -0
- package/dist/validators/generic/schema/index.js +3 -0
- package/dist/validators/generic/schema/index.js.map +1 -0
- package/dist/validators/index.d.ts +9 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +9 -0
- package/dist/validators/index.js.map +1 -0
- package/package.json +11 -7
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
{
|
|
2
|
+
"serializationFormatVersion": "2023.1",
|
|
3
|
+
"languages" : [
|
|
4
|
+
{
|
|
5
|
+
"key" : "LionCore-M3",
|
|
6
|
+
"version": "2023.1"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"key" : "LionCore-builtins",
|
|
10
|
+
"version": "2023.1"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"nodes" : [
|
|
14
|
+
{
|
|
15
|
+
"id" : "LionCore-builtins",
|
|
16
|
+
"classifier" : {
|
|
17
|
+
"language": "LionCore-M3",
|
|
18
|
+
"version" : "2023.1",
|
|
19
|
+
"key" : "Language"
|
|
20
|
+
},
|
|
21
|
+
"properties" : [
|
|
22
|
+
{
|
|
23
|
+
"property": {
|
|
24
|
+
"language": "LionCore-builtins",
|
|
25
|
+
"version" : "2023.1",
|
|
26
|
+
"key" : "LionCore-builtins-INamed-name"
|
|
27
|
+
},
|
|
28
|
+
"value" : "LionCore_builtins"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"property": {
|
|
32
|
+
"language": "LionCore-M3",
|
|
33
|
+
"version" : "2023.1",
|
|
34
|
+
"key" : "Language-version"
|
|
35
|
+
},
|
|
36
|
+
"value" : "2023.1"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"property": {
|
|
40
|
+
"language": "LionCore-M3",
|
|
41
|
+
"version" : "2023.1",
|
|
42
|
+
"key" : "IKeyed-key"
|
|
43
|
+
},
|
|
44
|
+
"value" : "LionCore-builtins"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"containments": [
|
|
48
|
+
{
|
|
49
|
+
"containment": {
|
|
50
|
+
"language": "LionCore-M3",
|
|
51
|
+
"version" : "2023.1",
|
|
52
|
+
"key" : "Language-entities"
|
|
53
|
+
},
|
|
54
|
+
"children" : [
|
|
55
|
+
"LionCore-builtins-String",
|
|
56
|
+
"LionCore-builtins-Boolean",
|
|
57
|
+
"LionCore-builtins-Integer",
|
|
58
|
+
"LionCore-builtins-JSON",
|
|
59
|
+
"LionCore-builtins-Node",
|
|
60
|
+
"LionCore-builtins-INamed"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"references" : [
|
|
65
|
+
{
|
|
66
|
+
"reference": {
|
|
67
|
+
"language": "LionCore-M3",
|
|
68
|
+
"version" : "2023.1",
|
|
69
|
+
"key" : "Language-dependsOn"
|
|
70
|
+
},
|
|
71
|
+
"targets" : []
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"annotations" : [],
|
|
75
|
+
"parent" : null
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id" : "LionCore-builtins-String",
|
|
79
|
+
"classifier" : {
|
|
80
|
+
"language": "LionCore-M3",
|
|
81
|
+
"version" : "2023.1",
|
|
82
|
+
"key" : "PrimitiveType"
|
|
83
|
+
},
|
|
84
|
+
"properties" : [
|
|
85
|
+
{
|
|
86
|
+
"property": {
|
|
87
|
+
"language": "LionCore-builtins",
|
|
88
|
+
"version" : "2023.1",
|
|
89
|
+
"key" : "LionCore-builtins-INamed-name"
|
|
90
|
+
},
|
|
91
|
+
"value" : "String"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"property": {
|
|
95
|
+
"language": "LionCore-M3",
|
|
96
|
+
"version" : "2023.1",
|
|
97
|
+
"key" : "IKeyed-key"
|
|
98
|
+
},
|
|
99
|
+
"value" : "LionCore-builtins-String"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"containments": [],
|
|
103
|
+
"references" : [],
|
|
104
|
+
"annotations" : [],
|
|
105
|
+
"parent" : "LionCore-builtins"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id" : "LionCore-builtins-Boolean",
|
|
109
|
+
"classifier" : {
|
|
110
|
+
"language": "LionCore-M3",
|
|
111
|
+
"version" : "2023.1",
|
|
112
|
+
"key" : "PrimitiveType"
|
|
113
|
+
},
|
|
114
|
+
"properties" : [
|
|
115
|
+
{
|
|
116
|
+
"property": {
|
|
117
|
+
"language": "LionCore-builtins",
|
|
118
|
+
"version" : "2023.1",
|
|
119
|
+
"key" : "LionCore-builtins-INamed-name"
|
|
120
|
+
},
|
|
121
|
+
"value" : "Boolean"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"property": {
|
|
125
|
+
"language": "LionCore-M3",
|
|
126
|
+
"version" : "2023.1",
|
|
127
|
+
"key" : "IKeyed-key"
|
|
128
|
+
},
|
|
129
|
+
"value" : "LionCore-builtins-Boolean"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"containments": [],
|
|
133
|
+
"references" : [],
|
|
134
|
+
"annotations" : [],
|
|
135
|
+
"parent" : "LionCore-builtins"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id" : "LionCore-builtins-Integer",
|
|
139
|
+
"classifier" : {
|
|
140
|
+
"language": "LionCore-M3",
|
|
141
|
+
"version" : "2023.1",
|
|
142
|
+
"key" : "PrimitiveType"
|
|
143
|
+
},
|
|
144
|
+
"properties" : [
|
|
145
|
+
{
|
|
146
|
+
"property": {
|
|
147
|
+
"language": "LionCore-builtins",
|
|
148
|
+
"version" : "2023.1",
|
|
149
|
+
"key" : "LionCore-builtins-INamed-name"
|
|
150
|
+
},
|
|
151
|
+
"value" : "Integer"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"property": {
|
|
155
|
+
"language": "LionCore-M3",
|
|
156
|
+
"version" : "2023.1",
|
|
157
|
+
"key" : "IKeyed-key"
|
|
158
|
+
},
|
|
159
|
+
"value" : "LionCore-builtins-Integer"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"containments": [],
|
|
163
|
+
"references" : [],
|
|
164
|
+
"annotations" : [],
|
|
165
|
+
"parent" : "LionCore-builtins"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id" : "LionCore-builtins-JSON",
|
|
169
|
+
"classifier" : {
|
|
170
|
+
"language": "LionCore-M3",
|
|
171
|
+
"version" : "2023.1",
|
|
172
|
+
"key" : "PrimitiveType"
|
|
173
|
+
},
|
|
174
|
+
"properties" : [
|
|
175
|
+
{
|
|
176
|
+
"property": {
|
|
177
|
+
"language": "LionCore-builtins",
|
|
178
|
+
"version" : "2023.1",
|
|
179
|
+
"key" : "LionCore-builtins-INamed-name"
|
|
180
|
+
},
|
|
181
|
+
"value" : "JSON"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"property": {
|
|
185
|
+
"language": "LionCore-M3",
|
|
186
|
+
"version" : "2023.1",
|
|
187
|
+
"key" : "IKeyed-key"
|
|
188
|
+
},
|
|
189
|
+
"value" : "LionCore-builtins-JSON"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"containments": [],
|
|
193
|
+
"references" : [],
|
|
194
|
+
"annotations" : [],
|
|
195
|
+
"parent" : "LionCore-builtins"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"id" : "LionCore-builtins-Node",
|
|
199
|
+
"classifier" : {
|
|
200
|
+
"language": "LionCore-M3",
|
|
201
|
+
"version" : "2023.1",
|
|
202
|
+
"key" : "Concept"
|
|
203
|
+
},
|
|
204
|
+
"properties" : [
|
|
205
|
+
{
|
|
206
|
+
"property": {
|
|
207
|
+
"language": "LionCore-M3",
|
|
208
|
+
"version" : "2023.1",
|
|
209
|
+
"key" : "Concept-abstract"
|
|
210
|
+
},
|
|
211
|
+
"value" : "true"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"property": {
|
|
215
|
+
"language": "LionCore-M3",
|
|
216
|
+
"version" : "2023.1",
|
|
217
|
+
"key" : "Concept-partition"
|
|
218
|
+
},
|
|
219
|
+
"value" : "false"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"property": {
|
|
223
|
+
"language": "LionCore-builtins",
|
|
224
|
+
"version" : "2023.1",
|
|
225
|
+
"key" : "LionCore-builtins-INamed-name"
|
|
226
|
+
},
|
|
227
|
+
"value" : "Node"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"property": {
|
|
231
|
+
"language": "LionCore-M3",
|
|
232
|
+
"version" : "2023.1",
|
|
233
|
+
"key" : "IKeyed-key"
|
|
234
|
+
},
|
|
235
|
+
"value" : "LionCore-builtins-Node"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"containments": [
|
|
239
|
+
{
|
|
240
|
+
"containment": {
|
|
241
|
+
"language": "LionCore-M3",
|
|
242
|
+
"version" : "2023.1",
|
|
243
|
+
"key" : "Classifier-features"
|
|
244
|
+
},
|
|
245
|
+
"children" : []
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"references" : [
|
|
249
|
+
{
|
|
250
|
+
"reference": {
|
|
251
|
+
"language": "LionCore-M3",
|
|
252
|
+
"version" : "2023.1",
|
|
253
|
+
"key" : "Concept-extends"
|
|
254
|
+
},
|
|
255
|
+
"targets" : []
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"reference": {
|
|
259
|
+
"language": "LionCore-M3",
|
|
260
|
+
"version" : "2023.1",
|
|
261
|
+
"key" : "Concept-implements"
|
|
262
|
+
},
|
|
263
|
+
"targets" : []
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"annotations" : [],
|
|
267
|
+
"parent" : "LionCore-builtins"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"id" : "LionCore-builtins-INamed",
|
|
271
|
+
"classifier" : {
|
|
272
|
+
"language": "LionCore-M3",
|
|
273
|
+
"version" : "2023.1",
|
|
274
|
+
"key" : "Interface"
|
|
275
|
+
},
|
|
276
|
+
"properties" : [
|
|
277
|
+
{
|
|
278
|
+
"property": {
|
|
279
|
+
"language": "LionCore-builtins",
|
|
280
|
+
"version" : "2023.1",
|
|
281
|
+
"key" : "LionCore-builtins-INamed-name"
|
|
282
|
+
},
|
|
283
|
+
"value" : "INamed"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"property": {
|
|
287
|
+
"language": "LionCore-M3",
|
|
288
|
+
"version" : "2023.1",
|
|
289
|
+
"key" : "IKeyed-key"
|
|
290
|
+
},
|
|
291
|
+
"value" : "LionCore-builtins-INamed"
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"containments": [
|
|
295
|
+
{
|
|
296
|
+
"containment": {
|
|
297
|
+
"language": "LionCore-M3",
|
|
298
|
+
"version" : "2023.1",
|
|
299
|
+
"key" : "Classifier-features"
|
|
300
|
+
},
|
|
301
|
+
"children" : [
|
|
302
|
+
"LionCore-builtins-INamed-name"
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"references" : [
|
|
307
|
+
{
|
|
308
|
+
"reference": {
|
|
309
|
+
"language": "LionCore-M3",
|
|
310
|
+
"version" : "2023.1",
|
|
311
|
+
"key" : "Interface-extends"
|
|
312
|
+
},
|
|
313
|
+
"targets" : []
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"annotations" : [],
|
|
317
|
+
"parent" : "LionCore-builtins"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"id" : "LionCore-builtins-INamed-name",
|
|
321
|
+
"classifier" : {
|
|
322
|
+
"language": "LionCore-M3",
|
|
323
|
+
"version" : "2023.1",
|
|
324
|
+
"key" : "Property"
|
|
325
|
+
},
|
|
326
|
+
"properties" : [
|
|
327
|
+
{
|
|
328
|
+
"property": {
|
|
329
|
+
"language": "LionCore-M3",
|
|
330
|
+
"version" : "2023.1",
|
|
331
|
+
"key" : "Feature-optional"
|
|
332
|
+
},
|
|
333
|
+
"value" : "false"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"property": {
|
|
337
|
+
"language": "LionCore-builtins",
|
|
338
|
+
"version" : "2023.1",
|
|
339
|
+
"key" : "LionCore-builtins-INamed-name"
|
|
340
|
+
},
|
|
341
|
+
"value" : "name"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"property": {
|
|
345
|
+
"language": "LionCore-M3",
|
|
346
|
+
"version" : "2023.1",
|
|
347
|
+
"key" : "IKeyed-key"
|
|
348
|
+
},
|
|
349
|
+
"value" : "LionCore-builtins-INamed-name"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"containments": [],
|
|
353
|
+
"references" : [
|
|
354
|
+
{
|
|
355
|
+
"reference": {
|
|
356
|
+
"language": "LionCore-M3",
|
|
357
|
+
"version" : "2023.1",
|
|
358
|
+
"key" : "Property-type"
|
|
359
|
+
},
|
|
360
|
+
"targets" : [
|
|
361
|
+
{
|
|
362
|
+
"resolveInfo": "String",
|
|
363
|
+
"reference" : "LionCore-builtins-String"
|
|
364
|
+
}
|
|
365
|
+
]
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
"annotations" : [],
|
|
369
|
+
"parent" : "LionCore-builtins-INamed"
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LionWebJsonChunk, LionWebJsonNode, LionWebKey } from "@lionweb/json";
|
|
2
|
+
import { LionWebJsonChunkWrapper } from "@lionweb/json-utils";
|
|
3
|
+
interface LionWebLanguageWrapperInterface {
|
|
4
|
+
superClassifiers: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
5
|
+
allClassifiers: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
6
|
+
propertyDefinitions: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
7
|
+
allProperties: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
8
|
+
referenceDefinitions: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
9
|
+
allReferenceDefinitions: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
10
|
+
containmentDefinitions: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
11
|
+
allContainments: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Class encapsulating a chunk that represent a language.
|
|
15
|
+
*/
|
|
16
|
+
export declare class LionWebLanguageWrapper extends LionWebJsonChunkWrapper implements LionWebLanguageWrapperInterface {
|
|
17
|
+
name: string;
|
|
18
|
+
version: string;
|
|
19
|
+
key: LionWebKey;
|
|
20
|
+
constructor(chunk: LionWebJsonChunk);
|
|
21
|
+
superClassifiers: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
22
|
+
allClassifiers: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
23
|
+
propertyDefinitions: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
24
|
+
allProperties: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
25
|
+
referenceDefinitions: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
26
|
+
allReferenceDefinitions: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
27
|
+
containmentDefinitions: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
28
|
+
allContainments: (classifier: LionWebJsonNode) => LionWebJsonNode[];
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=LionWebLanguageWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LionWebLanguageWrapper.d.ts","sourceRoot":"","sources":["../../src/languages/LionWebLanguageWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,uBAAuB,EAA2B,MAAM,qBAAqB,CAAA;AAItF,UAAU,+BAA+B;IACrC,gBAAgB,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,eAAe,EAAE,CAAA;IACpE,cAAc,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,eAAe,EAAE,CAAA;IAClE,mBAAmB,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,eAAe,EAAE,CAAA;IACvE,aAAa,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,eAAe,EAAE,CAAA;IACjE,oBAAoB,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,eAAe,EAAE,CAAA;IACxE,uBAAuB,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,eAAe,EAAE,CAAA;IAC3E,sBAAsB,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,eAAe,EAAE,CAAA;IAC1E,eAAe,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,eAAe,EAAE,CAAA;CACtE;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,uBAAwB,YAAW,+BAA+B;IAC1G,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,UAAU,CAAA;gBAEH,KAAK,EAAE,gBAAgB;IAWnC,gBAAgB,GAAI,YAAY,eAAe,KAAG,eAAe,EAAE,CAoBlE;IAED,cAAc,GAAI,YAAY,eAAe,KAAG,eAAe,EAAE,CAEhE;IAED,mBAAmB,GAAI,YAAY,eAAe,KAAG,eAAe,EAAE,CAIrE;IAED,aAAa,GAAI,YAAY,eAAe,KAAG,eAAe,EAAE,CAE/D;IAED,oBAAoB,GAAI,YAAY,eAAe,KAAG,eAAe,EAAE,CAItE;IAED,uBAAuB,GAAI,YAAY,eAAe,KAAG,eAAe,EAAE,CAEzE;IAED,sBAAsB,GAAI,YAAY,eAAe,KAAG,eAAe,EAAE,CAIxE;IAED,eAAe,GAAI,YAAY,eAAe,KAAG,eAAe,EAAE,CAEjE;CACJ"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { LionWebJsonChunkWrapper, MetaPointers, NodeUtils } from "@lionweb/json-utils";
|
|
2
|
+
import { visitAndMap } from "@lionweb/ts-utils";
|
|
3
|
+
import { isAnnotation, isConcept, isContainment, isInterface, isProperty, isReference } from "./LanguageUtils.js";
|
|
4
|
+
/**
|
|
5
|
+
* Class encapsulating a chunk that represent a language.
|
|
6
|
+
*/
|
|
7
|
+
export class LionWebLanguageWrapper extends LionWebJsonChunkWrapper {
|
|
8
|
+
constructor(chunk) {
|
|
9
|
+
super(chunk);
|
|
10
|
+
this.superClassifiers = (classifier) => {
|
|
11
|
+
const result = [];
|
|
12
|
+
if (isConcept(classifier)) {
|
|
13
|
+
const extnds = NodeUtils.findReference(classifier, MetaPointers.ConceptExtends);
|
|
14
|
+
const implments = NodeUtils.findReference(classifier, MetaPointers.ConceptImplements);
|
|
15
|
+
result.push(...this.getReferredNodes(extnds));
|
|
16
|
+
result.push(...this.getReferredNodes(implments));
|
|
17
|
+
}
|
|
18
|
+
else if (isAnnotation(classifier)) {
|
|
19
|
+
const extnds = NodeUtils.findReference(classifier, MetaPointers.AnnotationExtends);
|
|
20
|
+
const implments = NodeUtils.findReference(classifier, MetaPointers.AnnotationImplements);
|
|
21
|
+
result.push(...this.getReferredNodes(extnds));
|
|
22
|
+
result.push(...this.getReferredNodes(implments));
|
|
23
|
+
}
|
|
24
|
+
else if (isInterface(classifier)) {
|
|
25
|
+
const extnds = NodeUtils.findReference(classifier, MetaPointers.InterfaceExtends);
|
|
26
|
+
result.push(...this.getReferredNodes(extnds));
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
throw new Error(`concept type ${typeof classifier} not handled`);
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
this.allClassifiers = (classifier) => {
|
|
34
|
+
return visitAndMap(this.superClassifiers, this.superClassifiers)(classifier);
|
|
35
|
+
};
|
|
36
|
+
this.propertyDefinitions = (classifier) => {
|
|
37
|
+
const features = NodeUtils.findContainment(classifier, MetaPointers.ClassifierFeatures);
|
|
38
|
+
const properties = this.getChildrenAsNodes(features).filter(f => isProperty(f));
|
|
39
|
+
return properties;
|
|
40
|
+
};
|
|
41
|
+
this.allProperties = (classifier) => {
|
|
42
|
+
return visitAndMap(this.propertyDefinitions, this.superClassifiers)(classifier);
|
|
43
|
+
};
|
|
44
|
+
this.referenceDefinitions = (classifier) => {
|
|
45
|
+
const features = NodeUtils.findContainment(classifier, MetaPointers.ClassifierFeatures);
|
|
46
|
+
const references = this.getChildrenAsNodes(features).filter(f => isReference(f));
|
|
47
|
+
return references;
|
|
48
|
+
};
|
|
49
|
+
this.allReferenceDefinitions = (classifier) => {
|
|
50
|
+
return visitAndMap(this.referenceDefinitions, this.superClassifiers)(classifier);
|
|
51
|
+
};
|
|
52
|
+
this.containmentDefinitions = (classifier) => {
|
|
53
|
+
const features = NodeUtils.findContainment(classifier, MetaPointers.ClassifierFeatures);
|
|
54
|
+
const properties = this.getChildrenAsNodes(features).filter(f => isContainment(f));
|
|
55
|
+
return properties;
|
|
56
|
+
};
|
|
57
|
+
this.allContainments = (classifier) => {
|
|
58
|
+
return visitAndMap(this.containmentDefinitions, this.superClassifiers)(classifier);
|
|
59
|
+
};
|
|
60
|
+
const languageNode = this.findNodesOfClassifier(MetaPointers.Language)[0];
|
|
61
|
+
const versionProp = NodeUtils.findProperty(languageNode, MetaPointers.LanguageVersion);
|
|
62
|
+
const keyProp = NodeUtils.findProperty(languageNode, MetaPointers.IKeyedKey);
|
|
63
|
+
const nameProp = NodeUtils.findProperty(languageNode, MetaPointers.INamedName);
|
|
64
|
+
this.version = versionProp?.value || "unknown";
|
|
65
|
+
this.key = keyProp?.value || "unknown";
|
|
66
|
+
this.name = nameProp?.value || "unknown";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=LionWebLanguageWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LionWebLanguageWrapper.js","sourceRoot":"","sources":["../../src/languages/LionWebLanguageWrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAajH;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,uBAAuB;IAK/D,YAAY,KAAuB;QAC/B,KAAK,CAAC,KAAK,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
|
4
|
+
* Map from languageKey => languageVersion => key => LionWebJsonNode
|
|
5
|
+
*/
|
|
6
|
+
map: Map<string, Map<string, Map<string, LionWebJsonNode>>>;
|
|
7
|
+
add(languageKey: LionWebKey, languageVersion: string, node: LionWebJsonNode): void;
|
|
8
|
+
set(mp: LionWebJsonMetaPointer, node: LionWebJsonNode): void;
|
|
9
|
+
get(mp: LionWebJsonMetaPointer): LionWebJsonNode | undefined;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=MetaPointerMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetaPointerMap.d.ts","sourceRoot":"","sources":["../../src/languages/MetaPointerMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAGnF,qBAAa,cAAc;IACvB;;OAEG;IACH,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAA+D;IAE1H,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI;IAclF,GAAG,CAAC,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI;IAc5D,GAAG,CAAC,EAAE,EAAE,sBAAsB,GAAG,eAAe,GAAG,SAAS;CAG/D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { MetaPointers, NodeUtils } from "@lionweb/json-utils";
|
|
2
|
+
export class MetaPointerMap {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Map from languageKey => languageVersion => key => LionWebJsonNode
|
|
6
|
+
*/
|
|
7
|
+
this.map = new Map();
|
|
8
|
+
}
|
|
9
|
+
add(languageKey, languageVersion, node) {
|
|
10
|
+
const keyProperty = NodeUtils.findProperty(node, MetaPointers.IKeyedKey);
|
|
11
|
+
if (keyProperty === undefined) {
|
|
12
|
+
console.log("MetaPointerMap.add: trying to add node without key property.");
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const key = keyProperty.value;
|
|
16
|
+
if (key === undefined || key == null || key === "") {
|
|
17
|
+
console.log("MetaPointerMap.add: trying to add node without key property being empty or null.");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
this.set({ language: languageKey, version: languageVersion, key: key }, node);
|
|
21
|
+
}
|
|
22
|
+
set(mp, node) {
|
|
23
|
+
let language = this.map.get(mp.language);
|
|
24
|
+
if (language === undefined) {
|
|
25
|
+
language = new Map();
|
|
26
|
+
this.map.set(mp.language, language);
|
|
27
|
+
}
|
|
28
|
+
let version = language.get(mp.version);
|
|
29
|
+
if (version === undefined) {
|
|
30
|
+
version = new Map();
|
|
31
|
+
language.set(mp.version, version);
|
|
32
|
+
}
|
|
33
|
+
version.set(mp.key, node);
|
|
34
|
+
}
|
|
35
|
+
get(mp) {
|
|
36
|
+
return this.map.get(mp.language)?.get(mp.version)?.get(mp.key);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=MetaPointerMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetaPointerMap.js","sourceRoot":"","sources":["../../src/languages/MetaPointerMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE7D,MAAM,OAAO,cAAc;IAA3B;QACI;;WAEG;QACH,QAAG,GAA2D,IAAI,GAAG,EAAqD,CAAA;IAiC9H,CAAC;IA/BG,GAAG,CAAC,WAAuB,EAAE,eAAuB,EAAE,IAAqB;QACvE,MAAM,WAAW,GAAG,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAA;QACxE,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,CAAC,G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AC,GAAG,CAAC,CAAA;IAClE,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/languages/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/languages/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LanguageRegistry } from "../languages/index.js";
|
|
2
|
+
import { ValidationResult } from "../validators/generic/ValidationResult.js";
|
|
3
|
+
export declare function validateFile(file: string, registry: LanguageRegistry): void;
|
|
4
|
+
export declare function validateFileResult(file: string, validateAgainstLanguage: boolean, registry: LanguageRegistry): ValidationResult;
|
|
5
|
+
export declare function validateFolder(folder: string, registry: LanguageRegistry): void;
|
|
6
|
+
//# sourceMappingURL=FileUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUtils.d.ts","sourceRoot":"","sources":["../../src/runners/FileUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAI5E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAG3E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,uBAAuB,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,GAAG,gBAAgB,CAc/H;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CA+B/E"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import { ValidationResult } from "../validators/generic/ValidationResult.js";
|
|
3
|
+
import { LionWebValidator } from "../validators/LionWebValidator.js";
|
|
4
|
+
import { getFilesRecursive, printIssues } from "./Utils.js";
|
|
5
|
+
export function validateFile(file, registry) {
|
|
6
|
+
const result = validateFileResult(file, false, registry);
|
|
7
|
+
printIssues(result);
|
|
8
|
+
}
|
|
9
|
+
export function validateFileResult(file, validateAgainstLanguage, registry) {
|
|
10
|
+
if (file !== null) {
|
|
11
|
+
const jsonString1 = fs.readFileSync(file, "utf-8");
|
|
12
|
+
const json1 = JSON.parse(jsonString1);
|
|
13
|
+
const validator = new LionWebValidator(json1, registry);
|
|
14
|
+
validator.validateSyntax();
|
|
15
|
+
validator.validateReferences();
|
|
16
|
+
if (validateAgainstLanguage) {
|
|
17
|
+
validator.validateForLanguage();
|
|
18
|
+
}
|
|
19
|
+
return validator.validationResult;
|
|
20
|
+
}
|
|
21
|
+
return new ValidationResult();
|
|
22
|
+
}
|
|
23
|
+
export function validateFolder(folder, registry) {
|
|
24
|
+
let totalErrors = 0;
|
|
25
|
+
let totalSucceed = 0;
|
|
26
|
+
let totalFailed = 0;
|
|
27
|
+
for (const f of getFilesRecursive(folder, [])) {
|
|
28
|
+
const jsonString1 = fs.readFileSync(f, "utf-8");
|
|
29
|
+
const json1 = JSON.parse(jsonString1);
|
|
30
|
+
const validator = new LionWebValidator(json1, registry);
|
|
31
|
+
try {
|
|
32
|
+
validator.validateAll();
|
|
33
|
+
if (!validator.validationResult.hasErrors()) {
|
|
34
|
+
totalSucceed += 1;
|
|
35
|
+
console.log("V PASSED " + f);
|
|
36
|
+
printIssues(validator.validationResult, f);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
printIssues(validator.validationResult, f);
|
|
40
|
+
totalFailed += 1;
|
|
41
|
+
totalErrors += validator.validationResult.issues.length;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
console.log("EXCEPTION in file: " + f);
|
|
46
|
+
console.log("EXCEPTION " + e?.stack);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
console.log("Total without errors: " + totalSucceed);
|
|
50
|
+
console.log("Total with errors: " + totalFailed);
|
|
51
|
+
console.log("Total number of errors: " + totalErrors);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=FileUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUtils.js","sourceRoot":"","sources":["../../src/runners/FileUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE3D,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,QAA0B;IACjE,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;IACxD,WAAW,CAAC,MAAM,CAAC,CAAA;AACvB,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,uBAAgC,EAAE,QAA0B;IACzG,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAChB,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;QACrC,MAAM,SAAS,GAAG,IAAI,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QAEvD,SAAS,CAAC,cAAc,EAAE,CAAA;QAC1B,SAAS,CAAC,kBAAkB,EAAE,CAAA;QAC9B,IAAI,uBAAuB,EAAE,CAAC;YAC1B,SAAS,CAAC,mBAAmB,EAAE,CAAA;QACnC,CAAC;QACD,OAA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CAAC;IAED,OAAO,CAAC,GAAG,CAAC,wBAAwB,GAAG,YAAY,CAAC,CAAA;IACpD,OAAO,CAAC,GAAG,CAAC,qBAAqB,GAAG,WAAW,CAAC,CAAA;IAChD,OAAO,CAAC,GAAG,CAAC,0BAA0B,GAAG,WAAW,CAAC,CAAA;AACzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunCheckFolder.d.ts","sourceRoot":"","sources":["../../src/runners/RunCheckFolder.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunCheckFolder.js","sourceRoot":"","sources":["../../src/runners/RunCheckFolder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAE9B,MAAM,QAAQ,GAAG,IAAI,gBAAgB,EAAE,CAAA;AACvC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA"}
|