@toolproof-core/schema 1.0.8 → 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 +3 -3
- package/src/Genesis.json +71 -57
- 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 +8 -2
- package/src/scripts/_lib/config.ts +9 -17
- package/src/scripts/generateConstantsAndMappings.ts +309 -0
- package/src/scripts/generateDependencies.ts +1 -1
- package/src/scripts/generateTerminals.ts +2 -2
- package/src/scripts/generateTypes.ts +58 -2
- package/src/scripts/wrapResourceTypesWithResourceShells.ts +7 -3
- 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
|
@@ -447,7 +447,14 @@
|
|
|
447
447
|
"$ref": "#/$defs/ResourceRoleIdentity"
|
|
448
448
|
},
|
|
449
449
|
"additionalProperties": {
|
|
450
|
-
"
|
|
450
|
+
"oneOf": [
|
|
451
|
+
{
|
|
452
|
+
"$ref": "#/$defs/ResourcePotential"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"$ref": "#/$defs/Resource"
|
|
456
|
+
}
|
|
457
|
+
]
|
|
451
458
|
}
|
|
452
459
|
},
|
|
453
460
|
"JobStep": {
|
|
@@ -564,7 +571,7 @@
|
|
|
564
571
|
"type": "string",
|
|
565
572
|
"pattern": "^ROLE-.+$"
|
|
566
573
|
},
|
|
567
|
-
"
|
|
574
|
+
"ResourcePotential": {
|
|
568
575
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
569
576
|
"type": "object",
|
|
570
577
|
"oneOf": [
|
|
@@ -576,9 +583,20 @@
|
|
|
576
583
|
},
|
|
577
584
|
{
|
|
578
585
|
"$ref": "#/$defs/ResourceOutputPotential"
|
|
586
|
+
}
|
|
587
|
+
],
|
|
588
|
+
"unevaluatedProperties": false
|
|
589
|
+
},
|
|
590
|
+
"Resource": {
|
|
591
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
592
|
+
"type": "object",
|
|
593
|
+
"allOf": [
|
|
594
|
+
{
|
|
595
|
+
"$ref": "#/$defs/ShellMaterializedBase"
|
|
579
596
|
},
|
|
580
597
|
{
|
|
581
|
-
"$
|
|
598
|
+
"$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
|
|
599
|
+
"$ref": "#/$defs/NucleusFacet"
|
|
582
600
|
}
|
|
583
601
|
],
|
|
584
602
|
"unevaluatedProperties": false
|
|
@@ -647,19 +665,48 @@
|
|
|
647
665
|
"$ref": "#/$defs/ShellOutputPotential",
|
|
648
666
|
"unevaluatedProperties": false
|
|
649
667
|
},
|
|
650
|
-
"
|
|
668
|
+
"ShellMaterializedBase": {
|
|
651
669
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
652
670
|
"type": "object",
|
|
671
|
+
"required": [
|
|
672
|
+
"version",
|
|
673
|
+
"resourceShellKind"
|
|
674
|
+
],
|
|
675
|
+
"properties": {
|
|
676
|
+
"version": {
|
|
677
|
+
"const": 1
|
|
678
|
+
},
|
|
679
|
+
"resourceShellKind": {
|
|
680
|
+
"const": "materialized"
|
|
681
|
+
}
|
|
682
|
+
},
|
|
653
683
|
"allOf": [
|
|
654
684
|
{
|
|
655
|
-
"$ref": "#/$defs/
|
|
685
|
+
"$ref": "#/$defs/ResourceShellBase"
|
|
656
686
|
},
|
|
657
687
|
{
|
|
658
|
-
"$
|
|
659
|
-
|
|
688
|
+
"$ref": "#/$defs/CreationContextFacet"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"$ref": "#/$defs/ResourceShellKindFacet"
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"$ref": "#/$defs/TimestampFacet"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"$ref": "#/$defs/PathFacet"
|
|
660
698
|
}
|
|
699
|
+
]
|
|
700
|
+
},
|
|
701
|
+
"NucleusFacet": {
|
|
702
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
703
|
+
"type": "object",
|
|
704
|
+
"required": [
|
|
705
|
+
"nucleus"
|
|
661
706
|
],
|
|
662
|
-
"
|
|
707
|
+
"properties": {
|
|
708
|
+
"nucleus": true
|
|
709
|
+
}
|
|
663
710
|
},
|
|
664
711
|
"RoleBindings": {
|
|
665
712
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -680,8 +727,11 @@
|
|
|
680
727
|
"ShellMissing": {
|
|
681
728
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
682
729
|
"type": "object",
|
|
730
|
+
"required": [
|
|
731
|
+
"resourceShellKind"
|
|
732
|
+
],
|
|
683
733
|
"properties": {
|
|
684
|
-
"
|
|
734
|
+
"resourceShellKind": {
|
|
685
735
|
"const": "missing"
|
|
686
736
|
}
|
|
687
737
|
},
|
|
@@ -690,7 +740,7 @@
|
|
|
690
740
|
"$ref": "#/$defs/ResourceShellBase"
|
|
691
741
|
},
|
|
692
742
|
{
|
|
693
|
-
"$ref": "#/$defs/
|
|
743
|
+
"$ref": "#/$defs/ResourceShellKindFacet"
|
|
694
744
|
}
|
|
695
745
|
],
|
|
696
746
|
"unevaluatedProperties": false
|
|
@@ -698,8 +748,11 @@
|
|
|
698
748
|
"ShellInputPotential": {
|
|
699
749
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
700
750
|
"type": "object",
|
|
751
|
+
"required": [
|
|
752
|
+
"resourceShellKind"
|
|
753
|
+
],
|
|
701
754
|
"properties": {
|
|
702
|
-
"
|
|
755
|
+
"resourceShellKind": {
|
|
703
756
|
"const": "inputPotential"
|
|
704
757
|
}
|
|
705
758
|
},
|
|
@@ -711,44 +764,20 @@
|
|
|
711
764
|
"$ref": "#/$defs/CreationContextFacet"
|
|
712
765
|
},
|
|
713
766
|
{
|
|
714
|
-
"$ref": "#/$defs/
|
|
767
|
+
"$ref": "#/$defs/ResourceShellKindFacet"
|
|
715
768
|
}
|
|
716
769
|
],
|
|
717
770
|
"unevaluatedProperties": false
|
|
718
771
|
},
|
|
719
772
|
"ShellOutputPotential": {
|
|
720
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
721
|
-
"type": "object",
|
|
722
|
-
"properties": {
|
|
723
|
-
"resourceKind": {
|
|
724
|
-
"const": "outputPotential"
|
|
725
|
-
}
|
|
726
|
-
},
|
|
727
|
-
"allOf": [
|
|
728
|
-
{
|
|
729
|
-
"$ref": "#/$defs/ResourceShellBase"
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
"$ref": "#/$defs/CreationContextFacet"
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
"$ref": "#/$defs/ResourceKindFacet"
|
|
736
|
-
}
|
|
737
|
-
],
|
|
738
|
-
"unevaluatedProperties": false
|
|
739
|
-
},
|
|
740
|
-
"ShellMaterializedBase": {
|
|
741
773
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
742
774
|
"type": "object",
|
|
743
775
|
"required": [
|
|
744
|
-
"
|
|
776
|
+
"resourceShellKind"
|
|
745
777
|
],
|
|
746
778
|
"properties": {
|
|
747
|
-
"
|
|
748
|
-
"const":
|
|
749
|
-
},
|
|
750
|
-
"resourceKind": {
|
|
751
|
-
"const": "materialized"
|
|
779
|
+
"resourceShellKind": {
|
|
780
|
+
"const": "outputPotential"
|
|
752
781
|
}
|
|
753
782
|
},
|
|
754
783
|
"allOf": [
|
|
@@ -759,34 +788,10 @@
|
|
|
759
788
|
"$ref": "#/$defs/CreationContextFacet"
|
|
760
789
|
},
|
|
761
790
|
{
|
|
762
|
-
"$ref": "#/$defs/
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
"$ref": "#/$defs/TimestampFacet"
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
"$ref": "#/$defs/PathFacet"
|
|
791
|
+
"$ref": "#/$defs/ResourceShellKindFacet"
|
|
769
792
|
}
|
|
770
|
-
]
|
|
771
|
-
},
|
|
772
|
-
"NucleusFacet": {
|
|
773
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
774
|
-
"type": "object",
|
|
775
|
-
"required": [
|
|
776
|
-
"nucleus"
|
|
777
793
|
],
|
|
778
|
-
"
|
|
779
|
-
"nucleus": {
|
|
780
|
-
"$ref": "#/$defs/Nucleus"
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
},
|
|
784
|
-
"RoleBindingArray": {
|
|
785
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
786
|
-
"type": "array",
|
|
787
|
-
"items": {
|
|
788
|
-
"$ref": "#/$defs/ResourceRoleIdentity"
|
|
789
|
-
}
|
|
794
|
+
"unevaluatedProperties": false
|
|
790
795
|
},
|
|
791
796
|
"ResourceShellBase": {
|
|
792
797
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -794,7 +799,7 @@
|
|
|
794
799
|
"required": [
|
|
795
800
|
"identity",
|
|
796
801
|
"resourceTypeHandle",
|
|
797
|
-
"
|
|
802
|
+
"resourceShellKind"
|
|
798
803
|
],
|
|
799
804
|
"properties": {
|
|
800
805
|
"identity": {
|
|
@@ -803,32 +808,32 @@
|
|
|
803
808
|
"resourceTypeHandle": {
|
|
804
809
|
"$ref": "#/$defs/ResourceTypeIdentity"
|
|
805
810
|
},
|
|
806
|
-
"
|
|
807
|
-
"$ref": "#/$defs/
|
|
811
|
+
"resourceShellKind": {
|
|
812
|
+
"$ref": "#/$defs/ResourceShellKind"
|
|
808
813
|
}
|
|
809
814
|
}
|
|
810
815
|
},
|
|
811
|
-
"
|
|
816
|
+
"CreationContextFacet": {
|
|
812
817
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
813
818
|
"type": "object",
|
|
814
819
|
"required": [
|
|
815
|
-
"
|
|
820
|
+
"creationContext"
|
|
816
821
|
],
|
|
817
822
|
"properties": {
|
|
818
|
-
"
|
|
819
|
-
"$ref": "#/$defs/
|
|
823
|
+
"creationContext": {
|
|
824
|
+
"$ref": "#/$defs/CreationContext"
|
|
820
825
|
}
|
|
821
826
|
}
|
|
822
827
|
},
|
|
823
|
-
"
|
|
828
|
+
"ResourceShellKindFacet": {
|
|
824
829
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
825
830
|
"type": "object",
|
|
826
831
|
"required": [
|
|
827
|
-
"
|
|
832
|
+
"resourceShellKind"
|
|
828
833
|
],
|
|
829
834
|
"properties": {
|
|
830
|
-
"
|
|
831
|
-
"$ref": "#/$defs/
|
|
835
|
+
"resourceShellKind": {
|
|
836
|
+
"$ref": "#/$defs/ResourceShellKind"
|
|
832
837
|
}
|
|
833
838
|
}
|
|
834
839
|
},
|
|
@@ -856,11 +861,11 @@
|
|
|
856
861
|
}
|
|
857
862
|
}
|
|
858
863
|
},
|
|
859
|
-
"
|
|
864
|
+
"RoleBindingArray": {
|
|
860
865
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
861
|
-
"type": "
|
|
862
|
-
"
|
|
863
|
-
"$ref": "#/$defs/
|
|
866
|
+
"type": "array",
|
|
867
|
+
"items": {
|
|
868
|
+
"$ref": "#/$defs/ResourceRoleIdentity"
|
|
864
869
|
}
|
|
865
870
|
},
|
|
866
871
|
"ResourceIdentity": {
|
|
@@ -873,7 +878,7 @@
|
|
|
873
878
|
"type": "string",
|
|
874
879
|
"pattern": "^TYPE-.+$"
|
|
875
880
|
},
|
|
876
|
-
"
|
|
881
|
+
"ResourceShellKind": {
|
|
877
882
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
878
883
|
"type": "string",
|
|
879
884
|
"enum": [
|
|
@@ -903,35 +908,6 @@
|
|
|
903
908
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
904
909
|
"type": "string",
|
|
905
910
|
"format": "uri-reference"
|
|
906
|
-
},
|
|
907
|
-
"JsonData": {
|
|
908
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
909
|
-
"oneOf": [
|
|
910
|
-
{
|
|
911
|
-
"type": "null"
|
|
912
|
-
},
|
|
913
|
-
{
|
|
914
|
-
"type": "boolean"
|
|
915
|
-
},
|
|
916
|
-
{
|
|
917
|
-
"type": "number"
|
|
918
|
-
},
|
|
919
|
-
{
|
|
920
|
-
"type": "string"
|
|
921
|
-
},
|
|
922
|
-
{
|
|
923
|
-
"type": "array",
|
|
924
|
-
"items": {
|
|
925
|
-
"$ref": "#/$defs/JsonData"
|
|
926
|
-
}
|
|
927
|
-
},
|
|
928
|
-
{
|
|
929
|
-
"type": "object",
|
|
930
|
-
"additionalProperties": {
|
|
931
|
-
"$ref": "#/$defs/JsonData"
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
]
|
|
935
911
|
}
|
|
936
912
|
}
|
|
937
913
|
}
|
|
@@ -82,7 +82,7 @@ export type JobIdentity =
|
|
|
82
82
|
export type Job =
|
|
83
83
|
{
|
|
84
84
|
identity: JobIdentity;
|
|
85
|
-
implementationUri:
|
|
85
|
+
implementationUri: string;
|
|
86
86
|
} & DocumentationFacet &
|
|
87
87
|
RolesFacet;
|
|
88
88
|
/**
|
|
@@ -185,9 +185,9 @@ export type ResourceIdentity =
|
|
|
185
185
|
`RESOURCE-${string}`;
|
|
186
186
|
/**
|
|
187
187
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
188
|
-
* via the `definition` "
|
|
188
|
+
* via the `definition` "ResourceShellKind".
|
|
189
189
|
*/
|
|
190
|
-
export type
|
|
190
|
+
export type ResourceShellKind =
|
|
191
191
|
"missing" | "inputPotential" | "outputPotential" | "materialized";
|
|
192
192
|
/**
|
|
193
193
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
@@ -195,29 +195,29 @@ export type ResourceKind =
|
|
|
195
195
|
*/
|
|
196
196
|
export type ShellMissing =
|
|
197
197
|
{
|
|
198
|
-
|
|
198
|
+
resourceShellKind: "missing";
|
|
199
199
|
} & ResourceShellBase &
|
|
200
|
-
|
|
200
|
+
ResourceShellKindFacet;
|
|
201
201
|
/**
|
|
202
202
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
203
203
|
* via the `definition` "ShellInputPotential".
|
|
204
204
|
*/
|
|
205
205
|
export type ShellInputPotential =
|
|
206
206
|
{
|
|
207
|
-
|
|
207
|
+
resourceShellKind: "inputPotential";
|
|
208
208
|
} & ResourceShellBase &
|
|
209
209
|
CreationContextFacet &
|
|
210
|
-
|
|
210
|
+
ResourceShellKindFacet;
|
|
211
211
|
/**
|
|
212
212
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
213
213
|
* via the `definition` "ShellOutputPotential".
|
|
214
214
|
*/
|
|
215
215
|
export type ShellOutputPotential =
|
|
216
216
|
{
|
|
217
|
-
|
|
217
|
+
resourceShellKind: "outputPotential";
|
|
218
218
|
} & ResourceShellBase &
|
|
219
219
|
CreationContextFacet &
|
|
220
|
-
|
|
220
|
+
ResourceShellKindFacet;
|
|
221
221
|
/**
|
|
222
222
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
223
223
|
* via the `definition` "Timestamp".
|
|
@@ -237,10 +237,10 @@ export type Path =
|
|
|
237
237
|
export type ShellMaterializedBase =
|
|
238
238
|
{
|
|
239
239
|
version: 1;
|
|
240
|
-
|
|
240
|
+
resourceShellKind: "materialized";
|
|
241
241
|
} & ResourceShellBase &
|
|
242
242
|
CreationContextFacet &
|
|
243
|
-
|
|
243
|
+
ResourceShellKindFacet &
|
|
244
244
|
TimestampFacet &
|
|
245
245
|
PathFacet;
|
|
246
246
|
/**
|
|
@@ -250,10 +250,10 @@ export type ShellMaterializedBase =
|
|
|
250
250
|
export type ShellMaterializedBase1 =
|
|
251
251
|
{
|
|
252
252
|
version: 1;
|
|
253
|
-
|
|
253
|
+
resourceShellKind: "materialized";
|
|
254
254
|
} & ResourceShellBase &
|
|
255
255
|
CreationContextFacet &
|
|
256
|
-
|
|
256
|
+
ResourceShellKindFacet &
|
|
257
257
|
TimestampFacet &
|
|
258
258
|
PathFacet;
|
|
259
259
|
/**
|
|
@@ -262,29 +262,35 @@ export type ShellMaterializedBase1 =
|
|
|
262
262
|
*/
|
|
263
263
|
export type ResourceMissing =
|
|
264
264
|
{
|
|
265
|
-
|
|
265
|
+
resourceShellKind: "missing";
|
|
266
266
|
} & ResourceShellBase &
|
|
267
|
-
|
|
267
|
+
ResourceShellKindFacet;
|
|
268
268
|
/**
|
|
269
269
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
270
270
|
* via the `definition` "ResourceInputPotential".
|
|
271
271
|
*/
|
|
272
272
|
export type ResourceInputPotential =
|
|
273
273
|
{
|
|
274
|
-
|
|
274
|
+
resourceShellKind: "inputPotential";
|
|
275
275
|
} & ResourceShellBase &
|
|
276
276
|
CreationContextFacet &
|
|
277
|
-
|
|
277
|
+
ResourceShellKindFacet;
|
|
278
278
|
/**
|
|
279
279
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
280
280
|
* via the `definition` "ResourceOutputPotential".
|
|
281
281
|
*/
|
|
282
282
|
export type ResourceOutputPotential =
|
|
283
283
|
{
|
|
284
|
-
|
|
284
|
+
resourceShellKind: "outputPotential";
|
|
285
285
|
} & ResourceShellBase &
|
|
286
286
|
CreationContextFacet &
|
|
287
|
-
|
|
287
|
+
ResourceShellKindFacet;
|
|
288
|
+
/**
|
|
289
|
+
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
290
|
+
* via the `definition` "ResourcePotential".
|
|
291
|
+
*/
|
|
292
|
+
export type ResourcePotential =
|
|
293
|
+
ResourceMissing | ResourceInputPotential | ResourceOutputPotential;
|
|
288
294
|
/**
|
|
289
295
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
290
296
|
* via the `definition` "JsonData".
|
|
@@ -300,18 +306,12 @@ export type JsonData =
|
|
|
300
306
|
};
|
|
301
307
|
/**
|
|
302
308
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
303
|
-
* via the `definition` "
|
|
309
|
+
* via the `definition` "Resource".
|
|
304
310
|
*/
|
|
305
|
-
export type
|
|
311
|
+
export type Resource =
|
|
306
312
|
{
|
|
307
313
|
} & ShellMaterializedBase &
|
|
308
314
|
NucleusFacet1;
|
|
309
|
-
/**
|
|
310
|
-
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
311
|
-
* via the `definition` "Resource".
|
|
312
|
-
*/
|
|
313
|
-
export type Resource =
|
|
314
|
-
ResourceMissing | ResourceInputPotential | ResourceOutputPotential | ResourceMaterialized;
|
|
315
315
|
/**
|
|
316
316
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
317
317
|
* via the `definition` "StepArray".
|
|
@@ -540,14 +540,14 @@ export interface CreationContextFacet {
|
|
|
540
540
|
export interface ResourceShellBase {
|
|
541
541
|
identity: ResourceIdentity;
|
|
542
542
|
resourceTypeHandle: ResourceTypeIdentity;
|
|
543
|
-
|
|
543
|
+
resourceShellKind: ResourceShellKind;
|
|
544
544
|
}
|
|
545
545
|
/**
|
|
546
546
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
547
|
-
* via the `definition` "
|
|
547
|
+
* via the `definition` "ResourceShellKindFacet".
|
|
548
548
|
*/
|
|
549
|
-
export interface
|
|
550
|
-
|
|
549
|
+
export interface ResourceShellKindFacet {
|
|
550
|
+
resourceShellKind: ResourceShellKind;
|
|
551
551
|
}
|
|
552
552
|
/**
|
|
553
553
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
@@ -575,16 +575,16 @@ export interface Nucleus {
|
|
|
575
575
|
* via the `definition` "NucleusFacet".
|
|
576
576
|
*/
|
|
577
577
|
export interface NucleusFacet {
|
|
578
|
-
nucleus:
|
|
578
|
+
nucleus: unknown;
|
|
579
579
|
}
|
|
580
580
|
export interface NucleusFacet1 {
|
|
581
|
-
nucleus:
|
|
581
|
+
nucleus: unknown;
|
|
582
582
|
}
|
|
583
583
|
/**
|
|
584
584
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
585
585
|
* via the `definition` "JobStepSocket".
|
|
586
586
|
*/
|
|
587
|
-
export type JobStepSocket = Record<ResourceRoleIdentity, Resource>;
|
|
587
|
+
export type JobStepSocket = Record<ResourceRoleIdentity, Resource | ResourcePotential>;
|
|
588
588
|
/**
|
|
589
589
|
* This interface was referenced by `Genesis`'s JSON-Schema
|
|
590
590
|
* via the `definition` "StrategyState".
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export { default as SchemaGenesis } from './generated/schemas/Genesis.js';
|
|
2
|
+
export { default as SchemaResourceType } from './generated/schemas/standalone/ResourceType.js';
|
|
2
3
|
export { default as SchemaJob } from './generated/schemas/standalone/Job.js';
|
|
4
|
+
export { default as SchemaRunnableStrategy } from './generated/schemas/standalone/RunnableStrategy.js';
|
|
3
5
|
export { default as SchemaStrategyRun } from './generated/schemas/standalone/StrategyRun.js';
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as CONSTANTS } from './generated/
|
|
6
|
+
export { default as ResourceGenesis } from './generated/resources/Genesis.js';
|
|
7
|
+
export { default as CONSTANTS } from './generated/artifacts/constants.js';
|
|
8
|
+
export { default as MAPPINGS } from './generated/artifacts/mappings.js';
|
|
6
9
|
export type { Resource_Genesis as Resource_GenesisJson } from './generated/types/standalone/Resource_Genesis.js';
|
|
7
10
|
export type { Resource_ResourceType as Resource_ResourceTypeJson } from './generated/types/standalone/Resource_ResourceType.js';
|
|
8
11
|
export type { Resource_Job as Resource_JobJson } from './generated/types/standalone/Resource_Job.js';
|
|
9
12
|
export type { Resource_RawStrategy as Resource_RawStrategyJson } from './generated/types/standalone/Resource_RawStrategy.js';
|
|
10
13
|
export type { Resource_RunnableStrategy as Resource_RunnableStrategyJson } from './generated/types/standalone/Resource_RunnableStrategy.js';
|
|
11
|
-
export type { DocumentationFacet as DocumentationFacetJson, NucleusFacet as NucleusFacetJson, ResourceTypeIdentity as ResourceTypeIdentityJson, ResourceType as ResourceTypeJson, ResourceRoleIdentity as ResourceRoleIdentityJson, ResourceRoleValue as ResourceRoleValueJson, Conditional as ConditionalJson, RoleMap as RoleMapJson, Roles as RolesJson, RoleBindings as RoleBindingsJson, ResourceIdentity as ResourceIdentityJson, JobStepIdentity as JobStepIdentityJson, BranchStepIdentity as BranchStepIdentityJson, WhileStepIdentity as WhileStepIdentityJson, ForStepIdentity as ForStepIdentityJson, JobStep as JobStepJson, BranchStep as BranchStepJson, WhileStep as WhileStepJson, ForStep as ForStepJson, StepKind as StepKindJson, StepIdentity as StepIdentityJson, Step as StepJson, CreationContext as CreationContextJson, ResourceMissing as ResourceMissingJson, Resource as ResourceJson, StrategyState as StrategyStateJson, StepsFacet as StepsFacetJson, RawStrategy as RawStrategyJson, RunnableStrategyIdentity as RunnableStrategyIdentityJson, RunnableStrategyStatus as RunnableStrategyStatusJson, RunnableStrategy as RunnableStrategyJson, RunnableStrategyUpdate as RunnableStrategyUpdateJson, JobIdentity as JobIdentityJson, Job as JobJson, JsonData as JsonDataJson, StrategyThreadIdentity as StrategyThreadIdentityJson, StrategyThreadMap as StrategyThreadMapJson, JobStepSocket as JobStepSocketJson, Timestamp as TimestampJson, StrategyRunIdentity as StrategyRunIdentityJson, GoalIdentity as GoalIdentityJson, Goal as GoalJson, } from './generated/types/types.js';
|
|
14
|
+
export type { DocumentationFacet as DocumentationFacetJson, NucleusFacet as NucleusFacetJson, ResourceTypeIdentity as ResourceTypeIdentityJson, ResourceType as ResourceTypeJson, ResourceRoleIdentity as ResourceRoleIdentityJson, ResourceRoleValue as ResourceRoleValueJson, Conditional as ConditionalJson, RoleMap as RoleMapJson, Roles as RolesJson, RoleBindings as RoleBindingsJson, ResourceIdentity as ResourceIdentityJson, JobStepIdentity as JobStepIdentityJson, BranchStepIdentity as BranchStepIdentityJson, WhileStepIdentity as WhileStepIdentityJson, ForStepIdentity as ForStepIdentityJson, JobStep as JobStepJson, BranchStep as BranchStepJson, WhileStep as WhileStepJson, ForStep as ForStepJson, StepKind as StepKindJson, StepIdentity as StepIdentityJson, Step as StepJson, CreationContext as CreationContextJson, ResourceMissing as ResourceMissingJson, ResourceInputPotential as ResourceInputPotentialJson, ResourceOutputPotential as ResourceOutputPotentialJson, ShellMaterializedBase as ShellMaterializedBaseJson, Resource as ResourceJson, StrategyState as StrategyStateJson, StepsFacet as StepsFacetJson, RawStrategy as RawStrategyJson, RunnableStrategyIdentity as RunnableStrategyIdentityJson, RunnableStrategyStatus as RunnableStrategyStatusJson, RunnableStrategy as RunnableStrategyJson, RunnableStrategyUpdate as RunnableStrategyUpdateJson, JobIdentity as JobIdentityJson, Job as JobJson, JsonData as JsonDataJson, StrategyThreadIdentity as StrategyThreadIdentityJson, StrategyThreadMap as StrategyThreadMapJson, JobStepSocket as JobStepSocketJson, Timestamp as TimestampJson, StrategyRunIdentity as StrategyRunIdentityJson, GoalIdentity as GoalIdentityJson, Goal as GoalJson, } from './generated/types/types.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// Re-export JSON schemas via .ts shims to avoid .json re-exports in declarations
|
|
2
2
|
export { default as SchemaGenesis } from './generated/schemas/Genesis.js';
|
|
3
|
+
export { default as SchemaResourceType } from './generated/schemas/standalone/ResourceType.js';
|
|
3
4
|
export { default as SchemaJob } from './generated/schemas/standalone/Job.js';
|
|
5
|
+
export { default as SchemaRunnableStrategy } from './generated/schemas/standalone/RunnableStrategy.js';
|
|
4
6
|
export { default as SchemaStrategyRun } from './generated/schemas/standalone/StrategyRun.js';
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as CONSTANTS } from './generated/
|
|
7
|
+
export { default as ResourceGenesis } from './generated/resources/Genesis.js';
|
|
8
|
+
export { default as CONSTANTS } from './generated/artifacts/constants.js';
|
|
9
|
+
export { default as MAPPINGS } from './generated/artifacts/mappings.js';
|
|
@@ -12,9 +12,8 @@ export declare class SchemaConfig {
|
|
|
12
12
|
private readonly sourceFile;
|
|
13
13
|
private readonly normalizedDir;
|
|
14
14
|
private readonly schemasDir;
|
|
15
|
-
private readonly
|
|
15
|
+
private readonly artifactsDir;
|
|
16
16
|
private readonly resourcesDir;
|
|
17
|
-
private readonly dependencyMapPath;
|
|
18
17
|
private readonly typesSrcDir;
|
|
19
18
|
private readonly typesDistDir;
|
|
20
19
|
private readonly baseUrl;
|
|
@@ -29,8 +28,8 @@ export declare class SchemaConfig {
|
|
|
29
28
|
getNormalizedSourcePath(): string;
|
|
30
29
|
getSchemasDir(): string;
|
|
31
30
|
getSchemaPath(filename: string): string;
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
getArtifactsDir(): string;
|
|
32
|
+
getArtifactsPath(filename: string): string;
|
|
34
33
|
getStandaloneSchemaDir(): string;
|
|
35
34
|
getStandaloneSchemaPath(filename: string): string;
|
|
36
35
|
getTypesSrcDir(): string;
|
|
@@ -42,7 +41,6 @@ export declare class SchemaConfig {
|
|
|
42
41
|
getStandaloneTypeSrcPath(filename: string): string;
|
|
43
42
|
getStandaloneTypeDistPath(filename: string): string;
|
|
44
43
|
getResourcesDir(): string;
|
|
45
|
-
getDependencyMapPath(): string;
|
|
46
44
|
getBaseUrl(): string;
|
|
47
45
|
getVersion(): string;
|
|
48
46
|
getSchemaId(schemaName: string): string;
|
|
@@ -22,13 +22,12 @@ export class SchemaConfig {
|
|
|
22
22
|
this.sourceFile = getEnv('TP_SCHEMA_SOURCE_FILE', 'Genesis.json');
|
|
23
23
|
this.normalizedDir = getEnv('TP_SCHEMA_NORMALIZED_DIR', 'src/generated/normalized');
|
|
24
24
|
this.schemasDir = getEnv('TP_SCHEMA_SCHEMAS_DIR', 'src/generated/schemas');
|
|
25
|
-
this.
|
|
25
|
+
this.artifactsDir = getEnv('TP_SCHEMA_ARTIFACTS_DIR', 'src/generated/artifacts');
|
|
26
26
|
this.resourcesDir = getEnv('TP_SCHEMA_RESOURCES_DIR', 'src/generated/resources');
|
|
27
|
-
this.dependencyMapPath = getEnv('TP_SCHEMA_DEPENDENCY_MAP_PATH', 'src/generated/dependencies/dependencyMap.json');
|
|
28
27
|
this.typesSrcDir = getEnv('TP_SCHEMA_TYPES_SRC_DIR', 'src/generated/types');
|
|
29
28
|
this.typesDistDir = getEnv('TP_SCHEMA_TYPES_DIST_DIR', 'dist/generated/types');
|
|
30
29
|
this.baseUrl = getEnv('TP_SCHEMA_BASE_URL', 'https://schemas.toolproof.com');
|
|
31
|
-
this.version = getEnv('TP_SCHEMA_VERSION', '
|
|
30
|
+
this.version = getEnv('TP_SCHEMA_VERSION', 'v1');
|
|
32
31
|
}
|
|
33
32
|
// Path getters
|
|
34
33
|
getRoot() {
|
|
@@ -67,13 +66,13 @@ export class SchemaConfig {
|
|
|
67
66
|
getSchemaPath(filename) {
|
|
68
67
|
return path.join(this.getSchemasDir(), filename);
|
|
69
68
|
}
|
|
70
|
-
|
|
71
|
-
return path.isAbsolute(this.
|
|
72
|
-
? this.
|
|
73
|
-
: path.join(this.root, this.
|
|
69
|
+
getArtifactsDir() {
|
|
70
|
+
return path.isAbsolute(this.artifactsDir)
|
|
71
|
+
? this.artifactsDir
|
|
72
|
+
: path.join(this.root, this.artifactsDir);
|
|
74
73
|
}
|
|
75
|
-
|
|
76
|
-
return path.join(this.
|
|
74
|
+
getArtifactsPath(filename) {
|
|
75
|
+
return path.join(this.getArtifactsDir(), filename);
|
|
77
76
|
}
|
|
78
77
|
getStandaloneSchemaDir() {
|
|
79
78
|
return path.join(this.getSchemasDir(), 'standalone');
|
|
@@ -114,11 +113,6 @@ export class SchemaConfig {
|
|
|
114
113
|
? this.resourcesDir
|
|
115
114
|
: path.join(this.root, this.resourcesDir);
|
|
116
115
|
}
|
|
117
|
-
getDependencyMapPath() {
|
|
118
|
-
return path.isAbsolute(this.dependencyMapPath)
|
|
119
|
-
? this.dependencyMapPath
|
|
120
|
-
: path.join(this.root, this.dependencyMapPath);
|
|
121
|
-
}
|
|
122
116
|
// Schema URL methods
|
|
123
117
|
getBaseUrl() {
|
|
124
118
|
return this.baseUrl;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type GeneratedConstants = {
|
|
2
|
+
Names: Record<string, string>;
|
|
3
|
+
Enums: Record<string, Record<string, string>>;
|
|
4
|
+
};
|
|
5
|
+
export type GeneratedMappings = {
|
|
6
|
+
IdentityNameToIdentityPrefix: Record<string, string>;
|
|
7
|
+
StepKindToStepIdentityPrefix: Record<string, string>;
|
|
8
|
+
};
|
|
9
|
+
export type DeriveStepKindToStepIdentityPrefixResult = {
|
|
10
|
+
mapping: Record<string, string>;
|
|
11
|
+
missing: Array<{
|
|
12
|
+
stepKind: string;
|
|
13
|
+
identityName: string;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
export declare function extractIdentityPrefixes(schema: unknown): Record<string, string>;
|
|
17
|
+
export declare function extractSubschemaNames(schema: unknown): Record<string, string>;
|
|
18
|
+
export declare function extractEnums(schema: unknown): Record<string, Record<string, string>>;
|
|
19
|
+
export declare function deriveStepKindToStepIdentityPrefix(enums: Record<string, Record<string, string>>, identityNameToIdentityPrefix: Record<string, string>): DeriveStepKindToStepIdentityPrefixResult;
|
|
20
|
+
export declare function extractGeneratedConstantsAndMappings(schema: unknown): {
|
|
21
|
+
CONSTANTS: GeneratedConstants;
|
|
22
|
+
MAPPINGS: GeneratedMappings;
|
|
23
|
+
DIAGNOSTICS: {
|
|
24
|
+
missingStepKindIdentityPrefixes: Array<{
|
|
25
|
+
stepKind: string;
|
|
26
|
+
identityName: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function renderConstantsTs(constants: GeneratedConstants): string;
|
|
31
|
+
export declare function renderMappingsTs(mappings: GeneratedMappings): string;
|