@module-federation/devtools 2.9.0 → 2.9.2
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 +125 -0
- package/dist/es/App.js +6 -1
- package/dist/es/App.module.js +1 -1
- package/dist/es/App_module.css +106 -0
- package/dist/es/component/Form/index_module.css +40 -0
- package/dist/es/component/Layout/index.js +38 -21
- package/dist/es/component/Layout/index_module.css +30 -0
- package/dist/es/utils/chrome/fast-refresh.js +84 -5
- package/dist/es/utils/chrome/index.js +4 -1
- package/dist/es/utils/chrome/observability.js +1 -0
- package/dist/es/utils/chrome/webmcp-entry.js +2 -0
- package/dist/es/utils/chrome/webmcp.js +468 -0
- package/dist/es/utils/sdk/index.js +6 -0
- package/dist/es/worker/index.js +1 -1
- package/dist/lib/App.js +6 -1
- package/dist/lib/App.module.js +1 -1
- package/dist/lib/App_module.css +106 -0
- package/dist/lib/component/Form/index_module.css +40 -0
- package/dist/lib/component/Layout/index.js +38 -21
- package/dist/lib/component/Layout/index_module.css +30 -0
- package/dist/lib/utils/chrome/fast-refresh.js +83 -4
- package/dist/lib/utils/chrome/index.js +4 -1
- package/dist/lib/utils/chrome/observability.js +2 -0
- package/dist/lib/utils/chrome/webmcp-entry.js +2 -0
- package/dist/lib/utils/chrome/webmcp.js +484 -0
- package/dist/lib/utils/sdk/index.js +7 -0
- package/dist/lib/worker/index.js +1 -1
- package/dist/types/App.js +6 -1
- package/dist/types/App.module.js +1 -1
- package/dist/types/App_module.css +106 -0
- package/dist/types/component/Form/index_module.css +40 -0
- package/dist/types/component/Layout/index.js +38 -21
- package/dist/types/component/Layout/index_module.css +30 -0
- package/dist/types/src/utils/chrome/observability.d.ts +11 -0
- package/dist/types/src/utils/chrome/webmcp-entry.d.ts +1 -0
- package/dist/types/src/utils/chrome/webmcp.d.ts +25 -0
- package/dist/types/src/utils/sdk/index.d.ts +1 -0
- package/dist/types/utils/chrome/fast-refresh.js +83 -4
- package/dist/types/utils/chrome/index.js +4 -1
- package/dist/types/utils/chrome/observability.js +2 -0
- package/dist/types/utils/chrome/webmcp-entry.js +2 -0
- package/dist/types/utils/chrome/webmcp.js +484 -0
- package/dist/types/utils/sdk/index.js +7 -0
- package/dist/types/worker/index.js +1 -1
- package/package.json +6 -5
|
@@ -195,4 +195,44 @@
|
|
|
195
195
|
align-items: center;
|
|
196
196
|
justify-content: center;
|
|
197
197
|
display: flex;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
html[data-devtools-view="popup"] .wrapper_20b79,
|
|
201
|
+
html[data-devtools-view="popup"] .rules_20b79 {
|
|
202
|
+
gap: 10px;
|
|
203
|
+
}
|
|
204
|
+
html[data-devtools-view="popup"] .sectionHeader_20b79 {
|
|
205
|
+
padding: 8px;
|
|
206
|
+
gap: 8px;
|
|
207
|
+
flex-wrap: wrap;
|
|
208
|
+
}
|
|
209
|
+
html[data-devtools-view="popup"] .titleRow_20b79 {
|
|
210
|
+
font-size: 13px;
|
|
211
|
+
flex-wrap: wrap;
|
|
212
|
+
gap: 6px;
|
|
213
|
+
}
|
|
214
|
+
html[data-devtools-view="popup"] .subtitle_20b79 {
|
|
215
|
+
display: none;
|
|
216
|
+
}
|
|
217
|
+
html[data-devtools-view="popup"] .ruleCard_20b79 {
|
|
218
|
+
padding: 10px;
|
|
219
|
+
gap: 6px;
|
|
220
|
+
border-radius: 6px;
|
|
221
|
+
box-shadow: none;
|
|
222
|
+
}
|
|
223
|
+
html[data-devtools-view="popup"] .inputs_20b79 {
|
|
224
|
+
gap: 8px;
|
|
225
|
+
}
|
|
226
|
+
html[data-devtools-view="popup"] .field_20b79 {
|
|
227
|
+
min-width: 0;
|
|
228
|
+
margin-bottom: 0;
|
|
229
|
+
}
|
|
230
|
+
html[data-devtools-view="popup"] .field_20b79 .arco-select-view {
|
|
231
|
+
min-height: 32px;
|
|
232
|
+
border-radius: 5px;
|
|
233
|
+
padding: 2px 8px;
|
|
234
|
+
}
|
|
235
|
+
html[data-devtools-view="popup"] .emptyWrapper_20b79 {
|
|
236
|
+
padding: 16px;
|
|
237
|
+
border-radius: 6px;
|
|
198
238
|
}
|
|
@@ -211,7 +211,8 @@ const Layout = (props) => {
|
|
|
211
211
|
if (hadPreviousEffective) {
|
|
212
212
|
yield (0, import_utils.removeStorage)(import_sdk.MODULE_DEVTOOL_IDENTIFIER);
|
|
213
213
|
yield (0, import_utils.removeStorage)(import_constant.BROWSER_ENV_KEY);
|
|
214
|
-
yield (0, import_utils.
|
|
214
|
+
yield (0, import_utils.mergeStorage)(import_constant.__FEDERATION_DEVTOOLS__, "overrides", {});
|
|
215
|
+
yield (0, import_utils.mergeStorage)(import_constant.__FEDERATION_DEVTOOLS__, "proxyRules", rawRules);
|
|
215
216
|
yield (0, import_utils.injectScript)(import_utils.reloadPage, false);
|
|
216
217
|
setCondition(import_constant.statusInfo.noProxy);
|
|
217
218
|
lastEffectiveRulesRef.current = "";
|
|
@@ -257,6 +258,8 @@ const Layout = (props) => {
|
|
|
257
258
|
yield (0, import_utils.setStorage)(import_sdk.MODULE_DEVTOOL_IDENTIFIER, snapshotJson);
|
|
258
259
|
yield (0, import_utils.setStorage)(import_constant.BROWSER_ENV_KEY);
|
|
259
260
|
yield (0, import_utils.mergeStorage)(import_constant.__FEDERATION_DEVTOOLS__, "overrides", overrides);
|
|
261
|
+
yield (0, import_utils.mergeStorage)(import_constant.__FEDERATION_DEVTOOLS__, "proxyRules", rawRules);
|
|
262
|
+
yield (0, import_utils.mergeStorage)(import_constant.__FEDERATION_DEVTOOLS__, import_constant.ENABLE_CLIP, enableClip);
|
|
260
263
|
yield (0, import_utils.injectScript)(import_utils.reloadPage, false);
|
|
261
264
|
window.__FEDERATION__.moduleInfo = moduleInfo2;
|
|
262
265
|
onModuleInfoChange == null ? void 0 : onModuleInfoChange(moduleInfo2);
|
|
@@ -299,6 +302,10 @@ const Layout = (props) => {
|
|
|
299
302
|
if (typeof overridesState === "string" && overridesState) {
|
|
300
303
|
const parsedState = JSON.parse(overridesState);
|
|
301
304
|
const overrides = parsedState == null ? void 0 : parsedState.overrides;
|
|
305
|
+
setEnableClip(Boolean(parsedState == null ? void 0 : parsedState[import_constant.ENABLE_CLIP]));
|
|
306
|
+
setEnalbeHMR(
|
|
307
|
+
(parsedState == null ? void 0 : parsedState[import_constant.__ENABLE_FAST_REFRESH__]) ? "enable" : "disable"
|
|
308
|
+
);
|
|
302
309
|
if ((0, import_utils.isObject)(overrides)) {
|
|
303
310
|
const overrideRules = Object.entries(overrides).map(([key, value]) => ({
|
|
304
311
|
key,
|
|
@@ -308,12 +315,10 @@ const Layout = (props) => {
|
|
|
308
315
|
(rule) => Boolean(rule.key) && Boolean(rule.value)
|
|
309
316
|
);
|
|
310
317
|
const filteredRules = producer.length ? overrideRules.filter((rule) => producer.includes(rule.key)) : overrideRules;
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
overridesApplied = true;
|
|
316
|
-
}
|
|
318
|
+
storeData = __spreadProps(__spreadValues({}, storeData), {
|
|
319
|
+
[import_constant.proxyFormField]: Array.isArray(parsedState.proxyRules) ? parsedState.proxyRules : filteredRules
|
|
320
|
+
});
|
|
321
|
+
overridesApplied = true;
|
|
317
322
|
}
|
|
318
323
|
}
|
|
319
324
|
} catch (error) {
|
|
@@ -351,15 +356,25 @@ const Layout = (props) => {
|
|
|
351
356
|
return () => {
|
|
352
357
|
cancelled = true;
|
|
353
358
|
};
|
|
354
|
-
}, [moduleInfo, producerKey, form]);
|
|
359
|
+
}, [moduleInfo, producerKey, form, tabId]);
|
|
355
360
|
(0, import_react.useEffect)(() => {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
361
|
+
let cancelled = false;
|
|
362
|
+
(0, import_utils.getStorageValue)(import_constant.__FEDERATION_DEVTOOLS__).then((raw) => {
|
|
363
|
+
try {
|
|
364
|
+
const config = typeof raw === "string" ? JSON.parse(raw) : {};
|
|
365
|
+
if (!cancelled) {
|
|
366
|
+
setEnalbeHMR(
|
|
367
|
+
(config == null ? void 0 : config[import_constant.__ENABLE_FAST_REFRESH__]) ? "enable" : "disable"
|
|
368
|
+
);
|
|
369
|
+
setEnableClip(Boolean(config == null ? void 0 : config[import_constant.ENABLE_CLIP]));
|
|
370
|
+
}
|
|
371
|
+
} catch (e) {
|
|
360
372
|
}
|
|
361
373
|
});
|
|
362
|
-
|
|
374
|
+
return () => {
|
|
375
|
+
cancelled = true;
|
|
376
|
+
};
|
|
377
|
+
}, [tabId]);
|
|
363
378
|
(0, import_react.useEffect)(() => {
|
|
364
379
|
validateForm(form);
|
|
365
380
|
}, []);
|
|
@@ -400,20 +415,22 @@ const Layout = (props) => {
|
|
|
400
415
|
(0, import_utils.setChromeStorage)(formData);
|
|
401
416
|
run(formData);
|
|
402
417
|
};
|
|
403
|
-
const onHMRChange = (on) => {
|
|
418
|
+
const onHMRChange = (on) => __async(void 0, null, function* () {
|
|
404
419
|
setEnalbeHMR(on ? "enable" : "disable");
|
|
405
|
-
chrome.storage.sync.set({
|
|
420
|
+
yield chrome.storage.sync.set({
|
|
406
421
|
[import_constant.ENABLEHMR]: on
|
|
407
422
|
});
|
|
408
423
|
if (on) {
|
|
409
|
-
(0, import_utils.mergeStorage)(import_constant.__FEDERATION_DEVTOOLS__, import_constant.__ENABLE_FAST_REFRESH__, on);
|
|
424
|
+
yield (0, import_utils.mergeStorage)(import_constant.__FEDERATION_DEVTOOLS__, import_constant.__ENABLE_FAST_REFRESH__, on);
|
|
410
425
|
} else {
|
|
411
|
-
(0, import_utils.removeStorageKey)(import_constant.__FEDERATION_DEVTOOLS__, import_constant.__ENABLE_FAST_REFRESH__);
|
|
412
|
-
(0, import_utils.removeStorageKey)(import_constant.__FEDERATION_DEVTOOLS__, import_constant.__EAGER_SHARE__);
|
|
426
|
+
yield (0, import_utils.removeStorageKey)(import_constant.__FEDERATION_DEVTOOLS__, import_constant.__ENABLE_FAST_REFRESH__);
|
|
427
|
+
yield (0, import_utils.removeStorageKey)(import_constant.__FEDERATION_DEVTOOLS__, import_constant.__EAGER_SHARE__);
|
|
413
428
|
}
|
|
414
429
|
(0, import_utils.injectScript)(import_utils.reloadPage, false);
|
|
415
|
-
};
|
|
416
|
-
const onClipChange = (on) => {
|
|
430
|
+
});
|
|
431
|
+
const onClipChange = (on) => __async(void 0, null, function* () {
|
|
432
|
+
yield (0, import_utils.mergeStorage)(import_constant.__FEDERATION_DEVTOOLS__, import_constant.ENABLE_CLIP, on);
|
|
433
|
+
lastFormSignatureRef.current = "";
|
|
417
434
|
setEnableClip(on);
|
|
418
435
|
try {
|
|
419
436
|
if (tabId) {
|
|
@@ -423,7 +440,7 @@ const Layout = (props) => {
|
|
|
423
440
|
console.error(e);
|
|
424
441
|
}
|
|
425
442
|
run(form.getFieldsValue());
|
|
426
|
-
};
|
|
443
|
+
});
|
|
427
444
|
const remotePreview = producer.map((id) => {
|
|
428
445
|
const [, name] = id.split(":");
|
|
429
446
|
return name || id;
|
|
@@ -65,4 +65,34 @@
|
|
|
65
65
|
padding: 22px 24px;
|
|
66
66
|
border: 1px solid rgba(228, 228, 231, 0.5);
|
|
67
67
|
background: var(--color-bg-1, rgba(255, 255, 255, 0.9));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
html[data-devtools-view="popup"] .wrapper_084ab {
|
|
71
|
+
gap: 10px;
|
|
72
|
+
}
|
|
73
|
+
html[data-devtools-view="popup"] .summaryCard_084ab {
|
|
74
|
+
padding: 10px;
|
|
75
|
+
min-height: 0;
|
|
76
|
+
gap: 6px;
|
|
77
|
+
flex-direction: row;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
align-items: center;
|
|
80
|
+
}
|
|
81
|
+
html[data-devtools-view="popup"] .summaryHeader_084ab {
|
|
82
|
+
flex: 1 1 100%;
|
|
83
|
+
}
|
|
84
|
+
html[data-devtools-view="popup"] .summaryTitle_084ab {
|
|
85
|
+
font-size: 13px;
|
|
86
|
+
}
|
|
87
|
+
html[data-devtools-view="popup"] .summaryHint_084ab {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
html[data-devtools-view="popup"] .chip_084ab,
|
|
91
|
+
html[data-devtools-view="popup"] .moreChip_084ab,
|
|
92
|
+
html[data-devtools-view="popup"] .chipPlaceholder_084ab {
|
|
93
|
+
padding: 3px 7px;
|
|
94
|
+
border-radius: 4px;
|
|
95
|
+
}
|
|
96
|
+
html[data-devtools-view="popup"] .formSection_084ab {
|
|
97
|
+
padding: 10px;
|
|
68
98
|
}
|
|
@@ -101,6 +101,17 @@ export interface ObservabilityDevtoolsSnapshot {
|
|
|
101
101
|
reports: ObservabilityDevtoolsReport[];
|
|
102
102
|
hasUserObservabilityPlugin: boolean;
|
|
103
103
|
}
|
|
104
|
+
export declare const readSnapshotFromPage: (storageKey: string, context?: {
|
|
105
|
+
chromeScope?: string;
|
|
106
|
+
userPluginName?: string;
|
|
107
|
+
chromePluginNames?: string[];
|
|
108
|
+
}) => {
|
|
109
|
+
config: any;
|
|
110
|
+
stored: boolean;
|
|
111
|
+
scopes: string[];
|
|
112
|
+
reports: ObservabilityDevtoolsReport[];
|
|
113
|
+
hasUserObservabilityPlugin: any;
|
|
114
|
+
};
|
|
104
115
|
export declare const readObservabilityConfig: () => Promise<ObservabilityDevtoolsConfig>;
|
|
105
116
|
export declare const applyObservabilityConfig: (config: ObservabilityDevtoolsConfig) => Promise<any>;
|
|
106
117
|
export declare const disableObservabilityConfig: () => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Input = Record<string, unknown>;
|
|
2
|
+
export interface DevtoolsTool {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: Record<string, unknown>;
|
|
6
|
+
annotations: {
|
|
7
|
+
readOnlyHint: boolean;
|
|
8
|
+
};
|
|
9
|
+
execute: (input: Input) => Promise<{
|
|
10
|
+
content: Array<{
|
|
11
|
+
type: 'text';
|
|
12
|
+
text: string;
|
|
13
|
+
}>;
|
|
14
|
+
isError?: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
export interface ModelContext {
|
|
18
|
+
registerTool: (tool: DevtoolsTool) => void | Promise<void>;
|
|
19
|
+
unregisterTool?: (name: string) => void | Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export declare const createDevtoolsTools: () => DevtoolsTool[];
|
|
22
|
+
export declare const getModelContext: () => ModelContext | undefined;
|
|
23
|
+
export declare const registerDevtoolsWebMCP: (context?: ModelContext | undefined) => Promise<() => Promise<void>>;
|
|
24
|
+
export declare const startDevtoolsWebMCP: (retryMs?: number, maxAttempts?: number) => () => Promise<void>;
|
|
25
|
+
export {};
|
|
@@ -7,5 +7,6 @@ export declare const removeLocalStorageKey: (target: string, key: string) => voi
|
|
|
7
7
|
export declare const isObject: (target: any) => boolean;
|
|
8
8
|
export declare const reloadPage: () => void;
|
|
9
9
|
export declare const validateCustom: (schema: string) => boolean;
|
|
10
|
+
export declare const REACT_19_DEV_VERSION = "19.2.4";
|
|
10
11
|
export declare const getUnpkgUrl: (pkg: string, version: string) => string;
|
|
11
12
|
export declare const definePropertyGlobalVal: (target: Record<string, any>, key: string, val: any) => void;
|
|
@@ -200,6 +200,25 @@ const getDevtoolsMessage = () => {
|
|
|
200
200
|
return null;
|
|
201
201
|
};
|
|
202
202
|
const devtoolsMessage = getDevtoolsMessage();
|
|
203
|
+
if ((devtoolsMessage == null ? void 0 : devtoolsMessage[import_constant.__ENABLE_FAST_REFRESH__]) && !window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
|
204
|
+
let nextId = 0;
|
|
205
|
+
const renderers = /* @__PURE__ */ new Map();
|
|
206
|
+
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
|
|
207
|
+
supportsFiber: true,
|
|
208
|
+
renderers,
|
|
209
|
+
inject(renderer) {
|
|
210
|
+
const id = nextId++;
|
|
211
|
+
renderers.set(id, renderer);
|
|
212
|
+
return id;
|
|
213
|
+
},
|
|
214
|
+
onScheduleFiberRoot() {
|
|
215
|
+
},
|
|
216
|
+
onCommitFiberRoot() {
|
|
217
|
+
},
|
|
218
|
+
onCommitFiberUnmount() {
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
203
222
|
const eagerShareInfo = getEagerShareInfo(devtoolsMessage == null ? void 0 : devtoolsMessage[import_constant.__EAGER_SHARE__]);
|
|
204
223
|
if ((devtoolsMessage == null ? void 0 : devtoolsMessage[import_constant.__ENABLE_FAST_REFRESH__]) && eagerShareInfo) {
|
|
205
224
|
const { version, scopes } = eagerShareInfo;
|
|
@@ -211,6 +230,43 @@ if ((devtoolsMessage == null ? void 0 : devtoolsMessage[import_constant.__ENABLE
|
|
|
211
230
|
);
|
|
212
231
|
}
|
|
213
232
|
const fastRefreshPlugin = () => {
|
|
233
|
+
const react19Pending = /* @__PURE__ */ new Map();
|
|
234
|
+
const loadReact19 = (pkg, scopes, sync = false) => {
|
|
235
|
+
const existing = getScopeGlobal(pkg, scopes);
|
|
236
|
+
if ((existing == null ? void 0 : existing.version) === import__.REACT_19_DEV_VERSION) {
|
|
237
|
+
return setScopeGlobals(pkg, scopes, existing);
|
|
238
|
+
}
|
|
239
|
+
const save = (library) => {
|
|
240
|
+
const cached = getScopeGlobal(pkg, scopes);
|
|
241
|
+
if ((cached == null ? void 0 : cached.version) === import__.REACT_19_DEV_VERSION)
|
|
242
|
+
return setScopeGlobals(pkg, scopes, cached);
|
|
243
|
+
if ((library == null ? void 0 : library.version) !== import__.REACT_19_DEV_VERSION)
|
|
244
|
+
throw new Error(`Expected development ${pkg}@${import__.REACT_19_DEV_VERSION}.`);
|
|
245
|
+
if (pkg === "react" && (typeof library.createElement !== "function" || !Object.isFrozen(library.createElement("div"))))
|
|
246
|
+
throw new Error("React provider is not a development build.");
|
|
247
|
+
return setScopeGlobals(pkg, scopes, library);
|
|
248
|
+
};
|
|
249
|
+
if (sync) {
|
|
250
|
+
if (pkg === "react-dom")
|
|
251
|
+
loadReact19("react", scopes, true);
|
|
252
|
+
return save(loadUmdModuleSync(pkg, import__.REACT_19_DEV_VERSION, scopes));
|
|
253
|
+
}
|
|
254
|
+
const key = `${pkg}:${JSON.stringify([...scopes].sort())}`;
|
|
255
|
+
let pending = react19Pending.get(key);
|
|
256
|
+
if (!pending) {
|
|
257
|
+
pending = (() => __async(exports, null, function* () {
|
|
258
|
+
if (pkg === "react-dom")
|
|
259
|
+
yield loadReact19("react", scopes);
|
|
260
|
+
const cached = getScopeGlobal(pkg, scopes);
|
|
261
|
+
if ((cached == null ? void 0 : cached.version) === import__.REACT_19_DEV_VERSION)
|
|
262
|
+
return setScopeGlobals(pkg, scopes, cached);
|
|
263
|
+
return save(yield loadUmdModule(pkg, import__.REACT_19_DEV_VERSION, scopes));
|
|
264
|
+
}))();
|
|
265
|
+
react19Pending.set(key, pending);
|
|
266
|
+
void pending.catch(() => react19Pending.delete(key));
|
|
267
|
+
}
|
|
268
|
+
return pending;
|
|
269
|
+
};
|
|
214
270
|
let orderResolve;
|
|
215
271
|
const orderPromise = new Promise((resolve) => {
|
|
216
272
|
orderResolve = resolve;
|
|
@@ -218,12 +274,13 @@ const fastRefreshPlugin = () => {
|
|
|
218
274
|
return {
|
|
219
275
|
name: "mf-fast-refresh-plugin",
|
|
220
276
|
beforeRegisterShare(args) {
|
|
221
|
-
var _a2;
|
|
277
|
+
var _a2, _b;
|
|
222
278
|
const { pkgName, shared } = args;
|
|
223
|
-
|
|
279
|
+
const isReact19 = /^19\./.test(shared.version);
|
|
280
|
+
if (!SUPPORT_PKGS.includes(pkgName) && !(isReact19 && pkgName === "react-dom/client")) {
|
|
224
281
|
return args;
|
|
225
282
|
}
|
|
226
|
-
const supportPkgName = pkgName;
|
|
283
|
+
const supportPkgName = pkgName === "react-dom/client" ? "react-dom" : pkgName;
|
|
227
284
|
const shareScopes = getShareScopes(shared.scope);
|
|
228
285
|
let enableFastRefresh = false;
|
|
229
286
|
let devtoolsMessage2 = {};
|
|
@@ -239,7 +296,29 @@ const fastRefreshPlugin = () => {
|
|
|
239
296
|
if (!enableFastRefresh) {
|
|
240
297
|
return args;
|
|
241
298
|
}
|
|
242
|
-
if (
|
|
299
|
+
if (isReact19) {
|
|
300
|
+
shared.version = import__.REACT_19_DEV_VERSION;
|
|
301
|
+
shared.get = () => __async(this, null, function* () {
|
|
302
|
+
const library = yield loadReact19(supportPkgName, shareScopes);
|
|
303
|
+
return () => library;
|
|
304
|
+
});
|
|
305
|
+
if (((_a2 = shared.shareConfig) == null ? void 0 : _a2.eager) || shared.lib) {
|
|
306
|
+
const library = loadReact19(supportPkgName, shareScopes, true);
|
|
307
|
+
shared.lib = () => library;
|
|
308
|
+
updateEagerShareInfo(
|
|
309
|
+
devtoolsMessage2,
|
|
310
|
+
pkgName,
|
|
311
|
+
import__.REACT_19_DEV_VERSION,
|
|
312
|
+
shareScopes
|
|
313
|
+
);
|
|
314
|
+
localStorage.setItem(
|
|
315
|
+
import_constant.__FEDERATION_DEVTOOLS__,
|
|
316
|
+
JSON.stringify(devtoolsMessage2)
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
return args;
|
|
320
|
+
}
|
|
321
|
+
if (((_b = shared.shareConfig) == null ? void 0 : _b.eager) || shared.lib) {
|
|
243
322
|
if (!(devtoolsMessage2 == null ? void 0 : devtoolsMessage2[import_constant.__EAGER_SHARE__])) {
|
|
244
323
|
const eagerShareInfo2 = updateEagerShareInfo(
|
|
245
324
|
devtoolsMessage2,
|
|
@@ -188,7 +188,10 @@ const getGlobalModuleInfo = (callback) => __async(void 0, null, function* () {
|
|
|
188
188
|
callback(normalizeModuleInfoPayload((_b = window.__FEDERATION__) == null ? void 0 : _b.moduleInfo));
|
|
189
189
|
}
|
|
190
190
|
yield sleep(300);
|
|
191
|
-
const listener = (message) => {
|
|
191
|
+
const listener = (message, sender) => {
|
|
192
|
+
var _a2;
|
|
193
|
+
if (((_a2 = sender == null ? void 0 : sender.tab) == null ? void 0 : _a2.id) !== void 0 && sender.tab.id !== getCurrentTabId())
|
|
194
|
+
return;
|
|
192
195
|
const { data } = message;
|
|
193
196
|
if (!isModuleInfoSyncMessage(data) || (data == null ? void 0 : data.appInfos)) {
|
|
194
197
|
return;
|
|
@@ -43,6 +43,7 @@ __export(observability_exports, {
|
|
|
43
43
|
mergeObservabilityReports: () => mergeObservabilityReports,
|
|
44
44
|
readObservabilityConfig: () => readObservabilityConfig,
|
|
45
45
|
readObservabilitySnapshot: () => readObservabilitySnapshot,
|
|
46
|
+
readSnapshotFromPage: () => readSnapshotFromPage,
|
|
46
47
|
reloadInspectedPage: () => reloadInspectedPage
|
|
47
48
|
});
|
|
48
49
|
module.exports = __toCommonJS(observability_exports);
|
|
@@ -229,5 +230,6 @@ const getObservabilityReportScopeLabel = (report) => {
|
|
|
229
230
|
mergeObservabilityReports,
|
|
230
231
|
readObservabilityConfig,
|
|
231
232
|
readObservabilitySnapshot,
|
|
233
|
+
readSnapshotFromPage,
|
|
232
234
|
reloadInspectedPage
|
|
233
235
|
});
|