@softarc/native-federation-orchestrator 4.5.2 → 4.5.3
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 +2 -2
- package/fesm2022/@softarc/native-federation-orchestrator.mjs +315 -99
- package/fesm2022/@softarc/native-federation-orchestrator.mjs.map +4 -4
- package/fesm2022/module-federation.mjs +25 -20
- package/fesm2022/module-federation.mjs.map +2 -2
- package/fesm2022/node.mjs +315 -99
- package/fesm2022/node.mjs.map +3 -3
- package/fesm2022/options.mjs +5 -10
- package/fesm2022/options.mjs.map +2 -2
- package/package.json +2 -2
- package/quickstart.mjs +15 -15
- package/types/lib/core/1.domain/externals/basis.d.ts +7 -0
- package/types/lib/core/1.domain/remote-entry/remote-entry.contract.d.ts +1 -0
- package/types/lib/core/2.app/config/mode.contract.d.ts +1 -0
- package/types/lib/core/2.app/driving-ports/for-shared-externals-storage.port.d.ts +1 -1
- package/types/lib/core/2.app/steps/store-remote-entry.d.ts +15 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SharedVersion, SharedVersionMeta } from './version.contract';
|
|
2
|
+
export declare function isBetterBasis(candidate: SharedVersionMeta, basis: SharedVersionMeta): boolean;
|
|
3
|
+
export declare function addRemoteToVersion(version: SharedVersion, remote: SharedVersionMeta, isHost?: boolean): void;
|
|
4
|
+
export declare function versionDemands(version: SharedVersion): SharedVersionMeta[];
|
|
5
|
+
export declare function findVersionForTag(versions: SharedVersion[], tag: string): SharedVersion | undefined;
|
|
6
|
+
export declare function uncoveredEntrypoints(remote: SharedVersionMeta, basis: Record<string, string>): string[];
|
|
7
|
+
export declare function countUncoveredEntrypoints(remote: SharedVersionMeta, basis: Record<string, string>): number;
|
|
@@ -11,5 +11,6 @@ type RemoteEntry = Omit<FederationInfo, 'shared'> & {
|
|
|
11
11
|
type SharedInfoActions = Record<string, {
|
|
12
12
|
action: SharedVersionAction;
|
|
13
13
|
override?: Record<string, string>;
|
|
14
|
+
covered?: string[];
|
|
14
15
|
}>;
|
|
15
16
|
export { RawRemoteEntry, RemoteEntry, FederationInfo, ExposesInfo, SharedInfo, DenseSharedInfo, SharedInfoActions, };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type ModeProfileConfig = {
|
|
2
2
|
latestSharedExternal: boolean;
|
|
3
3
|
skipInvalidExternalVersions: boolean;
|
|
4
|
+
scopeUncoveredEntrypoints: boolean;
|
|
4
5
|
overrideCachedRemotes: 'always' | 'never' | 'init-only';
|
|
5
6
|
overrideCachedRemotesIfURLMatches: boolean;
|
|
6
7
|
cacheTag?: string;
|
|
@@ -7,7 +7,7 @@ export type ForSharedExternalsStorage = {
|
|
|
7
7
|
includeGlobal: boolean;
|
|
8
8
|
}) => string[];
|
|
9
9
|
scopeType: (shareScope?: string) => 'global' | 'strict' | 'shareScope';
|
|
10
|
-
removeFromAllScopes: (
|
|
10
|
+
removeFromAllScopes: (remoteNames: ReadonlySet<RemoteName>) => void;
|
|
11
11
|
addOrUpdate: (name: string, external: SharedExternal, shareScope?: string) => ForSharedExternalsStorage;
|
|
12
12
|
markPoolTagPresent: () => void;
|
|
13
13
|
hasPoolTag: () => boolean;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { type RemoteEntry, type SharedExternal, type DenseSharedInfo, type SharedVersion, type SharedVersionMeta } from '../../1.domain';
|
|
1
|
+
import { type RemoteEntry, type RemoteName, type SharedExternal, type DenseSharedInfo, type SharedVersion, type SharedVersionMeta } from '../../1.domain';
|
|
2
2
|
import type { DrivingContract } from '../driving-ports/driving.contract';
|
|
3
3
|
import type { LoggingConfig } from '../config/log.contract';
|
|
4
4
|
import type { ModeConfig } from '../config/mode.contract';
|
|
5
5
|
export type StoreRemoteEntry = (remoteEntry: RemoteEntry, onSharedExternal: SharedExternalHandler) => void;
|
|
6
|
+
export type RemoveCachedRemoteEntries = (remoteNames: ReadonlySet<RemoteName>) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Evict overridden remotes before their replacements are merged in. Kept out of `storeRemoteEntry`
|
|
9
|
+
* because `removeFromAllScopes` costs a full traversal of the shared-externals graph: the init
|
|
10
|
+
* pipeline evicts its whole override set at once, the dynamic pipeline passes a single name.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createRemoveCachedRemoteEntries(ports: Pick<DrivingContract, 'remoteInfoRepo' | 'scopedExternalsRepo' | 'sharedExternalsRepo'>): RemoveCachedRemoteEntries;
|
|
6
13
|
export type SharedExternalHandler = (remoteEntry: RemoteEntry, external: DenseSharedInfo, ctx: SharedExternalContext) => void;
|
|
7
14
|
export type SharedExternalContext = {
|
|
8
15
|
tag: string;
|
|
@@ -13,11 +20,12 @@ export type SharedExternalContext = {
|
|
|
13
20
|
commit: () => void;
|
|
14
21
|
};
|
|
15
22
|
/**
|
|
16
|
-
* Not a pipeline step but the template both storage steps specialize: it owns the
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
23
|
+
* Not a pipeline step but the template both storage steps specialize: it owns the merge sequence
|
|
24
|
+
* for a remoteEntry, and only the resolution of a singleton external differs between the init
|
|
25
|
+
* pipeline (process-remote-entries, step 2) and the dynamic pipeline (update-cache, step 8),
|
|
26
|
+
* injected per call. Evicting an overridden remote is the caller's job, see
|
|
27
|
+
* `createRemoveCachedRemoteEntries` — every entry reaching here is merged additively. The
|
|
28
|
+
* pipelines must not be merged, see docs/version-resolver.md "Dynamic Init". If a change ever
|
|
29
|
+
* needs a flag or parameter here to serve only one caller, inline this back into the steps instead.
|
|
22
30
|
*/
|
|
23
31
|
export declare function createStoreRemoteEntry(config: LoggingConfig & ModeConfig, ports: Pick<DrivingContract, 'remoteInfoRepo' | 'scopedExternalsRepo' | 'sharedExternalsRepo' | 'sharedChunksRepo' | 'versionCheck'>, logStep: number): StoreRemoteEntry;
|