@softarc/native-federation-orchestrator 4.0.2 → 4.1.1
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 +9 -8
- package/fesm2022/@softarc/native-federation-orchestrator.mjs +238 -79
- package/fesm2022/@softarc/native-federation-orchestrator.mjs.map +4 -4
- package/fesm2022/options.mjs +79 -11
- package/fesm2022/options.mjs.map +3 -3
- package/package.json +1 -1
- package/quickstart.mjs +13 -13
- package/types/lib/1.domain/import-map/import-map.contract.d.ts +3 -1
- package/types/lib/1.domain/remote/remote-info.contract.d.ts +2 -0
- package/types/lib/1.domain/remote-entry/manifest.contract.d.ts +5 -1
- package/types/lib/2.app/config/host.contract.d.ts +4 -0
- package/types/lib/2.app/config/import-map.contract.d.ts +12 -1
- package/types/lib/2.app/driver-ports/dynamic-init/flow.contract.d.ts +6 -2
- package/types/lib/2.app/driver-ports/dynamic-init/for-getting-remote-entry.port.d.ts +2 -1
- package/types/lib/2.app/driver-ports/init/flow.contract.d.ts +2 -2
- package/types/lib/2.app/driver-ports/init/for-getting-remote-entries.port.d.ts +2 -2
- package/types/lib/2.app/driving-ports/for-providing-manifest.port.d.ts +4 -2
- package/types/lib/2.app/driving-ports/for-providing-remote-entries.port.d.ts +3 -1
- package/types/lib/4.config/import-map/replace-in-dom.d.ts +1 -1
- package/types/lib/4.config/import-map/trusted-types.d.ts +6 -0
- package/types/lib/4.config/import-map/use-default.d.ts +1 -1
- package/types/lib/4.config/import-map/use-import-shim.d.ts +1 -1
- package/types/lib/index.d.ts +1 -0
- package/types/lib/init-federation.d.ts +2 -1
- package/types/lib/utils/integrity.d.ts +1 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
export type RemoteRef = string | {
|
|
2
|
+
name?: string;
|
|
3
|
+
integrity?: string;
|
|
4
|
+
};
|
|
1
5
|
export type DynamicInitResult<TFederationResult = {}> = TFederationResult & {
|
|
2
|
-
initRemoteEntry: (remoteEntryUrl: string,
|
|
6
|
+
initRemoteEntry: (remoteEntryUrl: string, remote?: RemoteRef) => Promise<DynamicInitResult<TFederationResult>>;
|
|
3
7
|
};
|
|
4
|
-
export type DynamicInitFlow = (remoteEntryUrl: string,
|
|
8
|
+
export type DynamicInitFlow = (remoteEntryUrl: string, remote?: RemoteRef) => Promise<DynamicInitResult>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { RemoteEntry } from '../../../1.domain/remote-entry/remote-entry.contract';
|
|
2
2
|
import type { Optional } from '../../../utils/optional';
|
|
3
|
-
|
|
3
|
+
import type { RemoteRef } from './flow.contract';
|
|
4
|
+
export type ForGettingRemoteEntry = (remoteEntryUrl: string, remote?: RemoteRef) => Promise<Optional<RemoteEntry>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FederationManifest } from '../../../1.domain';
|
|
2
2
|
import type { LoadRemoteModule } from '../../../init-federation.contract';
|
|
3
3
|
export type InitResult = {
|
|
4
4
|
loadRemoteModule: LoadRemoteModule;
|
|
5
5
|
};
|
|
6
|
-
export type InitFlow = (remotesOrManifestUrl: string |
|
|
6
|
+
export type InitFlow = (remotesOrManifestUrl: string | FederationManifest) => Promise<InitResult>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RemoteEntry } from '../../../1.domain/remote-entry/remote-entry.contract';
|
|
2
|
-
import type {
|
|
3
|
-
export type ForGettingRemoteEntries = (remotesOrManifestUrl: string |
|
|
2
|
+
import type { FederationManifest } from '../../../1.domain/remote-entry/manifest.contract';
|
|
3
|
+
export type ForGettingRemoteEntries = (remotesOrManifestUrl: string | FederationManifest) => Promise<RemoteEntry[]>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FederationManifest } from '../../1.domain/remote-entry/manifest.contract';
|
|
2
2
|
export type ForProvidingManifest = {
|
|
3
|
-
provide: (remotesOrManifestUrl:
|
|
3
|
+
provide: (remotesOrManifestUrl: FederationManifest | string, opts?: {
|
|
4
|
+
integrity?: string;
|
|
5
|
+
}) => Promise<FederationManifest>;
|
|
4
6
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { RemoteEntry } from '../../1.domain/remote-entry/remote-entry.contract';
|
|
2
2
|
export type ForProvidingRemoteEntries = {
|
|
3
|
-
provide: (remoteEntryUrl: string
|
|
3
|
+
provide: (remoteEntryUrl: string, opts?: {
|
|
4
|
+
integrity?: string;
|
|
5
|
+
}) => Promise<RemoteEntry>;
|
|
4
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SetImportMap } from '../../2.app/config/import-map.contract';
|
|
2
|
-
export declare const replaceInDOM: (mapType: string) => SetImportMap;
|
|
2
|
+
export declare const replaceInDOM: (mapType: string, trustedTypesPolicyName?: string | false) => SetImportMap;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type NFTrustedTypesPolicy = {
|
|
2
|
+
createScript: (input: string) => string;
|
|
3
|
+
createScriptURL: (input: string) => string;
|
|
4
|
+
};
|
|
5
|
+
export declare const getTrustedTypesPolicy: (name?: string | false) => NFTrustedTypesPolicy;
|
|
6
|
+
export declare const __resetTrustedTypesPolicyForTests: () => void;
|
package/types/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { initFederation } from './init-federation';
|
|
2
2
|
export { NFError } from './native-federation.error';
|
|
3
3
|
export { LoadRemoteModule, LoadRemoteModuleOf, NativeFederationResult, } from './init-federation.contract';
|
|
4
|
+
export { FederationManifest } from './1.domain/remote-entry/manifest.contract';
|
|
4
5
|
export { createConfigHandlers } from './5.di/config.factory';
|
|
5
6
|
export { createDriving } from './5.di/driving.factory';
|
|
6
7
|
export { createDynamicInitDrivers, DYNAMIC_INIT_FLOW_FACTORY, createDynamicInitFlow, } from './5.di/flows/dynamic-init.factory';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NativeFederationResult } from './init-federation.contract';
|
|
2
2
|
import type { NFOptions } from './2.app/config/config.contract';
|
|
3
|
-
|
|
3
|
+
import type { FederationManifest } from './1.domain';
|
|
4
|
+
declare const initFederation: (remotesOrManifestUrl: string | FederationManifest, options?: NFOptions) => Promise<NativeFederationResult>;
|
|
4
5
|
export { initFederation };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const verifyIntegrity: (bytes: ArrayBuffer, integrity: string) => Promise<void>;
|