@module-federation/enhanced 0.0.0-canary-1701764602388

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/global.d.js +14 -0
  2. package/global.d.js.map +1 -0
  3. package/package.json +19 -0
  4. package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js +14 -0
  5. package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js.map +1 -0
  6. package/src/declarations/plugins/container/ContainerPlugin.d.js +12 -0
  7. package/src/declarations/plugins/container/ContainerPlugin.d.js.map +1 -0
  8. package/src/declarations/plugins/container/ContainerReferencePlugin.d.js +12 -0
  9. package/src/declarations/plugins/container/ContainerReferencePlugin.d.js.map +1 -0
  10. package/src/declarations/plugins/container/Dependency.d.js +14 -0
  11. package/src/declarations/plugins/container/Dependency.d.js.map +1 -0
  12. package/src/declarations/plugins/container/Module.d.js +3 -0
  13. package/src/declarations/plugins/container/Module.d.js.map +1 -0
  14. package/src/declarations/plugins/container/ModuleFactory.d.js +3 -0
  15. package/src/declarations/plugins/container/ModuleFactory.d.js.map +1 -0
  16. package/src/declarations/plugins/container/ModuleFederationPlugin.d.js +12 -0
  17. package/src/declarations/plugins/container/ModuleFederationPlugin.d.js.map +1 -0
  18. package/src/declarations/plugins/container/ObjectDeserializerContext.d.js +6 -0
  19. package/src/declarations/plugins/container/ObjectDeserializerContext.d.js.map +1 -0
  20. package/src/declarations/plugins/container/StaticExportsDependency.d.js +14 -0
  21. package/src/declarations/plugins/container/StaticExportsDependency.d.js.map +1 -0
  22. package/src/declarations/plugins/container/Template.d.js +4 -0
  23. package/src/declarations/plugins/container/Template.d.js.map +1 -0
  24. package/src/declarations/plugins/container/WebpackError.d.js +3 -0
  25. package/src/declarations/plugins/container/WebpackError.d.js.map +1 -0
  26. package/src/declarations/plugins/container/WebpackOptions.d.js +6 -0
  27. package/src/declarations/plugins/container/WebpackOptions.d.js.map +1 -0
  28. package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js +12 -0
  29. package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js.map +1 -0
  30. package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js +12 -0
  31. package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js.map +1 -0
  32. package/src/declarations/plugins/sharing/SharePlugin.d.js +12 -0
  33. package/src/declarations/plugins/sharing/SharePlugin.d.js.map +1 -0
  34. package/src/index.d.ts +7 -0
  35. package/src/index.js +43 -0
  36. package/src/index.js.map +1 -0
  37. package/src/lib/Constants.d.ts +117 -0
  38. package/src/lib/Constants.js +103 -0
  39. package/src/lib/Constants.js.map +1 -0
  40. package/src/lib/RuntimeGlobals.d.ts +0 -0
  41. package/src/lib/RuntimeGlobals.js +246 -0
  42. package/src/lib/RuntimeGlobals.js.map +1 -0
  43. package/src/lib/container/AsyncBoundaryPlugin.d.ts +21 -0
  44. package/src/lib/container/AsyncBoundaryPlugin.js +180 -0
  45. package/src/lib/container/AsyncBoundaryPlugin.js.map +1 -0
  46. package/src/lib/container/ContainerEntryDependency.d.js +4 -0
  47. package/src/lib/container/ContainerEntryDependency.d.js.map +1 -0
  48. package/src/lib/container/ContainerEntryDependency.d.ts +22 -0
  49. package/src/lib/container/ContainerEntryDependency.js +45 -0
  50. package/src/lib/container/ContainerEntryDependency.js.map +1 -0
  51. package/src/lib/container/ContainerEntryModule.d.js +14 -0
  52. package/src/lib/container/ContainerEntryModule.d.js.map +1 -0
  53. package/src/lib/container/ContainerEntryModule.d.ts +86 -0
  54. package/src/lib/container/ContainerEntryModule.js +260 -0
  55. package/src/lib/container/ContainerEntryModule.js.map +1 -0
  56. package/src/lib/container/ContainerEntryModuleFactory.d.js +4 -0
  57. package/src/lib/container/ContainerEntryModuleFactory.d.js.map +1 -0
  58. package/src/lib/container/ContainerEntryModuleFactory.d.ts +10 -0
  59. package/src/lib/container/ContainerEntryModuleFactory.js +32 -0
  60. package/src/lib/container/ContainerEntryModuleFactory.js.map +1 -0
  61. package/src/lib/container/ContainerExposedDependency.d.js +4 -0
  62. package/src/lib/container/ContainerExposedDependency.d.js.map +1 -0
  63. package/src/lib/container/ContainerExposedDependency.d.ts +26 -0
  64. package/src/lib/container/ContainerExposedDependency.js +53 -0
  65. package/src/lib/container/ContainerExposedDependency.js.map +1 -0
  66. package/src/lib/container/ContainerPlugin.d.js +4 -0
  67. package/src/lib/container/ContainerPlugin.d.js.map +1 -0
  68. package/src/lib/container/ContainerPlugin.d.ts +13 -0
  69. package/src/lib/container/ContainerPlugin.js +167 -0
  70. package/src/lib/container/ContainerPlugin.js.map +1 -0
  71. package/src/lib/container/ContainerReferencePlugin.d.js +4 -0
  72. package/src/lib/container/ContainerReferencePlugin.d.js.map +1 -0
  73. package/src/lib/container/ContainerReferencePlugin.d.ts +14 -0
  74. package/src/lib/container/ContainerReferencePlugin.js +102 -0
  75. package/src/lib/container/ContainerReferencePlugin.js.map +1 -0
  76. package/src/lib/container/FallbackDependency.d.js +14 -0
  77. package/src/lib/container/FallbackDependency.d.js.map +1 -0
  78. package/src/lib/container/FallbackDependency.d.ts +25 -0
  79. package/src/lib/container/FallbackDependency.js +55 -0
  80. package/src/lib/container/FallbackDependency.js.map +1 -0
  81. package/src/lib/container/FallbackItemDependency.d.js +4 -0
  82. package/src/lib/container/FallbackItemDependency.d.js.map +1 -0
  83. package/src/lib/container/FallbackItemDependency.d.ts +10 -0
  84. package/src/lib/container/FallbackItemDependency.js +33 -0
  85. package/src/lib/container/FallbackItemDependency.js.map +1 -0
  86. package/src/lib/container/FallbackModule.d.js +4 -0
  87. package/src/lib/container/FallbackModule.d.js.map +1 -0
  88. package/src/lib/container/FallbackModule.d.ts +73 -0
  89. package/src/lib/container/FallbackModule.js +149 -0
  90. package/src/lib/container/FallbackModule.js.map +1 -0
  91. package/src/lib/container/FallbackModuleFactory.d.js +4 -0
  92. package/src/lib/container/FallbackModuleFactory.d.js.map +1 -0
  93. package/src/lib/container/FallbackModuleFactory.d.ts +10 -0
  94. package/src/lib/container/FallbackModuleFactory.js +30 -0
  95. package/src/lib/container/FallbackModuleFactory.js.map +1 -0
  96. package/src/lib/container/HoistContainerReferencesPlugin.d.ts +19 -0
  97. package/src/lib/container/HoistContainerReferencesPlugin.js +78 -0
  98. package/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -0
  99. package/src/lib/container/ModuleFederationPlugin.d.js +4 -0
  100. package/src/lib/container/ModuleFederationPlugin.d.js.map +1 -0
  101. package/src/lib/container/ModuleFederationPlugin.d.ts +17 -0
  102. package/src/lib/container/ModuleFederationPlugin.js +93 -0
  103. package/src/lib/container/ModuleFederationPlugin.js.map +1 -0
  104. package/src/lib/container/ModuleFederationPluginTypes.d.js +12 -0
  105. package/src/lib/container/ModuleFederationPluginTypes.d.js.map +1 -0
  106. package/src/lib/container/RemoteModule.d.js +13 -0
  107. package/src/lib/container/RemoteModule.d.js.map +1 -0
  108. package/src/lib/container/RemoteModule.d.ts +78 -0
  109. package/src/lib/container/RemoteModule.js +150 -0
  110. package/src/lib/container/RemoteModule.js.map +1 -0
  111. package/src/lib/container/RemoteRuntimeModule.d.js +13 -0
  112. package/src/lib/container/RemoteRuntimeModule.d.js.map +1 -0
  113. package/src/lib/container/RemoteRuntimeModule.d.ts +9 -0
  114. package/src/lib/container/RemoteRuntimeModule.js +98 -0
  115. package/src/lib/container/RemoteRuntimeModule.js.map +1 -0
  116. package/src/lib/container/RemoteToExternalDependency.d.js +15 -0
  117. package/src/lib/container/RemoteToExternalDependency.d.js.map +1 -0
  118. package/src/lib/container/RemoteToExternalDependency.d.ts +10 -0
  119. package/src/lib/container/RemoteToExternalDependency.js +33 -0
  120. package/src/lib/container/RemoteToExternalDependency.js.map +1 -0
  121. package/src/lib/container/constant.d.ts +3 -0
  122. package/src/lib/container/constant.js +26 -0
  123. package/src/lib/container/constant.js.map +1 -0
  124. package/src/lib/container/options.d.js +6 -0
  125. package/src/lib/container/options.d.js.map +1 -0
  126. package/src/lib/container/options.d.ts +18 -0
  127. package/src/lib/container/options.js +91 -0
  128. package/src/lib/container/options.js.map +1 -0
  129. package/src/lib/container/runtime/FederationRuntimeEntryDependency.d.ts +7 -0
  130. package/src/lib/container/runtime/FederationRuntimeEntryDependency.js +37 -0
  131. package/src/lib/container/runtime/FederationRuntimeEntryDependency.js.map +1 -0
  132. package/src/lib/container/runtime/FederationRuntimeModule.d.ts +13 -0
  133. package/src/lib/container/runtime/FederationRuntimeModule.js +31 -0
  134. package/src/lib/container/runtime/FederationRuntimeModule.js.map +1 -0
  135. package/src/lib/container/runtime/FederationRuntimePlugin.d.ts +17 -0
  136. package/src/lib/container/runtime/FederationRuntimePlugin.js +223 -0
  137. package/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -0
  138. package/src/lib/container/runtime/InitializeRemoteEntryRuntimePlugin.d.ts +6 -0
  139. package/src/lib/container/runtime/InitializeRemoteEntryRuntimePlugin.js +26 -0
  140. package/src/lib/container/runtime/InitializeRemoteEntryRuntimePlugin.js.map +1 -0
  141. package/src/lib/container/runtime/getFederationGlobal.d.ts +5 -0
  142. package/src/lib/container/runtime/getFederationGlobal.js +42 -0
  143. package/src/lib/container/runtime/getFederationGlobal.js.map +1 -0
  144. package/src/lib/container/runtime/utils.d.ts +15 -0
  145. package/src/lib/container/runtime/utils.js +95 -0
  146. package/src/lib/container/runtime/utils.js.map +1 -0
  147. package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js +4 -0
  148. package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js.map +1 -0
  149. package/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +10 -0
  150. package/src/lib/sharing/ConsumeSharedFallbackDependency.js +33 -0
  151. package/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -0
  152. package/src/lib/sharing/ConsumeSharedModule.d.js +4 -0
  153. package/src/lib/sharing/ConsumeSharedModule.d.js.map +1 -0
  154. package/src/lib/sharing/ConsumeSharedModule.d.ts +106 -0
  155. package/src/lib/sharing/ConsumeSharedModule.js +195 -0
  156. package/src/lib/sharing/ConsumeSharedModule.js.map +1 -0
  157. package/src/lib/sharing/ConsumeSharedPlugin.d.js +4 -0
  158. package/src/lib/sharing/ConsumeSharedPlugin.d.js.map +1 -0
  159. package/src/lib/sharing/ConsumeSharedPlugin.d.ts +8 -0
  160. package/src/lib/sharing/ConsumeSharedPlugin.js +225 -0
  161. package/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -0
  162. package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js +4 -0
  163. package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js.map +1 -0
  164. package/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +13 -0
  165. package/src/lib/sharing/ConsumeSharedRuntimeModule.js +310 -0
  166. package/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -0
  167. package/src/lib/sharing/ProvideForSharedDependency.d.js +4 -0
  168. package/src/lib/sharing/ProvideForSharedDependency.d.js.map +1 -0
  169. package/src/lib/sharing/ProvideForSharedDependency.d.ts +11 -0
  170. package/src/lib/sharing/ProvideForSharedDependency.js +34 -0
  171. package/src/lib/sharing/ProvideForSharedDependency.js.map +1 -0
  172. package/src/lib/sharing/ProvideSharedDependency.d.js +14 -0
  173. package/src/lib/sharing/ProvideSharedDependency.d.js.map +1 -0
  174. package/src/lib/sharing/ProvideSharedDependency.d.ts +32 -0
  175. package/src/lib/sharing/ProvideSharedDependency.js +65 -0
  176. package/src/lib/sharing/ProvideSharedDependency.js.map +1 -0
  177. package/src/lib/sharing/ProvideSharedModule.d.js +4 -0
  178. package/src/lib/sharing/ProvideSharedModule.d.js.map +1 -0
  179. package/src/lib/sharing/ProvideSharedModule.d.ts +79 -0
  180. package/src/lib/sharing/ProvideSharedModule.js +169 -0
  181. package/src/lib/sharing/ProvideSharedModule.js.map +1 -0
  182. package/src/lib/sharing/ProvideSharedModuleFactory.d.js +4 -0
  183. package/src/lib/sharing/ProvideSharedModuleFactory.d.js.map +1 -0
  184. package/src/lib/sharing/ProvideSharedModuleFactory.d.ts +11 -0
  185. package/src/lib/sharing/ProvideSharedModuleFactory.js +32 -0
  186. package/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -0
  187. package/src/lib/sharing/ProvideSharedPlugin.d.js +4 -0
  188. package/src/lib/sharing/ProvideSharedPlugin.d.js.map +1 -0
  189. package/src/lib/sharing/ProvideSharedPlugin.d.ts +34 -0
  190. package/src/lib/sharing/ProvideSharedPlugin.js +168 -0
  191. package/src/lib/sharing/ProvideSharedPlugin.js.map +1 -0
  192. package/src/lib/sharing/SharePlugin.d.js +4 -0
  193. package/src/lib/sharing/SharePlugin.d.js.map +1 -0
  194. package/src/lib/sharing/SharePlugin.d.ts +15 -0
  195. package/src/lib/sharing/SharePlugin.js +73 -0
  196. package/src/lib/sharing/SharePlugin.js.map +1 -0
  197. package/src/lib/sharing/ShareRuntimeModule.d.js +4 -0
  198. package/src/lib/sharing/ShareRuntimeModule.d.js.map +1 -0
  199. package/src/lib/sharing/ShareRuntimeModule.d.ts +9 -0
  200. package/src/lib/sharing/ShareRuntimeModule.js +95 -0
  201. package/src/lib/sharing/ShareRuntimeModule.js.map +1 -0
  202. package/src/lib/sharing/resolveMatchedConfigs.d.js +6 -0
  203. package/src/lib/sharing/resolveMatchedConfigs.d.js.map +1 -0
  204. package/src/lib/sharing/resolveMatchedConfigs.d.ts +8 -0
  205. package/src/lib/sharing/resolveMatchedConfigs.js +69 -0
  206. package/src/lib/sharing/resolveMatchedConfigs.js.map +1 -0
  207. package/src/lib/sharing/utils.d.js +6 -0
  208. package/src/lib/sharing/utils.d.js.map +1 -0
  209. package/src/lib/sharing/utils.d.ts +45 -0
  210. package/src/lib/sharing/utils.js +348 -0
  211. package/src/lib/sharing/utils.js.map +1 -0
  212. package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +5 -0
  213. package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +34 -0
  214. package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -0
  215. package/src/runtime/ModuleInfoRuntimeModule.d.ts +16 -0
  216. package/src/runtime/ModuleInfoRuntimeModule.js +88 -0
  217. package/src/runtime/ModuleInfoRuntimeModule.js.map +1 -0
  218. package/src/runtime/ModuleInfoRuntimePlugin.d.ts +5 -0
  219. package/src/runtime/ModuleInfoRuntimePlugin.js +29 -0
  220. package/src/runtime/ModuleInfoRuntimePlugin.js.map +1 -0
  221. package/src/schemas/container/ContainerPlugin.check.d.ts +7 -0
  222. package/src/schemas/container/ContainerPlugin.check.js +2229 -0
  223. package/src/schemas/container/ContainerPlugin.check.js.map +1 -0
  224. package/src/schemas/container/ContainerPlugin.d.ts +268 -0
  225. package/src/schemas/container/ContainerPlugin.js +324 -0
  226. package/src/schemas/container/ContainerPlugin.js.map +1 -0
  227. package/src/schemas/container/ModuleFederationPlugin.check.d.ts +7 -0
  228. package/src/schemas/container/ModuleFederationPlugin.check.js +3818 -0
  229. package/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
  230. package/src/schemas/container/ModuleFederationPlugin.d.ts +441 -0
  231. package/src/schemas/container/ModuleFederationPlugin.js +556 -0
  232. package/src/schemas/container/ModuleFederationPlugin.js.map +1 -0
  233. package/src/types/runtime.d.ts +7 -0
  234. package/src/types/runtime.js +6 -0
  235. package/src/types/runtime.js.map +1 -0
