@module-federation/devtools 0.0.0-perf-devtools-20260107043700 → 0.0.0-perf-devtools-20260108034446
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.
|
@@ -212,12 +212,23 @@ const Layout = (props) => {
|
|
|
212
212
|
} else {
|
|
213
213
|
setCondition(statusInfo.noProxy);
|
|
214
214
|
}
|
|
215
|
+
setCondition(statusInfo.noProxy);
|
|
215
216
|
return;
|
|
216
217
|
}
|
|
217
218
|
if (!clipChanged && effectiveSignature === lastEffectiveRulesRef.current) {
|
|
219
|
+
if (hadPreviousEffective) {
|
|
220
|
+
setCondition(statusInfo.success);
|
|
221
|
+
} else {
|
|
222
|
+
setCondition(statusInfo.noProxy);
|
|
223
|
+
}
|
|
218
224
|
return;
|
|
219
225
|
}
|
|
220
226
|
if (rawRules.every((rule) => !rule.value)) {
|
|
227
|
+
if (hadPreviousEffective) {
|
|
228
|
+
setCondition(statusInfo.success);
|
|
229
|
+
} else {
|
|
230
|
+
setCondition(statusInfo.noProxy);
|
|
231
|
+
}
|
|
221
232
|
return;
|
|
222
233
|
}
|
|
223
234
|
const { moduleInfo: moduleInfo2, status, overrides } = handleSnapshot ? yield handleSnapshot(effectiveRules) : yield getModuleInfo(effectiveRules);
|
|
@@ -318,6 +329,11 @@ const Layout = (props) => {
|
|
|
318
329
|
if (overridesApplied) {
|
|
319
330
|
setChromeStorage(storeData);
|
|
320
331
|
}
|
|
332
|
+
if (effectiveRules.length) {
|
|
333
|
+
setCondition(statusInfo.success);
|
|
334
|
+
} else {
|
|
335
|
+
setCondition(statusInfo.noProxy);
|
|
336
|
+
}
|
|
321
337
|
}
|
|
322
338
|
});
|
|
323
339
|
hydrateForm();
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import runtimeHelpers from "@module-federation/runtime/helpers";
|
|
3
|
+
import { definePropertyGlobalVal } from "../sdk";
|
|
4
|
+
import { __FEDERATION_DEVTOOLS__ } from "../../template";
|
|
5
|
+
const chromeOverrideRemotesPlugin = function() {
|
|
6
|
+
return {
|
|
7
|
+
name: "mf-chrome-devtools-override-remotes-plugin",
|
|
8
|
+
beforeRegisterRemote(args) {
|
|
9
|
+
try {
|
|
10
|
+
const { remote } = args;
|
|
11
|
+
const overrideRemote = runtimeHelpers.global.nativeGlobal.localStorage.getItem(
|
|
12
|
+
__FEDERATION_DEVTOOLS__
|
|
13
|
+
);
|
|
14
|
+
if (!overrideRemote) {
|
|
15
|
+
return args;
|
|
16
|
+
}
|
|
17
|
+
const parsedOverrideRemote = JSON.parse(overrideRemote);
|
|
18
|
+
const overrideEntryOrVersion = parsedOverrideRemote[remote.name];
|
|
19
|
+
if (overrideEntryOrVersion) {
|
|
20
|
+
if (overrideEntryOrVersion.startsWith("http")) {
|
|
21
|
+
delete remote.version;
|
|
22
|
+
remote.entry = overrideEntryOrVersion;
|
|
23
|
+
} else {
|
|
24
|
+
delete remote.entry;
|
|
25
|
+
remote.version = overrideEntryOrVersion;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
} catch (e) {
|
|
29
|
+
console.error(e);
|
|
30
|
+
}
|
|
31
|
+
return args;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
if (!(window == null ? void 0 : window.__FEDERATION__)) {
|
|
36
|
+
definePropertyGlobalVal(window, "__FEDERATION__", {});
|
|
37
|
+
definePropertyGlobalVal(window, "__VMOK__", window.__FEDERATION__);
|
|
38
|
+
}
|
|
39
|
+
if (!(window == null ? void 0 : window.__FEDERATION__.__GLOBAL_PLUGIN__)) {
|
|
40
|
+
window.__FEDERATION__.__GLOBAL_PLUGIN__ = [];
|
|
41
|
+
}
|
|
42
|
+
(_a = window.__FEDERATION__.__GLOBAL_PLUGIN__) == null ? void 0 : _a.push(chromeOverrideRemotesPlugin());
|
|
@@ -217,12 +217,23 @@ const Layout = (props) => {
|
|
|
217
217
|
} else {
|
|
218
218
|
setCondition(import_constant.statusInfo.noProxy);
|
|
219
219
|
}
|
|
220
|
+
setCondition(import_constant.statusInfo.noProxy);
|
|
220
221
|
return;
|
|
221
222
|
}
|
|
222
223
|
if (!clipChanged && effectiveSignature === lastEffectiveRulesRef.current) {
|
|
224
|
+
if (hadPreviousEffective) {
|
|
225
|
+
setCondition(import_constant.statusInfo.success);
|
|
226
|
+
} else {
|
|
227
|
+
setCondition(import_constant.statusInfo.noProxy);
|
|
228
|
+
}
|
|
223
229
|
return;
|
|
224
230
|
}
|
|
225
231
|
if (rawRules.every((rule) => !rule.value)) {
|
|
232
|
+
if (hadPreviousEffective) {
|
|
233
|
+
setCondition(import_constant.statusInfo.success);
|
|
234
|
+
} else {
|
|
235
|
+
setCondition(import_constant.statusInfo.noProxy);
|
|
236
|
+
}
|
|
226
237
|
return;
|
|
227
238
|
}
|
|
228
239
|
const { moduleInfo: moduleInfo2, status, overrides } = handleSnapshot ? yield handleSnapshot(effectiveRules) : yield (0, import_utils.getModuleInfo)(effectiveRules);
|
|
@@ -323,6 +334,11 @@ const Layout = (props) => {
|
|
|
323
334
|
if (overridesApplied) {
|
|
324
335
|
(0, import_utils.setChromeStorage)(storeData);
|
|
325
336
|
}
|
|
337
|
+
if (effectiveRules.length) {
|
|
338
|
+
setCondition(import_constant.statusInfo.success);
|
|
339
|
+
} else {
|
|
340
|
+
setCondition(import_constant.statusInfo.noProxy);
|
|
341
|
+
}
|
|
326
342
|
}
|
|
327
343
|
});
|
|
328
344
|
hydrateForm();
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var import_helpers = __toESM(require("@module-federation/runtime/helpers"));
|
|
25
|
+
var import_sdk = require("../sdk");
|
|
26
|
+
var import_template = require("../../template");
|
|
27
|
+
var _a;
|
|
28
|
+
const chromeOverrideRemotesPlugin = function() {
|
|
29
|
+
return {
|
|
30
|
+
name: "mf-chrome-devtools-override-remotes-plugin",
|
|
31
|
+
beforeRegisterRemote(args) {
|
|
32
|
+
try {
|
|
33
|
+
const { remote } = args;
|
|
34
|
+
const overrideRemote = import_helpers.default.global.nativeGlobal.localStorage.getItem(
|
|
35
|
+
import_template.__FEDERATION_DEVTOOLS__
|
|
36
|
+
);
|
|
37
|
+
if (!overrideRemote) {
|
|
38
|
+
return args;
|
|
39
|
+
}
|
|
40
|
+
const parsedOverrideRemote = JSON.parse(overrideRemote);
|
|
41
|
+
const overrideEntryOrVersion = parsedOverrideRemote[remote.name];
|
|
42
|
+
if (overrideEntryOrVersion) {
|
|
43
|
+
if (overrideEntryOrVersion.startsWith("http")) {
|
|
44
|
+
delete remote.version;
|
|
45
|
+
remote.entry = overrideEntryOrVersion;
|
|
46
|
+
} else {
|
|
47
|
+
delete remote.entry;
|
|
48
|
+
remote.version = overrideEntryOrVersion;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
} catch (e) {
|
|
52
|
+
console.error(e);
|
|
53
|
+
}
|
|
54
|
+
return args;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
if (!(window == null ? void 0 : window.__FEDERATION__)) {
|
|
59
|
+
(0, import_sdk.definePropertyGlobalVal)(window, "__FEDERATION__", {});
|
|
60
|
+
(0, import_sdk.definePropertyGlobalVal)(window, "__VMOK__", window.__FEDERATION__);
|
|
61
|
+
}
|
|
62
|
+
if (!(window == null ? void 0 : window.__FEDERATION__.__GLOBAL_PLUGIN__)) {
|
|
63
|
+
window.__FEDERATION__.__GLOBAL_PLUGIN__ = [];
|
|
64
|
+
}
|
|
65
|
+
(_a = window.__FEDERATION__.__GLOBAL_PLUGIN__) == null ? void 0 : _a.push(chromeOverrideRemotesPlugin());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/devtools",
|
|
3
|
-
"version": "0.0.0-perf-devtools-
|
|
3
|
+
"version": "0.0.0-perf-devtools-20260108034446",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"echarts": "^6.0.0",
|
|
48
48
|
"lucide-react": "^0.364.0",
|
|
49
49
|
"echarts-for-react": "^3.0.5",
|
|
50
|
-
"@module-federation/sdk": "0.0.0-perf-devtools-
|
|
50
|
+
"@module-federation/sdk": "0.0.0-perf-devtools-20260108034446"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@modern-js-app/eslint-config": "2.59.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"prettier": "~3.3.3",
|
|
68
68
|
"rimraf": "~6.0.1",
|
|
69
69
|
"vitest": "1.2.2",
|
|
70
|
-
"@module-federation/runtime": "0.0.0-perf-devtools-
|
|
70
|
+
"@module-federation/runtime": "0.0.0-perf-devtools-20260108034446"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build:storybook": "storybook build",
|