@module-federation/enhanced 0.1.5 → 0.1.6

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 (194) hide show
  1. package/dist/package.json +67 -0
  2. package/dist/src/declarations/plugins/container/AsyncDependenciesBlock.d.ts +57 -0
  3. package/dist/src/declarations/plugins/container/Dependency.d.ts +285 -0
  4. package/dist/src/declarations/plugins/container/Module.d.ts +138 -0
  5. package/dist/src/declarations/plugins/container/ModuleFactory.d.ts +33 -0
  6. package/dist/src/declarations/plugins/container/ObjectDeserializerContext.d.ts +4 -0
  7. package/dist/src/declarations/plugins/container/StaticExportsDependency.d.ts +28 -0
  8. package/dist/src/declarations/plugins/container/Template.d.ts +198 -0
  9. package/dist/src/declarations/plugins/container/WebpackError.d.ts +32 -0
  10. package/dist/src/declarations/plugins/container/WebpackOptions.d.ts +140 -0
  11. package/dist/src/declarations/plugins/sharing/ConsumeSharedPlugin.d.ts +74 -0
  12. package/dist/src/declarations/plugins/sharing/ProvideSharedPlugin.d.ts +67 -0
  13. package/dist/src/declarations/plugins/sharing/SharePlugin.d.ts +78 -0
  14. package/dist/src/index.d.ts +14 -0
  15. package/dist/src/index.js +37 -0
  16. package/dist/src/index.js.map +1 -0
  17. package/dist/src/lib/Constants.d.ts +117 -0
  18. package/dist/src/lib/Constants.js +125 -0
  19. package/dist/src/lib/Constants.js.map +1 -0
  20. package/dist/src/lib/RuntimeGlobals.d.ts +0 -0
  21. package/dist/src/lib/RuntimeGlobals.js +316 -0
  22. package/dist/src/lib/RuntimeGlobals.js.map +1 -0
  23. package/dist/src/lib/container/AsyncBoundaryPlugin.d.ts +20 -0
  24. package/dist/src/lib/container/AsyncBoundaryPlugin.js +183 -0
  25. package/dist/src/lib/container/AsyncBoundaryPlugin.js.map +1 -0
  26. package/dist/src/lib/container/ContainerEntryDependency.d.ts +24 -0
  27. package/dist/src/lib/container/ContainerEntryDependency.js +39 -0
  28. package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -0
  29. package/dist/src/lib/container/ContainerEntryModule.d.ts +75 -0
  30. package/dist/src/lib/container/ContainerEntryModule.js +250 -0
  31. package/dist/src/lib/container/ContainerEntryModule.js.map +1 -0
  32. package/dist/src/lib/container/ContainerEntryModuleFactory.d.ts +15 -0
  33. package/dist/src/lib/container/ContainerEntryModuleFactory.js +30 -0
  34. package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -0
  35. package/dist/src/lib/container/ContainerExposedDependency.d.ts +19 -0
  36. package/dist/src/lib/container/ContainerExposedDependency.js +49 -0
  37. package/dist/src/lib/container/ContainerExposedDependency.js.map +1 -0
  38. package/dist/src/lib/container/ContainerPlugin.d.ts +13 -0
  39. package/dist/src/lib/container/ContainerPlugin.js +185 -0
  40. package/dist/src/lib/container/ContainerPlugin.js.map +1 -0
  41. package/dist/src/lib/container/ContainerReferencePlugin.d.ts +14 -0
  42. package/dist/src/lib/container/ContainerReferencePlugin.js +102 -0
  43. package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -0
  44. package/dist/src/lib/container/FallbackDependency.d.ts +15 -0
  45. package/dist/src/lib/container/FallbackDependency.js +47 -0
  46. package/dist/src/lib/container/FallbackDependency.js.map +1 -0
  47. package/dist/src/lib/container/FallbackItemDependency.d.ts +3 -0
  48. package/dist/src/lib/container/FallbackItemDependency.js +26 -0
  49. package/dist/src/lib/container/FallbackItemDependency.js.map +1 -0
  50. package/dist/src/lib/container/FallbackModule.d.ts +54 -0
  51. package/dist/src/lib/container/FallbackModule.js +152 -0
  52. package/dist/src/lib/container/FallbackModule.js.map +1 -0
  53. package/dist/src/lib/container/FallbackModuleFactory.d.ts +11 -0
  54. package/dist/src/lib/container/FallbackModuleFactory.js +28 -0
  55. package/dist/src/lib/container/FallbackModuleFactory.js.map +1 -0
  56. package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +14 -0
  57. package/dist/src/lib/container/HoistContainerReferencesPlugin.js +61 -0
  58. package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -0
  59. package/dist/src/lib/container/ModuleFederationPlugin.d.ts +16 -0
  60. package/dist/src/lib/container/ModuleFederationPlugin.js +122 -0
  61. package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -0
  62. package/dist/src/lib/container/RemoteModule.d.ts +90 -0
  63. package/dist/src/lib/container/RemoteModule.js +148 -0
  64. package/dist/src/lib/container/RemoteModule.js.map +1 -0
  65. package/dist/src/lib/container/RemoteRuntimeModule.d.ts +12 -0
  66. package/dist/src/lib/container/RemoteRuntimeModule.js +101 -0
  67. package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -0
  68. package/dist/src/lib/container/RemoteToExternalDependency.d.ts +4 -0
  69. package/dist/src/lib/container/RemoteToExternalDependency.js +26 -0
  70. package/dist/src/lib/container/RemoteToExternalDependency.js.map +1 -0
  71. package/dist/src/lib/container/constant.d.ts +3 -0
  72. package/dist/src/lib/container/constant.js +12 -0
  73. package/dist/src/lib/container/constant.js.map +1 -0
  74. package/dist/src/lib/container/options.d.ts +26 -0
  75. package/dist/src/lib/container/options.js +81 -0
  76. package/dist/src/lib/container/options.js.map +1 -0
  77. package/dist/src/lib/container/runtime/FederationRuntimeModule.d.ts +13 -0
  78. package/dist/src/lib/container/runtime/FederationRuntimeModule.js +27 -0
  79. package/dist/src/lib/container/runtime/FederationRuntimeModule.js.map +1 -0
  80. package/dist/src/lib/container/runtime/FederationRuntimePlugin.d.ts +17 -0
  81. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +207 -0
  82. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -0
  83. package/dist/src/lib/container/runtime/getFederationGlobal.d.ts +5 -0
  84. package/dist/src/lib/container/runtime/getFederationGlobal.js +24 -0
  85. package/dist/src/lib/container/runtime/getFederationGlobal.js.map +1 -0
  86. package/dist/src/lib/container/runtime/utils.d.ts +16 -0
  87. package/dist/src/lib/container/runtime/utils.js +83 -0
  88. package/dist/src/lib/container/runtime/utils.js.map +1 -0
  89. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +3 -0
  90. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js +26 -0
  91. package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.js.map +1 -0
  92. package/dist/src/lib/sharing/ConsumeSharedModule.d.ts +99 -0
  93. package/dist/src/lib/sharing/ConsumeSharedModule.js +206 -0
  94. package/dist/src/lib/sharing/ConsumeSharedModule.js.map +1 -0
  95. package/dist/src/lib/sharing/ConsumeSharedPlugin.d.ts +30 -0
  96. package/dist/src/lib/sharing/ConsumeSharedPlugin.js +245 -0
  97. package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -0
  98. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +31 -0
  99. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +124 -0
  100. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -0
  101. package/dist/src/lib/sharing/ProvideForSharedDependency.d.ts +3 -0
  102. package/dist/src/lib/sharing/ProvideForSharedDependency.js +27 -0
  103. package/dist/src/lib/sharing/ProvideForSharedDependency.js.map +1 -0
  104. package/dist/src/lib/sharing/ProvideSharedDependency.d.ts +36 -0
  105. package/dist/src/lib/sharing/ProvideSharedDependency.js +70 -0
  106. package/dist/src/lib/sharing/ProvideSharedDependency.js.map +1 -0
  107. package/dist/src/lib/sharing/ProvideSharedModule.d.ts +67 -0
  108. package/dist/src/lib/sharing/ProvideSharedModule.js +186 -0
  109. package/dist/src/lib/sharing/ProvideSharedModule.js.map +1 -0
  110. package/dist/src/lib/sharing/ProvideSharedModuleFactory.d.ts +18 -0
  111. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js +30 -0
  112. package/dist/src/lib/sharing/ProvideSharedModuleFactory.js.map +1 -0
  113. package/dist/src/lib/sharing/ProvideSharedPlugin.d.ts +47 -0
  114. package/dist/src/lib/sharing/ProvideSharedPlugin.js +195 -0
  115. package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -0
  116. package/dist/src/lib/sharing/SharePlugin.d.ts +41 -0
  117. package/dist/src/lib/sharing/SharePlugin.js +79 -0
  118. package/dist/src/lib/sharing/SharePlugin.js.map +1 -0
  119. package/dist/src/lib/sharing/ShareRuntimeModule.d.ts +14 -0
  120. package/dist/src/lib/sharing/ShareRuntimeModule.js +102 -0
  121. package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -0
  122. package/dist/src/lib/sharing/resolveMatchedConfigs.d.ts +12 -0
  123. package/dist/src/lib/sharing/resolveMatchedConfigs.js +66 -0
  124. package/dist/src/lib/sharing/resolveMatchedConfigs.js.map +1 -0
  125. package/dist/src/lib/sharing/utils.d.ts +37 -0
  126. package/dist/src/lib/sharing/utils.js +359 -0
  127. package/dist/src/lib/sharing/utils.js.map +1 -0
  128. package/dist/src/rspack.d.ts +1 -0
  129. package/dist/src/rspack.js +6 -0
  130. package/dist/src/rspack.js.map +1 -0
  131. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.d.ts +5 -0
  132. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js +19 -0
  133. package/dist/src/runtime/AddRuntimeRequirementToPromiseExternalPlugin.js.map +1 -0
  134. package/dist/src/runtime.d.ts +1 -0
  135. package/dist/src/runtime.js +18 -0
  136. package/dist/src/runtime.js.map +1 -0
  137. package/dist/src/schemas/container/ContainerPlugin.check.d.ts +7 -0
  138. package/dist/src/schemas/container/ContainerPlugin.check.js +2318 -0
  139. package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -0
  140. package/dist/src/schemas/container/ContainerPlugin.d.ts +289 -0
  141. package/dist/src/schemas/container/ContainerPlugin.js +326 -0
  142. package/dist/src/schemas/container/ContainerPlugin.js.map +1 -0
  143. package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +7 -0
  144. package/dist/src/schemas/container/ContainerReferencePlugin.check.js +939 -0
  145. package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -0
  146. package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +87 -0
  147. package/dist/src/schemas/container/ContainerReferencePlugin.js +132 -0
  148. package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -0
  149. package/dist/src/schemas/container/ModuleFederationPlugin.check.d.ts +9 -0
  150. package/dist/src/schemas/container/ModuleFederationPlugin.check.js +4001 -0
  151. package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
  152. package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +626 -0
  153. package/dist/src/schemas/container/ModuleFederationPlugin.js +720 -0
  154. package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -0
  155. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.d.ts +7 -0
  156. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js +434 -0
  157. package/dist/src/schemas/sharing/ProviderSharedPlugin.check.js.map +1 -0
  158. package/dist/src/schemas/sharing/ProviderSharedPlugin.d.ts +104 -0
  159. package/dist/src/schemas/sharing/ProviderSharedPlugin.js +119 -0
  160. package/dist/src/schemas/sharing/ProviderSharedPlugin.js.map +1 -0
  161. package/dist/src/types/runtime.d.ts +7 -0
  162. package/dist/src/types/runtime.js +3 -0
  163. package/dist/src/types/runtime.js.map +1 -0
  164. package/dist/src/webpack.d.ts +1 -0
  165. package/dist/src/webpack.js +9 -0
  166. package/dist/src/webpack.js.map +1 -0
  167. package/dist/src/wrapper/AsyncBoundaryPlugin.d.ts +8 -0
  168. package/dist/src/wrapper/AsyncBoundaryPlugin.js +19 -0
  169. package/dist/src/wrapper/AsyncBoundaryPlugin.js.map +1 -0
  170. package/dist/src/wrapper/ConsumeSharedPlugin.d.ts +8 -0
  171. package/dist/src/wrapper/ConsumeSharedPlugin.js +19 -0
  172. package/dist/src/wrapper/ConsumeSharedPlugin.js.map +1 -0
  173. package/dist/src/wrapper/ContainerPlugin.d.ts +8 -0
  174. package/dist/src/wrapper/ContainerPlugin.js +19 -0
  175. package/dist/src/wrapper/ContainerPlugin.js.map +1 -0
  176. package/dist/src/wrapper/ContainerReferencePlugin.d.ts +8 -0
  177. package/dist/src/wrapper/ContainerReferencePlugin.js +19 -0
  178. package/dist/src/wrapper/ContainerReferencePlugin.js.map +1 -0
  179. package/dist/src/wrapper/FederationRuntimePlugin.d.ts +9 -0
  180. package/dist/src/wrapper/FederationRuntimePlugin.js +22 -0
  181. package/dist/src/wrapper/FederationRuntimePlugin.js.map +1 -0
  182. package/dist/src/wrapper/HoistContainerReferencesPlugin.d.ts +6 -0
  183. package/dist/src/wrapper/HoistContainerReferencesPlugin.js +18 -0
  184. package/dist/src/wrapper/HoistContainerReferencesPlugin.js.map +1 -0
  185. package/dist/src/wrapper/ModuleFederationPlugin.d.ts +8 -0
  186. package/dist/src/wrapper/ModuleFederationPlugin.js +24 -0
  187. package/dist/src/wrapper/ModuleFederationPlugin.js.map +1 -0
  188. package/dist/src/wrapper/ProvideSharedPlugin.d.ts +8 -0
  189. package/dist/src/wrapper/ProvideSharedPlugin.js +19 -0
  190. package/dist/src/wrapper/ProvideSharedPlugin.js.map +1 -0
  191. package/dist/src/wrapper/SharePlugin.d.ts +8 -0
  192. package/dist/src/wrapper/SharePlugin.js +19 -0
  193. package/dist/src/wrapper/SharePlugin.js.map +1 -0
  194. package/package.json +8 -8