@@ -0,0 +1 @@
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 * @param {string[]} runtimePlugins Runtime plugin file paths or package name.\n */\n constructor(\n name: string,\n exposes: [string, ExposeOptions][],\n shareScope: string,\n runtimePlugins: string[],\n );\n name: string;\n exposes: [string, import('./ContainerEntryModule').ExposeOptions][];\n shareScope: string;\n runtimePlugins: string[];\n}\ndeclare namespace ContainerEntryDependency {\n export { ExposeOptions };\n}\ntype ExposeOptions = import('./ContainerEntryModule').ExposeOptions;\n"],"names":["ContainerEntryDependency"],"mappings":";iBAASA"}
@@ -0,0 +1,22 @@
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
+ runtimePlugins: string[];
8
+ /**
9
+ * @param {string} name entry name
10
+ * @param {[string, ExposeOptions][]} exposes list of exposed modules
11
+ * @param {string} shareScope name of the share scope
12
+ * @param {string[]} runtimePlugins Runtime plugin file paths or package name.
13
+ */
14
+ constructor(name: string, exposes: [string, ExposeOptions][], shareScope: string, runtimePlugins: string[]);
15
+ /**
16
+ * @returns {string | null} an identifier to merge equal requests
17
+ */
18
+ getResourceIdentifier(): string | null;
19
+ get type(): string;
20
+ get category(): string;
21
+ }
22
+ export default ContainerEntryDependency;
@@ -0,0 +1,45 @@
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 _interop_require_default = require("@swc/helpers/_/_interop_require_default");
15
+ const _makeSerializable = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/util/makeSerializable"));
16
+ const _Dependency = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/Dependency"));
17
+ let ContainerEntryDependency = class ContainerEntryDependency extends _Dependency.default {
18
+ /**
19
+ * @returns {string | null} an identifier to merge equal requests
20
+ */ getResourceIdentifier() {
21
+ return `container-entry-${this.name}`;
22
+ }
23
+ get type() {
24
+ return 'container entry';
25
+ }
26
+ get category() {
27
+ return 'esm';
28
+ }
29
+ /**
30
+ * @param {string} name entry name
31
+ * @param {[string, ExposeOptions][]} exposes list of exposed modules
32
+ * @param {string} shareScope name of the share scope
33
+ * @param {string[]} runtimePlugins Runtime plugin file paths or package name.
34
+ */ constructor(name, exposes, shareScope, runtimePlugins){
35
+ super();
36
+ this.name = name;
37
+ this.exposes = exposes;
38
+ this.shareScope = shareScope;
39
+ this.runtimePlugins = runtimePlugins;
40
+ }
41
+ };
42
+ (0, _makeSerializable.default)(ContainerEntryDependency, 'enhanced/lib/container/ContainerEntryDependency');
43
+ const _default = ContainerEntryDependency;
44
+
45
+ //# sourceMappingURL=ContainerEntryDependency.js.map
@@ -0,0 +1 @@
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 public runtimePlugins: 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 * @param {string[]} runtimePlugins Runtime plugin file paths or package name.\n */\n constructor(\n name: string,\n exposes: [string, ExposeOptions][],\n shareScope: string,\n runtimePlugins: string[],\n ) {\n super();\n this.name = name;\n this.exposes = exposes;\n this.shareScope = shareScope;\n this.runtimePlugins = runtimePlugins;\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","runtimePlugins","makeSerializable"],"mappings":"AAAA;;;AAGA;;;;+BAoDA;;;eAAA;;;;2EAjD6B;qEACN;AAEvB,IAAA,AAAMA,2BAAN,MAAMA,iCAAiCC,mBAAU;IAyB/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;IAhCA;;;;;GAKC,GACDC,YACEH,IAAY,EACZI,OAAkC,EAClCC,UAAkB,EAClBC,cAAwB,CACxB;QACA,KAAK;QACL,IAAI,CAACN,IAAI,GAAGA;QACZ,IAAI,CAACI,OAAO,GAAGA;QACf,IAAI,CAACC,UAAU,GAAGA;QAClB,IAAI,CAACC,cAAc,GAAGA;IACxB;AAgBF;AAEAC,IAAAA,yBAAgB,EACdV,0BACA;MAGF,WAAeA"}
@@ -0,0 +1,14 @@
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
@@ -0,0 +1 @@
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 * @param {string[]} runtimePlugins Runtime plugin file paths or package name.\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 runtimePlugins: 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":";;;;+BA0EA;;;eAAA;;;AA1EA,MAAOA,iBAAiB;MA0ExB,WAAeC"}
@@ -0,0 +1,86 @@
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
+ private _runtimePlugins;
20
+ /**
21
+ * @param {string} name container entry name
22
+ * @param {[string, ExposeOptions][]} exposes list of exposed modules
23
+ * @param {string} shareScope name of the share scope
24
+ */
25
+ constructor(name: string, exposes: [string, ExposeOptions][], shareScope: string, runtimePlugins: string[]);
26
+ /**
27
+ * @param {ObjectDeserializerContext} context context
28
+ * @returns {ContainerEntryModule} deserialized container entry module
29
+ */
30
+ static deserialize(context: ObjectDeserializerContext): ContainerEntryModule;
31
+ /**
32
+ * @returns {Set<string>} types available (do not mutate)
33
+ */
34
+ getSourceTypes(): Set<string>;
35
+ /**
36
+ * @returns {string} a unique identifier of the module
37
+ */
38
+ identifier(): string;
39
+ /**
40
+ * @param {RequestShortener} requestShortener the request shortener
41
+ * @returns {string} a user readable identifier of the module
42
+ */
43
+ readableIdentifier(requestShortener: RequestShortener): string;
44
+ /**
45
+ * @param {LibIdentOptions} options options
46
+ * @returns {string | null} an identifier for library inclusion
47
+ */
48
+ libIdent(options: LibIdentOptions): string | null;
49
+ /**
50
+ * @param {NeedBuildContext} context context info
51
+ * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
52
+ * @returns {void}
53
+ */
54
+ needBuild(context: NeedBuildContext, callback: (arg0: (WebpackError | null) | undefined, arg1: boolean | undefined) => void): void;
55
+ /**
56
+ * @param {WebpackOptions} options webpack options
57
+ * @param {Compilation} compilation the compilation
58
+ * @param {ResolverWithOptions} resolver the resolver
59
+ * @param {InputFileSystem} fs the file system
60
+ * @param {function(WebpackError): void} callback callback function
61
+ * @returns {void}
62
+ */
63
+ build(options: WebpackOptions, compilation: Compilation, resolver: ResolverWithOptions, fs: InputFileSystem, callback: (err?: WebpackError) => void): void;
64
+ /**
65
+ * @param {CodeGenerationContext} context context for code generation
66
+ * @returns {CodeGenerationResult} result
67
+ */
68
+ codeGeneration({ moduleGraph, chunkGraph, runtimeTemplate }: {
69
+ moduleGraph: any;
70
+ chunkGraph: any;
71
+ runtimeTemplate: any;
72
+ }): {
73
+ sources: Map<any, any>;
74
+ runtimeRequirements: Set<"__webpack_exports__" | "__webpack_require__.d" | "__webpack_require__.o">;
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
+ */
80
+ size(type?: string): number;
81
+ /**
82
+ * @param {ObjectSerializerContext} context context
83
+ */
84
+ serialize(context: ObjectSerializerContext): void;
85
+ }
86
+ export default ContainerEntryModule;
@@ -0,0 +1,260 @@
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 _interop_require_default = require("@swc/helpers/_/_interop_require_default");
15
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
16
+ const _AsyncDependenciesBlock = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/AsyncDependenciesBlock"));
17
+ const _Template = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/Template"));
18
+ const _Module = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/Module"));
19
+ const _RuntimeGlobals = /*#__PURE__*/ _interop_require_wildcard._(require("webpack/lib/RuntimeGlobals"));
20
+ const _webpacksources = require("webpack-sources");
21
+ const _ModuleTypeConstants = require("webpack/lib/ModuleTypeConstants");
22
+ const _ContainerExposedDependency = /*#__PURE__*/ _interop_require_default._(require("./ContainerExposedDependency"));
23
+ const _StaticExportsDependency = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/dependencies/StaticExportsDependency"));
24
+ const _makeSerializable = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/util/makeSerializable"));
25
+ const _FederationRuntimePlugin = /*#__PURE__*/ _interop_require_default._(require("./runtime/FederationRuntimePlugin"));
26
+ const _utils = require("./runtime/utils");
27
+ const _EntryDependency = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/dependencies/EntryDependency"));
28
+ const SOURCE_TYPES = new Set([
29
+ 'javascript'
30
+ ]);
31
+ let ContainerEntryModule = class ContainerEntryModule extends _Module.default {
32
+ /**
33
+ * @param {ObjectDeserializerContext} context context
34
+ * @returns {ContainerEntryModule} deserialized container entry module
35
+ */ static deserialize(context) {
36
+ const { read } = context;
37
+ const obj = new ContainerEntryModule(read(), read(), read(), read());
38
+ //@ts-ignore
39
+ obj.deserialize(context);
40
+ return obj;
41
+ }
42
+ /**
43
+ * @returns {Set<string>} types available (do not mutate)
44
+ */ getSourceTypes() {
45
+ return SOURCE_TYPES;
46
+ }
47
+ /**
48
+ * @returns {string} a unique identifier of the module
49
+ */ identifier() {
50
+ return `container entry (${this._shareScope}) ${JSON.stringify(this._exposes)}`;
51
+ }
52
+ /**
53
+ * @param {RequestShortener} requestShortener the request shortener
54
+ * @returns {string} a user readable identifier of the module
55
+ */ readableIdentifier(requestShortener) {
56
+ return 'container entry';
57
+ }
58
+ /**
59
+ * @param {LibIdentOptions} options options
60
+ * @returns {string | null} an identifier for library inclusion
61
+ */ libIdent(options) {
62
+ return `${this.layer ? `(${this.layer})/` : ''}webpack/container/entry/${this._name}`;
63
+ }
64
+ /**
65
+ * @param {NeedBuildContext} context context info
66
+ * @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
67
+ * @returns {void}
68
+ */ needBuild(context, callback) {
69
+ const baseContext = context;
70
+ callback(null, !this.buildMeta);
71
+ }
72
+ /**
73
+ * @param {WebpackOptions} options webpack options
74
+ * @param {Compilation} compilation the compilation
75
+ * @param {ResolverWithOptions} resolver the resolver
76
+ * @param {InputFileSystem} fs the file system
77
+ * @param {function(WebpackError): void} callback callback function
78
+ * @returns {void}
79
+ */ build(options, compilation, resolver, fs, callback) {
80
+ this.buildMeta = {};
81
+ this.buildInfo = {
82
+ strict: true,
83
+ topLevelDeclarations: new Set([
84
+ 'moduleMap',
85
+ 'get',
86
+ 'init'
87
+ ])
88
+ };
89
+ this.buildMeta.exportsType = 'namespace';
90
+ //@ts-ignore
91
+ this.clearDependenciesAndBlocks();
92
+ for (const [name, options] of this._exposes){
93
+ const block = new _AsyncDependenciesBlock.default({
94
+ name: options.name
95
+ }, {
96
+ name
97
+ }, options.import[options.import.length - 1]);
98
+ let idx = 0;
99
+ for (const request of options.import){
100
+ const dep = new _ContainerExposedDependency.default(name, request);
101
+ dep.loc = {
102
+ name,
103
+ index: idx++
104
+ };
105
+ //@ts-ignore
106
+ block.addDependency(dep);
107
+ }
108
+ //@ts-ignore
109
+ this.addBlock(block);
110
+ }
111
+ //@ts-ignore
112
+ this.addDependency(//@ts-ignore
113
+ new _StaticExportsDependency.default([
114
+ 'get',
115
+ 'init'
116
+ ], false));
117
+ this.addDependency(new _EntryDependency.default(_FederationRuntimePlugin.default.getFilePath(this._name, this._runtimePlugins)));
118
+ callback();
119
+ }
120
+ /**
121
+ * @param {CodeGenerationContext} context context for code generation
122
+ * @returns {CodeGenerationResult} result
123
+ */ //@ts-ignore
124
+ codeGeneration({ moduleGraph, chunkGraph, runtimeTemplate }) {
125
+ const sources = new Map();
126
+ const runtimeRequirements = new Set([
127
+ _RuntimeGlobals.definePropertyGetters,
128
+ _RuntimeGlobals.hasOwnProperty,
129
+ _RuntimeGlobals.exports
130
+ ]);
131
+ const getters = [];
132
+ //@ts-ignore
133
+ for (const block of this.blocks){
134
+ const { dependencies } = block;
135
+ const modules = dependencies.map((dependency)=>{
136
+ const dep = dependency;
137
+ return {
138
+ name: dep.exposedName,
139
+ module: moduleGraph.getModule(dep),
140
+ request: dep.userRequest
141
+ };
142
+ });
143
+ let str;
144
+ //@ts-ignore
145
+ if (modules.some((m)=>!m.module)) {
146
+ str = runtimeTemplate.throwMissingModuleErrorBlock({
147
+ //@ts-ignore
148
+ request: modules.map((m)=>m.request).join(', ')
149
+ });
150
+ } else {
151
+ str = `return ${runtimeTemplate.blockPromise({
152
+ block,
153
+ message: '',
154
+ chunkGraph,
155
+ runtimeRequirements
156
+ })}.then(${runtimeTemplate.returningFunction(runtimeTemplate.returningFunction(`(${modules//@ts-ignore
157
+ .map(({ module, request })=>runtimeTemplate.moduleRaw({
158
+ module,
159
+ chunkGraph,
160
+ request,
161
+ weak: false,
162
+ runtimeRequirements
163
+ })).join(', ')})`))});`;
164
+ }
165
+ getters.push(`${JSON.stringify(modules[0].name)}: ${runtimeTemplate.basicFunction('', str)}`);
166
+ }
167
+ const initRuntimeDep = this.dependencies[1];
168
+ const initRuntimeModuleGetter = runtimeTemplate.moduleRaw({
169
+ module: moduleGraph.getModule(initRuntimeDep),
170
+ chunkGraph,
171
+ // @ts-expect-error
172
+ request: initRuntimeDep.userRequest,
173
+ weak: false,
174
+ runtimeRequirements
175
+ });
176
+ const federationGlobal = (0, _utils.getFederationGlobalScope)(_RuntimeGlobals || {});
177
+ const source = _Template.default.asString([
178
+ `var moduleMap = {`,
179
+ _Template.default.indent(getters.join(',\n')),
180
+ '};',
181
+ `var get = ${runtimeTemplate.basicFunction('module, getScope', [
182
+ `${_RuntimeGlobals.currentRemoteGetScope} = getScope;`,
183
+ // reusing the getScope variable to avoid creating a new var (and module is also used later)
184
+ 'getScope = (',
185
+ _Template.default.indent([
186
+ `${_RuntimeGlobals.hasOwnProperty}(moduleMap, module)`,
187
+ _Template.default.indent([
188
+ '? moduleMap[module]()',
189
+ `: Promise.resolve().then(${runtimeTemplate.basicFunction('', "throw new Error('Module \"' + module + '\" does not exist in container.');")})`
190
+ ])
191
+ ]),
192
+ ');',
193
+ `${_RuntimeGlobals.currentRemoteGetScope} = undefined;`,
194
+ 'return getScope;'
195
+ ])};`,
196
+ `var init = ${runtimeTemplate.basicFunction('shareScope, initScope', [
197
+ `if (!${_RuntimeGlobals.shareScopeMap}) return;`,
198
+ `if (!${federationGlobal}) return;`,
199
+ `var name = ${JSON.stringify(this._shareScope)}`,
200
+ `${federationGlobal}.instance.initOptions({name:${federationGlobal}.initOptions.name, })`,
201
+ `${federationGlobal}.instance.initShareScopeMap(name,shareScope)`,
202
+ `if (${_RuntimeGlobals.global}.__FEDERATION__.__SHARE__.default){`,
203
+ _Template.default.indent([
204
+ `${federationGlobal}.instance.initShareScopeMap(name,${_RuntimeGlobals.global}.__FEDERATION__.__SHARE__.default)`
205
+ ]),
206
+ '}',
207
+ `${federationGlobal}.proxyShareScopeMap(${_RuntimeGlobals.require});`,
208
+ `return ${_RuntimeGlobals.initializeSharing}(name, initScope);`
209
+ ])};`,
210
+ `${initRuntimeModuleGetter}`,
211
+ '',
212
+ '// This exports getters to disallow modifications',
213
+ `${_RuntimeGlobals.definePropertyGetters}(exports, {`,
214
+ _Template.default.indent([
215
+ `get: ${runtimeTemplate.returningFunction('get')},`,
216
+ `init: ${runtimeTemplate.returningFunction('init')}`
217
+ ]),
218
+ '});'
219
+ ]);
220
+ sources.set('javascript', this.useSourceMap || this.useSimpleSourceMap ? new _webpacksources.OriginalSource(source, 'webpack/container-entry') : new _webpacksources.RawSource(source));
221
+ return {
222
+ sources,
223
+ runtimeRequirements
224
+ };
225
+ }
226
+ /**
227
+ * @param {string=} type the source type for which the size should be estimated
228
+ * @returns {number} the estimated size of the module (must be non-zero)
229
+ */ size(type) {
230
+ return 42;
231
+ }
232
+ /**
233
+ * @param {ObjectSerializerContext} context context
234
+ */ //@ts-ignore
235
+ serialize(context) {
236
+ const { write } = context;
237
+ write(this._name);
238
+ write(this._exposes);
239
+ write(this._shareScope);
240
+ write(this._runtimePlugins);
241
+ //@ts-ignore
242
+ super.serialize(context);
243
+ }
244
+ /**
245
+ * @param {string} name container entry name
246
+ * @param {[string, ExposeOptions][]} exposes list of exposed modules
247
+ * @param {string} shareScope name of the share scope
248
+ */ constructor(name, exposes, shareScope, runtimePlugins){
249
+ super(_ModuleTypeConstants.JAVASCRIPT_MODULE_TYPE_DYNAMIC, null);
250
+ this._name = name;
251
+ this._exposes = exposes;
252
+ this._shareScope = shareScope;
253
+ this._runtimePlugins = runtimePlugins;
254
+ }
255
+ };
256
+ //@ts-ignore
257
+ (0, _makeSerializable.default)(ContainerEntryModule, 'enhanced/lib/container/ContainerEntryModule');
258
+ const _default = ContainerEntryModule;
259
+
260
+ //# sourceMappingURL=ContainerEntryModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerEntryModule.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 AsyncDependenciesBlock from 'webpack/lib/AsyncDependenciesBlock';\nimport Dependency from 'webpack/lib/Dependency';\nimport Template from 'webpack/lib/Template';\nimport Module from 'webpack/lib/Module';\nimport * as RuntimeGlobals from 'webpack/lib/RuntimeGlobals';\nimport { OriginalSource, RawSource } from 'webpack-sources';\nimport { JAVASCRIPT_MODULE_TYPE_DYNAMIC } from 'webpack/lib/ModuleTypeConstants';\nimport ContainerExposedDependency from './ContainerExposedDependency';\nimport StaticExportsDependency from 'webpack/lib/dependencies/StaticExportsDependency';\nimport type Compilation from 'webpack/lib/Compilation';\nimport type {\n LibIdentOptions,\n NeedBuildContext,\n RequestShortener,\n ObjectDeserializerContext,\n ObjectSerializerContext,\n WebpackOptions,\n InputFileSystem,\n ResolverWithOptions,\n} from 'webpack/lib/Module';\nimport type WebpackError from 'webpack/lib/WebpackError';\nimport makeSerializable from 'webpack/lib/util/makeSerializable';\nimport FederationRuntimePlugin from './runtime/FederationRuntimePlugin';\nimport { getFederationGlobalScope } from './runtime/utils';\nimport EntryDependency from 'webpack/lib/dependencies/EntryDependency';\n\nconst SOURCE_TYPES = new Set(['javascript']);\n\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};\n\nclass ContainerEntryModule extends Module {\n private _name: string;\n private _exposes: [string, ExposeOptions][];\n private _shareScope: string;\n private _runtimePlugins: string[];\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 runtimePlugins: string[],\n ) {\n super(JAVASCRIPT_MODULE_TYPE_DYNAMIC, null);\n this._name = name;\n this._exposes = exposes;\n this._shareScope = shareScope;\n this._runtimePlugins = runtimePlugins;\n }\n /**\n * @param {ObjectDeserializerContext} context context\n * @returns {ContainerEntryModule} deserialized container entry module\n */\n static deserialize(context: ObjectDeserializerContext): ContainerEntryModule {\n const { read } = context;\n const obj = new ContainerEntryModule(read(), read(), read(), read());\n //@ts-ignore\n obj.deserialize(context);\n return obj;\n }\n\n /**\n * @returns {Set<string>} types available (do not mutate)\n */\n override getSourceTypes(): Set<string> {\n return SOURCE_TYPES;\n }\n /**\n * @returns {string} a unique identifier of the module\n */\n override identifier(): string {\n return `container entry (${this._shareScope}) ${JSON.stringify(\n this._exposes,\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 'container entry';\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/entry/${\n this._name\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: (\n arg0: (WebpackError | null) | undefined,\n arg1: boolean | undefined,\n ) => void,\n ): void {\n const baseContext = context as NeedBuildContext;\n callback(null, !this.buildMeta);\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: (err?: WebpackError) => void,\n ): void {\n this.buildMeta = {};\n this.buildInfo = {\n strict: true,\n topLevelDeclarations: new Set(['moduleMap', 'get', 'init']),\n };\n this.buildMeta.exportsType = 'namespace';\n //@ts-ignore\n this.clearDependenciesAndBlocks();\n\n for (const [name, options] of this._exposes) {\n const block = new AsyncDependenciesBlock(\n {\n name: options.name,\n },\n { name },\n options.import[options.import.length - 1],\n );\n let idx = 0;\n for (const request of options.import) {\n const dep = new ContainerExposedDependency(name, request);\n dep.loc = {\n name,\n index: idx++,\n };\n //@ts-ignore\n block.addDependency(dep);\n }\n //@ts-ignore\n this.addBlock(block);\n }\n //@ts-ignore\n this.addDependency(\n //@ts-ignore\n new StaticExportsDependency(\n ['get', 'init'],\n false,\n ) as unknown as Dependency,\n );\n\n this.addDependency(\n new EntryDependency(\n FederationRuntimePlugin.getFilePath(this._name, this._runtimePlugins),\n ),\n );\n\n callback();\n }\n\n /**\n * @param {CodeGenerationContext} context context for code generation\n * @returns {CodeGenerationResult} result\n */\n //@ts-ignore\n override codeGeneration({ moduleGraph, chunkGraph, runtimeTemplate }) {\n const sources = new Map();\n const runtimeRequirements = new Set([\n RuntimeGlobals.definePropertyGetters,\n RuntimeGlobals.hasOwnProperty,\n RuntimeGlobals.exports,\n ]);\n const getters = [];\n //@ts-ignore\n for (const block of this.blocks) {\n const { dependencies } = block;\n\n const modules = dependencies.map((dependency: Dependency) => {\n const dep = dependency as unknown as ContainerExposedDependency;\n return {\n name: dep.exposedName,\n module: moduleGraph.getModule(dep),\n request: dep.userRequest,\n };\n });\n\n let str;\n //@ts-ignore\n if (modules.some((m) => !m.module)) {\n str = runtimeTemplate.throwMissingModuleErrorBlock({\n //@ts-ignore\n request: modules.map((m) => m.request).join(', '),\n });\n } else {\n str = `return ${runtimeTemplate.blockPromise({\n block,\n message: '',\n chunkGraph,\n runtimeRequirements,\n })}.then(${runtimeTemplate.returningFunction(\n runtimeTemplate.returningFunction(\n `(${modules\n //@ts-ignore\n .map(({ module, request }) =>\n runtimeTemplate.moduleRaw({\n module,\n chunkGraph,\n request,\n weak: false,\n runtimeRequirements,\n }),\n )\n .join(', ')})`,\n ),\n )});`;\n }\n\n getters.push(\n `${JSON.stringify(modules[0].name)}: ${runtimeTemplate.basicFunction(\n '',\n str,\n )}`,\n );\n }\n\n const initRuntimeDep = this.dependencies[1];\n const initRuntimeModuleGetter = runtimeTemplate.moduleRaw({\n module: moduleGraph.getModule(initRuntimeDep),\n chunkGraph,\n // @ts-expect-error\n request: initRuntimeDep.userRequest,\n weak: false,\n runtimeRequirements,\n });\n const federationGlobal = getFederationGlobalScope(RuntimeGlobals || {});\n\n const source = Template.asString([\n `var moduleMap = {`,\n Template.indent(getters.join(',\\n')),\n '};',\n `var get = ${runtimeTemplate.basicFunction('module, getScope', [\n `${RuntimeGlobals.currentRemoteGetScope} = getScope;`,\n // reusing the getScope variable to avoid creating a new var (and module is also used later)\n 'getScope = (',\n Template.indent([\n `${RuntimeGlobals.hasOwnProperty}(moduleMap, module)`,\n Template.indent([\n '? moduleMap[module]()',\n `: Promise.resolve().then(${runtimeTemplate.basicFunction(\n '',\n \"throw new Error('Module \\\"' + module + '\\\" does not exist in container.');\",\n )})`,\n ]),\n ]),\n ');',\n `${RuntimeGlobals.currentRemoteGetScope} = undefined;`,\n 'return getScope;',\n ])};`,\n `var init = ${runtimeTemplate.basicFunction('shareScope, initScope', [\n `if (!${RuntimeGlobals.shareScopeMap}) return;`,\n `if (!${federationGlobal}) return;`,\n `var name = ${JSON.stringify(this._shareScope)}`,\n `${federationGlobal}.instance.initOptions({name:${federationGlobal}.initOptions.name, })`,\n `${federationGlobal}.instance.initShareScopeMap(name,shareScope)`,\n `if (${RuntimeGlobals.global}.__FEDERATION__.__SHARE__.default){`,\n Template.indent([\n `${federationGlobal}.instance.initShareScopeMap(name,${RuntimeGlobals.global}.__FEDERATION__.__SHARE__.default)`,\n ]),\n '}',\n `${federationGlobal}.proxyShareScopeMap(${RuntimeGlobals.require});`,\n `return ${RuntimeGlobals.initializeSharing}(name, initScope);`,\n ])};`,\n `${initRuntimeModuleGetter}`,\n '',\n '// This exports getters to disallow modifications',\n `${RuntimeGlobals.definePropertyGetters}(exports, {`,\n Template.indent([\n `get: ${runtimeTemplate.returningFunction('get')},`,\n `init: ${runtimeTemplate.returningFunction('init')}`,\n ]),\n '});',\n ]);\n\n sources.set(\n 'javascript',\n this.useSourceMap || this.useSimpleSourceMap\n ? new OriginalSource(source, 'webpack/container-entry')\n : new RawSource(source),\n );\n\n return {\n sources,\n runtimeRequirements,\n };\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 42;\n }\n /**\n * @param {ObjectSerializerContext} context context\n */\n //@ts-ignore\n override serialize(context: ObjectSerializerContext): void {\n const { write } = context;\n write(this._name);\n write(this._exposes);\n write(this._shareScope);\n write(this._runtimePlugins);\n //@ts-ignore\n super.serialize(context);\n }\n}\n//@ts-ignore\nmakeSerializable(\n ContainerEntryModule,\n 'enhanced/lib/container/ContainerEntryModule',\n);\n\nexport default ContainerEntryModule;\n"],"names":["SOURCE_TYPES","Set","ContainerEntryModule","Module","deserialize","context","read","obj","getSourceTypes","identifier","_shareScope","JSON","stringify","_exposes","readableIdentifier","requestShortener","libIdent","options","layer","_name","needBuild","callback","baseContext","buildMeta","build","compilation","resolver","fs","buildInfo","strict","topLevelDeclarations","exportsType","clearDependenciesAndBlocks","name","block","AsyncDependenciesBlock","import","length","idx","request","dep","ContainerExposedDependency","loc","index","addDependency","addBlock","StaticExportsDependency","EntryDependency","FederationRuntimePlugin","getFilePath","_runtimePlugins","codeGeneration","moduleGraph","chunkGraph","runtimeTemplate","sources","Map","runtimeRequirements","RuntimeGlobals","definePropertyGetters","hasOwnProperty","exports","getters","blocks","dependencies","modules","map","dependency","exposedName","module","getModule","userRequest","str","some","m","throwMissingModuleErrorBlock","join","blockPromise","message","returningFunction","moduleRaw","weak","push","basicFunction","initRuntimeDep","initRuntimeModuleGetter","federationGlobal","getFederationGlobalScope","source","Template","asString","indent","currentRemoteGetScope","shareScopeMap","global","require","initializeSharing","set","useSourceMap","useSimpleSourceMap","OriginalSource","RawSource","size","type","serialize","write","constructor","exposes","shareScope","runtimePlugins","JAVASCRIPT_MODULE_TYPE_DYNAMIC","makeSerializable"],"mappings":"AAAA;;;AAGA,GAEA;;;;+BAyVA;;;eAAA;;;;;iFAxVmC;mEAEd;iEACF;0EACa;gCACU;qCACK;qFACR;kFACH;2EAaP;kFACO;uBACK;0EACb;AAE5B,MAAMA,eAAe,IAAIC,IAAI;IAAC;CAAa;AAa3C,IAAA,AAAMC,uBAAN,MAAMA,6BAA6BC,eAAM;IAsBvC;;;GAGC,GACD,OAAOC,YAAYC,OAAkC,EAAwB;QAC3E,MAAM,EAAEC,IAAI,EAAE,GAAGD;QACjB,MAAME,MAAM,IAAIL,qBAAqBI,QAAQA,QAAQA,QAAQA;QAC7D,YAAY;QACZC,IAAIH,WAAW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CAAC;aACrD;YACD;SACD;QAEDxB,QAAQ0C,GAAG,CACT,cACA,IAAI,CAACC,YAAY,IAAI,IAAI,CAACC,kBAAkB,GACxC,IAAIC,8BAAc,CAACZ,QAAQ,6BAC3B,IAAIa,yBAAS,CAACb;QAGpB,OAAO;YACLjC;YACAE;QACF;IACF;IAEA;;;GAGC,GACD,AAAS6C,KAAKC,IAAa,EAAU;QACnC,OAAO;IACT;IACA;;GAEC,GACD,YAAY;IACHC,UAAUnG,OAAgC,EAAQ;QACzD,MAAM,EAAEoG,KAAK,EAAE,GAAGpG;QAClBoG,MAAM,IAAI,CAACtF,KAAK;QAChBsF,MAAM,IAAI,CAAC5F,QAAQ;QACnB4F,MAAM,IAAI,CAAC/F,WAAW;QACtB+F,MAAM,IAAI,CAACvD,eAAe;QAC1B,YAAY;QACZ,KAAK,CAACsD,UAAUnG;IAClB;IApSA;;;;GAIC,GACDqG,YACEzE,IAAY,EACZ0E,OAAkC,EAClCC,UAAkB,EAClBC,cAAwB,CACxB;QACA,KAAK,CAACC,mDAA8B,EAAE;QACtC,IAAI,CAAC3F,KAAK,GAAGc;QACb,IAAI,CAACpB,QAAQ,GAAG8F;QAChB,IAAI,CAACjG,WAAW,GAAGkG;QACnB,IAAI,CAAC1D,eAAe,GAAG2D;IACzB;AAqRF;AACA,YAAY;AACZE,IAAAA,yBAAgB,EACd7G,sBACA;MAGF,WAAeA"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ module.exports = ContainerEntryModuleFactory;
3
+
4
+ //# sourceMappingURL=ContainerEntryModuleFactory.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerEntryModuleFactory.d.ts"],"sourcesContent":["export = ContainerEntryModuleFactory;\ndeclare class ContainerEntryModuleFactory extends ModuleFactory {}\ndeclare namespace ContainerEntryModuleFactory {\n export {\n ModuleFactoryCreateData,\n ModuleFactoryResult,\n ContainerEntryDependency,\n };\n}\nimport ModuleFactory = require('webpack/lib/ModuleFactory');\ntype ModuleFactoryCreateData =\n import('webpack/lib/ModuleFactory').ModuleFactoryCreateData;\ntype ModuleFactoryResult =\n import('webpack/lib/ModuleFactory').ModuleFactoryResult;\ntype ContainerEntryDependency = import('./ContainerEntryDependency');\n"],"names":["ContainerEntryModuleFactory"],"mappings":";iBAASA"}
@@ -0,0 +1,10 @@
1
+ import ModuleFactory from 'webpack/lib/ModuleFactory';
2
+ import type { ModuleFactoryCreateData, ModuleFactoryResult } from 'webpack/lib/ModuleFactory';
3
+ export default class ContainerEntryModuleFactory extends ModuleFactory {
4
+ /**
5
+ * @param {ModuleFactoryCreateData} data data object
6
+ * @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback
7
+ * @returns {void}
8
+ */
9
+ create(data: ModuleFactoryCreateData, callback: (error: Error | null, result: ModuleFactoryResult) => void): void;
10
+ }
@@ -0,0 +1,32 @@
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 ContainerEntryModuleFactory;
12
+ }
13
+ });
14
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
15
+ const _ContainerEntryModule = /*#__PURE__*/ _interop_require_default._(require("./ContainerEntryModule"));
16
+ const _ModuleFactory = /*#__PURE__*/ _interop_require_default._(require("webpack/lib/ModuleFactory"));
17
+ let ContainerEntryModuleFactory = class ContainerEntryModuleFactory 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 { dependencies } = data;
24
+ const containerDependencies = dependencies;
25
+ const dep = containerDependencies[0];
26
+ callback(null, {
27
+ module: new _ContainerEntryModule.default(dep.name, dep.exposes, dep.shareScope, dep.runtimePlugins)
28
+ });
29
+ }
30
+ };
31
+
32
+ //# sourceMappingURL=ContainerEntryModuleFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerEntryModuleFactory.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';\n\nimport ContainerEntryModule from './ContainerEntryModule';\nimport ContainerEntryDependency from './ContainerEntryDependency';\nimport ModuleFactory from 'webpack/lib/ModuleFactory';\nimport type {\n ModuleFactoryCreateData,\n ModuleFactoryResult,\n} from 'webpack/lib/ModuleFactory';\n\nexport default class ContainerEntryModuleFactory 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 { dependencies } = data;\n const containerDependencies =\n dependencies as unknown as ContainerEntryDependency[];\n const dep = containerDependencies[0];\n\n callback(null, {\n module: new ContainerEntryModule(\n dep.name,\n dep.exposes,\n dep.shareScope,\n dep.runtimePlugins,\n ),\n });\n }\n}\n"],"names":["ContainerEntryModuleFactory","ModuleFactory","create","data","callback","dependencies","containerDependencies","dep","module","ContainerEntryModule","name","exposes","shareScope","runtimePlugins"],"mappings":"AAAA;;;AAGA,GAEA;;;;;;;eAUqBA;;;;+EARY;wEAEP;AAMX,IAAA,AAAMA,8BAAN,MAAMA,oCAAoCC,sBAAa;IACpE;;;;GAIC,GACD,AAASC,OACPC,IAA6B,EAC7BC,QAAoE,EAC9D;QACN,MAAM,EAAEC,YAAY,EAAE,GAAGF;QACzB,MAAMG,wBACJD;QACF,MAAME,MAAMD,qBAAqB,CAAC,EAAE;QAEpCF,SAAS,MAAM;YACbI,QAAQ,IAAIC,6BAAoB,CAC9BF,IAAIG,IAAI,EACRH,IAAII,OAAO,EACXJ,IAAIK,UAAU,EACdL,IAAIM,cAAc;QAEtB;IACF;AACF"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ module.exports = ContainerExposedDependency;
3
+
4
+ //# sourceMappingURL=ContainerExposedDependency.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../packages/enhanced/src/lib/container/ContainerExposedDependency.d.ts"],"sourcesContent":["export = ContainerExposedDependency;\n/** @typedef {import(\"webpack/lib/serialization/ObjectMiddleware\").ObjectDeserializerContext} ObjectDeserializerContext */\n/** @typedef {import(\"webpack/lib/serialization/ObjectMiddleware\").ObjectSerializerContext} ObjectSerializerContext */\ndeclare class ContainerExposedDependency extends ModuleDependency {\n /**\n * @param {string} exposedName public name\n * @param {string} request request to module\n */\n constructor(exposedName: string, request: string);\n exposedName: string;\n}\ndeclare namespace ContainerExposedDependency {\n export { ObjectDeserializerContext, ObjectSerializerContext };\n}\nimport ModuleDependency = require('webpack/lib/dependencies/ModuleDependency');\ntype ObjectDeserializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;\ntype ObjectSerializerContext =\n import('webpack/lib/serialization/ObjectMiddleware').ObjectSerializerContext;\n"],"names":["ContainerExposedDependency"],"mappings":";iBAASA"}
@@ -0,0 +1,26 @@
1
+ import type { ObjectDeserializerContext, ObjectSerializerContext } from 'webpack/lib/dependencies/ModuleDependency';
2
+ import ModuleDependency from 'webpack/lib/dependencies/ModuleDependency';
3
+ declare class ContainerExposedDependency extends ModuleDependency {
4
+ exposedName: string;
5
+ request: string;
6
+ /**
7
+ * @param {string} exposedName public name
8
+ * @param {string} request request to module
9
+ */
10
+ constructor(exposedName: string, request: string);
11
+ get type(): string;
12
+ get category(): string;
13
+ /**
14
+ * @returns {string | null} an identifier to merge equal requests
15
+ */
16
+ getResourceIdentifier(): string | null;
17
+ /**
18
+ * @param {ObjectSerializerContext} context context
19
+ */
20
+ serialize(context: ObjectSerializerContext): void;
21
+ /**
22
+ * @param {ObjectDeserializerContext} context context
23
+ */
24
+ deserialize(context: ObjectDeserializerContext): void;
25
+ }
26
+ export default ContainerExposedDependency;