@softarc/native-federation-orchestrator 4.3.1 → 4.4.0

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/README.md CHANGED
@@ -70,7 +70,7 @@ Get up and running in under 2 minutes:
70
70
  </script>
71
71
 
72
72
  <!-- Include the orchestrator runtime -->
73
- <script src="https://unpkg.com/@softarc/native-federation-orchestrator@4.3.1/quickstart.mjs"></script>
73
+ <script src="https://unpkg.com/@softarc/native-federation-orchestrator@4.4.0/quickstart.mjs"></script>
74
74
  </head>
75
75
  <body>
76
76
  <!-- Use your loaded components -->
@@ -88,7 +88,7 @@ Your micro frontends are now loaded and ready to use. The runtime handles the wh
88
88
 
89
89
  ```html
90
90
  <!-- Development and quick testing -->
91
- <script src="https://unpkg.com/@softarc/native-federation-orchestrator@4.3.1/quickstart.mjs"></script>
91
+ <script src="https://unpkg.com/@softarc/native-federation-orchestrator@4.4.0/quickstart.mjs"></script>
92
92
  ```
93
93
 
94
94
  ## Advanced Usage
@@ -132,6 +132,7 @@ const HeaderComponent = await loadRemoteModule('team/mfe2', './Header');
132
132
  | [📡 Event Registry](https://github.com/native-federation/orchestrator/blob/main/docs/event-registry.md) | In-page event bus for cross-MFE communication |
133
133
  | [🔄 Version Resolution](https://github.com/native-federation/orchestrator/blob/main/docs/version-resolver.md) | How dependency conflicts are resolved |
134
134
  | [🔒 Security & Trusted Types](https://github.com/native-federation/orchestrator/blob/main/docs/security.md) | CSP setup and the built-in Trusted Types policy |
135
+ | [🌉 Module Federation](https://github.com/native-federation/orchestrator/blob/main/docs/module-federation.md) | Share singletons with webpack Module Federation |
135
136
 
136
137
  ## Example repositories
137
138
 
@@ -1283,7 +1283,7 @@ var createInitFlow = ({
1283
1283
  adapters,
1284
1284
  config
1285
1285
  }) => {
1286
- return (remotesOrManifestUrl) => flow.getRemoteEntries(remotesOrManifestUrl).then(flow.processRemoteEntries).then(flow.determineSharedExternals).then(flow.generateImportMap).then(flow.commitChanges).then(flow.exposeModuleLoader).then((loadRemoteModule) => ({
1286
+ return (remotesOrManifestUrl) => flow.getRemoteEntries(remotesOrManifestUrl).then(flow.processRemoteEntries).then(flow.determineSharedExternals).then(flow.generateImportMap).then((importMap) => flow.commitChanges(importMap, { override: true })).then(flow.exposeModuleLoader).then((loadRemoteModule) => ({
1287
1287
  config,
1288
1288
  adapters,
1289
1289
  loadRemoteModule
@@ -1643,7 +1643,7 @@ function createDetermineSharedExternals(config, ports) {
1643
1643
  }
1644
1644
  }
1645
1645
 
1646
- // node_modules/.pnpm/@softarc+native-federation@4.2.0_typescript@6.0.3/node_modules/@softarc/native-federation/dist/lib/domain/core/build-notification-options.contract.js
1646
+ // node_modules/.pnpm/@softarc+native-federation@4.2.1_typescript@6.0.3/node_modules/@softarc/native-federation/dist/lib/domain/core/build-notification-options.contract.js
1647
1647
  var BuildNotificationType = /* @__PURE__ */ ((BuildNotificationType2) => {
1648
1648
  BuildNotificationType2["COMPLETED"] = "federation-rebuild-complete";
1649
1649
  BuildNotificationType2["ERROR"] = "federation-rebuild-error";
@@ -1651,7 +1651,7 @@ var BuildNotificationType = /* @__PURE__ */ ((BuildNotificationType2) => {
1651
1651
  return BuildNotificationType2;
1652
1652
  })(BuildNotificationType || {});
1653
1653
 
1654
- // node_modules/.pnpm/@softarc+native-federation@4.2.0_typescript@6.0.3/node_modules/@softarc/native-federation/dist/lib/domain/core/chunk.js
1654
+ // node_modules/.pnpm/@softarc+native-federation@4.2.1_typescript@6.0.3/node_modules/@softarc/native-federation/dist/lib/domain/core/chunk.js
1655
1655
  var CHUNK_PREFIX = "@nf-internal";
1656
1656
  function toChunkImport(fileName) {
1657
1657
  if (fileName.startsWith("./")) {
@@ -1902,9 +1902,9 @@ function createGenerateImportMap(config, ports) {
1902
1902
 
1903
1903
  // src/lib/core/2.app/steps/commit-changes.ts
1904
1904
  function createCommitChanges(config, ports) {
1905
- return (importMap) => Promise.resolve(importMap).then(addToBrowser).then(persistRepositoryChanges);
1906
- function addToBrowser(importMap) {
1907
- ports.browser.setImportMapFn(importMap);
1905
+ return (importMap, opts = {}) => Promise.resolve(importMap).then((map) => addToBrowser(map, opts)).then(persistRepositoryChanges);
1906
+ function addToBrowser(importMap, opts) {
1907
+ ports.browser.setImportMapFn(importMap, opts);
1908
1908
  config.log.debug(5, "Added import map to browser.", importMap);
1909
1909
  return importMap;
1910
1910
  }