@module-federation/node 2.7.32 → 2.7.33
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/dist/_virtual/_rolldown/runtime.js +31 -0
- package/dist/_virtual/_rolldown/runtime.mjs +8 -0
- package/dist/plugins/ChunkCorrelationPlugin.js +308 -0
- package/dist/plugins/ChunkCorrelationPlugin.js.map +1 -0
- package/dist/plugins/ChunkCorrelationPlugin.mjs +305 -0
- package/dist/plugins/ChunkCorrelationPlugin.mjs.map +1 -0
- package/dist/src/filesystem/stratagies.d.mts +21 -0
- package/dist/src/filesystem/stratagies.d.ts +10 -7
- package/dist/src/filesystem/stratagies.js +97 -116
- package/dist/src/filesystem/stratagies.js.map +1 -1
- package/dist/src/filesystem/stratagies.mjs +103 -0
- package/dist/src/filesystem/stratagies.mjs.map +1 -0
- package/dist/src/index.d.mts +8 -0
- package/dist/src/index.d.ts +8 -7
- package/dist/src/index.js +16 -22
- package/dist/src/index.mjs +9 -0
- package/dist/src/plugins/AutomaticPublicPathPlugin.d.mts +12 -0
- package/dist/src/plugins/AutomaticPublicPathPlugin.d.ts +9 -7
- package/dist/src/plugins/AutomaticPublicPathPlugin.js +26 -35
- package/dist/src/plugins/AutomaticPublicPathPlugin.js.map +1 -1
- package/dist/src/plugins/AutomaticPublicPathPlugin.mjs +28 -0
- package/dist/src/plugins/AutomaticPublicPathPlugin.mjs.map +1 -0
- package/dist/src/plugins/ChunkCorrelationPlugin.d.mts +5 -0
- package/dist/src/plugins/ChunkCorrelationPlugin.d.ts +4 -61
- package/dist/src/plugins/ChunkCorrelationPlugin.js +8 -440
- package/dist/src/plugins/ChunkCorrelationPlugin.js.map +1 -1
- package/dist/src/plugins/ChunkCorrelationPlugin.mjs +8 -0
- package/dist/src/plugins/ChunkCorrelationPlugin.mjs.map +1 -0
- package/dist/src/plugins/CommonJsChunkLoadingPlugin.d.mts +21 -0
- package/dist/src/plugins/CommonJsChunkLoadingPlugin.d.ts +16 -13
- package/dist/src/plugins/CommonJsChunkLoadingPlugin.js +68 -118
- package/dist/src/plugins/CommonJsChunkLoadingPlugin.js.map +1 -1
- package/dist/src/plugins/CommonJsChunkLoadingPlugin.mjs +70 -0
- package/dist/src/plugins/CommonJsChunkLoadingPlugin.mjs.map +1 -0
- package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.d.mts +46 -0
- package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.d.ts +39 -34
- package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js +110 -126
- package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js.map +1 -1
- package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.mjs +111 -0
- package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.mjs.map +1 -0
- package/dist/src/plugins/EntryChunkTrackerPlugin.d.mts +17 -0
- package/dist/src/plugins/EntryChunkTrackerPlugin.d.ts +14 -10
- package/dist/src/plugins/EntryChunkTrackerPlugin.js +30 -32
- package/dist/src/plugins/EntryChunkTrackerPlugin.js.map +1 -1
- package/dist/src/plugins/EntryChunkTrackerPlugin.mjs +38 -0
- package/dist/src/plugins/EntryChunkTrackerPlugin.mjs.map +1 -0
- package/dist/src/plugins/NodeFederationPlugin.d.mts +54 -0
- package/dist/src/plugins/NodeFederationPlugin.d.ts +33 -26
- package/dist/src/plugins/NodeFederationPlugin.js +69 -84
- package/dist/src/plugins/NodeFederationPlugin.js.map +1 -1
- package/dist/src/plugins/NodeFederationPlugin.mjs +70 -0
- package/dist/src/plugins/NodeFederationPlugin.mjs.map +1 -0
- package/dist/src/plugins/RemotePublicPathRuntimeModule.d.mts +15 -0
- package/dist/src/plugins/RemotePublicPathRuntimeModule.d.ts +12 -8
- package/dist/src/plugins/RemotePublicPathRuntimeModule.js +34 -35
- package/dist/src/plugins/RemotePublicPathRuntimeModule.js.map +1 -1
- package/dist/src/plugins/RemotePublicPathRuntimeModule.mjs +132 -0
- package/dist/src/plugins/RemotePublicPathRuntimeModule.mjs.map +1 -0
- package/dist/src/plugins/StreamingTargetPlugin.d.mts +32 -0
- package/dist/src/plugins/StreamingTargetPlugin.d.ts +19 -16
- package/dist/src/plugins/StreamingTargetPlugin.js +43 -56
- package/dist/src/plugins/StreamingTargetPlugin.js.map +1 -1
- package/dist/src/plugins/StreamingTargetPlugin.mjs +46 -0
- package/dist/src/plugins/StreamingTargetPlugin.mjs.map +1 -0
- package/dist/src/plugins/UniversalFederationPlugin.d.mts +49 -0
- package/dist/src/plugins/UniversalFederationPlugin.d.ts +26 -23
- package/dist/src/plugins/UniversalFederationPlugin.js +58 -81
- package/dist/src/plugins/UniversalFederationPlugin.js.map +1 -1
- package/dist/src/plugins/UniversalFederationPlugin.mjs +61 -0
- package/dist/src/plugins/UniversalFederationPlugin.mjs.map +1 -0
- package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.d.mts +9 -0
- package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.d.ts +6 -3
- package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.js +17 -17
- package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.js.map +1 -1
- package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.mjs +25 -0
- package/dist/src/plugins/UniverseEntryChunkTrackerPlugin.mjs.map +1 -0
- package/dist/src/plugins/webpackChunkUtilities.d.mts +55 -0
- package/dist/src/plugins/webpackChunkUtilities.d.ts +14 -9
- package/dist/src/plugins/webpackChunkUtilities.js +195 -257
- package/dist/src/plugins/webpackChunkUtilities.js.map +1 -1
- package/dist/src/plugins/webpackChunkUtilities.mjs +234 -0
- package/dist/src/plugins/webpackChunkUtilities.mjs.map +1 -0
- package/dist/src/recordDynamicRemoteEntryHashPlugin.d.mts +7 -0
- package/dist/src/recordDynamicRemoteEntryHashPlugin.d.ts +5 -2
- package/dist/src/recordDynamicRemoteEntryHashPlugin.js +24 -61
- package/dist/src/recordDynamicRemoteEntryHashPlugin.js.map +1 -1
- package/dist/src/recordDynamicRemoteEntryHashPlugin.mjs +26 -0
- package/dist/src/recordDynamicRemoteEntryHashPlugin.mjs.map +1 -0
- package/dist/src/runtimePlugin.d.mts +27 -0
- package/dist/src/runtimePlugin.d.ts +24 -19
- package/dist/src/runtimePlugin.js +157 -252
- package/dist/src/runtimePlugin.js.map +1 -1
- package/dist/src/runtimePlugin.mjs +169 -0
- package/dist/src/runtimePlugin.mjs.map +1 -0
- package/dist/src/types/index.d.mts +8 -0
- package/dist/src/types/index.d.ts +8 -3
- package/dist/src/types/index.js +1 -3
- package/dist/src/types/index.mjs +1 -0
- package/dist/src/utils/flush-chunks.d.mts +15 -0
- package/dist/src/utils/flush-chunks.d.ts +7 -3
- package/dist/src/utils/flush-chunks.js +87 -161
- package/dist/src/utils/flush-chunks.js.map +1 -1
- package/dist/src/utils/flush-chunks.mjs +99 -0
- package/dist/src/utils/flush-chunks.mjs.map +1 -0
- package/dist/src/utils/hot-reload.d.mts +16 -0
- package/dist/src/utils/hot-reload.d.ts +14 -10
- package/dist/src/utils/hot-reload.js +177 -264
- package/dist/src/utils/hot-reload.js.map +1 -1
- package/dist/src/utils/hot-reload.mjs +194 -0
- package/dist/src/utils/hot-reload.mjs.map +1 -0
- package/dist/src/utils/index.d.mts +3 -0
- package/dist/src/utils/index.d.ts +3 -2
- package/dist/src/utils/index.js +15 -19
- package/dist/src/utils/index.mjs +4 -0
- package/package.json +59 -15
- package/dist/jest.config.d.ts +0 -11
- package/dist/jest.config.js +0 -19
- package/dist/jest.config.js.map +0 -1
- package/dist/package.json +0 -82
- package/dist/src/index.js.map +0 -1
- package/dist/src/types/index.js.map +0 -1
- package/dist/src/utils/index.js.map +0 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
//#region src/utils/flush-chunks.ts
|
|
2
|
+
if (!globalThis.usedChunks) globalThis.usedChunks = /* @__PURE__ */ new Set();
|
|
3
|
+
/**
|
|
4
|
+
* Initialize usedChunks and share it globally.
|
|
5
|
+
* @type {Set}
|
|
6
|
+
*/
|
|
7
|
+
const { usedChunks } = globalThis;
|
|
8
|
+
/**
|
|
9
|
+
* Load hostStats from the JSON file.
|
|
10
|
+
* @returns {object} hostStats - An object containing host stats data.
|
|
11
|
+
*/
|
|
12
|
+
const loadHostStats = () => {
|
|
13
|
+
try {
|
|
14
|
+
return __non_webpack_require__("../federated-stats.json");
|
|
15
|
+
} catch (e) {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const getAllKnownRemotes = function() {
|
|
20
|
+
const federationController = new Function("return globalThis")().__FEDERATION__;
|
|
21
|
+
if (!federationController || !federationController.__INSTANCES__) return {};
|
|
22
|
+
var collected = {};
|
|
23
|
+
for (const instance of federationController.__INSTANCES__) for (const [key, cacheModule] of instance.moduleCache) if (cacheModule.remoteInfo) collected[cacheModule.remoteInfo.name] = cacheModule.remoteInfo;
|
|
24
|
+
return collected;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Create a shareMap based on the loaded modules.
|
|
28
|
+
* @returns {object} shareMap - An object containing the shareMap data.
|
|
29
|
+
*/
|
|
30
|
+
const createShareMap = () => {
|
|
31
|
+
if (__webpack_share_scopes__?.default) return Object.keys(__webpack_share_scopes__.default).reduce((acc, key) => {
|
|
32
|
+
const shareMap = __webpack_share_scopes__.default[key];
|
|
33
|
+
if (!shareMap || typeof shareMap !== "object") return acc;
|
|
34
|
+
const loadedModules = Object.values(shareMap).filter((sharedModule) => sharedModule.loaded).map((sharedModule) => sharedModule.from);
|
|
35
|
+
if (loadedModules.length > 0) acc[key] = loadedModules;
|
|
36
|
+
return acc;
|
|
37
|
+
}, {});
|
|
38
|
+
return {};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Process a single chunk and return an array of updated chunks.
|
|
42
|
+
* @param {string} chunk - A chunk string containing remote and request data.
|
|
43
|
+
* @param {object} shareMap - An object containing the shareMap data.
|
|
44
|
+
* @param {object} hostStats - An object containing host stats data.
|
|
45
|
+
* @returns {Promise<Array>} A promise that resolves to an array of updated chunks.
|
|
46
|
+
*/
|
|
47
|
+
const processChunk = async (chunk, shareMap, hostStats) => {
|
|
48
|
+
const chunks = /* @__PURE__ */ new Set();
|
|
49
|
+
const [remote, req] = chunk.split("/");
|
|
50
|
+
const request = "./" + req;
|
|
51
|
+
const knownRemotes = getAllKnownRemotes();
|
|
52
|
+
if (!knownRemotes[remote]) {
|
|
53
|
+
console.error(`flush chunks: Remote ${remote} is not defined in the global config`);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const remoteName = new URL(knownRemotes[remote].entry).pathname.split("/").pop();
|
|
58
|
+
const statsFile = knownRemotes[remote].entry.replace(remoteName, "federated-stats.json").replace("ssr", "chunks");
|
|
59
|
+
let stats = {};
|
|
60
|
+
try {
|
|
61
|
+
stats = await fetch(statsFile).then((res) => res.json());
|
|
62
|
+
} catch (e) {
|
|
63
|
+
console.error("flush error", e);
|
|
64
|
+
}
|
|
65
|
+
const [prefix] = knownRemotes[remote].entry.split("static/");
|
|
66
|
+
if (stats.federatedModules) stats.federatedModules.forEach((modules) => {
|
|
67
|
+
if (modules.exposes?.[request]) modules.exposes[request].forEach((chunk) => {
|
|
68
|
+
chunks.add([prefix, chunk].join(""));
|
|
69
|
+
Object.values(chunk).forEach((chunk) => {
|
|
70
|
+
if (chunk.files) chunk.files.forEach((file) => {
|
|
71
|
+
chunks.add(prefix + file);
|
|
72
|
+
});
|
|
73
|
+
if (chunk.requiredModules) chunk.requiredModules.forEach((module) => {
|
|
74
|
+
if (shareMap[module]) {}
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
return Array.from(chunks);
|
|
80
|
+
} catch (e) {
|
|
81
|
+
console.error("flush error:", e);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Flush the chunks and return a deduplicated array of chunks.
|
|
86
|
+
* @returns {Promise<Array>} A promise that resolves to an array of deduplicated chunks.
|
|
87
|
+
*/
|
|
88
|
+
const flushChunks = async () => {
|
|
89
|
+
const hostStats = loadHostStats();
|
|
90
|
+
const shareMap = createShareMap();
|
|
91
|
+
const allFlushed = await Promise.all(Array.from(usedChunks).map(async (chunk) => processChunk(chunk, shareMap, hostStats)));
|
|
92
|
+
const dedupe = Array.from(new Set([...allFlushed.flat()]));
|
|
93
|
+
usedChunks.clear();
|
|
94
|
+
return dedupe.filter(Boolean);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
export { flushChunks, getAllKnownRemotes, usedChunks };
|
|
99
|
+
//# sourceMappingURL=flush-chunks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flush-chunks.mjs","names":[],"sources":["../../../src/utils/flush-chunks.ts"],"sourcesContent":["/* eslint-disable no-undef */\n\n// @ts-ignore\nif (!globalThis.usedChunks) {\n // @ts-ignore\n globalThis.usedChunks = new Set();\n}\n/**\n * Initialize usedChunks and share it globally.\n * @type {Set}\n */\n// @ts-ignore\nexport const { usedChunks } = globalThis;\n/**\n * Load hostStats from the JSON file.\n * @returns {object} hostStats - An object containing host stats data.\n */\nconst loadHostStats = () => {\n try {\n //@ts-ignore\n return __non_webpack_require__('../federated-stats.json');\n } catch (e) {\n return {};\n }\n};\n\nexport const getAllKnownRemotes = function () {\n // Attempt to access the global federation controller safely\n const federationController = new Function('return globalThis')()\n .__FEDERATION__;\n if (!federationController || !federationController.__INSTANCES__) {\n // If the federation controller or instances are not defined, return an empty object\n return {};\n }\n\n var collected = {};\n // Use a for...of loop to iterate over all federation instances\n for (const instance of federationController.__INSTANCES__) {\n // Use another for...of loop to iterate over the module cache Map entries\n for (const [key, cacheModule] of instance.moduleCache) {\n // Check if the cacheModule has remoteInfo and use it to collect remote names\n if (cacheModule.remoteInfo) {\n //@ts-ignore\n collected[cacheModule.remoteInfo.name] = cacheModule.remoteInfo;\n }\n }\n }\n return collected;\n};\n\n/**\n * Create a shareMap based on the loaded modules.\n * @returns {object} shareMap - An object containing the shareMap data.\n */\nconst createShareMap = () => {\n // Check if __webpack_share_scopes__ is defined and has a default property\n // @ts-ignore\n if (__webpack_share_scopes__?.default) {\n // Reduce the keys of the default property to create the share map\n // @ts-ignore\n return Object.keys(__webpack_share_scopes__.default).reduce((acc, key) => {\n // @ts-ignore\n const shareMap = __webpack_share_scopes__.default[key];\n // shareScope may equal undefined or null if it has unexpected value\n if (!shareMap || typeof shareMap !== 'object') {\n return acc;\n }\n // Get the loaded modules for the current key\n const loadedModules = Object.values(shareMap)\n // Filter out the modules that are not loaded\n // @ts-ignore\n .filter((sharedModule) => sharedModule.loaded)\n // Map the filtered modules to their 'from' properties\n // @ts-ignore\n .map((sharedModule) => sharedModule.from);\n\n // If there are any loaded modules, add them to the accumulator object\n if (loadedModules.length > 0) {\n // @ts-ignore\n acc[key] = loadedModules;\n }\n // Return the accumulator object for the next iteration\n return acc;\n }, {});\n }\n // If __webpack_share_scopes__ is not defined or doesn't have a default property, return an empty object\n return {};\n};\n\n/**\n * Process a single chunk and return an array of updated chunks.\n * @param {string} chunk - A chunk string containing remote and request data.\n * @param {object} shareMap - An object containing the shareMap data.\n * @param {object} hostStats - An object containing host stats data.\n * @returns {Promise<Array>} A promise that resolves to an array of updated chunks.\n */\n// @ts-ignore\nconst processChunk = async (chunk, shareMap, hostStats) => {\n const chunks = new Set();\n const [remote, req] = chunk.split('/');\n const request = './' + req;\n const knownRemotes = getAllKnownRemotes();\n //@ts-ignore\n if (!knownRemotes[remote]) {\n console.error(\n `flush chunks: Remote ${remote} is not defined in the global config`,\n );\n return;\n }\n\n try {\n //@ts-ignore\n const remoteName = new URL(knownRemotes[remote].entry).pathname\n .split('/')\n .pop();\n //@ts-ignore\n\n const statsFile = knownRemotes[remote].entry\n .replace(remoteName, 'federated-stats.json')\n .replace('ssr', 'chunks');\n let stats = {};\n\n try {\n stats = await fetch(statsFile).then((res) => res.json());\n } catch (e) {\n console.error('flush error', e);\n }\n //@ts-ignore\n\n const [prefix] = knownRemotes[remote].entry.split('static/');\n //@ts-ignore\n\n if (stats.federatedModules) {\n //@ts-ignore\n\n stats.federatedModules.forEach((modules) => {\n if (modules.exposes?.[request]) {\n //@ts-ignore\n\n modules.exposes[request].forEach((chunk) => {\n chunks.add([prefix, chunk].join(''));\n\n Object.values(chunk).forEach((chunk) => {\n //@ts-ignore\n\n if (chunk.files) {\n //@ts-ignore\n\n chunk.files.forEach((file) => {\n chunks.add(prefix + file);\n });\n }\n //@ts-ignore\n\n if (chunk.requiredModules) {\n //@ts-ignore\n\n chunk.requiredModules.forEach((module) => {\n if (shareMap[module]) {\n // If the module is from the host, log the host stats\n }\n });\n }\n });\n });\n }\n });\n }\n\n return Array.from(chunks);\n } catch (e) {\n console.error('flush error:', e);\n }\n};\n\n/**\n * Flush the chunks and return a deduplicated array of chunks.\n * @returns {Promise<Array>} A promise that resolves to an array of deduplicated chunks.\n */\nexport const flushChunks = async () => {\n const hostStats = loadHostStats();\n const shareMap = createShareMap();\n\n const allFlushed = await Promise.all(\n Array.from(usedChunks).map(async (chunk) =>\n processChunk(chunk, shareMap, hostStats),\n ),\n );\n\n // Deduplicate the chunks array\n const dedupe = Array.from(new Set([...allFlushed.flat()]));\n\n // Clear usedChunks\n usedChunks.clear();\n // Filter out any undefined or null values\n return dedupe.filter(Boolean);\n};\n"],"mappings":";AAGA,IAAI,CAAC,WAAW,WAEd,YAAW,6BAAa,IAAI,KAAK;;;;;AAOnC,MAAa,EAAE,eAAe;;;;;AAK9B,MAAM,sBAAsB;AAC1B,KAAI;AAEF,SAAO,wBAAwB,0BAA0B;UAClD,GAAG;AACV,SAAO,EAAE;;;AAIb,MAAa,qBAAqB,WAAY;CAE5C,MAAM,uBAAuB,IAAI,SAAS,oBAAoB,EAAE,CAC7D;AACH,KAAI,CAAC,wBAAwB,CAAC,qBAAqB,cAEjD,QAAO,EAAE;CAGX,IAAI,YAAY,EAAE;AAElB,MAAK,MAAM,YAAY,qBAAqB,cAE1C,MAAK,MAAM,CAAC,KAAK,gBAAgB,SAAS,YAExC,KAAI,YAAY,WAEd,WAAU,YAAY,WAAW,QAAQ,YAAY;AAI3D,QAAO;;;;;;AAOT,MAAM,uBAAuB;AAG3B,KAAI,0BAA0B,QAG5B,QAAO,OAAO,KAAK,yBAAyB,QAAQ,CAAC,QAAQ,KAAK,QAAQ;EAExE,MAAM,WAAW,yBAAyB,QAAQ;AAElD,MAAI,CAAC,YAAY,OAAO,aAAa,SACnC,QAAO;EAGT,MAAM,gBAAgB,OAAO,OAAO,SAAS,CAG1C,QAAQ,iBAAiB,aAAa,OAAO,CAG7C,KAAK,iBAAiB,aAAa,KAAK;AAG3C,MAAI,cAAc,SAAS,EAEzB,KAAI,OAAO;AAGb,SAAO;IACN,EAAE,CAAC;AAGR,QAAO,EAAE;;;;;;;;;AAWX,MAAM,eAAe,OAAO,OAAO,UAAU,cAAc;CACzD,MAAM,yBAAS,IAAI,KAAK;CACxB,MAAM,CAAC,QAAQ,OAAO,MAAM,MAAM,IAAI;CACtC,MAAM,UAAU,OAAO;CACvB,MAAM,eAAe,oBAAoB;AAEzC,KAAI,CAAC,aAAa,SAAS;AACzB,UAAQ,MACN,wBAAwB,OAAO,sCAChC;AACD;;AAGF,KAAI;EAEF,MAAM,aAAa,IAAI,IAAI,aAAa,QAAQ,MAAM,CAAC,SACpD,MAAM,IAAI,CACV,KAAK;EAGR,MAAM,YAAY,aAAa,QAAQ,MACpC,QAAQ,YAAY,uBAAuB,CAC3C,QAAQ,OAAO,SAAS;EAC3B,IAAI,QAAQ,EAAE;AAEd,MAAI;AACF,WAAQ,MAAM,MAAM,UAAU,CAAC,MAAM,QAAQ,IAAI,MAAM,CAAC;WACjD,GAAG;AACV,WAAQ,MAAM,eAAe,EAAE;;EAIjC,MAAM,CAAC,UAAU,aAAa,QAAQ,MAAM,MAAM,UAAU;AAG5D,MAAI,MAAM,iBAGR,OAAM,iBAAiB,SAAS,YAAY;AAC1C,OAAI,QAAQ,UAAU,SAGpB,SAAQ,QAAQ,SAAS,SAAS,UAAU;AAC1C,WAAO,IAAI,CAAC,QAAQ,MAAM,CAAC,KAAK,GAAG,CAAC;AAEpC,WAAO,OAAO,MAAM,CAAC,SAAS,UAAU;AAGtC,SAAI,MAAM,MAGR,OAAM,MAAM,SAAS,SAAS;AAC5B,aAAO,IAAI,SAAS,KAAK;OACzB;AAIJ,SAAI,MAAM,gBAGR,OAAM,gBAAgB,SAAS,WAAW;AACxC,UAAI,SAAS,SAAS;OAGtB;MAEJ;KACF;IAEJ;AAGJ,SAAO,MAAM,KAAK,OAAO;UAClB,GAAG;AACV,UAAQ,MAAM,gBAAgB,EAAE;;;;;;;AAQpC,MAAa,cAAc,YAAY;CACrC,MAAM,YAAY,eAAe;CACjC,MAAM,WAAW,gBAAgB;CAEjC,MAAM,aAAa,MAAM,QAAQ,IAC/B,MAAM,KAAK,WAAW,CAAC,IAAI,OAAO,UAChC,aAAa,OAAO,UAAU,UAAU,CACzC,CACF;CAGD,MAAM,SAAS,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,WAAW,MAAM,CAAC,CAAC,CAAC;AAG1D,YAAW,OAAO;AAElB,QAAO,OAAO,OAAO,QAAQ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/utils/hot-reload.d.ts
|
|
2
|
+
declare global {
|
|
3
|
+
var mfHashMap: Record<string, string> | undefined;
|
|
4
|
+
var moduleGraphDirty: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const performReload: (shouldReload: boolean) => Promise<boolean>;
|
|
7
|
+
declare const checkUnreachableRemote: (remoteScope: any) => boolean;
|
|
8
|
+
declare const checkMedusaConfigChange: (remoteScope: any, fetchModule: any) => boolean;
|
|
9
|
+
declare const checkFakeRemote: (remoteScope: any) => boolean;
|
|
10
|
+
declare const createFetcher: (url: string, fetchModule: any, name: string, cb: (hash: string) => void) => Promise<void | boolean>;
|
|
11
|
+
declare const fetchRemote: (remoteScope: any, fetchModule: any) => Promise<boolean>;
|
|
12
|
+
declare const revalidate: (fetchModule?: any, force?: boolean) => Promise<boolean>;
|
|
13
|
+
declare function getFetchModule(): any;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { checkFakeRemote, checkMedusaConfigChange, checkUnreachableRemote, createFetcher, fetchRemote, getFetchModule, performReload, revalidate };
|
|
16
|
+
//# sourceMappingURL=hot-reload.d.mts.map
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
//#region src/utils/hot-reload.d.ts
|
|
1
2
|
declare global {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
var mfHashMap: Record<string, string> | undefined;
|
|
4
|
+
var moduleGraphDirty: boolean;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
declare const performReload: (shouldReload: boolean) => Promise<boolean>;
|
|
7
|
+
declare const checkUnreachableRemote: (remoteScope: any) => boolean;
|
|
8
|
+
declare const checkMedusaConfigChange: (remoteScope: any, fetchModule: any) => boolean;
|
|
9
|
+
declare const checkFakeRemote: (remoteScope: any) => boolean;
|
|
10
|
+
declare const createFetcher: (url: string, fetchModule: any, name: string, cb: (hash: string) => void) => Promise<void | boolean>;
|
|
11
|
+
declare const fetchRemote: (remoteScope: any, fetchModule: any) => Promise<boolean>;
|
|
12
|
+
declare const revalidate: (fetchModule?: any, force?: boolean) => Promise<boolean>;
|
|
13
|
+
declare function getFetchModule(): any;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { checkFakeRemote, checkMedusaConfigChange, checkUnreachableRemote, createFetcher, fetchRemote, getFetchModule, performReload, revalidate };
|
|
16
|
+
//# sourceMappingURL=hot-reload.d.ts.map
|
|
@@ -1,292 +1,205 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.js');
|
|
3
|
+
const require_src_utils_flush_chunks = require('./flush-chunks.js');
|
|
4
|
+
let path = require("path");
|
|
5
|
+
path = require_runtime.__toESM(path);
|
|
6
|
+
let crypto = require("crypto");
|
|
7
|
+
crypto = require_runtime.__toESM(crypto);
|
|
8
|
+
let _module_federation_runtime_helpers = require("@module-federation/runtime/helpers");
|
|
9
|
+
_module_federation_runtime_helpers = require_runtime.__toESM(_module_federation_runtime_helpers);
|
|
10
|
+
|
|
11
|
+
//#region src/utils/hot-reload.ts
|
|
12
12
|
const getRequire = () => {
|
|
13
|
-
|
|
14
|
-
return typeof __non_webpack_require__ !== 'undefined'
|
|
15
|
-
? __non_webpack_require__
|
|
16
|
-
: eval('require');
|
|
13
|
+
return typeof __non_webpack_require__ !== "undefined" ? __non_webpack_require__ : eval("require");
|
|
17
14
|
};
|
|
18
15
|
function callsites() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
16
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
17
|
+
try {
|
|
18
|
+
let result = [];
|
|
19
|
+
Error.prepareStackTrace = (_, callSites) => {
|
|
20
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
21
|
+
result = callSitesWithoutCurrent;
|
|
22
|
+
return callSitesWithoutCurrent;
|
|
23
|
+
};
|
|
24
|
+
(/* @__PURE__ */ new Error()).stack;
|
|
25
|
+
return result;
|
|
26
|
+
} finally {
|
|
27
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
28
|
+
}
|
|
33
29
|
}
|
|
34
|
-
const find = function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
30
|
+
const find = function(moduleName) {
|
|
31
|
+
if (moduleName[0] === ".") {
|
|
32
|
+
const stack = callsites();
|
|
33
|
+
for (const frame of stack) {
|
|
34
|
+
const filename = frame.getFileName();
|
|
35
|
+
if (filename && filename !== module.filename) {
|
|
36
|
+
moduleName = path.default.resolve(path.default.dirname(filename), moduleName);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
return getRequire().resolve(moduleName);
|
|
43
|
+
} catch (e) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
52
46
|
};
|
|
53
47
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const decache = async function
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
try {
|
|
70
|
-
// Remove cached paths to the module.
|
|
71
|
-
// Thanks to @bentael for pointing this out.
|
|
72
|
-
//@ts-ignore
|
|
73
|
-
Object.keys(currentChunk.constructor._pathCache).forEach(function (cacheKey) {
|
|
74
|
-
if (cacheKey.indexOf(moduleName) > -1) {
|
|
75
|
-
//@ts-ignore
|
|
76
|
-
delete currentChunk.constructor._pathCache[cacheKey];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
catch (error) {
|
|
81
|
-
//null
|
|
82
|
-
}
|
|
48
|
+
* Removes a module from the cache. We need this to re-load our http_request !
|
|
49
|
+
* see: https://stackoverflow.com/a/14801711/1148249
|
|
50
|
+
*/
|
|
51
|
+
const decache = async function(moduleName) {
|
|
52
|
+
moduleName = find(moduleName);
|
|
53
|
+
if (!moduleName) return;
|
|
54
|
+
const currentChunk = getRequire().cache[__filename];
|
|
55
|
+
searchCache(moduleName, function(mod) {
|
|
56
|
+
delete getRequire().cache[mod.id];
|
|
57
|
+
});
|
|
58
|
+
try {
|
|
59
|
+
Object.keys(currentChunk.constructor._pathCache).forEach(function(cacheKey) {
|
|
60
|
+
if (cacheKey.indexOf(moduleName) > -1) delete currentChunk.constructor._pathCache[cacheKey];
|
|
61
|
+
});
|
|
62
|
+
} catch (error) {}
|
|
83
63
|
};
|
|
84
64
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const searchCache = function
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
visited[current.id] = true;
|
|
100
|
-
// Go over each of the module's children and
|
|
101
|
-
// run over it
|
|
102
|
-
current.children.forEach(function (child) {
|
|
103
|
-
// ignore .node files, decaching native modules throws a
|
|
104
|
-
// "module did not self-register" error on second require
|
|
105
|
-
if (path_1.default.extname(child.filename) !== '.node' && !visited[child.id]) {
|
|
106
|
-
run(child);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
// Call the specified callback providing the
|
|
110
|
-
// found module
|
|
111
|
-
callback(current);
|
|
112
|
-
//@ts-ignore
|
|
113
|
-
})(mod);
|
|
114
|
-
}
|
|
65
|
+
* Runs over the cache to search for all the cached
|
|
66
|
+
* files
|
|
67
|
+
*/
|
|
68
|
+
const searchCache = function(moduleName, callback) {
|
|
69
|
+
let mod = getRequire().resolve(moduleName);
|
|
70
|
+
const visited = {};
|
|
71
|
+
/* istanbul ignore else */
|
|
72
|
+
if (mod && (mod = getRequire().cache[mod]) !== void 0) (function run(current) {
|
|
73
|
+
visited[current.id] = true;
|
|
74
|
+
current.children.forEach(function(child) {
|
|
75
|
+
if (path.default.extname(child.filename) !== ".node" && !visited[child.id]) run(child);
|
|
76
|
+
});
|
|
77
|
+
callback(current);
|
|
78
|
+
})(mod);
|
|
115
79
|
};
|
|
116
80
|
const hashmap = globalThis.mfHashMap || {};
|
|
117
81
|
globalThis.moduleGraphDirty = false;
|
|
118
82
|
const requireCacheRegex = /(remote|server|hot-reload|react-loadable-manifest|runtime|styled-jsx)/;
|
|
119
83
|
const performReload = async (shouldReload) => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
globalThis.mfHashMap = {};
|
|
144
|
-
if (!entries) {
|
|
145
|
-
Object.keys(req.cache).forEach((key) => {
|
|
146
|
-
if (requireCacheRegex.test(key)) {
|
|
147
|
-
decache(key); // Use decache here
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
for (const entry of entries) {
|
|
153
|
-
decache(entry);
|
|
154
|
-
//reload entries again
|
|
155
|
-
await getRequire()(entry);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return true;
|
|
84
|
+
if (!shouldReload) return false;
|
|
85
|
+
const req = getRequire();
|
|
86
|
+
const gs = new Function("return globalThis")();
|
|
87
|
+
const entries = gs.entryChunkCache || /* @__PURE__ */ new Set();
|
|
88
|
+
gs.__FEDERATION__.__INSTANCES__.map((i) => {
|
|
89
|
+
i.moduleCache.forEach((mc) => {
|
|
90
|
+
if (mc.remoteInfo && mc.remoteInfo.entryGlobalName) delete gs[mc.remoteInfo.entryGlobalName];
|
|
91
|
+
});
|
|
92
|
+
i.moduleCache.clear();
|
|
93
|
+
if (gs[i.name]) delete gs[i.name];
|
|
94
|
+
});
|
|
95
|
+
__webpack_require__?.federation?.instance?.moduleCache?.clear();
|
|
96
|
+
_module_federation_runtime_helpers.default.global.resetFederationGlobalInfo();
|
|
97
|
+
globalThis.moduleGraphDirty = false;
|
|
98
|
+
globalThis.mfHashMap = {};
|
|
99
|
+
if (!entries) Object.keys(req.cache).forEach((key) => {
|
|
100
|
+
if (requireCacheRegex.test(key)) decache(key);
|
|
101
|
+
});
|
|
102
|
+
else for (const entry of entries) {
|
|
103
|
+
decache(entry);
|
|
104
|
+
await getRequire()(entry);
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
159
107
|
};
|
|
160
|
-
exports.performReload = performReload;
|
|
161
108
|
const checkUnreachableRemote = (remoteScope) => {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
return false;
|
|
109
|
+
for (const property in remoteScope.remotes) if (!remoteScope[property]) {
|
|
110
|
+
console.error("unreachable remote found", property, "hot reloading to refetch");
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
return false;
|
|
169
114
|
};
|
|
170
|
-
exports.checkUnreachableRemote = checkUnreachableRemote;
|
|
171
115
|
const checkMedusaConfigChange = (remoteScope, fetchModule) => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
//@ts-ignore
|
|
181
|
-
remoteScope?._medusa[property].version) {
|
|
182
|
-
console.log('medusa config changed', property, 'hot reloading to refetch');
|
|
183
|
-
(0, exports.performReload)(true);
|
|
184
|
-
return true;
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return false;
|
|
116
|
+
if (remoteScope._medusa) for (const property in remoteScope._medusa) fetchModule(property).then((res) => res.json()).then((medusaResponse) => {
|
|
117
|
+
if (medusaResponse.version !== remoteScope?._medusa[property].version) {
|
|
118
|
+
console.log("medusa config changed", property, "hot reloading to refetch");
|
|
119
|
+
performReload(true);
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
return false;
|
|
190
124
|
};
|
|
191
|
-
exports.checkMedusaConfigChange = checkMedusaConfigChange;
|
|
192
125
|
const checkFakeRemote = (remoteScope) => {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
return false;
|
|
126
|
+
for (const property in remoteScope._config) {
|
|
127
|
+
let remote = remoteScope._config[property];
|
|
128
|
+
const resolveRemote = async () => {
|
|
129
|
+
remote = await remote();
|
|
130
|
+
};
|
|
131
|
+
if (typeof remote === "function") resolveRemote();
|
|
132
|
+
if (remote.fake) {
|
|
133
|
+
console.log("fake remote found", property, "hot reloading to refetch");
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return false;
|
|
207
138
|
};
|
|
208
|
-
exports.checkFakeRemote = checkFakeRemote;
|
|
209
139
|
const createFetcher = (url, fetchModule, name, cb) => {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
const hash = crypto_1.default.createHash('md5').update(contents).digest('hex');
|
|
219
|
-
cb(hash);
|
|
220
|
-
})
|
|
221
|
-
.catch((e) => {
|
|
222
|
-
console.error('Remote', name, url, 'Failed to load or is not online', e);
|
|
223
|
-
});
|
|
140
|
+
return fetchModule(url).then((re) => {
|
|
141
|
+
if (!re.ok) throw new Error(`Error loading remote: status: ${re.status}, content-type: ${re.headers.get("content-type")}`);
|
|
142
|
+
return re.text();
|
|
143
|
+
}).then((contents) => {
|
|
144
|
+
cb(crypto.default.createHash("md5").update(contents).digest("hex"));
|
|
145
|
+
}).catch((e) => {
|
|
146
|
+
console.error("Remote", name, url, "Failed to load or is not online", e);
|
|
147
|
+
});
|
|
224
148
|
};
|
|
225
|
-
exports.createFetcher = createFetcher;
|
|
226
149
|
const fetchRemote = (remoteScope, fetchModule) => {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
return Promise.all(fetches).then(() => {
|
|
248
|
-
return needReload;
|
|
249
|
-
});
|
|
150
|
+
const fetches = [];
|
|
151
|
+
let needReload = false;
|
|
152
|
+
for (const property in remoteScope) {
|
|
153
|
+
const name = property;
|
|
154
|
+
const url = remoteScope[property].entry;
|
|
155
|
+
const fetcher = createFetcher(url, fetchModule, name, (hash) => {
|
|
156
|
+
if (hashmap[name]) {
|
|
157
|
+
if (hashmap[name] !== hash) {
|
|
158
|
+
hashmap[name] = hash;
|
|
159
|
+
needReload = true;
|
|
160
|
+
console.log(name, "hash is different - must hot reload server");
|
|
161
|
+
}
|
|
162
|
+
} else hashmap[name] = hash;
|
|
163
|
+
});
|
|
164
|
+
fetches.push(fetcher);
|
|
165
|
+
}
|
|
166
|
+
return Promise.all(fetches).then(() => {
|
|
167
|
+
return needReload;
|
|
168
|
+
});
|
|
250
169
|
};
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
if ((0, exports.checkFakeRemote)(remotesFromAPI)) {
|
|
270
|
-
res(true);
|
|
271
|
-
}
|
|
272
|
-
(0, exports.fetchRemote)(remotesFromAPI, fetchModule).then((val) => {
|
|
273
|
-
res(val);
|
|
274
|
-
});
|
|
275
|
-
}).then((shouldReload) => {
|
|
276
|
-
return (0, exports.performReload)(shouldReload);
|
|
277
|
-
});
|
|
170
|
+
const revalidate = async (fetchModule = getFetchModule() || (() => {}), force = false) => {
|
|
171
|
+
if (globalThis.moduleGraphDirty) force = true;
|
|
172
|
+
const remotesFromAPI = require_src_utils_flush_chunks.getAllKnownRemotes();
|
|
173
|
+
return new Promise((res) => {
|
|
174
|
+
if (force) {
|
|
175
|
+
if (Object.keys(hashmap).length !== 0) {
|
|
176
|
+
res(true);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (checkMedusaConfigChange(remotesFromAPI, fetchModule)) res(true);
|
|
181
|
+
if (checkFakeRemote(remotesFromAPI)) res(true);
|
|
182
|
+
fetchRemote(remotesFromAPI, fetchModule).then((val) => {
|
|
183
|
+
res(val);
|
|
184
|
+
});
|
|
185
|
+
}).then((shouldReload) => {
|
|
186
|
+
return performReload(shouldReload);
|
|
187
|
+
});
|
|
278
188
|
};
|
|
279
|
-
exports.revalidate = revalidate;
|
|
280
189
|
function getFetchModule() {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
if (loadedModule) {
|
|
286
|
-
return loadedModule;
|
|
287
|
-
}
|
|
288
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
289
|
-
const nodeFetch = require('node-fetch');
|
|
290
|
-
return nodeFetch.default || nodeFetch;
|
|
190
|
+
const loadedModule = globalThis.webpackChunkLoad || global.webpackChunkLoad || global.fetch;
|
|
191
|
+
if (loadedModule) return loadedModule;
|
|
192
|
+
const nodeFetch = require("node-fetch");
|
|
193
|
+
return nodeFetch.default || nodeFetch;
|
|
291
194
|
}
|
|
195
|
+
|
|
196
|
+
//#endregion
|
|
197
|
+
exports.checkFakeRemote = checkFakeRemote;
|
|
198
|
+
exports.checkMedusaConfigChange = checkMedusaConfigChange;
|
|
199
|
+
exports.checkUnreachableRemote = checkUnreachableRemote;
|
|
200
|
+
exports.createFetcher = createFetcher;
|
|
201
|
+
exports.fetchRemote = fetchRemote;
|
|
202
|
+
exports.getFetchModule = getFetchModule;
|
|
203
|
+
exports.performReload = performReload;
|
|
204
|
+
exports.revalidate = revalidate;
|
|
292
205
|
//# sourceMappingURL=hot-reload.js.map
|