@module-federation/devtools 0.0.0-chore-bump-node-22-20260710161714

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.
Files changed (164) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/es/App.css +13 -0
  4. package/dist/es/App.js +498 -0
  5. package/dist/es/App.module.js +5 -0
  6. package/dist/es/App_module.css +307 -0
  7. package/dist/es/component/DependencyGraph/index.js +204 -0
  8. package/dist/es/component/DependencyGraph/index.module.js +5 -0
  9. package/dist/es/component/DependencyGraph/index_module.css +100 -0
  10. package/dist/es/component/DependencyGraphItem/index.js +95 -0
  11. package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
  12. package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
  13. package/dist/es/component/Form/index.js +363 -0
  14. package/dist/es/component/Form/index.module.js +5 -0
  15. package/dist/es/component/Form/index_module.css +198 -0
  16. package/dist/es/component/LanguageSwitch.js +50 -0
  17. package/dist/es/component/Layout/index.js +470 -0
  18. package/dist/es/component/Layout/index.module.js +5 -0
  19. package/dist/es/component/Layout/index_module.css +68 -0
  20. package/dist/es/component/LoadingTrace/index.js +944 -0
  21. package/dist/es/component/LoadingTrace/index.module.js +5 -0
  22. package/dist/es/component/LoadingTrace/index_module.css +876 -0
  23. package/dist/es/component/ModuleInfo/index.js +313 -0
  24. package/dist/es/component/ModuleInfo/index.module.js +5 -0
  25. package/dist/es/component/ModuleInfo/index_module.css +184 -0
  26. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +35 -0
  27. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
  28. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  29. package/dist/es/component/SharedDepsExplorer/index.js +636 -0
  30. package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
  31. package/dist/es/component/SharedDepsExplorer/index_module.css +467 -0
  32. package/dist/es/component/SharedDepsExplorer/share-utils.js +222 -0
  33. package/dist/es/component/ThemeToggle.js +19 -0
  34. package/dist/es/component/ThemeToggle.module.js +5 -0
  35. package/dist/es/component/ThemeToggle_module.css +12 -0
  36. package/dist/es/hooks/useDevtoolsTheme.js +77 -0
  37. package/dist/es/i18n/index.js +688 -0
  38. package/dist/es/init.js +8 -0
  39. package/dist/es/template/constant.js +51 -0
  40. package/dist/es/template/index.js +1 -0
  41. package/dist/es/utils/chrome/fast-refresh.js +342 -0
  42. package/dist/es/utils/chrome/index.js +284 -0
  43. package/dist/es/utils/chrome/messages.js +12 -0
  44. package/dist/es/utils/chrome/observability-plugin.js +93 -0
  45. package/dist/es/utils/chrome/observability-shared.js +99 -0
  46. package/dist/es/utils/chrome/observability.js +208 -0
  47. package/dist/es/utils/chrome/override-remote.js +2 -0
  48. package/dist/es/utils/chrome/post-message-init.js +5 -0
  49. package/dist/es/utils/chrome/post-message-listener.js +39 -0
  50. package/dist/es/utils/chrome/post-message-start.js +10 -0
  51. package/dist/es/utils/chrome/post-message.js +71 -0
  52. package/dist/es/utils/chrome/safe-post-message.js +124 -0
  53. package/dist/es/utils/chrome/snapshot-plugin.js +2 -0
  54. package/dist/es/utils/chrome/storage.js +50 -0
  55. package/dist/es/utils/data/index.js +59 -0
  56. package/dist/es/utils/index.js +4 -0
  57. package/dist/es/utils/sdk/graph.js +190 -0
  58. package/dist/es/utils/sdk/index.js +70 -0
  59. package/dist/es/utils/types/common.js +0 -0
  60. package/dist/es/utils/types/index.js +1 -0
  61. package/dist/es/vendor/basic-proxy-core.js +155 -0
  62. package/dist/es/worker/index.js +187 -0
  63. package/dist/lib/App.css +13 -0
  64. package/dist/lib/App.js +519 -0
  65. package/dist/lib/App.module.js +24 -0
  66. package/dist/lib/App_module.css +307 -0
  67. package/dist/lib/component/DependencyGraph/index.js +225 -0
  68. package/dist/lib/component/DependencyGraph/index.module.js +24 -0
  69. package/dist/lib/component/DependencyGraph/index_module.css +100 -0
  70. package/dist/lib/component/DependencyGraphItem/index.js +124 -0
  71. package/dist/lib/component/DependencyGraphItem/index.module.js +24 -0
  72. package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
  73. package/dist/lib/component/Form/index.js +372 -0
  74. package/dist/lib/component/Form/index.module.js +24 -0
  75. package/dist/lib/component/Form/index_module.css +198 -0
  76. package/dist/lib/component/LanguageSwitch.js +79 -0
  77. package/dist/lib/component/Layout/index.js +471 -0
  78. package/dist/lib/component/Layout/index.module.js +24 -0
  79. package/dist/lib/component/Layout/index_module.css +68 -0
  80. package/dist/lib/component/LoadingTrace/index.js +953 -0
  81. package/dist/lib/component/LoadingTrace/index.module.js +24 -0
  82. package/dist/lib/component/LoadingTrace/index_module.css +876 -0
  83. package/dist/lib/component/ModuleInfo/index.js +342 -0
  84. package/dist/lib/component/ModuleInfo/index.module.js +24 -0
  85. package/dist/lib/component/ModuleInfo/index_module.css +184 -0
  86. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +64 -0
  87. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +24 -0
  88. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  89. package/dist/lib/component/SharedDepsExplorer/index.js +638 -0
  90. package/dist/lib/component/SharedDepsExplorer/index.module.js +24 -0
  91. package/dist/lib/component/SharedDepsExplorer/index_module.css +467 -0
  92. package/dist/lib/component/SharedDepsExplorer/share-utils.js +252 -0
  93. package/dist/lib/component/ThemeToggle.js +48 -0
  94. package/dist/lib/component/ThemeToggle.module.js +24 -0
  95. package/dist/lib/component/ThemeToggle_module.css +12 -0
  96. package/dist/lib/hooks/useDevtoolsTheme.js +100 -0
  97. package/dist/lib/i18n/index.js +721 -0
  98. package/dist/lib/init.js +8 -0
  99. package/dist/lib/template/constant.js +84 -0
  100. package/dist/lib/template/index.js +21 -0
  101. package/dist/lib/utils/chrome/fast-refresh.js +329 -0
  102. package/dist/lib/utils/chrome/index.js +321 -0
  103. package/dist/lib/utils/chrome/messages.js +39 -0
  104. package/dist/lib/utils/chrome/observability-plugin.js +85 -0
  105. package/dist/lib/utils/chrome/observability-shared.js +125 -0
  106. package/dist/lib/utils/chrome/observability.js +233 -0
  107. package/dist/lib/utils/chrome/override-remote.js +17 -0
  108. package/dist/lib/utils/chrome/post-message-init.js +5 -0
  109. package/dist/lib/utils/chrome/post-message-listener.js +36 -0
  110. package/dist/lib/utils/chrome/post-message-start.js +10 -0
  111. package/dist/lib/utils/chrome/post-message.js +91 -0
  112. package/dist/lib/utils/chrome/safe-post-message.js +147 -0
  113. package/dist/lib/utils/chrome/snapshot-plugin.js +17 -0
  114. package/dist/lib/utils/chrome/storage.js +71 -0
  115. package/dist/lib/utils/data/index.js +83 -0
  116. package/dist/lib/utils/index.js +27 -0
  117. package/dist/lib/utils/sdk/graph.js +213 -0
  118. package/dist/lib/utils/sdk/index.js +104 -0
  119. package/dist/lib/utils/types/common.js +15 -0
  120. package/dist/lib/utils/types/index.js +21 -0
  121. package/dist/lib/vendor/basic-proxy-core.js +147 -0
  122. package/dist/lib/worker/index.js +175 -0
  123. package/dist/types/src/App.d.ts +7 -0
  124. package/dist/types/src/component/DependencyGraph/index.d.ts +6 -0
  125. package/dist/types/src/component/DependencyGraphItem/index.d.ts +9 -0
  126. package/dist/types/src/component/Form/index.d.ts +21 -0
  127. package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
  128. package/dist/types/src/component/Layout/index.d.ts +15 -0
  129. package/dist/types/src/component/LoadingTrace/index.d.ts +6 -0
  130. package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
  131. package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
  132. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
  133. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +45 -0
  134. package/dist/types/src/component/ThemeToggle.d.ts +8 -0
  135. package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
  136. package/dist/types/src/i18n/index.d.ts +5 -0
  137. package/dist/types/src/index.d.ts +1 -0
  138. package/dist/types/src/init.d.ts +12 -0
  139. package/dist/types/src/template/constant.d.ts +21 -0
  140. package/dist/types/src/template/index.d.ts +1 -0
  141. package/dist/types/src/utils/chrome/fast-refresh.d.ts +1 -0
  142. package/dist/types/src/utils/chrome/index.d.ts +19 -0
  143. package/dist/types/src/utils/chrome/messages.d.ts +5 -0
  144. package/dist/types/src/utils/chrome/observability-plugin.d.ts +1 -0
  145. package/dist/types/src/utils/chrome/observability-shared.d.ts +41 -0
  146. package/dist/types/src/utils/chrome/observability.d.ts +110 -0
  147. package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
  148. package/dist/types/src/utils/chrome/post-message-init.d.ts +1 -0
  149. package/dist/types/src/utils/chrome/post-message-listener.d.ts +1 -0
  150. package/dist/types/src/utils/chrome/post-message-start.d.ts +1 -0
  151. package/dist/types/src/utils/chrome/post-message.d.ts +1 -0
  152. package/dist/types/src/utils/chrome/safe-post-message.d.ts +1 -0
  153. package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +1 -0
  154. package/dist/types/src/utils/chrome/storage.d.ts +5 -0
  155. package/dist/types/src/utils/data/index.d.ts +10 -0
  156. package/dist/types/src/utils/index.d.ts +4 -0
  157. package/dist/types/src/utils/sdk/graph.d.ts +46 -0
  158. package/dist/types/src/utils/sdk/index.d.ts +11 -0
  159. package/dist/types/src/utils/types/common.d.ts +22 -0
  160. package/dist/types/src/utils/types/index.d.ts +1 -0
  161. package/dist/types/src/worker/index.d.ts +1 -0
  162. package/dist/types/stories/index.stories.d.ts +9 -0
  163. package/install-deps.bash +23 -0
  164. package/package.json +108 -0
