Skip to content

Commit

Permalink
fix: drop support for legacy manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-pribilinskiy committed Aug 18, 2023
1 parent 0993d39 commit 4f17ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 0 additions & 8 deletions src/helpers/downloadTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ export async function downloadRemoteEntryURLsFromManifests(remoteManifestUrls?:
const logger = getLogger();
const remoteEntryURLs: RemoteEntryUrls = {};

/** @deprecated Temporary support */
let urlMfdCommonManifest = '';

logger.log('Remote manifest URLs', remoteManifestUrls);

const { artifactsBaseUrl, ...manifestUrls } = remoteManifestUrls;
Expand All @@ -93,7 +90,6 @@ export async function downloadRemoteEntryURLsFromManifests(remoteManifestUrls?:
if (remoteName === 'registry') {
const remotesManifest = remoteManifests[index];
if (Array.isArray(remotesManifest)) {
urlMfdCommonManifest = manifestUrls[remoteName].replace('remote-entries', 'mfd-common-remote-entry');
(remoteManifests[index] as RemotesRegistryManifest).forEach((remoteManifest) => {
remoteEntryURLs[remoteManifest.scope] = remoteManifest.url;
});
Expand All @@ -107,10 +103,6 @@ export async function downloadRemoteEntryURLsFromManifests(remoteManifestUrls?:
}
});

if (urlMfdCommonManifest) {
remoteEntryURLs.mfdCommon = ((await downloadRemoteEntryManifest(urlMfdCommonManifest)) as RemoteManifest).url;
}

logger.log('Remote entry URLs', remoteEntryURLs);

return remoteEntryURLs;
Expand Down
8 changes: 4 additions & 4 deletions src/plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ describe('ModuleFederationTypesPlugin', () => {

test('remoteManifestUrls setting initiates download of remote entry manifest files on startup', () => {
const moduleFederationPluginOptions = {
name: 'mfdDashboard',
name: 'mfeDashboard',
remotes: {
mfdCommon: `mdfCommon@[mfdCommonUrl]/remoteEntry.js`,
mfdTranslations: 'mfdTranslations@[mfdTranslationsUrl]/remoteEntry.js',
mfeOther: `mfeOther@[mfeOtherUrl]/remoteEntry.js`,
mfeTranslations: 'mfeTranslations@[mfeTranslationsUrl]/remoteEntry.js',
}
};
const typesPluginOptions: ModuleFederationTypesPluginOptions = {
remoteEntryUrls: {
mfeApp: 'https://artifacts.example.com/mfe-app',
},
remoteManifestUrls: {
mfdCommon: 'https://example.com/mfd-common-remote-entries.json',
mfeOther: 'https://example.com/some-mfe-remote-entry.json',
registry: 'https://example.com/remote-entries.json',
}
};
Expand Down

0 comments on commit 4f17ce5

Please sign in to comment.