@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.
Files changed (48) hide show
  1. package/README.md +3 -0
  2. package/dist/es/App.js +17 -2
  3. package/dist/es/App_module.css +3 -3
  4. package/dist/es/component/LoadingTrace/index.js +944 -0
  5. package/dist/es/component/LoadingTrace/index.module.js +5 -0
  6. package/dist/es/component/LoadingTrace/index_module.css +876 -0
  7. package/dist/es/i18n/index.js +178 -0
  8. package/dist/es/utils/chrome/fast-refresh.js +297 -173
  9. package/dist/es/utils/chrome/index.js +3 -4
  10. package/dist/es/utils/chrome/messages.js +7 -1
  11. package/dist/es/utils/chrome/observability-plugin.js +93 -0
  12. package/dist/es/utils/chrome/observability-shared.js +99 -0
  13. package/dist/es/utils/chrome/observability.js +208 -0
  14. package/dist/es/utils/chrome/override-remote.js +2 -42
  15. package/dist/es/utils/chrome/post-message-listener.js +14 -0
  16. package/dist/es/utils/chrome/snapshot-plugin.js +2 -36
  17. package/dist/es/utils/data/index.js +5 -25
  18. package/dist/es/vendor/basic-proxy-core.js +155 -0
  19. package/dist/es/worker/index.js +27 -8
  20. package/dist/lib/App.js +17 -2
  21. package/dist/lib/App_module.css +3 -3
  22. package/dist/lib/component/LoadingTrace/index.js +954 -0
  23. package/dist/lib/component/LoadingTrace/index.module.js +25 -0
  24. package/dist/lib/component/LoadingTrace/index_module.css +876 -0
  25. package/dist/lib/i18n/index.js +178 -0
  26. package/dist/lib/utils/chrome/fast-refresh.js +250 -135
  27. package/dist/lib/utils/chrome/index.js +3 -4
  28. package/dist/lib/utils/chrome/messages.js +11 -2
  29. package/dist/lib/utils/chrome/observability-plugin.js +86 -0
  30. package/dist/lib/utils/chrome/observability-shared.js +126 -0
  31. package/dist/lib/utils/chrome/observability.js +234 -0
  32. package/dist/lib/utils/chrome/override-remote.js +5 -52
  33. package/dist/lib/utils/chrome/post-message-listener.js +11 -0
  34. package/dist/lib/utils/chrome/snapshot-plugin.js +5 -46
  35. package/dist/lib/utils/data/index.js +6 -28
  36. package/dist/lib/vendor/basic-proxy-core.js +147 -0
  37. package/dist/lib/worker/index.js +27 -8
  38. package/dist/types/src/component/LoadingTrace/index.d.ts +6 -0
  39. package/dist/types/src/utils/chrome/messages.d.ts +3 -0
  40. package/dist/types/src/utils/chrome/observability-plugin.d.ts +1 -0
  41. package/dist/types/src/utils/chrome/observability-shared.d.ts +41 -0
  42. package/dist/types/src/utils/chrome/observability.d.ts +110 -0
  43. package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +0 -3
  44. package/dist/types/src/utils/data/index.d.ts +0 -1
  45. package/package.json +4 -3
  46. package/dist/es/utils/data/snapshot.js +0 -82
  47. package/dist/lib/utils/data/snapshot.js +0 -107
  48. package/dist/types/src/utils/data/snapshot.d.ts +0 -3
@@ -11,6 +11,7 @@ const resources = {
11
11
  proxy: "Proxy",
12
12
  dependency: "Dependency graph",
13
13
  share: "Shared",
14
+ loadingTrace: "Loading trace",
14
15
  performance: "Performance"
15
16
  },
