@fulgurjs/federation 6.12.12 → 6.13.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # 当前发布说明
2
2
 
3
+ ## 6.13.1
4
+
5
+ - **构建期共享门面支持通配符转发层展开(BI-FIX)**:`export * from '<shared>'` 形态的转发模块(vue-demi——pinia/@vueuse/vxe 等的常见传递依赖)进入 expose 门面改写闭包时,此前直接硬报错(`共享模块不支持 "export * from 'vue'"`),业务工程生产构建因此失败。现在构建期从被改写模块出发解析 shared 包的 ESM 入口(exports.import 优先、module/main 兜底;包名转发链如 vue → @vue/runtime-dom 递归解析),静态收集命名导出(不含 default——`export *` 语义本就不转出 default),把通配符改写为显式命名的门面转发;入口缺失或转发过深无法收集时保留原硬报错,不静默交付缺导出的产物。
6
+
7
+ ## 6.13.0
8
+
9
+ 诊断通路补强(DEMES5.5 从零迁移轮 P01/P02/P03/P05):
10
+
11
+ - **远程组件子树渲染错误可观测(MFU-020,P01)**:Vue `remoteComponent`/`createHostPages` 在组件边界以 `errorCaptured` 观测远程组件自身 setup/render/嵌套异步组件抛出的错误,经 `fulgurjs:error` 与 `onRemoteError` 上报(`details.phase='render'` 附 Vue 渲染阶段串,原始异常保留在 `cause`)——错误被业务 `errorHandler` 接管导致区域空白时不再完全不可见。默认不改变错误传播语义(业务 handler 照旧收到);新增可选 `renderErrorComponent`:提供后本边界接管展示(收到 `error`/`retry` props,retry 重新挂载远程组件),错误不再向全局传播。React `remoteComponent` 内置渲染边界同步上报 MFU-020。
12
+ - **MFU-001 重包装保留原始 cause(P02)**:container 获取失败与 expose 求值拒绝的运行时重包装现在 `wrapped.cause === original`(含非 Error 拒绝值原样保留);此前仅消息合并底层文本。带 code 的领域错误仍原样透传(身份不变)。
13
+ - **错误通知通路统一(P03)**:expose 拒绝(含 code 透传路径)、setup/onSession 执行失败(MFU-011/012)、onSession 缺 sessionKey(MFU-013)此前仅抛出不通知,现在统一进入 `fulgurjs:error`/`onRemoteError`。同一错误对象全页只报告一次(运行时与适配器 UI 占位跨边界去重,WeakSet 惰性挂 globalThis,不破坏按需裁剪);每次新的加载/渲染尝试产生新错误对象,仍各自可见。
14
+ - **错误提示不再把猜测写成事实(P05)**:默认错误占位的取证文案重写——按「已确认事实 / 可能原因 / 下一步」分层:前置校验类拒绝零网络请求属正常;零新请求只列「可能」是浏览器 import 失败缓存并给可执行判别步骤;外壳空白不再直接等同 shared.vue 实例分裂,改为列出候选原因与核对入口。
15
+ - runtime.js gzip 阈值 10752B → 10912B(实测 10845B)、react-adapter.js 4224B → 4360B(实测 4338B):P02/P03 的 cause 与通知为必要运行时增量,测量口径不变。
16
+
3
17
  ## 6.12.12
4
18
 
5
19
  - 五个可复制模板和包内模板统一精确依赖已发布的基础修复包 6.12.11,使用 registry 实际解析的锁文件;清理旧版本的安装年龄例外。
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-6OB47FSR.js";
4
4
  import {
5
5
  markBridgeMount
6
- } from "./chunk-YXGV4ZK6.js";
7
- import "./chunk-5ODWDP5I.js";
8
- import "./chunk-PPHNZBZX.js";
9
- import "./chunk-4YTQSOGQ.js";
6
+ } from "./chunk-NVJN2ARX.js";
7
+ import "./chunk-TSPZ3EQ4.js";
8
+ import "./chunk-MBH3TVAS.js";
9
+ import "./chunk-YHXQHZ3E.js";
10
10
 
11
11
  // src/bridge-app-react.ts
12
12
  import { Component, createElement, useEffect } from "react";
@@ -3,16 +3,16 @@ import {
3
3
  } from "./chunk-6OB47FSR.js";
4
4
  import {
5
5
  sameLocation
6
- } from "./chunk-UTL2F4KF.js";
6
+ } from "./chunk-OQ4CGWNL.js";
7
7
  import {
8
8
  markBridgeMount
9
- } from "./chunk-YXGV4ZK6.js";
9
+ } from "./chunk-NVJN2ARX.js";
10
10
  import {
11
11
  routingChannelNotProvidedError,
12
12
  routingSyncError
13
- } from "./chunk-5ODWDP5I.js";
14
- import "./chunk-PPHNZBZX.js";
15
- import "./chunk-4YTQSOGQ.js";
13
+ } from "./chunk-TSPZ3EQ4.js";
14
+ import "./chunk-MBH3TVAS.js";
15
+ import "./chunk-YHXQHZ3E.js";
16
16
 
