@module-federation/node 0.0.0-perf-devtools-20260107043700 → 0.0.0-perf-website-code-usage-20260914033703

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 (128) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +31 -0
  2. package/dist/_virtual/_rolldown/runtime.mjs +8 -0
  3. package/dist/node_modules/.pnpm/webpack@5.104.1_@swc_core@1.7.26_@swc_helpers@0.5.13__esbuild@0.28.1_webpack-cli@5.1.4/node_modules/webpack/types.d.mts +1 -0
  4. package/dist/node_modules/.pnpm/webpack@5.104.1_@swc_core@1.7.26_@swc_helpers@0.5.13__esbuild@0.28.1_webpack-cli@5.1.4/node_modules/webpack/types.d.ts +1 -0
  5. package/dist/plugins/ChunkCorrelationPlugin.js +308 -0
  6. package/dist/plugins/ChunkCorrelationPlugin.js.map +1 -0
  7. package/dist/plugins/ChunkCorrelationPlugin.mjs +305 -0
  8. package/dist/plugins/ChunkCorrelationPlugin.mjs.map +1 -0
  9. package/dist/plugins/createBundlerLogger.js +9 -0
  10. package/dist/plugins/createBundlerLogger.js.map +1 -0
  11. package/dist/plugins/createBundlerLogger.mjs +8 -0
  12. package/dist/plugins/createBundlerLogger.mjs.map +1 -0
  13. package/dist/src/filesystem/stratagies.d.mts +21 -0
  14. package/dist/src/filesystem/stratagies.d.ts +10 -7
  15. package/dist/src/filesystem/stratagies.js +97 -116
  16. package/dist/src/filesystem/stratagies.js.map +1 -1
  17. package/dist/src/filesystem/stratagies.mjs +103 -0
  18. package/dist/src/filesystem/stratagies.mjs.map +1 -0
  19. package/dist/src/index.d.mts +8 -0
  20. package/dist/src/index.d.ts +8 -7
  21. package/dist/src/index.js +16 -22
  22. package/dist/src/index.mjs +9 -0
  23. package/dist/src/plugins/AutomaticPublicPathPlugin.d.mts +12 -0
  24. package/dist/src/plugins/AutomaticPublicPathPlugin.d.ts +9 -7
  25. package/dist/src/plugins/AutomaticPublicPathPlugin.js +26 -35
  26. package/dist/src/plugins/AutomaticPublicPathPlugin.js.map +1 -1
  27. package/dist/src/plugins/AutomaticPublicPathPlugin.mjs +28 -0
  28. package/dist/src/plugins/AutomaticPublicPathPlugin.mjs.map +1 -0
  29. package/dist/src/plugins/ChunkCorrelationPlugin.d.mts +5 -0
  30. package/dist/src/plugins/ChunkCorrelationPlugin.d.ts +4 -61
  31. package/dist/src/plugins/ChunkCorrelationPlugin.js +8 -440
  32. package/dist/src/plugins/ChunkCorrelationPlugin.js.map +1 -1
  33. package/dist/src/plugins/ChunkCorrelationPlugin.mjs +8 -0
  34. package/dist/src/plugins/ChunkCorrelationPlugin.mjs.map +1 -0
  35. package/dist/src/plugins/CommonJsChunkLoadingPlugin.d.mts +21 -0
  36. package/dist/src/plugins/CommonJsChunkLoadingPlugin.d.ts +16 -13
  37. package/dist/src/plugins/CommonJsChunkLoadingPlugin.js +68 -118
  38. package/dist/src/plugins/CommonJsChunkLoadingPlugin.js.map +1 -1
  39. package/dist/src/plugins/CommonJsChunkLoadingPlugin.mjs +70 -0
  40. package/dist/src/plugins/CommonJsChunkLoadingPlugin.mjs.map +1 -0
  41. package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.d.mts +44 -0
  42. package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.d.ts +37 -34
  43. package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js +109 -126
  44. package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js.map +1 -1
  45. package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.mjs +110 -0
  46. package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.mjs.map +1 -0
  47. package/dist/src/plugins/EntryChunkTrackerPlugin.d.mts +17 -0
  48. package/dist/src/plugins/EntryChunkTrackerPlugin.d.ts +14 -10
  49. package/dist/src/plugins/EntryChunkTrackerPlugin.js +30 -32
  50. package/dist/src/plugins/EntryChunkTrackerPlugin.js.map +1 -1
  51. package/dist/src/plugins/EntryChunkTrackerPlugin.mjs +38 -0
  52. package/dist/src/plugins/EntryChunkTrackerPlugin.mjs.map +1 -0
  53. package/dist/src/plugins/NodeFederationPlugin.d.mts +54 -0
  54. package/dist/src/plugins/NodeFederationPlugin.d.ts +33 -26
  55. package/dist/src/plugins/NodeFederationPlugin.js +72 -84
  56. package/dist/src/plugins/NodeFederationPlugin.js.map +1 -1
  57. package/dist/src/plugins/NodeFederationPlugin.mjs +73 -0
  58. package/dist/src/plugins/NodeFederationPlugin.mjs.map +1 -0
  59. package/dist/src/plugins/RemotePublicPathRuntimeModule.d.mts +13 -0
  60. package/dist/src/plugins/RemotePublicPathRuntimeModule.d.ts +10 -8
  61. package/dist/src/plugins/RemotePublicPathRuntimeModule.js +34 -35
  62. package/dist/src/plugins/RemotePublicPathRuntimeModule.js.map +1 -1
  63. package/dist/src/plugins/RemotePublicPathRuntimeModule.mjs +132 -0
  64. package/dist/src/plugins/RemotePublicPathRuntimeModule.mjs.map +1 -0
  65. package/dist/src/plugins/StreamingTargetPlugin.d.mts +32 -0
  66. package/dist/src/plugins/StreamingTargetPlugin.d.ts +19 -16
  67. package/dist/src/plugins/StreamingTargetPlugin.js +43 -56
  68. package/dist/src/plugins/StreamingTargetPlugin.js.map +1 -1
  69. package/dist/src/plugins/StreamingTargetPlugin.mjs +46 -0
  70. package/dist/src/plugins/StreamingTargetPlugin.mjs.map +1 -0
  71. package/dist/src/plugins/UniversalFederationPlugin.d.mts +49 -0
  72. package/dist/src/plugins/UniversalFederationPlugin.d.ts +26 -23
  73. package/dist/src/plugins/UniversalFederationPlugin.js +62 -81
  74. package/dist/src/plugins/UniversalFederationPlugin.js.map +1 -1
  75. package/dist/src/plugins/UniversalFederationPlugin.mjs +65 -0
  76. package/dist/src/plugins/UniversalFederationPlugin.mjs.map +1 -0
  77. package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.d.mts +9 -0
  78. package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.d.ts +6 -3
  79. package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.js +14 -17
  80. package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.js.map +1 -1
  81. package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.mjs +23 -0
  82. package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.mjs.map +1 -0
  83. package/dist/src/plugins/webpackChunkUtilities.d.mts +55 -0
  84. package/dist/src/plugins/webpackChunkUtilities.d.ts +14 -9
  85. package/dist/src/plugins/webpackChunkUtilities.js +195 -257
  86. package/dist/src/plugins/webpackChunkUtilities.js.map +1 -1
  87. package/dist/src/plugins/webpackChunkUtilities.mjs +234 -0
  88. package/dist/src/plugins/webpackChunkUtilities.mjs.map +1 -0
  89. package/dist/src/recordDynamicRemoteEntryHashPlugin.d.mts +7 -0
  90. package/dist/src/recordDynamicRemoteEntryHashPlugin.d.ts +5 -2
  91. package/dist/src/recordDynamicRemoteEntryHashPlugin.js +24 -61
  92. package/dist/src/recordDynamicRemoteEntryHashPlugin.js.map +1 -1
  93. package/dist/src/recordDynamicRemoteEntryHashPlugin.mjs +26 -0
  94. package/dist/src/recordDynamicRemoteEntryHashPlugin.mjs.map +1 -0
  95. package/dist/src/runtimePlugin.d.mts +27 -0
  96. package/dist/src/runtimePlugin.d.ts +24 -19
  97. package/dist/src/runtimePlugin.js +214 -252
  98. package/dist/src/runtimePlugin.js.map +1 -1
  99. package/dist/src/runtimePlugin.mjs +226 -0
  100. package/dist/src/runtimePlugin.mjs.map +1 -0
  101. package/dist/src/types/index.d.mts +8 -0
  102. package/dist/src/types/index.d.ts +8 -3
  103. package/dist/src/types/index.js +1 -3
  104. package/dist/src/types/index.mjs +1 -0
  105. package/dist/src/utils/flush-chunks.d.mts +17 -0
  106. package/dist/src/utils/flush-chunks.d.ts +9 -3
  107. package/dist/src/utils/flush-chunks.js +138 -167
  108. package/dist/src/utils/flush-chunks.js.map +1 -1
  109. package/dist/src/utils/flush-chunks.mjs +144 -0
  110. package/dist/src/utils/flush-chunks.mjs.map +1 -0
  111. package/dist/src/utils/hot-reload.d.mts +16 -0
  112. package/dist/src/utils/hot-reload.d.ts +14 -10
  113. package/dist/src/utils/hot-reload.js +178 -264
  114. package/dist/src/utils/hot-reload.js.map +1 -1
  115. package/dist/src/utils/hot-reload.mjs +195 -0
  116. package/dist/src/utils/hot-reload.mjs.map +1 -0
  117. package/dist/src/utils/index.d.mts +3 -0
  118. package/dist/src/utils/index.d.ts +3 -2
  119. package/dist/src/utils/index.js +15 -19
  120. package/dist/src/utils/index.mjs +4 -0
  121. package/package.json +71 -26
  122. package/dist/jest.config.d.ts +0 -11
  123. package/dist/jest.config.js +0 -19
  124. package/dist/jest.config.js.map +0 -1
  125. package/dist/package.json +0 -90
  126. package/dist/src/index.js.map +0 -1
  127. package/dist/src/types/index.js.map +0 -1
  128. package/dist/src/utils/index.js.map +0 -1
