@module-federation/enhanced 0.2.0-canary.5 → 0.2.1

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 (395) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +169 -0
  3. package/dist/package.json +85 -0
  4. package/dist/src/declarations/plugins/container/AsyncDependenciesBlock.d.ts +57 -0
  5. package/dist/src/declarations/plugins/container/Dependency.d.ts +285 -0
  6. package/dist/src/declarations/plugins/container/Module.d.ts +138 -0
  7. package/dist/src/declarations/plugins/container/ModuleFactory.d.ts +33 -0
  8. package/dist/src/declarations/plugins/container/ObjectDeserializerContext.d.ts +4 -0
  9. package/dist/src/declarations/plugins/container/StaticExportsDependency.d.ts +28 -0
  10. package/dist/src/declarations/plugins/container/Template.d.ts +198 -0
  11. package/dist/src/declarations/plugins/container/WebpackError.d.ts +32 -0
  12. package/dist/src/declarations/plugins/container/WebpackOptions.d.ts +140 -0
  13. package/dist/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.ts +74 -0
  14. package/dist/src/declarations/plugins/sharing/ProvideSharedPlugin.d.ts +67 -0
  15. package/dist/src/declarations/plugins/sharing/SharePlugin.d.ts +78 -0
  16. package/dist/src/index.d.ts +14 -0
  17. package/dist/src/index.js +37 -0
  18. package/dist/src/index.js.map +1 -0
  19. package/dist/src/lib/Constants.js +125 -0
  20. package/dist/src/lib/Constants.js.map +1 -0
  21. package/dist/src/lib/RuntimeGlobals.d.ts +0 -0
  22. package/{src → dist/src}/lib/RuntimeGlobals.js +144 -74
  23. package/dist/src/lib/RuntimeGlobals.js.map +1 -0
  24. package/{src → dist/src}/lib/container/AsyncBoundaryPlugin.d.ts +3 -4
  25. package/dist/src/lib/container/AsyncBoundaryPlugin.js +198 -0
  26. package/dist/src/lib/container/AsyncBoundaryPlugin.js.map +1 -0
  27. package/dist/src/lib/container/ContainerEntryDependency.d.ts +24 -0
  28. package/dist/src/lib/container/ContainerEntryDependency.js +39 -0
  29. package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -0
  30. package/dist/src/lib/container/ContainerEntryModule.d.ts +75 -0
  31. package/dist/src/lib/container/ContainerEntryModule.js +240 -0
  32. package/dist/src/lib/container/ContainerEntryModule.js.map +1 -0
  33. package/dist/src/lib/container/ContainerEntryModuleFactory.d.ts +15 -0
  34. package/dist/src/lib/container/ContainerEntryModuleFactory.js +30 -0
  35. package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -0
  36. package/dist/src/lib/container/ContainerExposedDependency.d.ts +19 -0
  37. package/dist/src/lib/container/ContainerExposedDependency.js +49 -0
  38. package/dist/src/lib/container/ContainerExposedDependency.js.map +1 -0
  39. package/dist/src/lib/container/ContainerPlugin.d.ts +13 -0
  40. package/dist/src/lib/container/ContainerPlugin.js +188 -0
  41. package/dist/src/lib/container/ContainerPlugin.js.map +1 -0
  42. package/{src → dist/src}/lib/container/ContainerReferencePlugin.d.ts +3 -3
  43. package/dist/src/lib/container/ContainerReferencePlugin.js +102 -0
  44. package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -0
  45. package/dist/src/lib/container/FallbackDependency.d.ts +15 -0
  46. package/dist/src/lib/container/FallbackDependency.js +47 -0
  47. package/dist/src/lib/container/FallbackDependency.js.map +1 -0
  48. package/dist/src/lib/container/FallbackItemDependency.d.ts +3 -0
  49. package/dist/src/lib/container/FallbackItemDependency.js +26 -0
  50. package/dist/src/lib/container/FallbackItemDependency.js.map +1 -0
  51. package/dist/src/lib/container/FallbackModule.d.ts +54 -0
  52. package/dist/src/lib/container/FallbackModule.js +152 -0
  53. package/dist/src/lib/container/FallbackModule.js.map +1 -0
  54. package/dist/src/lib/container/FallbackModuleFactory.d.ts +11 -0
  55. package/dist/src/lib/container/FallbackModuleFactory.js +28 -0
  56. package/dist/src/lib/container/FallbackModuleFactory.js.map +1 -0
  57. package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +14 -0
  58. package/dist/src/lib/container/HoistContainerReferencesPlugin.js +64 -0
  59. package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -0
  60. package/dist/src/lib/container/ModuleFederationPlugin.d.ts +17 -0
  61. package/dist/src/lib/container/ModuleFederationPlugin.js +133 -0
  62. package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -0
  63. package/dist/src/lib/container/RemoteModule.d.ts +90 -0
  64. package/dist/src/lib/container/RemoteModule.js +148 -0
  65. package/dist/src/lib/container/RemoteModule.js.map +1 -0
  66. package/dist/src/lib/container/RemoteRuntimeModule.d.ts +12 -0
  67. package/dist/src/lib/container/RemoteRuntimeModule.js +101 -0
  68. package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -0
  69. package/{src → dist/src}/lib/container/RemoteToExternalDependency.d.ts +3 -9
  70. package/dist/src/lib/container/RemoteToExternalDependency.js +26 -0
  71. package/dist/src/lib/container/RemoteToExternalDependency.js.map +1 -0
  72. package/dist/src/lib/container/constant.d.ts +3 -0
  73. package/dist/src/lib/container/constant.js +12 -0
  74. package/dist/src/lib/container/constant.js.map +1 -0
  75. package/{src → dist/src}/lib/container/options.d.ts +12 -4
  76. package/{src → dist/src}/lib/container/options.js +32 -42
  77. package/dist/src/lib/container/options.js.map +1 -0
  78. package/dist/src/lib/container/runtime/FederationRuntimeModule.d.ts +13 -0
  79. package/dist/src/lib/container/runtime/FederationRuntimeModule.js +49 -0
  80. package/dist/src/lib/container/runtime/FederationRuntimeModule.js.map +1 -0
  81. package/dist/src/lib/container/runtime/FederationRuntimePlugin.d.ts +17 -0
  82. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +209 -0
  83. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -0
  84. package/dist/src/lib/container/runtime/RemoteEntryPlugin.d.ts +8 -0
  85. package/dist/src/lib/container/runtime/RemoteEntryPlugin.js +32 -0
  86. package/dist/src/lib/container/runtime/RemoteEntryPlugin.js.map +1 -0
  87. package/dist/src/lib/container/runtime/getFederationGlobal.d.ts +5 -0
  88. package/dist/src/lib/container/runtime/getFederationGlobal.js +26 -0
  89. package/dist/src/lib/container/runtime/getFederationGlobal.js.map +1 -0
  90. package/dist/src/lib/container/runtime/utils.d.ts +16 -0
  91. package/dist/src/lib/container/runtime/utils.js +83 -0
  92. package/dist/src/lib/container/runtime/utils.js.map +1 -0
  93. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +3 -0
  94. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js +26 -0
  95. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -0
  96. package/dist/src/lib/sharing/ConsumeSharedModule.d.ts +99 -0
  97. package/dist/src/lib/sharing/ConsumeSharedModule.js +206 -0
  98. package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -0
  99. package/dist/src/lib/sharing/ConsumeSharedPlugin.d.ts +30 -0
  100. package/dist/src/lib/sharing/ConsumeSharedPlugin.js +245 -0
  101. package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -0
  102. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +31 -0
  103. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +124 -0
  104. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -0
  105. package/dist/src/lib/sharing/ProvideForSharedDependency.d.ts +3 -0
  106. package/dist/src/lib/sharing/ProvideForSharedDependency.js +27 -0
  107. package/dist/src/lib/sharing/ProvideForSharedDependency.js.map +1 -0
  108. package/dist/src/lib/sharing/ProvideSharedDependency.d.ts +36 -0
  109. package/dist/src/lib/sharing/ProvideSharedDependency.js +70 -0
  110. package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -0
  111. package/dist/src/lib/sharing/ProvideSharedModule.d.ts +67 -0
  112. package/dist/src/lib/sharing/ProvideSharedModule.js +186 -0
  113. package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -0
  114. package/dist/src/lib/sharing/ProvideSharedModuleFactory.d.ts +18 -0
  115. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +30 -0
  116. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -0
  117. package/dist/src/lib/sharing/ProvideSharedPlugin.d.ts +47 -0
  118. package/dist/src/lib/sharing/ProvideSharedPlugin.js +195 -0
  119. package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -0
  120. package/dist/src/lib/sharing/SharePlugin.d.ts +41 -0
  121. package/dist/src/lib/sharing/SharePlugin.js +79 -0
  122. package/dist/src/lib/sharing/SharePlugin.js.map +1 -0
  123. package/dist/src/lib/sharing/ShareRuntimeModule.d.ts +14 -0
  124. package/dist/src/lib/sharing/ShareRuntimeModule.js +102 -0
  125. package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -0
  126. package/dist/src/lib/sharing/resolveMatchedConfigs.d.ts +12 -0
  127. package/dist/src/lib/sharing/resolveMatchedConfigs.js +66 -0
  128. package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -0
  129. package/dist/src/lib/sharing/utils.d.ts +37 -0
  130. package/{src → dist/src}/lib/sharing/utils.js +109 -81
  131. package/dist/src/lib/sharing/utils.js.map +1 -0
  132. package/dist/src/rspack.d.ts +1 -0
  133. package/dist/src/rspack.js +6 -0
  134. package/dist/src/rspack.js.map +1 -0
  135. package/{src → dist/src}/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +1 -1
  136. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +19 -0
  137. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -0
  138. package/dist/src/runtime.d.ts +1 -0
  139. package/dist/src/runtime.js +18 -0
  140. package/dist/src/runtime.js.map +1 -0
  141. package/dist/src/schemas/container/ContainerPlugin.check.d.ts +7 -0
  142. package/dist/src/schemas/container/ContainerPlugin.check.js +2318 -0
  143. package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -0
  144. package/dist/src/schemas/container/ContainerPlugin.d.ts +289 -0
  145. package/dist/src/schemas/container/ContainerPlugin.js +326 -0
  146. package/dist/src/schemas/container/ContainerPlugin.js.map +1 -0
  147. package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +7 -0
  148. package/dist/src/schemas/container/ContainerReferencePlugin.check.js +939 -0
  149. package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -0
  150. package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +87 -0
  151. package/dist/src/schemas/container/ContainerReferencePlugin.js +132 -0
  152. package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -0
  153. package/dist/src/schemas/container/ModuleFederationPlugin.check.d.ts +9 -0
  154. package/dist/src/schemas/container/ModuleFederationPlugin.check.js +4001 -0
  155. package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
  156. package/{src → dist/src}/schemas/container/ModuleFederationPlugin.d.ts +197 -4
  157. package/{src → dist/src}/schemas/container/ModuleFederationPlugin.js +349 -177
  158. package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -0
  159. package/{src/schemas/container/ModuleFederationPlugin.check.d.ts → dist/src/schemas/sharing/ProviderSharedPlugin.check.d.ts} +2 -2
  160. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js +434 -0
  161. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js.map +1 -0
  162. package/dist/src/schemas/sharing/ProviderSharedPlugin.d.ts +104 -0
  163. package/dist/src/schemas/sharing/ProviderSharedPlugin.js +119 -0
  164. package/dist/src/schemas/sharing/ProviderSharedPlugin.js.map +1 -0
  165. package/dist/src/types/runtime.d.ts +7 -0
  166. package/dist/src/types/runtime.js +3 -0
  167. package/dist/src/types/runtime.js.map +1 -0
  168. package/dist/src/webpack.d.ts +2 -0
  169. package/dist/src/webpack.js +9 -0
  170. package/dist/src/webpack.js.map +1 -0
  171. package/dist/src/wrapper/AsyncBoundaryPlugin.d.ts +8 -0
  172. package/dist/src/wrapper/AsyncBoundaryPlugin.js +19 -0
  173. package/dist/src/wrapper/AsyncBoundaryPlugin.js.map +1 -0
  174. package/dist/src/wrapper/ConsumeSharedPlugin.d.ts +8 -0
  175. package/dist/src/wrapper/ConsumeSharedPlugin.js +19 -0
  176. package/dist/src/wrapper/ConsumeSharedPlugin.js.map +1 -0
  177. package/dist/src/wrapper/ContainerPlugin.d.ts +8 -0
  178. package/dist/src/wrapper/ContainerPlugin.js +19 -0
  179. package/dist/src/wrapper/ContainerPlugin.js.map +1 -0
  180. package/dist/src/wrapper/ContainerReferencePlugin.d.ts +8 -0
  181. package/dist/src/wrapper/ContainerReferencePlugin.js +19 -0
  182. package/dist/src/wrapper/ContainerReferencePlugin.js.map +1 -0
  183. package/dist/src/wrapper/FederationRuntimePlugin.d.ts +9 -0
  184. package/dist/src/wrapper/FederationRuntimePlugin.js +22 -0
  185. package/dist/src/wrapper/FederationRuntimePlugin.js.map +1 -0
  186. package/dist/src/wrapper/HoistContainerReferencesPlugin.d.ts +7 -0
  187. package/dist/src/wrapper/HoistContainerReferencesPlugin.js +19 -0
  188. package/dist/src/wrapper/HoistContainerReferencesPlugin.js.map +1 -0
  189. package/dist/src/wrapper/ModuleFederationPlugin.d.ts +8 -0
  190. package/dist/src/wrapper/ModuleFederationPlugin.js +39 -0
  191. package/dist/src/wrapper/ModuleFederationPlugin.js.map +1 -0
  192. package/dist/src/wrapper/ProvideSharedPlugin.d.ts +8 -0
  193. package/dist/src/wrapper/ProvideSharedPlugin.js +19 -0
  194. package/dist/src/wrapper/ProvideSharedPlugin.js.map +1 -0
  195. package/dist/src/wrapper/SharePlugin.d.ts +8 -0
  196. package/dist/src/wrapper/SharePlugin.js +19 -0
  197. package/dist/src/wrapper/SharePlugin.js.map +1 -0
  198. package/package.json +75 -7
  199. package/global.d.js +0 -14
  200. package/global.d.js.map +0 -1
  201. package/pullts.d.ts +0 -1
  202. package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js +0 -14
  203. package/src/declarations/plugins/container/AsyncDependenciesBlock.d.js.map +0 -1
  204. package/src/declarations/plugins/container/ContainerPlugin.d.js +0 -12
  205. package/src/declarations/plugins/container/ContainerPlugin.d.js.map +0 -1
  206. package/src/declarations/plugins/container/ContainerReferencePlugin.d.js +0 -12
  207. package/src/declarations/plugins/container/ContainerReferencePlugin.d.js.map +0 -1
  208. package/src/declarations/plugins/container/Dependency.d.js +0 -14
  209. package/src/declarations/plugins/container/Dependency.d.js.map +0 -1
  210. package/src/declarations/plugins/container/Module.d.js +0 -3
  211. package/src/declarations/plugins/container/Module.d.js.map +0 -1
  212. package/src/declarations/plugins/container/ModuleFactory.d.js +0 -3
  213. package/src/declarations/plugins/container/ModuleFactory.d.js.map +0 -1
  214. package/src/declarations/plugins/container/ModuleFederationPlugin.d.js +0 -12
  215. package/src/declarations/plugins/container/ModuleFederationPlugin.d.js.map +0 -1
  216. package/src/declarations/plugins/container/ObjectDeserializerContext.d.js +0 -6
  217. package/src/declarations/plugins/container/ObjectDeserializerContext.d.js.map +0 -1
  218. package/src/declarations/plugins/container/StaticExportsDependency.d.js +0 -14
  219. package/src/declarations/plugins/container/StaticExportsDependency.d.js.map +0 -1
  220. package/src/declarations/plugins/container/Template.d.js +0 -4
  221. package/src/declarations/plugins/container/Template.d.js.map +0 -1
  222. package/src/declarations/plugins/container/WebpackError.d.js +0 -3
  223. package/src/declarations/plugins/container/WebpackError.d.js.map +0 -1
  224. package/src/declarations/plugins/container/WebpackOptions.d.js +0 -6
  225. package/src/declarations/plugins/container/WebpackOptions.d.js.map +0 -1
  226. package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js +0 -12
  227. package/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.js.map +0 -1
  228. package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js +0 -12
  229. package/src/declarations/plugins/sharing/ProvideSharedPlugin.d.js.map +0 -1
  230. package/src/declarations/plugins/sharing/SharePlugin.d.js +0 -12
  231. package/src/declarations/plugins/sharing/SharePlugin.d.js.map +0 -1
  232. package/src/index.d.ts +0 -7
  233. package/src/index.js +0 -47
  234. package/src/index.js.map +0 -1
  235. package/src/lib/Constants.js +0 -103
  236. package/src/lib/Constants.js.map +0 -1
  237. package/src/lib/RuntimeGlobals.d.ts +0 -1
  238. package/src/lib/RuntimeGlobals.js.map +0 -1
  239. package/src/lib/container/AsyncBoundaryPlugin.js +0 -184
  240. package/src/lib/container/AsyncBoundaryPlugin.js.map +0 -1
  241. package/src/lib/container/ContainerEntryDependency.d.js +0 -4
  242. package/src/lib/container/ContainerEntryDependency.d.js.map +0 -1
  243. package/src/lib/container/ContainerEntryDependency.d.ts +0 -20
  244. package/src/lib/container/ContainerEntryDependency.js +0 -47
  245. package/src/lib/container/ContainerEntryDependency.js.map +0 -1
  246. package/src/lib/container/ContainerEntryModule.d.js +0 -14
  247. package/src/lib/container/ContainerEntryModule.d.js.map +0 -1
  248. package/src/lib/container/ContainerEntryModule.d.ts +0 -85
  249. package/src/lib/container/ContainerEntryModule.js +0 -281
  250. package/src/lib/container/ContainerEntryModule.js.map +0 -1
  251. package/src/lib/container/ContainerEntryModuleFactory.d.js +0 -4
  252. package/src/lib/container/ContainerEntryModuleFactory.d.js.map +0 -1
  253. package/src/lib/container/ContainerEntryModuleFactory.d.ts +0 -10
  254. package/src/lib/container/ContainerEntryModuleFactory.js +0 -37
  255. package/src/lib/container/ContainerEntryModuleFactory.js.map +0 -1
  256. package/src/lib/container/ContainerExposedDependency.d.js +0 -4
  257. package/src/lib/container/ContainerExposedDependency.d.js.map +0 -1
  258. package/src/lib/container/ContainerExposedDependency.d.ts +0 -26
  259. package/src/lib/container/ContainerExposedDependency.js +0 -57
  260. package/src/lib/container/ContainerExposedDependency.js.map +0 -1
  261. package/src/lib/container/ContainerPlugin.d.js +0 -4
  262. package/src/lib/container/ContainerPlugin.d.js.map +0 -1
  263. package/src/lib/container/ContainerPlugin.d.ts +0 -11
  264. package/src/lib/container/ContainerPlugin.js +0 -92
  265. package/src/lib/container/ContainerPlugin.js.map +0 -1
  266. package/src/lib/container/ContainerReferencePlugin.d.js +0 -4
  267. package/src/lib/container/ContainerReferencePlugin.d.js.map +0 -1
  268. package/src/lib/container/ContainerReferencePlugin.js +0 -141
  269. package/src/lib/container/ContainerReferencePlugin.js.map +0 -1
  270. package/src/lib/container/FallbackDependency.d.js +0 -14
  271. package/src/lib/container/FallbackDependency.d.js.map +0 -1
  272. package/src/lib/container/FallbackDependency.d.ts +0 -25
  273. package/src/lib/container/FallbackDependency.js +0 -59
  274. package/src/lib/container/FallbackDependency.js.map +0 -1
  275. package/src/lib/container/FallbackItemDependency.d.js +0 -4
  276. package/src/lib/container/FallbackItemDependency.d.js.map +0 -1
  277. package/src/lib/container/FallbackItemDependency.d.ts +0 -10
  278. package/src/lib/container/FallbackItemDependency.js +0 -37
  279. package/src/lib/container/FallbackItemDependency.js.map +0 -1
  280. package/src/lib/container/FallbackModule.d.js +0 -4
  281. package/src/lib/container/FallbackModule.d.js.map +0 -1
  282. package/src/lib/container/FallbackModule.d.ts +0 -73
  283. package/src/lib/container/FallbackModule.js +0 -153
  284. package/src/lib/container/FallbackModule.js.map +0 -1
  285. package/src/lib/container/FallbackModuleFactory.d.js +0 -4
  286. package/src/lib/container/FallbackModuleFactory.d.js.map +0 -1
  287. package/src/lib/container/FallbackModuleFactory.d.ts +0 -10
  288. package/src/lib/container/FallbackModuleFactory.js +0 -35
  289. package/src/lib/container/FallbackModuleFactory.js.map +0 -1
  290. package/src/lib/container/HoistContainerReferencesPlugin.d.ts +0 -19
  291. package/src/lib/container/HoistContainerReferencesPlugin.js +0 -78
  292. package/src/lib/container/HoistContainerReferencesPlugin.js.map +0 -1
  293. package/src/lib/container/ModuleFederationPlugin.d.js +0 -4
  294. package/src/lib/container/ModuleFederationPlugin.d.js.map +0 -1
  295. package/src/lib/container/ModuleFederationPlugin.d.ts +0 -16
  296. package/src/lib/container/ModuleFederationPlugin.js +0 -85
  297. package/src/lib/container/ModuleFederationPlugin.js.map +0 -1
  298. package/src/lib/container/ModuleFederationPluginTypes.d.js +0 -12
  299. package/src/lib/container/ModuleFederationPluginTypes.d.js.map +0 -1
  300. package/src/lib/container/RemoteModule.d.js +0 -13
  301. package/src/lib/container/RemoteModule.d.js.map +0 -1
  302. package/src/lib/container/RemoteModule.d.ts +0 -76
  303. package/src/lib/container/RemoteModule.js +0 -151
  304. package/src/lib/container/RemoteModule.js.map +0 -1
  305. package/src/lib/container/RemoteRuntimeModule.d.js +0 -13
  306. package/src/lib/container/RemoteRuntimeModule.d.js.map +0 -1
  307. package/src/lib/container/RemoteRuntimeModule.d.ts +0 -9
  308. package/src/lib/container/RemoteRuntimeModule.js +0 -124
  309. package/src/lib/container/RemoteRuntimeModule.js.map +0 -1
  310. package/src/lib/container/RemoteToExternalDependency.d.js +0 -19
  311. package/src/lib/container/RemoteToExternalDependency.d.js.map +0 -1
  312. package/src/lib/container/RemoteToExternalDependency.js +0 -37
  313. package/src/lib/container/RemoteToExternalDependency.js.map +0 -1
  314. package/src/lib/container/options.d.js +0 -6
  315. package/src/lib/container/options.d.js.map +0 -1
  316. package/src/lib/container/options.js.map +0 -1
  317. package/src/lib/inversion/ContainerInversionPlugin.d.ts +0 -1
  318. package/src/lib/inversion/ContainerInversionPlugin.js +0 -3
  319. package/src/lib/inversion/ContainerInversionPlugin.js.map +0 -1
  320. package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js +0 -4
  321. package/src/lib/sharing/ConsumeSharedFallbackDependency.d.js.map +0 -1
  322. package/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +0 -10
  323. package/src/lib/sharing/ConsumeSharedFallbackDependency.js +0 -37
  324. package/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +0 -1
  325. package/src/lib/sharing/ConsumeSharedModule.d.js +0 -4
  326. package/src/lib/sharing/ConsumeSharedModule.d.js.map +0 -1
  327. package/src/lib/sharing/ConsumeSharedModule.d.ts +0 -106
  328. package/src/lib/sharing/ConsumeSharedModule.js +0 -235
  329. package/src/lib/sharing/ConsumeSharedModule.js.map +0 -1
  330. package/src/lib/sharing/ConsumeSharedPlugin.d.js +0 -4
  331. package/src/lib/sharing/ConsumeSharedPlugin.d.js.map +0 -1
  332. package/src/lib/sharing/ConsumeSharedPlugin.d.ts +0 -8
  333. package/src/lib/sharing/ConsumeSharedPlugin.js +0 -274
  334. package/src/lib/sharing/ConsumeSharedPlugin.js.map +0 -1
  335. package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js +0 -4
  336. package/src/lib/sharing/ConsumeSharedRuntimeModule.d.js.map +0 -1
  337. package/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +0 -13
  338. package/src/lib/sharing/ConsumeSharedRuntimeModule.js +0 -294
  339. package/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +0 -1
  340. package/src/lib/sharing/ProvideForSharedDependency.d.js +0 -4
  341. package/src/lib/sharing/ProvideForSharedDependency.d.js.map +0 -1
  342. package/src/lib/sharing/ProvideForSharedDependency.d.ts +0 -11
  343. package/src/lib/sharing/ProvideForSharedDependency.js +0 -38
  344. package/src/lib/sharing/ProvideForSharedDependency.js.map +0 -1
  345. package/src/lib/sharing/ProvideSharedDependency.d.js +0 -14
  346. package/src/lib/sharing/ProvideSharedDependency.d.js.map +0 -1
  347. package/src/lib/sharing/ProvideSharedDependency.d.ts +0 -32
  348. package/src/lib/sharing/ProvideSharedDependency.js +0 -69
  349. package/src/lib/sharing/ProvideSharedDependency.js.map +0 -1
  350. package/src/lib/sharing/ProvideSharedModule.d.js +0 -4
  351. package/src/lib/sharing/ProvideSharedModule.d.js.map +0 -1
  352. package/src/lib/sharing/ProvideSharedModule.d.ts +0 -79
  353. package/src/lib/sharing/ProvideSharedModule.js +0 -203
  354. package/src/lib/sharing/ProvideSharedModule.js.map +0 -1
  355. package/src/lib/sharing/ProvideSharedModuleFactory.d.js +0 -4
  356. package/src/lib/sharing/ProvideSharedModuleFactory.d.js.map +0 -1
  357. package/src/lib/sharing/ProvideSharedModuleFactory.d.ts +0 -11
  358. package/src/lib/sharing/ProvideSharedModuleFactory.js +0 -36
  359. package/src/lib/sharing/ProvideSharedModuleFactory.js.map +0 -1
  360. package/src/lib/sharing/ProvideSharedPlugin.d.js +0 -4
  361. package/src/lib/sharing/ProvideSharedPlugin.d.js.map +0 -1
  362. package/src/lib/sharing/ProvideSharedPlugin.d.ts +0 -34
  363. package/src/lib/sharing/ProvideSharedPlugin.js +0 -182
  364. package/src/lib/sharing/ProvideSharedPlugin.js.map +0 -1
  365. package/src/lib/sharing/SharePlugin.d.js +0 -4
  366. package/src/lib/sharing/SharePlugin.d.js.map +0 -1
  367. package/src/lib/sharing/SharePlugin.d.ts +0 -15
  368. package/src/lib/sharing/SharePlugin.js +0 -77
  369. package/src/lib/sharing/SharePlugin.js.map +0 -1
  370. package/src/lib/sharing/ShareRuntimeModule.d.js +0 -4
  371. package/src/lib/sharing/ShareRuntimeModule.d.js.map +0 -1
  372. package/src/lib/sharing/ShareRuntimeModule.d.ts +0 -9
  373. package/src/lib/sharing/ShareRuntimeModule.js +0 -161
  374. package/src/lib/sharing/ShareRuntimeModule.js.map +0 -1
  375. package/src/lib/sharing/resolveMatchedConfigs.d.js +0 -6
  376. package/src/lib/sharing/resolveMatchedConfigs.d.js.map +0 -1
  377. package/src/lib/sharing/resolveMatchedConfigs.d.ts +0 -8
  378. package/src/lib/sharing/resolveMatchedConfigs.js +0 -73
  379. package/src/lib/sharing/resolveMatchedConfigs.js.map +0 -1
  380. package/src/lib/sharing/utils.d.js +0 -6
  381. package/src/lib/sharing/utils.d.js.map +0 -1
  382. package/src/lib/sharing/utils.d.ts +0 -33
  383. package/src/lib/sharing/utils.js.map +0 -1
  384. package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +0 -34
  385. package/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +0 -1
  386. package/src/runtime/ModuleInfoRuntimeModule.d.ts +0 -16
  387. package/src/runtime/ModuleInfoRuntimeModule.js +0 -88
  388. package/src/runtime/ModuleInfoRuntimeModule.js.map +0 -1
  389. package/src/runtime/ModuleInfoRuntimePlugin.d.ts +0 -5
  390. package/src/runtime/ModuleInfoRuntimePlugin.js +0 -29
  391. package/src/runtime/ModuleInfoRuntimePlugin.js.map +0 -1
  392. package/src/schemas/container/ModuleFederationPlugin.check.js +0 -2245
  393. package/src/schemas/container/ModuleFederationPlugin.check.js.map +0 -1
  394. package/src/schemas/container/ModuleFederationPlugin.js.map +0 -1
  395. /package/{src → dist/src}/lib/Constants.d.ts +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 ScriptedAlchemy LLC (Zack Jackson) Zhou Shaw (zhouxiao)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # `@module-federation/enhanced`
