@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,141 +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 _RuntimeGlobals = /*#__PURE__*/ _interop_require_default(require("webpack/lib/RuntimeGlobals"));
|
|
12
|
-
const _Template = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Template"));
|
|
13
|
-
function _interop_require_default(obj) {
|
|
14
|
-
return obj && obj.__esModule ? obj : {
|
|
15
|
-
default: obj
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
let AsyncEntryStartupPlugin = class AsyncEntryStartupPlugin {
|
|
19
|
-
apply(compiler) {
|
|
20
|
-
compiler.hooks.thisCompilation.tap('AsyncEntryStartupPlugin', (compilation)=>{
|
|
21
|
-
this.collectRuntimeChunks(compilation);
|
|
22
|
-
this.handleRenderStartup(compiler, compilation);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
collectRuntimeChunks(compilation) {
|
|
26
|
-
compilation.hooks.beforeChunkAssets.tap('AsyncEntryStartupPlugin', ()=>{
|
|
27
|
-
for (const chunk of compilation.chunks){
|
|
28
|
-
if (chunk.hasRuntime() && chunk.id !== null) {
|
|
29
|
-
this._runtimeChunks.set(chunk.id, chunk);
|
|
30
|
-
for (const dependentChunk of compilation.chunkGraph.getChunkEntryDependentChunksIterable(chunk)){
|
|
31
|
-
if (dependentChunk.id !== null) {
|
|
32
|
-
this._runtimeChunks.set(dependentChunk.id, dependentChunk);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
handleRenderStartup(compiler, compilation) {
|
|
40
|
-
compiler.webpack.javascript.JavascriptModulesPlugin.getCompilationHooks(compilation).renderStartup.tap('AsyncEntryStartupPlugin', (source, renderContext, upperContext)=>{
|
|
41
|
-
var _compiler_options_optimization, _compiler_options, _compiler_options_experiments, _compiler_options1, _compiler_options_experiments1, _compiler_options2;
|
|
42
|
-
const isSingleRuntime = (_compiler_options = compiler.options) == null ? void 0 : (_compiler_options_optimization = _compiler_options.optimization) == null ? void 0 : _compiler_options_optimization.runtimeChunk;
|
|
43
|
-
if ((upperContext == null ? void 0 : upperContext.chunk.id) && isSingleRuntime) {
|
|
44
|
-
if (upperContext == null ? void 0 : upperContext.chunk.hasRuntime()) {
|
|
45
|
-
this._runtimeChunks.set(upperContext.chunk.id, upperContext.chunk);
|
|
46
|
-
return source;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (this._options.excludeChunk && this._options.excludeChunk(upperContext.chunk)) {
|
|
50
|
-
return source;
|
|
51
|
-
}
|
|
52
|
-
const runtime = new Set();
|
|
53
|
-
if (typeof upperContext.chunk.runtime === 'string' || typeof upperContext.chunk.runtime === 'number') {
|
|
54
|
-
if (this._runtimeChunks.has(upperContext.chunk.runtime)) {
|
|
55
|
-
runtime.add(this._runtimeChunks.get(upperContext.chunk.runtime));
|
|
56
|
-
} else {
|
|
57
|
-
runtime.add(upperContext.chunk);
|
|
58
|
-
}
|
|
59
|
-
} else if (upperContext.chunk.runtime && typeof upperContext.chunk.runtime[Symbol.iterator] === 'function') {
|
|
60
|
-
for (const runtimeItem of upperContext.chunk.runtime){
|
|
61
|
-
if (this._runtimeChunks.has(runtimeItem)) {
|
|
62
|
-
runtime.add(this._runtimeChunks.get(runtimeItem));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (runtime.size === 0) {
|
|
67
|
-
runtime.add(upperContext.chunk);
|
|
68
|
-
}
|
|
69
|
-
let remotes = '';
|
|
70
|
-
let shared = '';
|
|
71
|
-
for (const runtimeItem of runtime){
|
|
72
|
-
const requirements = compilation.chunkGraph.getTreeRuntimeRequirements(runtimeItem);
|
|
73
|
-
const hasRemoteModules = compilation.chunkGraph.getChunkModulesIterableBySourceType(upperContext.chunk, 'remote');
|
|
74
|
-
const consumeShares = compilation.chunkGraph.getChunkModulesIterableBySourceType(upperContext.chunk, 'consume-shared');
|
|
75
|
-
const entryOptions = upperContext.chunk.getEntryOptions();
|
|
76
|
-
const chunksToRef = (entryOptions == null ? void 0 : entryOptions.dependOn) ? [
|
|
77
|
-
...entryOptions.dependOn,
|
|
78
|
-
upperContext.chunk.id
|
|
79
|
-
] : [
|
|
80
|
-
upperContext.chunk.id
|
|
81
|
-
];
|
|
82
|
-
if (requirements.has(_RuntimeGlobals.default.currentRemoteGetScope) || hasRemoteModules || requirements.has('__webpack_require__.vmok')) {
|
|
83
|
-
for (const chunkId of chunksToRef){
|
|
84
|
-
remotes += `if(__webpack_require__.f && __webpack_require__.f.remotes) __webpack_require__.f.remotes(${JSON.stringify(chunkId)}, promiseTrack);`;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (requirements.has(_RuntimeGlobals.default.shareScopeMap) || requirements.has(_RuntimeGlobals.default.initializeSharing) || consumeShares) {
|
|
88
|
-
for (const chunkId of chunksToRef){
|
|
89
|
-
shared += `if(__webpack_require__.f && __webpack_require__.f.consumes) __webpack_require__.f.consumes(${JSON.stringify(chunkId)}, promiseTrack);`;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (!remotes && !shared) {
|
|
94
|
-
return source;
|
|
95
|
-
}
|
|
96
|
-
const entryModules = compilation.chunkGraph.getChunkEntryModulesIterable(upperContext.chunk);
|
|
97
|
-
const initialEntryModules = [];
|
|
98
|
-
for (const entryModule of entryModules){
|
|
99
|
-
const entryModuleID = compilation.chunkGraph.getModuleId(entryModule);
|
|
100
|
-
if (entryModuleID) {
|
|
101
|
-
let shouldInclude = false;
|
|
102
|
-
if (typeof this._options.eager === 'function') {
|
|
103
|
-
shouldInclude = this._options.eager(entryModule);
|
|
104
|
-
} else if (this._options.eager && this._options.eager.test(entryModule.identifier())) {
|
|
105
|
-
shouldInclude = true;
|
|
106
|
-
}
|
|
107
|
-
if (shouldInclude) {
|
|
108
|
-
initialEntryModules.push(`__webpack_require__(${JSON.stringify(entryModuleID)});`);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (((_compiler_options1 = compiler.options) == null ? void 0 : (_compiler_options_experiments = _compiler_options1.experiments) == null ? void 0 : _compiler_options_experiments.topLevelAwait) && ((_compiler_options2 = compiler.options) == null ? void 0 : (_compiler_options_experiments1 = _compiler_options2.experiments) == null ? void 0 : _compiler_options_experiments1.outputModule)) {
|
|
113
|
-
return _Template.default.asString([
|
|
114
|
-
'var promiseTrack = [];',
|
|
115
|
-
_Template.default.asString(initialEntryModules),
|
|
116
|
-
shared,
|
|
117
|
-
remotes,
|
|
118
|
-
'await Promise.all(promiseTrack)',
|
|
119
|
-
_Template.default.indent(source.source())
|
|
120
|
-
]);
|
|
121
|
-
}
|
|
122
|
-
return _Template.default.asString([
|
|
123
|
-
'var promiseTrack = [];',
|
|
124
|
-
_Template.default.asString(initialEntryModules),
|
|
125
|
-
shared,
|
|
126
|
-
remotes,
|
|
127
|
-
'var __webpack_exports__ = Promise.all(promiseTrack).then(function() {',
|
|
128
|
-
_Template.default.indent(source.source()),
|
|
129
|
-
_Template.default.indent('return __webpack_exports__'),
|
|
130
|
-
'});'
|
|
131
|
-
]);
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
constructor(options){
|
|
135
|
-
this._options = options || {};
|
|
136
|
-
this._runtimeChunks = new Map();
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
const _default = AsyncEntryStartupPlugin;
|
|
140
|
-
|
|
141
|
-
//# sourceMappingURL=AsyncBoundaryPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/AsyncBoundaryPlugin.ts"],"sourcesContent":["import Compiler from 'webpack/lib/Compiler';\nimport Compilation from 'webpack/lib/Compilation';\nimport Chunk from 'webpack/lib/Chunk';\nimport RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport Template from 'webpack/lib/Template';\nimport Module from 'webpack/lib/Module';\n\ninterface Options {\n eager?: RegExp | ((module: Module) => boolean);\n excludeChunk?: (chunk: Chunk) => boolean;\n}\n\nclass AsyncEntryStartupPlugin {\n private _options: Options;\n private _runtimeChunks: Map<string | number, Chunk>;\n\n constructor(options?: Options) {\n this._options = options || {};\n this._runtimeChunks = new Map<string | number, Chunk>();\n }\n\n apply(compiler: Compiler): void {\n compiler.hooks.thisCompilation.tap(\n 'AsyncEntryStartupPlugin',\n (compilation: Compilation) => {\n this.collectRuntimeChunks(compilation);\n this.handleRenderStartup(compiler, compilation);\n },\n );\n }\n\n private collectRuntimeChunks(compilation: Compilation): void {\n compilation.hooks.beforeChunkAssets.tap('AsyncEntryStartupPlugin', () => {\n for (const chunk of compilation.chunks) {\n if (chunk.hasRuntime() && chunk.id !== null) {\n this._runtimeChunks.set(chunk.id, chunk);\n for (const dependentChunk of compilation.chunkGraph.getChunkEntryDependentChunksIterable(\n chunk,\n )) {\n if (dependentChunk.id !== null) {\n this._runtimeChunks.set(dependentChunk.id, dependentChunk);\n }\n }\n }\n }\n });\n }\n\n private handleRenderStartup(\n compiler: Compiler,\n compilation: Compilation,\n ): void {\n compiler.webpack.javascript.JavascriptModulesPlugin.getCompilationHooks(\n compilation,\n ).renderStartup.tap(\n 'AsyncEntryStartupPlugin',\n (source: any, renderContext: Module, upperContext: { chunk: Chunk }) => {\n const isSingleRuntime = compiler.options?.optimization?.runtimeChunk;\n if (upperContext?.chunk.id && isSingleRuntime) {\n if (upperContext?.chunk.hasRuntime()) {\n this._runtimeChunks.set(upperContext.chunk.id, upperContext.chunk);\n return source;\n }\n }\n\n if (\n this._options.excludeChunk &&\n this._options.excludeChunk(upperContext.chunk)\n ) {\n return source;\n }\n\n const runtime = new Set();\n if (\n typeof upperContext.chunk.runtime === 'string' ||\n typeof upperContext.chunk.runtime === 'number'\n ) {\n if (this._runtimeChunks.has(upperContext.chunk.runtime)) {\n runtime.add(this._runtimeChunks.get(upperContext.chunk.runtime));\n } else {\n runtime.add(upperContext.chunk);\n }\n } else if (\n upperContext.chunk.runtime &&\n typeof upperContext.chunk.runtime[Symbol.iterator] === 'function'\n ) {\n for (const runtimeItem of upperContext.chunk.runtime) {\n if (this._runtimeChunks.has(runtimeItem)) {\n runtime.add(this._runtimeChunks.get(runtimeItem));\n }\n }\n }\n if (runtime.size === 0) {\n runtime.add(upperContext.chunk);\n }\n\n let remotes = '';\n let shared = '';\n\n for (const runtimeItem of runtime) {\n const requirements =\n compilation.chunkGraph.getTreeRuntimeRequirements(\n runtimeItem as Chunk,\n );\n\n const hasRemoteModules =\n compilation.chunkGraph.getChunkModulesIterableBySourceType(\n upperContext.chunk,\n 'remote',\n );\n\n const consumeShares =\n compilation.chunkGraph.getChunkModulesIterableBySourceType(\n upperContext.chunk,\n 'consume-shared',\n );\n\n const entryOptions = upperContext.chunk.getEntryOptions();\n const chunksToRef = entryOptions?.dependOn\n ? [...entryOptions.dependOn, upperContext.chunk.id]\n : [upperContext.chunk.id];\n\n if (\n requirements.has(RuntimeGlobals.currentRemoteGetScope) ||\n hasRemoteModules ||\n requirements.has('__webpack_require__.vmok')\n ) {\n for (const chunkId of chunksToRef) {\n remotes += `if(__webpack_require__.f && __webpack_require__.f.remotes) __webpack_require__.f.remotes(${JSON.stringify(\n chunkId,\n )}, promiseTrack);`;\n }\n }\n\n if (\n requirements.has(RuntimeGlobals.shareScopeMap) ||\n requirements.has(RuntimeGlobals.initializeSharing) ||\n consumeShares\n ) {\n for (const chunkId of chunksToRef) {\n shared += `if(__webpack_require__.f && __webpack_require__.f.consumes) __webpack_require__.f.consumes(${JSON.stringify(\n chunkId,\n )}, promiseTrack);`;\n }\n }\n }\n\n if (!remotes && !shared) {\n return source;\n }\n\n const entryModules =\n compilation.chunkGraph.getChunkEntryModulesIterable(\n upperContext.chunk,\n );\n\n const initialEntryModules = [];\n\n for (const entryModule of entryModules) {\n const entryModuleID = compilation.chunkGraph.getModuleId(entryModule);\n if (entryModuleID) {\n let shouldInclude = false;\n\n if (typeof this._options.eager === 'function') {\n shouldInclude = this._options.eager(entryModule);\n } else if (\n this._options.eager &&\n this._options.eager.test(entryModule.identifier())\n ) {\n shouldInclude = true;\n }\n\n if (shouldInclude) {\n initialEntryModules.push(\n `__webpack_require__(${JSON.stringify(entryModuleID)});`,\n );\n }\n }\n }\n if (\n compiler.options?.experiments?.topLevelAwait &&\n compiler.options?.experiments?.outputModule\n ) {\n return Template.asString([\n 'var promiseTrack = [];',\n Template.asString(initialEntryModules),\n shared,\n remotes,\n 'await Promise.all(promiseTrack)',\n Template.indent(source.source()),\n ]);\n }\n return Template.asString([\n 'var promiseTrack = [];',\n Template.asString(initialEntryModules),\n shared,\n remotes,\n 'var __webpack_exports__ = Promise.all(promiseTrack).then(function() {',\n Template.indent(source.source()),\n Template.indent('return __webpack_exports__'),\n '});',\n ]);\n },\n );\n }\n}\n\nexport default AsyncEntryStartupPlugin;\n"],"names":["AsyncEntryStartupPlugin","apply","compiler","hooks","thisCompilation","tap","compilation","collectRuntimeChunks","handleRenderStartup","beforeChunkAssets","chunk","chunks","hasRuntime","id","_runtimeChunks","set","dependentChunk","chunkGraph","getChunkEntryDependentChunksIterable","webpack","javascript","JavascriptModulesPlugin","getCompilationHooks","renderStartup","source","renderContext","upperContext","isSingleRuntime","options","optimization","runtimeChunk","_options","excludeChunk","runtime","Set","has","add","get","Symbol","iterator","runtimeItem","size","remotes","shared","requirements","getTreeRuntimeRequirements","hasRemoteModules","getChunkModulesIterableBySourceType","consumeShares","entryOptions","getEntryOptions","chunksToRef","dependOn","RuntimeGlobals","currentRemoteGetScope","chunkId","JSON","stringify","shareScopeMap","initializeSharing","entryModules","getChunkEntryModulesIterable","initialEntryModules","entryModule","entryModuleID","getModuleId","shouldInclude","eager","test","identifier","push","experiments","topLevelAwait","outputModule","Template","asString","indent","constructor","Map"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerEntryDependency.d.ts"],"sourcesContent":["export = ContainerEntryDependency;\n/** @typedef {import(\"./ContainerEntryModule\").ExposeOptions} ExposeOptions */\ndeclare class ContainerEntryDependency extends Dependency {\n /**\n * @param {string} name entry name\n * @param {[string, ExposeOptions][]} exposes list of exposed modules\n * @param {string} shareScope name of the share scope\n */\n constructor(\n name: string,\n exposes: [string, ExposeOptions][],\n shareScope: string,\n );\n name: string;\n exposes: [string, import('./ContainerEntryModule').ExposeOptions][];\n shareScope: string;\n}\ndeclare namespace ContainerEntryDependency {\n export { ExposeOptions };\n}\ntype ExposeOptions = import('./ContainerEntryModule').ExposeOptions;\n"],"names":["ContainerEntryDependency"],"mappings":";iBAASA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ExposeOptions } from './ContainerEntryModule';
|
|
2
|
-
import Dependency from 'webpack/lib/Dependency';
|
|
3
|
-
declare class ContainerEntryDependency extends Dependency {
|
|
4
|
-
name: string;
|
|
5
|
-
exposes: [string, ExposeOptions][];
|
|
6
|
-
shareScope: string;
|
|
7
|
-
/**
|
|
8
|
-
* @param {string} name entry name
|
|
9
|
-
* @param {[string, ExposeOptions][]} exposes list of exposed modules
|
|
10
|
-
* @param {string} shareScope name of the share scope
|
|
11
|
-
*/
|
|
12
|
-
constructor(name: string, exposes: [string, ExposeOptions][], shareScope: string);
|
|
13
|
-
/**
|
|
14
|
-
* @returns {string | null} an identifier to merge equal requests
|
|
15
|
-
*/
|
|
16
|
-
getResourceIdentifier(): string | null;
|
|
17
|
-
get type(): string;
|
|
18
|
-
get category(): string;
|
|
19
|
-
}
|
|
20
|
-
export default ContainerEntryDependency;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr
|
|
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 _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
|
|
15
|
-
const _Dependency = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Dependency"));
|
|
16
|
-
function _interop_require_default(obj) {
|
|
17
|
-
return obj && obj.__esModule ? obj : {
|
|
18
|
-
default: obj
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
let ContainerEntryDependency = class ContainerEntryDependency extends _Dependency.default {
|
|
22
|
-
/**
|
|
23
|
-
* @returns {string | null} an identifier to merge equal requests
|
|
24
|
-
*/ getResourceIdentifier() {
|
|
25
|
-
return `container-entry-${this.name}`;
|
|
26
|
-
}
|
|
27
|
-
get type() {
|
|
28
|
-
return 'container entry';
|
|
29
|
-
}
|
|
30
|
-
get category() {
|
|
31
|
-
return 'esm';
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @param {string} name entry name
|
|
35
|
-
* @param {[string, ExposeOptions][]} exposes list of exposed modules
|
|
36
|
-
* @param {string} shareScope name of the share scope
|
|
37
|
-
*/ constructor(name, exposes, shareScope){
|
|
38
|
-
super();
|
|
39
|
-
this.name = name;
|
|
40
|
-
this.exposes = exposes;
|
|
41
|
-
this.shareScope = shareScope;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
(0, _makeSerializable.default)(ContainerEntryDependency, 'enhanced/lib/container/ContainerEntryDependency');
|
|
45
|
-
const _default = ContainerEntryDependency;
|
|
46
|
-
|
|
47
|
-
//# sourceMappingURL=ContainerEntryDependency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerEntryDependency.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr\n*/\n\nimport { ExposeOptions } from './ContainerEntryModule';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\nimport Dependency from 'webpack/lib/Dependency';\n\nclass ContainerEntryDependency extends Dependency {\n public name: string;\n public exposes: [string, ExposeOptions][];\n public shareScope: string;\n\n /**\n * @param {string} name entry name\n * @param {[string, ExposeOptions][]} exposes list of exposed modules\n * @param {string} shareScope name of the share scope\n */\n constructor(\n name: string,\n exposes: [string, ExposeOptions][],\n shareScope: string,\n ) {\n super();\n this.name = name;\n this.exposes = exposes;\n this.shareScope = shareScope;\n }\n\n /**\n * @returns {string | null} an identifier to merge equal requests\n */\n override getResourceIdentifier(): string | null {\n return `container-entry-${this.name}`;\n }\n\n override get type(): string {\n return 'container entry';\n }\n\n override get category(): string {\n return 'esm';\n }\n}\n\nmakeSerializable(\n ContainerEntryDependency,\n 'enhanced/lib/container/ContainerEntryDependency',\n);\n\nexport default ContainerEntryDependency;\n"],"names":["ContainerEntryDependency","Dependency","getResourceIdentifier","name","type","category","constructor","exposes","shareScope","makeSerializable"],"mappings":"AAAA;;;AAGA;;;;+BAgDA;;;eAAA;;;yEA7C6B;mEACN;;;;;;AAEvB,IAAA,AAAMA,2BAAN,MAAMA,iCAAiCC,mBAAU;IAqB/C;;GAEC,GACD,AAASC,wBAAuC;QAC9C,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAACC,IAAI,CAAC,CAAC;IACvC;IAEA,IAAaC,OAAe;QAC1B,OAAO;IACT;IAEA,IAAaC,WAAmB;QAC9B,OAAO;IACT;IA7BA;;;;GAIC,GACDC,YACEH,IAAY,EACZI,OAAkC,EAClCC,UAAkB,CAClB;QACA,KAAK;QACL,IAAI,CAACL,IAAI,GAAGA;QACZ,IAAI,CAACI,OAAO,GAAGA;QACf,IAAI,CAACC,UAAU,GAAGA;IACpB;AAgBF;AAEAC,IAAAA,yBAAgB,EACdT,0BACA;MAGF,WAAeA"}
|
|
@@ -1,14 +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 Module = require("webpack/lib/Module");
|
|
12
|
-
const _default = ContainerEntryModule;
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=ContainerEntryModule.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerEntryModule.d.ts"],"sourcesContent":["import Module = require('webpack/lib/Module');\nexport type ExposeOptions = {\n /**\n * requests to exposed modules (last one is exported)\n */\n import: string[];\n /**\n * custom chunk name for the exposed module\n */\n name: string;\n};\ntype ObjectDeserializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;\ntype WebpackOptions = any;\ntype ChunkGraph = import('webpack/lib/ChunkGraph');\ntype ChunkGroup = import('webpack/lib/ChunkGroup');\ntype Compilation = import('webpack/lib/Compilation');\ntype CodeGenerationContext = import('webpack/lib/Module').CodeGenerationContext;\ntype CodeGenerationResult = import('webpack/lib/Module').CodeGenerationResult;\ntype LibIdentOptions = import('webpack/lib/Module').LibIdentOptions;\ntype NeedBuildContext = import('webpack/lib/Module').NeedBuildContext;\ntype RequestShortener = import('webpack/lib/RequestShortener');\ntype ResolverWithOptions =\n import('webpack/lib/ResolverFactory').ResolverWithOptions;\ntype WebpackError = import('webpack/lib/WebpackError');\ntype ObjectSerializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectSerializerContext;\ntype Hash = import('webpack/lib/util/Hash');\ntype InputFileSystem = import('webpack/lib/util/fs').InputFileSystem;\ntype ContainerEntryDependency = typeof import('./ContainerEntryDependency');\n\ndeclare class ContainerEntryModule extends Module {\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {ContainerEntryModule} deserialized container entry module\n */\n static deserialize(context: ObjectDeserializerContext): ContainerEntryModule;\n /**\n * @param {string} name container entry name\n * @param {[string, ExposeOptions][]} exposes list of exposed modules\n * @param {string} shareScope name of the share scope\n */\n constructor(\n name: string,\n exposes: [string, ExposeOptions][],\n shareScope: string,\n );\n _name: string;\n _exposes: [string, ExposeOptions][];\n _shareScope: string;\n}\ndeclare namespace ContainerEntryModule {\n export {\n WebpackOptions,\n ChunkGraph,\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 ContainerEntryDependency,\n ExposeOptions,\n };\n}\nexport default ContainerEntryModule;\n"],"names":["Module","ContainerEntryModule"],"mappings":";;;;+BAwEA;;;eAAA;;;AAxEA,MAAOA,iBAAiB;MAwExB,WAAeC"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import Module from 'webpack/lib/Module';
|
|
2
|
-
import type Compilation from 'webpack/lib/Compilation';
|
|
3
|
-
import type { LibIdentOptions, NeedBuildContext, RequestShortener, ObjectDeserializerContext, ObjectSerializerContext, WebpackOptions, InputFileSystem, ResolverWithOptions } from 'webpack/lib/Module';
|
|
4
|
-
import type WebpackError from 'webpack/lib/WebpackError';
|
|
5
|
-
export type ExposeOptions = {
|
|
6
|
-
/**
|
|
7
|
-
* requests to exposed modules (last one is exported)
|
|
8
|
-
*/
|
|
9
|
-
import: string[];
|
|
10
|
-
/**
|
|
11
|
-
* custom chunk name for the exposed module
|
|
12
|
-
*/
|
|
13
|
-
name: string;
|
|
14
|
-
};
|
|
15
|
-
declare class ContainerEntryModule extends Module {
|
|
16
|
-
private _name;
|
|
17
|
-
private _exposes;
|
|
18
|
-
private _shareScope;
|
|
19
|
-
/**
|
|
20
|
-
* @param {string} name container entry name
|
|
21
|
-
* @param {[string, ExposeOptions][]} exposes list of exposed modules
|
|
22
|
-
* @param {string} shareScope name of the share scope
|
|
23
|
-
*/
|
|
24
|
-
constructor(name: string, exposes: [string, ExposeOptions][], shareScope: string);
|
|
25
|
-
/**
|
|
26
|
-
* @param {ObjectDeserializerContext} context context
|
|
27
|
-
* @returns {ContainerEntryModule} deserialized container entry module
|
|
28
|
-
*/
|
|
29
|
-
static deserialize(context: ObjectDeserializerContext): ContainerEntryModule;
|
|
30
|
-
/**
|
|
31
|
-
* @returns {Set<string>} types available (do not mutate)
|
|
32
|
-
*/
|
|
33
|
-
getSourceTypes(): Set<string>;
|
|
34
|
-
/**
|
|
35
|
-
* @returns {string} a unique identifier of the module
|
|
36
|
-
*/
|
|
37
|
-
identifier(): string;
|
|
38
|
-
/**
|
|
39
|
-
* @param {RequestShortener} requestShortener the request shortener
|
|
40
|
-
* @returns {string} a user readable identifier of the module
|
|
41
|
-
*/
|
|
42
|
-
readableIdentifier(requestShortener: RequestShortener): string;
|
|
43
|
-
/**
|
|
44
|
-
* @param {LibIdentOptions} options options
|
|
45
|
-
* @returns {string | null} an identifier for library inclusion
|
|
46
|
-
*/
|
|
47
|
-
libIdent(options: LibIdentOptions): string | null;
|
|
48
|
-
/**
|
|
49
|
-
* @param {NeedBuildContext} context context info
|
|
50
|
-
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
51
|
-
* @returns {void}
|
|
52
|
-
*/
|
|
53
|
-
needBuild(context: NeedBuildContext, callback: (arg0: (WebpackError | null) | undefined, arg1: boolean | undefined) => void): void;
|
|
54
|
-
/**
|
|
55
|
-
* @param {WebpackOptions} options webpack options
|
|
56
|
-
* @param {Compilation} compilation the compilation
|
|
57
|
-
* @param {ResolverWithOptions} resolver the resolver
|
|
58
|
-
* @param {InputFileSystem} fs the file system
|
|
59
|
-
* @param {function(WebpackError): void} callback callback function
|
|
60
|
-
* @returns {void}
|
|
61
|
-
*/
|
|
62
|
-
build(options: WebpackOptions, compilation: Compilation, resolver: ResolverWithOptions, fs: InputFileSystem, callback: (err?: WebpackError) => void): void;
|
|
63
|
-
/**
|
|
64
|
-
* @param {CodeGenerationContext} context context for code generation
|
|
65
|
-
* @returns {CodeGenerationResult} result
|
|
66
|
-
*/
|
|
67
|
-
codeGeneration({ moduleGraph, chunkGraph, runtimeTemplate }: {
|
|
68
|
-
moduleGraph: any;
|
|
69
|
-
chunkGraph: any;
|
|
70
|
-
runtimeTemplate: any;
|
|
71
|
-
}): {
|
|
72
|
-
sources: Map<any, any>;
|
|
73
|
-
runtimeRequirements: Set<"__webpack_require__.o" | "__webpack_require__.d" | "__webpack_exports__">;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* @param {string=} type the source type for which the size should be estimated
|
|
77
|
-
* @returns {number} the estimated size of the module (must be non-zero)
|
|
78
|
-
*/
|
|
79
|
-
size(type?: string): number;
|
|
80
|
-
/**
|
|
81
|
-
* @param {ObjectSerializerContext} context context
|
|
82
|
-
*/
|
|
83
|
-
serialize(context: ObjectSerializerContext): void;
|
|
84
|
-
}
|
|
85
|
-
export default ContainerEntryModule;
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr
|
|
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 _AsyncDependenciesBlock = /*#__PURE__*/ _interop_require_default(require("webpack/lib/AsyncDependenciesBlock"));
|
|
15
|
-
const _Template = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Template"));
|
|
16
|
-
const _Module = /*#__PURE__*/ _interop_require_default(require("webpack/lib/Module"));
|
|
17
|
-
const _RuntimeGlobals = /*#__PURE__*/ _interop_require_wildcard(require("webpack/lib/RuntimeGlobals"));
|
|
18
|
-
const _webpacksources = require("webpack-sources");
|
|
19
|
-
const _ModuleTypeConstants = require("webpack/lib/ModuleTypeConstants");
|
|
20
|
-
const _ContainerExposedDependency = /*#__PURE__*/ _interop_require_default(require("./ContainerExposedDependency"));
|
|
21
|
-
const _StaticExportsDependency = /*#__PURE__*/ _interop_require_default(require("webpack/lib/dependencies/StaticExportsDependency"));
|
|
22
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default(require("webpack/lib/util/makeSerializable"));
|
|
23
|
-
function _interop_require_default(obj) {
|
|
24
|
-
return obj && obj.__esModule ? obj : {
|
|
25
|
-
default: obj
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
29
|
-
if (typeof WeakMap !== "function") return null;
|
|
30
|
-
var cacheBabelInterop = new WeakMap();
|
|
31
|
-
var cacheNodeInterop = new WeakMap();
|
|
32
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
33
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
34
|
-
})(nodeInterop);
|
|
35
|
-
}
|
|
36
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
37
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
38
|
-
return obj;
|
|
39
|
-
}
|
|
40
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
41
|
-
return {
|
|
42
|
-
default: obj
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
46
|
-
if (cache && cache.has(obj)) {
|
|
47
|
-
return cache.get(obj);
|
|
48
|
-
}
|
|
49
|
-
var newObj = {
|
|
50
|
-
__proto__: null
|
|
51
|
-
};
|
|
52
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
53
|
-
for(var key in obj){
|
|
54
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
55
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
56
|
-
if (desc && (desc.get || desc.set)) {
|
|
57
|
-
Object.defineProperty(newObj, key, desc);
|
|
58
|
-
} else {
|
|
59
|
-
newObj[key] = obj[key];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
newObj.default = obj;
|
|
64
|
-
if (cache) {
|
|
65
|
-
cache.set(obj, newObj);
|
|
66
|
-
}
|
|
67
|
-
return newObj;
|
|
68
|
-
}
|
|
69
|
-
const SOURCE_TYPES = new Set([
|
|
70
|
-
'javascript'
|
|
71
|
-
]);
|
|
72
|
-
let ContainerEntryModule = class ContainerEntryModule extends _Module.default {
|
|
73
|
-
/**
|
|
74
|
-
* @param {ObjectDeserializerContext} context context
|
|
75
|
-
* @returns {ContainerEntryModule} deserialized container entry module
|
|
76
|
-
*/ static deserialize(context) {
|
|
77
|
-
const { read } = context;
|
|
78
|
-
const obj = new ContainerEntryModule(read(), read(), read());
|
|
79
|
-
//@ts-ignore
|
|
80
|
-
obj.deserialize(context);
|
|
81
|
-
return obj;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* @returns {Set<string>} types available (do not mutate)
|
|
85
|
-
*/ getSourceTypes() {
|
|
86
|
-
return SOURCE_TYPES;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* @returns {string} a unique identifier of the module
|
|
90
|
-
*/ identifier() {
|
|
91
|
-
return `container entry (${this._shareScope}) ${JSON.stringify(this._exposes)}`;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* @param {RequestShortener} requestShortener the request shortener
|
|
95
|
-
* @returns {string} a user readable identifier of the module
|
|
96
|
-
*/ readableIdentifier(requestShortener) {
|
|
97
|
-
return 'container entry';
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* @param {LibIdentOptions} options options
|
|
101
|
-
* @returns {string | null} an identifier for library inclusion
|
|
102
|
-
*/ libIdent(options) {
|
|
103
|
-
return `${this.layer ? `(${this.layer})/` : ''}webpack/container/entry/${this._name}`;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @param {NeedBuildContext} context context info
|
|
107
|
-
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
108
|
-
* @returns {void}
|
|
109
|
-
*/ needBuild(context, callback) {
|
|
110
|
-
const baseContext = context;
|
|
111
|
-
callback(null, !this.buildMeta);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* @param {WebpackOptions} options webpack options
|
|
115
|
-
* @param {Compilation} compilation the compilation
|
|
116
|
-
* @param {ResolverWithOptions} resolver the resolver
|
|
117
|
-
* @param {InputFileSystem} fs the file system
|
|
118
|
-
* @param {function(WebpackError): void} callback callback function
|
|
119
|
-
* @returns {void}
|
|
120
|
-
*/ build(options, compilation, resolver, fs, callback) {
|
|
121
|
-
this.buildMeta = {};
|
|
122
|
-
this.buildInfo = {
|
|
123
|
-
strict: true,
|
|
124
|
-
topLevelDeclarations: new Set([
|
|
125
|
-
'moduleMap',
|
|
126
|
-
'get',
|
|
127
|
-
'init'
|
|
128
|
-
])
|
|
129
|
-
};
|
|
130
|
-
this.buildMeta.exportsType = 'namespace';
|
|
131
|
-
//@ts-ignore
|
|
132
|
-
this.clearDependenciesAndBlocks();
|
|
133
|
-
for (const [name, options] of this._exposes){
|
|
134
|
-
const block = new _AsyncDependenciesBlock.default({
|
|
135
|
-
name: options.name
|
|
136
|
-
}, {
|
|
137
|
-
name
|
|
138
|
-
}, options.import[options.import.length - 1]);
|
|
139
|
-
let idx = 0;
|
|
140
|
-
for (const request of options.import){
|
|
141
|
-
const dep = new _ContainerExposedDependency.default(name, request);
|
|
142
|
-
dep.loc = {
|
|
143
|
-
name,
|
|
144
|
-
index: idx++
|
|
145
|
-
};
|
|
146
|
-
//@ts-ignore
|
|
147
|
-
block.addDependency(dep);
|
|
148
|
-
}
|
|
149
|
-
//@ts-ignore
|
|
150
|
-
this.addBlock(block);
|
|
151
|
-
}
|
|
152
|
-
//@ts-ignore
|
|
153
|
-
this.addDependency(//@ts-ignore
|
|
154
|
-
new _StaticExportsDependency.default([
|
|
155
|
-
'get',
|
|
156
|
-
'init'
|
|
157
|
-
], false));
|
|
158
|
-
callback();
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* @param {CodeGenerationContext} context context for code generation
|
|
162
|
-
* @returns {CodeGenerationResult} result
|
|
163
|
-
*/ //@ts-ignore
|
|
164
|
-
codeGeneration({ moduleGraph, chunkGraph, runtimeTemplate }) {
|
|
165
|
-
const sources = new Map();
|
|
166
|
-
const runtimeRequirements = new Set([
|
|
167
|
-
_RuntimeGlobals.definePropertyGetters,
|
|
168
|
-
_RuntimeGlobals.hasOwnProperty,
|
|
169
|
-
_RuntimeGlobals.exports
|
|
170
|
-
]);
|
|
171
|
-
const getters = [];
|
|
172
|
-
//@ts-ignore
|
|
173
|
-
for (const block of this.blocks){
|
|
174
|
-
const { dependencies } = block;
|
|
175
|
-
const modules = dependencies.map((dependency)=>{
|
|
176
|
-
const dep = dependency;
|
|
177
|
-
return {
|
|
178
|
-
name: dep.exposedName,
|
|
179
|
-
module: moduleGraph.getModule(dep),
|
|
180
|
-
request: dep.userRequest
|
|
181
|
-
};
|
|
182
|
-
});
|
|
183
|
-
let str;
|
|
184
|
-
//@ts-ignore
|
|
185
|
-
if (modules.some((m)=>!m.module)) {
|
|
186
|
-
str = runtimeTemplate.throwMissingModuleErrorBlock({
|
|
187
|
-
//@ts-ignore
|
|
188
|
-
request: modules.map((m)=>m.request).join(', ')
|
|
189
|
-
});
|
|
190
|
-
} else {
|
|
191
|
-
str = `return ${runtimeTemplate.blockPromise({
|
|
192
|
-
block,
|
|
193
|
-
message: '',
|
|
194
|
-
chunkGraph,
|
|
195
|
-
runtimeRequirements
|
|
196
|
-
})}.then(${runtimeTemplate.returningFunction(runtimeTemplate.returningFunction(`(${modules//@ts-ignore
|
|
197
|
-
.map(({ module, request })=>runtimeTemplate.moduleRaw({
|
|
198
|
-
module,
|
|
199
|
-
chunkGraph,
|
|
200
|
-
request,
|
|
201
|
-
weak: false,
|
|
202
|
-
runtimeRequirements
|
|
203
|
-
})).join(', ')})`))});`;
|
|
204
|
-
}
|
|
205
|
-
getters.push(`${JSON.stringify(modules[0].name)}: ${runtimeTemplate.basicFunction('', str)}`);
|
|
206
|
-
}
|
|
207
|
-
const source = _Template.default.asString([
|
|
208
|
-
`var moduleMap = {`,
|
|
209
|
-
_Template.default.indent(getters.join(',\n')),
|
|
210
|
-
'};',
|
|
211
|
-
`var get = ${runtimeTemplate.basicFunction('module, getScope', [
|
|
212
|
-
`${_RuntimeGlobals.currentRemoteGetScope} = getScope;`,
|
|
213
|
-
// reusing the getScope variable to avoid creating a new var (and module is also used later)
|
|
214
|
-
'getScope = (',
|
|
215
|
-
_Template.default.indent([
|
|
216
|
-
`${_RuntimeGlobals.hasOwnProperty}(moduleMap, module)`,
|
|
217
|
-
_Template.default.indent([
|
|
218
|
-
'? moduleMap[module]()',
|
|
219
|
-
`: Promise.resolve().then(${runtimeTemplate.basicFunction('', "throw new Error('Module \"' + module + '\" does not exist in container.');")})`
|
|
220
|
-
])
|
|
221
|
-
]),
|
|
222
|
-
');',
|
|
223
|
-
`${_RuntimeGlobals.currentRemoteGetScope} = undefined;`,
|
|
224
|
-
'return getScope;'
|
|
225
|
-
])};`,
|
|
226
|
-
`var init = ${runtimeTemplate.basicFunction('shareScope, initScope', [
|
|
227
|
-
`if (!${_RuntimeGlobals.shareScopeMap}) return;`,
|
|
228
|
-
`var name = ${JSON.stringify(this._shareScope)}`,
|
|
229
|
-
`var oldScope = ${_RuntimeGlobals.shareScopeMap}[name];`,
|
|
230
|
-
`if(oldScope && oldScope !== shareScope) throw new Error("Container initialization failed as it has already been initialized with a different share scope");`,
|
|
231
|
-
`${_RuntimeGlobals.shareScopeMap}[name] = shareScope;`,
|
|
232
|
-
`return ${_RuntimeGlobals.initializeSharing}(name, initScope);`
|
|
233
|
-
])};`,
|
|
234
|
-
'',
|
|
235
|
-
'// This exports getters to disallow modifications',
|
|
236
|
-
`${_RuntimeGlobals.definePropertyGetters}(exports, {`,
|
|
237
|
-
_Template.default.indent([
|
|
238
|
-
`get: ${runtimeTemplate.returningFunction('get')},`,
|
|
239
|
-
`init: ${runtimeTemplate.returningFunction('init')}`
|
|
240
|
-
]),
|
|
241
|
-
'});'
|
|
242
|
-
]);
|
|
243
|
-
sources.set('javascript', this.useSourceMap || this.useSimpleSourceMap ? new _webpacksources.OriginalSource(source, 'webpack/container-entry') : new _webpacksources.RawSource(source));
|
|
244
|
-
return {
|
|
245
|
-
sources,
|
|
246
|
-
runtimeRequirements
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* @param {string=} type the source type for which the size should be estimated
|
|
251
|
-
* @returns {number} the estimated size of the module (must be non-zero)
|
|
252
|
-
*/ size(type) {
|
|
253
|
-
return 42;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* @param {ObjectSerializerContext} context context
|
|
257
|
-
*/ //@ts-ignore
|
|
258
|
-
serialize(context) {
|
|
259
|
-
const { write } = context;
|
|
260
|
-
write(this._name);
|
|
261
|
-
write(this._exposes);
|
|
262
|
-
write(this._shareScope);
|
|
263
|
-
//@ts-ignore
|
|
264
|
-
super.serialize(context);
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* @param {string} name container entry name
|
|
268
|
-
* @param {[string, ExposeOptions][]} exposes list of exposed modules
|
|
269
|
-
* @param {string} shareScope name of the share scope
|
|
270
|
-
*/ constructor(name, exposes, shareScope){
|
|
271
|
-
super(_ModuleTypeConstants.JAVASCRIPT_MODULE_TYPE_DYNAMIC, null);
|
|
272
|
-
this._name = name;
|
|
273
|
-
this._exposes = exposes;
|
|
274
|
-
this._shareScope = shareScope;
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
//@ts-ignore
|
|
278
|
-
(0, _makeSerializable.default)(ContainerEntryModule, 'enhanced/lib/container/ContainerEntryModule');
|
|
279
|
-
const _default = ContainerEntryModule;
|
|
280
|
-
|
|
281
|
-
//# sourceMappingURL=ContainerEntryModule.js.map
|