16
17
  header: {
@@ -229,6 +230,94 @@ const resources = {
229
230
  shared: "Shared",
230
231
  entry: "Entry",
231
232
  version: "Version"
233
+ },
234
+ loadingTrace: {
235
+ title: "Loading Trace",
236
+ empty: "No loading report yet",
237
+ emptyEnableChrome: "No observability plugin was detected on the page. Enable Chrome observability to start collecting loading reports.",
238
+ status: {
239
+ enabled: "Observability is enabled for the current page.",
240
+ disabled: "Observability is not enabled for the current page.",
241
+ unavailable: "Current page is unavailable.",
242
+ reloading: "Configuration saved. Reloading current page.",
243
+ synced: "Reports synced.",
244
+ noReports: "No report found on the current page.",
245
+ userPlugin: "Application observability plugin detected. Syncing existing reports."
246
+ },
247
+ confirm: {
248
+ observeTitle: "Start observability?",
249
+ updateTitle: "Update configuration?",
250
+ content: "The current tab will reload after the configuration is saved."
251
+ },
252
+ actions: {
253
+ observeNow: "Observe now",
254
+ updateConfig: "Update config",
255
+ config: "Configuration",
256
+ disable: "Disable",
257
+ refresh: "Sync",
258
+ export: "Export",
259
+ confirm: "Confirm",
260
+ cancel: "Cancel"
261
+ },
262
+ config: {
263
+ level: "Level",
264
+ levelTip: "Controls how much event detail is kept. Verbose keeps the full timeline, summary keeps key results, and error focuses on failures.",
265
+ verbose: "Verbose",
266
+ summary: "Summary",
267
+ error: "Error",
268
+ console: "Console hints",
269
+ consoleTip: "Prints lightweight hints in the inspected page console. Turn it off when the page console should stay clean."
270
+ },
271
+ stats: {
272
+ state: "State",
273
+ reports: "Reports",
274
+ events: "Events",
275
+ latest: "Latest outcome",
276
+ customTip: "Custom means the inspected page already registered its own observability plugin, so reports are read from the page instead of only from the Chrome collection plugin."
277
+ },
278
+ reports: {
279
+ search: "Filter reports",
280
+ noMatch: "No matching report",
281
+ success: "Success",
282
+ failed: "Failed",
283
+ pending: "Pending",
284
+ recovered: "Recovered",
285
+ eventRecovered: "Recovered",
286
+ limited: "Basic observability",
287
+ lowVersionTip: "The current MF runtime version is too low, so only basic loading events can be collected. Fine-grained remoteEntry, init, expose, factory, and shared phases may be missing. Upgrade to 2.5.0+ for the full loading trace.",
288
+ unknownVersionTip: "The current MF runtime version cannot be detected, so Chrome observability may only collect basic loading events. Fine-grained remoteEntry, init, expose, factory, and shared phases may be missing."
289
+ },
290
+ currentLoad: {
291
+ title: "Current loading",
292
+ remoteReport: "Remote",
293
+ sharedReport: "Shared dependency",
294
+ consumer: "Current consumer",
295
+ request: "Request",
296
+ producer: "Producer",
297
+ remoteName: "Remote name",
298
+ expose: "Expose",
299
+ shared: "Shared dependency",
300
+ provider: "Provider",
301
+ requiredVersion: "Required version",
302
+ selectedVersion: "Selected version",
303
+ availableVersions: "Available versions"
304
+ },
305
+ loadedBefore: {
306
+ title: "Other consumer loading records",
307
+ consumerCount: "{{count}} consumer(s)",
308
+ producerLoaded: "Same producer was loaded before",
309
+ exposeLoaded: "Current expose was loaded before",
310
+ exposeNotLoaded: "Current expose was not loaded before",
311
+ consumer: "Consumer",
312
+ status: "Status",
313
+ exposes: "Loaded exposes",
314
+ unknownConsumer: "Unknown consumer",
315
+ entryReady: "remoteEntry is available",
316
+ entryMissing: "remoteEntry is not available",
317
+ initReady: "container was initialized",
318
+ initMissing: "container was not initialized",
319
+ noExposes: "No expose record"
320
+ }
232
321
  }
233
322
  }
234
323
  },
@@ -240,6 +329,7 @@ const resources = {
240
329
  proxy: "代理配置",
241
330
  dependency: "依赖关系图",
242
331
  share: "共享依赖",
332
+ loadingTrace: "加载追踪",
243
333
  performance: "性能"
244
334
  },
