@module-federation/node 0.0.0-next-20240519120858 → 0.0.0-next-20240520072517
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/package.json +17 -0
- package/dist/src/recordDynamicRemoteEntryHashPlugin.d.ts +3 -0
- package/dist/src/recordDynamicRemoteEntryHashPlugin.js +55 -0
- package/dist/src/recordDynamicRemoteEntryHashPlugin.js.map +1 -0
- package/dist/src/utils/hot-reload.d.ts +4 -0
- package/dist/src/utils/hot-reload.js +20 -16
- package/dist/src/utils/hot-reload.js.map +1 -1
- package/package.json +22 -5
package/dist/package.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"./package.json": "./package.json",
|
|
13
13
|
"./runtimePlugin": "./dist/src/runtimePlugin.js",
|
|
14
|
+
"./record-dynamic-remote-entry-hash-plugin": "./dist/src/recordDynamicRemoteEntryHashPlugin.js",
|
|
14
15
|
"./utils": {
|
|
15
16
|
"import": "./dist/src/utils/index.js",
|
|
16
17
|
"require": "./dist/src/utils/index.js"
|
|
@@ -19,6 +20,22 @@
|
|
|
19
20
|
"./src/plugins/NodeFederationPlugin.js": "./dist/src/plugins/NodeFederationPlugin.js",
|
|
20
21
|
"./src/": "./dist/src/"
|
|
21
22
|
},
|
|
23
|
+
"typesVersions": {
|
|
24
|
+
"*": {
|
|
25
|
+
".": [
|
|
26
|
+
"./dist/src/index.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"runtimePlugin": [
|
|
29
|
+
"./dist/src/runtimePlugin.d.ts"
|
|
30
|
+
],
|
|
31
|
+
"utils": [
|
|
32
|
+
"./dist/src/utils/index.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"record-dynamic-remote-entry-hash-plugin": [
|
|
35
|
+
"./dist/src/record-dynamic-remote-entry-hash-plugin.d.ts"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
22
39
|
"files": [
|
|
23
40
|
"dist/",
|
|
24
41
|
"README.md"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const recordDynamicRemoteEntryHashPlugin = () => ({
|
|
27
|
+
name: 'record-dynamic-remote-entry-hash-plugin',
|
|
28
|
+
beforeInit(args) {
|
|
29
|
+
if (!globalThis.mfHashMap) {
|
|
30
|
+
globalThis.mfHashMap = {};
|
|
31
|
+
}
|
|
32
|
+
return args;
|
|
33
|
+
},
|
|
34
|
+
async onLoad(args) {
|
|
35
|
+
const { moduleInstance } = args;
|
|
36
|
+
if (!moduleInstance.remoteInfo) {
|
|
37
|
+
return args;
|
|
38
|
+
}
|
|
39
|
+
const hashmap = globalThis.mfHashMap;
|
|
40
|
+
if (!hashmap) {
|
|
41
|
+
return args;
|
|
42
|
+
}
|
|
43
|
+
const { name, entry } = moduleInstance.remoteInfo;
|
|
44
|
+
if (!hashmap[name]) {
|
|
45
|
+
const hotReloadUtils = await Promise.resolve().then(() => __importStar(require('./utils/hot-reload')));
|
|
46
|
+
const fetcher = hotReloadUtils.createFetcher(entry, hotReloadUtils.getFetchModule(), (hash) => {
|
|
47
|
+
hashmap[name] = hash;
|
|
48
|
+
});
|
|
49
|
+
await fetcher;
|
|
50
|
+
}
|
|
51
|
+
return args;
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
exports.default = recordDynamicRemoteEntryHashPlugin;
|
|
55
|
+
//# sourceMappingURL=recordDynamicRemoteEntryHashPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordDynamicRemoteEntryHashPlugin.js","sourceRoot":"","sources":["../../src/recordDynamicRemoteEntryHashPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,kCAAkC,GACtC,GAAG,EAAE,CAAC,CAAC;IACL,IAAI,EAAE,yCAAyC;IAC/C,UAAU,CAAC,IAAI;QACb,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;YAC1B,UAAU,CAAC,SAAS,GAAG,EAAE,CAAC;QAC5B,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,IAAI;QACf,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;QAEhC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC;QAErC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,cAAc,CAAC,UAAU,CAAC;QAElD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACnB,MAAM,cAAc,GAAG,wDAAa,oBAAoB,GAAC,CAAC;YAC1D,MAAM,OAAO,GAAG,cAAc,CAAC,aAAa,CAC1C,KAAK,EACL,cAAc,CAAC,cAAc,EAAE,EAC/B,CAAC,IAAI,EAAE,EAAE;gBACP,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YACvB,CAAC,CACF,CAAC;YACF,MAAM,OAAO,CAAC;QAChB,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC,CAAC;AACL,kBAAe,kCAAkC,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
var mfHashMap: Record<string, string> | undefined;
|
|
3
|
+
}
|
|
1
4
|
export declare const performReload: (shouldReload: any) => Promise<boolean>;
|
|
2
5
|
export declare const checkUnreachableRemote: (remoteScope: any) => boolean;
|
|
3
6
|
export declare const checkMedusaConfigChange: (remoteScope: any, fetchModule: any) => boolean;
|
|
4
7
|
export declare const checkFakeRemote: (remoteScope: any) => boolean;
|
|
8
|
+
export declare const createFetcher: (url: string, fetchModule: any, cb: (hash: string) => void) => any;
|
|
5
9
|
export declare const fetchRemote: (remoteScope: any, fetchModule: any) => Promise<boolean>;
|
|
6
10
|
export declare const revalidate: (fetchModule?: any, force?: boolean) => Promise<boolean>;
|
|
7
11
|
export declare function getFetchModule(): any;
|
|
@@ -3,16 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getFetchModule = exports.revalidate = exports.fetchRemote = exports.checkFakeRemote = exports.checkMedusaConfigChange = exports.checkUnreachableRemote = exports.performReload = void 0;
|
|
6
|
+
exports.getFetchModule = exports.revalidate = exports.fetchRemote = exports.createFetcher = exports.checkFakeRemote = exports.checkMedusaConfigChange = exports.checkUnreachableRemote = exports.performReload = void 0;
|
|
7
7
|
const flush_chunks_1 = require("./flush-chunks");
|
|
8
|
-
const hashmap = {};
|
|
9
8
|
const crypto_1 = __importDefault(require("crypto"));
|
|
9
|
+
const hashmap = globalThis.mfHashMap || {};
|
|
10
10
|
const requireCacheRegex = /(remote|server|hot-reload|react-loadable-manifest|runtime|styled-jsx)/;
|
|
11
11
|
const performReload = async (shouldReload) => {
|
|
12
12
|
if (!shouldReload) {
|
|
13
13
|
return false;
|
|
14
14
|
}
|
|
15
|
-
const remotesFromAPI = (0, flush_chunks_1.getAllKnownRemotes)();
|
|
16
15
|
let req;
|
|
17
16
|
//@ts-ignore
|
|
18
17
|
if (typeof __non_webpack_require__ === 'undefined') {
|
|
@@ -105,6 +104,23 @@ const checkFakeRemote = (remoteScope) => {
|
|
|
105
104
|
return false;
|
|
106
105
|
};
|
|
107
106
|
exports.checkFakeRemote = checkFakeRemote;
|
|
107
|
+
const createFetcher = (url, fetchModule, cb) => {
|
|
108
|
+
return fetchModule(url)
|
|
109
|
+
.then((re) => {
|
|
110
|
+
if (!re.ok) {
|
|
111
|
+
throw new Error(`Error loading remote: status: ${re.status}, content-type: ${re.headers.get('content-type')}`);
|
|
112
|
+
}
|
|
113
|
+
return re.text();
|
|
114
|
+
})
|
|
115
|
+
.then((contents) => {
|
|
116
|
+
const hash = crypto_1.default.createHash('md5').update(contents).digest('hex');
|
|
117
|
+
cb(hash);
|
|
118
|
+
})
|
|
119
|
+
.catch((e) => {
|
|
120
|
+
console.error('Remote', name, url, 'Failed to load or is not online', e);
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
exports.createFetcher = createFetcher;
|
|
108
124
|
const fetchRemote = (remoteScope, fetchModule) => {
|
|
109
125
|
const fetches = [];
|
|
110
126
|
let needReload = false;
|
|
@@ -112,29 +128,17 @@ const fetchRemote = (remoteScope, fetchModule) => {
|
|
|
112
128
|
const name = property;
|
|
113
129
|
const container = remoteScope[property];
|
|
114
130
|
const url = container.entry;
|
|
115
|
-
const fetcher = fetchModule(
|
|
116
|
-
.then((re) => {
|
|
117
|
-
if (!re.ok) {
|
|
118
|
-
throw new Error(`Error loading remote: status: ${re.status}, content-type: ${re.headers.get('content-type')}`);
|
|
119
|
-
}
|
|
120
|
-
return re.text();
|
|
121
|
-
})
|
|
122
|
-
.then((contents) => {
|
|
123
|
-
const hash = crypto_1.default.createHash('md5').update(contents).digest('hex');
|
|
131
|
+
const fetcher = (0, exports.createFetcher)(url, fetchModule, (hash) => {
|
|
124
132
|
if (hashmap[name]) {
|
|
125
133
|
if (hashmap[name] !== hash) {
|
|
126
134
|
hashmap[name] = hash;
|
|
127
135
|
needReload = true;
|
|
128
136
|
console.log(name, 'hash is different - must hot reload server');
|
|
129
|
-
return true;
|
|
130
137
|
}
|
|
131
138
|
}
|
|
132
139
|
else {
|
|
133
140
|
hashmap[name] = hash;
|
|
134
141
|
}
|
|
135
|
-
})
|
|
136
|
-
.catch((e) => {
|
|
137
|
-
console.error('Remote', name, url, 'Failed to load or is not online', e);
|
|
138
142
|
});
|
|
139
143
|
fetches.push(fetcher);
|
|
140
144
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hot-reload.js","sourceRoot":"","sources":["../../../src/utils/hot-reload.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAoD;
|
|
1
|
+
{"version":3,"file":"hot-reload.js","sourceRoot":"","sources":["../../../src/utils/hot-reload.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAoD;AACpD,oDAA4B;AAM5B,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,IAAK,EAA6B,CAAC;AAEvE,MAAM,iBAAiB,GACrB,uEAAuE,CAAC;AAEnE,MAAM,aAAa,GAAG,KAAK,EAAE,YAAiB,EAAE,EAAE;IACvD,IAAI,CAAC,YAAY,EAAE,CAAC;QACl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M,YAAY;IAChB,YAAY;IACZ,UAAU,CAAC,gBAAgB,IAAI,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,KAAK,CAAC;IACzE,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,8DAA8D;IAC9D,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACxC,OAAO,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC;AACxC,CAAC;AAXD,wCAWC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"public": true,
|
|
3
3
|
"name": "@module-federation/node",
|
|
4
|
-
"version": "0.0.0-next-
|
|
4
|
+
"version": "0.0.0-next-20240520072517",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"./package.json": "./package.json",
|
|
13
13
|
"./runtimePlugin": "./dist/src/runtimePlugin.js",
|
|
14
|
+
"./record-dynamic-remote-entry-hash-plugin": "./dist/src/recordDynamicRemoteEntryHashPlugin.js",
|
|
14
15
|
"./utils": {
|
|
15
16
|
"import": "./dist/src/utils/index.js",
|
|
16
17
|
"require": "./dist/src/utils/index.js"
|
|
@@ -19,6 +20,22 @@
|
|
|
19
20
|
"./src/plugins/NodeFederationPlugin.js": "./dist/src/plugins/NodeFederationPlugin.js",
|
|
20
21
|
"./src/": "./dist/src/"
|
|
21
22
|
},
|
|
23
|
+
"typesVersions": {
|
|
24
|
+
"*": {
|
|
25
|
+
".": [
|
|
26
|
+
"./dist/src/index.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"runtimePlugin": [
|
|
29
|
+
"./dist/src/runtimePlugin.d.ts"
|
|
30
|
+
],
|
|
31
|
+
"utils": [
|
|
32
|
+
"./dist/src/utils/index.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"record-dynamic-remote-entry-hash-plugin": [
|
|
35
|
+
"./dist/src/record-dynamic-remote-entry-hash-plugin.d.ts"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
22
39
|
"files": [
|
|
23
40
|
"dist/",
|
|
24
41
|
"README.md"
|
|
@@ -42,10 +59,10 @@
|
|
|
42
59
|
"dependencies": {
|
|
43
60
|
"encoding": "^0.1.13",
|
|
44
61
|
"node-fetch": "2.7.0",
|
|
45
|
-
"@module-federation/enhanced": "0.0.0-next-
|
|
46
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
47
|
-
"@module-federation/utilities": "0.0.0-next-
|
|
48
|
-
"@module-federation/runtime": "0.0.0-next-
|
|
62
|
+
"@module-federation/enhanced": "0.0.0-next-20240520072517",
|
|
63
|
+
"@module-federation/sdk": "0.0.0-next-20240520072517",
|
|
64
|
+
"@module-federation/utilities": "0.0.0-next-20240520072517",
|
|
65
|
+
"@module-federation/runtime": "0.0.0-next-20240520072517"
|
|
49
66
|
},
|
|
50
67
|
"peerDependencies": {
|
|
51
68
|
"react": "^16||^17||^18",
|