-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nf): Use es module shims fully instead of global cache not in sync
- Loading branch information
Showing
8 changed files
with
25 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,11 @@ | ||
import { FederationInfo } from './federation-info'; | ||
import { globalCache } from './global-cache'; | ||
|
||
export type Remote = FederationInfo & { | ||
baseUrl: string; | ||
}; | ||
|
||
const remoteNamesToRemote = globalCache.remoteNamesToRemote; | ||
const baseUrlToRemoteNames = globalCache.baseUrlToRemoteNames; | ||
|
||
export function addRemote(remoteName: string, remote: Remote): void { | ||
remoteNamesToRemote.set(remoteName, remote); | ||
baseUrlToRemoteNames.set(remote.baseUrl, remoteName); | ||
} | ||
|
||
export function getRemoteNameByBaseUrl(baseUrl: string): string | undefined { | ||
return baseUrlToRemoteNames.get(baseUrl); | ||
} | ||
|
||
export function isRemoteInitialized(baseUrl: string): boolean { | ||
return baseUrlToRemoteNames.has(baseUrl); | ||
} | ||
|
||
export function getRemote(remoteName: string): Remote | undefined { | ||
return remoteNamesToRemote.get(remoteName); | ||
} | ||
|
||
export function hasRemote(remoteName: string): boolean { | ||
return remoteNamesToRemote.has(remoteName); | ||
} |
10 changes: 0 additions & 10 deletions
10
libs/native-federation-runtime/src/lib/utils/add-import-map.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters