@fulgurjs/federation 6.1.1 → 6.1.3
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 +28 -0
- package/dist/bridge-host-react.cjs +8 -0
- package/dist/bridge-host-react.js +1 -1
- package/dist/bridge-host-vue.cjs +8 -0
- package/dist/bridge-host-vue.js +1 -1
- package/dist/bridge-router-vue.js +3 -0
- package/dist/{chunk-77JZ6U6V.js → chunk-UUDAPII6.js} +8 -0
- package/dist/index.cjs +11 -3
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +11 -3
- package/dist/react-adapter.d.cts +3 -1
- package/dist/react-adapter.d.ts +3 -1
- package/dist/react.d.ts +4 -2
- package/dist/runtime-entry.d.ts +4 -2
- package/dist/runtime.js +1 -1
- package/dist/vue.d.ts +4 -2
- package/docs/en/reference/api.md +2 -2
- package/docs/en/reference/errors.md +1 -1
- package/docs/zh/reference/api.md +3 -3
- package/docs/zh/reference/errors.md +1 -1
- package/examples/templates/README.md +1 -1
- package/examples/templates/react-host-vue-remote/pnpm-lock.yaml +7 -7
- package/examples/templates/react-host-vue-remote/pnpm-workspace.yaml +1 -1
- package/examples/templates/react-host-vue-remote/react-host/package.json +1 -1
- package/examples/templates/react-host-vue-remote/vue-remote/package.json +1 -1
- package/examples/templates/react-react/host/package.json +1 -1
- package/examples/templates/react-react/host/tsconfig.json +1 -0
- package/examples/templates/react-react/pnpm-lock.yaml +7 -7
- package/examples/templates/react-react/pnpm-workspace.yaml +1 -1
- package/examples/templates/react-react/remote/package.json +1 -1
- package/examples/templates/react-react/remote/tsconfig.json +1 -0
- package/examples/templates/showcase/pnpm-lock.yaml +11 -11
- package/examples/templates/showcase/pnpm-workspace.yaml +1 -1
- package/examples/templates/showcase/react-host/package.json +1 -1
- package/examples/templates/showcase/react-remote/package.json +1 -1
- package/examples/templates/showcase/react-remote/src/bridge.tsx +5 -5
- package/examples/templates/showcase/vue-host/package.json +1 -1
- package/examples/templates/showcase/vue-remote/package.json +1 -1
- package/examples/templates/vue-host-react-remote/pnpm-lock.yaml +7 -7
- package/examples/templates/vue-host-react-remote/pnpm-workspace.yaml +1 -1
- package/examples/templates/vue-host-react-remote/react-remote/package.json +1 -1
- package/examples/templates/vue-host-react-remote/vue-host/package.json +1 -1
- package/examples/templates/vue-host-react-remote/vue-host/src/App.vue +1 -1
- package/examples/templates/vue-vue/host/package.json +1 -1
- package/examples/templates/vue-vue/host/tsconfig.json +1 -0
- package/examples/templates/vue-vue/pnpm-lock.yaml +7 -7
- package/examples/templates/vue-vue/pnpm-workspace.yaml +1 -1
- package/examples/templates/vue-vue/remote/package.json +1 -1
- package/examples/templates/vue-vue/remote/tsconfig.json +1 -0
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ importers:
|
|
|
11
11
|
react-host:
|
|
12
12
|
dependencies:
|
|
13
13
|
'@fulgurjs/federation':
|
|
14
|
-
specifier: 6.1.
|
|
15
|
-
version: 6.1.
|
|
14
|
+
specifier: 6.1.2
|
|
15
|
+
version: 6.1.2(react-dom@19.3.0(react@19.3.0))(react-router-dom@7.18.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(react@19.3.0)(vite@6.4.3)(vue-router@4.6.4(vue@3.5.43(typescript@5.9.3)))(vue@3.5.43(typescript@5.9.3))
|
|
16
16
|
react:
|
|
17
17
|
specifier: ^19.1.0
|
|
18
18
|
version: 19.3.0
|
|
@@ -45,8 +45,8 @@ importers:
|
|
|
45
45
|
react-remote:
|
|
46
46
|
dependencies:
|
|
47
47
|
'@fulgurjs/federation':
|
|
48
|
-
specifier: 6.1.
|
|
49
|
-
version: 6.1.
|
|
48
|
+
specifier: 6.1.2
|
|
49
|
+
version: 6.1.2(react-dom@19.3.0(react@19.3.0))(react-router-dom@7.18.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(react@19.3.0)(vite@6.4.3)(vue-router@4.6.4(vue@3.5.43(typescript@5.9.3)))(vue@3.5.43(typescript@5.9.3))
|
|
50
50
|
react:
|
|
51
51
|
specifier: ^19.1.0
|
|
52
52
|
version: 19.3.0
|
|
@@ -76,8 +76,8 @@ importers:
|
|
|
76
76
|
vue-host:
|
|
77
77
|
dependencies:
|
|
78
78
|
'@fulgurjs/federation':
|
|
79
|
-
specifier: 6.1.
|
|
80
|
-
version: 6.1.
|
|
79
|
+
specifier: 6.1.2
|
|
80
|
+
version: 6.1.2(react-dom@19.3.0(react@19.3.0))(react-router-dom@7.18.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(react@19.3.0)(vite@6.4.3)(vue-router@4.6.4(vue@3.5.43(typescript@5.9.3)))(vue@3.5.43(typescript@5.9.3))
|
|
81
81
|
react:
|
|
82
82
|
specifier: ^19.1.0
|
|
83
83
|
version: 19.3.0
|
|
@@ -107,8 +107,8 @@ importers:
|
|
|
107
107
|
vue-remote:
|
|
108
108
|
dependencies:
|
|
109
109
|
'@fulgurjs/federation':
|
|
110
|
-
specifier: 6.1.
|
|
111
|
-
version: 6.1.
|
|
110
|
+
specifier: 6.1.2
|
|
111
|
+
version: 6.1.2(react-dom@19.3.0(react@19.3.0))(react-router-dom@7.18.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(react@19.3.0)(vite@6.4.3)(vue-router@4.6.4(vue@3.5.43(typescript@5.9.3)))(vue@3.5.43(typescript@5.9.3))
|
|
112
112
|
vue:
|
|
113
113
|
specifier: ^3.5.13
|
|
114
114
|
version: 3.5.43(typescript@5.9.3)
|
|
@@ -526,8 +526,8 @@ packages:
|
|
|
526
526
|
cpu: [x64]
|
|
527
527
|
os: [win32]
|
|
528
528
|
|
|
529
|
-
'@fulgurjs/federation@6.1.
|
|
530
|
-
resolution: {integrity: sha512-
|
|
529
|
+
'@fulgurjs/federation@6.1.2':
|
|
530
|
+
resolution: {integrity: sha512-XT1xHERqoKPAYypa23XhZFzCu3txQmuzl5/3Ev1b0SxHrHRaVvcon732dv5rUVS/8YFJav+GAMsjGHjk4DMjAQ==}
|
|
531
531
|
engines: {node: '>=18'}
|
|
532
532
|
hasBin: true
|
|
533
533
|
peerDependencies:
|
|
@@ -1348,7 +1348,7 @@ snapshots:
|
|
|
1348
1348
|
'@esbuild/win32-x64@0.27.7':
|
|
1349
1349
|
optional: true
|
|
1350
1350
|
|
|
1351
|
-
'@fulgurjs/federation@6.1.
|
|
1351
|
+
'@fulgurjs/federation@6.1.2(react-dom@19.3.0(react@19.3.0))(react-router-dom@7.18.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(react@19.3.0)(vite@6.4.3)(vue-router@4.6.4(vue@3.5.43(typescript@5.9.3)))(vue@3.5.43(typescript@5.9.3))':
|
|
1352
1352
|
dependencies:
|
|
1353
1353
|
es-module-lexer: 1.7.0
|
|
1354
1354
|
esbuild: 0.27.7
|
|
@@ -4,7 +4,7 @@ packages:
|
|
|
4
4
|
- react-host
|
|
5
5
|
- react-remote
|
|
6
6
|
minimumReleaseAgeExclude:
|
|
7
|
-
- '@fulgurjs/federation@6.1.
|
|
7
|
+
- '@fulgurjs/federation@6.1.2'
|
|
8
8
|
# pnpm >=12 构建脚本批准(12 起弃用 onlyBuiltDependencies;pnpm 9-11 忽略本键:
|
|
9
9
|
# esbuild >=0.16 二进制经 optionalDependencies 平台包分发,postinstall 仅校验,不阻塞安装)
|
|
10
10
|
allowBuilds:
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* 受控路由 = createReactBridgeRouter(memory data router):工厂返回 RouterProvider 元素;
|
|
5
5
|
* 根路径 / 经 loader redirect 规范化到 /orders,由插件以 replace 同步宿主(无新增历史条目)。
|
|
6
6
|
*/
|
|
7
|
-
import type { ReactElement } from 'react'
|
|
8
7
|
import { redirect } from 'react-router-dom'
|
|
9
8
|
import { defineBridgeApp } from '@fulgurjs/federation/react'
|
|
10
9
|
import { createReactBridgeRouter } from '@fulgurjs/federation/react'
|
|
@@ -40,15 +39,16 @@ export default defineBridgeApp((props, ctx) => {
|
|
|
40
39
|
bindReporter(props)
|
|
41
40
|
const init = ctx.routing.getLocation()
|
|
42
41
|
const conn = createReactBridgeRouter(ctx.routing, routes, { signal: ctx.signal })
|
|
43
|
-
|
|
42
|
+
// 冷加载(模块级预热未落定的慢路径)时 element 是 LazyRouterProviderHost 包装、无 router
|
|
43
|
+
// prop——同步读 props.router 会静默跳过初始位置上报。routerReady 是就绪合同:fast 路径
|
|
44
|
+
// 同步已 resolve、slow 路径在惰性接线完成时 resolve,两条路径行为一致。
|
|
45
|
+
void conn.routerReady.then((router) => reportInitRedirect(router, init.pathname + init.search + init.hash))
|
|
44
46
|
return conn.element
|
|
45
47
|
}, { routing: true })
|
|
46
48
|
|
|
47
49
|
/** 初始位置上报:createMemoryRouter 同步初始化,'/' 的 loader 重定向在微任务内落定,
|
|
48
50
|
* 下一个宏任务读取即为最终初始位置(订阅式一次性上报会在首个用户导航时才误触发)。 */
|
|
49
|
-
function reportInitRedirect(
|
|
50
|
-
const router = element.props.router
|
|
51
|
-
if (!router) return
|
|
51
|
+
function reportInitRedirect(router: MemoryRouterProbe, initPath: string): void {
|
|
52
52
|
setTimeout(() => {
|
|
53
53
|
const current = router.state.location.pathname + router.state.location.search + router.state.location.hash
|
|
54
54
|
reportNav(
|
|
@@ -11,8 +11,8 @@ importers:
|
|
|
11
11
|
react-remote:
|
|
12
12
|
dependencies:
|
|
13
13
|
'@fulgurjs/federation':
|
|
14
|
-
specifier: 6.1.
|
|
15
|
-
version: 6.1.
|
|
14
|
+
specifier: 6.1.2
|
|
15
|
+
version: 6.1.2(react-dom@19.3.0(react@19.3.0))(react-router-dom@7.18.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(react@19.3.0)(vite@6.4.3)(vue@3.5.43(typescript@5.9.3))
|
|
16
16
|
react:
|
|
17
17
|
specifier: ^19.1.0
|
|
18
18
|
version: 19.3.0
|
|
@@ -42,8 +42,8 @@ importers:
|
|
|
42
42
|
vue-host:
|
|
43
43
|
dependencies:
|
|
44
44
|
'@fulgurjs/federation':
|
|
45
|
-
specifier: 6.1.
|
|
46
|
-
version: 6.1.
|
|
45
|
+
specifier: 6.1.2
|
|
46
|
+
version: 6.1.2(react-dom@19.3.0(react@19.3.0))(react-router-dom@7.18.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(react@19.3.0)(vite@6.4.3)(vue@3.5.43(typescript@5.9.3))
|
|
47
47
|
react:
|
|
48
48
|
specifier: ^19.1.0
|
|
49
49
|
version: 19.3.0
|
|
@@ -467,8 +467,8 @@ packages:
|
|
|
467
467
|
cpu: [x64]
|
|
468
468
|
os: [win32]
|
|
469
469
|
|
|
470
|
-
'@fulgurjs/federation@6.1.
|
|
471
|
-
resolution: {integrity: sha512-
|
|
470
|
+
'@fulgurjs/federation@6.1.2':
|
|
471
|
+
resolution: {integrity: sha512-XT1xHERqoKPAYypa23XhZFzCu3txQmuzl5/3Ev1b0SxHrHRaVvcon732dv5rUVS/8YFJav+GAMsjGHjk4DMjAQ==}
|
|
472
472
|
engines: {node: '>=18'}
|
|
473
473
|
hasBin: true
|
|
474
474
|
peerDependencies:
|
|
@@ -1221,7 +1221,7 @@ snapshots:
|
|
|
1221
1221
|
'@esbuild/win32-x64@0.27.7':
|
|
1222
1222
|
optional: true
|
|
1223
1223
|
|
|
1224
|
-
'@fulgurjs/federation@6.1.
|
|
1224
|
+
'@fulgurjs/federation@6.1.2(react-dom@19.3.0(react@19.3.0))(react-router-dom@7.18.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(react@19.3.0)(vite@6.4.3)(vue@3.5.43(typescript@5.9.3))':
|
|
1225
1225
|
dependencies:
|
|
1226
1226
|
es-module-lexer: 1.7.0
|
|
1227
1227
|
esbuild: 0.27.7
|
|
@@ -2,7 +2,7 @@ packages:
|
|
|
2
2
|
- vue-host
|
|
3
3
|
- react-remote
|
|
4
4
|
minimumReleaseAgeExclude:
|
|
5
|
-
- '@fulgurjs/federation@6.1.
|
|
5
|
+
- '@fulgurjs/federation@6.1.2'
|
|
6
6
|
# pnpm >=12 构建脚本批准(12 起弃用 onlyBuiltDependencies;pnpm 9-11 忽略本键:
|
|
7
7
|
# esbuild >=0.16 二进制经 optionalDependencies 平台包分发,postinstall 仅校验,不阻塞安装)
|
|
8
8
|
allowBuilds:
|
|
@@ -25,7 +25,7 @@ function handleReady(): void {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function nextFrame(): Promise<void> {
|
|
28
|
-
return new Promise((r) => requestAnimationFrame(() => r(
|
|
28
|
+
return new Promise((r) => requestAnimationFrame(() => r()))
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// 换账号推荐顺序(§4.3):受控 prop 置 null → 等卸载 → clearAppContext 清 A 残留
|
|
@@ -11,8 +11,8 @@ importers:
|
|
|
11
11
|
host:
|
|
12
12
|
dependencies:
|
|
13
13
|
'@fulgurjs/federation':
|
|
14
|
-
specifier: 6.1.
|
|
15
|
-
version: 6.1.
|
|
14
|
+
specifier: 6.1.2
|
|
15
|
+
version: 6.1.2(vite@6.4.3)(vue-router@4.6.4(vue@3.5.43(typescript@5.9.3)))(vue@3.5.43(typescript@5.9.3))
|
|
16
16
|
vue:
|
|
17
17
|
specifier: ^3.5.13
|
|
18
18
|
version: 3.5.43(typescript@5.9.3)
|
|
@@ -33,8 +33,8 @@ importers:
|
|
|
33
33
|
remote:
|
|
34
34
|
dependencies:
|
|
35
35
|
'@fulgurjs/federation':
|
|
36
|
-
specifier: 6.1.
|
|
37
|
-
version: 6.1.
|
|
36
|
+
specifier: 6.1.2
|
|
37
|
+
version: 6.1.2(vite@6.4.3)(vue-router@4.6.4(vue@3.5.43(typescript@5.9.3)))(vue@3.5.43(typescript@5.9.3))
|
|
38
38
|
vue:
|
|
39
39
|
specifier: ^3.5.13
|
|
40
40
|
version: 3.5.43(typescript@5.9.3)
|
|
@@ -380,8 +380,8 @@ packages:
|
|
|
380
380
|
cpu: [x64]
|
|
381
381
|
os: [win32]
|
|
382
382
|
|
|
383
|
-
'@fulgurjs/federation@6.1.
|
|
384
|
-
resolution: {integrity: sha512-
|
|
383
|
+
'@fulgurjs/federation@6.1.2':
|
|
384
|
+
resolution: {integrity: sha512-XT1xHERqoKPAYypa23XhZFzCu3txQmuzl5/3Ev1b0SxHrHRaVvcon732dv5rUVS/8YFJav+GAMsjGHjk4DMjAQ==}
|
|
385
385
|
engines: {node: '>=18'}
|
|
386
386
|
hasBin: true
|
|
387
387
|
peerDependencies:
|
|
@@ -889,7 +889,7 @@ snapshots:
|
|
|
889
889
|
'@esbuild/win32-x64@0.27.7':
|
|
890
890
|
optional: true
|
|
891
891
|
|
|
892
|
-
'@fulgurjs/federation@6.1.
|
|
892
|
+
'@fulgurjs/federation@6.1.2(vite@6.4.3)(vue-router@4.6.4(vue@3.5.43(typescript@5.9.3)))(vue@3.5.43(typescript@5.9.3))':
|
|
893
893
|
dependencies:
|
|
894
894
|
es-module-lexer: 1.7.0
|
|
895
895
|
esbuild: 0.27.7
|
|
@@ -2,7 +2,7 @@ packages:
|
|
|
2
2
|
- host
|
|
3
3
|
- remote
|
|
4
4
|
minimumReleaseAgeExclude:
|
|
5
|
-
- '@fulgurjs/federation@6.1.
|
|
5
|
+
- '@fulgurjs/federation@6.1.2'
|
|
6
6
|
# pnpm >=12 构建脚本批准(12 起弃用 onlyBuiltDependencies;pnpm 9-11 忽略本键:
|
|
7
7
|
# esbuild >=0.16 二进制经 optionalDependencies 平台包分发,postinstall 仅校验,不阻塞安装)
|
|
8
8
|
allowBuilds:
|