@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.
Files changed (119) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +142 -0
  3. package/fesm2022/@softarc/native-federation-orchestrator.mjs +2539 -0
  4. package/fesm2022/@softarc/native-federation-orchestrator.mjs.map +7 -0
  5. package/fesm2022/audit.mjs +67 -0
  6. package/fesm2022/audit.mjs.map +7 -0
  7. package/fesm2022/options.mjs +173 -0
  8. package/fesm2022/options.mjs.map +7 -0
  9. package/fesm2022/registry.mjs +110 -0
  10. package/fesm2022/registry.mjs.map +7 -0
  11. package/fesm2022/sdk.mjs +99 -0
  12. package/fesm2022/sdk.mjs.map +7 -0
  13. package/init-registry.mjs +1 -0
  14. package/package.json +58 -0
  15. package/quickstart.mjs +18 -0
  16. package/types/init-registry.d.ts +6 -0
  17. package/types/lib/1.domain/externals/external.contract.d.ts +14 -0
  18. package/types/lib/1.domain/externals/version.contract.d.ts +21 -0
  19. package/types/lib/1.domain/import-map/import-map.contract.d.ts +7 -0
  20. package/types/lib/1.domain/index.d.ts +7 -0
  21. package/types/lib/1.domain/registry/event-registry.contract.d.ts +8 -0
  22. package/types/lib/1.domain/registry/event.contract.d.ts +15 -0
  23. package/types/lib/1.domain/registry/index.d.ts +3 -0
  24. package/types/lib/1.domain/registry/registry-options.contract.d.ts +11 -0
  25. package/types/lib/1.domain/remote/remote-info.contract.d.ts +8 -0
  26. package/types/lib/1.domain/remote/remote-module.contract.d.ts +4 -0
  27. package/types/lib/1.domain/remote-entry/manifest.contract.d.ts +3 -0
  28. package/types/lib/1.domain/remote-entry/remote-entry.contract.d.ts +30 -0
  29. package/types/lib/2.app/config/config.contract.d.ts +7 -0
  30. package/types/lib/2.app/config/host.contract.d.ts +14 -0
  31. package/types/lib/2.app/config/import-map.contract.d.ts +9 -0
  32. package/types/lib/2.app/config/index.d.ts +6 -0
  33. package/types/lib/2.app/config/log.contract.d.ts +21 -0
  34. package/types/lib/2.app/config/mode.contract.d.ts +19 -0
  35. package/types/lib/2.app/config/registry.contract.d.ts +6 -0
  36. package/types/lib/2.app/config/storage.contract.d.ts +18 -0
  37. package/types/lib/2.app/driver-ports/audit/for-auditing-externals.port.d.ts +2 -0
  38. package/types/lib/2.app/driver-ports/audit/index.d.ts +1 -0
  39. package/types/lib/2.app/driver-ports/dynamic-init/drivers.contract.d.ts +13 -0
  40. package/types/lib/2.app/driver-ports/dynamic-init/flow.contract.d.ts +4 -0
  41. package/types/lib/2.app/driver-ports/dynamic-init/for-converting-to-import-map.d.ts +6 -0
  42. package/types/lib/2.app/driver-ports/dynamic-init/for-getting-remote-entry.port.d.ts +3 -0
  43. package/types/lib/2.app/driver-ports/dynamic-init/for-updating-cache.d.ts +5 -0
  44. package/types/lib/2.app/driver-ports/dynamic-init/index.d.ts +5 -0
  45. package/types/lib/2.app/driver-ports/flow-factory.contract.d.ts +7 -0
  46. package/types/lib/2.app/driver-ports/init/drivers.contract.d.ts +17 -0
  47. package/types/lib/2.app/driver-ports/init/flow.contract.d.ts +6 -0
  48. package/types/lib/2.app/driver-ports/init/for-committing-changes.port.d.ts +2 -0
  49. package/types/lib/2.app/driver-ports/init/for-determining-shared-externals.port.d.ts +1 -0
  50. package/types/lib/2.app/driver-ports/init/for-exposing-module-loader.port.d.ts +2 -0
  51. package/types/lib/2.app/driver-ports/init/for-generating-import-map.d.ts +2 -0
  52. package/types/lib/2.app/driver-ports/init/for-getting-remote-entries.port.d.ts +3 -0
  53. package/types/lib/2.app/driver-ports/init/for-processing-remote-entries.port.d.ts +2 -0
  54. package/types/lib/2.app/driver-ports/init/index.d.ts +8 -0
  55. package/types/lib/2.app/driver-ports/registry/for-managing-events.port.d.ts +2 -0
  56. package/types/lib/2.app/driving-ports/driving.contract.d.ts +16 -0
  57. package/types/lib/2.app/driving-ports/for-browser-tasks.d.ts +7 -0
  58. package/types/lib/2.app/driving-ports/for-providing-manifest.port.d.ts +4 -0
  59. package/types/lib/2.app/driving-ports/for-providing-remote-entries.port.d.ts +4 -0
  60. package/types/lib/2.app/driving-ports/for-remote-info-storage.port.d.ts +11 -0
  61. package/types/lib/2.app/driving-ports/for-scoped-externals-storage.port.d.ts +9 -0
  62. package/types/lib/2.app/driving-ports/for-shared-externals-storage.port.d.ts +13 -0
  63. package/types/lib/2.app/driving-ports/for-version-checking.port.d.ts +6 -0
  64. package/types/lib/2.app/driving-ports/index.d.ts +8 -0
  65. package/types/lib/2.app/flows/audit/externals-audit.d.ts +4 -0
  66. package/types/lib/2.app/flows/dynamic-init/convert-to-import-map.d.ts +3 -0
  67. package/types/lib/2.app/flows/dynamic-init/get-remote-entry.d.ts +5 -0
  68. package/types/lib/2.app/flows/dynamic-init/update-cache.d.ts +5 -0
  69. package/types/lib/2.app/flows/init/commit-changes.d.ts +4 -0
  70. package/types/lib/2.app/flows/init/determine-shared-externals.d.ts +5 -0
  71. package/types/lib/2.app/flows/init/expose-module-loader.d.ts +4 -0
  72. package/types/lib/2.app/flows/init/generate-import-map.d.ts +5 -0
  73. package/types/lib/2.app/flows/init/get-remote-entries.d.ts +6 -0
  74. package/types/lib/2.app/flows/init/process-remote-entries.d.ts +5 -0
  75. package/types/lib/2.app/flows/registry/setup-registry.d.ts +3 -0
  76. package/types/lib/3.adapters/browser/browser.d.ts +4 -0
  77. package/types/lib/3.adapters/checks/version.check.d.ts +3 -0
  78. package/types/lib/3.adapters/http/manifest-provider.d.ts +3 -0
  79. package/types/lib/3.adapters/http/remote-entry-provider.d.ts +3 -0
  80. package/types/lib/3.adapters/storage/remote-info.repository.d.ts +4 -0
  81. package/types/lib/3.adapters/storage/scoped-externals.repository.d.ts +4 -0
  82. package/types/lib/3.adapters/storage/shared-externals.repository.d.ts +4 -0
  83. package/types/lib/4.config/host/host.config.d.ts +2 -0
  84. package/types/lib/4.config/import-map/import-map.config.d.ts +2 -0
  85. package/types/lib/4.config/import-map/index.d.ts +3 -0
  86. package/types/lib/4.config/import-map/replace-in-dom.d.ts +2 -0
  87. package/types/lib/4.config/import-map/use-default.d.ts +3 -0
  88. package/types/lib/4.config/import-map/use-import-shim.d.ts +5 -0
  89. package/types/lib/4.config/logging/console.logger.d.ts +3 -0
  90. package/types/lib/4.config/logging/index.d.ts +2 -0
  91. package/types/lib/4.config/logging/log.config.d.ts +2 -0
  92. package/types/lib/4.config/logging/log.handler.d.ts +3 -0
  93. package/types/lib/4.config/logging/noop.logger.d.ts +3 -0
  94. package/types/lib/4.config/mode/caching.profile.d.ts +2 -0
  95. package/types/lib/4.config/mode/default.profile.d.ts +2 -0
  96. package/types/lib/4.config/mode/index.d.ts +2 -0
  97. package/types/lib/4.config/mode/mode.config.d.ts +2 -0
  98. package/types/lib/4.config/storage/global-this.storage.d.ts +3 -0
  99. package/types/lib/4.config/storage/index.d.ts +3 -0
  100. package/types/lib/4.config/storage/local.storage.d.ts +3 -0
  101. package/types/lib/4.config/storage/session.storage.d.ts +3 -0
  102. package/types/lib/4.config/storage/storage.config.d.ts +2 -0
  103. package/types/lib/5.di/config.factory.d.ts +2 -0
  104. package/types/lib/5.di/driving.factory.d.ts +6 -0
  105. package/types/lib/5.di/flows/dynamic-init.factory.d.ts +14 -0
  106. package/types/lib/5.di/flows/init.factory.d.ts +14 -0
  107. package/types/lib/6.mocks/handlers/log.handler.d.ts +2 -0
  108. package/types/lib/audit.index.d.ts +2 -0
  109. package/types/lib/index.d.ts +7 -0
  110. package/types/lib/init-federation.contract.d.ts +15 -0
  111. package/types/lib/init-federation.d.ts +4 -0
  112. package/types/lib/native-federation.error.d.ts +4 -0
  113. package/types/lib/options.index.d.ts +5 -0
  114. package/types/lib/registry.index.d.ts +4 -0
  115. package/types/lib/sdk.index.d.ts +8 -0
  116. package/types/lib/utils/clone-entry.d.ts +4 -0
  117. package/types/lib/utils/optional.d.ts +13 -0
  118. package/types/lib/utils/path.d.ts +3 -0
  119. package/types/quickstart.d.ts +1 -0