17
17
  // src/bridge-router-sync.ts
18
18
  function collapseConsecutiveReports(report) {
@@ -8,10 +8,10 @@ import {
8
8
  releaseBridgeSession,
9
9
  resolveBridgeContext,
10
10
  withBridgeTimeout
11
- } from "./chunk-YXGV4ZK6.js";
12
- import "./chunk-5ODWDP5I.js";
13
- import "./chunk-PPHNZBZX.js";
14
- import "./chunk-4YTQSOGQ.js";
11
+ } from "./chunk-NVJN2ARX.js";
12
+ import "./chunk-TSPZ3EQ4.js";
13
+ import "./chunk-MBH3TVAS.js";
14
+ import "./chunk-YHXQHZ3E.js";
15
15
  export {
16
16
  acquireBridgeSession,
17
17
  assertBridgeContract,
@@ -10,8 +10,8 @@ import {
10
10
  routingNavigationError,
11
11
  routingProtocolError,
12
12
  routingSyncError
13
- } from "./chunk-5ODWDP5I.js";
14
- import "./chunk-4YTQSOGQ.js";
13
+ } from "./chunk-TSPZ3EQ4.js";
14
+ import "./chunk-YHXQHZ3E.js";
15
15
  export {
16
16
  BridgeErrorCodes,
17
17
  bridgeHostError,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RoutingChannel,
3
3
  assertBridgeRoutingProtocol
4
- } from "./chunk-UTL2F4KF.js";
4
+ } from "./chunk-OQ4CGWNL.js";
5
5
  import {
6
6
  acquireBridgeSession,
7
7
  assertBridgeContract,
@@ -10,14 +10,14 @@ import {
10
10
  releaseBridgeSession,
11
11
  resolveBridgeContext,
12
12
  withBridgeTimeout
13
- } from "./chunk-YXGV4ZK6.js";
13
+ } from "./chunk-NVJN2ARX.js";
14
14
  import {
15
15
  bridgeHostError
16
- } from "./chunk-5ODWDP5I.js";
16
+ } from "./chunk-TSPZ3EQ4.js";
17
17
  import {
18
18
  provideAppContext
19
- } from "./chunk-PPHNZBZX.js";
20
- import "./chunk-4YTQSOGQ.js";
19
+ } from "./chunk-MBH3TVAS.js";
20
+ import "./chunk-YHXQHZ3E.js";
21
21
 
22
22
  // src/bridge-host-react.ts
23
23
  import {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RoutingChannel,
3
3
  assertBridgeRoutingProtocol
4
- } from "./chunk-UTL2F4KF.js";
4
+ } from "./chunk-OQ4CGWNL.js";
5
5
  import {
6
6
  acquireBridgeSession,
7
7
  assertBridgeContract,
@@ -10,15 +10,15 @@ import {
10
10
  releaseBridgeSession,
11
11
  resolveBridgeContext,
12
12
  withBridgeTimeout
13
- } from "./chunk-YXGV4ZK6.js";
13
+ } from "./chunk-NVJN2ARX.js";
14
14
  import {
15
15
  bridgeHostError
16
- } from "./chunk-5ODWDP5I.js";
16
+ } from "./chunk-TSPZ3EQ4.js";
17
17
  import {
18
18
  clearAppContext,
19
19
  provideAppContext
20
- } from "./chunk-PPHNZBZX.js";
21
- import "./chunk-4YTQSOGQ.js";
20
+ } from "./chunk-MBH3TVAS.js";
21
+ import "./chunk-YHXQHZ3E.js";
22
22
 
23
23
  // src/bridge-host-vue.ts
24
24
  import { defineComponent, h, onActivated, onBeforeUnmount, onDeactivated, onMounted, ref, shallowRef, toRaw, watch } from "vue";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearAppContext
3
- } from "./chunk-PPHNZBZX.js";
4
- import "./chunk-4YTQSOGQ.js";
3
+ } from "./chunk-MBH3TVAS.js";
4
+ import "./chunk-YHXQHZ3E.js";
5
5
 
6
6
  // src/bridge-session-auto.ts
7
7
  import { effectScope, ref, shallowRef, watch } from "vue";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-TSXZ7TWA.js";
4
4
  import {
5
5
  ErrorCodes
6
- } from "./chunk-4YTQSOGQ.js";
6
+ } from "./chunk-YHXQHZ3E.js";
7
7
 