@@ -0,0 +1,198 @@
1
+ export = Template;
2
+
3
+ declare class Template {
4
+ /**
5
+ *
6
+ * @param {Function} fn a runtime function (.runtime.js) "template"
7
+ * @returns {string} the updated and normalized function string
8
+ */
9
+ // eslint-disable-next-line @typescript-eslint/ban-types
10
+ static getFunctionContent(fn: Function): string;
11
+ /**
12
+ * @param {string} str the string converted to identifier
13
+ * @returns {string} created identifier
14
+ */
15
+ static toIdentifier(str: string): string;
16
+ /**
17
+ *
18
+ * @param {string} str string to be converted to commented in bundle code
19
+ * @returns {string} returns a commented version of string
20
+ */
21
+ static toComment(str: string): string;
22
+ /**
23
+ *
24
+ * @param {string} str string to be converted to "normal comment"
25
+ * @returns {string} returns a commented version of string
26
+ */
27
+ static toNormalComment(str: string): string;
28
+ /**
29
+ * @param {string} str string path to be normalized
30
+ * @returns {string} normalized bundle-safe path
31
+ */
32
+ static toPath(str: string): string;
33
+ /**
34
+ * @param {number} n number to convert to ident
35
+ * @returns {string} returns single character ident
36
+ */
37
+ static numberToIdentifier(n: number): string;
38
+ /**
39
+ * @param {number} n number to convert to ident
40
+ * @returns {string} returns single character ident
41
+ */
42
+ static numberToIdentifierContinuation(n: number): string;
43
+ /**
44
+ *
45
+ * @param {string | string[]} s string to convert to identity
46
+ * @returns {string} converted identity
47
+ */
48
+ static indent(s: string | string[]): string;
49
+ /**
50
+ *
51
+ * @param {string|string[]} s string to create prefix for
52
+ * @param {string} prefix prefix to compose
53
+ * @returns {string} returns new prefix string
54
+ */
55
+ static prefix(s: string | string[], prefix: string): string;
56
+ /**
57
+ *
58
+ * @param {string|string[]} str string or string collection
59
+ * @returns {string} returns a single string from array
60
+ */
61
+ static asString(str: string | string[]): string;
62
+ /**
63
+ * @typedef {Object} WithId
64
+ * @property {string|number} id
65
+ */
66
+ /**
67
+ * @param {WithId[]} modules a collection of modules to get array bounds for
68
+ * @returns {[number, number] | false} returns the upper and lower array bounds
69
+ * or false if not every module has a number based id
70
+ */
71
+ static getModulesArrayBounds(
72
+ modules: {
73
+ id: string | number;
74
+ }[],
75
+ ): [number, number] | false;
76
+ /**
77
+ * @param {ChunkRenderContext} renderContext render context
78
+ * @param {Module[]} modules modules to render (should be ordered by identifier)
79
+ * @param {function(Module): Source} renderModule function to render a module
80
+ * @param {string=} prefix applying prefix strings
81
+ * @returns {Source | null} rendered chunk modules in a Source object or null if no modules
82
+ */
83
+ static renderChunkModules(
84
+ renderContext: ChunkRenderContext,
85
+ modules: Module[],
86
+ renderModule: (arg0: Module) => Source,
87
+ prefix?: string | undefined,
88
+ ): Source | null;
89
+ /**
90
+ * @param {RuntimeModule[]} runtimeModules array of runtime modules in order
91
+ * @param {RenderContext & { codeGenerationResults?: CodeGenerationResults }} renderContext render context
92
+ * @returns {Source} rendered runtime modules in a Source object
93
+ */
94
+ static renderRuntimeModules(
95
+ runtimeModules: RuntimeModule[],
96
+ renderContext: RenderContext & {
97
+ codeGenerationResults?: CodeGenerationResults;
98
+ },
99
+ ): Source;
100
+ /**
101
+ * @param {RuntimeModule[]} runtimeModules array of runtime modules in order
102
+ * @param {RenderContext} renderContext render context
103
+ * @returns {Source} rendered chunk runtime modules in a Source object
104
+ */
105
+ static renderChunkRuntimeModules(
106
+ runtimeModules: RuntimeModule[],
107
+ renderContext: RenderContext,
108
+ ): Source;
109
+ }
110
+ declare namespace Template {
111
+ export {
112
+ NUMBER_OF_IDENTIFIER_START_CHARS,
113
+ NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS,
114
+ Source,
115
+ OutputOptions,
116
+ Chunk,
117
+ ChunkGraph,
118
+ CodeGenerationResults,
119
+ AssetInfo,
120
+ PathData,
121
+ DependencyTemplates,
122
+ Module,
123
+ ModuleGraph,
124
+ ModuleTemplate,
125
+ RuntimeModule,
126
+ RuntimeTemplate,
127
+ ChunkRenderContext,
128
+ RenderContext,
129
+ RenderManifestOptions,
130
+ RenderManifestEntry,
131
+ RenderManifestEntryTemplated,
132
+ RenderManifestEntryStatic,
133
+ HasId,
134
+ ModuleFilterPredicate,
135
+ };
136
+ }
137
+ type ChunkRenderContext =
138
+ import('./javascript/JavascriptModulesPlugin').ChunkRenderContext;
139
+ type Module = import('./Module');
140
+ type Source = import('webpack-sources').Source;
141
+ type RuntimeModule = import('./RuntimeModule');
142
+ type RenderContext =
143
+ import('./javascript/JavascriptModulesPlugin').RenderContext;
144
+ type CodeGenerationResults = import('./CodeGenerationResults');
145
+ declare const NUMBER_OF_IDENTIFIER_START_CHARS: number;
146
+ declare const NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
147
+ type OutputOptions = import('../declarations/WebpackOptions').Output;
148
+ type Chunk = import('./Chunk');
149
+ type ChunkGraph = import('./ChunkGraph');
150
+ type AssetInfo = import('./Compilation').AssetInfo;
151
+ type PathData = import('./Compilation').PathData;
152
+ type DependencyTemplates = import('./DependencyTemplates');
153
+ type ModuleGraph = import('./ModuleGraph');
154
+ type ModuleTemplate = import('./ModuleTemplate');
155
+ type RuntimeTemplate = import('./RuntimeTemplate');
156
+ type RenderManifestOptions = {
157
+ /**
158
+ * the chunk used to render
159
+ */
160
+ chunk: Chunk;
161
+ hash: string;
162
+ fullHash: string;
163
+ outputOptions: OutputOptions;
164
+ codeGenerationResults: CodeGenerationResults;
165
+ moduleTemplates: {
166
+ javascript: ModuleTemplate;
167
+ };
168
+ dependencyTemplates: DependencyTemplates;
169
+ runtimeTemplate: RuntimeTemplate;
170
+ moduleGraph: ModuleGraph;
171
+ chunkGraph: ChunkGraph;
172
+ };
173
+ type RenderManifestEntry =
174
+ | RenderManifestEntryTemplated
175
+ | RenderManifestEntryStatic;
176
+ type RenderManifestEntryTemplated = {
177
+ render: () => Source;
178
+ filenameTemplate:
179
+ | string
180
+ | ((arg0: PathData, arg1: AssetInfo | undefined) => string);
181
+ pathOptions?: PathData | undefined;
182
+ info?: AssetInfo | undefined;
183
+ identifier: string;
184
+ hash?: string | undefined;
185
+ auxiliary?: boolean | undefined;
186
+ };
187
+ type RenderManifestEntryStatic = {
188
+ render: () => Source;
189
+ filename: string;
190
+ info: AssetInfo;
191
+ identifier: string;
192
+ hash?: string | undefined;
193
+ auxiliary?: boolean | undefined;
194
+ };
195
+ type HasId = {
196
+ id: number | string;
197
+ };
198
+ type ModuleFilterPredicate = (arg0: Module, arg1: number) => boolean;
@@ -0,0 +1,32 @@
1
+ declare class WebpackError extends Error {
2
+ /**
3
+ * Creates an instance of WebpackError.
4
+ */
5
+ constructor(message?: string);
6
+ details?: string;
7
+ module?: null | Module;
8
+ loc?: SyntheticDependencyLocation | RealDependencyLocation;
9
+ hideStack?: boolean;
10
+ chunk?: Chunk;
11
+ file?: string;
12
+ serialize(__0: ObjectSerializerContext): void;
13
+ deserialize(__0: ObjectDeserializerContext): void;
14
+
15
+ /**
16
+ * Create .stack property on a target object
17
+ */
18
+ static captureStackTrace(
19
+ targetObject: object,
20
+ // eslint-disable-next-line @typescript-eslint/ban-types
21
+ constructorOpt?: Function,
22
+ ): void;
23
+
24
+ /**
25
+ * Optional override for formatting stack traces
26
+ */
27
+ static prepareStackTrace?: (
28
+ err: Error,
29
+ stackTraces: NodeJS.CallSite[],
30
+ ) => any;
31
+ static stackTraceLimit: number;
32
+ }
@@ -0,0 +1,140 @@
1
+ export interface WebpackOptionsNormalized {
2
+ /**
3
+ * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
4
+ */
5
+ amd?: Amd;
6
+ /**
7
+ * Report the first error as a hard error instead of tolerating it.
8
+ */
9
+ bail?: Bail;
10
+ /**
11
+ * Cache generated modules and chunks to improve performance for multiple incremental builds.
12
+ */
13
+ cache: CacheOptionsNormalized;
14
+ /**
15
+ * The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
16
+ */
17
+ context?: Context;
18
+ /**
19
+ * References to other configurations to depend on.
20
+ */
21
+ dependencies?: Dependencies;
22
+ /**
23
+ * Options for the webpack-dev-server.
24
+ */
25
+ devServer?: DevServer;
26
+ /**
27
+ * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
28
+ */
29
+ devtool?: DevTool;
30
+ /**
31
+ * The entry point(s) of the compilation.
32
+ */
33
+ entry: EntryNormalized;
34
+ /**
35
+ * Enables/Disables experiments (experimental features with relax SemVer compatibility).
36
+ */
37
+ experiments: ExperimentsNormalized;
38
+ /**
39
+ * Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
40
+ */
41
+ externals: Externals;
42
+ /**
43
+ * Enable presets of externals for specific targets.
44
+ */
45
+ externalsPresets: ExternalsPresets;
46
+ /**
47
+ * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
48
+ */
49
+ externalsType?: ExternalsType;
50
+ /**
51
+ * Ignore specific warnings.
52
+ */
53
+ ignoreWarnings?: IgnoreWarningsNormalized;
54
+ /**
55
+ * Options for infrastructure level logging.
56
+ */
57
+ infrastructureLogging: InfrastructureLogging;
58
+ /**
59
+ * Custom values available in the loader context.
60
+ */
61
+ loader?: Loader;
62
+ /**
63
+ * Enable production optimizations or development hints.
64
+ */
65
+ mode?: Mode;
66
+ /**
67
+ * Options affecting the normal modules (`NormalModuleFactory`).
68
+ */
69
+ module: ModuleOptionsNormalized;
70
+ /**
71
+ * Name of the configuration. Used when loading multiple configurations.
72
+ */
73
+ name?: Name;
74
+ /**
75
+ * Include polyfills or mocks for various node stuff.
76
+ */
77
+ node: Node;
78
+ /**
79
+ * Enables/Disables integrated optimizations.
80
+ */
81
+ optimization: Optimization;
82
+ /**
83
+ * Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
84
+ */
85
+ output: OutputNormalized;
86
+ /**
87
+ * The number of parallel processed modules in the compilation.
88
+ */
89
+ parallelism?: Parallelism;
90
+ /**
91
+ * Configuration for web performance recommendations.
92
+ */
93
+ performance?: Performance;
94
+ /**
95
+ * Add additional plugins to the compiler.
96
+ */
97
+ plugins: Plugins;
98
+ /**
99
+ * Capture timing information for each module.
100
+ */
101
+ profile?: Profile;
102
+ /**
103
+ * Store compiler state to a json file.
104
+ */
105
+ recordsInputPath?: RecordsInputPath;
106
+ /**
107
+ * Load compiler state from a json file.
108
+ */
109
+ recordsOutputPath?: RecordsOutputPath;
110
+ /**
111
+ * Options for the resolver.
112
+ */
113
+ resolve: Resolve;
114
+ /**
115
+ * Options for the resolver when resolving loaders.
116
+ */
117
+ resolveLoader: ResolveLoader;
118
+ /**
119
+ * Options affecting how file system snapshots are created and validated.
120
+ */
121
+ snapshot: SnapshotOptions;
122
+ /**
123
+ * Stats options object or preset name.
124
+ */
125
+ stats: StatsValue;
126
+ /**
127
+ * Environment to build for. An array of environments to build for all of them when possible.
128
+ */
129
+ target?: Target;
130
+ /**
131
+ * Enter watch mode, which rebuilds on file change.
132
+ */
133
+ watch?: Watch;
134
+ /**
135
+ * Options for the watcher.
136
+ */
137
+ watchOptions: WatchOptions;
138
+ }
139
+
140
+ export type WebpackOptions = WebpackOptionsNormalized;
@@ -0,0 +1,74 @@
1
+ /*
2
+ * This file was automatically generated.
3
+ * DO NOT MODIFY BY HAND.
4
+ * Run `yarn special-lint-fix` to update
5
+ */
6
+
7
+ /**
8
+ * Modules that should be consumed from share scope. When provided, property names are used to match requested modules in this compilation.
9
+ */
10
+ export type Consumes = (ConsumesItem | ConsumesObject)[] | ConsumesObject;
11
+ /**
12
+ * A module that should be consumed from share scope.
13
+ */
14
+ export type ConsumesItem = string;
15
+
16
+ /**
17
+ * Options for consuming shared modules.
18
+ */
19
+ export interface ConsumeSharedPluginOptions {
20
+ /**
21
+ * Modules that should be consumed from share scope. When provided, property names are used to match requested modules in this compilation.
22
+ */
23
+ consumes: Consumes;
24
+ /**
25
+ * Share scope name used for all consumed modules (defaults to 'default').
26
+ */
27
+ shareScope?: string;
28
+ }
29
+ /**
30
+ * Modules that should be consumed from share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
31
+ */
32
+ export interface ConsumesObject {
33
+ /**
34
+ * Modules that should be consumed from share scope.
35
+ */
36
+ [k: string]: ConsumesConfig | ConsumesItem;
37
+ }
38
+ /**
39
+ * Advanced configuration for modules that should be consumed from share scope.
40
+ */
41
+ export interface ConsumesConfig {
42
+ /**
43
+ * Include the fallback module directly instead behind an async request. This allows to use fallback module in initial load too. All possible shared modules need to be eager too.
44
+ */
45
+ eager?: boolean;
46
+ /**
47
+ * Fallback module if no shared module is found in share scope. Defaults to the property name.
48
+ */
49
+ import?: false | ConsumesItem;
50
+ /**
51
+ * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
52
+ */
53
+ packageName?: string;
54
+ /**
55
+ * Version requirement from module in share scope.
56
+ */
57
+ requiredVersion?: false | string;
58
+ /**
59
+ * Module is looked up under this key from the share scope.
60
+ */
61
+ shareKey?: string;
62
+ /**
63
+ * Share scope name.
64
+ */
65
+ shareScope?: string;
66
+ /**
67
+ * Allow only a single version of the shared module in share scope (disabled by default).
68
+ */
69
+ singleton?: boolean;
70
+ /**
71
+ * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
72
+ */
73
+ strictVersion?: boolean;
74
+ }
@@ -0,0 +1,67 @@
1
+ /*
2
+ * This file was automatically generated.
3
+ * DO NOT MODIFY BY HAND.
4
+ * Run `yarn special-lint-fix` to update
5
+ */
6
+
7
+ /**
8
+ * Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.
9
+ */
10
+ export type Provides = (ProvidesItem | ProvidesObject)[] | ProvidesObject;
11
+ /**
12
+ * Request to a module that should be provided as shared module to the share scope (will be resolved when relative).
13
+ */
14
+ export type ProvidesItem = string;
15
+
16
+ export interface ProvideSharedPluginOptions {
17
+ /**
18
+ * Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.
19
+ */
20
+ provides: Provides;
21
+ /**
22
+ * Share scope name used for all provided modules (defaults to 'default').
23
+ */
24
+ shareScope?: string;
25
+ }
26
+ /**
27
+ * Modules that should be provided as shared modules to the share scope. Property names are used as share keys.
28
+ */
29
+ export interface ProvidesObject {
30
+ /**
31
+ * Modules that should be provided as shared modules to the share scope.
32
+ */
33
+ [k: string]: ProvidesConfig | ProvidesItem;
34
+ }
35
+ /**
36
+ * Advanced configuration for modules that should be provided as shared modules to the share scope.
37
+ */
38
+ export interface ProvidesConfig {
39
+ /**
40
+ * Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
41
+ */
42
+ eager?: boolean;
43
+ /**
44
+ * Key in the share scope under which the shared modules should be stored.
45
+ */
46
+ shareKey?: string;
47
+ /**
48
+ * Share scope name.
49
+ */
50
+ shareScope?: string;
51
+ /**
52
+ * Version of the provided module. Will replace lower matching versions, but not higher.
53
+ */
54
+ version?: false | string;
55
+ /**
56
+ * Version requirement from module in share scope.
57
+ */
58
+ requiredVersion?: false | string;
59
+ /**
60
+ * Allow only a single version of the shared module in share scope (disabled by default).
61
+ */
62
+ singleton?: boolean;
63
+ /**
64
+ * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
65
+ */
66
+ strictVersion?: boolean;
67
+ }
@@ -0,0 +1,78 @@
1
+ /*
2
+ * This file was automatically generated.
3
+ * DO NOT MODIFY BY HAND.
4
+ * Run `yarn special-lint-fix` to update
5
+ */
6
+
7
+ /**
8
+ * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
9
+ */
10
+ export type Shared = (SharedItem | SharedObject)[] | SharedObject;
11
+ /**
12
+ * A module that should be shared in the share scope.
13
+ */
14
+ export type SharedItem = string;
15
+
16
+ /**
17
+ * Options for shared modules.
18
+ */
19
+ export interface SharePluginOptions {
20
+ /**
21
+ * Share scope name used for all shared modules (defaults to 'default').
22
+ */
23
+ shareScope?: string;
24
+ /**
25
+ * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
26
+ */
27
+ shared: Shared;
28
+ }
29
+ /**
30
+ * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
31
+ */
32
+ export interface SharedObject {
33
+ /**
34
+ * Modules that should be shared in the share scope.
35
+ */
36
+ [k: string]: SharedConfig | SharedItem;
37
+ }
38
+ /**
39
+ * Advanced configuration for modules that should be shared in the share scope.
40
+ */
41
+ export interface SharedConfig {
42
+ /**
43
+ * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
44
+ */
45
+ eager?: boolean;
46
+ /**
47
+ * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
48
+ */
49
+ import?: false | SharedItem;
50
+ /**
51
+ * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
52
+ */
53
+ packageName?: string;
54
+ /**
55
+ * Version requirement from module in share scope.
56
+ */
57
+ requiredVersion?: false | string;
58
+ /**
59
+ * Module is looked up under this key from the share scope.
60
+ */
61
+ shareKey?: string;
62
+ /**
63
+ * Share scope name.
64
+ */
65
+ shareScope?: string;
66
+ /**
67
+ * Allow only a single version of the shared module in share scope (disabled by default).
68
+ */
69
+ singleton?: boolean;
70
+ /**
71
+ * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
72
+ */
73
+ strictVersion?: boolean;
74
+ /**
75
+ * Version of the provided module. Will replace lower matching versions, but not higher.
76
+ */
77
+ version?: false | string;
78
+ }
@@ -0,0 +1,14 @@
1
+ export { default as ModuleFederationPlugin } from './wrapper/ModuleFederationPlugin';
2
+ export { default as ContainerReferencePlugin } from './wrapper/ContainerReferencePlugin';
3
+ export { default as SharePlugin } from './wrapper/SharePlugin';
4
+ export { default as ContainerPlugin } from './wrapper/ContainerPlugin';
5
+ export { default as ConsumeSharedPlugin } from './wrapper/ConsumeSharedPlugin';
6
+ export { default as ProvideSharedPlugin } from './wrapper/ProvideSharedPlugin';
7
+ export { default as FederationRuntimePlugin } from './wrapper/FederationRuntimePlugin';
8
+ export { default as AsyncBoundaryPlugin } from './wrapper/AsyncBoundaryPlugin';
9
+ export { default as HoistContainerReferencesPlugin } from './wrapper/HoistContainerReferencesPlugin';
10
+ export { isRequiredVersion, normalizeVersion, getDescriptionFile, getRequiredVersionFromDescriptionFile, } from './lib/sharing/utils';
11
+ export { parseOptions } from './lib/container/options';
12
+ export declare const container: {
13
+ readonly ContainerEntryModule: any;
14
+ };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.container = exports.parseOptions = exports.getRequiredVersionFromDescriptionFile = exports.getDescriptionFile = exports.normalizeVersion = exports.isRequiredVersion = exports.HoistContainerReferencesPlugin = exports.AsyncBoundaryPlugin = exports.FederationRuntimePlugin = exports.ProvideSharedPlugin = exports.ConsumeSharedPlugin = exports.ContainerPlugin = exports.SharePlugin = exports.ContainerReferencePlugin = exports.ModuleFederationPlugin = void 0;
7
+ var ModuleFederationPlugin_1 = require("./wrapper/ModuleFederationPlugin");
8
+ Object.defineProperty(exports, "ModuleFederationPlugin", { enumerable: true, get: function () { return __importDefault(ModuleFederationPlugin_1).default; } });
9
+ var ContainerReferencePlugin_1 = require("./wrapper/ContainerReferencePlugin");
10
+ Object.defineProperty(exports, "ContainerReferencePlugin", { enumerable: true, get: function () { return __importDefault(ContainerReferencePlugin_1).default; } });
11
+ var SharePlugin_1 = require("./wrapper/SharePlugin");
12
+ Object.defineProperty(exports, "SharePlugin", { enumerable: true, get: function () { return __importDefault(SharePlugin_1).default; } });
13
+ var ContainerPlugin_1 = require("./wrapper/ContainerPlugin");
14
+ Object.defineProperty(exports, "ContainerPlugin", { enumerable: true, get: function () { return __importDefault(ContainerPlugin_1).default; } });
15
+ var ConsumeSharedPlugin_1 = require("./wrapper/ConsumeSharedPlugin");
16
+ Object.defineProperty(exports, "ConsumeSharedPlugin", { enumerable: true, get: function () { return __importDefault(ConsumeSharedPlugin_1).default; } });
17
+ var ProvideSharedPlugin_1 = require("./wrapper/ProvideSharedPlugin");
18
+ Object.defineProperty(exports, "ProvideSharedPlugin", { enumerable: true, get: function () { return __importDefault(ProvideSharedPlugin_1).default; } });
19
+ var FederationRuntimePlugin_1 = require("./wrapper/FederationRuntimePlugin");
20
+ Object.defineProperty(exports, "FederationRuntimePlugin", { enumerable: true, get: function () { return __importDefault(FederationRuntimePlugin_1).default; } });
21
+ var AsyncBoundaryPlugin_1 = require("./wrapper/AsyncBoundaryPlugin");
22
+ Object.defineProperty(exports, "AsyncBoundaryPlugin", { enumerable: true, get: function () { return __importDefault(AsyncBoundaryPlugin_1).default; } });
23
+ var HoistContainerReferencesPlugin_1 = require("./wrapper/HoistContainerReferencesPlugin");
24
+ Object.defineProperty(exports, "HoistContainerReferencesPlugin", { enumerable: true, get: function () { return __importDefault(HoistContainerReferencesPlugin_1).default; } });
25
+ var utils_1 = require("./lib/sharing/utils");
26
+ Object.defineProperty(exports, "isRequiredVersion", { enumerable: true, get: function () { return utils_1.isRequiredVersion; } });
27
+ Object.defineProperty(exports, "normalizeVersion", { enumerable: true, get: function () { return utils_1.normalizeVersion; } });
28
+ Object.defineProperty(exports, "getDescriptionFile", { enumerable: true, get: function () { return utils_1.getDescriptionFile; } });
29
+ Object.defineProperty(exports, "getRequiredVersionFromDescriptionFile", { enumerable: true, get: function () { return utils_1.getRequiredVersionFromDescriptionFile; } });
30
+ var options_1 = require("./lib/container/options");
31
+ Object.defineProperty(exports, "parseOptions", { enumerable: true, get: function () { return options_1.parseOptions; } });
32
+ exports.container = {
33
+ get ContainerEntryModule() {
34
+ return require('./lib/container/ContainerEntryModule').default;
35
+ },
36
+ };
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,2EAAqF;AAA5E,iJAAA,OAAO,OAA0B;AAC1C,+EAAyF;AAAhF,qJAAA,OAAO,OAA4B;AAC5C,qDAA+D;AAAtD,2HAAA,OAAO,OAAe;AAC/B,6DAAuE;AAA9D,mIAAA,OAAO,OAAmB;AACnC,qEAA+E;AAAtE,2IAAA,OAAO,OAAuB;AACvC,qEAA+E;AAAtE,2IAAA,OAAO,OAAuB;AAEvC,6EAAuF;AAA9E,mJAAA,OAAO,OAA2B;AAC3C,qEAA+E;AAAtE,2IAAA,OAAO,OAAuB;AACvC,2FAAqG;AAA5F,iKAAA,OAAO,OAAkC;AAElD,6CAK6B;AAJ3B,0GAAA,iBAAiB,OAAA;AACjB,yGAAA,gBAAgB,OAAA;AAChB,2GAAA,kBAAkB,OAAA;AAClB,8HAAA,qCAAqC,OAAA;AAEvC,mDAAuD;AAA9C,uGAAA,YAAY,OAAA;AAER,QAAA,SAAS,GAAG;IACvB,IAAI,oBAAoB;QACtB,OAAO,OAAO,CAAC,sCAAsC,CAAC,CAAC,OAAO,CAAC;IACjE,CAAC;CACF,CAAC"}