@module-federation/devtools 2.3.3 → 2.5.0
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/README.md +3 -0
- package/dist/es/App.js +17 -2
- package/dist/es/App_module.css +3 -3
- package/dist/es/component/LoadingTrace/index.js +944 -0
- package/dist/es/component/LoadingTrace/index.module.js +5 -0
- package/dist/es/component/LoadingTrace/index_module.css +876 -0
- package/dist/es/i18n/index.js +178 -0
- package/dist/es/utils/chrome/fast-refresh.js +297 -173
- package/dist/es/utils/chrome/index.js +3 -4
- package/dist/es/utils/chrome/messages.js +7 -1
- package/dist/es/utils/chrome/observability-plugin.js +93 -0
- package/dist/es/utils/chrome/observability-shared.js +99 -0
- package/dist/es/utils/chrome/observability.js +208 -0
- package/dist/es/utils/chrome/override-remote.js +2 -42
- package/dist/es/utils/chrome/post-message-listener.js +14 -0
- package/dist/es/utils/chrome/snapshot-plugin.js +2 -36
- package/dist/es/utils/data/index.js +5 -25
- package/dist/es/vendor/basic-proxy-core.js +155 -0
- package/dist/es/worker/index.js +27 -8
- package/dist/lib/App.js +17 -2
- package/dist/lib/App_module.css +3 -3
- package/dist/lib/component/LoadingTrace/index.js +954 -0
- package/dist/lib/component/LoadingTrace/index.module.js +25 -0
- package/dist/lib/component/LoadingTrace/index_module.css +876 -0
- package/dist/lib/i18n/index.js +178 -0
- package/dist/lib/utils/chrome/fast-refresh.js +250 -135
- package/dist/lib/utils/chrome/index.js +3 -4
- package/dist/lib/utils/chrome/messages.js +11 -2
- package/dist/lib/utils/chrome/observability-plugin.js +86 -0
- package/dist/lib/utils/chrome/observability-shared.js +126 -0
- package/dist/lib/utils/chrome/observability.js +234 -0
- package/dist/lib/utils/chrome/override-remote.js +5 -52
- package/dist/lib/utils/chrome/post-message-listener.js +11 -0
- package/dist/lib/utils/chrome/snapshot-plugin.js +5 -46
- package/dist/lib/utils/data/index.js +6 -28
- package/dist/lib/vendor/basic-proxy-core.js +147 -0
- package/dist/lib/worker/index.js +27 -8
- package/dist/types/src/component/LoadingTrace/index.d.ts +6 -0
- package/dist/types/src/utils/chrome/messages.d.ts +3 -0
- package/dist/types/src/utils/chrome/observability-plugin.d.ts +1 -0
- package/dist/types/src/utils/chrome/observability-shared.d.ts +41 -0
- package/dist/types/src/utils/chrome/observability.d.ts +110 -0
- package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +0 -3
- package/dist/types/src/utils/data/index.d.ts +0 -1
- package/package.json +4 -3
- package/dist/es/utils/data/snapshot.js +0 -82
- package/dist/lib/utils/data/snapshot.js +0 -107
- package/dist/types/src/utils/data/snapshot.d.ts +0 -3
package/dist/lib/App.js
CHANGED
|
@@ -77,6 +77,7 @@ var import_Layout = __toESM(require("./component/Layout"));
|
|
|
77
77
|
var import_DependencyGraph = __toESM(require("./component/DependencyGraph"));
|
|
78
78
|
var import_ModuleInfo = __toESM(require("./component/ModuleInfo"));
|
|
79
79
|
var import_SharedDepsExplorer = __toESM(require("./component/SharedDepsExplorer"));
|
|
80
|
+
var import_LoadingTrace = __toESM(require("./component/LoadingTrace"));
|
|
80
81
|
var import_LanguageSwitch = __toESM(require("./component/LanguageSwitch"));
|
|
81
82
|
var import_ThemeToggle = __toESM(require("./component/ThemeToggle"));
|
|
82
83
|
var import_utils = require("./utils");
|
|
@@ -145,6 +146,7 @@ const NAV_ITEMS = [
|
|
|
145
146
|
{ key: "proxy", i18nKey: "app.nav.proxy" },
|
|
146
147
|
{ key: "dependency", i18nKey: "app.nav.dependency" },
|
|
147
148
|
{ key: "share", i18nKey: "app.nav.share" },
|
|
149
|
+
{ key: "loadingTrace", i18nKey: "app.nav.loadingTrace" },
|
|
148
150
|
{ key: "performance", i18nKey: "app.nav.performance" }
|
|
149
151
|
];
|
|
150
152
|
const THEME_STORAGE_KEY = "mf-devtools-theme";
|
|
@@ -177,6 +179,7 @@ const InnerApp = (props) => {
|
|
|
177
179
|
const [inspectedTab, setInspectedTab] = (0, import_react.useState)(
|
|
178
180
|
window.targetTab
|
|
179
181
|
);
|
|
182
|
+
const [inspectedTabRefreshKey, setInspectedTabRefreshKey] = (0, import_react.useState)(0);
|
|
180
183
|
const [activePanel, setActivePanel] = (0, import_react.useState)("proxy");
|
|
181
184
|
const [selectedModuleId, setSelectedModuleId] = (0, import_react.useState)(null);
|
|
182
185
|
const [refreshing, setRefreshing] = (0, import_react.useState)(false);
|
|
@@ -284,10 +287,14 @@ const InnerApp = (props) => {
|
|
|
284
287
|
};
|
|
285
288
|
}, [applyModuleUpdate]);
|
|
286
289
|
(0, import_react.useEffect)(() => {
|
|
287
|
-
const updateActiveTab = (tabId) => __async(void 0, null, function* () {
|
|
290
|
+
const updateActiveTab = (tabId, options) => __async(void 0, null, function* () {
|
|
288
291
|
var _a, _b;
|
|
289
292
|
const tab = yield (0, import_utils.syncActiveTab)(tabId);
|
|
290
293
|
setInspectedTab(tab || void 0);
|
|
294
|
+
if ((options == null ? void 0 : options.status) === "loading") {
|
|
295
|
+
setInspectedTabRefreshKey((key) => key + 1);
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
291
298
|
if ((_a = window.__FEDERATION__) == null ? void 0 : _a.moduleInfo) {
|
|
292
299
|
applyModuleUpdate(cloneModuleInfo((_b = window.__FEDERATION__) == null ? void 0 : _b.moduleInfo));
|
|
293
300
|
}
|
|
@@ -295,7 +302,7 @@ const InnerApp = (props) => {
|
|
|
295
302
|
});
|
|
296
303
|
const onMessage = (message, _sender, _sendResponse) => {
|
|
297
304
|
if ((message == null ? void 0 : message.type) === import_messages.MESSAGE_ACTIVE_TAB_CHANGED) {
|
|
298
|
-
updateActiveTab(message.tabId);
|
|
305
|
+
updateActiveTab(message.tabId, { status: message.status });
|
|
299
306
|
}
|
|
300
307
|
};
|
|
301
308
|
chrome.runtime.onMessage.addListener(onMessage);
|
|
@@ -423,6 +430,14 @@ const InnerApp = (props) => {
|
|
|
423
430
|
)
|
|
424
431
|
}
|
|
425
432
|
);
|
|
433
|
+
case "loadingTrace":
|
|
434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
435
|
+
import_LoadingTrace.default,
|
|
436
|
+
{
|
|
437
|
+
tabId: inspectedTab == null ? void 0 : inspectedTab.id,
|
|
438
|
+
resetKey: inspectedTabRefreshKey
|
|
439
|
+
}
|
|
440
|
+
);
|
|
426
441
|
case "performance":
|
|
427
442
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_App2.default.placeholder, children: t("app.performance.placeholder") });
|
|
428
443
|
default:
|
package/dist/lib/App_module.css
CHANGED
|
@@ -76,10 +76,10 @@ body[arco-theme=dark] {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.activeTab_ae2ee {
|
|
79
|
-
border-color: rgba(
|
|
80
|
-
background: linear-gradient(135deg, rgba(
|
|
79
|
+
border-color: rgba(24, 24, 27, 0.28);
|
|
80
|
+
background: linear-gradient(135deg, rgba(24, 24, 27, 0.08), rgba(113, 113, 122, 0.08));
|
|
81
81
|
color: var(--color-text-1, #1e293b);
|
|
82
|
-
box-shadow: 0 12px 28px rgba(
|
|
82
|
+
box-shadow: 0 12px 28px rgba(24, 24, 27, 0.14);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.panel_ae2ee {
|