@toolproof-core/schema 1.0.9 → 1.0.11

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 (67) hide show
  1. package/dist/generated/artifacts/constants.d.ts +121 -0
  2. package/dist/generated/artifacts/constants.js +121 -0
  3. package/dist/generated/artifacts/mappings.d.ts +23 -0
  4. package/dist/generated/artifacts/mappings.js +23 -0
  5. package/dist/generated/normalized/Genesis.json +117 -78
  6. package/dist/generated/resources/Genesis.json +489 -264
  7. package/dist/generated/schemas/Genesis.json +94 -61
  8. package/dist/generated/schemas/standalone/Job.json +9 -8
  9. package/dist/generated/schemas/standalone/RawStrategy.json +86 -110
  10. package/dist/generated/schemas/standalone/ResourceType.json +4 -4
  11. package/dist/generated/schemas/standalone/RunnableStrategy.json +115 -139
  12. package/dist/generated/schemas/standalone/StrategyRun.json +93 -117
  13. package/dist/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  14. package/dist/generated/types/standalone/Resource_Job.d.ts +1 -1
  15. package/dist/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  16. package/dist/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  17. package/dist/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  18. package/dist/generated/types/types.d.ts +247 -239
  19. package/dist/index.d.ts +6 -3
  20. package/dist/index.js +5 -2
  21. package/dist/scripts/_lib/config.d.ts +3 -5
  22. package/dist/scripts/_lib/config.js +8 -14
  23. package/dist/scripts/generateConstantsAndMappings.d.ts +31 -0
  24. package/dist/scripts/generateConstantsAndMappings.js +243 -0
  25. package/dist/scripts/generateDependencies.js +1 -1
  26. package/dist/scripts/generateStandaloneType.js +2 -1
  27. package/dist/scripts/generateTerminals.js +2 -2
  28. package/dist/scripts/generateTypes.js +183 -5
  29. package/dist/scripts/wrapResourceTypesWithResourceShells.js +7 -3
  30. package/package.json +9 -10
  31. package/src/Genesis.json +1873 -1833
  32. package/src/generated/artifacts/constants.ts +122 -0
  33. package/src/generated/{dependencies → artifacts}/dependencyMap.json +282 -280
  34. package/src/generated/artifacts/mappings.ts +24 -0
  35. package/src/generated/{dependencies → artifacts}/terminals.json +13 -11
  36. package/src/generated/normalized/Genesis.json +1785 -1746
  37. package/src/generated/resources/Genesis.json +2833 -2608
  38. package/src/generated/schemas/Genesis.json +1348 -1315
  39. package/src/generated/schemas/standalone/Job.json +195 -194
  40. package/src/generated/schemas/standalone/RawStrategy.json +86 -110
  41. package/src/generated/schemas/standalone/ResourceType.json +106 -106
  42. package/src/generated/schemas/standalone/RunnableStrategy.json +645 -669
  43. package/src/generated/schemas/standalone/StrategyRun.json +913 -937
  44. package/src/generated/types/standalone/Resource_Genesis.d.ts +3 -3
  45. package/src/generated/types/standalone/Resource_Job.d.ts +3 -3
  46. package/src/generated/types/standalone/Resource_RawStrategy.d.ts +3 -3
  47. package/src/generated/types/standalone/Resource_ResourceType.d.ts +3 -3
  48. package/src/generated/types/standalone/Resource_RunnableStrategy.d.ts +3 -3
  49. package/src/generated/types/types.d.ts +717 -709
  50. package/src/index.ts +77 -70
  51. package/src/scripts/_lib/config.ts +207 -215
  52. package/src/scripts/extractSchemasFromResourceTypeShells.ts +261 -261
  53. package/src/scripts/generateConstantsAndMappings.ts +309 -0
  54. package/src/scripts/generateDependencies.ts +121 -121
  55. package/src/scripts/generateSchemaShims.ts +127 -127
  56. package/src/scripts/generateStandaloneSchema.ts +185 -185
  57. package/src/scripts/generateStandaloneType.ts +129 -127
  58. package/src/scripts/generateTerminals.ts +73 -73
  59. package/src/scripts/generateTypes.ts +733 -531
  60. package/src/scripts/normalizeAnchorsToPointers.ts +141 -141
  61. package/src/scripts/wrapResourceTypesWithResourceShells.ts +86 -82
  62. package/dist/generated/constants/constants.d.ts +0 -60
  63. package/dist/generated/constants/constants.js +0 -60
  64. package/dist/scripts/generateConstants.d.ts +0 -12
  65. package/dist/scripts/generateConstants.js +0 -179
  66. package/src/generated/constants/constants.ts +0 -61
  67. package/src/scripts/generateConstants.ts +0 -217
