@module-federation/enhanced 0.2.0-canary.4 → 0.2.0
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 +21 -0
- package/README.md +169 -0
- package/dist/package.json +83 -0
- package/dist/src/declarations/plugins/container/AsyncDependenciesBlock.d.ts +57 -0
- package/dist/src/declarations/plugins/container/Dependency.d.ts +285 -0
- package/dist/src/declarations/plugins/container/Module.d.ts +138 -0
- package/dist/src/declarations/plugins/container/ModuleFactory.d.ts +33 -0
- package/dist/src/declarations/plugins/container/ObjectDeserializerContext.d.ts +4 -0
- package/dist/src/declarations/plugins/container/StaticExportsDependency.d.ts +28 -0
- package/dist/src/declarations/plugins/container/Template.d.ts +198 -0
- package/dist/src/declarations/plugins/container/WebpackError.d.ts +32 -0
- package/dist/src/declarations/plugins/container/WebpackOptions.d.ts +140 -0
- package/dist/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.ts +74 -0
- package/dist/src/declarations/plugins/sharing/ProvideSharedPlugin.d.ts +67 -0
- package/dist/src/declarations/plugins/sharing/SharePlugin.d.ts +78 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.js +37 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/Constants.js +125 -0
- package/dist/src/lib/Constants.js.map +1 -0
- package/dist/src/lib/RuntimeGlobals.d.ts +0 -0
- package/{src → dist/src}/lib/RuntimeGlobals.js +144 -74
- package/dist/src/lib/RuntimeGlobals.js.map +1 -0
- package/dist/src/lib/container/AsyncBoundaryPlugin.d.ts +20 -0
- package/dist/src/lib/container/AsyncBoundaryPlugin.js +198 -0
- package/dist/src/lib/container/AsyncBoundaryPlugin.js.map +1 -0
- package/dist/src/lib/container/ContainerEntryDependency.d.ts +24 -0
- package/dist/src/lib/container/ContainerEntryDependency.js +39 -0
- package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -0
- package/dist/src/lib/container/ContainerEntryModule.d.ts +75 -0
- package/dist/src/lib/container/ContainerEntryModule.js +240 -0
- package/dist/src/lib/container/ContainerEntryModule.js.map +1 -0
- package/dist/src/lib/container/ContainerEntryModuleFactory.d.ts +15 -0
- package/dist/src/lib/container/ContainerEntryModuleFactory.js +30 -0
- package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -0
- package/dist/src/lib/container/ContainerExposedDependency.d.ts +19 -0
- package/dist/src/lib/container/ContainerExposedDependency.js +49 -0
- package/dist/src/lib/container/ContainerExposedDependency.js.map +1 -0
- package/dist/src/lib/container/ContainerPlugin.d.ts +13 -0
- package/dist/src/lib/container/ContainerPlugin.js +188 -0
- package/dist/src/lib/container/ContainerPlugin.js.map +1 -0
- package/{src → dist/src}/lib/container/ContainerReferencePlugin.d.ts +3 -3
- package/dist/src/lib/container/ContainerReferencePlugin.js +102 -0
- package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -0
- package/dist/src/lib/container/FallbackDependency.d.ts +15 -0
- package/dist/src/lib/container/FallbackDependency.js +47 -0
- package/dist/src/lib/container/FallbackDependency.js.map +1 -0
- package/dist/src/lib/container/FallbackItemDependency.d.ts +3 -0
- package/dist/src/lib/container/FallbackItemDependency.js +26 -0
- package/dist/src/lib/container/FallbackItemDependency.js.map +1 -0
- package/dist/src/lib/container/FallbackModule.d.ts +54 -0
- package/dist/src/lib/container/FallbackModule.js +152 -0
- package/dist/src/lib/container/FallbackModule.js.map +1 -0
- package/dist/src/lib/container/FallbackModuleFactory.d.ts +11 -0
- package/dist/src/lib/container/FallbackModuleFactory.js +28 -0
- package/dist/src/lib/container/FallbackModuleFactory.js.map +1 -0
- package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +14 -0
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js +64 -0
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -0
- package/dist/src/lib/container/ModuleFederationPlugin.d.ts +17 -0
- package/dist/src/lib/container/ModuleFederationPlugin.js +128 -0
- package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -0
- package/dist/src/lib/container/RemoteModule.d.ts +90 -0
- package/dist/src/lib/container/RemoteModule.js +148 -0
- package/dist/src/lib/container/RemoteModule.js.map +1 -0
- package/dist/src/lib/container/RemoteRuntimeModule.d.ts +12 -0
- package/dist/src/lib/container/RemoteRuntimeModule.js +101 -0
- package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -0
- package/{src → dist/src}/lib/container/RemoteToExternalDependency.d.ts +3 -9
- package/dist/src/lib/container/RemoteToExternalDependency.js +26 -0
- package/dist/src/lib/container/RemoteToExternalDependency.js.map +1 -0
- package/dist/src/lib/container/constant.d.ts +3 -0
- package/dist/src/lib/container/constant.js +12 -0
- package/dist/src/lib/container/constant.js.map +1 -0
- package/{src → dist/src}/lib/container/options.d.ts +12 -4
- package/{src → dist/src}/lib/container/options.js +32 -42
- package/dist/src/lib/container/options.js.map +1 -0
- package/dist/src/lib/container/runtime/FederationRuntimeModule.d.ts +13 -0
- package/dist/src/lib/container/runtime/FederationRuntimeModule.js +49 -0
- package/dist/src/lib/container/runtime/FederationRuntimeModule.js.map +1 -0
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.d.ts +17 -0
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +209 -0
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -0
- package/dist/src/lib/container/runtime/getFederationGlobal.d.ts +5 -0
- package/dist/src/lib/container/runtime/getFederationGlobal.js +26 -0
- package/dist/src/lib/container/runtime/getFederationGlobal.js.map +1 -0
- package/dist/src/lib/container/runtime/utils.d.ts +16 -0
- package/dist/src/lib/container/runtime/utils.js +83 -0
- package/dist/src/lib/container/runtime/utils.js.map +1 -0
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +3 -0
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js +26 -0
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -0
- package/dist/src/lib/sharing/ConsumeSharedModule.d.ts +99 -0
- package/dist/src/lib/sharing/ConsumeSharedModule.js +206 -0
- package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -0
- package/dist/src/lib/sharing/ConsumeSharedPlugin.d.ts +30 -0
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js +245 -0
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -0
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +31 -0
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +124 -0
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -0
- package/dist/src/lib/sharing/ProvideForSharedDependency.d.ts +3 -0
- package/dist/src/lib/sharing/ProvideForSharedDependency.js +27 -0
- package/dist/src/lib/sharing/ProvideForSharedDependency.js.map +1 -0
- package/dist/src/lib/sharing/ProvideSharedDependency.d.ts +36 -0
- package/dist/src/lib/sharing/ProvideSharedDependency.js +70 -0
- package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -0
- package/dist/src/lib/sharing/ProvideSharedModule.d.ts +67 -0
- package/dist/src/lib/sharing/ProvideSharedModule.js +186 -0
- package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -0
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.d.ts +18 -0
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +30 -0
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -0
- package/dist/src/lib/sharing/ProvideSharedPlugin.d.ts +47 -0
- package/dist/src/lib/sharing/ProvideSharedPlugin.js +195 -0
- package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -0
- package/dist/src/lib/sharing/SharePlugin.d.ts +41 -0
- package/dist/src/lib/sharing/SharePlugin.js +79 -0
- package/dist/src/lib/sharing/SharePlugin.js.map +1 -0
- package/dist/src/lib/sharing/ShareRuntimeModule.d.ts +14 -0
- package/dist/src/lib/sharing/ShareRuntimeModule.js +102 -0
- package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -0
- package/dist/src/lib/sharing/resolveMatchedConfigs.d.ts +12 -0
- package/dist/src/lib/sharing/resolveMatchedConfigs.js +66 -0
- package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -0
- package/dist/src/lib/sharing/utils.d.ts +37 -0
- package/{src → dist/src}/lib/sharing/utils.js +109 -81
- package/dist/src/lib/sharing/utils.js.map +1 -0
- package/dist/src/rspack.d.ts +1 -0
- package/dist/src/rspack.js +6 -0
- package/dist/src/rspack.js.map +1 -0
- package/{src → dist/src}/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +1 -1
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +19 -0
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -0
- package/dist/src/runtime.d.ts +1 -0
- package/dist/src/runtime.js +18 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/schemas/container/ContainerPlugin.check.d.ts +7 -0
- package/dist/src/schemas/container/ContainerPlugin.check.js +2318 -0
- package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -0
- package/dist/src/schemas/container/ContainerPlugin.d.ts +289 -0
- package/dist/src/schemas/container/ContainerPlugin.js +326 -0
- package/dist/src/schemas/container/ContainerPlugin.js.map +1 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +7 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.check.js +939 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +87 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.js +132 -0
- package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.d.ts +9 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.js +4001 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
- package/{src → dist/src}/schemas/container/ModuleFederationPlugin.d.ts +197 -4
- package/{src → dist/src}/schemas/container/ModuleFederationPlugin.js +349 -177
- package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -0
- package/{src/schemas/container/ModuleFederationPlugin.check.d.ts → dist/src/schemas/sharing/ProviderSharedPlugin.check.d.ts} +2 -2
- package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js +434 -0
- package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js.map +1 -0
- package/dist/src/schemas/sharing/ProviderSharedPlugin.d.ts +104 -0
- package/dist/src/schemas/sharing/ProviderSharedPlugin.js +119 -0
- package/dist/src/schemas/sharing/ProviderSharedPlugin.js.map +1 -0
- package/dist/src/types/runtime.d.ts +7 -0
- package/dist/src/types/runtime.js +3 -0
- package/dist/src/types/runtime.js.map +1 -0
- package/dist/src/webpack.d.ts +2 -0
- package/dist/src/webpack.js +9 -0
- package/dist/src/webpack.js.map +1 -0
- package/dist/src/wrapper/AsyncBoundaryPlugin.d.ts +8 -0
- package/dist/src/wrapper/AsyncBoundaryPlugin.js +19 -0
- package/dist/src/wrapper/AsyncBoundaryPlugin.js.map +1 -0
- package/dist/src/wrapper/ConsumeSharedPlugin.d.ts +8 -0
- package/dist/src/wrapper/ConsumeSharedPlugin.js +19 -0
- package/dist/src/wrapper/ConsumeSharedPlugin.js.map +1 -0
- package/dist/src/wrapper/ContainerPlugin.d.ts +8 -0
- package/dist/src/wrapper/ContainerPlugin.js +19 -0
- package/dist/src/wrapper/ContainerPlugin.js.map +1 -0
- package/dist/src/wrapper/ContainerReferencePlugin.d.ts +8 -0
- package/dist/src/wrapper/ContainerReferencePlugin.js +19 -0
- package/dist/src/wrapper/ContainerReferencePlugin.js.map +1 -0
- package/dist/src/wrapper/FederationRuntimePlugin.d.ts +9 -0
- package/dist/src/wrapper/FederationRuntimePlugin.js +22 -0
- package/dist/src/wrapper/FederationRuntimePlugin.js.map +1 -0
- package/dist/src/wrapper/HoistContainerReferencesPlugin.d.ts +7 -0
- package/dist/src/wrapper/HoistContainerReferencesPlugin.js +19 -0
- package/dist/src/wrapper/HoistContainerReferencesPlugin.js.map +1 -0
- package/dist/src/wrapper/ModuleFederationPlugin.d.ts +8 -0
- package/dist/src/wrapper/ModuleFederationPlugin.js +39 -0
- package/dist/src/wrapper/ModuleFederationPlugin.js.map +1 -0
- package/dist/src/wrapper/ProvideSharedPlugin.d.ts +8 -0
- package/dist/src/wrapper/ProvideSharedPlugin.js +19 -0
- package/dist/src/wrapper/ProvideSharedPlugin.js.map +1 -0
- package/dist/src/wrapper/SharePlugin.d.ts +8 -0
- package/dist/src/wrapper/SharePlugin.js +19 -0
- package/dist/src/wrapper/SharePlugin.js.map +1 -0
- package/package.json +73 -7
- package/global.d.js +0 -14
- package/global.d.js.map +0 -1
- package/pullts.d.ts +0 -1
- package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js +0 -14
- package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js.map +0 -1
- package/src/declarations/plugins/container/ContainerPlugin.d.js +0 -12
- package/src/declarations/plugins/container/ContainerPlugin.d.js.map +0 -1
- package/src/declarations/plugins/container/ContainerReferencePlugin.d.js +0 -12
- package/src/declarations/plugins/container/ContainerReferencePlugin.d.js.map +0 -1
- package/src/declarations/plugins/container/Dependency.d.js +0 -14
- package/src/declarations/plugins/container/Dependency.d.js.map +0 -1
- package/src/declarations/plugins/container/Module.d.js +0 -3
- package/src/declarations/plugins/container/Module.d.js.map +0 -1
- package/src/declarations/plugins/container/ModuleFactory.d.js +0 -3
- package/src/declarations/plugins/container/ModuleFactory.d.js.map +0 -1
- package/src/declarations/plugins/container/ModuleFederationPlugin.d.js +0 -12
- package/src/declarations/plugins/container/ModuleFederationPlugin.d.js.map +0 -1
- package/src/declarations/plugins/container/ObjectDeserializerContext.d.js +0 -6
- package/src/declarations/plugins/container/ObjectDeserializerContext.d.js.map +0 -1
- package/src/declarations/plugins/container/StaticExportsDependency.d.js +0 -14
- package/src/declarations/plugins/container/StaticExportsDependency.d.js.map +0 -1
- package/src/declarations/plugins/container/Template.d.js +0 -4
- package/src/declarations/plugins/container/Template.d.js.map +0 -1
- package/src/declarations/plugins/container/WebpackError.d.js +0 -3
- package/src/declarations/plugins/container/WebpackError.d.js.map +0 -1
- package/src/declarations/plugins/container/WebpackOptions.d.js +0 -6
- package/src/declarations/plugins/container/WebpackOptions.d.js.map +0 -1
- package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js +0 -12
- package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js.map +0 -1
- package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js +0 -12
- package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js.map +0 -1
- package/src/declarations/plugins/sharing/SharePlugin.d.js +0 -12
- package/src/declarations/plugins/sharing/SharePlugin.d.js.map +0 -1
- package/src/index.d.ts +0 -7
- package/src/index.js +0 -47
- package/src/index.js.map +0 -1
- package/src/lib/Constants.js +0 -103
- package/src/lib/Constants.js.map +0 -1
- package/src/lib/RuntimeGlobals.d.ts +0 -1
- package/src/lib/RuntimeGlobals.js.map +0 -1
- package/src/lib/container/AsyncBoundaryPlugin.d.ts +0 -16
- package/src/lib/container/AsyncBoundaryPlugin.js +0 -141
- package/src/lib/container/AsyncBoundaryPlugin.js.map +0 -1
- package/src/lib/container/ContainerEntryDependency.d.js +0 -4
- package/src/lib/container/ContainerEntryDependency.d.js.map +0 -1
- package/src/lib/container/ContainerEntryDependency.d.ts +0 -20
- package/src/lib/container/ContainerEntryDependency.js +0 -47
- package/src/lib/container/ContainerEntryDependency.js.map +0 -1
- package/src/lib/container/ContainerEntryModule.d.js +0 -14
- package/src/lib/container/ContainerEntryModule.d.js.map +0 -1
- package/src/lib/container/ContainerEntryModule.d.ts +0 -85
- package/src/lib/container/ContainerEntryModule.js +0 -281
- package/src/lib/container/ContainerEntryModule.js.map +0 -1
- package/src/lib/container/ContainerEntryModuleFactory.d.js +0 -4
- package/src/lib/container/ContainerEntryModuleFactory.d.js.map +0 -1
- package/src/lib/container/ContainerEntryModuleFactory.d.ts +0 -10
- package/src/lib/container/ContainerEntryModuleFactory.js +0 -37
- package/src/lib/container/ContainerEntryModuleFactory.js.map +0 -1
- package/src/lib/container/ContainerExposedDependency.d.js +0 -4
- package/src/lib/container/ContainerExposedDependency.d.js.map +0 -1
- package/src/lib/container/ContainerExposedDependency.d.ts +0 -26
- package/src/lib/container/ContainerExposedDependency.js +0 -57
- package/src/lib/container/ContainerExposedDependency.js.map +0 -1
- package/src/lib/container/ContainerPlugin.d.js +0 -4
- package/src/lib/container/ContainerPlugin.d.js.map +0 -1
- package/src/lib/container/ContainerPlugin.d.ts +0 -11
- package/src/lib/container/ContainerPlugin.js +0 -92
- package/src/lib/container/ContainerPlugin.js.map +0 -1
- package/src/lib/container/ContainerReferencePlugin.d.js +0 -4
- package/src/lib/container/ContainerReferencePlugin.d.js.map +0 -1
- package/src/lib/container/ContainerReferencePlugin.js +0 -141
- package/src/lib/container/ContainerReferencePlugin.js.map +0 -1
- package/src/lib/container/FallbackDependency.d.js +0 -14
- package/src/lib/container/FallbackDependency.d.js.map +0 -1
- package/src/lib/container/FallbackDependency.d.ts +0 -25
- package/src/lib/container/FallbackDependency.js +0 -59
- package/src/lib/container/FallbackDependency.js.map +0 -1
- package/src/lib/container/FallbackItemDependency.d.js +0 -4
- package/src/lib/container/FallbackItemDependency.d.js.map +0 -1
- package/src/lib/container/FallbackItemDependency.d.ts +0 -10
- package/src/lib/container/FallbackItemDependency.js +0 -37
- package/src/lib/container/FallbackItemDependency.js.map +0 -1
- package/src/lib/container/FallbackModule.d.js +0 -4
- package/src/lib/container/FallbackModule.d.js.map +0 -1
- package/src/lib/container/FallbackModule.d.ts +0 -73
- package/src/lib/container/FallbackModule.js +0 -153
- package/src/lib/container/FallbackModule.js.map +0 -1
- package/src/lib/container/FallbackModuleFactory.d.js +0 -4
- package/src/lib/container/FallbackModuleFactory.d.js.map +0 -1
- package/src/lib/container/FallbackModuleFactory.d.ts +0 -10
- package/src/lib/container/FallbackModuleFactory.js +0 -35
- package/src/lib/container/FallbackModuleFactory.js.map +0 -1
- package/src/lib/container/HoistContainerReferencesPlugin.d.ts +0 -19
- package/src/lib/container/HoistContainerReferencesPlugin.js +0 -78
- package/src/lib/container/HoistContainerReferencesPlugin.js.map +0 -1
- package/src/lib/container/ModuleFederationPlugin.d.js +0 -4
- package/src/lib/container/ModuleFederationPlugin.d.js.map +0 -1
- package/src/lib/container/ModuleFederationPlugin.d.ts +0 -16
- package/src/lib/container/ModuleFederationPlugin.js +0 -85
- package/src/lib/container/ModuleFederationPlugin.js.map +0 -1
- package/src/lib/container/ModuleFederationPluginTypes.d.js +0 -12
- package/src/lib/container/ModuleFederationPluginTypes.d.js.map +0 -1
- package/src/lib/container/RemoteModule.d.js +0 -13
- package/src/lib/container/RemoteModule.d.js.map +0 -1
- package/src/lib/container/RemoteModule.d.ts +0 -76
- package/src/lib/container/RemoteModule.js +0 -151
- package/src/lib/container/RemoteModule.js.map +0 -1
- package/src/lib/container/RemoteRuntimeModule.d.js +0 -13
- package/src/lib/container/RemoteRuntimeModule.d.js.map +0 -1
- package/src/lib/container/RemoteRuntimeModule.d.ts +0 -9
- package/src/lib/container/RemoteRuntimeModule.js +0 -124
- package/src/lib/container/RemoteRuntimeModule.js.map +0 -1
- package/src/lib/container/RemoteToExternalDependency.d.js +0 -19
- package/src/lib/container/RemoteToExternalDependency.d.js.map +0 -1
- package/src/lib/container/RemoteToExternalDependency.js +0 -37
- package/src/lib/container/RemoteToExternalDependency.js.map +0 -1
- package/src/lib/container/options.d.js +0 -6
- package/src/lib/container/options.d.js.map +0 -1
- package/src/lib/container/options.js.map +0 -1
- package/src/lib/inversion/ContainerInversionPlugin.d.ts +0 -1
- package/src/lib/inversion/ContainerInversionPlugin.js +0 -3
- package/src/lib/inversion/ContainerInversionPlugin.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js +0 -4
- package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +0 -10
- package/src/lib/sharing/ConsumeSharedFallbackDependency.js +0 -37
- package/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedModule.d.js +0 -4
- package/src/lib/sharing/ConsumeSharedModule.d.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedModule.d.ts +0 -106
- package/src/lib/sharing/ConsumeSharedModule.js +0 -235
- package/src/lib/sharing/ConsumeSharedModule.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedPlugin.d.js +0 -4
- package/src/lib/sharing/ConsumeSharedPlugin.d.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedPlugin.d.ts +0 -8
- package/src/lib/sharing/ConsumeSharedPlugin.js +0 -274
- package/src/lib/sharing/ConsumeSharedPlugin.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js +0 -4
- package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js.map +0 -1
- package/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +0 -13
- package/src/lib/sharing/ConsumeSharedRuntimeModule.js +0 -294
- package/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +0 -1
- package/src/lib/sharing/ProvideForSharedDependency.d.js +0 -4
- package/src/lib/sharing/ProvideForSharedDependency.d.js.map +0 -1
- package/src/lib/sharing/ProvideForSharedDependency.d.ts +0 -11
- package/src/lib/sharing/ProvideForSharedDependency.js +0 -38
- package/src/lib/sharing/ProvideForSharedDependency.js.map +0 -1
- package/src/lib/sharing/ProvideSharedDependency.d.js +0 -14
- package/src/lib/sharing/ProvideSharedDependency.d.js.map +0 -1
- package/src/lib/sharing/ProvideSharedDependency.d.ts +0 -32
- package/src/lib/sharing/ProvideSharedDependency.js +0 -69
- package/src/lib/sharing/ProvideSharedDependency.js.map +0 -1
- package/src/lib/sharing/ProvideSharedModule.d.js +0 -4
- package/src/lib/sharing/ProvideSharedModule.d.js.map +0 -1
- package/src/lib/sharing/ProvideSharedModule.d.ts +0 -79
- package/src/lib/sharing/ProvideSharedModule.js +0 -203
- package/src/lib/sharing/ProvideSharedModule.js.map +0 -1
- package/src/lib/sharing/ProvideSharedModuleFactory.d.js +0 -4
- package/src/lib/sharing/ProvideSharedModuleFactory.d.js.map +0 -1
- package/src/lib/sharing/ProvideSharedModuleFactory.d.ts +0 -11
- package/src/lib/sharing/ProvideSharedModuleFactory.js +0 -36
- package/src/lib/sharing/ProvideSharedModuleFactory.js.map +0 -1
- package/src/lib/sharing/ProvideSharedPlugin.d.js +0 -4
- package/src/lib/sharing/ProvideSharedPlugin.d.js.map +0 -1
- package/src/lib/sharing/ProvideSharedPlugin.d.ts +0 -34
- package/src/lib/sharing/ProvideSharedPlugin.js +0 -182
- package/src/lib/sharing/ProvideSharedPlugin.js.map +0 -1
- package/src/lib/sharing/SharePlugin.d.js +0 -4
- package/src/lib/sharing/SharePlugin.d.js.map +0 -1
- package/src/lib/sharing/SharePlugin.d.ts +0 -15
- package/src/lib/sharing/SharePlugin.js +0 -77
- package/src/lib/sharing/SharePlugin.js.map +0 -1
- package/src/lib/sharing/ShareRuntimeModule.d.js +0 -4
- package/src/lib/sharing/ShareRuntimeModule.d.js.map +0 -1
- package/src/lib/sharing/ShareRuntimeModule.d.ts +0 -9
- package/src/lib/sharing/ShareRuntimeModule.js +0 -161
- package/src/lib/sharing/ShareRuntimeModule.js.map +0 -1
- package/src/lib/sharing/resolveMatchedConfigs.d.js +0 -6
- package/src/lib/sharing/resolveMatchedConfigs.d.js.map +0 -1
- package/src/lib/sharing/resolveMatchedConfigs.d.ts +0 -8
- package/src/lib/sharing/resolveMatchedConfigs.js +0 -73
- package/src/lib/sharing/resolveMatchedConfigs.js.map +0 -1
- package/src/lib/sharing/utils.d.js +0 -6
- package/src/lib/sharing/utils.d.js.map +0 -1
- package/src/lib/sharing/utils.d.ts +0 -33
- package/src/lib/sharing/utils.js.map +0 -1
- package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +0 -34
- package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +0 -1
- package/src/runtime/ModuleInfoRuntimeModule.d.ts +0 -16
- package/src/runtime/ModuleInfoRuntimeModule.js +0 -88
- package/src/runtime/ModuleInfoRuntimeModule.js.map +0 -1
- package/src/runtime/ModuleInfoRuntimePlugin.d.ts +0 -5
- package/src/runtime/ModuleInfoRuntimePlugin.js +0 -29
- package/src/runtime/ModuleInfoRuntimePlugin.js.map +0 -1
- package/src/schemas/container/ModuleFederationPlugin.check.js +0 -2245
- package/src/schemas/container/ModuleFederationPlugin.check.js.map +0 -1
- package/src/schemas/container/ModuleFederationPlugin.js.map +0 -1
- /package/{src → dist/src}/lib/Constants.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ModuleFederationPlugin.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy\n*/\n\n'use strict';\n\nimport type Compiler from 'webpack/lib/Compiler';\nimport isValidExternalsType from 'webpack/schemas/plugins/container/ExternalsType.check.js';\nimport type { ModuleFederationPluginOptions } from './ModuleFederationPluginTypes';\nimport SharePlugin from '../sharing/SharePlugin';\nimport createSchemaValidation from 'webpack/lib/util/create-schema-validation';\nimport ContainerPlugin from './ContainerPlugin';\nimport ContainerReferencePlugin from './ContainerReferencePlugin';\nimport checkOptions from 'webpack/schemas/plugins/container/ModuleFederationPlugin.check.js';\nimport schema from '../../schemas/container/ModuleFederationPlugin';\n\nconst validate = createSchemaValidation(\n //eslint-disable-next-line\n checkOptions,\n () => schema,\n {\n name: 'Module Federation Plugin',\n baseDataPath: 'options',\n },\n);\n\nclass ModuleFederationPlugin {\n private _options: ModuleFederationPluginOptions;\n /**\n * @param {ModuleFederationPluginOptions} options options\n */\n constructor(options: ModuleFederationPluginOptions) {\n validate(options);\n\n this._options = options;\n }\n\n /**\n * Apply the plugin\n * @param {Compiler} compiler the compiler instance\n * @returns {void}\n */\n apply(compiler: Compiler): void {\n const { _options: options } = this;\n const library = options.library || { type: 'var', name: options.name };\n const remoteType =\n options.remoteType ||\n (options.library && isValidExternalsType(options.library.type)\n ? options.library.type\n : 'script');\n if (\n library &&\n !compiler.options.output.enabledLibraryTypes?.includes(library.type)\n ) {\n compiler.options.output.enabledLibraryTypes?.push(library.type);\n }\n compiler.hooks.afterPlugins.tap('ModuleFederationPlugin', () => {\n if (\n options.exposes &&\n (Array.isArray(options.exposes)\n ? options.exposes.length > 0\n : Object.keys(options.exposes).length > 0)\n ) {\n new ContainerPlugin({\n //@ts-ignore\n name: options.name,\n library,\n filename: options.filename,\n runtime: options.runtime,\n shareScope: options.shareScope,\n exposes: options.exposes,\n }).apply(compiler);\n }\n if (\n options.remotes &&\n (Array.isArray(options.remotes)\n ? options.remotes.length > 0\n : Object.keys(options.remotes).length > 0)\n ) {\n new ContainerReferencePlugin({\n //@ts-ignore\n remoteType,\n shareScope: options.shareScope,\n remotes: options.remotes,\n }).apply(compiler);\n }\n if (options.shared) {\n new SharePlugin({\n shared: options.shared,\n shareScope: options.shareScope,\n }).apply(compiler);\n }\n });\n }\n}\n\nexport default ModuleFederationPlugin;\n"],"names":["validate","createSchemaValidation","checkOptions","schema","name","baseDataPath","ModuleFederationPlugin","apply","compiler","_options","options","library","type","remoteType","isValidExternalsType","output","enabledLibraryTypes","includes","push","hooks","afterPlugins","tap","exposes","Array","isArray","length","Object","keys","ContainerPlugin","filename","runtime","shareScope","remotes","ContainerReferencePlugin","shared","SharePlugin","constructor"],"mappings":"AAAA;;;AAGA,GAEA;;;;+BA4FA;;;eAAA;;;2EAzFiC;oEAET;+EACW;wEACP;iFACS;oFACZ;+EACN;;;;;;AAEnB,MAAMA,WAAWC,IAAAA,+BAAsB,EACrC,0BAA0B;AAC1BC,oCAAY,EACZ,IAAMC,+BAAM,EACZ;IACEC,MAAM;IACNC,cAAc;AAChB;AAGF,IAAA,AAAMC,yBAAN,MAAMA;IAWJ;;;;GAIC,GACDC,MAAMC,QAAkB,EAAQ;YAU3BA;QATH,MAAM,EAAEC,UAAUC,OAAO,EAAE,GAAG,IAAI;QAClC,MAAMC,UAAUD,QAAQC,OAAO,IAAI;YAAEC,MAAM;YAAOR,MAAMM,QAAQN,IAAI;QAAC;QACrE,MAAMS,aACJH,QAAQG,UAAU,IACjBH,CAAAA,QAAQC,OAAO,IAAIG,IAAAA,2BAAoB,EAACJ,QAAQC,OAAO,CAACC,IAAI,IACzDF,QAAQC,OAAO,CAACC,IAAI,GACpB,QAAO;QACb,IACED,WACA,GAACH,+CAAAA,SAASE,OAAO,CAACK,MAAM,CAACC,mBAAmB,qBAA3CR,6CAA6CS,QAAQ,CAACN,QAAQC,IAAI,IACnE;gBACAJ;aAAAA,gDAAAA,SAASE,OAAO,CAACK,MAAM,CAACC,mBAAmB,qBAA3CR,8CAA6CU,IAAI,CAACP,QAAQC,IAAI;QAChE;QACAJ,SAASW,KAAK,CAACC,YAAY,CAACC,GAAG,CAAC,0BAA0B;YACxD,IACEX,QAAQY,OAAO,IACdC,CAAAA,MAAMC,OAAO,CAACd,QAAQY,OAAO,IAC1BZ,QAAQY,OAAO,CAACG,MAAM,GAAG,IACzBC,OAAOC,IAAI,CAACjB,QAAQY,OAAO,EAAEG,MAAM,GAAG,CAAA,GAC1C;gBACA,IAAIG,wBAAe,CAAC;oBAClB,YAAY;oBACZxB,MAAMM,QAAQN,IAAI;oBAClBO;oBACAkB,UAAUnB,QAAQmB,QAAQ;oBAC1BC,SAASpB,QAAQoB,OAAO;oBACxBC,YAAYrB,QAAQqB,UAAU;oBAC9BT,SAASZ,QAAQY,OAAO;gBAC1B,GAAGf,KAAK,CAACC;YACX;YACA,IACEE,QAAQsB,OAAO,IACdT,CAAAA,MAAMC,OAAO,CAACd,QAAQsB,OAAO,IAC1BtB,QAAQsB,OAAO,CAACP,MAAM,GAAG,IACzBC,OAAOC,IAAI,CAACjB,QAAQsB,OAAO,EAAEP,MAAM,GAAG,CAAA,GAC1C;gBACA,IAAIQ,iCAAwB,CAAC;oBAC3B,YAAY;oBACZpB;oBACAkB,YAAYrB,QAAQqB,UAAU;oBAC9BC,SAAStB,QAAQsB,OAAO;gBAC1B,GAAGzB,KAAK,CAACC;YACX;YACA,IAAIE,QAAQwB,MAAM,EAAE;gBAClB,IAAIC,oBAAW,CAAC;oBACdD,QAAQxB,QAAQwB,MAAM;oBACtBH,YAAYrB,QAAQqB,UAAU;gBAChC,GAAGxB,KAAK,CAACC;YACX;QACF;IACF;IAjEA;;GAEC,GACD4B,YAAY1B,OAAsC,CAAE;QAClDV,SAASU;QAET,IAAI,CAACD,QAAQ,GAAGC;IAClB;AA2DF;MAEA,WAAeJ"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This file was automatically generated.
|
|
3
|
-
* DO NOT MODIFY BY HAND.
|
|
4
|
-
* Run `yarn special-lint-fix` to update
|
|
5
|
-
*/ /**
|
|
6
|
-
* Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
|
|
7
|
-
*/ "use strict";
|
|
8
|
-
Object.defineProperty(exports, "__esModule", {
|
|
9
|
-
value: true
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=ModuleFederationPluginTypes.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ModuleFederationPluginTypes.d.ts"],"sourcesContent":["/*\n * This file was automatically generated.\n * DO NOT MODIFY BY HAND.\n * Run `yarn special-lint-fix` to update\n */\n\n/**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\nexport type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;\n/**\n * Module that should be exposed by this container.\n */\nexport type ExposesItem = string;\n/**\n * Modules that should be exposed by this container.\n */\nexport type ExposesItems = ExposesItem[];\n/**\n * Add a container for define/require functions in the AMD module.\n */\nexport type AmdContainer = string;\n/**\n * Add a comment in the UMD wrapper.\n */\nexport type AuxiliaryComment = string | LibraryCustomUmdCommentObject;\n/**\n * Specify which export should be exposed as library.\n */\nexport type LibraryExport = string[] | string;\n/**\n * The name of the library (some types allow unnamed libraries too).\n */\nexport type LibraryName = string[] | string | LibraryCustomUmdObject;\n/**\n * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\n */\nexport type LibraryType =\n | (\n | 'var'\n | 'module'\n | 'assign'\n | 'assign-properties'\n | 'this'\n | 'window'\n | 'self'\n | 'global'\n | 'commonjs'\n | 'commonjs2'\n | 'commonjs-module'\n | 'commonjs-static'\n | 'amd'\n | 'amd-require'\n | 'umd'\n | 'umd2'\n | 'jsonp'\n | 'system'\n )\n | string;\n/**\n * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\n */\nexport type UmdNamedDefine = boolean;\n/**\n * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).\n */\nexport type ExternalsType =\n | 'var'\n | 'module'\n | 'assign'\n | 'this'\n | 'window'\n | 'self'\n | 'global'\n | 'commonjs'\n | 'commonjs2'\n | 'commonjs-module'\n | 'commonjs-static'\n | 'amd'\n | 'amd-require'\n | 'umd'\n | 'umd2'\n | 'jsonp'\n | 'system'\n | 'promise'\n | 'import'\n | 'script'\n | 'node-commonjs';\n/**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\nexport type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;\n/**\n * Container location from which modules should be resolved and loaded at runtime.\n */\nexport type RemotesItem = string;\n/**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\nexport type RemotesItems = RemotesItem[];\n/**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\nexport type EntryRuntime = false | string;\n/**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\nexport type Shared = (SharedItem | SharedObject)[] | SharedObject;\n/**\n * A module that should be shared in the share scope.\n */\nexport type SharedItem = string;\n\nexport interface ModuleFederationPluginOptions {\n /**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\n exposes?: Exposes;\n /**\n * The filename of the container as relative path inside the `output.path` directory.\n */\n filename?: string;\n /**\n * Options for library.\n */\n library?: LibraryOptions;\n /**\n * The name of the container.\n */\n name?: string;\n /**\n * The external type of the remote containers.\n */\n remoteType?: ExternalsType;\n /**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\n remotes?: Remotes;\n /**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\n runtime?: EntryRuntime;\n /**\n * Share scope name used for all shared modules (defaults to 'default').\n */\n shareScope?: string;\n /**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\n shared?: Shared;\n}\n/**\n * Modules that should be exposed by this container. Property names are used as public paths.\n */\nexport interface ExposesObject {\n /**\n * Modules that should be exposed by this container.\n */\n [k: string]: ExposesConfig | ExposesItem | ExposesItems;\n}\n/**\n * Advanced configuration for modules that should be exposed by this container.\n */\nexport interface ExposesConfig {\n /**\n * Request to a module that should be exposed by this container.\n */\n import: ExposesItem | ExposesItems;\n /**\n * Custom chunk name for the exposed module.\n */\n name?: string;\n}\n/**\n * Options for library.\n */\nexport interface LibraryOptions {\n /**\n * Add a container for define/require functions in the AMD module.\n */\n amdContainer?: AmdContainer;\n /**\n * Add a comment in the UMD wrapper.\n */\n auxiliaryComment?: AuxiliaryComment;\n /**\n * Specify which export should be exposed as library.\n */\n export?: LibraryExport;\n /**\n * The name of the library (some types allow unnamed libraries too).\n */\n name?: LibraryName;\n /**\n * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\n */\n type: LibraryType;\n /**\n * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\n */\n umdNamedDefine?: UmdNamedDefine;\n}\n/**\n * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\n */\nexport interface LibraryCustomUmdCommentObject {\n /**\n * Set comment for `amd` section in UMD.\n */\n amd?: string;\n /**\n * Set comment for `commonjs` (exports) section in UMD.\n */\n commonjs?: string;\n /**\n * Set comment for `commonjs2` (module.exports) section in UMD.\n */\n commonjs2?: string;\n /**\n * Set comment for `root` (global variable) section in UMD.\n */\n root?: string;\n}\n/**\n * Description object for all UMD variants of the library name.\n */\nexport interface LibraryCustomUmdObject {\n /**\n * Name of the exposed AMD library in the UMD.\n */\n amd?: string;\n /**\n * Name of the exposed commonjs export in the UMD.\n */\n commonjs?: string;\n /**\n * Name of the property exposed globally by a UMD library.\n */\n root?: string[] | string;\n}\n/**\n * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.\n */\nexport interface RemotesObject {\n /**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\n [k: string]: RemotesConfig | RemotesItem | RemotesItems;\n}\n/**\n * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.\n */\nexport interface RemotesConfig {\n /**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\n external: RemotesItem | RemotesItems;\n /**\n * The name of the share scope shared with this remote.\n */\n shareScope?: string;\n}\n/**\n * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.\n */\nexport interface SharedObject {\n /**\n * Modules that should be shared in the share scope.\n */\n [k: string]: SharedConfig | SharedItem;\n}\n/**\n * Advanced configuration for modules that should be shared in the share scope.\n */\nexport interface SharedConfig {\n /**\n * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.\n */\n eager?: boolean;\n /**\n * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.\n */\n import?: false | SharedItem;\n /**\n * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.\n */\n packageName?: string;\n /**\n * Version requirement from module in share scope.\n */\n requiredVersion?: false | string;\n /**\n * Module is looked up under this key from the share scope.\n */\n shareKey?: string;\n /**\n * Share scope name.\n */\n shareScope?: string;\n /**\n * Allow only a single version of the shared module in share scope (disabled by default).\n */\n singleton?: boolean;\n /**\n * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).\n */\n strictVersion?: boolean;\n /**\n * Version of the provided module. Will replace lower matching versions, but not higher.\n */\n version?: false | string;\n}\n"],"names":[],"mappings":"AAAA;;;;CAIC,GAED;;CAEC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _default;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _default = RemoteModule;
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=RemoteModule.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/RemoteModule.d.ts"],"sourcesContent":["export default RemoteModule;\ndeclare class RemoteModule extends Module {\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {RemoteModule} deserialized module\n */\n static deserialize(context: ObjectDeserializerContext): RemoteModule;\n /**\n * @param {string} request request string\n * @param {string[]} externalRequests list of external requests to containers\n * @param {string} internalRequest name of exposed module in container\n * @param {string} shareScope the used share scope name\n */\n constructor(\n request: string,\n externalRequests: string[],\n internalRequest: string,\n shareScope: string,\n );\n request: string;\n externalRequests: string[];\n internalRequest: string;\n shareScope: string;\n _identifier: string;\n /**\n * @param {NeedBuildContext} context context info\n * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild\n * @returns {void}\n */\n needBuild(\n context: NeedBuildContext,\n callback: (\n arg0: (WebpackError | null) | undefined,\n arg1: boolean | undefined,\n ) => void,\n ): void;\n /**\n * @param {WebpackOptions} options webpack options\n * @param {Compilation} compilation the compilation\n * @param {ResolverWithOptions} resolver the resolver\n * @param {InputFileSystem} fs the file system\n * @param {function(WebpackError=): void} callback callback function\n * @returns {void}webpack\n */\n build(\n options: WebpackOptions,\n compilation: Compilation,\n resolver: ResolverWithOptions,\n fs: InputFileSystem,\n callback: (arg0: WebpackError | undefined) => void,\n ): void;\n}\ndeclare namespace RemoteModule {\n export {\n WebpackOptionsohunkGraph,\n ChunkGroup,\n Compilation,\n CodeGenerationContext,\n CodeGenerationResult,\n LibIdentOptions,\n NeedBuildContext,\n RequestShortener,\n ResolverWithOptions,\n WebpackError,\n ObjectDeserializerContext,\n ObjectSerializerContext,\n Hash,\n InputFileSystem,\n };\n}\nimport Module = require('webpack/lib/Module');\ntype NeedBuildContext = import('webpack/lib/Module').NeedBuildContext;\ntype WebpackError = import('webpack/lib/WebpackError');\ntype WebpackOptions =\n import('webpack/declarations/WebpackOptions').WebpackOptionsNormalized;\ntype Compilation = import('webpack/lib/Compilation');\ntype ResolverWithOptions =\n import('webpack/lib/ResolverFactory').ResolverWithOptions;\ntype InputFileSystem = import('webpack/lib/util/fs').InputFileSystem;\ntype ObjectDeserializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;\ntype ChunkGraph = import('webpack/lib/ChunkGraph');\ntype ChunkGroup = import('webpack/lib/ChunkGroup');\ntype CodeGenerationContext = import('webpack/lib/Module').CodeGenerationContext;\ntype CodeGenerationResult = import('webpack/lib/Module').CodeGenerationResult;\ntype LibIdentOptions = import('webpack/lib/Module').LibIdentOptions;\ntype RequestShortener = import('webpack/lib/RequestShortener');\ntype ObjectSerializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectSerializerContext;\ntype Hash = import('webpack/lib/util/Hash');\n"],"names":["RemoteModule"],"mappings":";;;;+BAAA;;;eAAA;;;MAAA,WAAeA"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { CodeGenerationContext, CodeGenerationResult, LibIdentOptions, NeedBuildContext, WebpackError } from 'webpack/lib/Module';
|
|
2
|
-
import Module from 'webpack/lib/Module';
|
|
3
|
-
import type Compilation from 'webpack/lib/Compilation';
|
|
4
|
-
import type { ResolverWithOptions } from 'webpack/lib/ResolverFactory';
|
|
5
|
-
import type { InputFileSystem } from 'webpack/lib/FileSystemInfo';
|
|
6
|
-
import type { RequestShortener } from 'webpack/lib/RuntimeModule';
|
|
7
|
-
import type { WebpackOptionsNormalized } from 'webpack/lib/WebpackOptionsDefaulter';
|
|
8
|
-
import type { ObjectDeserializerContext } from 'webpack/lib/serialization/ObjectMiddleware';
|
|
9
|
-
declare class RemoteModule extends Module {
|
|
10
|
-
private _identifier;
|
|
11
|
-
request: string;
|
|
12
|
-
externalRequests: string[];
|
|
13
|
-
internalRequest: string;
|
|
14
|
-
shareScope: string;
|
|
15
|
-
/**
|
|
16
|
-
* @param {string} request request string
|
|
17
|
-
* @param {string[]} externalRequests list of external requests to containers
|
|
18
|
-
* @param {string} internalRequest name of exposed module in container
|
|
19
|
-
* @param {string} shareScope the used share scope name
|
|
20
|
-
*/
|
|
21
|
-
constructor(request: string, externalRequests: string[], internalRequest: string, shareScope: string);
|
|
22
|
-
/**
|
|
23
|
-
* @returns {string} a unique identifier of the module
|
|
24
|
-
*/
|
|
25
|
-
identifier(): string;
|
|
26
|
-
/**
|
|
27
|
-
* @param {RequestShortener} requestShortener the request shortener
|
|
28
|
-
* @returns {string} a user readable identifier of the module
|
|
29
|
-
*/
|
|
30
|
-
readableIdentifier(requestShortener: RequestShortener): string;
|
|
31
|
-
/**
|
|
32
|
-
* @param {LibIdentOptions} options options
|
|
33
|
-
* @returns {string | null} an identifier for library inclusion
|
|
34
|
-
*/
|
|
35
|
-
libIdent(options: LibIdentOptions): string | null;
|
|
36
|
-
/**
|
|
37
|
-
* @param {NeedBuildContext} context context info
|
|
38
|
-
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
39
|
-
* @returns {void}
|
|
40
|
-
*/
|
|
41
|
-
needBuild(context: NeedBuildContext, callback: (err: WebpackError | null, needsRebuild?: boolean) => void): void;
|
|
42
|
-
/**
|
|
43
|
-
* @param {WebpackOptions} options webpack options
|
|
44
|
-
* @param {Compilation} compilation the compilation
|
|
45
|
-
* @param {ResolverWithOptions} resolver the resolver
|
|
46
|
-
* @param {InputFileSystem} fs the file system
|
|
47
|
-
* @param {function(WebpackError=): void} callback callback function
|
|
48
|
-
* @returns {void}
|
|
49
|
-
*/
|
|
50
|
-
build(options: WebpackOptionsNormalized, compilation: Compilation, resolver: ResolverWithOptions, fs: InputFileSystem, callback: (err?: WebpackError | undefined) => void): void;
|
|
51
|
-
/**
|
|
52
|
-
* @param {string=} type the source type for which the size should be estimated
|
|
53
|
-
* @returns {number} the estimated size of the module (must be non-zero)
|
|
54
|
-
*/
|
|
55
|
-
size(type?: string): number;
|
|
56
|
-
/**
|
|
57
|
-
* @returns {Set<string>} types available (do not mutate)
|
|
58
|
-
*/
|
|
59
|
-
getSourceTypes(): Set<string>;
|
|
60
|
-
/**
|
|
61
|
-
* @returns {string | null} absolute path which should be used for condition matching (usually the resource path)
|
|
62
|
-
*/
|
|
63
|
-
nameForCondition(): string | null;
|
|
64
|
-
/**
|
|
65
|
-
* @param {CodeGenerationContext} context context for code generation
|
|
66
|
-
* @returns {CodeGenerationResult} result
|
|
67
|
-
*/
|
|
68
|
-
codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
|
|
69
|
-
serialize(context: any): void;
|
|
70
|
-
/**
|
|
71
|
-
* @param {ObjectDeserializerContext} context context
|
|
72
|
-
* @returns {RemoteModule} deserialized module
|
|
73
|
-
*/
|
|
74
|
-
static deserialize(context: ObjectDeserializerContext): RemoteModule;
|
|
75
|
-
}
|
|
76
|
-
export default RemoteModule;
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy
|
|
4
|
-
*/ "use strict";
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return _default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _webpacksources = require("webpack-sources");
|
|
15
|
-
const _Module = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Module"));
|
|
16
|
-
const _RuntimeGlobals = /*#__PURE__*/ _interop_require_default(require("webpack/lib/RuntimeGlobals"));
|
|
17
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
|
|
18
|
-
const _FallbackDependency = /*#__PURE__*/ _interop_require_default(require("./FallbackDependency"));
|
|
19
|
-
const _RemoteToExternalDependency = /*#__PURE__*/ _interop_require_default(require("./RemoteToExternalDependency"));
|
|
20
|
-
const _ModuleTypeConstants = require("webpack/lib/ModuleTypeConstants");
|
|
21
|
-
function _interop_require_default(obj) {
|
|
22
|
-
return obj && obj.__esModule ? obj : {
|
|
23
|
-
default: obj
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const TYPES = new Set([
|
|
27
|
-
'remote',
|
|
28
|
-
'share-init'
|
|
29
|
-
]);
|
|
30
|
-
const RUNTIME_REQUIREMENTS = new Set([
|
|
31
|
-
_RuntimeGlobals.default.module
|
|
32
|
-
]);
|
|
33
|
-
let RemoteModule = class RemoteModule extends _Module.default {
|
|
34
|
-
/**
|
|
35
|
-
* @returns {string} a unique identifier of the module
|
|
36
|
-
*/ identifier() {
|
|
37
|
-
return this._identifier;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @param {RequestShortener} requestShortener the request shortener
|
|
41
|
-
* @returns {string} a user readable identifier of the module
|
|
42
|
-
*/ readableIdentifier(requestShortener) {
|
|
43
|
-
return `remote ${this.request}`;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @param {LibIdentOptions} options options
|
|
47
|
-
* @returns {string | null} an identifier for library inclusion
|
|
48
|
-
*/ libIdent(options) {
|
|
49
|
-
return `${this.layer ? `(${this.layer})/` : ''}webpack/container/remote/${this.request}`;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @param {NeedBuildContext} context context info
|
|
53
|
-
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
54
|
-
* @returns {void}
|
|
55
|
-
*/ needBuild(context, callback) {
|
|
56
|
-
callback(null, !this.buildInfo);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @param {WebpackOptions} options webpack options
|
|
60
|
-
* @param {Compilation} compilation the compilation
|
|
61
|
-
* @param {ResolverWithOptions} resolver the resolver
|
|
62
|
-
* @param {InputFileSystem} fs the file system
|
|
63
|
-
* @param {function(WebpackError=): void} callback callback function
|
|
64
|
-
* @returns {void}
|
|
65
|
-
*/ build(options, compilation, resolver, fs, callback) {
|
|
66
|
-
this.buildMeta = {};
|
|
67
|
-
this.buildInfo = {
|
|
68
|
-
strict: true
|
|
69
|
-
};
|
|
70
|
-
this.clearDependenciesAndBlocks();
|
|
71
|
-
if (this.externalRequests.length === 1) {
|
|
72
|
-
this.addDependency(new _RemoteToExternalDependency.default(this.externalRequests[0]));
|
|
73
|
-
} else {
|
|
74
|
-
this.addDependency(new _FallbackDependency.default(this.externalRequests));
|
|
75
|
-
}
|
|
76
|
-
callback();
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* @param {string=} type the source type for which the size should be estimated
|
|
80
|
-
* @returns {number} the estimated size of the module (must be non-zero)
|
|
81
|
-
*/ size(type) {
|
|
82
|
-
return 6;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @returns {Set<string>} types available (do not mutate)
|
|
86
|
-
*/ getSourceTypes() {
|
|
87
|
-
return TYPES;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* @returns {string | null} absolute path which should be used for condition matching (usually the resource path)
|
|
91
|
-
*/ nameForCondition() {
|
|
92
|
-
return this.request;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* @param {CodeGenerationContext} context context for code generation
|
|
96
|
-
* @returns {CodeGenerationResult} result
|
|
97
|
-
*/ codeGeneration(context) {
|
|
98
|
-
const { runtimeTemplate, moduleGraph, chunkGraph } = context;
|
|
99
|
-
const module = moduleGraph.getModule(this.dependencies[0]);
|
|
100
|
-
const id = module && chunkGraph.getModuleId(module);
|
|
101
|
-
const sources = new Map();
|
|
102
|
-
sources.set('remote', new _webpacksources.RawSource(''));
|
|
103
|
-
const data = new Map();
|
|
104
|
-
data.set('share-init', [
|
|
105
|
-
{
|
|
106
|
-
shareScope: this.shareScope,
|
|
107
|
-
initStage: 20,
|
|
108
|
-
init: id === undefined ? '' : `initExternal(${JSON.stringify(id)});`
|
|
109
|
-
}
|
|
110
|
-
]);
|
|
111
|
-
return {
|
|
112
|
-
sources,
|
|
113
|
-
data,
|
|
114
|
-
runtimeRequirements: RUNTIME_REQUIREMENTS
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
serialize(context) {
|
|
118
|
-
const { write } = context;
|
|
119
|
-
write(this.request);
|
|
120
|
-
write(this.externalRequests);
|
|
121
|
-
write(this.internalRequest);
|
|
122
|
-
write(this.shareScope);
|
|
123
|
-
super.serialize(context);
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* @param {ObjectDeserializerContext} context context
|
|
127
|
-
* @returns {RemoteModule} deserialized module
|
|
128
|
-
*/ static deserialize(context) {
|
|
129
|
-
const { read } = context;
|
|
130
|
-
const obj = new RemoteModule(read(), read(), read(), read());
|
|
131
|
-
obj.deserialize(context);
|
|
132
|
-
return obj;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* @param {string} request request string
|
|
136
|
-
* @param {string[]} externalRequests list of external requests to containers
|
|
137
|
-
* @param {string} internalRequest name of exposed module in container
|
|
138
|
-
* @param {string} shareScope the used share scope name
|
|
139
|
-
*/ constructor(request, externalRequests, internalRequest, shareScope){
|
|
140
|
-
super(_ModuleTypeConstants.WEBPACK_MODULE_TYPE_REMOTE);
|
|
141
|
-
this.request = request;
|
|
142
|
-
this.externalRequests = externalRequests;
|
|
143
|
-
this.internalRequest = internalRequest;
|
|
144
|
-
this.shareScope = shareScope;
|
|
145
|
-
this._identifier = `remote (${shareScope}) ${this.externalRequests.join(' ')} ${this.internalRequest}`;
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
(0, _makeSerializable.default)(RemoteModule, 'enhanced/lib/container/RemoteModule');
|
|
149
|
-
const _default = RemoteModule;
|
|
150
|
-
|
|
151
|
-
//# sourceMappingURL=RemoteModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/RemoteModule.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\n\nimport { RawSource } from 'webpack-sources';\nimport type {\n CodeGenerationContext,\n CodeGenerationResult,\n LibIdentOptions,\n NeedBuildContext,\n WebpackError,\n} from 'webpack/lib/Module';\nimport Module from 'webpack/lib/Module';\nimport RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\nimport FallbackDependency from './FallbackDependency';\nimport RemoteToExternalDependency from './RemoteToExternalDependency';\nimport type Compilation from 'webpack/lib/Compilation';\nimport type { ResolverWithOptions } from 'webpack/lib/ResolverFactory';\nimport type { InputFileSystem } from 'webpack/lib/FileSystemInfo';\nimport type { RequestShortener } from 'webpack/lib/RuntimeModule';\nimport { WEBPACK_MODULE_TYPE_REMOTE } from 'webpack/lib/ModuleTypeConstants';\nimport type { WebpackOptionsNormalized } from 'webpack/lib/WebpackOptionsDefaulter';\nimport type { ObjectDeserializerContext } from 'webpack/lib/serialization/ObjectMiddleware';\n\nconst TYPES: Set<string> = new Set(['remote', 'share-init']);\nconst RUNTIME_REQUIREMENTS: Set<string> = new Set([RuntimeGlobals.module]);\n\nclass RemoteModule extends Module {\n private _identifier: string;\n public request: string;\n public externalRequests: string[];\n public internalRequest: string;\n public shareScope: string;\n\n /**\n * @param {string} request request string\n * @param {string[]} externalRequests list of external requests to containers\n * @param {string} internalRequest name of exposed module in container\n * @param {string} shareScope the used share scope name\n */\n constructor(\n request: string,\n externalRequests: string[],\n internalRequest: string,\n shareScope: string,\n ) {\n super(WEBPACK_MODULE_TYPE_REMOTE);\n this.request = request;\n this.externalRequests = externalRequests;\n this.internalRequest = internalRequest;\n this.shareScope = shareScope;\n this._identifier = `remote (${shareScope}) ${this.externalRequests.join(\n ' ',\n )} ${this.internalRequest}`;\n }\n\n /**\n * @returns {string} a unique identifier of the module\n */\n override identifier(): string {\n return this._identifier;\n }\n\n /**\n * @param {RequestShortener} requestShortener the request shortener\n * @returns {string} a user readable identifier of the module\n */\n override readableIdentifier(requestShortener: RequestShortener): string {\n return `remote ${this.request}`;\n }\n\n /**\n * @param {LibIdentOptions} options options\n * @returns {string | null} an identifier for library inclusion\n */\n override libIdent(options: LibIdentOptions): string | null {\n return `${this.layer ? `(${this.layer})/` : ''}webpack/container/remote/${\n this.request\n }`;\n }\n\n /**\n * @param {NeedBuildContext} context context info\n * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild\n * @returns {void}\n */\n override needBuild(\n context: NeedBuildContext,\n callback: (err: WebpackError | null, needsRebuild?: boolean) => void,\n ): void {\n callback(null, !this.buildInfo);\n }\n\n /**\n * @param {WebpackOptions} options webpack options\n * @param {Compilation} compilation the compilation\n * @param {ResolverWithOptions} resolver the resolver\n * @param {InputFileSystem} fs the file system\n * @param {function(WebpackError=): void} callback callback function\n * @returns {void}\n */\n override build(\n options: WebpackOptionsNormalized,\n compilation: Compilation,\n resolver: ResolverWithOptions,\n fs: InputFileSystem,\n callback: (err?: WebpackError | undefined) => void,\n ): void {\n this.buildMeta = {};\n this.buildInfo = {\n strict: true,\n };\n\n this.clearDependenciesAndBlocks();\n if (this.externalRequests.length === 1) {\n this.addDependency(\n new RemoteToExternalDependency(this.externalRequests[0]),\n );\n } else {\n this.addDependency(new FallbackDependency(this.externalRequests));\n }\n\n callback();\n }\n\n /**\n * @param {string=} type the source type for which the size should be estimated\n * @returns {number} the estimated size of the module (must be non-zero)\n */\n override size(type?: string): number {\n return 6;\n }\n\n /**\n * @returns {Set<string>} types available (do not mutate)\n */\n override getSourceTypes(): Set<string> {\n return TYPES;\n }\n\n /**\n * @returns {string | null} absolute path which should be used for condition matching (usually the resource path)\n */\n override nameForCondition(): string | null {\n return this.request;\n }\n\n /**\n * @param {CodeGenerationContext} context context for code generation\n * @returns {CodeGenerationResult} result\n */\n override codeGeneration(\n context: CodeGenerationContext,\n ): CodeGenerationResult {\n const { runtimeTemplate, moduleGraph, chunkGraph } = context;\n const module = moduleGraph.getModule(this.dependencies[0]);\n const id = module && chunkGraph.getModuleId(module);\n const sources = new Map();\n sources.set('remote', new RawSource(''));\n const data = new Map();\n data.set('share-init', [\n {\n shareScope: this.shareScope,\n initStage: 20,\n init: id === undefined ? '' : `initExternal(${JSON.stringify(id)});`,\n },\n ]);\n return { sources, data, runtimeRequirements: RUNTIME_REQUIREMENTS };\n }\n override serialize(context: any) {\n const { write } = context;\n write(this.request);\n write(this.externalRequests);\n write(this.internalRequest);\n write(this.shareScope);\n super.serialize(context);\n }\n\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {RemoteModule} deserialized module\n */\n static deserialize(context: ObjectDeserializerContext): RemoteModule {\n const { read } = context;\n const obj = new RemoteModule(read(), read(), read(), read());\n obj.deserialize(context);\n return obj;\n }\n}\n\nmakeSerializable(RemoteModule, 'enhanced/lib/container/RemoteModule');\n\nexport default RemoteModule;\n"],"names":["TYPES","Set","RUNTIME_REQUIREMENTS","RuntimeGlobals","module","RemoteModule","Module","identifier","_identifier","readableIdentifier","requestShortener","request","libIdent","options","layer","needBuild","context","callback","buildInfo","build","compilation","resolver","fs","buildMeta","strict","clearDependenciesAndBlocks","externalRequests","length","addDependency","RemoteToExternalDependency","FallbackDependency","size","type","getSourceTypes","nameForCondition","codeGeneration","runtimeTemplate","moduleGraph","chunkGraph","getModule","dependencies","id","getModuleId","sources","Map","set","RawSource","data","shareScope","initStage","init","undefined","JSON","stringify","runtimeRequirements","serialize","write","internalRequest","deserialize","read","obj","constructor","WEBPACK_MODULE_TYPE_REMOTE","join","makeSerializable"],"mappings":"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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _default;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _default = RemoteRuntimeModule;
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=RemoteRuntimeModule.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/RemoteRuntimeModule.d.ts"],"sourcesContent":["export default RemoteRuntimeModule;\n/** @typedef {import(\"webpack/lib/Chunk\")} Chunk */\n/** @typedef {import(\"./RemoteModule\")} RemoteModule */\ndeclare class RemoteRuntimeModule extends RuntimeModule {\n constructor();\n}\ndeclare namespace RemoteRuntimeModule {\n export { Chunk, RemoteModule };\n}\nimport RuntimeModule = require('webpack/lib/RuntimeModule');\ntype Chunk = import('webpack/lib/Chunk');\ntype RemoteModule = import('./RemoteModule');\n"],"names":["RemoteRuntimeModule"],"mappings":";;;;+BAAA;;;eAAA;;;MAAA,WAAeA"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy
|
|
4
|
-
*/ "use strict";
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return _default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _RuntimeGlobals = /*#__PURE__*/ _interop_require_default(require("webpack/lib/RuntimeGlobals"));
|
|
15
|
-
const _RuntimeModule = /*#__PURE__*/ _interop_require_default(require("webpack/lib/RuntimeModule"));
|
|
16
|
-
const _Template = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Template"));
|
|
17
|
-
function _interop_require_default(obj) {
|
|
18
|
-
return obj && obj.__esModule ? obj : {
|
|
19
|
-
default: obj
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
let RemoteRuntimeModule = class RemoteRuntimeModule extends _RuntimeModule.default {
|
|
23
|
-
/**
|
|
24
|
-
* @returns {string | null} runtime code
|
|
25
|
-
*/ generate() {
|
|
26
|
-
var _this_chunk;
|
|
27
|
-
const { compilation, chunkGraph } = this;
|
|
28
|
-
const { runtimeTemplate, moduleGraph } = compilation;
|
|
29
|
-
const chunkToRemotesMapping = {};
|
|
30
|
-
const idToExternalAndNameMapping = {};
|
|
31
|
-
const allChunks = [
|
|
32
|
-
...Array.from(((_this_chunk = this.chunk) == null ? void 0 : _this_chunk.getAllReferencedChunks()) || [])
|
|
33
|
-
];
|
|
34
|
-
for (const chunk of allChunks){
|
|
35
|
-
const modules = chunkGraph == null ? void 0 : chunkGraph.getChunkModulesIterableBySourceType(chunk, 'remote');
|
|
36
|
-
if (!modules) {
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
// @ts-ignore
|
|
40
|
-
const remotes = chunkToRemotesMapping[chunk.id] = [];
|
|
41
|
-
for (const m of modules){
|
|
42
|
-
const module = m;
|
|
43
|
-
const name = module.internalRequest;
|
|
44
|
-
const id = chunkGraph ? chunkGraph.getModuleId(module) : undefined;
|
|
45
|
-
const { shareScope } = module;
|
|
46
|
-
const dep = module.dependencies[0];
|
|
47
|
-
const externalModule = moduleGraph.getModule(dep);
|
|
48
|
-
const externalModuleId = chunkGraph && externalModule ? chunkGraph.getModuleId(externalModule) : undefined;
|
|
49
|
-
if (id !== undefined) {
|
|
50
|
-
//@ts-ignore
|
|
51
|
-
remotes.push(id);
|
|
52
|
-
idToExternalAndNameMapping[id] = [
|
|
53
|
-
shareScope,
|
|
54
|
-
name,
|
|
55
|
-
externalModuleId
|
|
56
|
-
];
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return _Template.default.asString([
|
|
61
|
-
`var chunkMapping = ${JSON.stringify(chunkToRemotesMapping, null, '\t')};`,
|
|
62
|
-
`var idToExternalAndNameMapping = ${JSON.stringify(idToExternalAndNameMapping, null, '\t')};`,
|
|
63
|
-
`${_RuntimeGlobals.default.ensureChunkHandlers}.remotes = ${runtimeTemplate.basicFunction('chunkId, promises', [
|
|
64
|
-
`if(${_RuntimeGlobals.default.hasOwnProperty}(chunkMapping, chunkId)) {`,
|
|
65
|
-
_Template.default.indent([
|
|
66
|
-
`chunkMapping[chunkId].forEach(${runtimeTemplate.basicFunction('id', [
|
|
67
|
-
`var getScope = ${_RuntimeGlobals.default.currentRemoteGetScope};`,
|
|
68
|
-
'if(!getScope) getScope = [];',
|
|
69
|
-
'var data = idToExternalAndNameMapping[id];',
|
|
70
|
-
'if(getScope.indexOf(data) >= 0) return;',
|
|
71
|
-
'getScope.push(data);',
|
|
72
|
-
`if(data.p) return promises.push(data.p);`,
|
|
73
|
-
`var onError = ${runtimeTemplate.basicFunction('error', [
|
|
74
|
-
'if(!error) error = new Error("Container missing");',
|
|
75
|
-
'if(typeof error.message === "string")',
|
|
76
|
-
_Template.default.indent(`error.message += '\\nwhile loading "' + data[1] + '" from ' + data[2];`),
|
|
77
|
-
`${_RuntimeGlobals.default.moduleFactories}[id] = ${runtimeTemplate.basicFunction('', [
|
|
78
|
-
'throw error;'
|
|
79
|
-
])}`,
|
|
80
|
-
'data.p = 0;'
|
|
81
|
-
])};`,
|
|
82
|
-
`var handleFunction = ${runtimeTemplate.basicFunction('fn, arg1, arg2, d, next, first', [
|
|
83
|
-
'try {',
|
|
84
|
-
_Template.default.indent([
|
|
85
|
-
'var promise = fn(arg1, arg2);',
|
|
86
|
-
'if(promise && promise.then) {',
|
|
87
|
-
_Template.default.indent([
|
|
88
|
-
`var p = promise.then(${runtimeTemplate.returningFunction('next(result, d)', 'result')}, onError);`,
|
|
89
|
-
`if(first) promises.push(data.p = p); else return p;`
|
|
90
|
-
]),
|
|
91
|
-
'} else {',
|
|
92
|
-
_Template.default.indent([
|
|
93
|
-
'return next(promise, d, first);'
|
|
94
|
-
]),
|
|
95
|
-
'}'
|
|
96
|
-
]),
|
|
97
|
-
'} catch(error) {',
|
|
98
|
-
_Template.default.indent([
|
|
99
|
-
'onError(error);'
|
|
100
|
-
]),
|
|
101
|
-
'}'
|
|
102
|
-
])}`,
|
|
103
|
-
`var onExternal = ${runtimeTemplate.returningFunction(`external ? handleFunction(${_RuntimeGlobals.default.initializeSharing}, data[0], 0, external, onInitialized, first) : onError()`, 'external, _, first')};`,
|
|
104
|
-
`var onInitialized = ${runtimeTemplate.returningFunction(`handleFunction(external.get, data[1], getScope, 0, onFactory, first)`, '_, external, first')};`,
|
|
105
|
-
`var onFactory = ${runtimeTemplate.basicFunction('factory', [
|
|
106
|
-
'data.p = 1;',
|
|
107
|
-
`${_RuntimeGlobals.default.moduleFactories}[id] = ${runtimeTemplate.basicFunction('module', [
|
|
108
|
-
'module.exports = factory();'
|
|
109
|
-
])}`
|
|
110
|
-
])};`,
|
|
111
|
-
`handleFunction(${_RuntimeGlobals.default.require}, data[2], 0, 0, onExternal, 1);`
|
|
112
|
-
])});`
|
|
113
|
-
]),
|
|
114
|
-
'}'
|
|
115
|
-
])}`
|
|
116
|
-
]);
|
|
117
|
-
}
|
|
118
|
-
constructor(){
|
|
119
|
-
super('remotes loading');
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
const _default = RemoteRuntimeModule;
|
|
123
|
-
|
|
124
|
-
//# sourceMappingURL=RemoteRuntimeModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/RemoteRuntimeModule.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\nimport RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport type Compilation from 'webpack/lib/Compilation';\nimport RemoteModule from './RemoteModule';\nimport RuntimeModule from 'webpack/lib/RuntimeModule';\nimport Template from 'webpack/lib/Template';\n\nclass RemoteRuntimeModule extends RuntimeModule {\n constructor() {\n super('remotes loading');\n }\n\n /**\n * @returns {string | null} runtime code\n */\n override generate(): string | null {\n const { compilation, chunkGraph } = this;\n const { runtimeTemplate, moduleGraph } = compilation as Compilation;\n const chunkToRemotesMapping: Record<string, any> = {};\n const idToExternalAndNameMapping: Record<string | number, any> = {};\n const allChunks = [\n ...Array.from(this.chunk?.getAllReferencedChunks() || []),\n ];\n\n for (const chunk of allChunks) {\n const modules = chunkGraph?.getChunkModulesIterableBySourceType(\n chunk,\n 'remote',\n );\n if (!modules) {\n continue;\n }\n // @ts-ignore\n const remotes = (chunkToRemotesMapping[chunk.id] = []);\n for (const m of modules) {\n const module: RemoteModule = m as RemoteModule;\n const name = module.internalRequest;\n const id = chunkGraph ? chunkGraph.getModuleId(module) : undefined;\n const { shareScope } = module;\n const dep = module.dependencies[0];\n const externalModule = moduleGraph.getModule(dep);\n const externalModuleId =\n chunkGraph && externalModule\n ? chunkGraph.getModuleId(externalModule)\n : undefined;\n if (id !== undefined) {\n //@ts-ignore\n remotes.push(id);\n idToExternalAndNameMapping[id] = [shareScope, name, externalModuleId];\n }\n }\n }\n return Template.asString([\n `var chunkMapping = ${JSON.stringify(\n chunkToRemotesMapping,\n null,\n '\\t',\n )};`,\n `var idToExternalAndNameMapping = ${JSON.stringify(\n idToExternalAndNameMapping,\n null,\n '\\t',\n )};`,\n `${\n RuntimeGlobals.ensureChunkHandlers\n }.remotes = ${runtimeTemplate.basicFunction('chunkId, promises', [\n `if(${RuntimeGlobals.hasOwnProperty}(chunkMapping, chunkId)) {`,\n Template.indent([\n `chunkMapping[chunkId].forEach(${runtimeTemplate.basicFunction('id', [\n `var getScope = ${RuntimeGlobals.currentRemoteGetScope};`,\n 'if(!getScope) getScope = [];',\n 'var data = idToExternalAndNameMapping[id];',\n 'if(getScope.indexOf(data) >= 0) return;',\n 'getScope.push(data);',\n `if(data.p) return promises.push(data.p);`,\n `var onError = ${runtimeTemplate.basicFunction('error', [\n 'if(!error) error = new Error(\"Container missing\");',\n 'if(typeof error.message === \"string\")',\n Template.indent(\n `error.message += '\\\\nwhile loading \"' + data[1] + '\" from ' + data[2];`,\n ),\n `${\n RuntimeGlobals.moduleFactories\n }[id] = ${runtimeTemplate.basicFunction('', ['throw error;'])}`,\n 'data.p = 0;',\n ])};`,\n `var handleFunction = ${runtimeTemplate.basicFunction(\n 'fn, arg1, arg2, d, next, first',\n [\n 'try {',\n Template.indent([\n 'var promise = fn(arg1, arg2);',\n 'if(promise && promise.then) {',\n Template.indent([\n `var p = promise.then(${runtimeTemplate.returningFunction(\n 'next(result, d)',\n 'result',\n )}, onError);`,\n `if(first) promises.push(data.p = p); else return p;`,\n ]),\n '} else {',\n Template.indent(['return next(promise, d, first);']),\n '}',\n ]),\n '} catch(error) {',\n Template.indent(['onError(error);']),\n '}',\n ],\n )}`,\n `var onExternal = ${runtimeTemplate.returningFunction(\n `external ? handleFunction(${RuntimeGlobals.initializeSharing}, data[0], 0, external, onInitialized, first) : onError()`,\n 'external, _, first',\n )};`,\n `var onInitialized = ${runtimeTemplate.returningFunction(\n `handleFunction(external.get, data[1], getScope, 0, onFactory, first)`,\n '_, external, first',\n )};`,\n `var onFactory = ${runtimeTemplate.basicFunction('factory', [\n 'data.p = 1;',\n `${\n RuntimeGlobals.moduleFactories\n }[id] = ${runtimeTemplate.basicFunction('module', [\n 'module.exports = factory();',\n ])}`,\n ])};`,\n `handleFunction(${RuntimeGlobals.require}, data[2], 0, 0, onExternal, 1);`,\n ])});`,\n ]),\n '}',\n ])}`,\n ]);\n }\n}\n\nexport default RemoteRuntimeModule;\n"],"names":["RemoteRuntimeModule","RuntimeModule","generate","compilation","chunkGraph","runtimeTemplate","moduleGraph","chunkToRemotesMapping","idToExternalAndNameMapping","allChunks","Array","from","chunk","getAllReferencedChunks","modules","getChunkModulesIterableBySourceType","remotes","id","m","module","name","internalRequest","getModuleId","undefined","shareScope","dep","dependencies","externalModule","getModule","externalModuleId","push","Template","asString","JSON","stringify","RuntimeGlobals","ensureChunkHandlers","basicFunction","hasOwnProperty","indent","currentRemoteGetScope","moduleFactories","returningFunction","initializeSharing","require","constructor"],"mappings":"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"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _default;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _ModuleDependency = /*#__PURE__*/ _interop_require_default(require("webpack/lib/dependencies/ModuleDependency"));
|
|
12
|
-
function _interop_require_default(obj) {
|
|
13
|
-
return obj && obj.__esModule ? obj : {
|
|
14
|
-
default: obj
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
const _default = RemoteToExternalDependency;
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=RemoteToExternalDependency.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/RemoteToExternalDependency.d.ts"],"sourcesContent":["export default RemoteToExternalDependency;\ndeclare class RemoteToExternalDependency extends ModuleDependency {}\nimport ModuleDependency from 'webpack/lib/dependencies/ModuleDependency';\n"],"names":["RemoteToExternalDependency"],"mappings":";;;;+BAAA;;;eAAA;;;yEAE6B;;;;;;MAF7B,WAAeA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy
|
|
4
|
-
*/ 'use strict';
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return _default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _ModuleDependency = /*#__PURE__*/ _interop_require_default(require("webpack/lib/dependencies/ModuleDependency"));
|
|
15
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
|
|
16
|
-
function _interop_require_default(obj) {
|
|
17
|
-
return obj && obj.__esModule ? obj : {
|
|
18
|
-
default: obj
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
let RemoteToExternalDependency = class RemoteToExternalDependency extends _ModuleDependency.default {
|
|
22
|
-
get type() {
|
|
23
|
-
return 'remote to external';
|
|
24
|
-
}
|
|
25
|
-
get category() {
|
|
26
|
-
return 'esm';
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @param {string} request request
|
|
30
|
-
*/ constructor(request){
|
|
31
|
-
super(request);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
(0, _makeSerializable.default)(RemoteToExternalDependency, 'enhanced/lib/container/RemoteToExternalDependency');
|
|
35
|
-
const _default = RemoteToExternalDependency;
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=RemoteToExternalDependency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/RemoteToExternalDependency.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\n\n'use strict';\n\nimport ModuleDependency from 'webpack/lib/dependencies/ModuleDependency';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\n\nclass RemoteToExternalDependency extends ModuleDependency {\n /**\n * @param {string} request request\n */\n constructor(request: string) {\n super(request);\n }\n override get type() {\n return 'remote to external';\n }\n\n override get category() {\n return 'esm';\n }\n}\n\nmakeSerializable(\n RemoteToExternalDependency,\n 'enhanced/lib/container/RemoteToExternalDependency',\n);\n\nexport default RemoteToExternalDependency;\n"],"names":["RemoteToExternalDependency","ModuleDependency","type","category","constructor","request","makeSerializable"],"mappings":"AAAA;;;AAGA,GAEA;;;;+BA0BA;;;eAAA;;;yEAxB6B;yEACA;;;;;;AAE7B,IAAA,AAAMA,6BAAN,MAAMA,mCAAmCC,yBAAgB;IAOvD,IAAaC,OAAO;QAClB,OAAO;IACT;IAEA,IAAaC,WAAW;QACtB,OAAO;IACT;IAZA;;GAEC,GACDC,YAAYC,OAAe,CAAE;QAC3B,KAAK,CAACA;IACR;AAQF;AAEAC,IAAAA,yBAAgB,EACdN,4BACA;MAGF,WAAeA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/options.d.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/options.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\nexport type ContainerOptionsFormat<T> =\n | (string | Record<string, string | string[] | T>)[]\n | Record<string, string | string[] | T>;\n\n/** @template T @typedef {(string | Record<string, string | string[] | T>)[] | Record<string, string | string[] | T>} ContainerOptionsFormat */\n\n/**\n * @template T\n * @template N\n * @param {ContainerOptionsFormat<T>} options options passed by the user\n * @param {function(string | string[], string) : N} normalizeSimple normalize a simple item\n * @param {function(T, string) : N} normalizeOptions normalize a complex item\n * @param {function(string, N): void} fn processing function\n * @returns {void}\n */\nconst process = <T, N>(\n options: ContainerOptionsFormat<T>,\n normalizeSimple: (item: string | string[], name: string) => N,\n normalizeOptions: (item: T, name: string) => N,\n fn: (name: string, item: N) => void,\n): void => {\n const array = (\n items: (string | Record<string, string | string[] | T>)[],\n ): void => {\n for (const item of items) {\n if (typeof item === 'string') {\n fn(item, normalizeSimple(item, item));\n } else if (item && typeof item === 'object') {\n object(item as Record<string, string | string[] | T>);\n } else {\n throw new Error('Unexpected options format');\n }\n }\n };\n const object = (obj: Record<string, string | string[] | T>): void => {\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value === 'string' || Array.isArray(value)) {\n fn(key, normalizeSimple(value, key));\n } else {\n fn(key, normalizeOptions(value as T, key));\n }\n }\n };\n if (!options) {\n return;\n } else if (Array.isArray(options)) {\n array(options);\n } else if (typeof options === 'object') {\n object(options);\n } else {\n throw new Error('Unexpected options format');\n }\n};\n\n/**\n * @template T\n * @template R\n * @param {ContainerOptionsFormat<T>} options options passed by the user\n * @param {function(string | string[], string) : R} normalizeSimple normalize a simple item\n * @param {function(T, string) : R} normalizeOptions normalize a complex item\n * @returns {[string, R][]} parsed options\n */\nconst parseOptions = <T, R>(\n options: ContainerOptionsFormat<T>,\n normalizeSimple: (item: string | string[], name: string) => R,\n normalizeOptions: (item: T, name: string) => R,\n): [string, R][] => {\n const items: [string, R][] = [];\n process(options, normalizeSimple, normalizeOptions, (key, value) => {\n items.push([key, value]);\n });\n return items;\n};\n\n/**\n * @template T\n * @param {string} scope scope name\n * @param {ContainerOptionsFormat<T>} options options passed by the user\n * @returns {Record<string, string | string[] | T>} options to spread or pass\n */\nconst scope = <T>(\n scope: string,\n options: ContainerOptionsFormat<T>,\n): Record<string, string | string[] | T> => {\n const obj: Record<string, string | string[] | T> = {};\n process(\n options,\n (item) => item as string | string[] | T,\n (item) => item as string | string[] | T,\n (key, value) => {\n obj[\n key.startsWith('./') ? `${scope}${key.slice(1)}` : `${scope}/${key}`\n ] = value;\n },\n );\n return obj;\n};\n\nexport { parseOptions, scope };\n"],"names":["parseOptions","scope","process","options","normalizeSimple","normalizeOptions","fn","array","items","item","object","Error","obj","key","value","Object","entries","Array","isArray","push","startsWith","slice"],"mappings":"AAAA;;;AAGA;;;;;;;;;;;IAmGSA,YAAY;eAAZA;;IAAcC,KAAK;eAALA;;;AA9FvB,6IAA6I,GAE7I;;;;;;;;CAQC,GACD,MAAMC,UAAU,CACdC,SACAC,iBACAC,kBACAC;IAEA,MAAMC,QAAQ,CACZC;QAEA,KAAK,MAAMC,QAAQD,MAAO;YACxB,IAAI,OAAOC,SAAS,UAAU;gBAC5BH,GAAGG,MAAML,gBAAgBK,MAAMA;YACjC,OAAO,IAAIA,QAAQ,OAAOA,SAAS,UAAU;gBAC3CC,OAAOD;YACT,OAAO;gBACL,MAAM,IAAIE,MAAM;YAClB;QACF;IACF;IACA,MAAMD,SAAS,CAACE;QACd,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACJ,KAAM;YAC9C,IAAI,OAAOE,UAAU,YAAYG,MAAMC,OAAO,CAACJ,QAAQ;gBACrDR,GAAGO,KAAKT,gBAAgBU,OAAOD;YACjC,OAAO;gBACLP,GAAGO,KAAKR,iBAAiBS,OAAYD;YACvC;QACF;IACF;IACA,IAAI,CAACV,SAAS;QACZ;IACF,OAAO,IAAIc,MAAMC,OAAO,CAACf,UAAU;QACjCI,MAAMJ;IACR,OAAO,IAAI,OAAOA,YAAY,UAAU;QACtCO,OAAOP;IACT,OAAO;QACL,MAAM,IAAIQ,MAAM;IAClB;AACF;AAEA;;;;;;;CAOC,GACD,MAAMX,eAAe,CACnBG,SACAC,iBACAC;IAEA,MAAMG,QAAuB,EAAE;IAC/BN,QAAQC,SAASC,iBAAiBC,kBAAkB,CAACQ,KAAKC;QACxDN,MAAMW,IAAI,CAAC;YAACN;YAAKC;SAAM;IACzB;IACA,OAAON;AACT;AAEA;;;;;CAKC,GACD,MAAMP,QAAQ,CACZA,OACAE;IAEA,MAAMS,MAA6C,CAAC;IACpDV,QACEC,SACA,CAACM,OAASA,MACV,CAACA,OAASA,MACV,CAACI,KAAKC;QACJF,GAAG,CACDC,IAAIO,UAAU,CAAC,QAAQ,CAAC,EAAEnB,MAAM,EAAEY,IAAIQ,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAEpB,MAAM,CAAC,EAAEY,IAAI,CAAC,CACrE,GAAGC;IACN;IAEF,OAAOF;AACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/inversion/ContainerInversionPlugin.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts"],"sourcesContent":["export = ConsumeSharedFallbackDependency;\ndeclare class ConsumeSharedFallbackDependency extends ModuleDependency {}\nimport ModuleDependency = require('webpack/lib/dependencies/ModuleDependency');\n"],"names":["ConsumeSharedFallbackDependency"],"mappings":";iBAASA"}
|