@softarc/native-federation-orchestrator 4.0.0-RC1
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/LICENSE.md +9 -0
- package/README.md +142 -0
- package/fesm2022/@softarc/native-federation-orchestrator.mjs +2539 -0
- package/fesm2022/@softarc/native-federation-orchestrator.mjs.map +7 -0
- package/fesm2022/audit.mjs +67 -0
- package/fesm2022/audit.mjs.map +7 -0
- package/fesm2022/options.mjs +173 -0
- package/fesm2022/options.mjs.map +7 -0
- package/fesm2022/registry.mjs +110 -0
- package/fesm2022/registry.mjs.map +7 -0
- package/fesm2022/sdk.mjs +99 -0
- package/fesm2022/sdk.mjs.map +7 -0
- package/init-registry.mjs +1 -0
- package/package.json +58 -0
- package/quickstart.mjs +18 -0
- package/types/init-registry.d.ts +6 -0
- package/types/lib/1.domain/externals/external.contract.d.ts +14 -0
- package/types/lib/1.domain/externals/version.contract.d.ts +21 -0
- package/types/lib/1.domain/import-map/import-map.contract.d.ts +7 -0
- package/types/lib/1.domain/index.d.ts +7 -0
- package/types/lib/1.domain/registry/event-registry.contract.d.ts +8 -0
- package/types/lib/1.domain/registry/event.contract.d.ts +15 -0
- package/types/lib/1.domain/registry/index.d.ts +3 -0
- package/types/lib/1.domain/registry/registry-options.contract.d.ts +11 -0
- package/types/lib/1.domain/remote/remote-info.contract.d.ts +8 -0
- package/types/lib/1.domain/remote/remote-module.contract.d.ts +4 -0
- package/types/lib/1.domain/remote-entry/manifest.contract.d.ts +3 -0
- package/types/lib/1.domain/remote-entry/remote-entry.contract.d.ts +30 -0
- package/types/lib/2.app/config/config.contract.d.ts +7 -0
- package/types/lib/2.app/config/host.contract.d.ts +14 -0
- package/types/lib/2.app/config/import-map.contract.d.ts +9 -0
- package/types/lib/2.app/config/index.d.ts +6 -0
- package/types/lib/2.app/config/log.contract.d.ts +21 -0
- package/types/lib/2.app/config/mode.contract.d.ts +19 -0
- package/types/lib/2.app/config/registry.contract.d.ts +6 -0
- package/types/lib/2.app/config/storage.contract.d.ts +18 -0
- package/types/lib/2.app/driver-ports/audit/for-auditing-externals.port.d.ts +2 -0
- package/types/lib/2.app/driver-ports/audit/index.d.ts +1 -0
- package/types/lib/2.app/driver-ports/dynamic-init/drivers.contract.d.ts +13 -0
- package/types/lib/2.app/driver-ports/dynamic-init/flow.contract.d.ts +4 -0
- package/types/lib/2.app/driver-ports/dynamic-init/for-converting-to-import-map.d.ts +6 -0
- package/types/lib/2.app/driver-ports/dynamic-init/for-getting-remote-entry.port.d.ts +3 -0
- package/types/lib/2.app/driver-ports/dynamic-init/for-updating-cache.d.ts +5 -0
- package/types/lib/2.app/driver-ports/dynamic-init/index.d.ts +5 -0
- package/types/lib/2.app/driver-ports/flow-factory.contract.d.ts +7 -0
- package/types/lib/2.app/driver-ports/init/drivers.contract.d.ts +17 -0
- package/types/lib/2.app/driver-ports/init/flow.contract.d.ts +6 -0
- package/types/lib/2.app/driver-ports/init/for-committing-changes.port.d.ts +2 -0
- package/types/lib/2.app/driver-ports/init/for-determining-shared-externals.port.d.ts +1 -0
- package/types/lib/2.app/driver-ports/init/for-exposing-module-loader.port.d.ts +2 -0
- package/types/lib/2.app/driver-ports/init/for-generating-import-map.d.ts +2 -0
- package/types/lib/2.app/driver-ports/init/for-getting-remote-entries.port.d.ts +3 -0
- package/types/lib/2.app/driver-ports/init/for-processing-remote-entries.port.d.ts +2 -0
- package/types/lib/2.app/driver-ports/init/index.d.ts +8 -0
- package/types/lib/2.app/driver-ports/registry/for-managing-events.port.d.ts +2 -0
- package/types/lib/2.app/driving-ports/driving.contract.d.ts +16 -0
- package/types/lib/2.app/driving-ports/for-browser-tasks.d.ts +7 -0
- package/types/lib/2.app/driving-ports/for-providing-manifest.port.d.ts +4 -0
- package/types/lib/2.app/driving-ports/for-providing-remote-entries.port.d.ts +4 -0
- package/types/lib/2.app/driving-ports/for-remote-info-storage.port.d.ts +11 -0
- package/types/lib/2.app/driving-ports/for-scoped-externals-storage.port.d.ts +9 -0
- package/types/lib/2.app/driving-ports/for-shared-externals-storage.port.d.ts +13 -0
- package/types/lib/2.app/driving-ports/for-version-checking.port.d.ts +6 -0
- package/types/lib/2.app/driving-ports/index.d.ts +8 -0
- package/types/lib/2.app/flows/audit/externals-audit.d.ts +4 -0
- package/types/lib/2.app/flows/dynamic-init/convert-to-import-map.d.ts +3 -0
- package/types/lib/2.app/flows/dynamic-init/get-remote-entry.d.ts +5 -0
- package/types/lib/2.app/flows/dynamic-init/update-cache.d.ts +5 -0
- package/types/lib/2.app/flows/init/commit-changes.d.ts +4 -0
- package/types/lib/2.app/flows/init/determine-shared-externals.d.ts +5 -0
- package/types/lib/2.app/flows/init/expose-module-loader.d.ts +4 -0
- package/types/lib/2.app/flows/init/generate-import-map.d.ts +5 -0
- package/types/lib/2.app/flows/init/get-remote-entries.d.ts +6 -0
- package/types/lib/2.app/flows/init/process-remote-entries.d.ts +5 -0
- package/types/lib/2.app/flows/registry/setup-registry.d.ts +3 -0
- package/types/lib/3.adapters/browser/browser.d.ts +4 -0
- package/types/lib/3.adapters/checks/version.check.d.ts +3 -0
- package/types/lib/3.adapters/http/manifest-provider.d.ts +3 -0
- package/types/lib/3.adapters/http/remote-entry-provider.d.ts +3 -0
- package/types/lib/3.adapters/storage/remote-info.repository.d.ts +4 -0
- package/types/lib/3.adapters/storage/scoped-externals.repository.d.ts +4 -0
- package/types/lib/3.adapters/storage/shared-externals.repository.d.ts +4 -0
- package/types/lib/4.config/host/host.config.d.ts +2 -0
- package/types/lib/4.config/import-map/import-map.config.d.ts +2 -0
- package/types/lib/4.config/import-map/index.d.ts +3 -0
- package/types/lib/4.config/import-map/replace-in-dom.d.ts +2 -0
- package/types/lib/4.config/import-map/use-default.d.ts +3 -0
- package/types/lib/4.config/import-map/use-import-shim.d.ts +5 -0
- package/types/lib/4.config/logging/console.logger.d.ts +3 -0
- package/types/lib/4.config/logging/index.d.ts +2 -0
- package/types/lib/4.config/logging/log.config.d.ts +2 -0
- package/types/lib/4.config/logging/log.handler.d.ts +3 -0
- package/types/lib/4.config/logging/noop.logger.d.ts +3 -0
- package/types/lib/4.config/mode/caching.profile.d.ts +2 -0
- package/types/lib/4.config/mode/default.profile.d.ts +2 -0
- package/types/lib/4.config/mode/index.d.ts +2 -0
- package/types/lib/4.config/mode/mode.config.d.ts +2 -0
- package/types/lib/4.config/storage/global-this.storage.d.ts +3 -0
- package/types/lib/4.config/storage/index.d.ts +3 -0
- package/types/lib/4.config/storage/local.storage.d.ts +3 -0
- package/types/lib/4.config/storage/session.storage.d.ts +3 -0
- package/types/lib/4.config/storage/storage.config.d.ts +2 -0
- package/types/lib/5.di/config.factory.d.ts +2 -0
- package/types/lib/5.di/driving.factory.d.ts +6 -0
- package/types/lib/5.di/flows/dynamic-init.factory.d.ts +14 -0
- package/types/lib/5.di/flows/init.factory.d.ts +14 -0
- package/types/lib/6.mocks/handlers/log.handler.d.ts +2 -0
- package/types/lib/audit.index.d.ts +2 -0
- package/types/lib/index.d.ts +7 -0
- package/types/lib/init-federation.contract.d.ts +15 -0
- package/types/lib/init-federation.d.ts +4 -0
- package/types/lib/native-federation.error.d.ts +4 -0
- package/types/lib/options.index.d.ts +5 -0
- package/types/lib/registry.index.d.ts +4 -0
- package/types/lib/sdk.index.d.ts +8 -0
- package/types/lib/utils/clone-entry.d.ts +4 -0
- package/types/lib/utils/optional.d.ts +13 -0
- package/types/lib/utils/path.d.ts +3 -0
- package/types/quickstart.d.ts +1 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RemoteEntry } from '../../../1.domain/remote-entry/remote-entry.contract';
|
|
2
|
+
import type { Manifest } from '../../../1.domain/remote-entry/manifest.contract';
|
|
3
|
+
export type ForGettingRemoteEntries = (remotesOrManifestUrl: string | Manifest) => Promise<RemoteEntry[]>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './for-getting-remote-entries.port';
|
|
2
|
+
export * from './for-processing-remote-entries.port';
|
|
3
|
+
export * from './for-determining-shared-externals.port';
|
|
4
|
+
export * from './for-generating-import-map';
|
|
5
|
+
export * from './for-committing-changes.port';
|
|
6
|
+
export * from './for-exposing-module-loader.port';
|
|
7
|
+
export * from './flow.contract';
|
|
8
|
+
export * from './drivers.contract';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ForVersionChecking } from './for-version-checking.port';
|
|
2
|
+
import type { ForBrowserTasks } from './for-browser-tasks';
|
|
3
|
+
import type { ForProvidingManifest } from './for-providing-manifest.port';
|
|
4
|
+
import type { ForProvidingRemoteEntries } from './for-providing-remote-entries.port';
|
|
5
|
+
import type { ForRemoteInfoStorage } from './for-remote-info-storage.port';
|
|
6
|
+
import type { ForScopedExternalsStorage } from './for-scoped-externals-storage.port';
|
|
7
|
+
import type { ForSharedExternalsStorage } from './for-shared-externals-storage.port';
|
|
8
|
+
export type DrivingContract = {
|
|
9
|
+
versionCheck: ForVersionChecking;
|
|
10
|
+
manifestProvider: ForProvidingManifest;
|
|
11
|
+
remoteEntryProvider: ForProvidingRemoteEntries;
|
|
12
|
+
remoteInfoRepo: ForRemoteInfoStorage;
|
|
13
|
+
scopedExternalsRepo: ForScopedExternalsStorage;
|
|
14
|
+
sharedExternalsRepo: ForSharedExternalsStorage;
|
|
15
|
+
browser: ForBrowserTasks;
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ImportMap } from '../../1.domain/import-map/import-map.contract';
|
|
2
|
+
export type ForBrowserTasks = {
|
|
3
|
+
setImportMapFn: (importMap: ImportMap, opt?: {
|
|
4
|
+
override?: boolean;
|
|
5
|
+
}) => Promise<ImportMap>;
|
|
6
|
+
importModule: (url: string) => Promise<unknown>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RemoteInfo, RemoteName, Remotes } from '../../1.domain/remote/remote-info.contract';
|
|
2
|
+
import type { Optional } from '../../utils/optional';
|
|
3
|
+
export type ForRemoteInfoStorage = {
|
|
4
|
+
contains: (remoteName: RemoteName) => boolean;
|
|
5
|
+
tryGet: (remoteName: RemoteName) => Optional<RemoteInfo>;
|
|
6
|
+
remove: (remoteName: RemoteName) => ForRemoteInfoStorage;
|
|
7
|
+
tryGetModule: (remoteName: RemoteName, exposedModule: string) => Optional<string>;
|
|
8
|
+
addOrUpdate: (remoteName: string, remote: RemoteInfo) => ForRemoteInfoStorage;
|
|
9
|
+
getAll: () => Remotes;
|
|
10
|
+
commit: () => ForRemoteInfoStorage;
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RemoteName, ScopedExternal, ScopedExternals, ScopedVersion } from '../../1.domain';
|
|
2
|
+
import type { Optional } from '../../utils/optional';
|
|
3
|
+
export type ForScopedExternalsStorage = {
|
|
4
|
+
addExternal: (remoteName: RemoteName, external: string, version: ScopedVersion) => ForScopedExternalsStorage;
|
|
5
|
+
remove: (remoteName: RemoteName) => ForScopedExternalsStorage;
|
|
6
|
+
tryGet: (remoteName: string) => Optional<ScopedExternal>;
|
|
7
|
+
getAll: () => ScopedExternals;
|
|
8
|
+
commit: () => ForScopedExternalsStorage;
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RemoteName, SharedExternal, shareScope } from '../../1.domain';
|
|
2
|
+
import type { Optional } from '../../utils/optional';
|
|
3
|
+
export type ForSharedExternalsStorage = {
|
|
4
|
+
tryGet: (external: string, shareScope?: string) => Optional<SharedExternal>;
|
|
5
|
+
getFromScope: (shareScope?: string) => shareScope;
|
|
6
|
+
getScopes: (o?: {
|
|
7
|
+
includeGlobal: boolean;
|
|
8
|
+
}) => string[];
|
|
9
|
+
scopeType: (shareScope?: string) => 'global' | 'strict' | 'shareScope';
|
|
10
|
+
removeFromAllScopes: (remoteName: RemoteName) => void;
|
|
11
|
+
addOrUpdate: (name: string, external: SharedExternal, shareScope?: string) => ForSharedExternalsStorage;
|
|
12
|
+
commit: () => ForSharedExternalsStorage;
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './for-version-checking.port';
|
|
2
|
+
export * from './for-browser-tasks';
|
|
3
|
+
export * from './for-providing-manifest.port';
|
|
4
|
+
export * from './for-providing-remote-entries.port';
|
|
5
|
+
export * from './for-remote-info-storage.port';
|
|
6
|
+
export * from './for-scoped-externals-storage.port';
|
|
7
|
+
export * from './for-shared-externals-storage.port';
|
|
8
|
+
export * from './driving.contract';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LoggingConfig, ModeConfig } from '../../config';
|
|
2
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
3
|
+
import type { ForAuditingExternals } from '../../driver-ports/audit/for-auditing-externals.port';
|
|
4
|
+
export declare function createExternalsAudit(config: LoggingConfig & ModeConfig, ports: Pick<DrivingContract, 'versionCheck' | 'sharedExternalsRepo' | 'scopedExternalsRepo'>): ForAuditingExternals;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { LoggingConfig } from '../../config/log.contract';
|
|
2
|
+
import type { ForConvertingToImportMap } from '../../driver-ports/dynamic-init/for-converting-to-import-map';
|
|
3
|
+
export declare function createConvertToImportMap({ log }: LoggingConfig): ForConvertingToImportMap;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
2
|
+
import type { LoggingConfig } from '../../config/log.contract';
|
|
3
|
+
import type { ModeConfig } from '../../config/mode.contract';
|
|
4
|
+
import type { ForGettingRemoteEntry } from '../../driver-ports/dynamic-init/for-getting-remote-entry.port';
|
|
5
|
+
export declare function createGetRemoteEntry(config: LoggingConfig & ModeConfig, ports: Pick<DrivingContract, 'remoteEntryProvider' | 'remoteInfoRepo'>): ForGettingRemoteEntry;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ForUpdatingCache } from '../../driver-ports/dynamic-init/for-updating-cache';
|
|
2
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
3
|
+
import type { LoggingConfig } from '../../config/log.contract';
|
|
4
|
+
import type { ModeConfig } from '../../config/mode.contract';
|
|
5
|
+
export declare function createUpdateCache(config: LoggingConfig & ModeConfig, ports: Pick<DrivingContract, 'remoteInfoRepo' | 'sharedExternalsRepo' | 'scopedExternalsRepo' | 'versionCheck'>): ForUpdatingCache;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
2
|
+
import type { ForCommittingChanges } from '../../driver-ports/init/for-committing-changes.port';
|
|
3
|
+
import type { LoggingConfig } from '../../config';
|
|
4
|
+
export declare function createCommitChanges(config: LoggingConfig, ports: Pick<DrivingContract, 'remoteInfoRepo' | 'scopedExternalsRepo' | 'sharedExternalsRepo' | 'browser'>): ForCommittingChanges;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ForDeterminingSharedExternals } from '../../driver-ports/init/for-determining-shared-externals.port';
|
|
2
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
3
|
+
import type { LoggingConfig } from '../../config/log.contract';
|
|
4
|
+
import type { ModeConfig } from '../../config/mode.contract';
|
|
5
|
+
export declare function createDetermineSharedExternals(config: LoggingConfig & ModeConfig, ports: Pick<DrivingContract, 'versionCheck' | 'sharedExternalsRepo'>): ForDeterminingSharedExternals;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
2
|
+
import type { ForExposingModuleLoader } from '../../driver-ports/init/for-exposing-module-loader.port';
|
|
3
|
+
import type { LoggingConfig } from '../../config/log.contract';
|
|
4
|
+
export declare function createExposeModuleLoader(config: LoggingConfig, ports: Pick<DrivingContract, 'remoteInfoRepo' | 'browser'>): ForExposingModuleLoader;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ForGeneratingImportMap } from '../../driver-ports/init/for-generating-import-map';
|
|
2
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
3
|
+
import type { LoggingConfig } from '../../config/log.contract';
|
|
4
|
+
import type { ModeConfig } from '../../config/mode.contract';
|
|
5
|
+
export declare function createGenerateImportMap(config: LoggingConfig & ModeConfig, ports: Pick<DrivingContract, 'remoteInfoRepo' | 'scopedExternalsRepo' | 'sharedExternalsRepo'>): ForGeneratingImportMap;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ForGettingRemoteEntries } from '../../driver-ports/init/for-getting-remote-entries.port';
|
|
2
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
3
|
+
import type { LoggingConfig } from '../../config/log.contract';
|
|
4
|
+
import type { ModeConfig } from '../../config/mode.contract';
|
|
5
|
+
import type { HostConfig } from '../../config/host.contract';
|
|
6
|
+
export declare function createGetRemoteEntries(config: LoggingConfig & ModeConfig & HostConfig, ports: Pick<DrivingContract, 'remoteEntryProvider' | 'manifestProvider' | 'remoteInfoRepo'>): ForGettingRemoteEntries;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ForProcessingRemoteEntries } from '../../driver-ports/init/for-processing-remote-entries.port';
|
|
2
|
+
import type { DrivingContract } from '../../driving-ports/driving.contract';
|
|
3
|
+
import type { LoggingConfig } from '../../config/log.contract';
|
|
4
|
+
import type { ModeConfig } from '../../config/mode.contract';
|
|
5
|
+
export declare function createProcessRemoteEntries(config: LoggingConfig & ModeConfig, ports: Pick<DrivingContract, 'remoteInfoRepo' | 'sharedExternalsRepo' | 'scopedExternalsRepo' | 'versionCheck'>): ForProcessingRemoteEntries;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StorageConfig } from '../../2.app/config/storage.contract';
|
|
2
|
+
import type { ForRemoteInfoStorage } from '../../2.app/driving-ports/for-remote-info-storage.port';
|
|
3
|
+
declare const createRemoteInfoRepository: (config: StorageConfig) => ForRemoteInfoStorage;
|
|
4
|
+
export { createRemoteInfoRepository };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StorageConfig } from '../../2.app/config/storage.contract';
|
|
2
|
+
import type { ForScopedExternalsStorage } from '../../2.app/driving-ports/for-scoped-externals-storage.port';
|
|
3
|
+
declare const createScopedExternalsRepository: (config: StorageConfig) => ForScopedExternalsStorage;
|
|
4
|
+
export { createScopedExternalsRepository };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StorageConfig } from '../../2.app/config/storage.contract';
|
|
2
|
+
import type { ForSharedExternalsStorage } from '../../2.app/driving-ports/for-shared-externals-storage.port';
|
|
3
|
+
declare const createSharedExternalsRepository: (config: StorageConfig) => ForSharedExternalsStorage;
|
|
4
|
+
export { createSharedExternalsRepository };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DrivingContract } from '../2.app/driving-ports/driving.contract';
|
|
2
|
+
import type { ConfigContract } from '../2.app/config/config.contract';
|
|
3
|
+
export declare const createDriving: (config: ConfigContract) => {
|
|
4
|
+
adapters: DrivingContract;
|
|
5
|
+
config: ConfigContract;
|
|
6
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DynamicInitFlow } from '../../2.app/driver-ports/dynamic-init/flow.contract';
|
|
2
|
+
import type { FLOW_FACTORY } from '../../2.app/driver-ports/flow-factory.contract';
|
|
3
|
+
import type { DynamicInitDriversContract } from '../../audit.index';
|
|
4
|
+
import type { DrivingContract } from '../../2.app/driving-ports/driving.contract';
|
|
5
|
+
import type { ConfigContract } from '../../2.app/config/config.contract';
|
|
6
|
+
export declare const createDynamicInitDrivers: ({ config, adapters, }: {
|
|
7
|
+
config: ConfigContract;
|
|
8
|
+
adapters: DrivingContract;
|
|
9
|
+
}) => DynamicInitDriversContract;
|
|
10
|
+
export declare const DYNAMIC_INIT_FLOW_FACTORY: ({ config, adapters, }: {
|
|
11
|
+
config: ConfigContract;
|
|
12
|
+
adapters: DrivingContract;
|
|
13
|
+
}) => FLOW_FACTORY<DynamicInitDriversContract>;
|
|
14
|
+
export declare const createDynamicInitFlow: ({ flow, adapters, config, }: FLOW_FACTORY<DynamicInitDriversContract>) => DynamicInitFlow;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FLOW_FACTORY } from '../../2.app/driver-ports/flow-factory.contract';
|
|
2
|
+
import type { InitDriversContract } from '../../2.app/driver-ports/init/drivers.contract';
|
|
3
|
+
import type { InitFlow } from '../../2.app/driver-ports/init/flow.contract';
|
|
4
|
+
import type { DrivingContract } from '../../2.app/driving-ports/driving.contract';
|
|
5
|
+
import type { ConfigContract } from '../../2.app/config/config.contract';
|
|
6
|
+
export declare const createInitDrivers: ({ config, adapters, }: {
|
|
7
|
+
config: ConfigContract;
|
|
8
|
+
adapters: DrivingContract;
|
|
9
|
+
}) => InitDriversContract;
|
|
10
|
+
export declare const INIT_FLOW_FACTORY: ({ config, adapters, }: {
|
|
11
|
+
config: ConfigContract;
|
|
12
|
+
adapters: DrivingContract;
|
|
13
|
+
}) => FLOW_FACTORY<InitDriversContract>;
|
|
14
|
+
export declare const createInitFlow: ({ flow, adapters, config, }: FLOW_FACTORY<InitDriversContract>) => InitFlow;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { initFederation } from './init-federation';
|
|
2
|
+
export { NFError } from './native-federation.error';
|
|
3
|
+
export { LoadRemoteModule, NativeFederationResult } from './init-federation.contract';
|
|
4
|
+
export { createConfigHandlers } from './5.di/config.factory';
|
|
5
|
+
export { createDriving } from './5.di/driving.factory';
|
|
6
|
+
export { createDynamicInitDrivers, DYNAMIC_INIT_FLOW_FACTORY, createDynamicInitFlow, } from './5.di/flows/dynamic-init.factory';
|
|
7
|
+
export { createInitDrivers, INIT_FLOW_FACTORY, createInitFlow } from './5.di/flows/init.factory';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ConfigContract } from './2.app/config/config.contract';
|
|
2
|
+
import type { DrivingContract } from './2.app/driving-ports/driving.contract';
|
|
3
|
+
import type { DynamicInitResult } from './2.app/driver-ports/dynamic-init/flow.contract';
|
|
4
|
+
export type LoadRemoteModule<TModule = unknown> = (remoteName: string, exposedModule: string) => Promise<TModule>;
|
|
5
|
+
export type NativeFederationResult = DynamicInitResult<{
|
|
6
|
+
config: ConfigContract;
|
|
7
|
+
adapters: DrivingContract;
|
|
8
|
+
loadRemoteModule: LoadRemoteModule;
|
|
9
|
+
remote: <TModule = unknown>(remoteName: string) => {
|
|
10
|
+
loadModule: (exposedModule: string) => Promise<TModule>;
|
|
11
|
+
};
|
|
12
|
+
as: <TModule = unknown>() => {
|
|
13
|
+
loadRemoteModule: LoadRemoteModule<TModule>;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NativeFederationResult } from './init-federation.contract';
|
|
2
|
+
import type { NFOptions } from './2.app/config/config.contract';
|
|
3
|
+
declare const initFederation: (remotesOrManifestUrl: string | Record<string, string>, options?: NFOptions) => Promise<NativeFederationResult>;
|
|
4
|
+
export { initFederation };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './1.domain/registry';
|
|
2
|
+
export { NFEventRegistryConfig, NFEventRegistryOptions } from './2.app/config/registry.contract';
|
|
3
|
+
export { ForManagingEvents } from './2.app/driver-ports/registry/for-managing-events.port';
|
|
4
|
+
export { createRegistry } from './2.app/flows/registry/setup-registry';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './1.domain';
|
|
2
|
+
export * from './2.app/driving-ports';
|
|
3
|
+
export * from './2.app/driver-ports/init';
|
|
4
|
+
export * from './2.app/driver-ports/dynamic-init';
|
|
5
|
+
export { FLOW_FACTORY } from './2.app/driver-ports/flow-factory.contract';
|
|
6
|
+
export { Optional } from './utils/optional';
|
|
7
|
+
export * as _path from './utils/path';
|
|
8
|
+
export { cloneEntry } from './utils/clone-entry';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class Optional<T> {
|
|
2
|
+
private item?;
|
|
3
|
+
private constructor();
|
|
4
|
+
static of<T>(item?: T): Optional<T>;
|
|
5
|
+
static empty<U>(): Optional<U>;
|
|
6
|
+
isPresent(): boolean;
|
|
7
|
+
set<U>(other: U): Optional<U>;
|
|
8
|
+
ifPresent(callback: (_: T) => void): void;
|
|
9
|
+
map<U>(callback: (_: NonNullable<T>) => U | Optional<U>): Optional<U>;
|
|
10
|
+
orElse(other: Required<T>): NonNullable<T>;
|
|
11
|
+
orThrow(error: Error | string | (() => Error)): NonNullable<T>;
|
|
12
|
+
get(): T | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'es-module-shims';
|