@@ -0,0 +1,175 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+ var __async = (__this, __arguments, generator) => {
18
+ return new Promise((resolve, reject) => {
19
+ var fulfilled = (value) => {
20
+ try {
21
+ step(generator.next(value));
22
+ } catch (e) {
23
+ reject(e);
24
+ }
25
+ };
26
+ var rejected = (value) => {
27
+ try {
28
+ step(generator.throw(value));
29
+ } catch (e) {
30
+ reject(e);
31
+ }
32
+ };
33
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
34
+ step((generator = generator.apply(__this, __arguments)).next());
35
+ });
36
+ };
37
+ var import_messages = require("../utils/chrome/messages");
38
+ const SIDE_PANEL_PATH = "html/main/index.html";
39
+ const getSidePanel = () => chrome == null ? void 0 : chrome.sidePanel;
40
+ const resolveTabId = (tabId) => __async(exports, null, function* () {
41
+ if (typeof tabId === "number") {
42
+ return tabId;
43
+ }
44
+ const [activeTab] = yield chrome.tabs.query({
45
+ active: true,
46
+ lastFocusedWindow: true
47
+ });
48
+ return activeTab == null ? void 0 : activeTab.id;
49
+ });
50
+ const broadcastActiveTab = (tabId, payload) => {
51
+ try {
52
+ chrome.runtime.sendMessage(__spreadValues({
53
+ type: import_messages.MESSAGE_ACTIVE_TAB_CHANGED,
54
+ tabId
55
+ }, payload));
56
+ } catch (error) {
57
+ console.warn(
58
+ "[Module Federation Devtools] Failed to broadcast active tab",
59
+ error
60
+ );
61
+ }
62
+ };
63
+ const openSidePanel = (tabId) => __async(exports, null, function* () {
64
+ const sidePanel = getSidePanel();
65
+ if (!sidePanel) {
66
+ throw new Error("sidePanel api not available");
67
+ }
68
+ const targetTabId = yield resolveTabId(tabId);
69
+ if (typeof targetTabId !== "number") {
70
+ throw new Error("No active tab available");
71
+ }
72
+ yield sidePanel.setOptions({
73
+ tabId: targetTabId,
74
+ path: SIDE_PANEL_PATH,
75
+ enabled: true
76
+ });
77
+ if (sidePanel.open) {
78
+ yield sidePanel.open({ tabId: targetTabId });
79
+ }
80
+ broadcastActiveTab(targetTabId, { reason: "side-panel" });
81
+ if (sidePanel.getOptions) {
82
+ try {
83
+ const options = yield sidePanel.getOptions({ tabId: targetTabId });
84
+ broadcastActiveTab(targetTabId, { reason: "side-panel" });
85
+ return options;
86
+ } catch (error) {
87
+ console.warn("[Module Federation Devtools] getOptions failed", error);
88
+ }
89
+ }
90
+ return {
91
+ path: SIDE_PANEL_PATH,
92
+ enabled: true
93
+ };
94
+ });
95
+ chrome.runtime.onInstalled.addListener(() => {
96
+ const sidePanel = getSidePanel();
97
+ if (sidePanel == null ? void 0 : sidePanel.setPanelBehavior) {
98
+ sidePanel.setPanelBehavior({ openPanelOnActionClick: true }).catch((error) => {
99
+ console.warn(
100
+ "[Module Federation Devtools] setPanelBehavior failed",
101
+ error
102
+ );
103
+ });
104
+ }
105
+ });
106
+ chrome.action.onClicked.addListener((tab) => __async(exports, null, function* () {
107
+ try {
108
+ yield openSidePanel(tab.id);
109
+ } catch (error) {
110
+ console.warn(
111
+ "[Module Federation Devtools] Failed to open side panel",
112
+ error
113
+ );
114
+ }
115
+ }));
116
+ chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
117
+ if ((message == null ? void 0 : message.type) === import_messages.MESSAGE_OPEN_SIDE_PANEL) {
118
+ openSidePanel(message.tabId).then((options) => sendResponse({ ok: true, options })).catch(
119
+ (error) => sendResponse({ ok: false, message: String(error) })
120
+ );
121
+ return true;
122
+ }
123
+ return void 0;
124
+ });
125
+ chrome.tabs.onActivated.addListener((activeInfo) => __async(exports, null, function* () {
126
+ const tabId = activeInfo == null ? void 0 : activeInfo.tabId;
127
+ if (typeof tabId !== "number") {
128
+ return;
129
+ }
130
+ try {
131
+ broadcastActiveTab(tabId, { reason: "activated" });
132
+ } catch (error) {
133
+ console.warn(
134
+ "[Module Federation Devtools] Failed to handle tab activation",
135
+ error
136
+ );
137
+ }
138
+ }));
139
+ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
140
+ if (changeInfo.status !== "loading" && changeInfo.status !== "complete") {
141
+ return;
142
+ }
143
+ if (tab == null ? void 0 : tab.active) {
144
+ try {
145
+ broadcastActiveTab(tabId, {
146
+ reason: "updated",
147
+ status: changeInfo.status
148
+ });
149
+ } catch (error) {
150
+ console.warn(
151
+ "[Module Federation Devtools] Failed to handle tab update",
152
+ error
153
+ );
154
+ }
155
+ }
156
+ });
157
+ chrome.tabs.onRemoved.addListener((tabId) => __async(exports, null, function* () {
158
+ try {
159
+ const FormID = "FormID";
160
+ const data = yield chrome.storage.sync.get(FormID);
161
+ const storeData = data[FormID];
162
+ if (storeData == null ? void 0 : storeData[String(tabId)]) {
163
+ delete storeData[String(tabId)];
164
+ yield chrome.storage.sync.set({
165
+ [FormID]: storeData
166
+ });
167
+ }
168
+ } catch (error) {
169
+ console.warn(
170
+ "[Module Federation Devtools] Failed to handle tab removal",
171
+ error
172
+ );
173
+ }
174
+ }));
175
+ console.log("Module Federation Worker ready");
@@ -0,0 +1,7 @@
1
+ import '@arco-design/web-react/es/_util/react-19-adapter';
2
+ import './App.css';
3
+ import './init';
4
+ import { RootComponentProps } from './utils';
5
+ import '@arco-design/web-react/dist/css/arco.css';
6
+ declare const App: (props: RootComponentProps) => import("react").JSX.Element;
7
+ export default App;
@@ -0,0 +1,6 @@
1
+ import { GlobalModuleInfo } from '@module-federation/sdk';
2
+ import 'reactflow/dist/style.css';
3
+ declare const Graph: (props: {
4
+ snapshot: GlobalModuleInfo;
5
+ }) => import("react").JSX.Element;
6
+ export default Graph;
@@ -0,0 +1,9 @@
1
+ import 'reactflow/dist/style.css';
2
+ declare const GraphItem: (props: {
3
+ data: {
4
+ info?: string;
5
+ color?: string;
6
+ remote?: any;
7
+ };
8
+ }) => import("react").JSX.Element;
9
+ export default GraphItem;
@@ -0,0 +1,21 @@
1
+ import { SetStateAction, ReactNode } from 'react';
2
+ import { FormInstance } from '@arco-design/web-react';
3
+ import { FormItemStatus, RootComponentProps } from '../../utils';
4
+ interface FormProps {
5
+ form: FormInstance<any, any, string | number | symbol>;
6
+ condition: {
7
+ status: string;
8
+ message: string;
9
+ color: string;
10
+ };
11
+ formStatus: Array<FormItemStatus>;
12
+ setFormStatus: React.Dispatch<SetStateAction<FormItemStatus[]>>;
13
+ validateForm: any;
14
+ enableHMR: string;
15
+ onHMRChange: (on: boolean) => void;
16
+ enableClip: boolean;
17
+ onClipChange: (on: boolean) => void;
18
+ headerSlot?: ReactNode;
19
+ }
20
+ declare const FormComponent: (props: FormProps & RootComponentProps) => import("react").JSX.Element;
21
+ export default FormComponent;
@@ -0,0 +1,2 @@
1
+ declare const LanguageSwitch: () => import("react").JSX.Element;
2
+ export default LanguageSwitch;
@@ -0,0 +1,15 @@
1
+ import { GlobalModuleInfo } from '@module-federation/sdk';
2
+ import type { Federation } from '@module-federation/runtime';
3
+ import { RootComponentProps } from '../../utils';
4
+ declare global {
5
+ interface Window {
6
+ __FEDERATION__: Federation & {
7
+ originModuleInfo: GlobalModuleInfo;
8
+ moduleInfo: GlobalModuleInfo;
9
+ };
10
+ }
11
+ }
12
+ declare const Layout: (props: {
13
+ moduleInfo: GlobalModuleInfo;
14
+ } & RootComponentProps) => import("react").JSX.Element;
15
+ export default Layout;
@@ -0,0 +1,6 @@
1
+ interface LoadingTraceProps {
2
+ tabId?: number;
3
+ resetKey?: number;
4
+ }
5
+ declare const LoadingTrace: ({ tabId, resetKey }: LoadingTraceProps) => import("react").JSX.Element;
6
+ export default LoadingTrace;
@@ -0,0 +1,8 @@
1
+ import type { GlobalModuleInfo } from '@module-federation/sdk';
2
+ interface HomeProps {
3
+ moduleInfo: GlobalModuleInfo;
4
+ selectedModuleId: string | null;
5
+ onSelectModule: (moduleId: string) => void;
6
+ }
7
+ declare const Home: (props: HomeProps) => import("react").JSX.Element;
8
+ export default Home;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { LoadedStatus } from './share-utils';
3
+ interface FocusResult {
4
+ packageName: string;
5
+ version: string;
6
+ status: LoadedStatus;
7
+ providers: string[];
8
+ }
9
+ interface FocusResultDisplayProps {
10
+ focusResult: FocusResult | null;
11
+ hasData: boolean;
12
+ loadedStatusLabel: (status: LoadedStatus) => string;
13
+ }
14
+ declare const FocusResultDisplay: React.FC<FocusResultDisplayProps>;
15
+ export default FocusResultDisplay;
@@ -0,0 +1,6 @@
1
+ import type { GlobalShareScopeMap } from '@module-federation/runtime/types';
2
+ interface SharedDepsExplorerProps {
3
+ shareData?: GlobalShareScopeMap;
4
+ }
5
+ declare function SharedDepsExplorer({ shareData: shareDataProp, }: SharedDepsExplorerProps): import("react").JSX.Element;
6
+ export default SharedDepsExplorer;
@@ -0,0 +1,45 @@
1
+ import { GlobalShareScopeMap, Shared, SharedConfig } from '@module-federation/runtime/types';
2
+ export type LoadedStatus = 'loaded' | 'loading' | 'not-loaded' | 't-loaded' | 't-loading';
3
+ export type ReuseStatus = boolean;
4
+ export interface ShareStats {
5
+ totalProviders: number;
6
+ totalScopes: number;
7
+ totalPackages: number;
8
+ totalVersions: number;
9
+ loadedCount: number;
10
+ reusedCount: number;
11
+ }
12
+ export interface NormalizedSharedVersion {
13
+ id: string;
14
+ provider: string;
15
+ scope: string;
16
+ packageName: string;
17
+ version: string;
18
+ from: string;
19
+ useIn: string[];
20
+ shareConfig: SharedConfig;
21
+ treeShakingMode?: string;
22
+ strategy?: string;
23
+ loaded?: boolean;
24
+ loading?: unknown;
25
+ loadedStatus: LoadedStatus;
26
+ reuseStatus: ReuseStatus;
27
+ }
28
+ export declare function computeLoadedStatus(entry: Shared): LoadedStatus;
29
+ export declare function computeReuseStatus(entry: Shared): ReuseStatus;
30
+ export declare function normalizeShareData(raw: GlobalShareScopeMap | null | undefined): NormalizedSharedVersion[];
31
+ export declare function computeShareStats(versions: NormalizedSharedVersion[]): ShareStats;
32
+ export declare function groupByProviderScopePackage(versions: NormalizedSharedVersion[]): Record<string, Record<string, Record<string, NormalizedSharedVersion[]>>>;
33
+ export declare function getFilterOptions(versions: NormalizedSharedVersion[]): {
34
+ providers: string[];
35
+ scopes: string[];
36
+ packages: string[];
37
+ versions: string[];
38
+ };
39
+ export declare function findPackageProvider(versions: NormalizedSharedVersion[], packageName: string, version?: string): {
40
+ packageName: string;
41
+ version: string;
42
+ providers: string[];
43
+ status: LoadedStatus;
44
+ };
45
+ export declare function getReusedVersions(versions: NormalizedSharedVersion[]): NormalizedSharedVersion[];
@@ -0,0 +1,8 @@
1
+ import type { FC } from 'react';
2
+ import type { DevtoolsTheme } from '../hooks/useDevtoolsTheme';
3
+ interface ThemeToggleProps {
4
+ theme: DevtoolsTheme;
5
+ onToggle: () => void;
6
+ }
7
+ declare const ThemeToggle: FC<ThemeToggleProps>;
8
+ export default ThemeToggle;
@@ -0,0 +1,2 @@
1
+ export type DevtoolsTheme = 'light' | 'dark';
2
+ export declare const useDevtoolsTheme: () => DevtoolsTheme;
@@ -0,0 +1,5 @@
1
+ import i18n from 'i18next';
2
+ export declare const LANGUAGE_STORAGE_KEY = "mf-devtools-language";
3
+ declare const supportedLanguages: readonly ["zh-CN", "en"];
4
+ export type SupportedLanguage = (typeof supportedLanguages)[number];
5
+ export default i18n;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { GlobalModuleInfo } from '@module-federation/sdk';
2
+ declare global {
3
+ interface Window {
4
+ targetTab: chrome.tabs.Tab;
5
+ moduleHandler: (...args: Array<any>) => void;
6
+ }
7
+ }
8
+ declare module '@module-federation/runtime' {
9
+ interface Federation {
10
+ originModuleInfo: GlobalModuleInfo;
11
+ }
12
+ }
@@ -0,0 +1,21 @@
1
+ export declare const FormID = "FormID";
2
+ export declare const ENABLEHMR = "enableHMR";
3
+ export declare const ENABLE_CLIP = "enableClip";
4
+ export declare const proxyFormField = "proxyFormField";
5
+ export declare const defaultDataItem: {
6
+ key: string;
7
+ value: string;
8
+ checked: boolean;
9
+ };
10
+ export declare const defaultModuleData: {
11
+ proxyFormField: any[];
12
+ };
13
+ export declare const statusInfo: Record<string, {
14
+ status: string;
15
+ message: string;
16
+ color: string;
17
+ }>;
18
+ export declare const __ENABLE_FAST_REFRESH__ = "enableFastRefresh";
19
+ export declare const __EAGER_SHARE__ = "eagerShare";
20
+ export declare const BROWSER_ENV_KEY = "MF_ENV";
21
+ export declare const __FEDERATION_DEVTOOLS__ = "__MF_DEVTOOLS__";
@@ -0,0 +1 @@
1
+ export * from './constant';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import { GlobalModuleInfo } from '@module-federation/sdk';
2
+ export * from './storage';
3
+ export declare const normalizeModuleInfoPayload: (moduleInfo: unknown) => GlobalModuleInfo;
4
+ export declare const injectPostMessage: (postMessageUrl: string) => void;
5
+ export declare const TabInfo: {
6
+ currentTabId: number;
7
+ };
8
+ export declare const setTargetTab: (tab?: chrome.tabs.Tab | null) => void;
9
+ export declare const syncActiveTab: (tabId?: number) => Promise<chrome.tabs.Tab>;
10
+ export declare function getCurrentTabId(): number;
11
+ export declare function getInspectWindowTabId(): Promise<unknown>;
12
+ export declare const refreshModuleInfo: () => Promise<void>;
13
+ export declare const getGlobalModuleInfo: (callback: (moduleInfo: GlobalModuleInfo) => void) => Promise<() => void>;
14
+ export declare const getTabs: (queryOptions?: {}) => Promise<chrome.tabs.Tab[]>;
15
+ export declare const getScope: () => Promise<string>;
16
+ export declare const injectScript: (excuteScript: (...args: Array<any>) => any, world?: boolean, ...args: any) => Promise<any>;
17
+ export declare const getUrl: (file: string) => string;
18
+ export declare const injectToast: (toastUtilUrl: string, e2eFlag: string) => void;
19
+ export declare const setChromeStorage: (formData: Record<string, any>) => void;
@@ -0,0 +1,5 @@
1
+ export declare const MESSAGE_OPEN_SIDE_PANEL = "mf-devtools/open-side-panel";
2
+ export declare const MESSAGE_ACTIVE_TAB_CHANGED = "mf-devtools/active-tab-changed";
3
+ export declare const MESSAGE_OBSERVABILITY_DEVTOOLS_EVENT = "mf-devtools/observability-event";
4
+ export declare const OBSERVABILITY_DEVTOOLS_SOURCE = "module-federation/observability";
5
+ export declare const OBSERVABILITY_DEVTOOLS_STORAGE_KEY = "__MF_DEVTOOLS_OBSERVABILITY_CONFIG__";
@@ -0,0 +1,41 @@
1
+ export type ObservabilityDevtoolsLevel = 'error' | 'summary' | 'verbose';
2
+ export type ObservabilityDevtoolsMode = 'development' | 'production';
3
+ export interface ObservabilityDevtoolsConfig {
4
+ enabled: boolean;
5
+ level: ObservabilityDevtoolsLevel;
6
+ maxEvents: number;
7
+ console: boolean;
8
+ browser: {
9
+ enabled: boolean;
10
+ scope: string;
11
+ mode: ObservabilityDevtoolsMode;
12
+ };
13
+ trace: {
14
+ printStart: boolean;
15
+ };
16
+ react: {
17
+ injectLoadedCallback: boolean;
18
+ remoteIds: string[];
19
+ };
20
+ }
21
+ export declare const CHROME_OBSERVABILITY_SCOPE = "chrome_extension";
22
+ export declare const DEFAULT_OBSERVABILITY_DEVTOOLS_CONFIG: ObservabilityDevtoolsConfig;
23
+ export declare const normalizeObservabilityDevtoolsConfig: (value?: Partial<ObservabilityDevtoolsConfig> | Record<string, unknown> | null) => ObservabilityDevtoolsConfig;
24
+ export declare const createObservabilityPluginOptions: (config: ObservabilityDevtoolsConfig) => {
25
+ enabled: boolean;
26
+ level: ObservabilityDevtoolsLevel;
27
+ maxEvents: number;
28
+ console: boolean;
29
+ browser: {
30
+ enabled: boolean;
31
+ scope: string;
32
+ mode: ObservabilityDevtoolsMode;
33
+ };
34
+ trace: {
35
+ printStart: boolean;
36
+ };
37
+ devtools: {
38
+ enabled: boolean;
39
+ source: string;
40
+ };
41
+ };
@@ -0,0 +1,110 @@
1
+ import { type ObservabilityDevtoolsConfig } from './observability-shared';
2
+ export interface ObservabilityDevtoolsEvent {
3
+ traceId: string;
4
+ timestamp: number;
5
+ phase: string;
6
+ status: string;
7
+ requestId?: string;
8
+ lifecycle?: string;
9
+ message?: string;
10
+ runtimeVersion?: string;
11
+ remote?: {
12
+ name?: string;
13
+ entry?: string;
14
+ alias?: string;
15
+ };
16
+ shared?: {
17
+ name?: string;
18
+ shareScope?: string[];
19
+ requiredVersion?: string | false;
20
+ selectedVersion?: string;
21
+ availableVersions?: string[];
22
+ provider?: string;
23
+ reason?: string;
24
+ };
25
+ expose?: string;
26
+ duration?: number;
27
+ errorCode?: string;
28
+ errorName?: string;
29
+ errorMessage?: string;
30
+ ownerHint?: string;
31
+ recovered?: boolean;
32
+ cached?: boolean;
33
+ loadedBefore?: ObservabilityDevtoolsLoadedBefore;
34
+ }
35
+ export interface ObservabilityDevtoolsLoadedBefore {
36
+ producer: boolean;
37
+ expose: boolean;
38
+ consumers: Array<{
39
+ name?: string;
40
+ remoteEntryExports?: boolean;
41
+ containerInitialized?: boolean;
42
+ exposes?: string[];
43
+ }>;
44
+ }
45
+ export interface ObservabilityDevtoolsReport {
46
+ traceId: string;
47
+ status: string;
48
+ requestId?: string;
49
+ hostName?: string;
50
+ runtimeVersion?: string;
51
+ remote?: {
52
+ name?: string;
53
+ entry?: string;
54
+ alias?: string;
55
+ };
56
+ shared?: {
57
+ name?: string;
58
+ shareScope?: string[];
59
+ requiredVersion?: string | false;
60
+ selectedVersion?: string;
61
+ availableVersions?: string[];
62
+ provider?: string;
63
+ reason?: string;
64
+ };
65
+ expose?: string;
66
+ startedAt: number;
67
+ updatedAt: number;
68
+ duration: number;
69
+ failedPhase?: string;
70
+ errorCode?: string;
71
+ errorName?: string;
72
+ errorMessage?: string;
73
+ ownerHint?: string;
74
+ loadedBefore?: ObservabilityDevtoolsLoadedBefore;
75
+ events: ObservabilityDevtoolsEvent[];
76
+ summary?: {
77
+ outcome?: string;
78
+ runtimeLoaded?: boolean;
79
+ sharedResolved?: boolean;
80
+ componentLoaded?: boolean;
81
+ loadCompleted?: boolean;
82
+ recovered?: boolean;
83
+ lastPhase?: string;
84
+ };
85
+ diagnosis?: {
86
+ title?: string;
87
+ ownerHint?: string;
88
+ errorCode?: string;
89
+ actions?: Array<{
90
+ title?: string;
91
+ detail?: string;
92
+ }>;
93
+ warnings?: string[];
94
+ };
95
+ __scope?: string;
96
+ }
97
+ export interface ObservabilityDevtoolsSnapshot {
98
+ config: ObservabilityDevtoolsConfig;
99
+ stored: boolean;
100
+ scopes: string[];
101
+ reports: ObservabilityDevtoolsReport[];
102
+ hasUserObservabilityPlugin: boolean;
103
+ }
104
+ export declare const readObservabilityConfig: () => Promise<ObservabilityDevtoolsConfig>;
105
+ export declare const applyObservabilityConfig: (config: ObservabilityDevtoolsConfig) => Promise<any>;
106
+ export declare const disableObservabilityConfig: () => Promise<any>;
107
+ export declare const reloadInspectedPage: () => Promise<any>;
108
+ export declare const readObservabilitySnapshot: () => Promise<ObservabilityDevtoolsSnapshot>;
109
+ export declare const mergeObservabilityReports: (currentReports: ObservabilityDevtoolsReport[], incomingReports: ObservabilityDevtoolsReport[]) => ObservabilityDevtoolsReport[];
110
+ export declare const getObservabilityReportScopeLabel: (report: Pick<ObservabilityDevtoolsReport, "__scope">) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const sanitizePostMessagePayload: <T>(payload: T) => T;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const mergeStorage: (...args: any[]) => Promise<any>;
2
+ export declare const removeStorageKey: (...args: any[]) => Promise<any>;
3
+ export declare const removeStorage: (...args: any[]) => Promise<any>;
4
+ export declare const setStorage: (...args: any[]) => Promise<any>;
5
+ export declare const getStorageValue: (...args: any[]) => Promise<any>;
@@ -0,0 +1,10 @@
1
+ import { GlobalModuleInfo } from '@module-federation/sdk';
2
+ export declare const separateType: (moduleInfo: GlobalModuleInfo) => {
3
+ consumers: Record<string, import("@module-federation/sdk").ModuleInfo | import("@module-federation/sdk").ManifestProvider | import("@module-federation/sdk").PureEntryProvider>;
4
+ producer: string[];
5
+ };
6
+ export declare const getModuleInfo: (proxyRules: Array<any>) => Promise<{
7
+ status: string;
8
+ moduleInfo: GlobalModuleInfo;
9
+ overrides: Record<string, string>;
10
+ }>;
@@ -0,0 +1,4 @@
1
+ export * from './chrome';
2
+ export * from './sdk';
3
+ export * from './data';
4
+ export * from './types';