@@ -0,0 +1,226 @@
1
+ //#region src/runtimePlugin.ts
2
+ const nodeRuntimeImportCache = /* @__PURE__ */ new Map();
3
+ const CHUNK_PREVIEW_LENGTH = 240;
4
+ const getChunkPreview = (content) => content.slice(0, CHUNK_PREVIEW_LENGTH).replace(/\s+/g, " ").trim();
5
+ const enrichChunkExecutionError = (error, options) => {
6
+ const normalizedError = error instanceof Error ? error : new Error(String(error));
7
+ const preview = getChunkPreview(options.content);
8
+ const details = [
9
+ `Federated chunk execution failed.`,
10
+ `chunk: ${options.chunkName}`,
11
+ `source: ${options.source}`,
12
+ `location: ${options.location}`
13
+ ];
14
+ if (options.hostName) details.push(`host: ${options.hostName}`);
15
+ if (options.resolution) {
16
+ details.push(`resolved-from: ${options.resolution.resolvedFrom}`);
17
+ if (options.resolution.remoteName) details.push(`remote: ${options.resolution.remoteName}`);
18
+ if (options.resolution.publicPath) details.push(`public-path: ${options.resolution.publicPath}`);
19
+ if (options.resolution.rootOutputDir) details.push(`root-output-dir: ${options.resolution.rootOutputDir}`);
20
+ if (options.resolution.remoteEntryUrl) details.push(`remote-entry: ${options.resolution.remoteEntryUrl}`);
21
+ }
22
+ if (preview) details.push(`preview: ${preview}`);
23
+ normalizedError.message = `${normalizedError.message}\n${details.join("\n")}`;
24
+ Object.assign(normalizedError, {
25
+ chunkName: options.chunkName,
26
+ chunkLocation: options.location,
27
+ chunkSource: options.source,
28
+ chunkPreview: preview,
29
+ chunkHostName: options.hostName,
30
+ chunkResolution: options.resolution
31
+ });
32
+ return normalizedError;
33
+ };
34
+ function importNodeModule(name) {
35
+ if (!name) throw new Error("import specifier is required");
36
+ if (nodeRuntimeImportCache.has(name)) return nodeRuntimeImportCache.get(name);
37
+ const promise = new Function("name", `return import(name)`)(name).then((res) => res.default).catch((error) => {
38
+ console.error(`Error importing module ${name}:`, error);
39
+ nodeRuntimeImportCache.delete(name);
40
+ throw error;
41
+ });
42
+ nodeRuntimeImportCache.set(name, promise);
43
+ return promise;
44
+ }
45
+ const resolveFile = (rootOutputDir, chunkId) => {
46
+ return __non_webpack_require__("path").join(__dirname, rootOutputDir + __webpack_require__.u(chunkId));
47
+ };
48
+ const returnFromCache = (remoteName) => {
49
+ const federationInstances = new Function("return globalThis")()["__FEDERATION__"]["__INSTANCES__"];
50
+ for (const instance of federationInstances) {
51
+ const moduleContainer = instance.moduleCache.get(remoteName);
52
+ if (moduleContainer?.remoteInfo) return moduleContainer.remoteInfo.entry;
53
+ }
54
+ return null;
55
+ };
56
+ const returnFromGlobalInstances = (remoteName) => {
57
+ const federationInstances = new Function("return globalThis")()["__FEDERATION__"]["__INSTANCES__"];
58
+ for (const instance of federationInstances) for (const remote of instance.options.remotes) if (remote.name === remoteName || remote.alias === remoteName) {
59
+ console.log("Backup remote entry found:", remote.entry);
60
+ return remote.entry;
61
+ }
62
+ return null;
63
+ };
64
+ const loadFromFs = (filename, callback) => {
65
+ const fs = __non_webpack_require__("fs");
66
+ const path = __non_webpack_require__("path");
67
+ const vm = __non_webpack_require__("vm");
68
+ if (fs.existsSync(filename)) fs.readFile(filename, "utf-8", (err, content) => {
69
+ if (err) return callback(err, null);
70
+ const chunk = {};
71
+ try {
72
+ new vm.Script(`(function(exports, require, __dirname, __filename) {${content}\n})`, {
73
+ filename,
74
+ importModuleDynamically: vm.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER ?? importNodeModule
75
+ }).runInThisContext()(chunk, __non_webpack_require__, path.dirname(filename), filename);
76
+ callback(null, chunk);
77
+ } catch (e) {
78
+ callback(enrichChunkExecutionError(e, {
79
+ chunkName: path.basename(filename),
80
+ location: filename,
81
+ source: "filesystem",
82
+ content
83
+ }), null);
84
+ }
85
+ });
86
+ else callback(/* @__PURE__ */ new Error(`File ${filename} does not exist`), null);
87
+ };
88
+ const fetchAndRun = (url, chunkName, callback, args) => {
89
+ (typeof fetch === "undefined" ? importNodeModule("node-fetch").then((mod) => mod.default) : Promise.resolve(fetch)).then((fetchFunction) => {
90
+ return args.origin.loaderHook.lifecycle.fetch.emit(url.href, {}).then((res) => {
91
+ if (!res || !(res instanceof Response)) return fetchFunction(url.href).then((response) => response.text());
92
+ return res.text();
93
+ });
94
+ }).then((data) => {
95
+ const chunk = {};
96
+ const hostName = args?.origin?.options?.name || args?.origin?.name;
97
+ const resolution = url.mfMetadata;
98
+ try {
99
+ eval(`(function(exports, require, __dirname, __filename) {${data}\n})`)(chunk, __non_webpack_require__, url.pathname.split("/").slice(0, -1).join("/"), chunkName);
100
+ callback(null, chunk);
101
+ } catch (e) {
102
+ callback(enrichChunkExecutionError(e, {
103
+ chunkName,
104
+ location: url.href,
105
+ source: "remote-url",
106
+ content: data,
107
+ hostName,
108
+ resolution
109
+ }), null);
110
+ }
111
+ }).catch((err) => callback(err, null));
112
+ };
113
+ const resolveUrl = (remoteName, chunkName) => {
114
+ try {
115
+ return Object.assign(new URL(chunkName, __webpack_require__.p), { mfMetadata: {
116
+ chunkName,
117
+ publicPath: __webpack_require__.p,
118
+ remoteName,
119
+ rootOutputDir: __webpack_require__.federation.rootOutputDir || "",
120
+ resolvedFrom: "public-path"
121
+ } });
122
+ } catch {
123
+ const entryUrl = returnFromCache(remoteName) || returnFromGlobalInstances(remoteName);
124
+ if (!entryUrl) return null;
125
+ const url = new URL(entryUrl);
126
+ const path = __non_webpack_require__("path");
127
+ const urlPath = url.pathname;
128
+ const lastSlashIndex = urlPath.lastIndexOf("/");
129
+ const directoryPath = lastSlashIndex >= 0 ? urlPath.substring(0, lastSlashIndex + 1) : "/";
130
+ const rootDir = __webpack_require__.federation.rootOutputDir || "";
131
+ const combinedPath = path.join(directoryPath, rootDir, chunkName).replace(/\\/g, "/");
132
+ return Object.assign(new URL(combinedPath, url.origin), { mfMetadata: {
133
+ chunkName,
134
+ publicPath: __webpack_require__.p,
135
+ remoteName,
136
+ rootOutputDir: rootDir,
137
+ resolvedFrom: "remote-entry-fallback",
138
+ remoteEntryUrl: entryUrl
139
+ } });
140
+ }
141
+ };
142
+ const loadChunk = (strategy, chunkId, rootOutputDir, callback, args) => {
143
+ if (strategy === "filesystem") return loadFromFs(resolveFile(rootOutputDir, chunkId), callback);
144
+ const url = resolveUrl(rootOutputDir, chunkId);
145
+ if (!url) return callback(null, {
146
+ modules: {},
147
+ ids: [],
148
+ runtime: null
149
+ });
150
+ fetchAndRun(url, chunkId, callback, args);
151
+ };
152
+ const installChunk = (chunk, installedChunks) => {
153
+ for (const moduleId in chunk.modules) __webpack_require__.m[moduleId] = chunk.modules[moduleId];
154
+ if (chunk.runtime) chunk.runtime(__webpack_require__);
155
+ for (const chunkId of chunk.ids) {
156
+ if (installedChunks[chunkId]) installedChunks[chunkId][0]();
157
+ installedChunks[chunkId] = 0;
158
+ }
159
+ };
160
+ const deleteChunk = (chunkId, installedChunks) => {
161
+ delete installedChunks[chunkId];
162
+ return true;
163
+ };
164
+ const setupScriptLoader = () => {
165
+ __webpack_require__.l = (url, done, key, chunkId) => {
166
+ if (!key || chunkId) throw new Error(`__webpack_require__.l name is required for ${url}`);
167
+ __webpack_require__.federation.runtime.loadScriptNode(url, { attrs: { globalName: key } }).then((res) => {
168
+ const enhancedRemote = __webpack_require__.federation.instance.initRawContainer(key, url, res);
169
+ new Function("return globalThis")()[key] = enhancedRemote;
170
+ done(enhancedRemote);
171
+ }).catch(done);
172
+ };
173
+ };
174
+ const setupChunkHandler = (installedChunks, args) => {
175
+ return (chunkId, promises) => {
176
+ let installedChunkData = installedChunks[chunkId];
177
+ if (installedChunkData !== 0) if (installedChunkData) promises.push(installedChunkData[2]);
178
+ else if (__webpack_require__.federation.chunkMatcher ? __webpack_require__.federation.chunkMatcher(chunkId) : true) {
179
+ const promise = new Promise((resolve, reject) => {
180
+ installedChunkData = installedChunks[chunkId] = [resolve, reject];
181
+ const fs = typeof process !== "undefined" ? __non_webpack_require__("fs") : false;
182
+ const filename = typeof process !== "undefined" ? resolveFile(__webpack_require__.federation.rootOutputDir || "", chunkId) : false;
183
+ if (fs && fs.existsSync(filename)) loadChunk("filesystem", chunkId, __webpack_require__.federation.rootOutputDir || "", (err, chunk) => {
184
+ if (err) return deleteChunk(chunkId, installedChunks) && reject(err);
185
+ if (chunk) installChunk(chunk, installedChunks);
186
+ resolve(chunk);
187
+ }, args);
188
+ else {
189
+ const chunkName = __webpack_require__.u(chunkId);
190
+ loadChunk(typeof process === "undefined" ? "http-eval" : "http-vm", chunkName, __webpack_require__.federation.initOptions.name, (err, chunk) => {
191
+ if (err) return deleteChunk(chunkId, installedChunks) && reject(err);
192
+ if (chunk) installChunk(chunk, installedChunks);
193
+ resolve(chunk);
194
+ }, args);
195
+ }
196
+ });
197
+ promises.push(installedChunkData[2] = promise);
198
+ } else installedChunks[chunkId] = 0;
199
+ };
200
+ };
201
+ const setupWebpackRequirePatching = (handle) => {
202
+ if (__webpack_require__.f) {
203
+ if (__webpack_require__.f.require) {
204
+ console.warn("\x1B[33m%s\x1B[0m", "CAUTION: build target is not set to \"async-node\", attempting to patch additional chunk handlers. This may not work");
205
+ __webpack_require__.f.require = handle;
206
+ }
207
+ if (__webpack_require__.f.readFileVm) __webpack_require__.f.readFileVm = handle;
208
+ }
209
+ };
210
+ function runtimePlugin_default() {
211
+ return {
212
+ name: "node-federation-plugin",
213
+ beforeInit(args) {
214
+ (() => {
215
+ const installedChunks = {};
216
+ setupScriptLoader();
217
+ setupWebpackRequirePatching(setupChunkHandler(installedChunks, args));
218
+ })();
219
+ return args;
220
+ }
221
+ };
222
+ }
223
+
224
+ //#endregion
225
+ export { runtimePlugin_default as default, deleteChunk, fetchAndRun, importNodeModule, installChunk, loadChunk, loadFromFs, nodeRuntimeImportCache, resolveFile, resolveUrl, returnFromCache, returnFromGlobalInstances, setupChunkHandler, setupScriptLoader, setupWebpackRequirePatching };
226
+ //# sourceMappingURL=runtimePlugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimePlugin.mjs","names":[],"sources":["../../src/runtimePlugin.ts"],"sourcesContent":["import type {\n ModuleFederationRuntimePlugin,\n ModuleFederation,\n} from '@module-federation/runtime';\ntype WebpackRequire = {\n (id: string): any;\n u: (chunkId: string) => string;\n p: string;\n m: { [key: string]: any };\n o: (obj: any, prop: string) => boolean;\n C?: (chunk: any) => void;\n l: (\n url: string,\n done: (res: any) => void,\n key: string,\n chunkId: string,\n ) => void;\n federation: {\n runtime: {\n loadScriptNode: (\n url: string,\n options: { attrs: { globalName: string } },\n ) => Promise<any>;\n };\n instance: ModuleFederation;\n chunkMatcher?: (chunkId: string) => boolean;\n rootOutputDir?: string;\n initOptions: {\n name: string;\n remotes: any;\n };\n };\n f?: {\n require?: (chunkId: string, promises: any[]) => void;\n readFileVm?: (chunkId: string, promises: any[]) => void;\n };\n};\n\ndeclare const __webpack_require__: WebpackRequire;\ndeclare const __non_webpack_require__: (id: string) => any;\n\nexport const nodeRuntimeImportCache = new Map<string, Promise<any>>();\nconst CHUNK_PREVIEW_LENGTH = 240;\ntype ChunkResolutionSource = 'public-path' | 'remote-entry-fallback';\ntype ChunkLocationSource = 'filesystem' | 'remote-url';\ntype ChunkUrlMetadata = {\n chunkName: string;\n publicPath?: string;\n remoteName?: string;\n rootOutputDir?: string;\n resolvedFrom: ChunkResolutionSource;\n remoteEntryUrl?: string;\n};\n\nconst getChunkPreview = (content: string): string =>\n content.slice(0, CHUNK_PREVIEW_LENGTH).replace(/\\s+/g, ' ').trim();\n\nconst enrichChunkExecutionError = (\n error: unknown,\n options: {\n chunkName: string;\n location: string;\n source: ChunkLocationSource;\n content: string;\n hostName?: string;\n resolution?: ChunkUrlMetadata;\n },\n): Error => {\n const normalizedError =\n error instanceof Error ? error : new Error(String(error));\n const preview = getChunkPreview(options.content);\n const details = [\n `Federated chunk execution failed.`,\n `chunk: ${options.chunkName}`,\n `source: ${options.source}`,\n `location: ${options.location}`,\n ];\n\n if (options.hostName) {\n details.push(`host: ${options.hostName}`);\n }\n\n if (options.resolution) {\n details.push(`resolved-from: ${options.resolution.resolvedFrom}`);\n\n if (options.resolution.remoteName) {\n details.push(`remote: ${options.resolution.remoteName}`);\n }\n\n if (options.resolution.publicPath) {\n details.push(`public-path: ${options.resolution.publicPath}`);\n }\n\n if (options.resolution.rootOutputDir) {\n details.push(`root-output-dir: ${options.resolution.rootOutputDir}`);\n }\n\n if (options.resolution.remoteEntryUrl) {\n details.push(`remote-entry: ${options.resolution.remoteEntryUrl}`);\n }\n }\n\n if (preview) {\n details.push(`preview: ${preview}`);\n }\n\n normalizedError.message = `${normalizedError.message}\\n${details.join('\\n')}`;\n\n Object.assign(normalizedError, {\n chunkName: options.chunkName,\n chunkLocation: options.location,\n chunkSource: options.source,\n chunkPreview: preview,\n chunkHostName: options.hostName,\n chunkResolution: options.resolution,\n });\n\n return normalizedError;\n};\n\nexport function importNodeModule<T>(name: string): Promise<T> {\n if (!name) {\n throw new Error('import specifier is required');\n }\n\n // Check cache to prevent infinite recursion\n if (nodeRuntimeImportCache.has(name)) {\n return nodeRuntimeImportCache.get(name)!;\n }\n\n const importModule = new Function('name', `return import(name)`);\n const promise = importModule(name)\n .then((res: any) => res.default as T)\n .catch((error: any) => {\n console.error(`Error importing module ${name}:`, error);\n // Remove from cache on error so it can be retried\n nodeRuntimeImportCache.delete(name);\n throw error;\n });\n\n // Cache the promise to prevent recursive calls\n nodeRuntimeImportCache.set(name, promise);\n return promise;\n}\n\n// Hoisted utility function to resolve file paths for chunks\nexport const resolveFile = (rootOutputDir: string, chunkId: string): string => {\n const path = __non_webpack_require__('path');\n return path.join(__dirname, rootOutputDir + __webpack_require__.u(chunkId));\n};\n\n// Hoisted utility function to get remote entry from cache\nexport const returnFromCache = (remoteName: string): string | null => {\n const globalThisVal = new Function('return globalThis')();\n const federationInstances = globalThisVal['__FEDERATION__']['__INSTANCES__'];\n for (const instance of federationInstances) {\n const moduleContainer = instance.moduleCache.get(remoteName);\n if (moduleContainer?.remoteInfo) return moduleContainer.remoteInfo.entry;\n }\n return null;\n};\n\n// Hoisted utility function to get remote entry from global instances\nexport const returnFromGlobalInstances = (\n remoteName: string,\n): string | null => {\n const globalThisVal = new Function('return globalThis')();\n const federationInstances = globalThisVal['__FEDERATION__']['__INSTANCES__'];\n for (const instance of federationInstances) {\n for (const remote of instance.options.remotes) {\n if (remote.name === remoteName || remote.alias === remoteName) {\n console.log('Backup remote entry found:', remote.entry);\n return remote.entry;\n }\n }\n }\n return null;\n};\n\n// Hoisted utility function to load chunks from filesystem\nexport const loadFromFs = (\n filename: string,\n callback: (err: Error | null, chunk: any) => void,\n): void => {\n const fs = __non_webpack_require__('fs') as typeof import('fs');\n const path = __non_webpack_require__('path') as typeof import('path');\n const vm = __non_webpack_require__('vm') as typeof import('vm');\n\n if (fs.existsSync(filename)) {\n fs.readFile(filename, 'utf-8', (err, content) => {\n if (err) return callback(err, null);\n const chunk = {};\n try {\n const script = new vm.Script(\n `(function(exports, require, __dirname, __filename) {${content}\\n})`,\n {\n filename,\n importModuleDynamically:\n //@ts-ignore\n vm.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER ?? importNodeModule,\n },\n );\n script.runInThisContext()(\n chunk,\n __non_webpack_require__,\n path.dirname(filename),\n filename,\n );\n callback(null, chunk);\n } catch (e) {\n callback(\n enrichChunkExecutionError(e, {\n chunkName: path.basename(filename),\n location: filename,\n source: 'filesystem',\n content,\n }),\n null,\n );\n }\n });\n } else {\n callback(new Error(`File ${filename} does not exist`), null);\n }\n};\n\n// Hoisted utility function to fetch and execute chunks from remote URLs\nexport const fetchAndRun = (\n url: URL,\n chunkName: string,\n callback: (err: Error | null, chunk: any) => void,\n args: any,\n): void => {\n (typeof fetch === 'undefined'\n ? importNodeModule<typeof import('node-fetch')>('node-fetch').then(\n (mod) => mod.default,\n )\n : Promise.resolve(fetch)\n )\n .then((fetchFunction) => {\n return args.origin.loaderHook.lifecycle.fetch\n .emit(url.href, {})\n .then((res: Response | null) => {\n if (!res || !(res instanceof Response)) {\n return fetchFunction(url.href).then((response) => response.text());\n }\n return res.text();\n });\n })\n .then((data) => {\n const chunk = {};\n const hostName = args?.origin?.options?.name || args?.origin?.name;\n const resolution = (url as URL & { mfMetadata?: ChunkUrlMetadata })\n .mfMetadata;\n try {\n eval(`(function(exports, require, __dirname, __filename) {${data}\\n})`)(\n chunk,\n __non_webpack_require__,\n url.pathname.split('/').slice(0, -1).join('/'),\n chunkName,\n );\n callback(null, chunk);\n } catch (e) {\n callback(\n enrichChunkExecutionError(e, {\n chunkName,\n location: url.href,\n source: 'remote-url',\n content: data,\n hostName,\n resolution,\n }),\n null,\n );\n }\n })\n .catch((err: Error) => callback(err, null));\n};\n\n// Hoisted utility function to resolve URLs for chunks\nexport const resolveUrl = (\n remoteName: string,\n chunkName: string,\n): URL | null => {\n try {\n return Object.assign(new URL(chunkName, __webpack_require__.p), {\n mfMetadata: {\n chunkName,\n publicPath: __webpack_require__.p,\n remoteName,\n rootOutputDir: __webpack_require__.federation.rootOutputDir || '',\n resolvedFrom: 'public-path' as const,\n },\n });\n } catch {\n const entryUrl =\n returnFromCache(remoteName) || returnFromGlobalInstances(remoteName);\n\n if (!entryUrl) return null;\n\n const url = new URL(entryUrl);\n const path = __non_webpack_require__('path');\n\n // Extract the directory path from the remote entry URL\n // e.g., from \"http://url/static/js/remoteEntry.js\" to \"/static/js/\"\n const urlPath = url.pathname;\n const lastSlashIndex = urlPath.lastIndexOf('/');\n const directoryPath =\n lastSlashIndex >= 0 ? urlPath.substring(0, lastSlashIndex + 1) : '/';\n\n // Get rootDir from webpack configuration\n const rootDir = __webpack_require__.federation.rootOutputDir || '';\n\n // Use path.join to combine the paths properly while handling slashes\n // Convert Windows-style paths to URL-style paths\n const combinedPath = path\n .join(directoryPath, rootDir, chunkName)\n .replace(/\\\\/g, '/');\n // Create the final URL\n return Object.assign(new URL(combinedPath, url.origin), {\n mfMetadata: {\n chunkName,\n publicPath: __webpack_require__.p,\n remoteName,\n rootOutputDir: rootDir,\n resolvedFrom: 'remote-entry-fallback' as const,\n remoteEntryUrl: entryUrl,\n },\n });\n }\n};\n\n// Hoisted utility function to load chunks based on different strategies\nexport const loadChunk = (\n strategy: string,\n chunkId: string,\n rootOutputDir: string,\n callback: (err: Error | null, chunk: any) => void,\n args: any,\n): void => {\n if (strategy === 'filesystem') {\n return loadFromFs(resolveFile(rootOutputDir, chunkId), callback);\n }\n\n const url = resolveUrl(rootOutputDir, chunkId);\n if (!url) return callback(null, { modules: {}, ids: [], runtime: null });\n\n // Using fetchAndRun directly with args\n fetchAndRun(url, chunkId, callback, args);\n};\n\n// Hoisted utility function to install a chunk into webpack\nexport const installChunk = (\n chunk: any,\n installedChunks: { [key: string]: any },\n): void => {\n for (const moduleId in chunk.modules) {\n __webpack_require__.m[moduleId] = chunk.modules[moduleId];\n }\n if (chunk.runtime) chunk.runtime(__webpack_require__);\n for (const chunkId of chunk.ids) {\n if (installedChunks[chunkId]) installedChunks[chunkId][0]();\n installedChunks[chunkId] = 0;\n }\n};\n\n// Hoisted utility function to remove a chunk on fail\nexport const deleteChunk = (\n chunkId: string,\n installedChunks: { [key: string]: any },\n): boolean => {\n delete installedChunks[chunkId];\n return true;\n};\n\n// Hoisted function to set up webpack script loader\nexport const setupScriptLoader = (): void => {\n __webpack_require__.l = (\n url: string,\n done: (res: any) => void,\n key: string,\n chunkId: string,\n ): void => {\n if (!key || chunkId)\n throw new Error(`__webpack_require__.l name is required for ${url}`);\n __webpack_require__.federation.runtime\n .loadScriptNode(url, { attrs: { globalName: key } })\n .then((res) => {\n const enhancedRemote =\n __webpack_require__.federation.instance.initRawContainer(\n key,\n url,\n res,\n );\n new Function('return globalThis')()[key] = enhancedRemote;\n done(enhancedRemote);\n })\n .catch(done);\n };\n};\n\n// Hoisted function to set up chunk handler\nexport const setupChunkHandler = (\n installedChunks: { [key: string]: any },\n args: any,\n): ((chunkId: string, promises: any[]) => void) => {\n return (chunkId: string, promises: any[]): void => {\n let installedChunkData = installedChunks[chunkId];\n if (installedChunkData !== 0) {\n if (installedChunkData) {\n promises.push(installedChunkData[2]);\n } else {\n const matcher = __webpack_require__.federation.chunkMatcher\n ? __webpack_require__.federation.chunkMatcher(chunkId)\n : true;\n\n if (matcher) {\n const promise = new Promise((resolve, reject) => {\n installedChunkData = installedChunks[chunkId] = [resolve, reject];\n const fs =\n typeof process !== 'undefined'\n ? __non_webpack_require__('fs')\n : false;\n const filename =\n typeof process !== 'undefined'\n ? resolveFile(\n __webpack_require__.federation.rootOutputDir || '',\n chunkId,\n )\n : false;\n\n if (fs && fs.existsSync(filename)) {\n loadChunk(\n 'filesystem',\n chunkId,\n __webpack_require__.federation.rootOutputDir || '',\n (err, chunk) => {\n if (err)\n return deleteChunk(chunkId, installedChunks) && reject(err);\n if (chunk) installChunk(chunk, installedChunks);\n resolve(chunk);\n },\n args,\n );\n } else {\n const chunkName = __webpack_require__.u(chunkId);\n const loadingStrategy =\n typeof process === 'undefined' ? 'http-eval' : 'http-vm';\n loadChunk(\n loadingStrategy,\n chunkName,\n __webpack_require__.federation.initOptions.name,\n (err, chunk) => {\n if (err)\n return deleteChunk(chunkId, installedChunks) && reject(err);\n if (chunk) installChunk(chunk, installedChunks);\n resolve(chunk);\n },\n args,\n );\n }\n });\n promises.push((installedChunkData[2] = promise));\n } else {\n installedChunks[chunkId] = 0;\n }\n }\n }\n };\n};\n\n// Hoisted function to set up webpack require patching\nexport const setupWebpackRequirePatching = (\n handle: (chunkId: string, promises: any[]) => void,\n): void => {\n if (__webpack_require__.f) {\n if (__webpack_require__.f.require) {\n console.warn(\n '\\x1b[33m%s\\x1b[0m',\n 'CAUTION: build target is not set to \"async-node\", attempting to patch additional chunk handlers. This may not work',\n );\n __webpack_require__.f.require = handle;\n }\n\n if (__webpack_require__.f.readFileVm) {\n __webpack_require__.f.readFileVm = handle;\n }\n }\n};\n\nexport default function (): ModuleFederationRuntimePlugin {\n return {\n name: 'node-federation-plugin',\n beforeInit(args) {\n // Patch webpack chunk loading handlers\n (() => {\n // Create the chunk tracking object\n const installedChunks: { [key: string]: any } = {};\n\n // Set up webpack script loader\n setupScriptLoader();\n\n // Create and set up the chunk handler\n const handle = setupChunkHandler(installedChunks, args);\n\n // Patch webpack require\n setupWebpackRequirePatching(handle);\n })();\n\n return args;\n },\n };\n}\n"],"mappings":";AAyCA,MAAa,yCAAyB,IAAI,KAA2B;AACrE,MAAM,uBAAuB;AAY7B,MAAM,mBAAmB,YACvB,QAAQ,MAAM,GAAG,qBAAqB,CAAC,QAAQ,QAAQ,IAAI,CAAC,MAAM;AAEpE,MAAM,6BACJ,OACA,YAQU;CACV,MAAM,kBACJ,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,MAAM,CAAC;CAC3D,MAAM,UAAU,gBAAgB,QAAQ,QAAQ;CAChD,MAAM,UAAU;EACd;EACA,UAAU,QAAQ;EAClB,WAAW,QAAQ;EACnB,aAAa,QAAQ;EACtB;AAED,KAAI,QAAQ,SACV,SAAQ,KAAK,SAAS,QAAQ,WAAW;AAG3C,KAAI,QAAQ,YAAY;AACtB,UAAQ,KAAK,kBAAkB,QAAQ,WAAW,eAAe;AAEjE,MAAI,QAAQ,WAAW,WACrB,SAAQ,KAAK,WAAW,QAAQ,WAAW,aAAa;AAG1D,MAAI,QAAQ,WAAW,WACrB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/types/index.d.ts
4
+ type ModuleFederationPluginOptions = moduleFederationPlugin.ModuleFederationPluginOptions;
5
+ type RemotesObject = ModuleFederationPluginOptions['remotes'];
6
+ //#endregion
7
+ export { ModuleFederationPluginOptions, RemotesObject };
8
+ //# sourceMappingURL=index.d.mts.map
@@ -1,3 +1,8 @@
1
- import { moduleFederationPlugin } from '@module-federation/sdk';
2
- export type ModuleFederationPluginOptions = moduleFederationPlugin.ModuleFederationPluginOptions;
3
- export type RemotesObject = ModuleFederationPluginOptions['remotes'];
1
+ import { moduleFederationPlugin } from "@module-federation/sdk";
2
+
3
+ //#region src/types/index.d.ts
4
+ type ModuleFederationPluginOptions = moduleFederationPlugin.ModuleFederationPluginOptions;
5
+ type RemotesObject = ModuleFederationPluginOptions['remotes'];
6
+ //#endregion
7
+ export { ModuleFederationPluginOptions, RemotesObject };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,17 @@
1
+ import { RemoteInfo } from "@module-federation/runtime/types";
2
+
3
+ //#region src/utils/flush-chunks.d.ts
4
+ /**
5
+ * Initialize usedChunks and share it globally.
6
+ * @type {Set}
7
+ */
8
+ declare const usedChunks: any;
9
+ declare const getAllKnownRemotes: () => Record<string, RemoteInfo>;
10
+ /**
11
+ * Flush the chunks and return a deduplicated array of chunks.
12
+ * @returns {Promise<Array>} A promise that resolves to an array of deduplicated chunks.
13
+ */
14
+ declare const flushChunks: () => Promise<string[]>;
15
+ //#endregion
16
+ export { flushChunks, getAllKnownRemotes, usedChunks };
17
+ //# sourceMappingURL=flush-chunks.d.mts.map
@@ -1,11 +1,17 @@
1
+ import { RemoteInfo } from "@module-federation/runtime/types";
2
+
3
+ //#region src/utils/flush-chunks.d.ts
1
4
  /**
2
5
  * Initialize usedChunks and share it globally.
3
6
  * @type {Set}
4
7
  */
5
- export declare const usedChunks: any;
6
- export declare const getAllKnownRemotes: () => {};
8
+ declare const usedChunks: any;
9
+ declare const getAllKnownRemotes: () => Record<string, RemoteInfo>;
7
10
  /**
8
11
  * Flush the chunks and return a deduplicated array of chunks.
9
12
  * @returns {Promise<Array>} A promise that resolves to an array of deduplicated chunks.
10
13
  */
11
- export declare const flushChunks: () => Promise<unknown[]>;
14
+ declare const flushChunks: () => Promise<string[]>;
15
+ //#endregion
16
+ export { flushChunks, getAllKnownRemotes, usedChunks };
17
+ //# sourceMappingURL=flush-chunks.d.ts.map