@toolproof-npm/schema 0.1.44 → 0.1.46
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/_lib/test.js +38 -31
- package/dist/genesis/generated/resources/Genesis.json +742 -452
- package/dist/genesis/generated/schemas/Genesis.json +441 -166
- package/dist/genesis/generated/schemas/Job.json +26 -26
- package/dist/genesis/generated/schemas/ResourceFormat.json +9 -9
- package/dist/genesis/generated/schemas/ResourceType.json +317 -42
- package/dist/genesis/generated/schemas/StatefulStrategy.json +76 -76
- package/dist/genesis/generated/schemas/StatelessStrategy.json +40 -40
- package/dist/{_lib → genesis/generated}/types/Resource_Job.d.ts +16 -16
- package/dist/{_lib → genesis/generated}/types/Resource_ResourceFormat.d.ts +10 -10
- package/dist/{_lib → genesis/generated}/types/Resource_ResourceType.d.ts +15 -15
- package/dist/{_lib → genesis/generated}/types/Resource_StatelessStrategy.d.ts +16 -16
- package/dist/{_lib → genesis/generated}/types/types.d.ts +289 -261
- package/dist/genesis/resourceTypes/Genesis.json +530 -250
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/scripts/_lib/config.js +2 -2
- package/dist/scripts/brandFactories.d.ts +37 -23
- package/dist/scripts/brandFactories.js +26 -29
- package/dist/scripts/extractSchemas.js +1 -1
- package/dist/scripts/generateResourceEnvelopes.js +6 -6
- package/dist/scripts/generateTypes.js +38 -26
- package/package.json +1 -1
- /package/dist/{_lib → genesis/generated}/types/Resource_Job.js +0 -0
- /package/dist/{_lib → genesis/generated}/types/Resource_ResourceFormat.js +0 -0
- /package/dist/{_lib → genesis/generated}/types/Resource_ResourceType.js +0 -0
- /package/dist/{_lib → genesis/generated}/types/Resource_StatelessStrategy.js +0 -0
- /package/dist/{_lib → genesis/generated}/types/types.js +0 -0
package/dist/_lib/test.js
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export {};
|
|
2
|
+
/* import type { Job } from '../genesis/generated/types/types.js';
|
|
3
|
+
import type { Resource_Job } from '../genesis/generated/types/Resource_Job.js';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const Job: Job = {
|
|
7
|
+
identity: 'JOB-identity',
|
|
3
8
|
name: 'name',
|
|
4
9
|
description: 'description',
|
|
5
10
|
implementation: 'implementation',
|
|
6
11
|
roles: {
|
|
7
12
|
inputMap: {
|
|
8
13
|
'ROLE-1234': {
|
|
9
|
-
|
|
14
|
+
resourceTypeRef: 'TYPE-1234',
|
|
10
15
|
name: 'name',
|
|
11
16
|
description: 'description'
|
|
12
17
|
}
|
|
13
18
|
},
|
|
14
19
|
outputMap: {
|
|
15
20
|
'ROLE-5678': {
|
|
16
|
-
|
|
21
|
+
resourceTypeRef: 'TYPE-5678',
|
|
17
22
|
name: 'name',
|
|
18
23
|
description: 'description'
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
};
|
|
28
|
+
|
|
23
29
|
const jobAlpha = {
|
|
24
30
|
identity: 'identity',
|
|
25
31
|
name: 'name',
|
|
@@ -28,20 +34,21 @@ const jobAlpha = {
|
|
|
28
34
|
roles: {
|
|
29
35
|
inputMap: {
|
|
30
36
|
'data-input': {
|
|
31
|
-
|
|
37
|
+
resourceTypeRef: 'resourceTypeRef',
|
|
32
38
|
name: 'name',
|
|
33
39
|
description: 'description'
|
|
34
40
|
}
|
|
35
41
|
},
|
|
36
42
|
outputMap: {
|
|
37
43
|
'data-output': {
|
|
38
|
-
|
|
44
|
+
resourceTypeRef: 'resourceTypeRef',
|
|
39
45
|
name: 'name',
|
|
40
46
|
description: 'description'
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
};
|
|
51
|
+
|
|
45
52
|
const jobBeta = {
|
|
46
53
|
identity: 'identity',
|
|
47
54
|
name: 'name',
|
|
@@ -50,68 +57,66 @@ const jobBeta = {
|
|
|
50
57
|
roles: {
|
|
51
58
|
inputMap: {
|
|
52
59
|
'data-input': {
|
|
53
|
-
|
|
60
|
+
resourceTypeRef: 'resourceTypeRef',
|
|
54
61
|
name: 'name',
|
|
55
62
|
description: 'description'
|
|
56
63
|
}
|
|
57
64
|
},
|
|
58
|
-
/* outputMap: {
|
|
59
|
-
'data-output': {
|
|
60
|
-
resourceTypeId: 'resourceTypeId',
|
|
61
|
-
name: 'name',
|
|
62
|
-
description: 'description'
|
|
63
|
-
}
|
|
64
|
-
} */
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
+
|
|
68
|
+
|
|
67
69
|
// This checks (no error expected); we're providing all required fields
|
|
68
|
-
const ResourceJobAlpha = {
|
|
70
|
+
const ResourceJobAlpha: Resource_Job = {
|
|
69
71
|
identity: 'RESOURCE-1',
|
|
70
|
-
|
|
72
|
+
resourceTypeRef: 'TYPE-ID',
|
|
71
73
|
creationContext: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
resourceRoleRef: 'ROLE-ID',
|
|
75
|
+
executionRef: 'EXECUTION-ID',
|
|
74
76
|
},
|
|
75
77
|
kind: 'materialized',
|
|
76
78
|
timestamp: 'timestamp',
|
|
77
79
|
path: 'path',
|
|
78
80
|
extractedData: jobAlpha
|
|
79
81
|
};
|
|
82
|
+
|
|
80
83
|
// @ts-expect-error Missing path property
|
|
81
84
|
// This SHOULD fail (missing path) once Resource_Job enforces Path strictly.
|
|
82
|
-
const ResourceJobAlpha2 = {
|
|
85
|
+
const ResourceJobAlpha2: Resource_Job = {
|
|
83
86
|
identity: 'RESOURCE-3',
|
|
84
|
-
|
|
87
|
+
resourceTypeRef: 'TYPE-ID',
|
|
85
88
|
creationContext: {
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
resourceRoleRef: 'ROLE-ID',
|
|
90
|
+
executionRef: 'EXECUTION-ID',
|
|
88
91
|
},
|
|
89
92
|
kind: 'materialized',
|
|
90
93
|
timestamp: 'timestamp',
|
|
91
94
|
// path: 'path',
|
|
92
95
|
extractedData: jobAlpha
|
|
93
96
|
};
|
|
97
|
+
|
|
94
98
|
// @ts-expect-error Missing extractedData property
|
|
95
99
|
// This should fail; we're missing extractedData
|
|
96
|
-
const ResourceJobAlpha3 = {
|
|
100
|
+
const ResourceJobAlpha3: Resource_Job = {
|
|
97
101
|
identity: 'RESOURCE-2',
|
|
98
|
-
|
|
102
|
+
resourceTypeRef: 'TYPE-ID',
|
|
99
103
|
creationContext: {
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
resourceRoleRef: 'ROLE-ID',
|
|
105
|
+
executionRef: 'EXECUTION-ID',
|
|
102
106
|
},
|
|
103
107
|
kind: 'materialized',
|
|
104
108
|
timestamp: 'timestamp',
|
|
105
109
|
path: 'path',
|
|
106
110
|
// extractedData: jobAlpha
|
|
107
111
|
};
|
|
112
|
+
|
|
108
113
|
// This SHOULD fail (missing roles.outputMap) once Job's roles is strictly enforced.
|
|
109
|
-
const ResourceJobBeta = {
|
|
114
|
+
const ResourceJobBeta: Resource_Job = {
|
|
110
115
|
identity: 'RESOURCE-4',
|
|
111
|
-
|
|
116
|
+
resourceTypeRef: 'TYPE-ID',
|
|
112
117
|
creationContext: {
|
|
113
|
-
|
|
114
|
-
|
|
118
|
+
resourceRoleRef: 'ROLE-ID',
|
|
119
|
+
executionRef: 'EXECUTION-ID',
|
|
115
120
|
},
|
|
116
121
|
kind: 'materialized',
|
|
117
122
|
timestamp: 'timestamp',
|
|
@@ -119,4 +124,6 @@ const ResourceJobBeta = {
|
|
|
119
124
|
// @ts-expect-error Missing outputMap inside roles (Job requires outputMap)
|
|
120
125
|
extractedData: jobBeta
|
|
121
126
|
};
|
|
122
|
-
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
*/
|