@toolproof-core/schema 1.0.9 → 1.0.10
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/generated/artifacts/constants.d.ts +120 -0
- package/dist/generated/artifacts/constants.js +120 -0
- package/dist/generated/artifacts/mappings.d.ts +23 -0
- package/dist/generated/artifacts/mappings.js +23 -0
- package/dist/generated/normalized/Genesis.json +67 -53
- package/dist/generated/resources/Genesis.json +424 -236
- package/dist/generated/schemas/Genesis.json +56 -42
- package/dist/generated/schemas/standalone/Job.json +2 -0
- package/dist/generated/schemas/standalone/RawStrategy.json +86 -110
- package/dist/generated/schemas/standalone/RunnableStrategy.json +108 -132
- package/dist/generated/schemas/standalone/StrategyRun.json +86 -110
- package/dist/generated/types/types.d.ts +34 -34
- package/dist/index.d.ts +6 -3
- package/dist/index.js +5 -2
- package/dist/scripts/_lib/config.d.ts +3 -5
- package/dist/scripts/_lib/config.js +8 -14
- package/dist/scripts/generateConstantsAndMappings.d.ts +31 -0
- package/dist/scripts/generateConstantsAndMappings.js +243 -0
- package/dist/scripts/generateDependencies.js +1 -1
- package/dist/scripts/generateTerminals.js +2 -2
- package/dist/scripts/generateTypes.js +47 -2
- package/dist/scripts/wrapResourceTypesWithResourceShells.js +7 -3
- package/package.json +9 -10
- package/src/Genesis.json +1847 -1833
- package/src/generated/artifacts/constants.ts +121 -0
- package/src/generated/{dependencies → artifacts}/dependencyMap.json +16 -18
- package/src/generated/artifacts/mappings.ts +24 -0
- package/src/generated/{dependencies → artifacts}/terminals.json +1 -0
- package/src/generated/normalized/Genesis.json +1760 -1746
- package/src/generated/resources/Genesis.json +2796 -2608
- package/src/generated/schemas/Genesis.json +1329 -1315
- package/src/generated/schemas/standalone/Job.json +2 -0
- package/src/generated/schemas/standalone/RawStrategy.json +580 -604
- package/src/generated/schemas/standalone/RunnableStrategy.json +645 -669
- package/src/generated/schemas/standalone/StrategyRun.json +913 -937
- package/src/generated/types/types.d.ts +709 -709
- package/src/index.ts +75 -70
- package/src/scripts/_lib/config.ts +207 -215
- package/src/scripts/extractSchemasFromResourceTypeShells.ts +261 -261
- package/src/scripts/generateConstantsAndMappings.ts +309 -0
- package/src/scripts/generateDependencies.ts +121 -121
- package/src/scripts/generateSchemaShims.ts +127 -127
- package/src/scripts/generateStandaloneSchema.ts +185 -185
- package/src/scripts/generateStandaloneType.ts +127 -127
- package/src/scripts/generateTerminals.ts +73 -73
- package/src/scripts/generateTypes.ts +587 -531
- package/src/scripts/normalizeAnchorsToPointers.ts +141 -141
- package/src/scripts/wrapResourceTypesWithResourceShells.ts +86 -82
- package/dist/generated/constants/constants.d.ts +0 -60
- package/dist/generated/constants/constants.js +0 -60
- package/dist/scripts/generateConstants.d.ts +0 -12
- package/dist/scripts/generateConstants.js +0 -179
- package/src/generated/constants/constants.ts +0 -61
- package/src/scripts/generateConstants.ts +0 -217
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
const CONSTANTS = {
|
|
2
|
+
Names: {
|
|
3
|
+
Boolean: 'Boolean',
|
|
4
|
+
BooleanIdentity: 'BooleanIdentity',
|
|
5
|
+
BranchStep: 'BranchStep',
|
|
6
|
+
BranchStepIdentity: 'BranchStepIdentity',
|
|
7
|
+
Conditional: 'Conditional',
|
|
8
|
+
CreationContext: 'CreationContext',
|
|
9
|
+
CreationContextFacet: 'CreationContextFacet',
|
|
10
|
+
Description: 'Description',
|
|
11
|
+
DescriptionFacet: 'DescriptionFacet',
|
|
12
|
+
DocumentationFacet: 'DocumentationFacet',
|
|
13
|
+
Error: 'Error',
|
|
14
|
+
ForStep: 'ForStep',
|
|
15
|
+
ForStepIdentity: 'ForStepIdentity',
|
|
16
|
+
Goal: 'Goal',
|
|
17
|
+
GoalIdentity: 'GoalIdentity',
|
|
18
|
+
GraphEndRunEvent: 'GraphEndRunEvent',
|
|
19
|
+
GraphStartRunEvent: 'GraphStartRunEvent',
|
|
20
|
+
InterruptRunEvent: 'InterruptRunEvent',
|
|
21
|
+
Job: 'Job',
|
|
22
|
+
JobIdentity: 'JobIdentity',
|
|
23
|
+
JobStep: 'JobStep',
|
|
24
|
+
JobStepIdentity: 'JobStepIdentity',
|
|
25
|
+
JobStepSocket: 'JobStepSocket',
|
|
26
|
+
JsonData: 'JsonData',
|
|
27
|
+
Name: 'Name',
|
|
28
|
+
NameFacet: 'NameFacet',
|
|
29
|
+
Natural: 'Natural',
|
|
30
|
+
NaturalIdentity: 'NaturalIdentity',
|
|
31
|
+
Nucleus: 'Nucleus',
|
|
32
|
+
NucleusFacet: 'NucleusFacet',
|
|
33
|
+
Path: 'Path',
|
|
34
|
+
PathFacet: 'PathFacet',
|
|
35
|
+
RawStrategy: 'RawStrategy',
|
|
36
|
+
Resource: 'Resource',
|
|
37
|
+
ResourceIdentity: 'ResourceIdentity',
|
|
38
|
+
ResourceInputPotential: 'ResourceInputPotential',
|
|
39
|
+
ResourceMissing: 'ResourceMissing',
|
|
40
|
+
ResourceOutputPotential: 'ResourceOutputPotential',
|
|
41
|
+
ResourcePotential: 'ResourcePotential',
|
|
42
|
+
ResourceRoleIdentity: 'ResourceRoleIdentity',
|
|
43
|
+
ResourceRoleValue: 'ResourceRoleValue',
|
|
44
|
+
ResourceShellBase: 'ResourceShellBase',
|
|
45
|
+
ResourceShellKind: 'ResourceShellKind',
|
|
46
|
+
ResourceShellKindFacet: 'ResourceShellKindFacet',
|
|
47
|
+
ResourceType: 'ResourceType',
|
|
48
|
+
ResourceTypeIdentity: 'ResourceTypeIdentity',
|
|
49
|
+
RoleBindingArray: 'RoleBindingArray',
|
|
50
|
+
RoleBindings: 'RoleBindings',
|
|
51
|
+
RoleBindingsFacet: 'RoleBindingsFacet',
|
|
52
|
+
RoleMap: 'RoleMap',
|
|
53
|
+
Roles: 'Roles',
|
|
54
|
+
RolesFacet: 'RolesFacet',
|
|
55
|
+
RunEvent: 'RunEvent',
|
|
56
|
+
RunEventBase: 'RunEventBase',
|
|
57
|
+
RunEventCounters: 'RunEventCounters',
|
|
58
|
+
RunEventKind: 'RunEventKind',
|
|
59
|
+
RunEventStepMetadata: 'RunEventStepMetadata',
|
|
60
|
+
RunEventUpdates: 'RunEventUpdates',
|
|
61
|
+
RunnableStrategy: 'RunnableStrategy',
|
|
62
|
+
RunnableStrategyContext: 'RunnableStrategyContext',
|
|
63
|
+
RunnableStrategyIdentity: 'RunnableStrategyIdentity',
|
|
64
|
+
RunnableStrategyStatus: 'RunnableStrategyStatus',
|
|
65
|
+
RunnableStrategyUpdate: 'RunnableStrategyUpdate',
|
|
66
|
+
ShellInputPotential: 'ShellInputPotential',
|
|
67
|
+
ShellMaterialized: 'ShellMaterialized',
|
|
68
|
+
ShellMaterializedBase: 'ShellMaterializedBase',
|
|
69
|
+
ShellMissing: 'ShellMissing',
|
|
70
|
+
ShellOutputPotential: 'ShellOutputPotential',
|
|
71
|
+
Step: 'Step',
|
|
72
|
+
StepArray: 'StepArray',
|
|
73
|
+
StepIdentity: 'StepIdentity',
|
|
74
|
+
StepKind: 'StepKind',
|
|
75
|
+
StepKindFacet: 'StepKindFacet',
|
|
76
|
+
StepsFacet: 'StepsFacet',
|
|
77
|
+
StrategyRun: 'StrategyRun',
|
|
78
|
+
StrategyRunIdentity: 'StrategyRunIdentity',
|
|
79
|
+
StrategyState: 'StrategyState',
|
|
80
|
+
StrategyStateDelta: 'StrategyStateDelta',
|
|
81
|
+
StrategyStateFacet: 'StrategyStateFacet',
|
|
82
|
+
StrategyThreadIdentity: 'StrategyThreadIdentity',
|
|
83
|
+
StrategyThreadMap: 'StrategyThreadMap',
|
|
84
|
+
StrategyThreadMapFacet: 'StrategyThreadMapFacet',
|
|
85
|
+
TickRunEvent: 'TickRunEvent',
|
|
86
|
+
Timestamp: 'Timestamp',
|
|
87
|
+
TimestampFacet: 'TimestampFacet',
|
|
88
|
+
Uri: 'Uri',
|
|
89
|
+
WhileStep: 'WhileStep',
|
|
90
|
+
WhileStepIdentity: 'WhileStepIdentity',
|
|
91
|
+
},
|
|
92
|
+
Enums: {
|
|
93
|
+
ResourceShellKind: {
|
|
94
|
+
missing: 'missing',
|
|
95
|
+
inputPotential: 'inputPotential',
|
|
96
|
+
outputPotential: 'outputPotential',
|
|
97
|
+
materialized: 'materialized',
|
|
98
|
+
},
|
|
99
|
+
RunEventKind: {
|
|
100
|
+
graph_start: 'graph_start',
|
|
101
|
+
tick: 'tick',
|
|
102
|
+
interrupt: 'interrupt',
|
|
103
|
+
graph_end: 'graph_end',
|
|
104
|
+
},
|
|
105
|
+
RunnableStrategyStatus: {
|
|
106
|
+
pending: 'pending',
|
|
107
|
+
running: 'running',
|
|
108
|
+
completed: 'completed',
|
|
109
|
+
failed: 'failed',
|
|
110
|
+
cancelled: 'cancelled',
|
|
111
|
+
},
|
|
112
|
+
StepKind: {
|
|
113
|
+
job: 'job',
|
|
114
|
+
branch: 'branch',
|
|
115
|
+
while: 'while',
|
|
116
|
+
for: 'for',
|
|
117
|
+
},
|
|
118
|
+
}
|
|
119
|
+
} as const;
|
|
120
|
+
|
|
121
|
+
export default CONSTANTS;
|
|
@@ -108,25 +108,25 @@
|
|
|
108
108
|
"ResourceShellBase": [
|
|
109
109
|
"ResourceIdentity",
|
|
110
110
|
"ResourceTypeIdentity",
|
|
111
|
-
"
|
|
111
|
+
"ResourceShellKind"
|
|
112
112
|
],
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
113
|
+
"ResourceShellKind": [],
|
|
114
|
+
"ResourceShellKindFacet": [
|
|
115
|
+
"ResourceShellKind"
|
|
116
116
|
],
|
|
117
117
|
"ShellMissing": [
|
|
118
118
|
"ResourceShellBase",
|
|
119
|
-
"
|
|
119
|
+
"ResourceShellKindFacet"
|
|
120
120
|
],
|
|
121
121
|
"ShellInputPotential": [
|
|
122
122
|
"ResourceShellBase",
|
|
123
123
|
"CreationContextFacet",
|
|
124
|
-
"
|
|
124
|
+
"ResourceShellKindFacet"
|
|
125
125
|
],
|
|
126
126
|
"ShellOutputPotential": [
|
|
127
127
|
"ResourceShellBase",
|
|
128
128
|
"CreationContextFacet",
|
|
129
|
-
"
|
|
129
|
+
"ResourceShellKindFacet"
|
|
130
130
|
],
|
|
131
131
|
"Timestamp": [],
|
|
132
132
|
"TimestampFacet": [
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"ShellMaterializedBase": [
|
|
140
140
|
"ResourceShellBase",
|
|
141
141
|
"CreationContextFacet",
|
|
142
|
-
"
|
|
142
|
+
"ResourceShellKindFacet",
|
|
143
143
|
"TimestampFacet",
|
|
144
144
|
"PathFacet"
|
|
145
145
|
],
|
|
@@ -155,25 +155,23 @@
|
|
|
155
155
|
"ResourceOutputPotential": [
|
|
156
156
|
"ShellOutputPotential"
|
|
157
157
|
],
|
|
158
|
+
"ResourcePotential": [
|
|
159
|
+
"ResourceMissing",
|
|
160
|
+
"ResourceInputPotential",
|
|
161
|
+
"ResourceOutputPotential"
|
|
162
|
+
],
|
|
158
163
|
"JsonData": [],
|
|
159
164
|
"Nucleus": [
|
|
160
165
|
"JsonData"
|
|
161
166
|
],
|
|
162
|
-
"NucleusFacet": [
|
|
163
|
-
|
|
164
|
-
],
|
|
165
|
-
"ResourceMaterialized": [
|
|
167
|
+
"NucleusFacet": [],
|
|
168
|
+
"Resource": [
|
|
166
169
|
"ShellMaterializedBase",
|
|
167
170
|
"NucleusFacet"
|
|
168
171
|
],
|
|
169
|
-
"Resource": [
|
|
170
|
-
"ResourceMissing",
|
|
171
|
-
"ResourceInputPotential",
|
|
172
|
-
"ResourceOutputPotential",
|
|
173
|
-
"ResourceMaterialized"
|
|
174
|
-
],
|
|
175
172
|
"JobStepSocket": [
|
|
176
173
|
"ResourceRoleIdentity",
|
|
174
|
+
"ResourcePotential",
|
|
177
175
|
"Resource"
|
|
178
176
|
],
|
|
179
177
|
"StrategyState": [
|
|
@@ -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;
|