8
8
  // src/page-providers.ts
9
9
  function isComponentLoader(value) {
@@ -68,6 +68,25 @@ function noRenderableExportError(spec, inner) {
68
68
  }
69
69
  );
70
70
  }
71
+ function reportRemoteObservation(info) {
72
+ const rt = globalThis.__FULGURJS_RUNTIME__;
73
+ if (typeof rt?.reportRemoteError === "function") {
74
+ try {
75
+ rt.reportRemoteError(info);
76
+ return;
77
+ } catch {
78
+ }
79
+ }
80
+ try {
81
+ ;
82
+ globalThis.dispatchEvent?.(
83
+ new CustomEvent("fulgurjs:error", { detail: info })
84
+ );
85
+ } catch {
86
+ }
87
+ }
88
+ var remoteNameOf = (spec) => spec.slice(0, spec.indexOf("/")) || spec;
89
+ var moduleNameOf = (spec) => spec.includes("/") ? spec.slice(spec.indexOf("/") + 1) : void 0;
71
90
  function createHostPagesCore(options) {
72
91
  const { pages, remotePrefixes, deriveSpec, schema, strict, base } = options;
73
92
  definePages(pages, { deriveSpec, remotes: remotePrefixes, schema, strict });
@@ -130,5 +149,8 @@ export {
130
149
  readSessionKey,
131
150
  shouldResetSessionCache,
132
151
  noRenderableExportError,
152
+ reportRemoteObservation,
153
+ remoteNameOf,
154
+ moduleNameOf,
133
155
  createHostPagesCore
134
156
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FgError
3
- } from "./chunk-4YTQSOGQ.js";
3
+ } from "./chunk-YHXQHZ3E.js";
4
4
 
5
5
  // src/context.ts
6
6
  var ContextErrorCodes = {
@@ -3,10 +3,10 @@ import {
3
3
  bridgeSessionMismatchError,
4
4
  invalidBridgeContractError,
5
5
  invalidSessionKeyError
6
- } from "./chunk-5ODWDP5I.js";
6
+ } from "./chunk-TSPZ3EQ4.js";
7
7
  import {
8
8
  clearAppContext
9
- } from "./chunk-PPHNZBZX.js";
9
+ } from "./chunk-MBH3TVAS.js";
10
10
 
11
11
  // src/bridge-core.ts
12
12
  function assertBridgeContract(spec, mod) {
@@ -3,7 +3,7 @@ import {
3
3
  routingNavigationError,
4
4
  routingProtocolError,
5
5
  routingSyncError
6
- } from "./chunk-5ODWDP5I.js";
6
+ } from "./chunk-TSPZ3EQ4.js";
7
7
 
8
8
  // src/bridge-router-core.ts
9
9
  var MAX_REDIRECT_PER_REQUEST = 5;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FgError
3
- } from "./chunk-4YTQSOGQ.js";
3
+ } from "./chunk-YHXQHZ3E.js";
4
4
 
5
5
  // src/bridge-errors.ts
6
6
  var BridgeErrorCodes = {
@@ -41,7 +41,9 @@ var ErrorCodes = {
41
41
  /** 远程模块在组件消费边界导出的不是可渲染组件(适配器实测导出形态后报出) */
42
42
  COMPONENT_EXPORT_INVALID: "MFU-018",
43
43
  /** Vue 组件直渲染的渲染器与共享作用域实际收敛的 Vue 实例不一致(身份证据已证实) */
44
- VUE_RUNTIME_IDENTITY_MISMATCH: "MFU-019"
44
+ VUE_RUNTIME_IDENTITY_MISMATCH: "MFU-019",
45
+ /** 远程组件子树内部渲染错误(插件边界观测:setup/render/嵌套异步组件拒绝;原始异常保留在 cause) */
46
+ REMOTE_RENDER_ERROR: "MFU-020"
45
47
  };
46
48
 
47
49
  export {
package/dist/cli.js CHANGED
@@ -3187,7 +3187,7 @@ var RUNTIME_VERSION;
3187
3187
  var init_version = __esm({
3188
3188
  "src/version.ts"() {
3189
3189
  "use strict";
3190
- RUNTIME_VERSION = "6.12.12";
3190
+ RUNTIME_VERSION = "6.13.1";
3191
3191
  }
3192
3192
  });
3193
3193
 
package/dist/context.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  getAppContext,
5
5
  provideAppContext,
6
6
  requireAppContext
7
- } from "./chunk-PPHNZBZX.js";
8
- import "./chunk-4YTQSOGQ.js";
7
+ } from "./chunk-MBH3TVAS.js";
8
+ import "./chunk-YHXQHZ3E.js";
9
9
  export {
10
10
  ContextErrorCodes,
11
11
  clearAppContext,