@@ -0,0 +1,2 @@
1
+ import type { ImportMap } from '../../../1.domain/import-map/import-map.contract';
2
+ export type ForGeneratingImportMap = () => Promise<ImportMap>;
@@ -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,2 @@
1
+ import type { RemoteEntry } from '../../../1.domain/remote-entry/remote-entry.contract';
2
+ export type ForProcessingRemoteEntries = (remoteEntries: RemoteEntry[]) => 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,2 @@
1
+ import type { NFEventRegistry } from '../../../1.domain/registry/event-registry.contract';
2
+ export type ForManagingEvents = () => NFEventRegistry;
@@ -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,4 @@
1
+ import type { Manifest } from '../../1.domain/remote-entry/manifest.contract';
2
+ export type ForProvidingManifest = {
3
+ provide: (remotesOrManifestUrl: Manifest | string) => Promise<Manifest>;
4
+ };
@@ -0,0 +1,4 @@
1
+ import type { RemoteEntry } from '../../1.domain/remote-entry/remote-entry.contract';
2
+ export type ForProvidingRemoteEntries = {
3
+ provide: (remoteEntryUrl: string) => Promise<RemoteEntry>;
4
+ };
@@ -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,6 @@
1
+ export type ForVersionChecking = {
2
+ isValidSemver: (version: string) => boolean;
3
+ isCompatible: (version: string, versionRange: string) => boolean;
4
+ compare: (versionA: string, versionB: string) => number;
5
+ smallestVersion: (versionRange: string) => string;
6
+ };
@@ -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,3 @@
1
+ import type { ForManagingEvents } from '../../driver-ports/registry/for-managing-events.port';
2
+ import type { NFEventRegistryConfig } from '../../config/registry.contract';
3
+ export declare function createRegistry(opts: NFEventRegistryConfig): ForManagingEvents;
@@ -0,0 +1,4 @@
1
+ import type { ForBrowserTasks } from '../../2.app/driving-ports/for-browser-tasks';
2
+ import type { ImportMapConfig } from '../../2.app/config/import-map.contract';
3
+ declare const createBrowser: (config: ImportMapConfig) => ForBrowserTasks;
4
+ export { createBrowser };
@@ -0,0 +1,3 @@
1
+ import type { ForVersionChecking } from '../../2.app/driving-ports/for-version-checking.port';
2
+ declare const createVersionCheck: () => ForVersionChecking;
3
+ export { createVersionCheck };
@@ -0,0 +1,3 @@
1
+ import type { ForProvidingManifest } from '../../2.app/driving-ports/for-providing-manifest.port';
2
+ declare const createManifestProvider: () => ForProvidingManifest;
3
+ export { createManifestProvider };
@@ -0,0 +1,3 @@
1
+ import type { ForProvidingRemoteEntries } from '../../2.app/driving-ports/for-providing-remote-entries.port';
2
+ declare const createRemoteEntryProvider: () => ForProvidingRemoteEntries;
3
+ export { createRemoteEntryProvider };
@@ -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,2 @@
1
+ import type { HostConfig, HostOptions } from '../../2.app/config/host.contract';
2
+ export declare const createHostConfig: (override: Partial<HostOptions>) => HostConfig;
@@ -0,0 +1,2 @@
1
+ import type { ImportMapConfig, ImportMapOptions } from '../../2.app/config/import-map.contract';
2
+ export declare const createImportMapConfig: (o: Partial<ImportMapOptions>) => ImportMapConfig;
@@ -0,0 +1,3 @@
1
+ export * from './use-import-shim';
2
+ export * from './use-default';
3
+ export * from './replace-in-dom';
@@ -0,0 +1,2 @@
1
+ import type { SetImportMap } from '../../2.app/config/import-map.contract';
2
+ export declare const replaceInDOM: (mapType: string) => SetImportMap;
@@ -0,0 +1,3 @@
1
+ import type { ImportMapConfig } from '../../2.app/config/import-map.contract';
2
+ declare const useDefaultImportMap: () => ImportMapConfig;
3
+ export { useDefaultImportMap };
@@ -0,0 +1,5 @@
1
+ import type { ImportMapConfig } from '../../2.app/config/import-map.contract';
2
+ declare const useShimImportMap: (cfg?: {
3
+ shimMode: boolean;
4
+ }) => ImportMapConfig;
5
+ export { useShimImportMap };
@@ -0,0 +1,3 @@
1
+ import type { Logger } from '../../2.app/config/log.contract';
2
+ declare const consoleLogger: Logger;
3
+ export { consoleLogger };
@@ -0,0 +1,2 @@
1
+ export { consoleLogger } from './console.logger';
2
+ export { noopLogger } from './noop.logger';
@@ -0,0 +1,2 @@
1
+ import type { LoggingConfig, LoggingOptions } from '../../2.app/config/log.contract';
2
+ export declare const createLogConfig: ({ logger, logLevel }: LoggingOptions) => LoggingConfig;
@@ -0,0 +1,3 @@
1
+ import { type LogType, type LogHandler, type Logger } from '../../2.app/config/log.contract';
2
+ declare const createLogHandler: (logger: Logger, logLevel: LogType) => LogHandler;
3
+ export { createLogHandler };
@@ -0,0 +1,3 @@
1
+ import type { Logger } from '../../2.app/config/log.contract';
2
+ declare const noopLogger: Logger;
3
+ export { noopLogger };
@@ -0,0 +1,2 @@
1
+ import type { ModeProfileConfig } from '../../2.app/config/mode.contract';
2
+ export declare const cachingProfile: ModeProfileConfig;
@@ -0,0 +1,2 @@
1
+ import type { ModeProfileConfig } from '../../2.app/config/mode.contract';
2
+ export declare const defaultProfile: ModeProfileConfig;
@@ -0,0 +1,2 @@
1
+ export { defaultProfile } from './default.profile';
2
+ export { cachingProfile } from './caching.profile';
@@ -0,0 +1,2 @@
1
+ import type { ModeConfig, ModeOptions } from '../../2.app/config/mode.contract';
2
+ export declare const createModeConfig: (override: ModeOptions) => ModeConfig;
@@ -0,0 +1,3 @@
1
+ import { type StorageEntryCreator } from '../../2.app/config/storage.contract';
2
+ declare const globalThisStorageEntry: StorageEntryCreator;
3
+ export { globalThisStorageEntry };
@@ -0,0 +1,3 @@
1
+ export { globalThisStorageEntry } from './global-this.storage';
2
+ export { localStorageEntry } from './local.storage';
3
+ export { sessionStorageEntry } from './session.storage';
@@ -0,0 +1,3 @@
1
+ import type { StorageEntryCreator } from '../../2.app/config/storage.contract';
2
+ declare const localStorageEntry: StorageEntryCreator;
3
+ export { localStorageEntry };
@@ -0,0 +1,3 @@
1
+ import type { StorageEntryCreator } from '../../2.app/config/storage.contract';
2
+ declare const sessionStorageEntry: StorageEntryCreator;
3
+ export { sessionStorageEntry };
@@ -0,0 +1,2 @@
1
+ import type { StorageConfig, StorageOptions } from '../../2.app/config/storage.contract';
2
+ export declare const createStorageConfig: (override: StorageOptions) => StorageConfig;
@@ -0,0 +1,2 @@
1
+ import type { ConfigContract, NFOptions } from '../2.app/config/config.contract';
2
+ export declare const createConfigHandlers: (overrides: NFOptions) => ConfigContract;
@@ -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,2 @@
1
+ import type { LogHandler, LogType } from '../../2.app/config/log.contract';
2
+ export declare const createMockLogHandler: (level?: LogType) => jest.Mocked<LogHandler>;
@@ -0,0 +1,2 @@
1
+ export * from './2.app/driver-ports/dynamic-init';
2
+ export * from './2.app/flows/audit/externals-audit';
@@ -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
+ declare class NFError extends Error {
2
+ constructor(message: string, cause?: Error);
3
+ }
4
+ export { NFError };
@@ -0,0 +1,5 @@
1
+ export * from './2.app/config';
2
+ export * from './4.config/logging';
3
+ export * from './4.config/storage';
4
+ export * from './4.config/import-map';
5
+ export * from './4.config/mode';
@@ -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,4 @@
1
+ import type { StorageEntryKey } from '../2.app/config/storage.contract';
2
+ type CloneEntry = <T>(name: StorageEntryKey, raw: T) => T;
3
+ declare const cloneEntry: CloneEntry;
4
+ export { CloneEntry, cloneEntry };
@@ -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,3 @@
1
+ declare function join(pathA: string, pathB: string): string;
2
+ declare function getScope(path: string): string;
3
+ export { join, getScope };
@@ -0,0 +1 @@
1
+ import 'es-module-shims';