245
335
  header: {
@@ -458,6 +548,94 @@ const resources = {
458
548
  shared: "共享依赖",
459
549
  entry: "入口",
460
550
  version: "版本"
551
+ },
552
+ loadingTrace: {
553
+ title: "加载追踪",
554
+ empty: "暂无加载报告",
555
+ emptyEnableChrome: "当前页面未检测到观测插件。可以开启 Chrome 采集来收集加载报告。",
556
+ status: {
557
+ enabled: "当前页面已开启加载追踪。",
558
+ disabled: "当前页面未开启加载追踪。",
559
+ unavailable: "当前页面暂不可用。",
560
+ reloading: "配置已保存,正在刷新当前页面。",
561
+ synced: "报告已同步。",
562
+ noReports: "当前页面还没有报告。",
563
+ userPlugin: "已检测到页面自带观测插件,正在同步已有报告。"
564
+ },
565
+ confirm: {
566
+ observeTitle: "开启加载追踪?",
567
+ updateTitle: "更新配置?",
568
+ content: "保存配置后会刷新当前标签页。"
569
+ },
570
+ actions: {
571
+ observeNow: "开启采集",
572
+ updateConfig: "更新配置",
573
+ config: "配置",
574
+ disable: "关闭",
575
+ refresh: "同步",
576
+ export: "导出",
577
+ confirm: "确认",
578
+ cancel: "取消"
579
+ },
580
+ config: {
581
+ level: "记录级别",
582
+ levelTip: "控制保留多少事件细节。完整会保留完整链路,摘要只保留关键结果,错误只关注失败。",
583
+ verbose: "完整",
584
+ summary: "摘要",
585
+ error: "错误",
586
+ console: "控制台提示",
587
+ consoleTip: "在被调试页面的控制台打印轻量提示。如果想保持页面控制台干净,可以关闭。"
588
+ },
589
+ stats: {
590
+ state: "状态",
591
+ reports: "报告",
592
+ events: "事件",
593
+ latest: "最新结果",
594
+ customTip: "Custom 表示当前页面已经自己注册了观测插件,报告会从页面已有插件中读取,不只依赖 Chrome 插件注入采集。"
595
+ },
596
+ reports: {
597
+ search: "过滤报告",
598
+ noMatch: "没有匹配的报告",
599
+ success: "成功",
600
+ failed: "失败",
601
+ pending: "进行中",
602
+ recovered: "兜底成功",
603
+ eventRecovered: "兜底",
604
+ limited: "基础观测",
605
+ lowVersionTip: "当前 MF 运行时版本较低,只能采集基础加载事件。remoteEntry、init、expose、factory、shared 等细阶段可能缺失。升级到 2.5.0+ 后可获得完整链路。",
606
+ unknownVersionTip: "当前 MF 运行时版本无法识别,Chrome 观测可能只能采集基础加载事件。remoteEntry、init、expose、factory、shared 等细阶段可能缺失。"
607
+ },
608
+ currentLoad: {
609
+ title: "当前加载",
610
+ remoteReport: "远程模块",
611
+ sharedReport: "共享依赖",
612
+ consumer: "当前消费方",
613
+ request: "请求",
614
+ producer: "生产者",
615
+ remoteName: "生产者名称",
616
+ expose: "Expose",
617
+ shared: "共享依赖",
618
+ provider: "提供方",
619
+ requiredVersion: "要求版本",
620
+ selectedVersion: "实际版本",
621
+ availableVersions: "可用版本"
622
+ },
623
+ loadedBefore: {
624
+ title: "其他消费方加载记录",
625
+ consumerCount: "{{count}} 个消费方",
626
+ producerLoaded: "同一生产者之前已被加载",
627
+ exposeLoaded: "当前 expose 之前已被加载",
628
+ exposeNotLoaded: "当前 expose 之前未被加载",
629
+ consumer: "消费方",
630
+ status: "状态",
631
+ exposes: "已加载 expose",
632
+ unknownConsumer: "未知消费方",
633
+ entryReady: "remoteEntry 已拿到",
634
+ entryMissing: "remoteEntry 未拿到",
635
+ initReady: "容器已初始化",
636
+ initMissing: "容器未初始化",
637
+ noExposes: "暂无导出记录"
638
+ }
461
639
  }
462
640
  }
463
641
  }