@module-federation/enhanced 0.0.3 → 0.0.4
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/dist/package.json +33 -0
- package/{src → dist/src}/index.d.ts +4 -0
- package/dist/src/index.js +32 -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 +19 -0
- package/dist/src/lib/container/AsyncBoundaryPlugin.js +172 -0
- package/dist/src/lib/container/AsyncBoundaryPlugin.js.map +1 -0
- package/{src → dist/src}/lib/container/ContainerEntryDependency.d.ts +1 -1
- package/dist/src/lib/container/ContainerEntryDependency.js +37 -0
- package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -0
- package/{src → dist/src}/lib/container/ContainerEntryModule.d.ts +2 -2
- package/dist/src/lib/container/ContainerEntryModule.js +230 -0
- package/dist/src/lib/container/ContainerEntryModule.js.map +1 -0
- package/{src → dist/src}/lib/container/ContainerEntryModuleFactory.d.ts +2 -1
- package/dist/src/lib/container/ContainerEntryModuleFactory.js +30 -0
- package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -0
- package/{src → dist/src}/lib/container/ContainerExposedDependency.d.ts +2 -2
- package/dist/src/lib/container/ContainerExposedDependency.js +49 -0
- package/dist/src/lib/container/ContainerExposedDependency.js.map +1 -0
- package/{src → dist/src}/lib/container/ContainerPlugin.d.ts +1 -1
- package/dist/src/lib/container/ContainerPlugin.js +85 -0
- package/dist/src/lib/container/ContainerPlugin.js.map +1 -0
- package/{src → dist/src}/lib/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/src/lib/container/ContainerReferencePlugin.js +100 -0
- package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -0
- package/{src → dist/src}/lib/container/FallbackDependency.d.ts +1 -5
- package/dist/src/lib/container/FallbackDependency.js +47 -0
- package/dist/src/lib/container/FallbackDependency.js.map +1 -0
- package/{src → dist/src}/lib/container/FallbackItemDependency.d.ts +2 -2
- package/dist/src/lib/container/FallbackItemDependency.js +26 -0
- package/dist/src/lib/container/FallbackItemDependency.js.map +1 -0
- package/{src → dist/src}/lib/container/FallbackModule.d.ts +2 -3
- package/dist/src/lib/container/FallbackModule.js +152 -0
- package/dist/src/lib/container/FallbackModule.js.map +1 -0
- package/{src → dist/src}/lib/container/FallbackModuleFactory.d.ts +3 -2
- 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 +13 -0
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js +70 -0
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -0
- package/{src → dist/src}/lib/container/ModuleFederationPlugin.d.ts +1 -1
- package/dist/src/lib/container/ModuleFederationPlugin.js +86 -0
- package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -0
- package/{src → dist/src}/lib/container/RemoteModule.d.ts +2 -3
- package/dist/src/lib/container/RemoteModule.js +148 -0
- package/dist/src/lib/container/RemoteModule.js.map +1 -0
- package/{src → dist/src}/lib/container/RemoteRuntimeModule.d.ts +1 -1
- package/dist/src/lib/container/RemoteRuntimeModule.js +103 -0
- package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -0
- package/{src → dist/src}/lib/container/RemoteToExternalDependency.d.ts +2 -2
- package/dist/src/lib/container/RemoteToExternalDependency.js +26 -0
- package/dist/src/lib/container/RemoteToExternalDependency.js.map +1 -0
- package/{src → dist/src}/lib/container/options.js +32 -42
- package/dist/src/lib/container/options.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ConsumeSharedFallbackDependency.d.ts +2 -2
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js +26 -0
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ConsumeSharedModule.d.ts +1 -1
- package/dist/src/lib/sharing/ConsumeSharedModule.js +201 -0
- package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js +238 -0
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ConsumeSharedRuntimeModule.d.ts +1 -1
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +247 -0
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ProvideForSharedDependency.d.ts +2 -2
- package/dist/src/lib/sharing/ProvideForSharedDependency.js +27 -0
- package/dist/src/lib/sharing/ProvideForSharedDependency.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ProvideSharedDependency.d.ts +1 -1
- package/dist/src/lib/sharing/ProvideSharedDependency.js +61 -0
- package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ProvideSharedModule.d.ts +5 -5
- package/dist/src/lib/sharing/ProvideSharedModule.js +163 -0
- package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ProvideSharedModuleFactory.d.ts +1 -1
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +30 -0
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ProvideSharedPlugin.d.ts +1 -1
- package/dist/src/lib/sharing/ProvideSharedPlugin.js +185 -0
- package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -0
- package/{src → dist/src}/lib/sharing/SharePlugin.d.ts +1 -1
- package/dist/src/lib/sharing/SharePlugin.js +76 -0
- package/dist/src/lib/sharing/SharePlugin.js.map +1 -0
- package/{src → dist/src}/lib/sharing/ShareRuntimeModule.d.ts +1 -1
- package/dist/src/lib/sharing/ShareRuntimeModule.js +116 -0
- package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -0
- package/{src → dist/src}/lib/sharing/resolveMatchedConfigs.d.ts +1 -1
- package/dist/src/lib/sharing/resolveMatchedConfigs.js +66 -0
- package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -0
- package/{src → dist/src}/lib/sharing/utils.d.ts +1 -1
- package/{src → dist/src}/lib/sharing/utils.js +94 -81
- package/dist/src/lib/sharing/utils.js.map +1 -0
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +5 -0
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +19 -0
- package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -0
- package/{src → dist/src}/runtime/ModuleInfoRuntimeModule.d.ts +2 -1
- package/dist/src/runtime/ModuleInfoRuntimeModule.js +80 -0
- package/dist/src/runtime/ModuleInfoRuntimeModule.js.map +1 -0
- package/{src → dist/src}/runtime/ModuleInfoRuntimePlugin.d.ts +1 -1
- package/dist/src/runtime/ModuleInfoRuntimePlugin.js +24 -0
- package/dist/src/runtime/ModuleInfoRuntimePlugin.js.map +1 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.d.ts +7 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.js +1668 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +437 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.js +529 -0
- package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -0
- package/package.json +23 -8
- package/CHANGELOG.md +0 -111
- 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.js +0 -43
- 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 -45
- package/src/lib/container/AsyncBoundaryPlugin.js +0 -103
- 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.js +0 -43
- 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.js +0 -237
- 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.js +0 -32
- 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.js +0 -53
- 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.js +0 -88
- 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 -97
- 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.js +0 -55
- 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.js +0 -33
- 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.js +0 -149
- 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.js +0 -30
- package/src/lib/container/FallbackModuleFactory.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.js +0 -79
- 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.js +0 -147
- 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.js +0 -121
- package/src/lib/container/RemoteRuntimeModule.js.map +0 -1
- package/src/lib/container/RemoteToExternalDependency.d.js +0 -15
- package/src/lib/container/RemoteToExternalDependency.d.js.map +0 -1
- package/src/lib/container/RemoteToExternalDependency.js +0 -33
- 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.js +0 -33
- 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.js +0 -191
- 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.js +0 -217
- 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.js +0 -251
- 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.js +0 -34
- 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.js +0 -65
- 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.js +0 -159
- 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.js +0 -32
- 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.js +0 -165
- 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.js +0 -73
- 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.js +0 -117
- 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.js +0 -69
- 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.js.map +0 -1
- package/src/runtime/ModuleInfoRuntimeModule.js +0 -88
- package/src/runtime/ModuleInfoRuntimeModule.js.map +0 -1
- package/src/runtime/ModuleInfoRuntimePlugin.js +0 -29
- package/src/runtime/ModuleInfoRuntimePlugin.js.map +0 -1
- /package/{src → dist/src}/lib/Constants.d.ts +0 -0
- /package/{src → dist/src}/lib/container/options.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerReferencePlugin.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy\n*/\n\nimport type Compiler from 'webpack/lib/Compiler';\nimport * as RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport createSchemaValidation from 'webpack/lib/util/create-schema-validation';\nimport FallbackDependency from './FallbackDependency';\nimport FallbackItemDependency from './FallbackItemDependency';\nimport FallbackModuleFactory from './FallbackModuleFactory';\nimport RemoteModule from './RemoteModule';\nimport RemoteRuntimeModule from './RemoteRuntimeModule';\nimport RemoteToExternalDependency from './RemoteToExternalDependency';\nimport { parseOptions } from './options';\nimport ExternalsPlugin from 'webpack/lib/ExternalsPlugin';\nimport type Compilation from 'webpack/lib/Compilation';\nimport type { ResolveData } from 'webpack/lib/NormalModuleFactory';\nimport NormalModuleFactory from 'webpack/lib/NormalModuleFactory';\nimport {\n ExternalsType,\n ContainerReferencePluginOptions,\n RemotesConfig,\n} from '../../declarations/plugins/container/ContainerReferencePlugin';\n\nconst validate = createSchemaValidation(\n //eslint-disable-next-line\n require('webpack/schemas/plugins/container/ContainerReferencePlugin.check.js'),\n () =>\n require('webpack/schemas/plugins/container/ContainerReferencePlugin.json'),\n {\n name: 'Container Reference Plugin',\n baseDataPath: 'options',\n },\n);\n\nconst slashCode = '/'.charCodeAt(0);\n\nclass ContainerReferencePlugin {\n private _remoteType: ExternalsType;\n private _remotes: [string, RemotesConfig][];\n\n constructor(options: ContainerReferencePluginOptions) {\n validate(options);\n\n this._remoteType = options.remoteType;\n this._remotes = parseOptions(\n options.remotes,\n (item) => ({\n external: Array.isArray(item) ? item : [item],\n shareScope: options.shareScope || 'default',\n }),\n (item) => ({\n external: Array.isArray(item.external)\n ? item.external\n : [item.external],\n shareScope: item.shareScope || options.shareScope || 'default',\n }),\n );\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 { _remotes: remotes, _remoteType: remoteType } = this;\n\n /** @type {Record<string, string>} */\n const remoteExternals: Record<string, string> = {};\n\n for (const [key, config] of remotes) {\n let i = 0;\n for (const external of config.external) {\n if (typeof external === 'string' && external.startsWith('internal ')) {\n continue;\n }\n remoteExternals[\n `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`\n ] = external;\n i++;\n }\n }\n const Externals = compiler.webpack.ExternalsPlugin || ExternalsPlugin;\n //@ts-ignore\n new Externals(remoteType, remoteExternals).apply(compiler);\n\n compiler.hooks.compilation.tap(\n 'ContainerReferencePlugin',\n (\n compilation: Compilation,\n { normalModuleFactory }: { normalModuleFactory: NormalModuleFactory },\n ) => {\n compilation.dependencyFactories.set(\n RemoteToExternalDependency,\n normalModuleFactory,\n );\n\n compilation.dependencyFactories.set(\n FallbackItemDependency,\n normalModuleFactory,\n );\n\n compilation.dependencyFactories.set(\n FallbackDependency,\n new FallbackModuleFactory(),\n );\n\n normalModuleFactory.hooks.factorize.tap(\n 'ContainerReferencePlugin',\n //@ts-ignore\n (data: ResolveData): Module => {\n if (!data.request.includes('!')) {\n for (const [key, config] of remotes) {\n if (\n data.request.startsWith(`${key}`) &&\n (data.request.length === key.length ||\n data.request.charCodeAt(key.length) === slashCode)\n ) {\n return new RemoteModule(\n data.request,\n //@ts-ignore\n config.external.map((external: any, i: any) =>\n external.startsWith('internal ')\n ? external.slice(9)\n : `webpack/container/reference/${key}${\n i ? `/fallback-${i}` : ''\n }`,\n ),\n `.${data.request.slice(key.length)}`,\n //@ts-ignore\n config.shareScope,\n );\n }\n }\n }\n },\n );\n\n compilation.hooks.runtimeRequirementInTree\n .for(RuntimeGlobals.ensureChunkHandlers)\n .tap('ContainerReferencePlugin', (chunk, set) => {\n set.add(RuntimeGlobals.module);\n set.add(RuntimeGlobals.moduleFactoriesAddOnly);\n set.add(RuntimeGlobals.hasOwnProperty);\n set.add(RuntimeGlobals.initializeSharing);\n set.add(RuntimeGlobals.shareScopeMap);\n compilation.addRuntimeModule(chunk, new RemoteRuntimeModule());\n });\n },\n );\n }\n}\n\nexport default ContainerReferencePlugin;\n"],"names":["validate","createSchemaValidation","require","name","baseDataPath","slashCode","charCodeAt","ContainerReferencePlugin","apply","compiler","_remotes","remotes","_remoteType","remoteType","remoteExternals","key","config","i","external","startsWith","Externals","webpack","ExternalsPlugin","hooks","compilation","tap","normalModuleFactory","dependencyFactories","set","RemoteToExternalDependency","FallbackItemDependency","FallbackDependency","FallbackModuleFactory","factorize","data","request","includes","length","RemoteModule","map","slice","shareScope","runtimeRequirementInTree","for","RuntimeGlobals","ensureChunkHandlers","chunk","add","module","moduleFactoriesAddOnly","hasOwnProperty","initializeSharing","shareScopeMap","addRuntimeModule","RemoteRuntimeModule","constructor","options","parseOptions","item","Array","isArray"],"mappings":"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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "FallbackDependency", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return FallbackDependency;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
let FallbackDependency = class FallbackDependency extends Dependency {
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=FallbackDependency.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackDependency.d.ts"],"sourcesContent":["export class FallbackDependency extends Dependency {\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackDependency} deserialize fallback dependency\n */\n static deserialize(context: ObjectDeserializerContext): FallbackDependency;\n /**\n * @param {string[]} requests requests\n */\n constructor(requests: string[]);\n requests: string[];\n}\ndeclare namespace FallbackDependency {\n export { ObjectDeserializerContext, ObjectSerializerContext };\n}\n"],"names":["FallbackDependency","Dependency"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,IAAA,AAAMA,qBAAN,MAAMA,2BAA2BC;AAWxC"}
|
|
@@ -1,55 +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 _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
15
|
-
const _Dependency = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/Dependency"));
|
|
16
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/util/makeSerializable"));
|
|
17
|
-
let FallbackDependency = class FallbackDependency extends _Dependency.default {
|
|
18
|
-
/**
|
|
19
|
-
* @returns {string | null} an identifier to merge equal requests
|
|
20
|
-
*/ getResourceIdentifier() {
|
|
21
|
-
return `fallback ${this.requests.join(' ')}`;
|
|
22
|
-
}
|
|
23
|
-
get type() {
|
|
24
|
-
return 'fallback';
|
|
25
|
-
}
|
|
26
|
-
get category() {
|
|
27
|
-
return 'esm';
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @param {ObjectSerializerContext} context context
|
|
31
|
-
*/ serialize(context) {
|
|
32
|
-
const { write } = context;
|
|
33
|
-
write(this.requests);
|
|
34
|
-
super.serialize(context);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @param {ObjectDeserializerContext} context context
|
|
38
|
-
* @returns {FallbackDependency} deserialize fallback dependency
|
|
39
|
-
*/ static deserialize(context) {
|
|
40
|
-
const { read } = context;
|
|
41
|
-
const obj = new FallbackDependency(read());
|
|
42
|
-
obj.deserialize(context);
|
|
43
|
-
return obj;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @param {string[]} requests requests
|
|
47
|
-
*/ constructor(requests){
|
|
48
|
-
super();
|
|
49
|
-
this.requests = requests;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
(0, _makeSerializable.default)(FallbackDependency, 'enhanced/lib/container/FallbackDependency');
|
|
53
|
-
const _default = FallbackDependency;
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=FallbackDependency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackDependency.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 type {\n ObjectDeserializerContext,\n ObjectSerializerContext,\n} from 'webpack/lib/Dependency';\nimport Dependency from 'webpack/lib/Dependency';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\n\nclass FallbackDependency extends Dependency {\n requests: string[];\n\n /**\n * @param {string[]} requests requests\n */\n constructor(requests: string[]) {\n super();\n this.requests = requests;\n }\n\n /**\n * @returns {string | null} an identifier to merge equal requests\n */\n override getResourceIdentifier(): string | null {\n return `fallback ${this.requests.join(' ')}`;\n }\n\n override get type(): string {\n return 'fallback';\n }\n\n override get category(): string {\n return 'esm';\n }\n\n /**\n * @param {ObjectSerializerContext} context context\n */\n override serialize(context: ObjectSerializerContext): void {\n const { write } = context;\n write(this.requests);\n super.serialize(context);\n }\n\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackDependency} deserialize fallback dependency\n */\n static deserialize(context: ObjectDeserializerContext): FallbackDependency {\n const { read } = context;\n const obj = new FallbackDependency(read());\n obj.deserialize(context);\n return obj;\n }\n}\n\nmakeSerializable(\n FallbackDependency,\n 'enhanced/lib/container/FallbackDependency',\n);\n\nexport default FallbackDependency;\n"],"names":["FallbackDependency","Dependency","getResourceIdentifier","requests","join","type","category","serialize","context","write","deserialize","read","obj","constructor","makeSerializable"],"mappings":"AAAA;;;AAGA,GAEA;;;;+BA6DA;;;eAAA;;;;qEAvDuB;2EACM;AAE7B,IAAA,AAAMA,qBAAN,MAAMA,2BAA2BC,mBAAU;IAWzC;;GAEC,GACD,AAASC,wBAAuC;QAC9C,OAAO,CAAC,SAAS,EAAE,IAAI,CAACC,QAAQ,CAACC,IAAI,CAAC,KAAK,CAAC;IAC9C;IAEA,IAAaC,OAAe;QAC1B,OAAO;IACT;IAEA,IAAaC,WAAmB;QAC9B,OAAO;IACT;IAEA;;GAEC,GACD,AAASC,UAAUC,OAAgC,EAAQ;QACzD,MAAM,EAAEC,KAAK,EAAE,GAAGD;QAClBC,MAAM,IAAI,CAACN,QAAQ;QACnB,KAAK,CAACI,UAAUC;IAClB;IAEA;;;GAGC,GACD,OAAOE,YAAYF,OAAkC,EAAsB;QACzE,MAAM,EAAEG,IAAI,EAAE,GAAGH;QACjB,MAAMI,MAAM,IAAIZ,mBAAmBW;QACnCC,IAAIF,WAAW,CAACF;QAChB,OAAOI;IACT;IAzCA;;GAEC,GACDC,YAAYV,QAAkB,CAAE;QAC9B,KAAK;QACL,IAAI,CAACA,QAAQ,GAAGA;IAClB;AAoCF;AAEAW,IAAAA,yBAAgB,EACdd,oBACA;MAGF,WAAeA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackItemDependency.d.ts"],"sourcesContent":["export = FallbackItemDependency;\ndeclare class FallbackItemDependency extends ModuleDependency {}\nimport ModuleDependency = require('webpack/lib/dependencies/ModuleDependency');\n"],"names":["FallbackItemDependency"],"mappings":";iBAASA"}
|
|
@@ -1,33 +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 _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
15
|
-
const _ModuleDependency = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/dependencies/ModuleDependency"));
|
|
16
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/util/makeSerializable"));
|
|
17
|
-
let FallbackItemDependency = class FallbackItemDependency extends _ModuleDependency.default {
|
|
18
|
-
get type() {
|
|
19
|
-
return 'fallback item';
|
|
20
|
-
}
|
|
21
|
-
get category() {
|
|
22
|
-
return 'esm';
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @param {string} request request
|
|
26
|
-
*/ constructor(request){
|
|
27
|
-
super(request);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
(0, _makeSerializable.default)(FallbackItemDependency, 'enhanced/lib/container/FallbackItemDependency');
|
|
31
|
-
const _default = FallbackItemDependency;
|
|
32
|
-
|
|
33
|
-
//# sourceMappingURL=FallbackItemDependency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackItemDependency.ts"],"sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy\n*/\nimport ModuleDependency from 'webpack/lib/dependencies/ModuleDependency';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\n\nclass FallbackItemDependency extends ModuleDependency {\n /**\n * @param {string} request request\n */\n constructor(request: string) {\n super(request);\n }\n\n override get type(): string {\n return 'fallback item';\n }\n\n override get category(): string {\n return 'esm';\n }\n}\n\nmakeSerializable(\n FallbackItemDependency,\n 'enhanced/lib/container/FallbackItemDependency',\n);\n\nexport default FallbackItemDependency;\n"],"names":["FallbackItemDependency","ModuleDependency","type","category","constructor","request","makeSerializable"],"mappings":"AAAA;;;AAGA;;;;+BA0BA;;;eAAA;;;;2EAzB6B;2EACA;AAE7B,IAAA,AAAMA,yBAAN,MAAMA,+BAA+BC,yBAAgB;IAQnD,IAAaC,OAAe;QAC1B,OAAO;IACT;IAEA,IAAaC,WAAmB;QAC9B,OAAO;IACT;IAbA;;GAEC,GACDC,YAAYC,OAAe,CAAE;QAC3B,KAAK,CAACA;IACR;AASF;AAEAC,IAAAA,yBAAgB,EACdN,wBACA;MAGF,WAAeA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModule.d.ts"],"sourcesContent":["export = FallbackModule;\ndeclare class FallbackModule extends Module {\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackModule} deserialized fallback module\n */\n static deserialize(context: ObjectDeserializerContext): FallbackModule;\n /**\n * @param {string[]} requests list of requests to choose one\n */\n constructor(requests: string[]);\n requests: string[];\n _identifier: string;\n}\ndeclare namespace FallbackModule {\n export {\n WebpackOptions,\n Chunk,\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 };\n}\nimport Module = require('webpack/lib/Module');\ntype ObjectDeserializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;\ntype WebpackOptions = any;\ntype Chunk = import('webpack/lib/Chunk');\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;\n"],"names":["FallbackModule"],"mappings":";iBAASA"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra and 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 _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
15
|
-
const _webpacksources = require("webpack-sources");
|
|
16
|
-
const _Module = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/Module"));
|
|
17
|
-
const _ModuleTypeConstants = require("webpack/lib/ModuleTypeConstants");
|
|
18
|
-
const _RuntimeGlobals = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/RuntimeGlobals"));
|
|
19
|
-
const _Template = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/Template"));
|
|
20
|
-
const _makeSerializable = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/util/makeSerializable"));
|
|
21
|
-
const _FallbackItemDependency = /*#__PURE__*/ _interop_require_default._(require("./FallbackItemDependency"));
|
|
22
|
-
const TYPES = new Set([
|
|
23
|
-
'javascript'
|
|
24
|
-
]);
|
|
25
|
-
const RUNTIME_REQUIREMENTS = new Set([
|
|
26
|
-
_RuntimeGlobals.default.module
|
|
27
|
-
]);
|
|
28
|
-
let FallbackModule = class FallbackModule extends _Module.default {
|
|
29
|
-
/**
|
|
30
|
-
* @returns {string} a unique identifier of the module
|
|
31
|
-
*/ identifier() {
|
|
32
|
-
return this._identifier;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @param {RequestShortener} requestShortener the request shortener
|
|
36
|
-
* @returns {string} a user readable identifier of the module
|
|
37
|
-
*/ readableIdentifier(requestShortener) {
|
|
38
|
-
return this._identifier;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @param {LibIdentOptions} options options
|
|
42
|
-
* @returns {string | null} an identifier for library inclusion
|
|
43
|
-
*/ libIdent(options) {
|
|
44
|
-
return `${this.layer ? `(${this.layer})/` : ''}webpack/container/fallback/${this.requests[0]}/and ${this.requests.length - 1} more`;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @param {Chunk} chunk the chunk which condition should be checked
|
|
48
|
-
* @param {Compilation} compilation the compilation
|
|
49
|
-
* @returns {boolean} true, if the chunk is ok for the module
|
|
50
|
-
*/ chunkCondition(chunk, { chunkGraph }) {
|
|
51
|
-
return chunkGraph.getNumberOfEntryModules(chunk) > 0;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @param {NeedBuildContext} context context info
|
|
55
|
-
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
56
|
-
* @returns {void}
|
|
57
|
-
*/ needBuild(context, callback) {
|
|
58
|
-
callback(null, !this.buildInfo);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* @param {WebpackOptions} options webpack options
|
|
62
|
-
* @param {Compilation} compilation the compilation
|
|
63
|
-
* @param {ResolverWithOptions} resolver the resolver
|
|
64
|
-
* @param {InputFileSystem} fs the file system
|
|
65
|
-
* @param {function(WebpackError=): void} callback callback function
|
|
66
|
-
* @returns {void}
|
|
67
|
-
*/ build(options, compilation, resolver, fs, callback) {
|
|
68
|
-
this.buildMeta = {};
|
|
69
|
-
this.buildInfo = {
|
|
70
|
-
strict: true
|
|
71
|
-
};
|
|
72
|
-
this.clearDependenciesAndBlocks();
|
|
73
|
-
for (const request of this.requests)this.addDependency(new _FallbackItemDependency.default(request));
|
|
74
|
-
callback();
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @param {string=} type the source type for which the size should be estimated
|
|
78
|
-
* @returns {number} the estimated size of the module (must be non-zero)
|
|
79
|
-
*/ size(type) {
|
|
80
|
-
return this.requests.length * 5 + 42;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* @returns {Set<string>} types available (do not mutate)
|
|
84
|
-
*/ getSourceTypes() {
|
|
85
|
-
return TYPES;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* @param {CodeGenerationContext} context context for code generation
|
|
89
|
-
* @returns {CodeGenerationResult} result
|
|
90
|
-
*/ codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph }) {
|
|
91
|
-
const ids = this.dependencies.map((dep)=>//@ts-ignore
|
|
92
|
-
chunkGraph.getModuleId(moduleGraph.getModule(dep)));
|
|
93
|
-
const code = _Template.default.asString([
|
|
94
|
-
`var ids = ${JSON.stringify(ids)};`,
|
|
95
|
-
'var error, result, i = 0;',
|
|
96
|
-
`var loop = ${runtimeTemplate.basicFunction('next', [
|
|
97
|
-
'while(i < ids.length) {',
|
|
98
|
-
_Template.default.indent([
|
|
99
|
-
`try { next = ${_RuntimeGlobals.default.require}(ids[i++]); } catch(e) { return handleError(e); }`,
|
|
100
|
-
'if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);'
|
|
101
|
-
]),
|
|
102
|
-
'}',
|
|
103
|
-
'if(error) throw error;'
|
|
104
|
-
])}`,
|
|
105
|
-
`var handleResult = ${runtimeTemplate.basicFunction('result', [
|
|
106
|
-
'if(result) return result;',
|
|
107
|
-
'return loop();'
|
|
108
|
-
])};`,
|
|
109
|
-
`var handleError = ${runtimeTemplate.basicFunction('e', [
|
|
110
|
-
'error = e;',
|
|
111
|
-
'return loop();'
|
|
112
|
-
])};`,
|
|
113
|
-
'module.exports = loop();'
|
|
114
|
-
]);
|
|
115
|
-
const sources = new Map();
|
|
116
|
-
sources.set('javascript', new _webpacksources.RawSource(code));
|
|
117
|
-
return {
|
|
118
|
-
sources,
|
|
119
|
-
runtimeRequirements: RUNTIME_REQUIREMENTS
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* @param {ObjectSerializerContext} context context
|
|
124
|
-
*/ serialize(context) {
|
|
125
|
-
const { write } = context;
|
|
126
|
-
write(this.requests);
|
|
127
|
-
super.serialize(context);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @param {ObjectDeserializerContext} context context
|
|
131
|
-
* @returns {FallbackModule} deserialized fallback module
|
|
132
|
-
*/ static deserialize(context) {
|
|
133
|
-
const { read } = context;
|
|
134
|
-
const obj = new FallbackModule(read());
|
|
135
|
-
obj.deserialize(context);
|
|
136
|
-
return obj;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* @param {string[]} requests list of requests to choose one
|
|
140
|
-
*/ constructor(requests){
|
|
141
|
-
super(_ModuleTypeConstants.WEBPACK_MODULE_TYPE_FALLBACK);
|
|
142
|
-
this.requests = requests;
|
|
143
|
-
this._identifier = `fallback ${this.requests.join(' ')}`;
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
(0, _makeSerializable.default)(FallbackModule, 'enhanced/lib/container/FallbackModule');
|
|
147
|
-
const _default = FallbackModule;
|
|
148
|
-
|
|
149
|
-
//# sourceMappingURL=FallbackModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModule.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 { RawSource } from 'webpack-sources';\nimport type {\n RequestShortener,\n LibIdentOptions,\n CodeGenerationContext,\n CodeGenerationResult,\n NeedBuildContext,\n WebpackError,\n ResolverWithOptions,\n InputFileSystem,\n Compilation,\n WebpackOptions,\n ObjectDeserializerContext,\n ObjectSerializerContext,\n} from 'webpack/lib/Module';\nimport Module from 'webpack/lib/Module';\nimport type ChunkGraph from 'webpack/lib/ChunkGraph';\nimport Chunk from 'webpack/lib/Chunk';\nimport { WEBPACK_MODULE_TYPE_FALLBACK } from 'webpack/lib/ModuleTypeConstants';\nimport RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport Template from 'webpack/lib/Template';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\nimport FallbackItemDependency from './FallbackItemDependency';\n\nconst TYPES = new Set(['javascript']);\nconst RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]);\n\nclass FallbackModule extends Module {\n private requests: string[];\n private _identifier: string;\n\n /**\n * @param {string[]} requests list of requests to choose one\n */\n constructor(requests: string[]) {\n super(WEBPACK_MODULE_TYPE_FALLBACK);\n this.requests = requests;\n this._identifier = `fallback ${this.requests.join(' ')}`;\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 this._identifier;\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/fallback/${\n this.requests[0]\n }/and ${this.requests.length - 1} more`;\n }\n\n /**\n * @param {Chunk} chunk the chunk which condition should be checked\n * @param {Compilation} compilation the compilation\n * @returns {boolean} true, if the chunk is ok for the module\n */\n override chunkCondition(\n chunk: Chunk,\n { chunkGraph }: { chunkGraph: ChunkGraph },\n ): boolean {\n return chunkGraph.getNumberOfEntryModules(chunk) > 0;\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: (error: WebpackError | null, result?: 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: WebpackOptions,\n compilation: Compilation,\n resolver: ResolverWithOptions,\n fs: InputFileSystem,\n callback: (error?: WebpackError) => void,\n ): void {\n this.buildMeta = {};\n this.buildInfo = {\n strict: true,\n };\n\n this.clearDependenciesAndBlocks();\n for (const request of this.requests)\n this.addDependency(new FallbackItemDependency(request));\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 this.requests.length * 5 + 42;\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 * @param {CodeGenerationContext} context context for code generation\n * @returns {CodeGenerationResult} result\n */\n override codeGeneration({\n runtimeTemplate,\n moduleGraph,\n chunkGraph,\n }: CodeGenerationContext): CodeGenerationResult {\n const ids = this.dependencies.map((dep) =>\n //@ts-ignore\n chunkGraph.getModuleId(moduleGraph.getModule(dep)),\n );\n const code = Template.asString([\n `var ids = ${JSON.stringify(ids)};`,\n 'var error, result, i = 0;',\n `var loop = ${runtimeTemplate.basicFunction('next', [\n 'while(i < ids.length) {',\n Template.indent([\n `try { next = ${RuntimeGlobals.require}(ids[i++]); } catch(e) { return handleError(e); }`,\n 'if(next) return next.then ? next.then(handleResult, handleError) : handleResult(next);',\n ]),\n '}',\n 'if(error) throw error;',\n ])}`,\n `var handleResult = ${runtimeTemplate.basicFunction('result', [\n 'if(result) return result;',\n 'return loop();',\n ])};`,\n `var handleError = ${runtimeTemplate.basicFunction('e', [\n 'error = e;',\n 'return loop();',\n ])};`,\n 'module.exports = loop();',\n ]);\n const sources = new Map();\n sources.set('javascript', new RawSource(code));\n return { sources, runtimeRequirements: RUNTIME_REQUIREMENTS };\n }\n\n /**\n * @param {ObjectSerializerContext} context context\n */\n override serialize(context: ObjectSerializerContext): void {\n const { write } = context;\n write(this.requests);\n super.serialize(context);\n }\n\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {FallbackModule} deserialized fallback module\n */\n static deserialize(context: ObjectDeserializerContext): FallbackModule {\n const { read } = context;\n const obj = new FallbackModule(read());\n obj.deserialize(context);\n return obj;\n }\n}\n\nmakeSerializable(FallbackModule, 'enhanced/lib/container/FallbackModule');\n\nexport default FallbackModule;\n"],"names":["TYPES","Set","RUNTIME_REQUIREMENTS","RuntimeGlobals","module","FallbackModule","Module","identifier","_identifier","readableIdentifier","requestShortener","libIdent","options","layer","requests","length","chunkCondition","chunk","chunkGraph","getNumberOfEntryModules","needBuild","context","callback","buildInfo","build","compilation","resolver","fs","buildMeta","strict","clearDependenciesAndBlocks","request","addDependency","FallbackItemDependency","size","type","getSourceTypes","codeGeneration","runtimeTemplate","moduleGraph","ids","dependencies","map","dep","getModuleId","getModule","code","Template","asString","JSON","stringify","basicFunction","indent","require","sources","Map","set","RawSource","runtimeRequirements","serialize","write","deserialize","read","obj","constructor","WEBPACK_MODULE_TYPE_FALLBACK","join","makeSerializable"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModuleFactory.d.ts"],"sourcesContent":["export = FallbackModuleFactory;\ndeclare class FallbackModuleFactory extends ModuleFactory {}\ndeclare namespace FallbackModuleFactory {\n export { ModuleFactoryCreateData, ModuleFactoryResult, FallbackDependency };\n}\nimport ModuleFactory = require('webpack/lib/ModuleFactory');\ntype ModuleFactoryCreateData =\n import('webpack/lib/ModuleFactory').ModuleFactoryCreateData;\ntype ModuleFactoryResult =\n import('webpack/lib/ModuleFactory').ModuleFactoryResult;\ntype FallbackDependency = import('./FallbackDependency');\n"],"names":["FallbackModuleFactory"],"mappings":";iBAASA"}
|
|
@@ -1,30 +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 FallbackModuleFactory;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
15
|
-
const _ModuleFactory = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/ModuleFactory"));
|
|
16
|
-
const _FallbackModule = /*#__PURE__*/ _interop_require_default._(require("./FallbackModule"));
|
|
17
|
-
let FallbackModuleFactory = class FallbackModuleFactory extends _ModuleFactory.default {
|
|
18
|
-
/**
|
|
19
|
-
* @param {ModuleFactoryCreateData} data data object
|
|
20
|
-
* @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback
|
|
21
|
-
* @returns {void}
|
|
22
|
-
*/ create(data, callback) {
|
|
23
|
-
const dependency = data.dependencies[0];
|
|
24
|
-
callback(null, {
|
|
25
|
-
module: new _FallbackModule.default(dependency.requests)
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=FallbackModuleFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/FallbackModuleFactory.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\n'use strict';\nimport {\n ModuleFactoryCreateData,\n ModuleFactoryResult,\n} from 'webpack/lib/ModuleFactory';\nimport ModuleFactory from 'webpack/lib/ModuleFactory';\nimport FallbackModule from './FallbackModule';\nimport FallbackDependency from './FallbackDependency';\n\nexport default class FallbackModuleFactory extends ModuleFactory {\n /**\n * @param {ModuleFactoryCreateData} data data object\n * @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback\n * @returns {void}\n */\n override create(\n data: ModuleFactoryCreateData,\n callback: (error: Error | null, result?: ModuleFactoryResult) => void,\n ): void {\n const dependency = data.dependencies[0] as FallbackDependency;\n callback(null, {\n module: new FallbackModule(dependency.requests),\n });\n }\n}\n"],"names":["FallbackModuleFactory","ModuleFactory","create","data","callback","dependency","dependencies","module","FallbackModule","requests"],"mappings":"AAAA;;;AAGA,GAEA;;;;;;;eASqBA;;;;wEAJK;yEACC;AAGZ,IAAA,AAAMA,wBAAN,MAAMA,8BAA8BC,sBAAa;IAC9D;;;;GAIC,GACD,AAASC,OACPC,IAA6B,EAC7BC,QAAqE,EAC/D;QACN,MAAMC,aAAaF,KAAKG,YAAY,CAAC,EAAE;QACvCF,SAAS,MAAM;YACbG,QAAQ,IAAIC,uBAAc,CAACH,WAAWI,QAAQ;QAChD;IACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ModuleFederationPlugin.d.ts"],"sourcesContent":["export = ModuleFederationPlugin;\ndeclare class ModuleFederationPlugin {\n /**\n * @param {ModuleFederationPluginOptions} options options\n */\n constructor(options: any);\n _options: any;\n /**\n * Apply the plugin\n * @param {Compiler} compiler the compiler instance\n * @returns {void}\n */\n apply(compiler: Compiler): void;\n}\ndeclare namespace ModuleFederationPlugin {\n export { ExternalsType, ModuleFederationPluginOptions, Shared, Compiler };\n}\ntype Compiler = import('webpack/lib/Compiler');\ntype ExternalsType = any;\ntype ModuleFederationPluginOptions = any;\ntype Shared = any;\n"],"names":["ModuleFederationPlugin"],"mappings":";iBAASA"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra and 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 _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
15
|
-
const _ExternalsTypecheck = /*#__PURE__*/ _interop_require_default._(require("webpack/schemas/plugins/container/ExternalsType.check.js"));
|
|
16
|
-
const _SharePlugin = /*#__PURE__*/ _interop_require_default._(require("../sharing/SharePlugin"));
|
|
17
|
-
const _createschemavalidation = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/util/create-schema-validation"));
|
|
18
|
-
const _ContainerPlugin = /*#__PURE__*/ _interop_require_default._(require("./ContainerPlugin"));
|
|
19
|
-
const _ContainerReferencePlugin = /*#__PURE__*/ _interop_require_default._(require("./ContainerReferencePlugin"));
|
|
20
|
-
const validate = (0, _createschemavalidation.default)(//eslint-disable-next-line
|
|
21
|
-
require('webpack/schemas/plugins/container/ModuleFederationPlugin.check.js'), ()=>require('webpack/schemas/plugins/container/ModuleFederationPlugin.json'), {
|
|
22
|
-
name: 'Module Federation Plugin',
|
|
23
|
-
baseDataPath: 'options'
|
|
24
|
-
});
|
|
25
|
-
let ModuleFederationPlugin = class ModuleFederationPlugin {
|
|
26
|
-
/**
|
|
27
|
-
* Apply the plugin
|
|
28
|
-
* @param {Compiler} compiler the compiler instance
|
|
29
|
-
* @returns {void}
|
|
30
|
-
*/ apply(compiler) {
|
|
31
|
-
var _compiler_options_output_enabledLibraryTypes;
|
|
32
|
-
const { _options: options } = this;
|
|
33
|
-
const library = options.library || {
|
|
34
|
-
type: 'var',
|
|
35
|
-
name: options.name
|
|
36
|
-
};
|
|
37
|
-
const remoteType = options.remoteType || (options.library && (0, _ExternalsTypecheck.default)(options.library.type) ? options.library.type : 'script');
|
|
38
|
-
if (library && !((_compiler_options_output_enabledLibraryTypes = compiler.options.output.enabledLibraryTypes) == null ? void 0 : _compiler_options_output_enabledLibraryTypes.includes(library.type))) {
|
|
39
|
-
var _compiler_options_output_enabledLibraryTypes1;
|
|
40
|
-
(_compiler_options_output_enabledLibraryTypes1 = compiler.options.output.enabledLibraryTypes) == null ? void 0 : _compiler_options_output_enabledLibraryTypes1.push(library.type);
|
|
41
|
-
}
|
|
42
|
-
compiler.hooks.afterPlugins.tap('ModuleFederationPlugin', ()=>{
|
|
43
|
-
if (options.exposes && (Array.isArray(options.exposes) ? options.exposes.length > 0 : Object.keys(options.exposes).length > 0)) {
|
|
44
|
-
new _ContainerPlugin.default({
|
|
45
|
-
//@ts-ignore
|
|
46
|
-
name: options.name,
|
|
47
|
-
library,
|
|
48
|
-
filename: options.filename,
|
|
49
|
-
runtime: options.runtime,
|
|
50
|
-
shareScope: options.shareScope,
|
|
51
|
-
exposes: options.exposes
|
|
52
|
-
}).apply(compiler);
|
|
53
|
-
}
|
|
54
|
-
if (options.remotes && (Array.isArray(options.remotes) ? options.remotes.length > 0 : Object.keys(options.remotes).length > 0)) {
|
|
55
|
-
new _ContainerReferencePlugin.default({
|
|
56
|
-
//@ts-ignore
|
|
57
|
-
remoteType,
|
|
58
|
-
shareScope: options.shareScope,
|
|
59
|
-
remotes: options.remotes
|
|
60
|
-
}).apply(compiler);
|
|
61
|
-
}
|
|
62
|
-
if (options.shared) {
|
|
63
|
-
new _SharePlugin.default({
|
|
64
|
-
shared: options.shared,
|
|
65
|
-
shareScope: options.shareScope
|
|
66
|
-
}).apply(compiler);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* @param {ModuleFederationPluginOptions} options options
|
|
72
|
-
*/ constructor(options){
|
|
73
|
-
validate(options);
|
|
74
|
-
this._options = options;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
const _default = ModuleFederationPlugin;
|
|
78
|
-
|
|
79
|
-
//# sourceMappingURL=ModuleFederationPlugin.js.map
|
|
@@ -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';\n\nconst validate = createSchemaValidation(\n //eslint-disable-next-line\n require('webpack/schemas/plugins/container/ModuleFederationPlugin.check.js'),\n () =>\n require('webpack/schemas/plugins/container/ModuleFederationPlugin.json'),\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","require","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;;;;+BA2FA;;;eAAA;;;;6EAxFiC;sEAET;iFACW;0EACP;mFACS;AAErC,MAAMA,WAAWC,IAAAA,+BAAsB,EACrC,0BAA0B;AAC1BC,QAAQ,sEACR,IACEA,QAAQ,kEACV;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;QAClDT,SAASS;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"}
|