@@ -1,281 +1,283 @@
1
- {
2
- "Name": [],
3
- "NameFacet": [
4
- "Name"
5
- ],
6
- "Description": [],
7
- "DescriptionFacet": [
8
- "Description"
9
- ],
10
- "DocumentationFacet": [
11
- "NameFacet",
12
- "DescriptionFacet"
13
- ],
14
- "Uri": [],
15
- "ResourceTypeIdentity": [],
16
- "ResourceType": [
17
- "ResourceTypeIdentity",
18
- "Uri",
19
- "DocumentationFacet"
20
- ],
21
- "ResourceRoleIdentity": [],
22
- "ResourceRoleValue": [
23
- "ResourceTypeIdentity",
24
- "DocumentationFacet"
25
- ],
26
- "RoleMap": [
27
- "ResourceRoleIdentity",
28
- "ResourceRoleValue"
29
- ],
30
- "Error": [
31
- "DocumentationFacet"
32
- ],
33
- "Roles": [
34
- "RoleMap",
35
- "ResourceRoleValue"
36
- ],
37
- "RolesFacet": [
38
- "Roles"
39
- ],
40
- "JobIdentity": [],
41
- "Job": [
42
- "JobIdentity",
43
- "Uri",
44
- "DocumentationFacet",
45
- "RolesFacet"
46
- ],
47
- "RoleBindingArray": [
48
- "ResourceRoleIdentity"
49
- ],
50
- "RoleBindings": [
51
- "RoleBindingArray"
52
- ],
53
- "RoleBindingsFacet": [
54
- "RoleBindings"
55
- ],
56
- "StepKind": [],
57
- "StepKindFacet": [
58
- "StepKind"
59
- ],
60
- "JobStepIdentity": [],
61
- "JobStep": [
62
- "JobStepIdentity",
63
- "JobIdentity",
64
- "StepKindFacet",
65
- "RoleBindingsFacet"
66
- ],
67
- "Conditional": [
68
- "JobStep"
69
- ],
70
- "BranchStepIdentity": [],
71
- "BranchStep": [
72
- "BranchStepIdentity",
73
- "Conditional",
74
- "StepKindFacet"
75
- ],
76
- "WhileStepIdentity": [],
77
- "WhileStep": [
78
- "WhileStepIdentity",
79
- "Conditional",
80
- "StepKindFacet"
81
- ],
82
- "ForStepIdentity": [],
83
- "ForStep": [
84
- "ForStepIdentity",
85
- "Conditional",
86
- "StepKindFacet"
87
- ],
88
- "StepIdentity": [
89
- "JobStepIdentity",
90
- "BranchStepIdentity",
91
- "WhileStepIdentity",
92
- "ForStepIdentity"
93
- ],
94
- "Step": [
95
- "JobStep",
96
- "BranchStep",
97
- "WhileStep",
98
- "ForStep"
99
- ],
100
- "CreationContext": [
101
- "ResourceRoleIdentity",
102
- "JobStepIdentity"
103
- ],
104
- "CreationContextFacet": [
105
- "CreationContext"
106
- ],
107
- "ResourceIdentity": [],
108
- "ResourceShellBase": [
109
- "ResourceIdentity",
110
- "ResourceTypeIdentity",
111
- "ResourceKind"
112
- ],
113
- "ResourceKind": [],
114
- "ResourceKindFacet": [
115
- "ResourceKind"
116
- ],
117
- "ShellMissing": [
118
- "ResourceShellBase",
119
- "ResourceKindFacet"
120
- ],
121
- "ShellInputPotential": [
122
- "ResourceShellBase",
123
- "CreationContextFacet",
124
- "ResourceKindFacet"
125
- ],
126
- "ShellOutputPotential": [
127
- "ResourceShellBase",
128
- "CreationContextFacet",
129
- "ResourceKindFacet"
130
- ],
131
- "Timestamp": [],
132
- "TimestampFacet": [
133
- "Timestamp"
134
- ],
135
- "Path": [],
136
- "PathFacet": [
137
- "Path"
138
- ],
139
- "ShellMaterializedBase": [
140
- "ResourceShellBase",
141
- "CreationContextFacet",
142
- "ResourceKindFacet",
143
- "TimestampFacet",
144
- "PathFacet"
145
- ],
146
- "ShellMaterialized": [
147
- "ShellMaterializedBase"
148
- ],
149
- "ResourceMissing": [
150
- "ShellMissing"
151
- ],
152
- "ResourceInputPotential": [
153
- "ShellInputPotential"
154
- ],
155
- "ResourceOutputPotential": [
156
- "ShellOutputPotential"
157
- ],
158
- "JsonData": [],
159
- "Nucleus": [
160
- "JsonData"
161
- ],
162
- "NucleusFacet": [
163
- "Nucleus"
164
- ],
165
- "ResourceMaterialized": [
166
- "ShellMaterializedBase",
167
- "NucleusFacet"
168
- ],
169
- "Resource": [
170
- "ResourceMissing",
171
- "ResourceInputPotential",
172
- "ResourceOutputPotential",
173
- "ResourceMaterialized"
174
- ],
175
- "JobStepSocket": [
176
- "ResourceRoleIdentity",
177
- "Resource"
178
- ],
179
- "StrategyState": [
180
- "JobStepIdentity",
181
- "JobStepSocket"
182
- ],
183
- "StrategyStateFacet": [
184
- "StrategyState"
185
- ],
186
- "StepArray": [
187
- "Step"
188
- ],
189
- "StepsFacet": [
190
- "StepArray"
191
- ],
192
- "RawStrategy": [
193
- "StepsFacet",
194
- "StrategyStateFacet"
195
- ],
196
- "RunnableStrategyIdentity": [],
197
- "RunnableStrategyStatus": [],
198
- "RunnableStrategyContext": [
199
- "RunnableStrategyStatus",
200
- "Timestamp"
201
- ],
202
- "StrategyThreadIdentity": [],
203
- "StrategyThreadMap": [
204
- "StrategyThreadIdentity",
205
- "StepArray"
206
- ],
207
- "StrategyThreadMapFacet": [
208
- "StrategyThreadMap"
209
- ],
210
- "RunnableStrategy": [
211
- "RunnableStrategyIdentity",
212
- "RunnableStrategyContext",
213
- "StrategyThreadMapFacet",
214
- "StrategyStateFacet"
215
- ],
216
- "StrategyStateDelta": [
217
- "StrategyState"
218
- ],
219
- "RunnableStrategyUpdate": [
220
- "RunnableStrategyIdentity",
221
- "StrategyStateDelta"
222
- ],
223
- "RunEventCounters": [],
224
- "RunEventStepMetadata": [
225
- "StepIdentity",
226
- "StepKind"
227
- ],
228
- "RunEventUpdates": [
229
- "StepArray",
230
- "StrategyStateDelta"
231
- ],
232
- "RunEventKind": [],
233
- "RunEventBase": [
234
- "RunEventKind",
235
- "RunnableStrategyIdentity",
236
- "StrategyThreadIdentity",
237
- "Timestamp",
238
- "RunEventCounters",
239
- "RunEventStepMetadata",
240
- "RunEventUpdates"
241
- ],
242
- "GraphStartRunEvent": [
243
- "RunEventBase",
244
- "RunnableStrategy"
245
- ],
246
- "TickRunEvent": [
247
- "RunEventBase"
248
- ],
249
- "InterruptRunEvent": [
250
- "RunEventBase"
251
- ],
252
- "GraphEndRunEvent": [
253
- "RunEventBase"
254
- ],
255
- "RunEvent": [
256
- "GraphStartRunEvent",
257
- "TickRunEvent",
258
- "InterruptRunEvent",
259
- "GraphEndRunEvent"
260
- ],
261
- "StrategyRunIdentity": [],
262
- "StrategyRun": [
263
- "StrategyRunIdentity",
264
- "RunnableStrategyIdentity",
265
- "Timestamp",
266
- "RunEvent"
267
- ],
268
- "GoalIdentity": [],
269
- "Goal": [
270
- "GoalIdentity",
271
- "JobIdentity"
272
- ],
273
- "Natural": [
274
- "NaturalIdentity"
275
- ],
276
- "Boolean": [
277
- "BooleanIdentity"
278
- ],
279
- "NaturalIdentity": [],
280
- "BooleanIdentity": []
1
+ {
2
+ "Name": [],
3
+ "NameFacet": [
4
+ "Name"
5
+ ],
6
+ "Description": [],
7
+ "DescriptionFacet": [
8
+ "Description"
9
+ ],
10
+ "DocumentationFacet": [
11
+ "NameFacet",
12
+ "DescriptionFacet"
13
+ ],
14
+ "Uri": [],
15
+ "ResourceTypeIdentity": [],
16
+ "ResourceType": [
17
+ "ResourceTypeIdentity",
18
+ "Uri",
19
+ "DocumentationFacet"
20
+ ],
21
+ "ResourceRoleIdentity": [],
22
+ "ResourceRoleValue": [
23
+ "ResourceTypeIdentity",
24
+ "DocumentationFacet"
25
+ ],
26
+ "ResourceRole": [
27
+ "ResourceRoleIdentity",
28
+ "ResourceRoleValue"
29
+ ],
30
+ "RoleDict": [
31
+ "ResourceRoleIdentity",
32
+ "ResourceRoleValue"
33
+ ],
34
+ "Error": [
35
+ "DocumentationFacet"
36
+ ],
37
+ "Roles": [
38
+ "RoleDict",
39
+ "ResourceRoleValue"
40
+ ],
41
+ "RolesFacet": [
42
+ "Roles"
43
+ ],
44
+ "JobIdentity": [],
45
+ "Job": [
46
+ "JobIdentity",
47
+ "Uri",
48
+ "DocumentationFacet",
49
+ "RolesFacet"
50
+ ],
51
+ "RoleBindingArray": [
52
+ "ResourceRoleIdentity"
53
+ ],
54
+ "RoleBindings": [
55
+ "RoleBindingArray"
56
+ ],
57
+ "RoleBindingsFacet": [
58
+ "RoleBindings"
59
+ ],
60
+ "StepKind": [],
61
+ "StepKindFacet": [
62
+ "StepKind"
63
+ ],
64
+ "JobStepIdentity": [],
65
+ "JobStep": [
66
+ "JobStepIdentity",
67
+ "JobIdentity",
68
+ "StepKindFacet",
69
+ "RoleBindingsFacet"
70
+ ],
71
+ "Conditional": [
72
+ "JobStep"
73
+ ],
74
+ "BranchStepIdentity": [],
75
+ "BranchStep": [
76
+ "BranchStepIdentity",
77
+ "Conditional",
78
+ "StepKindFacet"
79
+ ],
80
+ "WhileStepIdentity": [],
81
+ "WhileStep": [
82
+ "WhileStepIdentity",
83
+ "Conditional",
84
+ "StepKindFacet"
85
+ ],
86
+ "ForStepIdentity": [],
87
+ "ForStep": [
88
+ "ForStepIdentity",
89
+ "Conditional",
90
+ "StepKindFacet"
91
+ ],
92
+ "StepIdentity": [
93
+ "JobStepIdentity",
94
+ "BranchStepIdentity",
95
+ "WhileStepIdentity",
96
+ "ForStepIdentity"
97
+ ],
98
+ "Step": [
99
+ "JobStep",
100
+ "BranchStep",
101
+ "WhileStep",
102
+ "ForStep"
103
+ ],
104
+ "CreationContext": [
105
+ "ResourceRoleIdentity",
106
+ "JobStepIdentity"
107
+ ],
108
+ "CreationContextFacet": [
109
+ "CreationContext"
110
+ ],
111
+ "ResourceIdentity": [],
112
+ "ResourceShellBase": [
113
+ "ResourceIdentity",
114
+ "ResourceTypeIdentity",
115
+ "ResourceShellKind"
116
+ ],
117
+ "ResourceShellKind": [],
118
+ "ResourceShellKindFacet": [
119
+ "ResourceShellKind"
120
+ ],
121
+ "ShellMissing": [
122
+ "ResourceShellBase",
123
+ "ResourceShellKindFacet"
124
+ ],
125
+ "ShellInputPotential": [
126
+ "ResourceShellBase",
127
+ "CreationContextFacet",
128
+ "ResourceShellKindFacet"
129
+ ],
130
+ "ShellOutputPotential": [
131
+ "ResourceShellBase",
132
+ "CreationContextFacet",
133
+ "ResourceShellKindFacet"
134
+ ],
135
+ "Timestamp": [],
136
+ "TimestampFacet": [
137
+ "Timestamp"
138
+ ],
139
+ "Path": [],
140
+ "PathFacet": [
141
+ "Path"
142
+ ],
143
+ "ShellMaterializedBase": [
144
+ "ResourceShellBase",
145
+ "CreationContextFacet",
146
+ "ResourceShellKindFacet",
147
+ "TimestampFacet",
148
+ "PathFacet"
149
+ ],
150
+ "ShellMaterialized": [
151
+ "ShellMaterializedBase"
152
+ ],
153
+ "ResourceMissing": [
154
+ "ShellMissing"
155
+ ],
156
+ "ResourceInputPotential": [
157
+ "ShellInputPotential"
158
+ ],
159
+ "ResourceOutputPotential": [
160
+ "ShellOutputPotential"
161
+ ],
162
+ "ResourcePotential": [
163
+ "ResourceMissing",
164
+ "ResourceInputPotential",
165
+ "ResourceOutputPotential"
166
+ ],
167
+ "JsonData": [],
168
+ "Nucleus": [
169
+ "JsonData"
170
+ ],
171
+ "NucleusFacet": [],
172
+ "Resource": [
173
+ "ShellMaterializedBase",
174
+ "NucleusFacet"
175
+ ],
176
+ "JobStepSocket": [
177
+ "ResourceRoleIdentity",
178
+ "ResourcePotential",
179
+ "Resource"
180
+ ],
181
+ "StrategyState": [
182
+ "JobStepIdentity",
183
+ "JobStepSocket"
184
+ ],
185
+ "StrategyStateFacet": [
186
+ "StrategyState"
187
+ ],
188
+ "StepArray": [
189
+ "Step"
190
+ ],
191
+ "StepsFacet": [
192
+ "StepArray"
193
+ ],
194
+ "RawStrategy": [
195
+ "StepsFacet",
196
+ "StrategyStateFacet"
197
+ ],
198
+ "RunnableStrategyIdentity": [],
199
+ "RunnableStrategyStatus": [],
200
+ "RunnableStrategyContext": [
201
+ "RunnableStrategyStatus",
202
+ "Timestamp"
203
+ ],
204
+ "StrategyThreadIdentity": [],
205
+ "StrategyThreadDict": [
206
+ "StrategyThreadIdentity",
207
+ "StepArray"
208
+ ],
209
+ "StrategyThreadDictFacet": [
210
+ "StrategyThreadDict"
211
+ ],
212
+ "RunnableStrategy": [
213
+ "RunnableStrategyIdentity",
214
+ "RunnableStrategyContext",
215
+ "StrategyThreadDictFacet",
216
+ "StrategyStateFacet"
217
+ ],
218
+ "StrategyStateDelta": [
219
+ "StrategyState"
220
+ ],
221
+ "RunnableStrategyUpdate": [
222
+ "RunnableStrategyIdentity",
223
+ "StrategyStateDelta"
224
+ ],
225
+ "RunEventCounters": [],
226
+ "RunEventStepMetadata": [
227
+ "StepIdentity",
228
+ "StepKind"
229
+ ],
230
+ "RunEventUpdates": [
231
+ "StepArray",
232
+ "StrategyStateDelta"
233
+ ],
234
+ "RunEventKind": [],
235
+ "RunEventBase": [
236
+ "RunEventKind",
237
+ "RunnableStrategyIdentity",
238
+ "StrategyThreadIdentity",
239
+ "Timestamp",
240
+ "RunEventCounters",
241
+ "RunEventStepMetadata",
242
+ "RunEventUpdates"
243
+ ],
244
+ "GraphStartRunEvent": [
245
+ "RunEventBase",
246
+ "RunnableStrategy"
247
+ ],
248
+ "TickRunEvent": [
249
+ "RunEventBase"
250
+ ],
251
+ "InterruptRunEvent": [
252
+ "RunEventBase"
253
+ ],
254
+ "GraphEndRunEvent": [
255
+ "RunEventBase"
256
+ ],
257
+ "RunEvent": [
258
+ "GraphStartRunEvent",
259
+ "TickRunEvent",
260
+ "InterruptRunEvent",
261
+ "GraphEndRunEvent"
262
+ ],
263
+ "StrategyRunIdentity": [],
264
+ "StrategyRun": [
265
+ "StrategyRunIdentity",
266
+ "RunnableStrategyIdentity",
267
+ "Timestamp",
268
+ "RunEvent"
269
+ ],
270
+ "GoalIdentity": [],
271
+ "Goal": [
272
+ "GoalIdentity",
273
+ "JobIdentity"
274
+ ],
275
+ "Natural": [
276
+ "NaturalIdentity"
277
+ ],
278
+ "Boolean": [
279
+ "BooleanIdentity"
280
+ ],
281
+ "NaturalIdentity": [],
282
+ "BooleanIdentity": []
281
283
  }
@@ -0,0 +1,24 @@
1
+ const MAPPINGS = {
2
+ IdentityNameToIdentityPrefix: {
3
+ BranchStepIdentity: 'BRANCH_STEP-',
4
+ ForStepIdentity: 'FOR_STEP-',
5
+ GoalIdentity: 'GOAL-',
6
+ JobIdentity: 'JOB-',
7
+ JobStepIdentity: 'JOB_STEP-',
8
+ ResourceIdentity: 'RESOURCE-',
9
+ ResourceRoleIdentity: 'ROLE-',
10
+ ResourceTypeIdentity: 'TYPE-',
11
+ RunnableStrategyIdentity: 'RUNNABLE_STRATEGY-',
12
+ StrategyRunIdentity: 'STRATEGY_RUN-',
13
+ StrategyThreadIdentity: 'STRATEGY_THREAD-',
14
+ WhileStepIdentity: 'WHILE_STEP-',
15
+ },
16
+ StepKindToStepIdentityPrefix: {
17
+ branch: 'BRANCH_STEP-',
18
+ for: 'FOR_STEP-',
19
+ job: 'JOB_STEP-',
20
+ while: 'WHILE_STEP-',
21
+ },
22
+ } as const;
23
+
24
+ export default MAPPINGS;
@@ -1,12 +1,14 @@
1
- [
2
- "ResourceType",
3
- "Error",
4
- "Job",
5
- "ShellMaterialized",
6
- "RawStrategy",
7
- "RunnableStrategyUpdate",
8
- "StrategyRun",
9
- "Goal",
10
- "Natural",
11
- "Boolean"
1
+ [
2
+ "ResourceType",
3
+ "ResourceRole",
4
+ "Error",
5
+ "Job",
6
+ "ShellMaterialized",
7
+ "Nucleus",
8
+ "RawStrategy",
9
+ "RunnableStrategyUpdate",
10
+ "StrategyRun",
11
+ "Goal",
12
+ "Natural",
13
+ "Boolean"
12
14
  ]