@toolproof-core/schema 1.0.1 → 1.0.3

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.
Files changed (47) hide show
  1. package/dist/generated/dependencyMap.json +292 -0
  2. package/dist/generated/normalized/Genesis.d.ts +2 -0
  3. package/dist/generated/normalized/Genesis.js +2 -0
  4. package/dist/generated/normalized/Genesis.json +2000 -0
  5. package/dist/generated/resources/Genesis.d.ts +2 -0
  6. package/dist/generated/resources/Genesis.js +2 -0
  7. package/dist/generated/resources/Genesis.json +2899 -0
  8. package/dist/generated/schemas/Genesis.d.ts +2 -0
  9. package/dist/generated/schemas/Genesis.js +2 -0
  10. package/dist/generated/schemas/Genesis.json +1458 -0
  11. package/dist/generated/schemas/standalone/Goal.d.ts +2 -0
  12. package/dist/generated/schemas/standalone/Goal.js +2 -0
  13. package/dist/generated/schemas/standalone/Goal.json +86 -0
  14. package/dist/generated/schemas/standalone/Job.d.ts +2 -0
  15. package/dist/generated/schemas/standalone/Job.js +2 -0
  16. package/dist/generated/schemas/standalone/Job.json +236 -0
  17. package/dist/generated/schemas/standalone/RawStrategy.d.ts +2 -0
  18. package/dist/generated/schemas/standalone/RawStrategy.js +2 -0
  19. package/dist/generated/schemas/standalone/RawStrategy.json +642 -0
  20. package/dist/generated/schemas/standalone/ResourceType.d.ts +2 -0
  21. package/dist/generated/schemas/standalone/ResourceType.js +2 -0
  22. package/dist/generated/schemas/standalone/ResourceType.json +140 -0
  23. package/dist/generated/schemas/standalone/RunnableStrategy.d.ts +2 -0
  24. package/dist/generated/schemas/standalone/RunnableStrategy.js +2 -0
  25. package/dist/generated/schemas/standalone/RunnableStrategy.json +712 -0
  26. package/dist/generated/schemas/standalone/StrategyRun.d.ts +2 -0
  27. package/dist/generated/schemas/standalone/StrategyRun.js +2 -0
  28. package/dist/generated/schemas/standalone/StrategyRun.json +994 -0
  29. package/dist/index.d.ts +13 -0
  30. package/dist/index.js +7 -0
  31. package/package.json +9 -8
  32. package/src/Genesis.json +1999 -1999
  33. package/src/generated/types/standalone/Resource_Genesis.js +1 -1
  34. package/src/generated/types/standalone/Resource_Job.js +1 -1
  35. package/src/generated/types/standalone/Resource_RawStrategy.js +1 -1
  36. package/src/generated/types/standalone/Resource_ResourceType.js +1 -1
  37. package/src/generated/types/standalone/Resource_RunnableStrategy.js +1 -1
  38. package/src/index.ts +93 -1
  39. package/src/scripts/_lib/config.ts +205 -205
  40. package/src/scripts/extractSchemasFromResourceTypeShells.ts +218 -218
  41. package/src/scripts/generateDependencies.ts +120 -120
  42. package/src/scripts/generateSchemaShims.ts +135 -135
  43. package/src/scripts/generateStandaloneSchema.ts +175 -175
  44. package/src/scripts/generateStandaloneType.ts +119 -119
  45. package/src/scripts/generateTypes.ts +614 -614
  46. package/src/scripts/normalizeAnchorsToPointers.ts +123 -123
  47. package/src/scripts/wrapResourceTypesWithResourceShells.ts +84 -84
