@living-architecture/riviere-extract-config-published-language 0.7.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 +190 -0
- package/README.md +35 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1102 -0
- package/dist/published-language/extraction-config-schema.d.ts +313 -0
- package/dist/published-language/extraction-config-schema.d.ts.map +1 -0
- package/dist/published-language/extraction-config-schema.js +1 -0
- package/dist/published-language/validated-configuration.d.ts +48 -0
- package/dist/published-language/validated-configuration.d.ts.map +1 -0
- package/dist/published-language/validated-configuration.js +186 -0
- package/dist/published-language/validation.d.ts +36 -0
- package/dist/published-language/validation.d.ts.map +1 -0
- package/dist/published-language/validation.js +258 -0
- package/extraction-config.schema.json +706 -0
- package/package.json +36 -0
|
@@ -0,0 +1,706 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://living-architecture.dev/schemas/extraction-config.schema.json",
|
|
4
|
+
"title": "Extraction Config",
|
|
5
|
+
"description": "Configuration for extracting architectural components from source code",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["modules"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "JSON Schema reference"
|
|
13
|
+
},
|
|
14
|
+
"modules": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"description": "Module definitions for component extraction",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"items": {
|
|
19
|
+
"oneOf": [{ "$ref": "#/$defs/module" }, { "$ref": "#/$defs/moduleRef" }]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"connections": {
|
|
23
|
+
"$ref": "#/$defs/connectionsConfig",
|
|
24
|
+
"description": "Connection detection configuration"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"$defs": {
|
|
28
|
+
"moduleRef": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"description": "Reference to an external module definition file",
|
|
31
|
+
"required": ["$ref"],
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"properties": {
|
|
34
|
+
"$ref": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "File path to a module definition (relative to this config file)",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"module": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "A module defines extraction rules for a path pattern",
|
|
44
|
+
"required": ["name", "domain", "path", "glob"],
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"properties": {
|
|
47
|
+
"name": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "Extraction config module identifier",
|
|
50
|
+
"minLength": 1
|
|
51
|
+
},
|
|
52
|
+
"domain": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Riviere graph domain this module belongs to",
|
|
55
|
+
"minLength": 1
|
|
56
|
+
},
|
|
57
|
+
"path": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "Module root directory relative to config file",
|
|
60
|
+
"minLength": 1
|
|
61
|
+
},
|
|
62
|
+
"modules": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Path pattern with {module} placeholder for resolving module names from file paths",
|
|
65
|
+
"pattern": "\\{module\\}"
|
|
66
|
+
},
|
|
67
|
+
"glob": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "Glob pattern for source files within the module directory",
|
|
70
|
+
"minLength": 1
|
|
71
|
+
},
|
|
72
|
+
"extends": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Package name or file path to inherit component rules from",
|
|
75
|
+
"minLength": 1
|
|
76
|
+
},
|
|
77
|
+
"api": {
|
|
78
|
+
"$ref": "#/$defs/componentRule",
|
|
79
|
+
"description": "Detection rule for API components"
|
|
80
|
+
},
|
|
81
|
+
"useCase": {
|
|
82
|
+
"$ref": "#/$defs/componentRule",
|
|
83
|
+
"description": "Detection rule for UseCase components"
|
|
84
|
+
},
|
|
85
|
+
"domainOp": {
|
|
86
|
+
"$ref": "#/$defs/componentRule",
|
|
87
|
+
"description": "Detection rule for DomainOp components"
|
|
88
|
+
},
|
|
89
|
+
"event": {
|
|
90
|
+
"$ref": "#/$defs/componentRule",
|
|
91
|
+
"description": "Detection rule for Event components"
|
|
92
|
+
},
|
|
93
|
+
"eventHandler": {
|
|
94
|
+
"$ref": "#/$defs/componentRule",
|
|
95
|
+
"description": "Detection rule for EventHandler components"
|
|
96
|
+
},
|
|
97
|
+
"ui": {
|
|
98
|
+
"$ref": "#/$defs/componentRule",
|
|
99
|
+
"description": "Detection rule for UI components"
|
|
100
|
+
},
|
|
101
|
+
"customTypes": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"description": "User-defined component types with their detection rules",
|
|
104
|
+
"additionalProperties": {
|
|
105
|
+
"$ref": "#/$defs/detectionRule"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"if": {
|
|
110
|
+
"not": {
|
|
111
|
+
"required": ["extends"]
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"then": {
|
|
115
|
+
"required": ["api", "useCase", "domainOp", "event", "eventHandler", "ui"]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"componentRule": {
|
|
119
|
+
"oneOf": [
|
|
120
|
+
{
|
|
121
|
+
"$ref": "#/$defs/notUsed"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"$ref": "#/$defs/detectionRule"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"notUsed": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"description": "Marks this component type as not used in the module",
|
|
131
|
+
"required": ["notUsed"],
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"properties": {
|
|
134
|
+
"notUsed": {
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"const": true
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"detectionRule": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"description": "Rule for detecting components of this type",
|
|
143
|
+
"required": ["find", "where"],
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"properties": {
|
|
146
|
+
"find": {
|
|
147
|
+
"$ref": "#/$defs/findTarget"
|
|
148
|
+
},
|
|
149
|
+
"where": {
|
|
150
|
+
"$ref": "#/$defs/predicate"
|
|
151
|
+
},
|
|
152
|
+
"extract": {
|
|
153
|
+
"$ref": "#/$defs/extractBlock",
|
|
154
|
+
"description": "Extraction rules for metadata fields"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"extractBlock": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"description": "Extraction rules mapping field names to extraction rules",
|
|
161
|
+
"additionalProperties": {
|
|
162
|
+
"$ref": "#/$defs/extractionRule"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"extractionRule": {
|
|
166
|
+
"oneOf": [
|
|
167
|
+
{ "$ref": "#/$defs/literalExtractionRule" },
|
|
168
|
+
{ "$ref": "#/$defs/fromClassNameExtractionRule" },
|
|
169
|
+
{ "$ref": "#/$defs/fromMethodNameExtractionRule" },
|
|
170
|
+
{ "$ref": "#/$defs/fromFilePathExtractionRule" },
|
|
171
|
+
{ "$ref": "#/$defs/fromPropertyExtractionRule" },
|
|
172
|
+
{ "$ref": "#/$defs/fromDecoratorArgExtractionRule" },
|
|
173
|
+
{ "$ref": "#/$defs/fromClassDecoratorArgExtractionRule" },
|
|
174
|
+
{ "$ref": "#/$defs/fromDecoratorNameExtractionRule" },
|
|
175
|
+
{ "$ref": "#/$defs/fromGenericArgExtractionRule" },
|
|
176
|
+
{ "$ref": "#/$defs/fromMethodSignatureExtractionRule" },
|
|
177
|
+
{ "$ref": "#/$defs/fromConstructorParamsExtractionRule" },
|
|
178
|
+
{ "$ref": "#/$defs/fromParameterTypeExtractionRule" }
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"fromMethodNameExtractionRule": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"description": "Extracts value from the method name",
|
|
184
|
+
"required": ["fromMethodName"],
|
|
185
|
+
"additionalProperties": false,
|
|
186
|
+
"properties": {
|
|
187
|
+
"fromMethodName": {
|
|
188
|
+
"oneOf": [
|
|
189
|
+
{ "type": "boolean", "const": true },
|
|
190
|
+
{
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"properties": {
|
|
194
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"fromFilePathExtractionRule": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"description": "Extracts value from the file path using regex capture",
|
|
204
|
+
"required": ["fromFilePath"],
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"properties": {
|
|
207
|
+
"fromFilePath": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"required": ["pattern", "capture"],
|
|
210
|
+
"additionalProperties": false,
|
|
211
|
+
"properties": {
|
|
212
|
+
"pattern": { "type": "string", "minLength": 1 },
|
|
213
|
+
"capture": { "type": "integer", "minimum": 0 },
|
|
214
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"fromPropertyExtractionRule": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"description": "Extracts value from a class property",
|
|
222
|
+
"required": ["fromProperty"],
|
|
223
|
+
"additionalProperties": false,
|
|
224
|
+
"properties": {
|
|
225
|
+
"fromProperty": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"required": ["name", "kind"],
|
|
228
|
+
"additionalProperties": false,
|
|
229
|
+
"properties": {
|
|
230
|
+
"name": { "type": "string", "minLength": 1 },
|
|
231
|
+
"kind": { "type": "string", "enum": ["static", "instance"] },
|
|
232
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"fromDecoratorArgExtractionRule": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"description": "Extracts value from decorator argument",
|
|
240
|
+
"required": ["fromDecoratorArg"],
|
|
241
|
+
"additionalProperties": false,
|
|
242
|
+
"properties": {
|
|
243
|
+
"fromDecoratorArg": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"additionalProperties": false,
|
|
246
|
+
"minProperties": 1,
|
|
247
|
+
"properties": {
|
|
248
|
+
"decorator": { "type": "string", "minLength": 1 },
|
|
249
|
+
"position": { "type": "integer", "minimum": 0 },
|
|
250
|
+
"name": { "type": "string", "minLength": 1 },
|
|
251
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"fromClassDecoratorArgExtractionRule": {
|
|
257
|
+
"type": "object",
|
|
258
|
+
"description": "Extracts value from decorator argument on the containing class",
|
|
259
|
+
"required": ["fromClassDecoratorArg"],
|
|
260
|
+
"additionalProperties": false,
|
|
261
|
+
"properties": {
|
|
262
|
+
"fromClassDecoratorArg": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"required": ["decorator"],
|
|
265
|
+
"additionalProperties": false,
|
|
266
|
+
"properties": {
|
|
267
|
+
"decorator": { "type": "string", "minLength": 1 },
|
|
268
|
+
"position": { "type": "integer", "minimum": 0 },
|
|
269
|
+
"name": { "type": "string", "minLength": 1 },
|
|
270
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
271
|
+
},
|
|
272
|
+
"oneOf": [
|
|
273
|
+
{
|
|
274
|
+
"required": ["position"],
|
|
275
|
+
"not": { "required": ["name"] }
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"required": ["name"],
|
|
279
|
+
"not": { "required": ["position"] }
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"fromDecoratorNameExtractionRule": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"description": "Extracts value from the decorator name itself",
|
|
288
|
+
"required": ["fromDecoratorName"],
|
|
289
|
+
"additionalProperties": false,
|
|
290
|
+
"properties": {
|
|
291
|
+
"fromDecoratorName": {
|
|
292
|
+
"oneOf": [
|
|
293
|
+
{ "type": "boolean", "const": true },
|
|
294
|
+
{
|
|
295
|
+
"type": "object",
|
|
296
|
+
"additionalProperties": false,
|
|
297
|
+
"properties": {
|
|
298
|
+
"mapping": {
|
|
299
|
+
"type": "object",
|
|
300
|
+
"additionalProperties": { "type": "string" },
|
|
301
|
+
"minProperties": 1
|
|
302
|
+
},
|
|
303
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"fromGenericArgExtractionRule": {
|
|
311
|
+
"type": "object",
|
|
312
|
+
"description": "Extracts value from generic type argument",
|
|
313
|
+
"required": ["fromGenericArg"],
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"properties": {
|
|
316
|
+
"fromGenericArg": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"required": ["interface", "position"],
|
|
319
|
+
"additionalProperties": false,
|
|
320
|
+
"properties": {
|
|
321
|
+
"interface": { "type": "string", "minLength": 1 },
|
|
322
|
+
"position": { "type": "integer", "minimum": 0 },
|
|
323
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"fromMethodSignatureExtractionRule": {
|
|
329
|
+
"type": "object",
|
|
330
|
+
"description": "Extracts method parameters and return type",
|
|
331
|
+
"required": ["fromMethodSignature"],
|
|
332
|
+
"additionalProperties": false,
|
|
333
|
+
"properties": {
|
|
334
|
+
"fromMethodSignature": {
|
|
335
|
+
"type": "boolean",
|
|
336
|
+
"const": true
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"fromConstructorParamsExtractionRule": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"description": "Extracts constructor parameter names and types",
|
|
343
|
+
"required": ["fromConstructorParams"],
|
|
344
|
+
"additionalProperties": false,
|
|
345
|
+
"properties": {
|
|
346
|
+
"fromConstructorParams": {
|
|
347
|
+
"type": "boolean",
|
|
348
|
+
"const": true
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"fromParameterTypeExtractionRule": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"description": "Extracts type name of parameter at position",
|
|
355
|
+
"required": ["fromParameterType"],
|
|
356
|
+
"additionalProperties": false,
|
|
357
|
+
"properties": {
|
|
358
|
+
"fromParameterType": {
|
|
359
|
+
"type": "object",
|
|
360
|
+
"required": ["position"],
|
|
361
|
+
"additionalProperties": false,
|
|
362
|
+
"properties": {
|
|
363
|
+
"position": { "type": "integer", "minimum": 0 },
|
|
364
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"fromClassNameExtractionRule": {
|
|
370
|
+
"type": "object",
|
|
371
|
+
"description": "Extracts value from the class name",
|
|
372
|
+
"required": ["fromClassName"],
|
|
373
|
+
"additionalProperties": false,
|
|
374
|
+
"properties": {
|
|
375
|
+
"fromClassName": {
|
|
376
|
+
"oneOf": [
|
|
377
|
+
{ "type": "boolean", "const": true },
|
|
378
|
+
{
|
|
379
|
+
"type": "object",
|
|
380
|
+
"additionalProperties": false,
|
|
381
|
+
"properties": {
|
|
382
|
+
"transform": { "$ref": "#/$defs/transform" }
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
],
|
|
386
|
+
"description": "Extract from class name, optionally with transform"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"transform": {
|
|
391
|
+
"type": "object",
|
|
392
|
+
"description": "Transform operations to apply to extracted value",
|
|
393
|
+
"additionalProperties": false,
|
|
394
|
+
"minProperties": 1,
|
|
395
|
+
"properties": {
|
|
396
|
+
"stripSuffix": { "type": "string", "minLength": 1 },
|
|
397
|
+
"stripPrefix": { "type": "string", "minLength": 1 },
|
|
398
|
+
"toLowerCase": { "type": "boolean", "const": true },
|
|
399
|
+
"toUpperCase": { "type": "boolean", "const": true },
|
|
400
|
+
"kebabToPascal": { "type": "boolean", "const": true },
|
|
401
|
+
"pascalToKebab": { "type": "boolean", "const": true }
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"literalExtractionRule": {
|
|
405
|
+
"type": "object",
|
|
406
|
+
"description": "Extracts a hardcoded literal value",
|
|
407
|
+
"required": ["literal"],
|
|
408
|
+
"additionalProperties": false,
|
|
409
|
+
"properties": {
|
|
410
|
+
"literal": {
|
|
411
|
+
"oneOf": [
|
|
412
|
+
{ "type": "string", "minLength": 1 },
|
|
413
|
+
{ "type": "boolean" },
|
|
414
|
+
{ "type": "number" }
|
|
415
|
+
],
|
|
416
|
+
"description": "Literal value to use for this field"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"findTarget": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"description": "The code construct to search for",
|
|
423
|
+
"enum": ["classes", "methods", "functions"]
|
|
424
|
+
},
|
|
425
|
+
"predicate": {
|
|
426
|
+
"oneOf": [
|
|
427
|
+
{
|
|
428
|
+
"$ref": "#/$defs/hasDecoratorPredicate"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"$ref": "#/$defs/hasJSDocPredicate"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"$ref": "#/$defs/extendsClassPredicate"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"$ref": "#/$defs/implementsInterfacePredicate"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"$ref": "#/$defs/nameEndsWithPredicate"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"$ref": "#/$defs/nameMatchesPredicate"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"$ref": "#/$defs/inClassWithPredicate"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"$ref": "#/$defs/andPredicate"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"$ref": "#/$defs/orPredicate"
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
"hasDecoratorPredicate": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"description": "Matches if the target has a specified decorator",
|
|
459
|
+
"required": ["hasDecorator"],
|
|
460
|
+
"additionalProperties": false,
|
|
461
|
+
"properties": {
|
|
462
|
+
"hasDecorator": {
|
|
463
|
+
"type": "object",
|
|
464
|
+
"required": ["name"],
|
|
465
|
+
"additionalProperties": false,
|
|
466
|
+
"properties": {
|
|
467
|
+
"name": {
|
|
468
|
+
"oneOf": [
|
|
469
|
+
{
|
|
470
|
+
"type": "string",
|
|
471
|
+
"minLength": 1
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"type": "array",
|
|
475
|
+
"items": {
|
|
476
|
+
"type": "string",
|
|
477
|
+
"minLength": 1
|
|
478
|
+
},
|
|
479
|
+
"minItems": 1
|
|
480
|
+
}
|
|
481
|
+
],
|
|
482
|
+
"description": "Decorator name(s) to match"
|
|
483
|
+
},
|
|
484
|
+
"from": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"minLength": 1,
|
|
487
|
+
"description": "Package the decorator is imported from"
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"hasJSDocPredicate": {
|
|
494
|
+
"type": "object",
|
|
495
|
+
"description": "Matches if the target has a specified JSDoc tag",
|
|
496
|
+
"required": ["hasJSDoc"],
|
|
497
|
+
"additionalProperties": false,
|
|
498
|
+
"properties": {
|
|
499
|
+
"hasJSDoc": {
|
|
500
|
+
"type": "object",
|
|
501
|
+
"required": ["tag"],
|
|
502
|
+
"additionalProperties": false,
|
|
503
|
+
"properties": {
|
|
504
|
+
"tag": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"minLength": 1,
|
|
507
|
+
"description": "JSDoc tag to match (without @)"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"extendsClassPredicate": {
|
|
514
|
+
"type": "object",
|
|
515
|
+
"description": "Matches if the class extends a specified base class",
|
|
516
|
+
"required": ["extendsClass"],
|
|
517
|
+
"additionalProperties": false,
|
|
518
|
+
"properties": {
|
|
519
|
+
"extendsClass": {
|
|
520
|
+
"type": "object",
|
|
521
|
+
"required": ["name"],
|
|
522
|
+
"additionalProperties": false,
|
|
523
|
+
"properties": {
|
|
524
|
+
"name": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"minLength": 1,
|
|
527
|
+
"description": "Base class name to match"
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
"implementsInterfacePredicate": {
|
|
534
|
+
"type": "object",
|
|
535
|
+
"description": "Matches if the class implements a specified interface",
|
|
536
|
+
"required": ["implementsInterface"],
|
|
537
|
+
"additionalProperties": false,
|
|
538
|
+
"properties": {
|
|
539
|
+
"implementsInterface": {
|
|
540
|
+
"type": "object",
|
|
541
|
+
"required": ["name"],
|
|
542
|
+
"additionalProperties": false,
|
|
543
|
+
"properties": {
|
|
544
|
+
"name": {
|
|
545
|
+
"type": "string",
|
|
546
|
+
"minLength": 1,
|
|
547
|
+
"description": "Interface name to match"
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"nameEndsWithPredicate": {
|
|
554
|
+
"type": "object",
|
|
555
|
+
"description": "Matches if the target name ends with a specified suffix",
|
|
556
|
+
"required": ["nameEndsWith"],
|
|
557
|
+
"additionalProperties": false,
|
|
558
|
+
"properties": {
|
|
559
|
+
"nameEndsWith": {
|
|
560
|
+
"type": "object",
|
|
561
|
+
"required": ["suffix"],
|
|
562
|
+
"additionalProperties": false,
|
|
563
|
+
"properties": {
|
|
564
|
+
"suffix": {
|
|
565
|
+
"type": "string",
|
|
566
|
+
"minLength": 1,
|
|
567
|
+
"description": "Suffix to match"
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"nameMatchesPredicate": {
|
|
574
|
+
"type": "object",
|
|
575
|
+
"description": "Matches if the target name matches a regex pattern",
|
|
576
|
+
"required": ["nameMatches"],
|
|
577
|
+
"additionalProperties": false,
|
|
578
|
+
"properties": {
|
|
579
|
+
"nameMatches": {
|
|
580
|
+
"type": "object",
|
|
581
|
+
"required": ["pattern"],
|
|
582
|
+
"additionalProperties": false,
|
|
583
|
+
"properties": {
|
|
584
|
+
"pattern": {
|
|
585
|
+
"type": "string",
|
|
586
|
+
"minLength": 1,
|
|
587
|
+
"description": "Regex pattern to match against the name"
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"inClassWithPredicate": {
|
|
594
|
+
"type": "object",
|
|
595
|
+
"description": "Matches if the method is in a class matching the predicate",
|
|
596
|
+
"required": ["inClassWith"],
|
|
597
|
+
"additionalProperties": false,
|
|
598
|
+
"properties": {
|
|
599
|
+
"inClassWith": {
|
|
600
|
+
"$ref": "#/$defs/predicate",
|
|
601
|
+
"description": "Predicate the containing class must satisfy"
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"andPredicate": {
|
|
606
|
+
"type": "object",
|
|
607
|
+
"description": "Matches if all predicates match",
|
|
608
|
+
"required": ["and"],
|
|
609
|
+
"additionalProperties": false,
|
|
610
|
+
"properties": {
|
|
611
|
+
"and": {
|
|
612
|
+
"type": "array",
|
|
613
|
+
"items": {
|
|
614
|
+
"$ref": "#/$defs/predicate"
|
|
615
|
+
},
|
|
616
|
+
"minItems": 2,
|
|
617
|
+
"description": "All predicates must match"
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
"orPredicate": {
|
|
622
|
+
"type": "object",
|
|
623
|
+
"description": "Matches if any predicate matches",
|
|
624
|
+
"required": ["or"],
|
|
625
|
+
"additionalProperties": false,
|
|
626
|
+
"properties": {
|
|
627
|
+
"or": {
|
|
628
|
+
"type": "array",
|
|
629
|
+
"items": {
|
|
630
|
+
"$ref": "#/$defs/predicate"
|
|
631
|
+
},
|
|
632
|
+
"minItems": 2,
|
|
633
|
+
"description": "Any predicate must match"
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
"connectionsConfig": {
|
|
638
|
+
"type": "object",
|
|
639
|
+
"description": "Connection detection configuration",
|
|
640
|
+
"additionalProperties": false,
|
|
641
|
+
"properties": {
|
|
642
|
+
"eventPublishers": {
|
|
643
|
+
"type": "array",
|
|
644
|
+
"description": "Declares which custom component types publish events and how to detect the connections",
|
|
645
|
+
"minItems": 1,
|
|
646
|
+
"items": {
|
|
647
|
+
"$ref": "#/$defs/eventPublisherConfig"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"httpLinks": {
|
|
651
|
+
"type": "array",
|
|
652
|
+
"description": "Declares how to resolve HTTP client calls into cross-domain Links",
|
|
653
|
+
"minItems": 1,
|
|
654
|
+
"items": {
|
|
655
|
+
"$ref": "#/$defs/httpLinkConfig"
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
"httpLinkConfig": {
|
|
661
|
+
"type": "object",
|
|
662
|
+
"description": "Declares how to resolve HTTP client calls into cross-domain Links",
|
|
663
|
+
"required": ["fromCustomType", "matchDomainBy", "matchApiBy"],
|
|
664
|
+
"additionalProperties": false,
|
|
665
|
+
"properties": {
|
|
666
|
+
"fromCustomType": {
|
|
667
|
+
"type": "string",
|
|
668
|
+
"description": "Custom component type name for HTTP clients — must be defined in customTypes in at least one module",
|
|
669
|
+
"minLength": 1
|
|
670
|
+
},
|
|
671
|
+
"matchDomainBy": {
|
|
672
|
+
"type": "string",
|
|
673
|
+
"description": "Metadata key whose value identifies the target domain",
|
|
674
|
+
"minLength": 1
|
|
675
|
+
},
|
|
676
|
+
"matchApiBy": {
|
|
677
|
+
"type": "array",
|
|
678
|
+
"description": "Metadata keys used to match the target API component",
|
|
679
|
+
"items": {
|
|
680
|
+
"type": "string",
|
|
681
|
+
"minLength": 1
|
|
682
|
+
},
|
|
683
|
+
"minItems": 1
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
"eventPublisherConfig": {
|
|
688
|
+
"type": "object",
|
|
689
|
+
"description": "Declares a custom component type as an event publisher",
|
|
690
|
+
"required": ["fromType", "metadataKey"],
|
|
691
|
+
"additionalProperties": false,
|
|
692
|
+
"properties": {
|
|
693
|
+
"fromType": {
|
|
694
|
+
"type": "string",
|
|
695
|
+
"description": "The custom component type name — must be defined in customTypes in at least one module",
|
|
696
|
+
"minLength": 1
|
|
697
|
+
},
|
|
698
|
+
"metadataKey": {
|
|
699
|
+
"type": "string",
|
|
700
|
+
"description": "The metadata key on this component type that holds the published event type name",
|
|
701
|
+
"minLength": 1
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|