2
+
3
+ This package provides enhanced features for module federation.
4
+
5
+ The following items are exported:
6
+
7
+ - ModuleFederationPlugin
8
+ - ContainerPlugin
9
+ - ContainerReferencePlugin
10
+ - SharePlugin
11
+ - ConsumeSharedPlugin
12
+ - ProvideSharedPlugin
13
+ - FederationRuntimePlugin
14
+ - AsyncBoundaryPlugin
15
+ - HoistContainerReferencesPlugin
16
+
17
+ ## ModuleFederationPlugin
18
+
19
+ ### Configuration
20
+
21
+ ### name
22
+
23
+ - Type: `string`
24
+ - Required: No
25
+
26
+ The name of the container.
27
+
28
+ ### exposes
29
+
30
+ - Type: `Exposes`
31
+ - Required: No
32
+ - Default: `undefined`
33
+
34
+ Used to specify the modules and file entry points that are exposed via Module Federation. After configuration, the exposed modules will be extracted into a separate chunk, and if there are async chunks, they will also be extracted into a separate chunk (the specific splitting behavior depends on the chunk splitting rules).
35
+
36
+ The `Exposes` type is defined as follows:
37
+
38
+ ```tsx
39
+ type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;
40
+
41
+ type ExposesItem = string;
42
+
43
+ type ExposesItems = ExposesItem[];
44
+
45
+ interface ExposesObject {
46
+ [exposeKey: string]: ExposesConfig | ExposesItem | ExposesItems;
47
+ }
48
+ ```
49
+
50
+ Here, `exposeKey` is essentially the same as the [Package Entry Points](https://nodejs.org/api/packages.html#package-entry-points) specification (except that regular expression matching is not supported).
51
+
52
+ For example:
53
+
54
+ ```jsx
55
+ module.exports = {
56
+ plugins: [
57
+ new ModuleFederationPlugin({
58
+ name: 'mfButton',
59
+ exposes: {
60
+ // Note: "./" is not supported
61
+ '.': './src/index.tsx',
62
+ './add': './src/utils/add.ts',
63
+ './Button': './src/components/Button.tsx',
64
+ },
65
+ }),
66
+ ],
67
+ };
68
+ ```
69
+
70
+ ### remotes
71
+
72
+ > This is a consumer-specific parameter. If remotes is set, it can be considered as a consumer.
73
+
74
+ - Type: `Remotes`
75
+ - Required: No
76
+ - Default: `undefined`
77
+
78
+ This is used to specify how Module Federation consumes remote modules.
79
+
80
+ The `Remotes` type is defined as follows:
81
+
82
+ ```tsx
83
+ type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;
84
+
85
+ type RemotesItem = string;
86
+ type RemotesItems = RemotesItem[];
87
+
88
+ interface RemotesObject {
89
+ [remoteAlias: string]: RemotesConfig | RemotesItem | RemotesItems;
90
+ }
91
+ ```
92
+
93
+ Here, `remoteAlias` is the name actually used by the user and can be configured arbitrarily. For example, if `remoteAlias` is set to `demo`, the consumption method is `import xx from 'demo'`.
94
+
95
+ ### shared
96
+
97
+ - Type: `Shared`
98
+ - Required: No
99
+ - Default: `undefined`
100
+
101
+ `shared` is used to share common dependencies between consumers and producers, reducing runtime download size and thus improving performance.
102
+
103
+ The `Shared` type is defined as follows:
104
+
105
+ ```tsx
106
+ type Shared = (SharedItem | SharedObject)[] | SharedObject;
107
+
108
+ type SharedItem = string;
109
+
110
+ interface SharedObject {
111
+ [k: string]: SharedConfig | SharedItem;
112
+ }
113
+ ```
114
+
115
+ #### singleton
116
+
117
+ - Type: `boolean`
118
+ - Required: No
119
+ - Default: `false`
120
+
121
+ Determines whether only one version of the shared module is allowed in the shared scope (singleton mode).
122
+
123
+ - If the value is true, singleton mode is enabled; if the value is false, singleton mode is not enabled.
124
+ - If singleton mode is enabled, the shared dependencies of the remote application components and host application are loaded only once, and a higher version is loaded when the versions are not consistent. At this time, a warning will be given to the lower version side:
125
+ - If singleton mode is not enabled, if the versions of shared dependencies between the remote application and host application are not consistent, the remote application and host application load their own dependencies
126
+
127
+ #### requiredVersion
128
+
129
+ - Type: `string`
130
+ - Required: False
131
+ - Default: `require('project/package.json')[devDeps | dep]['depName']`
132
+
133
+ The required version can be a version range. The default value is the dependency version of the current application.
134
+
135
+ - When using shared dependencies, it will be judged whether the dependency version meets requiredVersion. If it does, it will be used normally. If it is less than requiredVersion, a warning will be issued in the console, and the smallest version in the current shared dependency will be used.
136
+ - When one side sets requiredVersion and the other side sets singleton, the dependency of requiredVersion will be loaded, and the singleton side will directly use the dependency of requiredVersion, regardless of the version.
137
+
138
+ #### eager
139
+
140
+ :::warning
141
+ When `eager` is set to true, the shared dependencies will be packaged into the entry file, which will cause the entry file to be too large. Please open with caution.
142
+ `eager: true` is rarely recommended
143
+ :::
144
+
145
+ - Type: `boolean`
146
+ - Required: False
147
+ - Default: `false`
148
+
149
+ Determines whether to load shared modules immediately.
150
+
151
+ Under normal circumstances, you need to open the asynchronous entry, and then load shared asynchronously on demand. If you want to use shared but don't want to enable asynchronous entry, you can set `eager` to true .
152
+
153
+ ### runtimePlugins
154
+
155
+ - Type: `string[]`
156
+ - Required: False
157
+ - Default: `undefined`
158
+
159
+ Used to add additional plug-ins required at runtime. The value is the path of the specific plug-in. It supports absolute/relative paths and package names.
160
+
161
+ Once set, the runtime plugin is automatically injected and used at build time.
162
+
163
+ ### implementation
164
+
165
+ - Type: `string`
166
+ - Required: False
167
+ - Default: `undefined`
168
+
169
+ Used to modify the actual bundler runtime version. Path with value `@module-federation/runtime-tools`.
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "@module-federation/enhanced",
3
+ "version": "0.2.1",
4
+ "main": "./src/index.js",
5
+ "types": "./dist/src/index.d.ts",
6
+ "repository": "https://github.com/module-federation/core/tree/main/packages/enhanced",
7
+ "files": [
8
+ "dist/",
9
+ "README.md"
10
+ ],
11
+ "license": "MIT",
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "peerDependencies": {
16
+ "webpack": "^5.0.0",
17
+ "typescript": "^4.9.0 || ^5.0.0",
18
+ "vue-tsc": "^1.0.24"
19
+ },
20
+ "peerDependenciesMeta": {
21
+ "webpack": {
22
+ "optional": true
23
+ },
24
+ "typescript": {
25
+ "optional": true
26
+ },
27
+ "vue-tsc": {
28
+ "optional": true
29
+ }
30
+ },
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/src/index.d.ts",
34
+ "require": "./dist/src/index.js",
35
+ "import": "./dist/src/index.js"
36
+ },
37
+ "./webpack": {
38
+ "types": "./dist/src/webpack.d.ts",
39
+ "require": "./dist/src/webpack.js",
40
+ "import": "./dist/src/webpack.js"
41
+ },
42
+ "./rspack": {
43
+ "types": "./dist/src/rspack.d.ts",
44
+ "require": "./dist/src/rspack.js",
45
+ "import": "./dist/src/rspack.js"
46
+ },
47
+ "./runtime": {
48
+ "types": "./dist/src/runtime.d.ts",
49
+ "require": "./dist/src/runtime.js",
50
+ "import": "./dist/src/runtime.js"
51
+ }
52
+ },
53
+ "typesVersions": {
54
+ "*": {
55
+ ".": [
56
+ "./dist/src/index.d.ts"
57
+ ],
58
+ "webpack": [
59
+ "./dist/src/webpack.d.ts"
60
+ ],
61
+ "rspack": [
62
+ "./dist/src/rspack.d.ts"
63
+ ],
64
+ "runtime": [
65
+ "./dist/src/runtime.d.ts"
66
+ ]
67
+ }
68
+ },
69
+ "devDependencies": {
70
+ "@module-federation/webpack-bundler-runtime": "workspace:*",
71
+ "@types/btoa": "^1.2.5"
72
+ },
73
+ "dependencies": {
74
+ "@module-federation/sdk": "workspace:*",
75
+ "@module-federation/runtime-tools": "workspace:*",
76
+ "@module-federation/manifest": "workspace:*",
77
+ "@module-federation/managers": "workspace:*",
78
+ "@module-federation/dts-plugin": "workspace:*",
79
+ "@module-federation/rspack": "workspace:*",
80
+ "@module-federation/bridge-react-webpack-plugin": "workspace:*",
81
+ "upath": "2.0.1",
82
+ "btoa": "^1.2.1"
83
+ },
84
+ "type": "commonjs"
85
+ }
@@ -0,0 +1,57 @@
1
+ export class AsyncDependenciesBlock extends DependenciesBlock {
2
+ /**
3
+ * @param {(ChunkGroupOptions & { entryOptions?: EntryOptions }) | null} groupOptions options for the group
4
+ * @param {(DependencyLocation | null)=} loc the line of code
5
+ * @param {(string | null)=} request the request
6
+ */
7
+ constructor(
8
+ groupOptions:
9
+ | (ChunkGroupOptions & {
10
+ entryOptions?: EntryOptions;
11
+ })
12
+ | null,
13
+ loc?: (DependencyLocation | null) | undefined,
14
+ request?: (string | null) | undefined,
15
+ );
16
+ groupOptions: import('./ChunkGroup').RawChunkGroupOptions & {
17
+ name?: string | undefined;
18
+ } & {
19
+ entryOptions?: import('./Entrypoint').EntryOptions | undefined;
20
+ };
21
+ loc: import('./Dependency').DependencyLocation | null | undefined;
22
+ request: string | null | undefined;
23
+ _stringifiedGroupOptions: string | undefined;
24
+ /**
25
+ * @param {string | undefined} value The new chunk name
26
+ * @returns {void}
27
+ */
28
+ set chunkName(arg: string | undefined);
29
+ /**
30
+ * @returns {string | undefined} The name of the chunk
31
+ */
32
+ get chunkName(): string | undefined;
33
+ set module(arg: any);
34
+ get module(): any;
35
+ }
36
+ declare namespace AsyncDependenciesBlock {
37
+ export {
38
+ ChunkGraph,
39
+ ChunkGroup,
40
+ ChunkGroupOptions,
41
+ DependencyLocation,
42
+ UpdateHashContext,
43
+ EntryOptions,
44
+ Module,
45
+ ObjectDeserializerContext,
46
+ ObjectSerializerContext,
47
+ Hash,
48
+ };
49
+ }
50
+ import DependenciesBlock = require('./DependenciesBlock');
51
+ type ChunkGroupOptions = import('./ChunkGroup').ChunkGroupOptions;
52
+ type EntryOptions = import('./Entrypoint').EntryOptions;
53
+ type DependencyLocation = import('./Dependency').DependencyLocation;
54
+ type ChunkGraph = import('./ChunkGraph');
55
+ type ChunkGroup = import('./ChunkGroup');
56
+ type UpdateHashContext = import('./Dependency').UpdateHashContext;
57
+ type Hash = import('./util/Hash');
@@ -0,0 +1,285 @@
1
+ export class Dependency {
2
+ /** @type {Module | undefined} */
3
+ _parentModule: Module | undefined;
4
+ /** @type {DependenciesBlock | undefined} */
5
+ _parentDependenciesBlock: DependenciesBlock | undefined;
6
+ /** @type {number} */
7
+ _parentDependenciesBlockIndex: number;
8
+ /** @type {boolean} */
9
+ weak: boolean;
10
+ /** @type {boolean} */
11
+ optional: boolean;
12
+ _locSL: number;
13
+ _locSC: number;
14
+ _locEL: number;
15
+ _locEC: number;
16
+ _locI: any;
17
+ _locN: any;
18
+ _loc:
19
+ | DependencyLocation
20
+ | (SyntheticDependencyLocation & RealDependencyLocation)
21
+ | undefined;
22
+ /**
23
+ * @returns {string} a display name for the type of dependency
24
+ */
25
+ get type(): string;
26
+ /**
27
+ * @returns {string} a dependency category, typical categories are "commonjs", "amd", "esm"
28
+ */
29
+ get category(): string;
30
+ set loc(arg: DependencyLocation);
31
+ /**
32
+ * @returns {DependencyLocation} location
33
+ */
34
+ get loc(): DependencyLocation;
35
+ /**
36
+ * @param {number} startLine start line
37
+ * @param {number} startColumn start column
38
+ * @param {number} endLine end line
39
+ * @param {number} endColumn end column
40
+ */
41
+ setLoc(
42
+ startLine: number,
43
+ startColumn: number,
44
+ endLine: number,
45
+ endColumn: number,
46
+ ): void;
47
+ /**
48
+ * @returns {string | undefined} a request context
49
+ */
50
+ getContext(): string | undefined;
51
+ /**
52
+ * @returns {string | null} an identifier to merge equal requests
53
+ */
54
+ getResourceIdentifier(): string | null;
55
+ /**
56
+ * @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module
57
+ */
58
+ couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
59
+ /**
60
+ * Returns the referenced module and export
61
+ * @deprecated
62
+ * @param {ModuleGraph} moduleGraph module graph
63
+ * @returns {never} throws error
64
+ */
65
+ getReference(moduleGraph: ModuleGraph): never;
66
+ /**
67
+ * Returns list of exports referenced by this dependency
68
+ * @param {ModuleGraph} moduleGraph module graph
69
+ * @param {RuntimeSpec} runtime the runtime for which the module is analysed
70
+ * @returns {(string[] | ReferencedExport)[]} referenced exports
71
+ */
72
+ getReferencedExports(
73
+ moduleGraph: ModuleGraph,
74
+ runtime: RuntimeSpec,
75
+ ): (string[] | ReferencedExport)[];
76
+ /**
77
+ * @param {ModuleGraph} moduleGraph module graph
78
+ * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active
79
+ */
80
+ getCondition(
81
+ moduleGraph: ModuleGraph,
82
+ ):
83
+ | false
84
+ | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState)
85
+ | null;
86
+ /**
87
+ * Returns the exported names
88
+ * @param {ModuleGraph} moduleGraph module graph
89
+ * @returns {ExportsSpec | undefined} export names
90
+ */
91
+ getExports(moduleGraph: ModuleGraph): ExportsSpec | undefined;
92
+ /**
93
+ * Returns warnings
94
+ * @param {ModuleGraph} moduleGraph module graph
95
+ * @returns {WebpackError[] | null | undefined} warnings
96
+ */
97
+ getWarnings(moduleGraph: ModuleGraph): WebpackError[] | null | undefined;
98
+ /**
99
+ * Returns errors
100
+ * @param {ModuleGraph} moduleGraph module graph
101
+ * @returns {WebpackError[] | null | undefined} errors
102
+ */
103
+ getErrors(moduleGraph: ModuleGraph): WebpackError[] | null | undefined;
104
+ /**
105
+ * Update the hash
106
+ * @param {Hash} hash hash to be updated
107
+ * @param {UpdateHashContext} context context
108
+ * @returns {void}
109
+ */
110
+ updateHash(hash: Hash, context: UpdateHashContext): void;
111
+ /**
112
+ * implement this method to allow the occurrence order plugin to count correctly
113
+ * @returns {number} count how often the id is used in this dependency
114
+ */
115
+ getNumberOfIdOccurrences(): number;
116
+ /**
117
+ * @param {ModuleGraph} moduleGraph the module graph
118
+ * @returns {ConnectionState} how this dependency connects the module to referencing modules
119
+ */
120
+ getModuleEvaluationSideEffectsState(
121
+ moduleGraph: ModuleGraph,
122
+ ): ConnectionState;
123
+ /**
124
+ * @param {string} context context directory
125
+ * @returns {Module | null} a module
126
+ */
127
+ createIgnoredModule(context: string): Module | null;
128
+ /**
129
+ * @param {ObjectSerializerContext} context context
130
+ */
131
+ serialize({ write }: ObjectSerializerContext): void;
132
+ /**
133
+ * @param {ObjectDeserializerContext} context context
134
+ */
135
+ deserialize({ read }: ObjectDeserializerContext): void;
136
+ set module(arg: any);
137
+ get module(): any;
138
+ get disconnect(): any;
139
+ }
140
+ declare namespace Dependency {
141
+ export {
142
+ NO_EXPORTS_REFERENCED,
143
+ EXPORTS_OBJECT_REFERENCED,
144
+ TRANSITIVE,
145
+ Source,
146
+ ChunkGraph,
147
+ DependenciesBlock,
148
+ DependencyTemplates,
149
+ Module,
150
+ ModuleGraph,
151
+ ModuleGraphConnection,
152
+ ConnectionState,
153
+ RuntimeTemplate,
154
+ WebpackError,
155
+ ObjectDeserializerContext,
156
+ ObjectSerializerContext,
157
+ Hash,
158
+ RuntimeSpec,
159
+ UpdateHashContext,
160
+ SourcePosition,
161
+ RealDependencyLocation,
162
+ SyntheticDependencyLocation,
163
+ DependencyLocation,
164
+ ExportSpec,
165
+ ExportsSpec,
166
+ ReferencedExport,
167
+ };
168
+ }
169
+ type Module = import('./Module');
170
+ type DependenciesBlock = import('./DependenciesBlock');
171
+ type DependencyLocation = SyntheticDependencyLocation | RealDependencyLocation;
172
+ type SyntheticDependencyLocation = {
173
+ name: string;
174
+ index?: number | undefined;
175
+ };
176
+ type RealDependencyLocation = {
177
+ start: SourcePosition;
178
+ end?: SourcePosition | undefined;
179
+ index?: number | undefined;
180
+ };
181
+
182
+ declare const TRANSITIVE: unique symbol;
183
+ type ModuleGraph = import('./ModuleGraph');
184
+ type RuntimeSpec = import('./util/runtime').RuntimeSpec;
185
+ type ReferencedExport = {
186
+ /**
187
+ * name of the referenced export
188
+ */
189
+ name: string[];
190
+ /**
191
+ * when false, referenced export can not be mangled, defaults to true
192
+ */
193
+ canMangle?: boolean | undefined;
194
+ };
195
+ type ModuleGraphConnection = import('./ModuleGraphConnection');
196
+ type ConnectionState = import('./ModuleGraphConnection').ConnectionState;
197
+ type ExportsSpec = {
198
+ /**
199
+ * exported names, true for unknown exports or null for no exports
200
+ */
201
+ exports: (string | ExportSpec)[] | true | null;
202
+ /**
203
+ * when exports = true, list of unaffected exports
204
+ */
205
+ excludeExports?: Set<string> | undefined;
206
+ /**
207
+ * list of maybe prior exposed, but now hidden exports
208
+ */
209
+ hideExports?: Set<string> | undefined;
210
+ /**
211
+ * when reexported: from which module
212
+ */
213
+ from?: ModuleGraphConnection | undefined;
214
+ /**
215
+ * when reexported: with which priority
216
+ */
217
+ priority?: number | undefined;
218
+ /**
219
+ * can the export be renamed (defaults to true)
220
+ */
221
+ canMangle?: boolean | undefined;
222
+ /**
223
+ * are the exports terminal bindings that should be checked for export star conflicts
224
+ */
225
+ terminalBinding?: boolean | undefined;
226
+ /**
227
+ * module on which the result depends on
228
+ */
229
+ dependencies?: Module[] | undefined;
230
+ };
231
+ type WebpackError = import('./WebpackError');
232
+ type Hash = import('./util/Hash');
233
+ type UpdateHashContext = {
234
+ chunkGraph: ChunkGraph;
235
+ runtime: RuntimeSpec;
236
+ runtimeTemplate?: RuntimeTemplate | undefined;
237
+ };
238
+ type ObjectSerializerContext =
239
+ import('./serialization/ObjectMiddleware').ObjectSerializerContext;
240
+ type ObjectDeserializerContext =
241
+ import('./serialization/ObjectMiddleware').ObjectDeserializerContext;
242
+ declare const NO_EXPORTS_REFERENCED: string[][];
243
+ declare const EXPORTS_OBJECT_REFERENCED: string[][];
244
+ type Source = import('webpack-sources').Source;
245
+ type ChunkGraph = import('./ChunkGraph');
246
+ type DependencyTemplates = import('./DependencyTemplates');
247
+ type RuntimeTemplate = import('./RuntimeTemplate');
248
+ type SourcePosition = {
249
+ line: number;
250
+ column?: number | undefined;
251
+ };
252
+ type ExportSpec = {
253
+ /**
254
+ * the name of the export
255
+ */
256
+ name: string;
257
+ /**
258
+ * can the export be renamed (defaults to true)
259
+ */
260
+ canMangle?: boolean | undefined;
261
+ /**
262
+ * is the export a terminal binding that should be checked for export star conflicts
263
+ */
264
+ terminalBinding?: boolean | undefined;
265
+ /**
266
+ * nested exports
267
+ */
268
+ exports?: (string | ExportSpec)[] | undefined;
269
+ /**
270
+ * when reexported: from which module
271
+ */
272
+ from?: ModuleGraphConnection | undefined;
273
+ /**
274
+ * when reexported: from which export
275
+ */
276
+ export?: (string[] | null) | undefined;
277
+ /**
278
+ * when reexported: with which priority
279
+ */
280
+ priority?: number | undefined;
281
+ /**
282
+ * export is not visible, because another export blends over it
283
+ */
284
+ hidden?: boolean | undefined;
285
+ };