@module-federation/enhanced 0.6.6 → 0.6.7

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 (65) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/index.d.ts +4 -0
  3. package/dist/src/index.js +8 -1
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/lib/container/ContainerEntryDependency.d.ts +5 -1
  6. package/dist/src/lib/container/ContainerEntryDependency.js +3 -1
  7. package/dist/src/lib/container/ContainerEntryDependency.js.map +1 -1
  8. package/dist/src/lib/container/ContainerEntryModule.d.ts +5 -1
  9. package/dist/src/lib/container/ContainerEntryModule.js +21 -13
  10. package/dist/src/lib/container/ContainerEntryModule.js.map +1 -1
  11. package/dist/src/lib/container/ContainerEntryModuleFactory.js +1 -1
  12. package/dist/src/lib/container/ContainerEntryModuleFactory.js.map +1 -1
  13. package/dist/src/lib/container/ContainerPlugin.d.ts +0 -3
  14. package/dist/src/lib/container/ContainerPlugin.js +63 -30
  15. package/dist/src/lib/container/ContainerPlugin.js.map +1 -1
  16. package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -1
  17. package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +1 -10
  18. package/dist/src/lib/container/HoistContainerReferencesPlugin.js +63 -113
  19. package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -1
  20. package/dist/src/lib/container/ModuleFederationPlugin.js +4 -1
  21. package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -1
  22. package/dist/src/lib/container/RemoteModule.js +1 -2
  23. package/dist/src/lib/container/RemoteModule.js.map +1 -1
  24. package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -1
  25. package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.d.ts +0 -1
  26. package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js +1 -2
  27. package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js.map +1 -1
  28. package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.d.ts +4 -3
  29. package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.js +19 -58
  30. package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.js.map +1 -1
  31. package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.d.ts +0 -2
  32. package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js +10 -8
  33. package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js.map +1 -1
  34. package/dist/src/lib/container/runtime/FederationModulesPlugin.d.ts +20 -0
  35. package/dist/src/lib/container/runtime/FederationModulesPlugin.js +39 -0
  36. package/dist/src/lib/container/runtime/FederationModulesPlugin.js.map +1 -0
  37. package/dist/src/lib/container/runtime/FederationRuntimeDependency.d.ts +6 -0
  38. package/dist/src/lib/container/runtime/FederationRuntimeDependency.js +14 -0
  39. package/dist/src/lib/container/runtime/FederationRuntimeDependency.js.map +1 -0
  40. package/dist/src/lib/container/runtime/FederationRuntimePlugin.d.ts +3 -0
  41. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +58 -31
  42. package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -1
  43. package/dist/src/lib/sharing/ConsumeSharedPlugin.js +0 -1
  44. package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -1
  45. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +0 -1
  46. package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -1
  47. package/dist/src/lib/sharing/ShareRuntimeModule.js +3 -5
  48. package/dist/src/lib/sharing/ShareRuntimeModule.js.map +1 -1
  49. package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.js +2 -23
  50. package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.js.map +1 -1
  51. package/dist/src/lib/startup/StartupHelpers.js +1 -11
  52. package/dist/src/lib/startup/StartupHelpers.js.map +1 -1
  53. package/dist/src/schemas/container/ContainerPlugin.check.js +91 -1
  54. package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -1
  55. package/dist/src/schemas/container/ContainerPlugin.d.ts +15 -0
  56. package/dist/src/schemas/container/ContainerPlugin.js +9 -0
  57. package/dist/src/schemas/container/ContainerPlugin.js.map +1 -1
  58. package/dist/src/wrapper/FederationModulesPlugin.d.ts +10 -0
  59. package/dist/src/wrapper/FederationModulesPlugin.js +23 -0
  60. package/dist/src/wrapper/FederationModulesPlugin.js.map +1 -0
  61. package/dist/src/wrapper/HoistContainerReferencesPlugin.d.ts +1 -5
  62. package/dist/src/wrapper/HoistContainerReferencesPlugin.js +2 -7
  63. package/dist/src/wrapper/HoistContainerReferencesPlugin.js.map +1 -1
  64. package/package.json +10 -10
  65. package/dist/src/declarations/plugins/container/Dependency.d.ts +0 -285
@@ -1,285 +0,0 @@
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
- };