0a5ab058a6
- Angular 12 application with PrimeNG components - 5 existing Cypress e2e test suites - SCSS styling with BEM naming convention - i18n support (10 languages) - Leaflet map integration - Complete component hierarchy and routing structure This baseline will be used for Angular → React migration.
33 lines
999 B
JavaScript
33 lines
999 B
JavaScript
import { CurrentGlobal } from '@module-federation/runtime-core';
|
|
|
|
// injected by bundler, so it can not use runtime-core stuff
|
|
function getBuilderId() {
|
|
//@ts-ignore
|
|
return typeof FEDERATION_BUILD_IDENTIFIER !== 'undefined'
|
|
? //@ts-ignore
|
|
FEDERATION_BUILD_IDENTIFIER
|
|
: '';
|
|
}
|
|
function getGlobalFederationInstance(name, version) {
|
|
const buildId = getBuilderId();
|
|
return CurrentGlobal.__FEDERATION__.__INSTANCES__.find((GMInstance) => {
|
|
if (buildId && GMInstance.options.id === buildId) {
|
|
return true;
|
|
}
|
|
if (GMInstance.options.name === name &&
|
|
!GMInstance.options.version &&
|
|
!version) {
|
|
return true;
|
|
}
|
|
if (GMInstance.options.name === name &&
|
|
version &&
|
|
GMInstance.options.version === version) {
|
|
return true;
|
|
}
|
|
return false;
|
|
});
|
|
}
|
|
|
|
export { getGlobalFederationInstance as g };
|
|
//# sourceMappingURL=utils.esm.js.map
|