@bleedingdev/modern-js-backend-federation-contracts 3.9.0-ultramodern.11 → 3.9.0-ultramodern.12
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/cjs/backend-federation-contract/build-artifact.js +24 -48
- package/dist/esm/backend-federation-contract/build-artifact.mjs +24 -48
- package/dist/esm-node/backend-federation-contract/build-artifact.mjs +24 -48
- package/package.json +2 -2
- package/src/backend-federation-contract/build-artifact.ts +14 -47
|
@@ -50,39 +50,19 @@ const createUltramodernBuildArtifact = (record)=>{
|
|
|
50
50
|
unitId: record.unitId,
|
|
51
51
|
version: record.version
|
|
52
52
|
};
|
|
53
|
-
const api = {
|
|
54
|
-
appId: deliveryUnit.appId,
|
|
55
|
-
build: deliveryUnit.build,
|
|
56
|
-
buildMarker: deliveryUnit.buildMarker,
|
|
57
|
-
deployProfile: deliveryUnit.deployProfile,
|
|
58
|
-
kind: deliveryUnit.kind,
|
|
59
|
-
packageName: deliveryUnit.packageName,
|
|
60
|
-
schemaVersion: deliveryUnit.schemaVersion,
|
|
61
|
-
sourceRevision: deliveryUnit.sourceRevision,
|
|
62
|
-
surface: 'api',
|
|
63
|
-
unitId: deliveryUnit.unitId,
|
|
64
|
-
version: deliveryUnit.version
|
|
65
|
-
};
|
|
66
|
-
const ui = {
|
|
67
|
-
appId: deliveryUnit.appId,
|
|
68
|
-
build: deliveryUnit.build,
|
|
69
|
-
buildMarker: deliveryUnit.buildMarker,
|
|
70
|
-
deployProfile: deliveryUnit.deployProfile,
|
|
71
|
-
kind: deliveryUnit.kind,
|
|
72
|
-
packageName: deliveryUnit.packageName,
|
|
73
|
-
schemaVersion: deliveryUnit.schemaVersion,
|
|
74
|
-
sourceRevision: deliveryUnit.sourceRevision,
|
|
75
|
-
surface: 'ui',
|
|
76
|
-
unitId: deliveryUnit.unitId,
|
|
77
|
-
version: deliveryUnit.version
|
|
78
|
-
};
|
|
79
53
|
return {
|
|
80
54
|
deliveryUnit,
|
|
81
55
|
kind: 'ultramodern-build-artifact',
|
|
82
56
|
schemaVersion: external_constants_js_namespaceObject.DELIVERY_UNIT_SCHEMA_VERSION,
|
|
83
57
|
surfaces: {
|
|
84
|
-
api
|
|
85
|
-
|
|
58
|
+
api: {
|
|
59
|
+
...deliveryUnit,
|
|
60
|
+
surface: 'api'
|
|
61
|
+
},
|
|
62
|
+
ui: {
|
|
63
|
+
...deliveryUnit,
|
|
64
|
+
surface: 'ui'
|
|
65
|
+
}
|
|
86
66
|
}
|
|
87
67
|
};
|
|
88
68
|
};
|
|
@@ -141,29 +121,25 @@ const validateUltramodernBuildArtifact = (value, path = 'artifact')=>{
|
|
|
141
121
|
return (0, external_validation_core_js_namespaceObject.validationResult)(errors);
|
|
142
122
|
};
|
|
143
123
|
const isUltramodernBuildArtifact = (value)=>validateUltramodernBuildArtifact(value).ok;
|
|
144
|
-
const stampUltramodernBuildArtifactIdentity = (artifact, identity)=>
|
|
124
|
+
const stampUltramodernBuildArtifactIdentity = (artifact, identity)=>{
|
|
125
|
+
const stamped = {
|
|
126
|
+
build: identity.buildMarker,
|
|
127
|
+
buildMarker: identity.buildMarker,
|
|
128
|
+
sourceRevision: identity.sourceRevision
|
|
129
|
+
};
|
|
130
|
+
const stamp = (value)=>({
|
|
131
|
+
...value,
|
|
132
|
+
...stamped
|
|
133
|
+
});
|
|
134
|
+
return {
|
|
145
135
|
...artifact,
|
|
146
|
-
deliveryUnit:
|
|
147
|
-
...artifact.deliveryUnit,
|
|
148
|
-
build: identity.buildMarker,
|
|
149
|
-
buildMarker: identity.buildMarker,
|
|
150
|
-
sourceRevision: identity.sourceRevision
|
|
151
|
-
},
|
|
136
|
+
deliveryUnit: stamp(artifact.deliveryUnit),
|
|
152
137
|
surfaces: {
|
|
153
|
-
ui:
|
|
154
|
-
|
|
155
|
-
build: identity.buildMarker,
|
|
156
|
-
buildMarker: identity.buildMarker,
|
|
157
|
-
sourceRevision: identity.sourceRevision
|
|
158
|
-
},
|
|
159
|
-
api: {
|
|
160
|
-
...artifact.surfaces.api,
|
|
161
|
-
build: identity.buildMarker,
|
|
162
|
-
buildMarker: identity.buildMarker,
|
|
163
|
-
sourceRevision: identity.sourceRevision
|
|
164
|
-
}
|
|
138
|
+
ui: stamp(artifact.surfaces.ui),
|
|
139
|
+
api: stamp(artifact.surfaces.api)
|
|
165
140
|
}
|
|
166
|
-
}
|
|
141
|
+
};
|
|
142
|
+
};
|
|
167
143
|
const stampUltramodernBuildArtifactSourceRevision = (artifact, sourceRevision)=>stampUltramodernBuildArtifactIdentity(artifact, {
|
|
168
144
|
buildMarker: artifact.deliveryUnit.buildMarker,
|
|
169
145
|
sourceRevision
|
|
@@ -14,39 +14,19 @@ const createUltramodernBuildArtifact = (record)=>{
|
|
|
14
14
|
unitId: record.unitId,
|
|
15
15
|
version: record.version
|
|
16
16
|
};
|
|
17
|
-
const api = {
|
|
18
|
-
appId: deliveryUnit.appId,
|
|
19
|
-
build: deliveryUnit.build,
|
|
20
|
-
buildMarker: deliveryUnit.buildMarker,
|
|
21
|
-
deployProfile: deliveryUnit.deployProfile,
|
|
22
|
-
kind: deliveryUnit.kind,
|
|
23
|
-
packageName: deliveryUnit.packageName,
|
|
24
|
-
schemaVersion: deliveryUnit.schemaVersion,
|
|
25
|
-
sourceRevision: deliveryUnit.sourceRevision,
|
|
26
|
-
surface: 'api',
|
|
27
|
-
unitId: deliveryUnit.unitId,
|
|
28
|
-
version: deliveryUnit.version
|
|
29
|
-
};
|
|
30
|
-
const ui = {
|
|
31
|
-
appId: deliveryUnit.appId,
|
|
32
|
-
build: deliveryUnit.build,
|
|
33
|
-
buildMarker: deliveryUnit.buildMarker,
|
|
34
|
-
deployProfile: deliveryUnit.deployProfile,
|
|
35
|
-
kind: deliveryUnit.kind,
|
|
36
|
-
packageName: deliveryUnit.packageName,
|
|
37
|
-
schemaVersion: deliveryUnit.schemaVersion,
|
|
38
|
-
sourceRevision: deliveryUnit.sourceRevision,
|
|
39
|
-
surface: 'ui',
|
|
40
|
-
unitId: deliveryUnit.unitId,
|
|
41
|
-
version: deliveryUnit.version
|
|
42
|
-
};
|
|
43
17
|
return {
|
|
44
18
|
deliveryUnit,
|
|
45
19
|
kind: 'ultramodern-build-artifact',
|
|
46
20
|
schemaVersion: DELIVERY_UNIT_SCHEMA_VERSION,
|
|
47
21
|
surfaces: {
|
|
48
|
-
api
|
|
49
|
-
|
|
22
|
+
api: {
|
|
23
|
+
...deliveryUnit,
|
|
24
|
+
surface: 'api'
|
|
25
|
+
},
|
|
26
|
+
ui: {
|
|
27
|
+
...deliveryUnit,
|
|
28
|
+
surface: 'ui'
|
|
29
|
+
}
|
|
50
30
|
}
|
|
51
31
|
};
|
|
52
32
|
};
|
|
@@ -105,29 +85,25 @@ const validateUltramodernBuildArtifact = (value, path = 'artifact')=>{
|
|
|
105
85
|
return validationResult(errors);
|
|
106
86
|
};
|
|
107
87
|
const isUltramodernBuildArtifact = (value)=>validateUltramodernBuildArtifact(value).ok;
|
|
108
|
-
const stampUltramodernBuildArtifactIdentity = (artifact, identity)=>
|
|
88
|
+
const stampUltramodernBuildArtifactIdentity = (artifact, identity)=>{
|
|
89
|
+
const stamped = {
|
|
90
|
+
build: identity.buildMarker,
|
|
91
|
+
buildMarker: identity.buildMarker,
|
|
92
|
+
sourceRevision: identity.sourceRevision
|
|
93
|
+
};
|
|
94
|
+
const stamp = (value)=>({
|
|
95
|
+
...value,
|
|
96
|
+
...stamped
|
|
97
|
+
});
|
|
98
|
+
return {
|
|
109
99
|
...artifact,
|
|
110
|
-
deliveryUnit:
|
|
111
|
-
...artifact.deliveryUnit,
|
|
112
|
-
build: identity.buildMarker,
|
|
113
|
-
buildMarker: identity.buildMarker,
|
|
114
|
-
sourceRevision: identity.sourceRevision
|
|
115
|
-
},
|
|
100
|
+
deliveryUnit: stamp(artifact.deliveryUnit),
|
|
116
101
|
surfaces: {
|
|
117
|
-
ui:
|
|
118
|
-
|
|
119
|
-
build: identity.buildMarker,
|
|
120
|
-
buildMarker: identity.buildMarker,
|
|
121
|
-
sourceRevision: identity.sourceRevision
|
|
122
|
-
},
|
|
123
|
-
api: {
|
|
124
|
-
...artifact.surfaces.api,
|
|
125
|
-
build: identity.buildMarker,
|
|
126
|
-
buildMarker: identity.buildMarker,
|
|
127
|
-
sourceRevision: identity.sourceRevision
|
|
128
|
-
}
|
|
102
|
+
ui: stamp(artifact.surfaces.ui),
|
|
103
|
+
api: stamp(artifact.surfaces.api)
|
|
129
104
|
}
|
|
130
|
-
}
|
|
105
|
+
};
|
|
106
|
+
};
|
|
131
107
|
const stampUltramodernBuildArtifactSourceRevision = (artifact, sourceRevision)=>stampUltramodernBuildArtifactIdentity(artifact, {
|
|
132
108
|
buildMarker: artifact.deliveryUnit.buildMarker,
|
|
133
109
|
sourceRevision
|
|
@@ -15,39 +15,19 @@ const createUltramodernBuildArtifact = (record)=>{
|
|
|
15
15
|
unitId: record.unitId,
|
|
16
16
|
version: record.version
|
|
17
17
|
};
|
|
18
|
-
const api = {
|
|
19
|
-
appId: deliveryUnit.appId,
|
|
20
|
-
build: deliveryUnit.build,
|
|
21
|
-
buildMarker: deliveryUnit.buildMarker,
|
|
22
|
-
deployProfile: deliveryUnit.deployProfile,
|
|
23
|
-
kind: deliveryUnit.kind,
|
|
24
|
-
packageName: deliveryUnit.packageName,
|
|
25
|
-
schemaVersion: deliveryUnit.schemaVersion,
|
|
26
|
-
sourceRevision: deliveryUnit.sourceRevision,
|
|
27
|
-
surface: 'api',
|
|
28
|
-
unitId: deliveryUnit.unitId,
|
|
29
|
-
version: deliveryUnit.version
|
|
30
|
-
};
|
|
31
|
-
const ui = {
|
|
32
|
-
appId: deliveryUnit.appId,
|
|
33
|
-
build: deliveryUnit.build,
|
|
34
|
-
buildMarker: deliveryUnit.buildMarker,
|
|
35
|
-
deployProfile: deliveryUnit.deployProfile,
|
|
36
|
-
kind: deliveryUnit.kind,
|
|
37
|
-
packageName: deliveryUnit.packageName,
|
|
38
|
-
schemaVersion: deliveryUnit.schemaVersion,
|
|
39
|
-
sourceRevision: deliveryUnit.sourceRevision,
|
|
40
|
-
surface: 'ui',
|
|
41
|
-
unitId: deliveryUnit.unitId,
|
|
42
|
-
version: deliveryUnit.version
|
|
43
|
-
};
|
|
44
18
|
return {
|
|
45
19
|
deliveryUnit,
|
|
46
20
|
kind: 'ultramodern-build-artifact',
|
|
47
21
|
schemaVersion: DELIVERY_UNIT_SCHEMA_VERSION,
|
|
48
22
|
surfaces: {
|
|
49
|
-
api
|
|
50
|
-
|
|
23
|
+
api: {
|
|
24
|
+
...deliveryUnit,
|
|
25
|
+
surface: 'api'
|
|
26
|
+
},
|
|
27
|
+
ui: {
|
|
28
|
+
...deliveryUnit,
|
|
29
|
+
surface: 'ui'
|
|
30
|
+
}
|
|
51
31
|
}
|
|
52
32
|
};
|
|
53
33
|
};
|
|
@@ -106,29 +86,25 @@ const validateUltramodernBuildArtifact = (value, path = 'artifact')=>{
|
|
|
106
86
|
return validationResult(errors);
|
|
107
87
|
};
|
|
108
88
|
const isUltramodernBuildArtifact = (value)=>validateUltramodernBuildArtifact(value).ok;
|
|
109
|
-
const stampUltramodernBuildArtifactIdentity = (artifact, identity)=>
|
|
89
|
+
const stampUltramodernBuildArtifactIdentity = (artifact, identity)=>{
|
|
90
|
+
const stamped = {
|
|
91
|
+
build: identity.buildMarker,
|
|
92
|
+
buildMarker: identity.buildMarker,
|
|
93
|
+
sourceRevision: identity.sourceRevision
|
|
94
|
+
};
|
|
95
|
+
const stamp = (value)=>({
|
|
96
|
+
...value,
|
|
97
|
+
...stamped
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
110
100
|
...artifact,
|
|
111
|
-
deliveryUnit:
|
|
112
|
-
...artifact.deliveryUnit,
|
|
113
|
-
build: identity.buildMarker,
|
|
114
|
-
buildMarker: identity.buildMarker,
|
|
115
|
-
sourceRevision: identity.sourceRevision
|
|
116
|
-
},
|
|
101
|
+
deliveryUnit: stamp(artifact.deliveryUnit),
|
|
117
102
|
surfaces: {
|
|
118
|
-
ui:
|
|
119
|
-
|
|
120
|
-
build: identity.buildMarker,
|
|
121
|
-
buildMarker: identity.buildMarker,
|
|
122
|
-
sourceRevision: identity.sourceRevision
|
|
123
|
-
},
|
|
124
|
-
api: {
|
|
125
|
-
...artifact.surfaces.api,
|
|
126
|
-
build: identity.buildMarker,
|
|
127
|
-
buildMarker: identity.buildMarker,
|
|
128
|
-
sourceRevision: identity.sourceRevision
|
|
129
|
-
}
|
|
103
|
+
ui: stamp(artifact.surfaces.ui),
|
|
104
|
+
api: stamp(artifact.surfaces.api)
|
|
130
105
|
}
|
|
131
|
-
}
|
|
106
|
+
};
|
|
107
|
+
};
|
|
132
108
|
const stampUltramodernBuildArtifactSourceRevision = (artifact, sourceRevision)=>stampUltramodernBuildArtifactIdentity(artifact, {
|
|
133
109
|
buildMarker: artifact.deliveryUnit.buildMarker,
|
|
134
110
|
sourceRevision
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/toolkit/backend-federation-contracts"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"version": "3.9.0-ultramodern.
|
|
14
|
+
"version": "3.9.0-ultramodern.12",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"src"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@modern-js/tsconfig": "npm:@bleedingdev/modern-js-tsconfig@3.9.0-ultramodern.
|
|
34
|
+
"@modern-js/tsconfig": "npm:@bleedingdev/modern-js-tsconfig@3.9.0-ultramodern.12",
|
|
35
35
|
"@rslib/core": "1.0.0",
|
|
36
36
|
"@rstest/core": "0.11.12",
|
|
37
37
|
"@scripts/rstest-config": "2.66.0",
|
|
@@ -35,40 +35,14 @@ export const createUltramodernBuildArtifact = (
|
|
|
35
35
|
unitId: record.unitId,
|
|
36
36
|
version: record.version,
|
|
37
37
|
};
|
|
38
|
-
const api = {
|
|
39
|
-
appId: deliveryUnit.appId,
|
|
40
|
-
build: deliveryUnit.build,
|
|
41
|
-
buildMarker: deliveryUnit.buildMarker,
|
|
42
|
-
deployProfile: deliveryUnit.deployProfile,
|
|
43
|
-
kind: deliveryUnit.kind,
|
|
44
|
-
packageName: deliveryUnit.packageName,
|
|
45
|
-
schemaVersion: deliveryUnit.schemaVersion,
|
|
46
|
-
sourceRevision: deliveryUnit.sourceRevision,
|
|
47
|
-
surface: 'api' as const,
|
|
48
|
-
unitId: deliveryUnit.unitId,
|
|
49
|
-
version: deliveryUnit.version,
|
|
50
|
-
};
|
|
51
|
-
const ui = {
|
|
52
|
-
appId: deliveryUnit.appId,
|
|
53
|
-
build: deliveryUnit.build,
|
|
54
|
-
buildMarker: deliveryUnit.buildMarker,
|
|
55
|
-
deployProfile: deliveryUnit.deployProfile,
|
|
56
|
-
kind: deliveryUnit.kind,
|
|
57
|
-
packageName: deliveryUnit.packageName,
|
|
58
|
-
schemaVersion: deliveryUnit.schemaVersion,
|
|
59
|
-
sourceRevision: deliveryUnit.sourceRevision,
|
|
60
|
-
surface: 'ui' as const,
|
|
61
|
-
unitId: deliveryUnit.unitId,
|
|
62
|
-
version: deliveryUnit.version,
|
|
63
|
-
};
|
|
64
38
|
|
|
65
39
|
return {
|
|
66
40
|
deliveryUnit,
|
|
67
41
|
kind: 'ultramodern-build-artifact',
|
|
68
42
|
schemaVersion: DELIVERY_UNIT_SCHEMA_VERSION,
|
|
69
43
|
surfaces: {
|
|
70
|
-
api,
|
|
71
|
-
ui,
|
|
44
|
+
api: { ...deliveryUnit, surface: 'api' },
|
|
45
|
+
ui: { ...deliveryUnit, surface: 'ui' },
|
|
72
46
|
},
|
|
73
47
|
};
|
|
74
48
|
};
|
|
@@ -190,29 +164,22 @@ export const stampUltramodernBuildArtifactIdentity = (
|
|
|
190
164
|
buildMarker: string;
|
|
191
165
|
sourceRevision: string;
|
|
192
166
|
},
|
|
193
|
-
): UltramodernBuildArtifact =>
|
|
194
|
-
|
|
195
|
-
deliveryUnit: {
|
|
196
|
-
...artifact.deliveryUnit,
|
|
167
|
+
): UltramodernBuildArtifact => {
|
|
168
|
+
const stamped = {
|
|
197
169
|
build: identity.buildMarker,
|
|
198
170
|
buildMarker: identity.buildMarker,
|
|
199
171
|
sourceRevision: identity.sourceRevision,
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
api: {
|
|
209
|
-
...artifact.surfaces.api,
|
|
210
|
-
build: identity.buildMarker,
|
|
211
|
-
buildMarker: identity.buildMarker,
|
|
212
|
-
sourceRevision: identity.sourceRevision,
|
|
172
|
+
};
|
|
173
|
+
const stamp = <T>(value: T) => ({ ...value, ...stamped });
|
|
174
|
+
return {
|
|
175
|
+
...artifact,
|
|
176
|
+
deliveryUnit: stamp(artifact.deliveryUnit),
|
|
177
|
+
surfaces: {
|
|
178
|
+
ui: stamp(artifact.surfaces.ui),
|
|
179
|
+
api: stamp(artifact.surfaces.api),
|
|
213
180
|
},
|
|
214
|
-
}
|
|
215
|
-
}
|
|
181
|
+
};
|
|
182
|
+
};
|
|
216
183
|
|
|
217
184
|
export const stampUltramodernBuildArtifactSourceRevision = (
|
|
218
185
|
artifact: UltramodernBuildArtifact,
|