@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.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/es/App.css +13 -0
- package/dist/es/App.js +498 -0
- package/dist/es/App.module.js +5 -0
- package/dist/es/App_module.css +307 -0
- package/dist/es/component/DependencyGraph/index.js +204 -0
- package/dist/es/component/DependencyGraph/index.module.js +5 -0
- package/dist/es/component/DependencyGraph/index_module.css +100 -0
- package/dist/es/component/DependencyGraphItem/index.js +95 -0
- package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
- package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
- package/dist/es/component/Form/index.js +363 -0
- package/dist/es/component/Form/index.module.js +5 -0
- package/dist/es/component/Form/index_module.css +198 -0
- package/dist/es/component/LanguageSwitch.js +50 -0
- package/dist/es/component/Layout/index.js +470 -0
- package/dist/es/component/Layout/index.module.js +5 -0
- package/dist/es/component/Layout/index_module.css +68 -0
- 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/component/ModuleInfo/index.js +313 -0
- package/dist/es/component/ModuleInfo/index.module.js +5 -0
- package/dist/es/component/ModuleInfo/index_module.css +184 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +35 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
- package/dist/es/component/SharedDepsExplorer/index.js +636 -0
- package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
- package/dist/es/component/SharedDepsExplorer/index_module.css +467 -0
- package/dist/es/component/SharedDepsExplorer/share-utils.js +222 -0
- package/dist/es/component/ThemeToggle.js +19 -0
- package/dist/es/component/ThemeToggle.module.js +5 -0
- package/dist/es/component/ThemeToggle_module.css +12 -0
- package/dist/es/hooks/useDevtoolsTheme.js +77 -0
- package/dist/es/i18n/index.js +688 -0
- package/dist/es/init.js +8 -0
- package/dist/es/template/constant.js +51 -0
- package/dist/es/template/index.js +1 -0
- package/dist/es/utils/chrome/fast-refresh.js +342 -0
- package/dist/es/utils/chrome/index.js +284 -0
- package/dist/es/utils/chrome/messages.js +12 -0
- 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 -0
- package/dist/es/utils/chrome/post-message-init.js +5 -0
- package/dist/es/utils/chrome/post-message-listener.js +39 -0
- package/dist/es/utils/chrome/post-message-start.js +10 -0
- package/dist/es/utils/chrome/post-message.js +71 -0
- package/dist/es/utils/chrome/safe-post-message.js +124 -0
- package/dist/es/utils/chrome/snapshot-plugin.js +2 -0
- package/dist/es/utils/chrome/storage.js +50 -0
- package/dist/es/utils/data/index.js +59 -0
- package/dist/es/utils/index.js +4 -0
- package/dist/es/utils/sdk/graph.js +190 -0
- package/dist/es/utils/sdk/index.js +70 -0
- package/dist/es/utils/types/common.js +0 -0
- package/dist/es/utils/types/index.js +1 -0
- package/dist/es/vendor/basic-proxy-core.js +155 -0
- package/dist/es/worker/index.js +187 -0
- package/dist/lib/App.css +13 -0
- package/dist/lib/App.js +519 -0
- package/dist/lib/App.module.js +24 -0
- package/dist/lib/App_module.css +307 -0
- package/dist/lib/component/DependencyGraph/index.js +225 -0
- package/dist/lib/component/DependencyGraph/index.module.js +24 -0
- package/dist/lib/component/DependencyGraph/index_module.css +100 -0
- package/dist/lib/component/DependencyGraphItem/index.js +124 -0
- package/dist/lib/component/DependencyGraphItem/index.module.js +24 -0
- package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
- package/dist/lib/component/Form/index.js +372 -0
- package/dist/lib/component/Form/index.module.js +24 -0
- package/dist/lib/component/Form/index_module.css +198 -0
- package/dist/lib/component/LanguageSwitch.js +79 -0
- package/dist/lib/component/Layout/index.js +471 -0
- package/dist/lib/component/Layout/index.module.js +24 -0
- package/dist/lib/component/Layout/index_module.css +68 -0
- package/dist/lib/component/LoadingTrace/index.js +953 -0
- package/dist/lib/component/LoadingTrace/index.module.js +24 -0
- package/dist/lib/component/LoadingTrace/index_module.css +876 -0
- package/dist/lib/component/ModuleInfo/index.js +342 -0
- package/dist/lib/component/ModuleInfo/index.module.js +24 -0
- package/dist/lib/component/ModuleInfo/index_module.css +184 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +64 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +24 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
- package/dist/lib/component/SharedDepsExplorer/index.js +638 -0
- package/dist/lib/component/SharedDepsExplorer/index.module.js +24 -0
- package/dist/lib/component/SharedDepsExplorer/index_module.css +467 -0
- package/dist/lib/component/SharedDepsExplorer/share-utils.js +252 -0
- package/dist/lib/component/ThemeToggle.js +48 -0
- package/dist/lib/component/ThemeToggle.module.js +24 -0
- package/dist/lib/component/ThemeToggle_module.css +12 -0
- package/dist/lib/hooks/useDevtoolsTheme.js +100 -0
- package/dist/lib/i18n/index.js +721 -0
- package/dist/lib/init.js +8 -0
- package/dist/lib/template/constant.js +84 -0
- package/dist/lib/template/index.js +21 -0
- package/dist/lib/utils/chrome/fast-refresh.js +329 -0
- package/dist/lib/utils/chrome/index.js +321 -0
- package/dist/lib/utils/chrome/messages.js +39 -0
- package/dist/lib/utils/chrome/observability-plugin.js +85 -0
- package/dist/lib/utils/chrome/observability-shared.js +125 -0
- package/dist/lib/utils/chrome/observability.js +233 -0
- package/dist/lib/utils/chrome/override-remote.js +17 -0
- package/dist/lib/utils/chrome/post-message-init.js +5 -0
- package/dist/lib/utils/chrome/post-message-listener.js +36 -0
- package/dist/lib/utils/chrome/post-message-start.js +10 -0
- package/dist/lib/utils/chrome/post-message.js +91 -0
- package/dist/lib/utils/chrome/safe-post-message.js +147 -0
- package/dist/lib/utils/chrome/snapshot-plugin.js +17 -0
- package/dist/lib/utils/chrome/storage.js +71 -0
- package/dist/lib/utils/data/index.js +83 -0
- package/dist/lib/utils/index.js +27 -0
- package/dist/lib/utils/sdk/graph.js +213 -0
- package/dist/lib/utils/sdk/index.js +104 -0
- package/dist/lib/utils/types/common.js +15 -0
- package/dist/lib/utils/types/index.js +21 -0
- package/dist/lib/vendor/basic-proxy-core.js +147 -0
- package/dist/lib/worker/index.js +175 -0
- package/dist/types/src/App.d.ts +7 -0
- package/dist/types/src/component/DependencyGraph/index.d.ts +6 -0
- package/dist/types/src/component/DependencyGraphItem/index.d.ts +9 -0
- package/dist/types/src/component/Form/index.d.ts +21 -0
- package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
- package/dist/types/src/component/Layout/index.d.ts +15 -0
- package/dist/types/src/component/LoadingTrace/index.d.ts +6 -0
- package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
- package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
- package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
- package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +45 -0
- package/dist/types/src/component/ThemeToggle.d.ts +8 -0
- package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
- package/dist/types/src/i18n/index.d.ts +5 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/init.d.ts +12 -0
- package/dist/types/src/template/constant.d.ts +21 -0
- package/dist/types/src/template/index.d.ts +1 -0
- package/dist/types/src/utils/chrome/fast-refresh.d.ts +1 -0
- package/dist/types/src/utils/chrome/index.d.ts +19 -0
- package/dist/types/src/utils/chrome/messages.d.ts +5 -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/override-remote.d.ts +1 -0
- package/dist/types/src/utils/chrome/post-message-init.d.ts +1 -0
- package/dist/types/src/utils/chrome/post-message-listener.d.ts +1 -0
- package/dist/types/src/utils/chrome/post-message-start.d.ts +1 -0
- package/dist/types/src/utils/chrome/post-message.d.ts +1 -0
- package/dist/types/src/utils/chrome/safe-post-message.d.ts +1 -0
- package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +1 -0
- package/dist/types/src/utils/chrome/storage.d.ts +5 -0
- package/dist/types/src/utils/data/index.d.ts +10 -0
- package/dist/types/src/utils/index.d.ts +4 -0
- package/dist/types/src/utils/sdk/graph.d.ts +46 -0
- package/dist/types/src/utils/sdk/index.d.ts +11 -0
- package/dist/types/src/utils/types/common.d.ts +22 -0
- package/dist/types/src/utils/types/index.d.ts +1 -0
- package/dist/types/src/worker/index.d.ts +1 -0
- package/dist/types/stories/index.stories.d.ts +9 -0
- package/install-deps.bash +23 -0
- package/package.json +108 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const FormID = "FormID";
|
|
2
|
+
const ENABLEHMR = "enableHMR";
|
|
3
|
+
const ENABLE_CLIP = "enableClip";
|
|
4
|
+
const proxyFormField = "proxyFormField";
|
|
5
|
+
const defaultDataItem = {
|
|
6
|
+
key: "",
|
|
7
|
+
value: "",
|
|
8
|
+
checked: true
|
|
9
|
+
};
|
|
10
|
+
const defaultModuleData = {
|
|
11
|
+
proxyFormField: []
|
|
12
|
+
};
|
|
13
|
+
const statusInfo = {
|
|
14
|
+
noProxy: {
|
|
15
|
+
status: "noProxy",
|
|
16
|
+
message: "Modules are not currently proxied",
|
|
17
|
+
color: "#698cee"
|
|
18
|
+
},
|
|
19
|
+
processing: {
|
|
20
|
+
status: "processing",
|
|
21
|
+
message: "Obtaining remote module information",
|
|
22
|
+
color: "#FF7D00"
|
|
23
|
+
},
|
|
24
|
+
success: {
|
|
25
|
+
status: "success",
|
|
26
|
+
message: "The proxy configuration has taken effect and the corresponding page has been automatically refreshed.",
|
|
27
|
+
color: "#50b042"
|
|
28
|
+
},
|
|
29
|
+
error: {
|
|
30
|
+
status: "error",
|
|
31
|
+
message: "Calculating Snapshot failed, please confirm whether the package information is correct",
|
|
32
|
+
color: "#F53F3F"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const __ENABLE_FAST_REFRESH__ = "enableFastRefresh";
|
|
36
|
+
const __EAGER_SHARE__ = "eagerShare";
|
|
37
|
+
const BROWSER_ENV_KEY = "MF_ENV";
|
|
38
|
+
const __FEDERATION_DEVTOOLS__ = "__MF_DEVTOOLS__";
|
|
39
|
+
export {
|
|
40
|
+
BROWSER_ENV_KEY,
|
|
41
|
+
ENABLEHMR,
|
|
42
|
+
ENABLE_CLIP,
|
|
43
|
+
FormID,
|
|
44
|
+
__EAGER_SHARE__,
|
|
45
|
+
__ENABLE_FAST_REFRESH__,
|
|
46
|
+
__FEDERATION_DEVTOOLS__,
|
|
47
|
+
defaultDataItem,
|
|
48
|
+
defaultModuleData,
|
|
49
|
+
proxyFormField,
|
|
50
|
+
statusInfo
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./constant";
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
+
};
|
|
5
|
+
var __async = (__this, __arguments, generator) => {
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
var fulfilled = (value) => {
|
|
8
|
+
try {
|
|
9
|
+
step(generator.next(value));
|
|
10
|
+
} catch (e) {
|
|
11
|
+
reject(e);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
var rejected = (value) => {
|
|
15
|
+
try {
|
|
16
|
+
step(generator.throw(value));
|
|
17
|
+
} catch (e) {
|
|
18
|
+
reject(e);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
22
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
import { getUnpkgUrl } from "../index";
|
|
26
|
+
import { definePropertyGlobalVal } from "../sdk";
|
|
27
|
+
import {
|
|
28
|
+
__FEDERATION_DEVTOOLS__,
|
|
29
|
+
__EAGER_SHARE__,
|
|
30
|
+
__ENABLE_FAST_REFRESH__
|
|
31
|
+
} from "../../template/constant";
|
|
32
|
+
var require_fast_refresh = __commonJS({
|
|
33
|
+
"src/utils/chrome/fast-refresh.ts"(exports) {
|
|
34
|
+
var _a;
|
|
35
|
+
const SUPPORT_PKGS = ["react", "react-dom"];
|
|
36
|
+
const DEFAULT_SHARE_SCOPE = "default";
|
|
37
|
+
const DEFAULT_GLOBAL_KEY_MAP = {
|
|
38
|
+
react: "React",
|
|
39
|
+
"react-dom": "ReactDOM"
|
|
40
|
+
};
|
|
41
|
+
const sanitizeWindowKey = (value) => value.replace(/[^a-zA-Z0-9_$]/g, "_");
|
|
42
|
+
const getShareScopes = (scope) => Array.isArray(scope) && scope.length ? scope : [DEFAULT_SHARE_SCOPE];
|
|
43
|
+
const getDefaultGlobalKey = (pkgName) => DEFAULT_GLOBAL_KEY_MAP[pkgName];
|
|
44
|
+
const getScopedGlobalKey = (scope, pkgName) => `${sanitizeWindowKey(scope)}_${sanitizeWindowKey(pkgName)}`;
|
|
45
|
+
const getWindowValue = (key) => window[key];
|
|
46
|
+
const setWindowValue = (key, value) => {
|
|
47
|
+
window[key] = value;
|
|
48
|
+
};
|
|
49
|
+
const setScopeGlobals = (pkgName, scopes, source) => {
|
|
50
|
+
if (!source) {
|
|
51
|
+
return source;
|
|
52
|
+
}
|
|
53
|
+
scopes.forEach((scope) => {
|
|
54
|
+
setWindowValue(getScopedGlobalKey(scope, pkgName), source);
|
|
55
|
+
});
|
|
56
|
+
return source;
|
|
57
|
+
};
|
|
58
|
+
const getScopeGlobal = (pkgName, scopes) => {
|
|
59
|
+
for (const scope of scopes) {
|
|
60
|
+
const scopeGlobal = getWindowValue(getScopedGlobalKey(scope, pkgName));
|
|
61
|
+
if (scopeGlobal) {
|
|
62
|
+
return scopeGlobal;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return void 0;
|
|
66
|
+
};
|
|
67
|
+
const getEagerShareInfo = (eagerShare) => {
|
|
68
|
+
if (!Array.isArray(eagerShare) || eagerShare.length < 2) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const [, version, scopes] = eagerShare;
|
|
72
|
+
if (typeof version !== "string") {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
version,
|
|
77
|
+
scopes: getShareScopes(scopes)
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
const updateEagerShareInfo = (devtoolsMessage2, pkgName, version, scopes) => {
|
|
81
|
+
const existing = getEagerShareInfo(devtoolsMessage2[__EAGER_SHARE__]);
|
|
82
|
+
const mergedScopes = Array.from(
|
|
83
|
+
/* @__PURE__ */ new Set([...(existing == null ? void 0 : existing.scopes) || [], ...scopes])
|
|
84
|
+
);
|
|
85
|
+
devtoolsMessage2[__EAGER_SHARE__] = [pkgName, version, mergedScopes];
|
|
86
|
+
return {
|
|
87
|
+
shouldReload: !existing || existing.version !== version
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
const requestUmdSourceSync = (url) => {
|
|
91
|
+
try {
|
|
92
|
+
const response = new XMLHttpRequest();
|
|
93
|
+
response.open("GET", url, false);
|
|
94
|
+
response.overrideMimeType("text/plain");
|
|
95
|
+
response.send();
|
|
96
|
+
if (response.status === 200) {
|
|
97
|
+
return response.responseText;
|
|
98
|
+
}
|
|
99
|
+
throw new Error(
|
|
100
|
+
`Failed to load module from ${url}: HTTP ${response.status}`
|
|
101
|
+
);
|
|
102
|
+
} catch (error) {
|
|
103
|
+
throw new Error(`Failed to fetch module from ${url}: ${error.message}`);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const requestUmdSource = (url) => new Promise((resolve, reject) => {
|
|
107
|
+
try {
|
|
108
|
+
const response = new XMLHttpRequest();
|
|
109
|
+
response.open("GET", url, true);
|
|
110
|
+
response.overrideMimeType("text/plain");
|
|
111
|
+
response.onload = () => {
|
|
112
|
+
if (response.status === 200) {
|
|
113
|
+
resolve(response.responseText);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
reject(
|
|
117
|
+
new Error(
|
|
118
|
+
`Failed to load module from ${url}: HTTP ${response.status}`
|
|
119
|
+
)
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
response.onerror = () => {
|
|
123
|
+
reject(new Error(`Failed to fetch module from ${url}`));
|
|
124
|
+
};
|
|
125
|
+
response.send();
|
|
126
|
+
} catch (error) {
|
|
127
|
+
reject(new Error(`Failed to fetch module from ${url}: ${error.message}`));
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
const createUmdSandbox = (pkgName, scopes) => {
|
|
131
|
+
const sandboxTarget = /* @__PURE__ */ Object.create(null);
|
|
132
|
+
const sandbox = new Proxy(sandboxTarget, {
|
|
133
|
+
get(target, key) {
|
|
134
|
+
if (typeof key === "symbol") {
|
|
135
|
+
return Reflect.get(target, key);
|
|
136
|
+
}
|
|
137
|
+
if (key in target) {
|
|
138
|
+
return target[key];
|
|
139
|
+
}
|
|
140
|
+
const value = window[key];
|
|
141
|
+
return typeof value === "function" ? value.bind(window) : value;
|
|
142
|
+
},
|
|
143
|
+
set(target, key, value) {
|
|
144
|
+
target[key] = value;
|
|
145
|
+
return true;
|
|
146
|
+
},
|
|
147
|
+
has(target, key) {
|
|
148
|
+
return key in target || key in window;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
sandboxTarget.window = sandbox;
|
|
152
|
+
sandboxTarget.self = sandbox;
|
|
153
|
+
sandboxTarget.globalThis = sandbox;
|
|
154
|
+
sandboxTarget.global = sandbox;
|
|
155
|
+
sandboxTarget.document = window.document;
|
|
156
|
+
if (pkgName === "react-dom") {
|
|
157
|
+
sandboxTarget.React = getScopeGlobal("react", scopes);
|
|
158
|
+
}
|
|
159
|
+
return sandbox;
|
|
160
|
+
};
|
|
161
|
+
const executeUmdModule = (scriptContent, pkgName, scopes) => {
|
|
162
|
+
const sandbox = createUmdSandbox(pkgName, scopes);
|
|
163
|
+
const moduleFunction = new Function(
|
|
164
|
+
"window",
|
|
165
|
+
"self",
|
|
166
|
+
"globalThis",
|
|
167
|
+
"global",
|
|
168
|
+
"document",
|
|
169
|
+
"exports",
|
|
170
|
+
"module",
|
|
171
|
+
"define",
|
|
172
|
+
"require",
|
|
173
|
+
scriptContent
|
|
174
|
+
);
|
|
175
|
+
moduleFunction.call(
|
|
176
|
+
sandbox,
|
|
177
|
+
sandbox,
|
|
178
|
+
sandbox,
|
|
179
|
+
sandbox,
|
|
180
|
+
sandbox,
|
|
181
|
+
sandbox.document,
|
|
182
|
+
void 0,
|
|
183
|
+
void 0,
|
|
184
|
+
void 0,
|
|
185
|
+
void 0
|
|
186
|
+
);
|
|
187
|
+
return sandbox[getDefaultGlobalKey(pkgName)];
|
|
188
|
+
};
|
|
189
|
+
const loadUmdModuleSync = (pkgName, version, scopes) => executeUmdModule(
|
|
190
|
+
requestUmdSourceSync(getUnpkgUrl(pkgName, version)),
|
|
191
|
+
pkgName,
|
|
192
|
+
scopes
|
|
193
|
+
);
|
|
194
|
+
const loadUmdModule = (pkgName, version, scopes) => __async(exports, null, function* () {
|
|
195
|
+
return executeUmdModule(
|
|
196
|
+
yield requestUmdSource(getUnpkgUrl(pkgName, version)),
|
|
197
|
+
pkgName,
|
|
198
|
+
scopes
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
const getDevtoolsMessage = () => {
|
|
202
|
+
const devtoolsMessageStr = localStorage.getItem(__FEDERATION_DEVTOOLS__);
|
|
203
|
+
if (devtoolsMessageStr) {
|
|
204
|
+
try {
|
|
205
|
+
return JSON.parse(devtoolsMessageStr);
|
|
206
|
+
} catch (e) {
|
|
207
|
+
console.debug("Fast Refresh Plugin Error: ", e);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return null;
|
|
211
|
+
};
|
|
212
|
+
const devtoolsMessage = getDevtoolsMessage();
|
|
213
|
+
const eagerShareInfo = getEagerShareInfo(devtoolsMessage == null ? void 0 : devtoolsMessage[__EAGER_SHARE__]);
|
|
214
|
+
if ((devtoolsMessage == null ? void 0 : devtoolsMessage[__ENABLE_FAST_REFRESH__]) && eagerShareInfo) {
|
|
215
|
+
const { version, scopes } = eagerShareInfo;
|
|
216
|
+
setScopeGlobals("react", scopes, loadUmdModuleSync("react", version, scopes));
|
|
217
|
+
setScopeGlobals(
|
|
218
|
+
"react-dom",
|
|
219
|
+
scopes,
|
|
220
|
+
loadUmdModuleSync("react-dom", version, scopes)
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
const fastRefreshPlugin = () => {
|
|
224
|
+
let orderResolve;
|
|
225
|
+
const orderPromise = new Promise((resolve) => {
|
|
226
|
+
orderResolve = resolve;
|
|
227
|
+
});
|
|
228
|
+
return {
|
|
229
|
+
name: "mf-fast-refresh-plugin",
|
|
230
|
+
beforeRegisterShare(args) {
|
|
231
|
+
var _a2;
|
|
232
|
+
const { pkgName, shared } = args;
|
|
233
|
+
if (!SUPPORT_PKGS.includes(pkgName)) {
|
|
234
|
+
return args;
|
|
235
|
+
}
|
|
236
|
+
const supportPkgName = pkgName;
|
|
237
|
+
const shareScopes = getShareScopes(shared.scope);
|
|
238
|
+
let enableFastRefresh = false;
|
|
239
|
+
let devtoolsMessage2 = {};
|
|
240
|
+
const devtoolsMessageStr = localStorage.getItem(__FEDERATION_DEVTOOLS__);
|
|
241
|
+
if (devtoolsMessageStr) {
|
|
242
|
+
try {
|
|
243
|
+
devtoolsMessage2 = JSON.parse(devtoolsMessageStr);
|
|
244
|
+
enableFastRefresh = devtoolsMessage2 == null ? void 0 : devtoolsMessage2[__ENABLE_FAST_REFRESH__];
|
|
245
|
+
} catch (e) {
|
|
246
|
+
console.debug("Fast Refresh Plugin Error: ", e);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (!enableFastRefresh) {
|
|
250
|
+
return args;
|
|
251
|
+
}
|
|
252
|
+
if (((_a2 = shared.shareConfig) == null ? void 0 : _a2.eager) || shared.lib) {
|
|
253
|
+
if (!(devtoolsMessage2 == null ? void 0 : devtoolsMessage2[__EAGER_SHARE__])) {
|
|
254
|
+
const eagerShareInfo2 = updateEagerShareInfo(
|
|
255
|
+
devtoolsMessage2,
|
|
256
|
+
pkgName,
|
|
257
|
+
shared.version,
|
|
258
|
+
shareScopes
|
|
259
|
+
);
|
|
260
|
+
localStorage.setItem(
|
|
261
|
+
__FEDERATION_DEVTOOLS__,
|
|
262
|
+
JSON.stringify(devtoolsMessage2)
|
|
263
|
+
);
|
|
264
|
+
if (eagerShareInfo2.shouldReload) {
|
|
265
|
+
window.location.reload();
|
|
266
|
+
}
|
|
267
|
+
} else {
|
|
268
|
+
updateEagerShareInfo(
|
|
269
|
+
devtoolsMessage2,
|
|
270
|
+
pkgName,
|
|
271
|
+
shared.version,
|
|
272
|
+
shareScopes
|
|
273
|
+
);
|
|
274
|
+
localStorage.setItem(
|
|
275
|
+
__FEDERATION_DEVTOOLS__,
|
|
276
|
+
JSON.stringify(devtoolsMessage2)
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
if (pkgName === "react-dom") {
|
|
280
|
+
shared.lib = () => getScopeGlobal(supportPkgName, shareScopes);
|
|
281
|
+
}
|
|
282
|
+
if (pkgName === "react") {
|
|
283
|
+
shared.lib = () => getScopeGlobal(supportPkgName, shareScopes);
|
|
284
|
+
}
|
|
285
|
+
return args;
|
|
286
|
+
}
|
|
287
|
+
let get;
|
|
288
|
+
if (pkgName === "react") {
|
|
289
|
+
get = () => loadUmdModule(supportPkgName, shared.version, shareScopes).then((moduleValue) => {
|
|
290
|
+
setScopeGlobals(supportPkgName, shareScopes, moduleValue);
|
|
291
|
+
return moduleValue;
|
|
292
|
+
}).then(() => {
|
|
293
|
+
orderResolve();
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
if (pkgName === "react-dom") {
|
|
297
|
+
get = () => orderPromise.then(
|
|
298
|
+
() => loadUmdModule(supportPkgName, shared.version, shareScopes)
|
|
299
|
+
).then((result) => {
|
|
300
|
+
setScopeGlobals(supportPkgName, shareScopes, result);
|
|
301
|
+
return result;
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
if (typeof get === "function") {
|
|
305
|
+
const finalGet = get;
|
|
306
|
+
if (pkgName === "react") {
|
|
307
|
+
shared.get = () => __async(this, null, function* () {
|
|
308
|
+
if (!getScopeGlobal(supportPkgName, shareScopes)) {
|
|
309
|
+
yield finalGet();
|
|
310
|
+
console.warn(
|
|
311
|
+
"[Module Federation HMR]: You are using Module Federation Devtools to debug online host, it will cause your project load Dev mode React and ReactDOM. If not in this mode, please disable it in Module Federation Devtools"
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
shared.lib = () => getScopeGlobal(supportPkgName, shareScopes);
|
|
315
|
+
return () => getScopeGlobal(supportPkgName, shareScopes);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
if (pkgName === "react-dom") {
|
|
319
|
+
shared.get = () => __async(this, null, function* () {
|
|
320
|
+
if (!getScopeGlobal(supportPkgName, shareScopes)) {
|
|
321
|
+
yield finalGet();
|
|
322
|
+
}
|
|
323
|
+
shared.lib = () => getScopeGlobal(supportPkgName, shareScopes);
|
|
324
|
+
return () => getScopeGlobal(supportPkgName, shareScopes);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return args;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
if (!(window == null ? void 0 : window.__FEDERATION__)) {
|
|
333
|
+
definePropertyGlobalVal(window, "__FEDERATION__", {});
|
|
334
|
+
definePropertyGlobalVal(window, "__VMOK__", window.__FEDERATION__);
|
|
335
|
+
}
|
|
336
|
+
if (!(window == null ? void 0 : window.__FEDERATION__.__GLOBAL_PLUGIN__)) {
|
|
337
|
+
window.__FEDERATION__.__GLOBAL_PLUGIN__ = [];
|
|
338
|
+
}
|
|
339
|
+
(_a = window.__FEDERATION__.__GLOBAL_PLUGIN__) == null ? void 0 : _a.push(fastRefreshPlugin());
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
export default require_fast_refresh();
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
import { FormID } from "../../template/constant";
|
|
41
|
+
import { definePropertyGlobalVal } from "../sdk";
|
|
42
|
+
import { sanitizePostMessagePayload } from "./safe-post-message";
|
|
43
|
+
export * from "./storage";
|
|
44
|
+
const isModuleInfoRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
45
|
+
const isModuleInfoSyncMessage = (value) => isModuleInfoRecord(value) && ("moduleInfo" in value || "updateModule" in value || "share" in value);
|
|
46
|
+
const normalizeModuleInfoPayload = (moduleInfo) => {
|
|
47
|
+
const sanitized = sanitizePostMessagePayload(moduleInfo);
|
|
48
|
+
if (!isModuleInfoRecord(sanitized)) {
|
|
49
|
+
return {};
|
|
50
|
+
}
|
|
51
|
+
return Object.entries(sanitized).reduce(
|
|
52
|
+
(moduleMap, [moduleId, snapshot]) => {
|
|
53
|
+
if (moduleId === "extendInfos" || isModuleInfoRecord(snapshot)) {
|
|
54
|
+
moduleMap[moduleId] = snapshot;
|
|
55
|
+
}
|
|
56
|
+
return moduleMap;
|
|
57
|
+
},
|
|
58
|
+
{}
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
const sleep = (num) => {
|
|
62
|
+
return new Promise((resolve) => {
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
resolve();
|
|
65
|
+
}, num);
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const injectPostMessage = (postMessageUrl) => {
|
|
69
|
+
const script = document.createElement("script");
|
|
70
|
+
script.src = postMessageUrl;
|
|
71
|
+
document.getElementsByTagName("head")[0].appendChild(script);
|
|
72
|
+
};
|
|
73
|
+
const TabInfo = {
|
|
74
|
+
currentTabId: 0
|
|
75
|
+
};
|
|
76
|
+
const setTargetTab = (tab) => {
|
|
77
|
+
if (!tab || typeof tab.id !== "number") {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
window.targetTab = tab;
|
|
81
|
+
TabInfo.currentTabId = tab.id;
|
|
82
|
+
};
|
|
83
|
+
const syncActiveTab = (tabId) => __async(void 0, null, function* () {
|
|
84
|
+
try {
|
|
85
|
+
if (typeof tabId === "number") {
|
|
86
|
+
const tab = yield chrome.tabs.get(tabId);
|
|
87
|
+
setTargetTab(tab);
|
|
88
|
+
return tab;
|
|
89
|
+
}
|
|
90
|
+
const tabs = yield getTabs({
|
|
91
|
+
active: true,
|
|
92
|
+
lastFocusedWindow: true
|
|
93
|
+
});
|
|
94
|
+
const activeTab = Array.isArray(tabs) ? tabs[0] : void 0;
|
|
95
|
+
setTargetTab(activeTab);
|
|
96
|
+
return activeTab;
|
|
97
|
+
} catch (error) {
|
|
98
|
+
console.warn("[Module Federation Devtools] syncActiveTab failed", error);
|
|
99
|
+
return void 0;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
function getCurrentTabId() {
|
|
103
|
+
return TabInfo.currentTabId;
|
|
104
|
+
}
|
|
105
|
+
function getInspectWindowTabId() {
|
|
106
|
+
return new Promise((resolve, reject) => {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
if ((_a = chrome == null ? void 0 : chrome.devtools) == null ? void 0 : _a.inspectedWindow) {
|
|
109
|
+
if (chrome.isDevMode) {
|
|
110
|
+
resolve(0);
|
|
111
|
+
}
|
|
112
|
+
chrome.devtools.inspectedWindow.eval(
|
|
113
|
+
'typeof window.__FEDERATION__ !== "undefined" || typeof window.__VMOK__ !== "undefined"',
|
|
114
|
+
function(info, error) {
|
|
115
|
+
const { tabId } = chrome.devtools.inspectedWindow;
|
|
116
|
+
getTabs().then((tabs) => {
|
|
117
|
+
const target = Array.isArray(tabs) ? tabs.find((tab) => tab.id === tabId) : void 0;
|
|
118
|
+
setTargetTab(target);
|
|
119
|
+
});
|
|
120
|
+
console.log(
|
|
121
|
+
"chrome.devtools.inspectedWindow.tabId",
|
|
122
|
+
chrome.devtools.inspectedWindow.tabId
|
|
123
|
+
);
|
|
124
|
+
TabInfo.currentTabId = tabId;
|
|
125
|
+
resolve(tabId);
|
|
126
|
+
if (error) {
|
|
127
|
+
reject(error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
} else {
|
|
132
|
+
if ((_b = window.targetTab) == null ? void 0 : _b.id) {
|
|
133
|
+
const tabId = window.targetTab.id;
|
|
134
|
+
TabInfo.currentTabId = tabId;
|
|
135
|
+
resolve(tabId);
|
|
136
|
+
} else {
|
|
137
|
+
throw Error(`can't get active tab`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
const refreshModuleInfo = () => __async(void 0, null, function* () {
|
|
143
|
+
var _a;
|
|
144
|
+
if (typeof window !== "undefined" && ((_a = window.__FEDERATION__) == null ? void 0 : _a.moduleInfo)) {
|
|
145
|
+
}
|
|
146
|
+
yield sleep(50);
|
|
147
|
+
const postMessageStartUrl = getUrl("post-message-start.js");
|
|
148
|
+
yield injectScript(injectPostMessage, false, postMessageStartUrl);
|
|
149
|
+
});
|
|
150
|
+
const getGlobalModuleInfo = (callback) => __async(void 0, null, function* () {
|
|
151
|
+
var _a, _b;
|
|
152
|
+
if (typeof window !== "undefined" && ((_a = window.__FEDERATION__) == null ? void 0 : _a.moduleInfo)) {
|
|
153
|
+
callback(normalizeModuleInfoPayload((_b = window.__FEDERATION__) == null ? void 0 : _b.moduleInfo));
|
|
154
|
+
}
|
|
155
|
+
yield sleep(300);
|
|
156
|
+
const listener = (message) => {
|
|
157
|
+
const { data } = message;
|
|
158
|
+
if (!isModuleInfoSyncMessage(data) || (data == null ? void 0 : data.appInfos)) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (!(window == null ? void 0 : window.__FEDERATION__)) {
|
|
162
|
+
definePropertyGlobalVal(window, "__FEDERATION__", {});
|
|
163
|
+
definePropertyGlobalVal(window, "__VMOK__", window.__FEDERATION__);
|
|
164
|
+
}
|
|
165
|
+
window.__FEDERATION__.originModuleInfo = "moduleInfo" in data ? normalizeModuleInfoPayload(data.moduleInfo) : normalizeModuleInfoPayload(
|
|
166
|
+
window.__FEDERATION__.originModuleInfo || window.__FEDERATION__.moduleInfo
|
|
167
|
+
);
|
|
168
|
+
const updateModule = data.updateModule;
|
|
169
|
+
if (isModuleInfoRecord(updateModule) && typeof updateModule.name === "string") {
|
|
170
|
+
const updateModuleName = updateModule.name;
|
|
171
|
+
const moduleIds = Object.keys(window.__FEDERATION__.originModuleInfo);
|
|
172
|
+
const shouldUpdate = !moduleIds.some(
|
|
173
|
+
(id) => id.includes(updateModuleName)
|
|
174
|
+
);
|
|
175
|
+
if (shouldUpdate) {
|
|
176
|
+
const destination = typeof updateModule.entry === "string" ? updateModule.entry : typeof updateModule.version === "string" ? updateModule.version : void 0;
|
|
177
|
+
if (destination) {
|
|
178
|
+
window.__FEDERATION__.originModuleInfo[`${updateModuleName}:${destination}`] = {
|
|
179
|
+
remoteEntry: destination,
|
|
180
|
+
version: destination
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (data == null ? void 0 : data.share) {
|
|
186
|
+
window.__FEDERATION__.__SHARE__ = sanitizePostMessagePayload(
|
|
187
|
+
data.share
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
window.__FEDERATION__.moduleInfo = normalizeModuleInfoPayload(
|
|
191
|
+
window.__FEDERATION__.originModuleInfo
|
|
192
|
+
);
|
|
193
|
+
console.log("getGlobalModuleInfo window", window.__FEDERATION__);
|
|
194
|
+
callback(window.__FEDERATION__.moduleInfo);
|
|
195
|
+
};
|
|
196
|
+
chrome.runtime.onMessage.addListener(listener);
|
|
197
|
+
yield refreshModuleInfo();
|
|
198
|
+
return () => chrome.runtime.onMessage.removeListener(listener);
|
|
199
|
+
});
|
|
200
|
+
const getTabs = (queryOptions = {}) => chrome.tabs.query(queryOptions);
|
|
201
|
+
const getScope = () => __async(void 0, null, function* () {
|
|
202
|
+
const activeTab = window.targetTab;
|
|
203
|
+
const tabId = activeTab == null ? void 0 : activeTab.id;
|
|
204
|
+
return tabId ? String(tabId) : "noScope";
|
|
205
|
+
});
|
|
206
|
+
const injectScript = (excuteScript, world = false, ...args) => __async(void 0, null, function* () {
|
|
207
|
+
yield getInspectWindowTabId();
|
|
208
|
+
return chrome.scripting.executeScript({
|
|
209
|
+
target: {
|
|
210
|
+
tabId: getCurrentTabId()
|
|
211
|
+
},
|
|
212
|
+
func: excuteScript,
|
|
213
|
+
world: world ? "MAIN" : "ISOLATED",
|
|
214
|
+
args
|
|
215
|
+
}).then((results) => {
|
|
216
|
+
var _a;
|
|
217
|
+
console.log("InjectScript success, excuteScript:", args);
|
|
218
|
+
if (Array.isArray(results) && results.length) {
|
|
219
|
+
return (_a = results[0]) == null ? void 0 : _a.result;
|
|
220
|
+
}
|
|
221
|
+
return void 0;
|
|
222
|
+
}).catch((e) => {
|
|
223
|
+
console.log(e, "InjectScript fail, excuteScript:", args);
|
|
224
|
+
return void 0;
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
const getUrl = (file) => {
|
|
228
|
+
try {
|
|
229
|
+
const pathSet = chrome.runtime.getURL(file).split("/");
|
|
230
|
+
const fileName = pathSet.pop();
|
|
231
|
+
pathSet.push("static", "js", fileName);
|
|
232
|
+
return pathSet.join("/");
|
|
233
|
+
} catch (e) {
|
|
234
|
+
return "";
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
const injectToast = (toastUtilUrl, e2eFlag) => {
|
|
238
|
+
const ele = document.querySelector(`[data-e2e=${e2eFlag}]`);
|
|
239
|
+
if (ele) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
const scriptToast = document.createElement("script");
|
|
243
|
+
scriptToast.src = toastUtilUrl;
|
|
244
|
+
scriptToast.dataset.e2e = e2eFlag;
|
|
245
|
+
document.getElementsByTagName("head")[0].appendChild(scriptToast);
|
|
246
|
+
};
|
|
247
|
+
const setChromeStorage = (formData) => {
|
|
248
|
+
getScope().then((scope) => __async(void 0, null, function* () {
|
|
249
|
+
const data = yield chrome.storage.sync.get("FormID");
|
|
250
|
+
const storeData = data[FormID];
|
|
251
|
+
const scopes = Object.keys(storeData || {});
|
|
252
|
+
let filterOutDatedData = storeData || {};
|
|
253
|
+
const { length } = scopes;
|
|
254
|
+
if (length >= 10) {
|
|
255
|
+
filterOutDatedData = scopes.slice(0, length - 3).reduce((memo, cur) => {
|
|
256
|
+
memo[cur] = storeData[cur];
|
|
257
|
+
return memo;
|
|
258
|
+
}, {});
|
|
259
|
+
}
|
|
260
|
+
const existRules = storeData == null ? void 0 : storeData[scope];
|
|
261
|
+
chrome.storage.sync.set({
|
|
262
|
+
[FormID]: __spreadProps(__spreadValues({}, filterOutDatedData), {
|
|
263
|
+
[scope]: __spreadValues(__spreadValues({}, existRules), formData)
|
|
264
|
+
})
|
|
265
|
+
});
|
|
266
|
+
}));
|
|
267
|
+
};
|
|
268
|
+
export {
|
|
269
|
+
TabInfo,
|
|
270
|
+
getCurrentTabId,
|
|
271
|
+
getGlobalModuleInfo,
|
|
272
|
+
getInspectWindowTabId,
|
|
273
|
+
getScope,
|
|
274
|
+
getTabs,
|
|
275
|
+
getUrl,
|
|
276
|
+
injectPostMessage,
|
|
277
|
+
injectScript,
|
|
278
|
+
injectToast,
|
|
279
|
+
normalizeModuleInfoPayload,
|
|
280
|
+
refreshModuleInfo,
|
|
281
|
+
setChromeStorage,
|
|
282
|
+
setTargetTab,
|
|
283
|
+
syncActiveTab
|
|
284
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const MESSAGE_OPEN_SIDE_PANEL = "mf-devtools/open-side-panel";
|
|
2
|
+
const MESSAGE_ACTIVE_TAB_CHANGED = "mf-devtools/active-tab-changed";
|
|
3
|
+
const MESSAGE_OBSERVABILITY_DEVTOOLS_EVENT = "mf-devtools/observability-event";
|
|
4
|
+
const OBSERVABILITY_DEVTOOLS_SOURCE = "module-federation/observability";
|
|
5
|
+
const OBSERVABILITY_DEVTOOLS_STORAGE_KEY = "__MF_DEVTOOLS_OBSERVABILITY_CONFIG__";
|
|
6
|
+
export {
|
|
7
|
+
MESSAGE_ACTIVE_TAB_CHANGED,
|
|
8
|
+
MESSAGE_OBSERVABILITY_DEVTOOLS_EVENT,
|
|
9
|
+
MESSAGE_OPEN_SIDE_PANEL,
|
|
10
|
+
OBSERVABILITY_DEVTOOLS_SOURCE,
|
|
11
|
+
OBSERVABILITY_DEVTOOLS_STORAGE_KEY
|
|
12
|
+
};
|