@omen.foundation/node-microservice-runtime 0.1.114 → 0.1.115
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/package.json
CHANGED
|
@@ -1021,18 +1021,22 @@ async function updateManifest({
|
|
|
1021
1021
|
?? [];
|
|
1022
1022
|
|
|
1023
1023
|
// Components are ServiceComponent objects with {name: string}
|
|
1024
|
-
//
|
|
1024
|
+
// For federated components (IFederatedInventory/* and IFederatedLogin/*), replace all existing with newly discovered
|
|
1025
|
+
// For other components, merge discovered with existing (preserve existing, add new)
|
|
1025
1026
|
const componentsMap = new Map();
|
|
1026
|
-
// Add existing components
|
|
1027
|
+
// Add existing components, but filter out federated ones (they will be replaced)
|
|
1027
1028
|
if (Array.isArray(existingComponents)) {
|
|
1028
1029
|
existingComponents.forEach(comp => {
|
|
1029
1030
|
const name = comp.name?.Value ?? comp.name ?? comp;
|
|
1030
1031
|
if (typeof name === 'string') {
|
|
1031
|
-
|
|
1032
|
+
// Skip federated components - they will be replaced by discovered ones
|
|
1033
|
+
if (!name.startsWith('IFederatedInventory/') && !name.startsWith('IFederatedLogin/')) {
|
|
1034
|
+
componentsMap.set(name, { name });
|
|
1035
|
+
}
|
|
1032
1036
|
}
|
|
1033
1037
|
});
|
|
1034
1038
|
}
|
|
1035
|
-
// Add discovered components (will overwrite existing if same name)
|
|
1039
|
+
// Add discovered components (will overwrite existing if same name, and replace all federated components)
|
|
1036
1040
|
(discoveredComponents || []).forEach(compName => {
|
|
1037
1041
|
componentsMap.set(compName, { name: compName });
|
|
1038
1042
|
});
|