@@ -0,0 +1,642 @@
1
+ {
2
+ "$anchor": "RawStrategy",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "allOf": [
6
+ {
7
+ "$ref": "#/$defs/StepsFacet"
8
+ },
9
+ {
10
+ "$ref": "#/$defs/StrategyStateFacet"
11
+ }
12
+ ],
13
+ "unevaluatedProperties": false,
14
+ "$defs": {
15
+ "StepsFacet": {
16
+ "$anchor": "StepsFacet",
17
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
18
+ "type": "object",
19
+ "required": [
20
+ "steps"
21
+ ],
22
+ "properties": {
23
+ "steps": {
24
+ "$ref": "#/$defs/StepArray"
25
+ }
26
+ }
27
+ },
28
+ "StrategyStateFacet": {
29
+ "$anchor": "StrategyStateFacet",
30
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
31
+ "type": "object",
32
+ "required": [
33
+ "strategyState"
34
+ ],
35
+ "properties": {
36
+ "strategyState": {
37
+ "$ref": "#/$defs/StrategyState"
38
+ }
39
+ }
40
+ },
41
+ "StepArray": {
42
+ "$anchor": "StepArray",
43
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
44
+ "type": "array",
45
+ "items": {
46
+ "$ref": "#/$defs/Step"
47
+ },
48
+ "uniqueItems": true
49
+ },
50
+ "StrategyState": {
51
+ "$anchor": "StrategyState",
52
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
53
+ "type": "object",
54
+ "propertyNames": {
55
+ "$ref": "#/$defs/JobStepIdentity"
56
+ },
57
+ "additionalProperties": {
58
+ "$ref": "#/$defs/JobStepSocket"
59
+ }
60
+ },
61
+ "Step": {
62
+ "$anchor": "Step",
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "type": "object",
65
+ "oneOf": [
66
+ {
67
+ "$ref": "#/$defs/JobStep"
68
+ },
69
+ {
70
+ "$ref": "#/$defs/BranchStep"
71
+ },
72
+ {
73
+ "$ref": "#/$defs/WhileStep"
74
+ },
75
+ {
76
+ "$ref": "#/$defs/ForStep"
77
+ }
78
+ ],
79
+ "unevaluatedProperties": false
80
+ },
81
+ "JobStepIdentity": {
82
+ "$anchor": "JobStepIdentity",
83
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
84
+ "type": "string",
85
+ "pattern": "^JOB_STEP-.+$"
86
+ },
87
+ "JobStepSocket": {
88
+ "$anchor": "JobStepSocket",
89
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
90
+ "type": "object",
91
+ "propertyNames": {
92
+ "$ref": "#/$defs/ResourceRoleIdentity"
93
+ },
94
+ "additionalProperties": {
95
+ "$ref": "#/$defs/Resource"
96
+ }
97
+ },
98
+ "JobStep": {
99
+ "$anchor": "JobStep",
100
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
101
+ "type": "object",
102
+ "required": [
103
+ "identity",
104
+ "jobHandle"
105
+ ],
106
+ "properties": {
107
+ "identity": {
108
+ "$ref": "#/$defs/JobStepIdentity"
109
+ },
110
+ "stepKind": {
111
+ "const": "job"
112
+ },
113
+ "jobHandle": {
114
+ "$ref": "#/$defs/JobIdentity"
115
+ }
116
+ },
117
+ "allOf": [
118
+ {
119
+ "$ref": "#/$defs/StepKindFacet"
120
+ },
121
+ {
122
+ "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
123
+ "$ref": "#/$defs/RoleBindingsFacet"
124
+ }
125
+ ]
126
+ },
127
+ "BranchStep": {
128
+ "$anchor": "BranchStep",
129
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
130
+ "type": "object",
131
+ "required": [
132
+ "identity",
133
+ "cases"
134
+ ],
135
+ "properties": {
136
+ "identity": {
137
+ "$ref": "#/$defs/BranchStepIdentity"
138
+ },
139
+ "stepKind": {
140
+ "const": "branch"
141
+ },
142
+ "cases": {
143
+ "type": "array",
144
+ "items": {
145
+ "$ref": "#/$defs/Conditional"
146
+ },
147
+ "minItems": 1,
148
+ "uniqueItems": true
149
+ }
150
+ },
151
+ "allOf": [
152
+ {
153
+ "$ref": "#/$defs/StepKindFacet"
154
+ }
155
+ ]
156
+ },
157
+ "WhileStep": {
158
+ "$anchor": "WhileStep",
159
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
160
+ "type": "object",
161
+ "required": [
162
+ "identity",
163
+ "case"
164
+ ],
165
+ "properties": {
166
+ "identity": {
167
+ "$ref": "#/$defs/WhileStepIdentity"
168
+ },
169
+ "stepKind": {
170
+ "const": "while"
171
+ },
172
+ "case": {
173
+ "$ref": "#/$defs/Conditional"
174
+ }
175
+ },
176
+ "allOf": [
177
+ {
178
+ "$ref": "#/$defs/StepKindFacet"
179
+ }
180
+ ]
181
+ },
182
+ "ForStep": {
183
+ "$anchor": "ForStep",
184
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
185
+ "type": "object",
186
+ "required": [
187
+ "identity",
188
+ "case"
189
+ ],
190
+ "properties": {
191
+ "identity": {
192
+ "$ref": "#/$defs/ForStepIdentity"
193
+ },
194
+ "stepKind": {
195
+ "const": "for"
196
+ },
197
+ "case": {
198
+ "$ref": "#/$defs/Conditional"
199
+ }
200
+ },
201
+ "allOf": [
202
+ {
203
+ "$ref": "#/$defs/StepKindFacet"
204
+ }
205
+ ]
206
+ },
207
+ "ResourceRoleIdentity": {
208
+ "$anchor": "ResourceRoleIdentity",
209
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
210
+ "type": "string",
211
+ "pattern": "^ROLE-.+$"
212
+ },
213
+ "Resource": {
214
+ "$anchor": "Resource",
215
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
216
+ "type": "object",
217
+ "oneOf": [
218
+ {
219
+ "$ref": "#/$defs/ResourceMissing"
220
+ },
221
+ {
222
+ "$ref": "#/$defs/ResourceInputPotential"
223
+ },
224
+ {
225
+ "$ref": "#/$defs/ResourceOutputPotential"
226
+ },
227
+ {
228
+ "$ref": "#/$defs/ResourceMaterialized"
229
+ }
230
+ ],
231
+ "unevaluatedProperties": false
232
+ },
233
+ "JobIdentity": {
234
+ "$anchor": "JobIdentity",
235
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
236
+ "type": "string",
237
+ "pattern": "^JOB-.+$"
238
+ },
239
+ "StepKindFacet": {
240
+ "$anchor": "StepKindFacet",
241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
242
+ "type": "object",
243
+ "required": [
244
+ "stepKind"
245
+ ],
246
+ "properties": {
247
+ "stepKind": {
248
+ "$ref": "#/$defs/StepKind"
249
+ }
250
+ }
251
+ },
252
+ "RoleBindingsFacet": {
253
+ "$anchor": "RoleBindingsFacet",
254
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
255
+ "type": "object",
256
+ "required": [
257
+ "roleBindings"
258
+ ],
259
+ "properties": {
260
+ "roleBindings": {
261
+ "$ref": "#/$defs/RoleBindings"
262
+ }
263
+ }
264
+ },
265
+ "BranchStepIdentity": {
266
+ "$anchor": "BranchStepIdentity",
267
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
268
+ "type": "string",
269
+ "pattern": "^BRANCH_STEP-.+$"
270
+ },
271
+ "Conditional": {
272
+ "$anchor": "Conditional",
273
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
274
+ "type": "object",
275
+ "required": [
276
+ "when",
277
+ "what"
278
+ ],
279
+ "properties": {
280
+ "when": {
281
+ "$ref": "#/$defs/JobStep"
282
+ },
283
+ "what": {
284
+ "$ref": "#/$defs/JobStep"
285
+ }
286
+ },
287
+ "unevaluatedProperties": false
288
+ },
289
+ "WhileStepIdentity": {
290
+ "$anchor": "WhileStepIdentity",
291
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
292
+ "type": "string",
293
+ "pattern": "^WHILE_STEP-.+$"
294
+ },
295
+ "ForStepIdentity": {
296
+ "$anchor": "ForStepIdentity",
297
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
298
+ "type": "string",
299
+ "pattern": "^FOR_STEP-.+$"
300
+ },
301
+ "ResourceMissing": {
302
+ "$anchor": "ResourceMissing",
303
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
304
+ "type": "object",
305
+ "$ref": "#/$defs/ShellMissing",
306
+ "unevaluatedProperties": false
307
+ },
308
+ "ResourceInputPotential": {
309
+ "$anchor": "ResourceInputPotential",
310
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
311
+ "type": "object",
312
+ "$ref": "#/$defs/ShellInputPotential",
313
+ "unevaluatedProperties": false
314
+ },
315
+ "ResourceOutputPotential": {
316
+ "$anchor": "ResourceOutputPotential",
317
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
318
+ "type": "object",
319
+ "$ref": "#/$defs/ShellOutputPotential",
320
+ "unevaluatedProperties": false
321
+ },
322
+ "ResourceMaterialized": {
323
+ "$anchor": "ResourceMaterialized",
324
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
325
+ "type": "object",
326
+ "allOf": [
327
+ {
328
+ "$ref": "#/$defs/ShellMaterializedBase"
329
+ },
330
+ {
331
+ "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
332
+ "$ref": "#/$defs/NucleusFacet"
333
+ }
334
+ ],
335
+ "unevaluatedProperties": false
336
+ },
337
+ "StepKind": {
338
+ "$anchor": "StepKind",
339
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
340
+ "type": "string",
341
+ "enum": [
342
+ "job",
343
+ "branch",
344
+ "while",
345
+ "for"
346
+ ]
347
+ },
348
+ "RoleBindings": {
349
+ "$anchor": "RoleBindings",
350
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
351
+ "type": "object",
352
+ "required": [
353
+ "inputBindings",
354
+ "outputBindings"
355
+ ],
356
+ "properties": {
357
+ "inputBindings": {
358
+ "$ref": "#/$defs/RoleBindingArray"
359
+ },
360
+ "outputBindings": {
361
+ "$ref": "#/$defs/RoleBindingArray"
362
+ }
363
+ }
364
+ },
365
+ "ShellMissing": {
366
+ "$anchor": "ShellMissing",
367
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
368
+ "type": "object",
369
+ "properties": {
370
+ "resourceKind": {
371
+ "const": "missing"
372
+ }
373
+ },
374
+ "allOf": [
375
+ {
376
+ "$ref": "#/$defs/ResourceBase"
377
+ },
378
+ {
379
+ "$ref": "#/$defs/ResourceKindFacet"
380
+ }
381
+ ],
382
+ "unevaluatedProperties": false
383
+ },
384
+ "ShellInputPotential": {
385
+ "$anchor": "ShellInputPotential",
386
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
387
+ "type": "object",
388
+ "properties": {
389
+ "resourceKind": {
390
+ "const": "input-potential"
391
+ }
392
+ },
393
+ "allOf": [
394
+ {
395
+ "$ref": "#/$defs/ResourceBase"
396
+ },
397
+ {
398
+ "$ref": "#/$defs/CreationContextFacet"
399
+ },
400
+ {
401
+ "$ref": "#/$defs/ResourceKindFacet"
402
+ }
403
+ ],
404
+ "unevaluatedProperties": false
405
+ },
406
+ "ShellOutputPotential": {
407
+ "$anchor": "ShellOutputPotential",
408
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
409
+ "type": "object",
410
+ "properties": {
411
+ "resourceKind": {
412
+ "const": "output-potential"
413
+ }
414
+ },
415
+ "allOf": [
416
+ {
417
+ "$ref": "#/$defs/ResourceBase"
418
+ },
419
+ {
420
+ "$ref": "#/$defs/CreationContextFacet"
421
+ },
422
+ {
423
+ "$ref": "#/$defs/ResourceKindFacet"
424
+ }
425
+ ],
426
+ "unevaluatedProperties": false
427
+ },
428
+ "ShellMaterializedBase": {
429
+ "$anchor": "ShellMaterializedBase",
430
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
431
+ "type": "object",
432
+ "required": [
433
+ "version"
434
+ ],
435
+ "properties": {
436
+ "version": {
437
+ "const": 1
438
+ },
439
+ "resourceKind": {
440
+ "const": "materialized"
441
+ }
442
+ },
443
+ "allOf": [
444
+ {
445
+ "$ref": "#/$defs/ResourceBase"
446
+ },
447
+ {
448
+ "$ref": "#/$defs/CreationContextFacet"
449
+ },
450
+ {
451
+ "$ref": "#/$defs/ResourceKindFacet"
452
+ },
453
+ {
454
+ "$ref": "#/$defs/TimestampFacet"
455
+ },
456
+ {
457
+ "$ref": "#/$defs/PathFacet"
458
+ }
459
+ ]
460
+ },
461
+ "NucleusFacet": {
462
+ "$anchor": "NucleusFacet",
463
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
464
+ "type": "object",
465
+ "required": [
466
+ "nucleus"
467
+ ],
468
+ "properties": {
469
+ "nucleus": {
470
+ "$ref": "#/$defs/Nucleus"
471
+ }
472
+ }
473
+ },
474
+ "RoleBindingArray": {
475
+ "$anchor": "RoleBindingArray",
476
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
477
+ "type": "array",
478
+ "items": {
479
+ "$ref": "#/$defs/ResourceRoleIdentity"
480
+ }
481
+ },
482
+ "ResourceBase": {
483
+ "$anchor": "ResourceBase",
484
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
485
+ "type": "object",
486
+ "required": [
487
+ "identity",
488
+ "resourceTypeHandle"
489
+ ],
490
+ "properties": {
491
+ "identity": {
492
+ "$ref": "#/$defs/ResourceIdentity"
493
+ },
494
+ "resourceTypeHandle": {
495
+ "$ref": "#/$defs/ResourceTypeIdentity"
496
+ }
497
+ }
498
+ },
499
+ "ResourceKindFacet": {
500
+ "$anchor": "ResourceKindFacet",
501
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
502
+ "type": "object",
503
+ "required": [
504
+ "resourceKind"
505
+ ],
506
+ "properties": {
507
+ "resourceKind": {
508
+ "$ref": "#/$defs/ResourceKind"
509
+ }
510
+ }
511
+ },
512
+ "CreationContextFacet": {
513
+ "$anchor": "CreationContextFacet",
514
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
515
+ "type": "object",
516
+ "required": [
517
+ "creationContext"
518
+ ],
519
+ "properties": {
520
+ "creationContext": {
521
+ "$ref": "#/$defs/CreationContext"
522
+ }
523
+ }
524
+ },
525
+ "TimestampFacet": {
526
+ "$anchor": "TimestampFacet",
527
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
528
+ "type": "object",
529
+ "required": [
530
+ "timestamp"
531
+ ],
532
+ "properties": {
533
+ "timestamp": {
534
+ "$ref": "#/$defs/Timestamp"
535
+ }
536
+ }
537
+ },
538
+ "PathFacet": {
539
+ "$anchor": "PathFacet",
540
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
541
+ "type": "object",
542
+ "required": [
543
+ "path"
544
+ ],
545
+ "properties": {
546
+ "path": {
547
+ "$ref": "#/$defs/Path"
548
+ }
549
+ }
550
+ },
551
+ "Nucleus": {
552
+ "$anchor": "Nucleus",
553
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
554
+ "type": "object",
555
+ "additionalProperties": {
556
+ "$ref": "#/$defs/JsonData"
557
+ }
558
+ },
559
+ "ResourceIdentity": {
560
+ "$anchor": "ResourceIdentity",
561
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
562
+ "type": "string",
563
+ "pattern": "^RESOURCE-.+$"
564
+ },
565
+ "ResourceTypeIdentity": {
566
+ "$anchor": "ResourceTypeIdentity",
567
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
568
+ "type": "string",
569
+ "pattern": "^TYPE-.+$"
570
+ },
571
+ "ResourceKind": {
572
+ "$anchor": "ResourceKind",
573
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
574
+ "type": "string",
575
+ "enum": [
576
+ "missing",
577
+ "input-potential",
578
+ "output-potential",
579
+ "materialized"
580
+ ]
581
+ },
582
+ "CreationContext": {
583
+ "$anchor": "CreationContext",
584
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
585
+ "type": "object",
586
+ "required": [
587
+ "resourceRoleHandle",
588
+ "jobStepHandle"
589
+ ],
590
+ "properties": {
591
+ "resourceRoleHandle": {
592
+ "$ref": "#/$defs/ResourceRoleIdentity"
593
+ },
594
+ "jobStepHandle": {
595
+ "$ref": "#/$defs/JobStepIdentity"
596
+ }
597
+ }
598
+ },
599
+ "Timestamp": {
600
+ "$anchor": "Timestamp",
601
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
602
+ "type": "string",
603
+ "format": "date-time"
604
+ },
605
+ "Path": {
606
+ "$anchor": "Path",
607
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
608
+ "type": "string",
609
+ "format": "uri-reference"
610
+ },
611
+ "JsonData": {
612
+ "$anchor": "JsonData",
613
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
614
+ "oneOf": [
615
+ {
616
+ "type": "null"
617
+ },
618
+ {
619
+ "type": "boolean"
620
+ },
621
+ {
622
+ "type": "number"
623
+ },
624
+ {
625
+ "type": "string"
626
+ },
627
+ {
628
+ "type": "array",
629
+ "items": {
630
+ "$ref": "#/$defs/JsonData"
631
+ }
632
+ },
633
+ {
634
+ "type": "object",
635
+ "additionalProperties": {
636
+ "$ref": "#/$defs/JsonData"
637
+ }
638
+ }
639
+ ]
640
+ }
641
+ }
642
+ }
@@ -0,0 +1,2 @@
1
+ import schema from './ResourceType.json';
2
+ export default schema;
@@ -0,0 +1,2 @@
1
+ import schema from './ResourceType.json' with { type: 'json' };
2
+ export default schema;