@module-federation/node 2.0.1 → 2.0.2-beta.2
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.
- package/CHANGELOG.md +43 -0
- package/README.md +27 -0
- package/jest.config.d.ts +11 -0
- package/jest.config.js +19 -0
- package/jest.config.js.map +1 -0
- package/package.json +3 -2
- package/src/filesystem/DynamicFilesystemRuntimeModule.d.ts +6 -0
- package/src/filesystem/DynamicFilesystemRuntimeModule.js +30 -0
- package/src/filesystem/DynamicFilesystemRuntimeModule.js.map +1 -0
- package/src/filesystem/stratagies.d.ts +11 -0
- package/src/filesystem/stratagies.js +105 -0
- package/src/filesystem/stratagies.js.map +1 -0
- package/src/plugins/CommonJsChunkLoadingPlugin.js +29 -2
- package/src/plugins/CommonJsChunkLoadingPlugin.js.map +1 -1
- package/src/plugins/{LoadFileChunkLoadingRuntimeModule.d.ts → DynamicFilesystemChunkLoadingRuntimeModule.d.ts} +8 -4
- package/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js +145 -0
- package/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js.map +1 -0
- package/src/plugins/FederationModuleInfoRuntimeModule.d.ts +9 -0
- package/src/plugins/FederationModuleInfoRuntimeModule.js +55 -0
- package/src/plugins/FederationModuleInfoRuntimeModule.js.map +1 -0
- package/src/plugins/NodeFederationPlugin.d.ts +18 -25
- package/src/plugins/NodeFederationPlugin.js +41 -102
- package/src/plugins/NodeFederationPlugin.js.map +1 -1
- package/src/plugins/RemotePublicPathRuntimeModule.d.ts +10 -0
- package/src/plugins/RemotePublicPathRuntimeModule.js +86 -0
- package/src/plugins/RemotePublicPathRuntimeModule.js.map +1 -0
- package/src/plugins/StreamingTargetPlugin.js +6 -7
- package/src/plugins/StreamingTargetPlugin.js.map +1 -1
- package/src/plugins/UniversalFederationPlugin.js +2 -1
- package/src/plugins/UniversalFederationPlugin.js.map +1 -1
- package/src/plugins/parts.d.ts +50 -0
- package/src/plugins/parts.js +316 -0
- package/src/plugins/parts.js.map +1 -0
- package/src/plugins/LoadFileChunkLoadingRuntimeModule.js +0 -434
- package/src/plugins/LoadFileChunkLoadingRuntimeModule.js.map +0 -1
- package/src/plugins/loadScript.d.ts +0 -7
- package/src/plugins/loadScript.js +0 -116
- package/src/plugins/loadScript.js.map +0 -1
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateExternalInstallChunkCode = exports.generateInstallChunk = exports.generateLoadScript = exports.handleOnChunkLoad = exports.generateHmrManifestCode = exports.generateLoadingCode = exports.getInitialChunkIds = exports.generateHmrCode = void 0;
|
|
4
|
+
const webpack_1 = require("webpack");
|
|
5
|
+
/**
|
|
6
|
+
* Generates the hot module replacement (HMR) code.
|
|
7
|
+
* @param {boolean} withHmr - Flag indicating whether HMR is enabled.
|
|
8
|
+
* @param {string} rootOutputDir - The root output directory.
|
|
9
|
+
* @returns {string} - The generated HMR code.
|
|
10
|
+
*/
|
|
11
|
+
function generateHmrCode(withHmr, rootOutputDir) {
|
|
12
|
+
if (!withHmr) {
|
|
13
|
+
return '// no HMR';
|
|
14
|
+
}
|
|
15
|
+
return webpack_1.Template.asString([
|
|
16
|
+
// Function to load updated chunk
|
|
17
|
+
'function loadUpdateChunk(chunkId, updatedModulesList) {',
|
|
18
|
+
webpack_1.Template.indent([
|
|
19
|
+
'return new Promise(function(resolve, reject) {',
|
|
20
|
+
webpack_1.Template.indent([
|
|
21
|
+
// Construct filename for the updated chunk
|
|
22
|
+
`var filename = require('path').join(__dirname, ${JSON.stringify(rootOutputDir)} + ${webpack_1.RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId));`,
|
|
23
|
+
// Read the updated chunk file
|
|
24
|
+
"require('fs').readFile(filename, 'utf-8', function(err, content) {",
|
|
25
|
+
webpack_1.Template.indent([
|
|
26
|
+
'if(err) return reject(err);',
|
|
27
|
+
'var update = {};',
|
|
28
|
+
// Execute the updated chunk in the current context
|
|
29
|
+
"require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)" +
|
|
30
|
+
"(update, require, require('path').dirname(filename), filename);",
|
|
31
|
+
'var updatedModules = update.modules;',
|
|
32
|
+
'var runtime = update.runtime;',
|
|
33
|
+
// Iterate over the updated modules
|
|
34
|
+
'for(var moduleId in updatedModules) {',
|
|
35
|
+
webpack_1.Template.indent([
|
|
36
|
+
`if(${webpack_1.RuntimeGlobals.hasOwnProperty}(updatedModules, moduleId)) {`,
|
|
37
|
+
webpack_1.Template.indent([
|
|
38
|
+
`currentUpdate[moduleId] = updatedModules[moduleId];`,
|
|
39
|
+
'if(updatedModulesList) updatedModulesList.push(moduleId);',
|
|
40
|
+
]),
|
|
41
|
+
'}',
|
|
42
|
+
]),
|
|
43
|
+
'}',
|
|
44
|
+
'if(runtime) currentUpdateRuntime.push(runtime);',
|
|
45
|
+
'resolve();',
|
|
46
|
+
]),
|
|
47
|
+
'});',
|
|
48
|
+
]),
|
|
49
|
+
'});',
|
|
50
|
+
]),
|
|
51
|
+
'}',
|
|
52
|
+
'',
|
|
53
|
+
// Replace placeholders in the HMR runtime code
|
|
54
|
+
webpack_1.Template.getFunctionContent(
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
56
|
+
require('webpack/lib/hmr/JavascriptHotModuleReplacement.runtime.js'))
|
|
57
|
+
.replace(/\$key\$/g, 'readFileVm')
|
|
58
|
+
.replace(/\$installedChunks\$/g, 'installedChunks')
|
|
59
|
+
.replace(/\$loadUpdateChunk\$/g, 'loadUpdateChunk')
|
|
60
|
+
.replace(/\$moduleCache\$/g, webpack_1.RuntimeGlobals.moduleCache)
|
|
61
|
+
.replace(/\$moduleFactories\$/g, webpack_1.RuntimeGlobals.moduleFactories)
|
|
62
|
+
.replace(/\$ensureChunkHandlers\$/g, webpack_1.RuntimeGlobals.ensureChunkHandlers)
|
|
63
|
+
.replace(/\$hasOwnProperty\$/g, webpack_1.RuntimeGlobals.hasOwnProperty)
|
|
64
|
+
.replace(/\$hmrModuleData\$/g, webpack_1.RuntimeGlobals.hmrModuleData)
|
|
65
|
+
.replace(/\$hmrDownloadUpdateHandlers\$/g, webpack_1.RuntimeGlobals.hmrDownloadUpdateHandlers)
|
|
66
|
+
.replace(/\$hmrInvalidateModuleHandlers\$/g, webpack_1.RuntimeGlobals.hmrInvalidateModuleHandlers),
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
exports.generateHmrCode = generateHmrCode;
|
|
70
|
+
/**
|
|
71
|
+
* Retrieves the initial chunk IDs.
|
|
72
|
+
* @param {Chunk} chunk - The chunk object.
|
|
73
|
+
* @param {ChunkGraph} chunkGraph - The chunk graph object.
|
|
74
|
+
* @param {any} chunkHasJs - Function to check if a chunk has JavaScript.
|
|
75
|
+
* @returns {Set} - The set of initial chunk IDs.
|
|
76
|
+
*/
|
|
77
|
+
function getInitialChunkIds(chunk, chunkGraph, chunkHasJs) {
|
|
78
|
+
const initialChunkIds = new Set(chunk.ids);
|
|
79
|
+
for (const c of chunk.getAllInitialChunks()) {
|
|
80
|
+
if (c === chunk || chunkHasJs(c, chunkGraph))
|
|
81
|
+
continue;
|
|
82
|
+
if (c.ids) {
|
|
83
|
+
for (const id of c.ids)
|
|
84
|
+
initialChunkIds.add(id);
|
|
85
|
+
}
|
|
86
|
+
for (const c of chunk.getAllAsyncChunks()) {
|
|
87
|
+
if (c === chunk || chunkHasJs(c, chunkGraph))
|
|
88
|
+
continue;
|
|
89
|
+
if (c.ids) {
|
|
90
|
+
for (const id of c.ids)
|
|
91
|
+
initialChunkIds.add(id);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return initialChunkIds;
|
|
96
|
+
}
|
|
97
|
+
exports.getInitialChunkIds = getInitialChunkIds;
|
|
98
|
+
/**
|
|
99
|
+
* Generates the loading code for chunks.
|
|
100
|
+
* @param {boolean} withLoading - Flag indicating whether chunk loading is enabled.
|
|
101
|
+
* @param {string} fn - The function name.
|
|
102
|
+
* @param {any} hasJsMatcher - Function to check if a chunk has JavaScript.
|
|
103
|
+
* @param {string} rootOutputDir - The root output directory.
|
|
104
|
+
* @param {Record<string, string>} remotes - The remotes object.
|
|
105
|
+
* @param {string | undefined} name - The name of the chunk.
|
|
106
|
+
* @returns {string} - The generated loading code.
|
|
107
|
+
*/
|
|
108
|
+
function generateLoadingCode(withLoading, fn, hasJsMatcher, rootOutputDir, remotes, name) {
|
|
109
|
+
if (!withLoading) {
|
|
110
|
+
return '// no chunk loading';
|
|
111
|
+
}
|
|
112
|
+
return webpack_1.Template.asString([
|
|
113
|
+
// `if(!globalThis.__remote_scope__) globalThis.__remote_scope__ = ${RuntimeGlobals.require}.federation`,
|
|
114
|
+
'// Dynamic filesystem chunk loading for javascript',
|
|
115
|
+
`${fn}.readFileVm = function(chunkId, promises) {`,
|
|
116
|
+
hasJsMatcher !== false
|
|
117
|
+
? webpack_1.Template.indent([
|
|
118
|
+
'var installedChunkData = installedChunks[chunkId];',
|
|
119
|
+
'if(installedChunkData !== 0) { // 0 means "already installed".',
|
|
120
|
+
webpack_1.Template.indent([
|
|
121
|
+
'// array of [resolve, reject, promise] means "currently loading"',
|
|
122
|
+
'if(installedChunkData) {',
|
|
123
|
+
webpack_1.Template.indent(['promises.push(installedChunkData[2]);']),
|
|
124
|
+
'} else {',
|
|
125
|
+
webpack_1.Template.indent([
|
|
126
|
+
hasJsMatcher === true
|
|
127
|
+
? 'if(true) { // all chunks have JS'
|
|
128
|
+
: `if(${hasJsMatcher('chunkId')}) {`,
|
|
129
|
+
webpack_1.Template.indent([
|
|
130
|
+
'// load the chunk and return promise to it',
|
|
131
|
+
'var promise = new Promise(async function(resolve, reject) {',
|
|
132
|
+
webpack_1.Template.indent([
|
|
133
|
+
'installedChunkData = installedChunks[chunkId] = [resolve, reject];',
|
|
134
|
+
'function installChunkCallback(error,chunk){',
|
|
135
|
+
webpack_1.Template.indent([
|
|
136
|
+
'if(error) return reject(error);',
|
|
137
|
+
'installChunk(chunk);',
|
|
138
|
+
]),
|
|
139
|
+
'}',
|
|
140
|
+
'var fs = typeof process !== "undefined" ? require(\'fs\') : false;',
|
|
141
|
+
`var filename = typeof process !== "undefined" ? require('path').join(__dirname, ${JSON.stringify(rootOutputDir)} + ${webpack_1.RuntimeGlobals.getChunkScriptFilename}(chunkId)) : false;`,
|
|
142
|
+
'if(fs && fs.existsSync(filename)) {',
|
|
143
|
+
webpack_1.Template.indent([
|
|
144
|
+
`loadChunkStrategy('filesystem', chunkId, ${JSON.stringify(rootOutputDir)}, remotes, installChunkCallback);`,
|
|
145
|
+
]),
|
|
146
|
+
'} else { ',
|
|
147
|
+
webpack_1.Template.indent([
|
|
148
|
+
`var remotes = ${JSON.stringify(Object.values(remotes).reduce((acc, remote) => {
|
|
149
|
+
const [global, url] = remote.split('@');
|
|
150
|
+
acc[global] = url;
|
|
151
|
+
return acc;
|
|
152
|
+
}, {}))};`,
|
|
153
|
+
`var requestedRemote = globalThis.__remote_scope__[${JSON.stringify(name)}]`,
|
|
154
|
+
"if(typeof requestedRemote === 'function'){",
|
|
155
|
+
webpack_1.Template.indent('requestedRemote = await requestedRemote()'),
|
|
156
|
+
'}',
|
|
157
|
+
`var chunkName = ${webpack_1.RuntimeGlobals.getChunkScriptFilename}(chunkId);`,
|
|
158
|
+
"const loadingStrategy = typeof process !== 'undefined' ? 'http-vm' : 'http-eval';",
|
|
159
|
+
`loadChunkStrategy(loadingStrategy, chunkName,${JSON.stringify(name)}, globalThis.__remote_scope__,installChunkCallback);`,
|
|
160
|
+
]),
|
|
161
|
+
'}',
|
|
162
|
+
]),
|
|
163
|
+
'});',
|
|
164
|
+
'promises.push(installedChunkData[2] = promise);',
|
|
165
|
+
]),
|
|
166
|
+
'} else installedChunks[chunkId] = 0;',
|
|
167
|
+
]),
|
|
168
|
+
'}',
|
|
169
|
+
]),
|
|
170
|
+
'}',
|
|
171
|
+
])
|
|
172
|
+
: webpack_1.Template.indent(['installedChunks[chunkId] = 0;']),
|
|
173
|
+
'};',
|
|
174
|
+
]);
|
|
175
|
+
}
|
|
176
|
+
exports.generateLoadingCode = generateLoadingCode;
|
|
177
|
+
/**
|
|
178
|
+
* Generates the HMR manifest code.
|
|
179
|
+
* @param {boolean} withHmrManifest - Flag indicating whether HMR manifest is enabled.
|
|
180
|
+
* @param {string} rootOutputDir - The root output directory.
|
|
181
|
+
* @returns {string} - The generated HMR manifest code.
|
|
182
|
+
*/
|
|
183
|
+
function generateHmrManifestCode(withHmrManifest, rootOutputDir) {
|
|
184
|
+
if (!withHmrManifest) {
|
|
185
|
+
return '// no HMR manifest';
|
|
186
|
+
}
|
|
187
|
+
return webpack_1.Template.asString([
|
|
188
|
+
`${webpack_1.RuntimeGlobals.hmrDownloadManifest} = function() {`,
|
|
189
|
+
webpack_1.Template.indent([
|
|
190
|
+
'return new Promise(function(resolve, reject) {',
|
|
191
|
+
webpack_1.Template.indent([
|
|
192
|
+
`var filename = require('path').join(__dirname, ${JSON.stringify(rootOutputDir)} + ${webpack_1.RuntimeGlobals.getUpdateManifestFilename}());`,
|
|
193
|
+
"require('fs').readFile(filename, 'utf-8', function(err, content) {",
|
|
194
|
+
webpack_1.Template.indent([
|
|
195
|
+
'if(err) {',
|
|
196
|
+
webpack_1.Template.indent([
|
|
197
|
+
'if(err.code === "ENOENT") return resolve();',
|
|
198
|
+
'return reject(err);',
|
|
199
|
+
]),
|
|
200
|
+
'}',
|
|
201
|
+
'try { resolve(JSON.parse(content)); }',
|
|
202
|
+
'catch(e) { reject(e); }',
|
|
203
|
+
]),
|
|
204
|
+
'});',
|
|
205
|
+
]),
|
|
206
|
+
'});',
|
|
207
|
+
]),
|
|
208
|
+
'}',
|
|
209
|
+
]);
|
|
210
|
+
}
|
|
211
|
+
exports.generateHmrManifestCode = generateHmrManifestCode;
|
|
212
|
+
/**
|
|
213
|
+
* Handles the on chunk load event.
|
|
214
|
+
* @param {boolean} withOnChunkLoad - Flag indicating whether on chunk load event is enabled.
|
|
215
|
+
* @param {any} runtimeTemplate - The runtime template.
|
|
216
|
+
* @returns {string} - The generated on chunk load event handler.
|
|
217
|
+
*/
|
|
218
|
+
function handleOnChunkLoad(withOnChunkLoad, runtimeTemplate) {
|
|
219
|
+
if (withOnChunkLoad) {
|
|
220
|
+
return `${webpack_1.RuntimeGlobals.onChunksLoaded}.readFileVm = ${runtimeTemplate.returningFunction('installedChunks[chunkId] === 0', 'chunkId')};`;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
return '// no on chunks loaded';
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
exports.handleOnChunkLoad = handleOnChunkLoad;
|
|
227
|
+
/**
|
|
228
|
+
* Generates the load script for server-side execution. This function creates a script that loads a remote module
|
|
229
|
+
* and executes it in the current context. It supports both browser and Node.js environments.
|
|
230
|
+
* @param {any} runtimeTemplate - The runtime template used to generate the load script.
|
|
231
|
+
* @returns {string} - The generated load script.
|
|
232
|
+
*/
|
|
233
|
+
function generateLoadScript(runtimeTemplate) {
|
|
234
|
+
return webpack_1.Template.asString([
|
|
235
|
+
'// load script equivalent for server side',
|
|
236
|
+
`${webpack_1.RuntimeGlobals.loadScript} = ${runtimeTemplate.basicFunction('url,callback,chunkId', [
|
|
237
|
+
webpack_1.Template.indent([
|
|
238
|
+
`async function executeLoad(url, callback, name) {
|
|
239
|
+
console.log('in execute load', name, url)
|
|
240
|
+
if (!name) {
|
|
241
|
+
throw new Error('__webpack_require__.l name is required for ' + url);
|
|
242
|
+
}
|
|
243
|
+
var remoteName = name;
|
|
244
|
+
if(name.includes('__remote_scope__')) {
|
|
245
|
+
remoteName = name.split('__remote_scope__.')[1]
|
|
246
|
+
}
|
|
247
|
+
if (typeof globalThis.__remote_scope__[remoteName] !== 'undefined') return callback(globalThis.__remote_scope__[remoteName]);
|
|
248
|
+
globalThis.__remote_scope__._config[remoteName] = url;
|
|
249
|
+
try {
|
|
250
|
+
const scriptContent = await (globalThis.webpackChunkLoad || globalThis.fetch || require("node-fetch"))(url).then(res => res.text());
|
|
251
|
+
let remote;
|
|
252
|
+
if (typeof process !== 'undefined') {
|
|
253
|
+
const vm = require('vm');
|
|
254
|
+
const m = require('module');
|
|
255
|
+
const remoteCapsule = vm.runInThisContext(m.wrap(scriptContent), 'node-federation-loader-' + name + '.vm')
|
|
256
|
+
const exp = {};
|
|
257
|
+
remote = {exports:{}};
|
|
258
|
+
remoteCapsule(exp,require,remote,'node-federation-loader-' + name + '.vm',__dirname);
|
|
259
|
+
remote = remote.exports || remote;
|
|
260
|
+
} else {
|
|
261
|
+
remote = eval('let module = {};' + scriptContent + '\\nmodule.exports')
|
|
262
|
+
}
|
|
263
|
+
globalThis.__remote_scope__[remoteName] = remote[name] || remote;
|
|
264
|
+
globalThis.__remote_scope__._config[remoteName] = url;
|
|
265
|
+
callback(globalThis.__remote_scope__[name])
|
|
266
|
+
} catch (e) {
|
|
267
|
+
e.target = {src: url};
|
|
268
|
+
callback(e);
|
|
269
|
+
}
|
|
270
|
+
}`,
|
|
271
|
+
`executeLoad(url,callback,chunkId)`,
|
|
272
|
+
]),
|
|
273
|
+
])}`,
|
|
274
|
+
]);
|
|
275
|
+
}
|
|
276
|
+
exports.generateLoadScript = generateLoadScript;
|
|
277
|
+
function generateInstallChunk(runtimeTemplate, withOnChunkLoad) {
|
|
278
|
+
return `var installChunk = ${runtimeTemplate.basicFunction('chunk', [
|
|
279
|
+
'var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;',
|
|
280
|
+
'for(var moduleId in moreModules) {',
|
|
281
|
+
webpack_1.Template.indent([
|
|
282
|
+
`if(${webpack_1.RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`,
|
|
283
|
+
webpack_1.Template.indent([
|
|
284
|
+
`${webpack_1.RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];`,
|
|
285
|
+
]),
|
|
286
|
+
'}',
|
|
287
|
+
]),
|
|
288
|
+
'}',
|
|
289
|
+
`if(runtime) runtime(__webpack_require__);`,
|
|
290
|
+
'for(var i = 0; i < chunkIds.length; i++) {',
|
|
291
|
+
webpack_1.Template.indent([
|
|
292
|
+
'if(installedChunks[chunkIds[i]]) {',
|
|
293
|
+
webpack_1.Template.indent(['installedChunks[chunkIds[i]][0]();']),
|
|
294
|
+
'}',
|
|
295
|
+
'installedChunks[chunkIds[i]] = 0;',
|
|
296
|
+
]),
|
|
297
|
+
'}',
|
|
298
|
+
withOnChunkLoad ? `${webpack_1.RuntimeGlobals.onChunksLoaded}();` : '',
|
|
299
|
+
])};`;
|
|
300
|
+
}
|
|
301
|
+
exports.generateInstallChunk = generateInstallChunk;
|
|
302
|
+
function generateExternalInstallChunkCode(withExternalInstallChunk, debug) {
|
|
303
|
+
if (!withExternalInstallChunk) {
|
|
304
|
+
return '// no external install chunk';
|
|
305
|
+
}
|
|
306
|
+
return webpack_1.Template.asString([
|
|
307
|
+
'module.exports = __webpack_require__;',
|
|
308
|
+
`${webpack_1.RuntimeGlobals.externalInstallChunk} = function(){`,
|
|
309
|
+
debug
|
|
310
|
+
? `console.debug('node: webpack installing to install chunk id:', arguments['0'].id);`
|
|
311
|
+
: '',
|
|
312
|
+
`return installChunk.apply(this, arguments)};`,
|
|
313
|
+
]);
|
|
314
|
+
}
|
|
315
|
+
exports.generateExternalInstallChunkCode = generateExternalInstallChunkCode;
|
|
316
|
+
//# sourceMappingURL=parts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../../../packages/node/src/plugins/parts.ts"],"names":[],"mappings":";;;AAAA,qCAAsE;AAEtE;;;;;GAKG;AACH,SAAgB,eAAe,CAC7B,OAAgB,EAChB,aAAqB;IAErB,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,WAAW,CAAC;KACpB;IAED,OAAO,kBAAQ,CAAC,QAAQ,CAAC;QACvB,iCAAiC;QACjC,yDAAyD;QACzD,kBAAQ,CAAC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