Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5aaa7c62
authored
Nov 20, 2025
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:请求工具配置/消息工具下发
1 parent
83232d50
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
813 additions
and
266 deletions
Readme.md
apps/frontend-micro/venus-base/src/qiankun/README.md → apps/frontend-micro/venus-base/docs/qiankun.md
apps/frontend-micro/venus-base/env.d.ts
apps/frontend-micro/venus-base/package.json
apps/frontend-micro/venus-base/src/api/request.ts
apps/frontend-micro/venus-base/src/api/test.ts
apps/frontend-micro/venus-base/src/common/baseConfig.ts
apps/frontend-micro/venus-base/src/config/index.d.ts
apps/frontend-micro/venus-base/src/main.ts
apps/frontend-micro/venus-base/src/qiankun/apps.ts
apps/frontend-micro/venus-base/src/qiankun/index.ts
apps/frontend-micro/venus-base/src/qiankun/subAppAdapter.ts
apps/frontend-micro/venus-base/src/stores/user.ts
apps/frontend-micro/venus-base/src/views/Home.vue
apps/frontend-micro/venus-base/src/views/NotFound.vue
apps/frontend-micro/venus-base/tsconfig.json
apps/frontend-micro/venus-micro-app/COMMUNICATION_REFACTOR.md
apps/frontend-micro/venus-micro-app/src/App.vue
apps/frontend-micro/venus-micro-app/src/main.ts
apps/frontend-micro/venus-micro-app/src/views/Communication.vue
apps/frontend-micro/venus-micro-app/src/views/Home.vue
package.json
pnpm-lock.yaml
pnpm-workspace.yaml
Readme.md
View file @
5aaa7c6
...
...
@@ -4,8 +4,8 @@ Venus
pnpm build
# 然后选择 venus-base
# 方式 2:直接指定(最快捷)⭐
直接将构建后的包放在根目录
pnpm build
:filter
venus-base
# 方式 2:直接指定(最快捷)⭐
pnpm build
--filter=
venus-base
# 或者使用完整包名
pnpm build --filter=@venus/frontend-micro/venus-base
...
...
apps/frontend-micro/venus-base/
src/qiankun/README
.md
→
apps/frontend-micro/venus-base/
docs/qiankun
.md
View file @
5aaa7c6
File moved
apps/frontend-micro/venus-base/env.d.ts
View file @
5aaa7c6
...
...
@@ -15,3 +15,29 @@ interface ImportMetaEnv {
interface
ImportMeta
{
readonly
env
:
ImportMetaEnv
;
}
// declare module 手动提供模块类型定义,避免异常
declare
module
'glsk-common'
{
export
interface
HttpConfig
{
response
?:
any
;
request
?:
any
;
sign
?:
any
;
secret
?:
any
;
alert
?:
(
message
:
string
)
=>
void
;
}
export
class
Http
{
constructor
(
config
:
HttpConfig
);
[
key
:
string
]:
any
;
}
}
// 扩展 Window 接口,添加全局属性类型定义
declare
global
{
interface
Window
{
$fetchConfig
?:
any
;
// 配置中心返回的配置数据
$gscApi
?:
any
;
// glsk-toolkit Request 实例
}
}
// 确保这是一个模块
export
{};
apps/frontend-micro/venus-base/package.json
View file @
5aaa7c6
...
...
@@ -10,8 +10,9 @@
"type-check"
:
"vue-tsc --noEmit"
},
"dependencies"
:
{
"@element-plus/icons-vue"
:
"catalog:"
,
"@venus/common-ui-vue"
:
"workspace:*"
,
"@element-plus/icons-vue"
:
"catalog:"
,
"glsk-toolkit"
:
"catalog:"
,
"@vueuse/core"
:
"catalog:"
,
"axios"
:
"catalog:"
,
"element-plus"
:
"catalog:"
,
...
...
apps/frontend-micro/venus-base/src/api/request.ts
0 → 100644
View file @
5aaa7c6
/**
* GSC API 请求封装
*/
/**
* GSC POST 请求
*/
export
function
gscPost
(
url
:
string
,
data
:
any
,
_config
:
any
=
{})
{
console
.
log
(
"BBBBBBB调用"
);
console
.
log
(
window
.
$gscApi
,
'========'
);
if
(
!
window
.
$gscApi
)
{
throw
new
Error
(
'$gscApi is not initialized. Please wait for the configuration to load.'
);
}
return
window
.
$gscApi
.
post
(
url
,
data
,
_config
);
}
apps/frontend-micro/venus-base/src/api/test.ts
0 → 100644
View file @
5aaa7c6
import
{
gscPost
}
from
"./request"
// 数据看板指标统计
export
function
getdataBoard
(
data
:
any
)
{
console
.
log
(
"AAAAAAA调用"
);
return
gscPost
(
"/dataBoard/index"
,
data
)
}
apps/frontend-micro/venus-base/src/common/baseConfig.ts
0 → 100644
View file @
5aaa7c6
export
const
config
=
{
// 系统名字
sysName
:
"嘀加智享车生活"
,
// 系统说明
subName
:
"让你的生意慧简单"
,
// 是否需要注册-true;false
hasReg
:
false
,
// 是否需要配置账号权限;true-有权限,从后台获取权限信息;false-无需权限
hasAuth
:
true
,
subShopMerchantName
:
true
,
// 是否显示财务列表二级流量方
env
:
"production"
,
alipayPath
:
"https://dj.glsx.com.cn/dj-carlife-web-alipay/#/alipay"
,
css_url
:
"https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/index.css"
,
axios
:
{
baseURL
:
"https://dj.glsx.com.cn/rop-dj-smartcarlife/router"
,
appkey
:
"d7ffc3346fc9a45bccaaa35300d59022"
,
secret
:
"4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353"
,
timeout
:
50000
,
result
:
{
data_key
:
"data"
,
message_key
:
"message"
,
code_key
:
"code"
,
code_success_value
:
0
,
code_message_map
:
{}
}
},
axios2
:
{
baseURL
:
"https://scrm.glsx.com.cn/rop-scrm-shopmall/router"
,
appkey
:
"48e5e13229b82c1b4e6e8c96151f0637"
,
secret
:
"c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b"
,
timeout
:
50000
,
result
:
{
data_key
:
"data"
,
message_key
:
"message"
,
code_key
:
"code"
,
code_success_value
:
0
,
code_message_map
:
{}
}
},
common
:
{
baseURL
:
"http://didicb.glsx.com.cn/router?method=glsx.accounts.biz.common.pictureUpload"
,
appkey
:
"48e5e13229b82c1b4e6e8c96151f0637"
,
secret
:
"c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b"
,
timeout
:
50000
,
result
:
{
data_key
:
"data"
,
message_key
:
"message"
,
code_key
:
"code"
,
code_success_value
:
0
,
code_message_map
:
{}
}
}
}
apps/frontend-micro/venus-base/src/config/index.d.ts
0 → 100644
View file @
5aaa7c6
export
interface
ConfigData
{
response
?:
any
;
request
?:
any
;
sign
?:
any
;
secret
?:
any
;
[
key
:
string
]:
any
;
}
export
function
fetchConfig
(
isEnv
?:
boolean
):
Promise
<
ConfigData
>
;
export
const
config
:
{
install
(
vue
:
any
,
cfg
:
ConfigData
):
void
;
};
export
const
configSwitch
:
boolean
;
declare
const
defaultExport
:
ConfigData
;
export
default
defaultExport
;
apps/frontend-micro/venus-base/src/main.ts
View file @
5aaa7c6
import
{
createApp
}
from
'vue'
;
import
{
createPinia
}
from
'pinia'
;
import
{
ElMessage
}
from
'element-plus'
;
import
App
from
'./App.vue'
;
import
{
setupQiankun
}
from
'./qiankun'
;
import
router
from
'./router'
;
import
{
useAppStore
,
useUserStore
}
from
'./stores'
;
import
{
getToken
}
from
'./utils/auth'
;
import
{
getToken
,
removeToken
}
from
'./utils/auth'
;
import
{
Request
}
from
"glsk-toolkit"
import
{
config
}
from
"./common/baseConfig"
import
'./style.css'
;
// 创建应用实例
...
...
@@ -73,18 +73,73 @@ function setupStoreSync() {
});
});
}
let
baseConfig
=
config
// 使用fetch 解决axios提前实例化导致sign里面的secret不能通过配置中心动态获取
fetch
(
"https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config"
)
.
then
(
(
response
)
=>
{
// 处理http响应
return
response
.
json
()
},
(
error
)
=>
{
// 处理错误
console
.
log
(
error
)
}
)
.
then
((
response
)
=>
{
const
{
code
,
data
}
=
response
console
.
log
(
"response"
,
code
,
response
)
if
(
code
==
"200"
)
{
console
.
log
(
data
)
baseConfig
=
data
// console.log("baseConfig", baseConfig)
// window.$fetchConfig = data
}
else
{
baseConfig
=
response
window
.
$fetchConfig
=
response
console
.
log
(
response
)
window
.
$gscApi
=
new
Request
({
...
response
.
gsc
,
// baseURL:'http://192.168.3.145:9898/gsc-vcp-web-facade',
// baseURL: 'http://192.168.1.103:5006',
session
:
{
requiresSession
:
true
,
sessionId
:
()
=>
getToken
()
},
events
:
{
error
:
(
error
:
any
)
=>
{
ElMessage
.
error
(
error
.
msg
||
'请求失败'
)
},
logout
:
()
=>
{
const
userStore
=
useUserStore
()
userStore
.
reset
()
removeToken
()
router
.
replace
(
"/login"
)
ElMessage
.
error
(
'登录超时,请重新登录'
)
}
}
})
console
.
log
(
window
.
$gscApi
,
'========'
)
}
})
.
finally
(()
=>
{
// 初始化应用
initApp
().
then
(()
=>
{
// 挂载应用
app
.
mount
(
'#app'
);
// 设置 Store 同步机制
setupStoreSync
();
// 等待路由准备就绪后再启动 qiankun,避免刷新时容器未挂载的问题
router
.
isReady
().
then
(()
=>
{
// 启动 qiankun 微前端框架
setupQiankun
();
});
});
})
// 初始化应用
initApp
().
then
(()
=>
{
// 挂载应用
app
.
mount
(
'#app'
);
// 设置 Store 同步机制
setupStoreSync
();
// 等待路由准备就绪后再启动 qiankun,避免刷新时容器未挂载的问题
router
.
isReady
().
then
(()
=>
{
// 启动 qiankun 微前端框架
setupQiankun
();
});
});
apps/frontend-micro/venus-base/src/qiankun/apps.ts
View file @
5aaa7c6
import
type
{
MicroAppConfig
}
from
'./types'
;
import
type
{
MicroAppConfig
}
from
'./types'
;
//微应用配置类型
import
{
createSubAppAdapter
}
from
'./subAppAdapter'
;
//微应用统一通信适配器
/**
* 微应用配置列表
...
...
@@ -12,6 +14,7 @@ export const microApps: MicroAppConfig[] = [
activeRule
:
'/subapp-vue'
,
props
:
{
routerBase
:
'/subapp-vue'
,
communicationManager
:
createSubAppAdapter
(),
},
},
{
...
...
@@ -21,6 +24,7 @@ export const microApps: MicroAppConfig[] = [
activeRule
:
'/subapp-react'
,
props
:
{
routerBase
:
'/subapp-react'
,
communicationManager
:
createSubAppAdapter
(),
},
},
];
...
...
apps/frontend-micro/venus-base/src/qiankun/index.ts
View file @
5aaa7c6
...
...
@@ -4,9 +4,9 @@ import {
start
,
}
from
'qiankun'
;
import
{
microApps
}
from
'./apps'
;
import
{
communicationManager
}
from
'./communication'
;
import
{
microAppLifecycles
}
from
'./lifecycles'
;
import
{
microApps
}
from
'./apps'
;
// 微应用信息配置
import
{
communicationManager
}
from
'./communication'
;
// 通信管理器
import
{
microAppLifecycles
}
from
'./lifecycles'
;
// 微应用生命周期钩子
/**
* qiankun 配置选项
...
...
@@ -40,10 +40,6 @@ const qiankunConfig = {
export
function
setupQiankun
()
{
// 1. 初始化通信管理器
communicationManager
.
init
();
// 2. 注册微应用
console
.
log
(
'注册qiankun传参:microApps'
,
microApps
);
console
.
log
(
'注册qiankun钩子:'
,
microAppLifecycles
);
registerMicroApps
(
microApps
,
microAppLifecycles
);
// 3. 添加全局错误处理
...
...
@@ -75,3 +71,9 @@ export type { GlobalState, Notification } from './communication';
export
{
microAppLifecycles
}
from
'./lifecycles'
;
export
*
from
'./types'
;
export
*
from
'./utils'
;
// 导出子应用适配器相关类型和函数
export
{
createSubAppAdapter
}
from
'./subAppAdapter'
;
export
type
{
QiankunProps
,
SubAppCommunicationManager
,
}
from
'./subAppAdapter'
;
apps/frontend-micro/venus-base/src/qiankun/subAppAdapter.ts
0 → 100644
View file @
5aaa7c6
import
type
{
GlobalState
,
Notification
}
from
'./communication'
;
import
{
communicationManager
}
from
'./communication'
;
/**
* qiankun Props 类型定义(子应用使用)
*/
export
interface
QiankunProps
{
container
?:
HTMLElement
;
routerBase
?:
string
;
onGlobalStateChange
?:
(
callback
:
(
state
:
GlobalState
,
prev
:
GlobalState
)
=>
void
,
fireImmediately
?:
boolean
,
)
=>
void
;
setGlobalState
?:
(
state
:
Partial
<
GlobalState
>
)
=>
void
;
[
key
:
string
]:
any
;
}
/**
* 子应用通信管理器接口
* 这个接口定义了子应用需要的所有通信方法
*/
export
interface
SubAppCommunicationManager
{
/**
* 初始化通信管理器
* @param props qiankun 传递的 props
*/
init
(
props
:
QiankunProps
):
void
;
/**
* 获取当前全局状态
*/
getCurrentState
():
GlobalState
|
null
;
/**
* 监听全局状态变化
* @param callback 回调函数
* @returns 取消监听的函数
*/
onStateChange
(
callback
:
(
state
:
GlobalState
,
prev
:
GlobalState
)
=>
void
,
):
()
=>
void
;
/**
* 设置全局状态(向基座发送数据)
* @param state 要更新的状态
*/
setGlobalState
(
state
:
Partial
<
GlobalState
>
):
void
;
/**
* 向基座发送通知
* @param notification 通知消息
*/
sendNotification
(
notification
:
Omit
<
Notification
,
'id'
|
'timestamp'
>
):
void
;
/**
* 销毁通信管理器
*/
destroy
():
void
;
}
/**
* 子应用通信适配器
* 将基座的 CommunicationManager 适配成子应用需要的接口
*/
class
SubAppCommunicationAdapter
implements
SubAppCommunicationManager
{
private
currentState
:
GlobalState
|
null
=
null
;
private
listeners
:
Array
<
(
state
:
GlobalState
,
prev
:
GlobalState
)
=>
void
>
=
[];
private
props
:
QiankunProps
|
null
=
null
;
private
unsubscribe
:
(()
=>
void
)
|
null
=
null
;
/**
* 初始化通信管理器
* @param props qiankun 传递的 props
*/
init
(
props
:
QiankunProps
)
{
this
.
props
=
props
;
// 获取基座的当前状态
this
.
currentState
=
communicationManager
.
getGlobalState
();
// 监听全局状态变化
if
(
props
.
onGlobalStateChange
)
{
props
.
onGlobalStateChange
(
(
state
:
GlobalState
,
prev
:
GlobalState
)
=>
{
console
.
log
(
'[子应用通信适配器] 全局状态变化:'
,
state
,
prev
);
// 缓存当前状态
this
.
currentState
=
state
;
// 触发所有监听器
this
.
listeners
.
forEach
((
listener
)
=>
{
listener
(
state
,
prev
);
});
},
true
,
// 立即触发,获取当前状态
);
}
// 同时监听基座通信管理器的状态变化(作为补充)
const
baseUnsubscribe
=
communicationManager
.
onStateChange
(
(
state
,
prev
)
=>
{
// 如果 qiankun 的状态变化没有触发,这里作为备用
if
(
this
.
currentState
!==
state
)
{
this
.
currentState
=
state
;
this
.
listeners
.
forEach
((
listener
)
=>
{
listener
(
state
,
prev
);
});
}
},
);
// 保存取消订阅函数(qiankun 的 onGlobalStateChange 不返回取消函数,只取消基座的监听)
this
.
unsubscribe
=
()
=>
{
baseUnsubscribe
();
};
console
.
log
(
'[子应用通信适配器] 通信管理器初始化完成'
);
}
/**
* 获取当前全局状态
*/
getCurrentState
():
GlobalState
|
null
{
// 优先返回缓存的状态
if
(
this
.
currentState
)
{
return
this
.
currentState
;
}
// 如果没有缓存,从基座获取
return
communicationManager
.
getGlobalState
();
}
/**
* 监听全局状态变化
* @param callback 回调函数
* @returns 取消监听的函数
*/
onStateChange
(
callback
:
(
state
:
GlobalState
,
prev
:
GlobalState
)
=>
void
,
):
()
=>
void
{
this
.
listeners
.
push
(
callback
);
// 如果已经有缓存的状态,立即调用一次回调
if
(
this
.
currentState
)
{
console
.
log
(
'[子应用通信适配器] 立即触发回调,使用缓存的全局状态'
,
);
callback
(
this
.
currentState
,
{}
as
GlobalState
);
}
return
()
=>
{
const
index
=
this
.
listeners
.
indexOf
(
callback
);
if
(
index
!==
-
1
)
{
this
.
listeners
.
splice
(
index
,
1
);
}
};
}
/**
* 设置全局状态(向基座发送数据)
* @param state 要更新的状态
*/
setGlobalState
(
state
:
Partial
<
GlobalState
>
)
{
// 通过基座的通信管理器设置状态
communicationManager
.
setGlobalState
(
state
);
// 同时通过 qiankun 的 props 设置(如果可用)
if
(
this
.
props
?.
setGlobalState
)
{
this
.
props
.
setGlobalState
(
state
);
}
console
.
log
(
'[子应用通信适配器] 全局状态已更新:'
,
state
);
}
/**
* 向基座发送通知
* @param notification 通知消息
*/
sendNotification
(
notification
:
Omit
<
Notification
,
'id'
|
'timestamp'
>
)
{
// 通过基座的通信管理器添加通知
communicationManager
.
addNotification
({
...
notification
,
from
:
notification
.
from
||
'Vue子应用'
,
});
}
/**
* 销毁通信管理器
*/
destroy
()
{
if
(
this
.
unsubscribe
)
{
this
.
unsubscribe
();
this
.
unsubscribe
=
null
;
}
this
.
listeners
=
[];
this
.
props
=
null
;
this
.
currentState
=
null
;
console
.
log
(
'[子应用通信适配器] 通信管理器已销毁'
);
}
}
/**
* 创建子应用通信管理器实例
* @returns 子应用通信管理器实例
*/
export
function
createSubAppAdapter
():
SubAppCommunicationManager
{
return
new
SubAppCommunicationAdapter
();
}
apps/frontend-micro/venus-base/src/stores/user.ts
View file @
5aaa7c6
...
...
@@ -71,7 +71,7 @@ export const useUserStore = defineStore('user', () => {
permissions
.
value
=
[];
roles
.
value
=
[];
removeToken
();
console
.
log
(
"退出"
);
// 同步清空 qiankun 全局状态中的用户信息
syncUserToQiankun
();
}
...
...
apps/frontend-micro/venus-base/src/views/Home.vue
View file @
5aaa7c6
...
...
@@ -2,7 +2,7 @@
import
type
{
GlobalState
}
from
'@/qiankun'
;
import
{
onMounted
,
onUnmounted
,
ref
}
from
'vue'
;
import
{
getdataBoard
as
getdateBoardApi
}
from
'@/api/test'
;
// 按需引入 @venus/common-ui-vue 组件库的按钮组件
import
{
GLButton
}
from
'@venus/common-ui-vue'
;
...
...
@@ -74,7 +74,10 @@ const sendCustomMessage = () => {
};
// 切换主题
const
toggleTheme
=
()
=>
{
const
toggleTheme
=
async
()
=>
{
const
res
=
await
getdateBoardApi
(
0
);
console
.
log
(
"CCCCCCCC阿萨德"
,
res
);
const
currentTheme
=
globalState
.
value
?.
theme
.
mode
||
'light'
;
const
newTheme
=
currentTheme
===
'light'
?
'dark'
:
'light'
;
...
...
apps/frontend-micro/venus-base/src/views/NotFound.vue
View file @
5aaa7c6
...
...
@@ -25,11 +25,11 @@ const goHome = () => {
align-items
:
center
;
justify-content
:
center
;
min-height
:
100vh
;
background
:
linear-gradient
(
135deg
,
#
667eea
0%
,
#764ba2
100%
);
background
:
linear-gradient
(
135deg
,
#
eff2ff
0%
,
#f6edff
100%
);
}
.not-found-content
{
color
:
#
fff
;
color
:
#
383838
;
text-align
:
center
;
}
...
...
apps/frontend-micro/venus-base/tsconfig.json
View file @
5aaa7c6
...
...
@@ -16,6 +16,7 @@
},
"resolveJsonModule"
:
true
,
"allowImportingTsExtensions"
:
true
,
"allowJs"
:
true
,
/*
Linting
*/
"strict"
:
true
,
...
...
@@ -32,6 +33,7 @@
"src/**/*.ts"
,
"src/**/*.d.ts"
,
"src/**/*.tsx"
,
"src/**/*.vue"
"src/**/*.vue"
,
"src/**/*.js"
]
}
apps/frontend-micro/venus-micro-app/COMMUNICATION_REFACTOR.md
0 → 100644
View file @
5aaa7c6
# 子应用通信模块重构说明
## 重构目标
将子应用的
`communication.ts`
重构为轻量级版本,直接使用基座通过 props 下发的通信管理器实例,避免维护本地实现。
## 主要变化
### 1. **communication.ts 重构**
#### 之前的实现
-
包含完整的本地通信管理器实现(
`LocalSubAppCommunicationManager`
)
-
包含降级方案逻辑
-
代码量约 287 行,逻辑复杂
#### 现在的实现
-
仅保留类型定义和接口(与基座保持一致)
-
移除所有本地实现逻辑
-
通过全局变量存储基座传递的实例
-
提供简洁的工具函数封装
-
代码量约 200 行,逻辑清晰
**核心代码结构:**
```
typescript
// 1. 类型定义(与基座保持一致)
export
interface
GlobalState
{
...
}
export
interface
Notification
{
...
}
export
interface
SubAppCommunicationManager
{
...
}
// 2. 全局实例存储
let
communicationManagerInstance
:
SubAppCommunicationManager
|
null
=
null
;
// 3. 实例管理函数
export
function
setCommunicationManager
(
manager
)
{
...
}
export
function
getCommunicationManager
()
{
...
}
// 4. 便捷工具函数
export
function
useGlobalState
(
callback
)
{
...
}
export
function
notify
(
type
,
title
,
message
)
{
...
}
export
const
subAppCommunication
=
new
Proxy
(...)
// 兼容旧代码
```
### 2. **main.ts 简化**
#### 之前的逻辑
```
typescript
// 复杂的判断逻辑,包含降级方案
if
(
props
.
communicationManager
)
{
setCommunicationManager
(
props
.
communicationManager
);
props
.
communicationManager
.
init
(
props
);
}
else
if
(
props
.
onGlobalStateChange
)
{
// 降级方案
subAppCommunication
.
init
(
props
);
}
```
#### 现在的逻辑
```
typescript
// 简洁直接,只使用基座传递的实例
if
(
props
.
communicationManager
)
{
setCommunicationManager
(
props
.
communicationManager
);
props
.
communicationManager
.
init
(
props
);
app
.
config
.
globalProperties
.
$communication
=
props
.
communicationManager
;
}
else
{
console
.
error
(
'[子应用] 基座未传递通信管理器'
);
}
```
### 3. **类型安全增强**
-
所有类型定义在子应用中明确声明,避免跨项目导入问题
-
与基座类型定义保持完全一致
-
保持完整的 TypeScript 类型检查
## 架构流程
```
┌─────────────────────────────────────────────────────────┐
│ 微前端基座 │
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ CommunicationManager (基座通信管理器) │ │
│ │ - 管理全局状态 │ │
│ │ - 监听状态变化 │ │
│ │ - 广播通知 │ │
│ └──────────────────┬───────────────────────────────┘ │
│ │ │
│ ┌──────────────────▼───────────────────────────────┐ │
│ │ SubAppCommunicationAdapter (子应用适配器) │ │
│ │ - 适配基座管理器到子应用接口 │ │
│ │ - 处理状态同步 │ │
│ │ - 实现 SubAppCommunicationManager 接口 │ │
│ └──────────────────┬───────────────────────────────┘ │
│ │ │
└─────────────────────┼───────────────────────────────────┘
│ props.communicationManager
│ (通过 qiankun 传递)
┌─────────────────────▼───────────────────────────────────┐
│ Vue3 子应用 │
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ main.ts │ │
│ │ - 接收 props.communicationManager │ │
│ │ - 调用 setCommunicationManager() │ │
│ │ - 初始化实例 │ │
│ └──────────────────┬───────────────────────────────┘ │
│ │ │
│ ┌──────────────────▼───────────────────────────────┐ │
│ │ communication.ts (轻量级) │ │
│ │ - 存储实例引用 │ │
│ │ - 提供工具函数 │ │
│ │ - 导出类型定义 │ │
│ └──────────────────┬───────────────────────────────┘ │
│ │ │
│ ┌──────────────────▼───────────────────────────────┐ │
│ │ 组件使用 │ │
│ │ - useGlobalState(callback) │ │
│ │ - notify(type, title, message) │ │
│ │ - subAppCommunication.xxx() │ │
│ └──────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
```
## 优势
### 1. **代码简化**
-
移除 287 行的复杂实现,保留核心功能
-
不再需要维护本地降级方案
-
代码更易理解和维护
### 2. **统一管理**
-
通信逻辑完全由基座控制
-
确保所有子应用使用相同的通信机制
-
便于统一升级和修改
### 3. **类型安全**
-
类型定义在子应用中明确声明
-
避免跨项目导入的复杂性
-
保持完整的 TypeScript 支持
### 4. **向后兼容**
-
保留
`useGlobalState`
、
`notify`
、
`subAppCommunication`
等 API
-
组件代码无需修改
-
平滑迁移
## 使用示例
### 在组件中监听全局状态
```
typescript
import
{
useGlobalState
}
from
'@/utils/communication'
;
import
type
{
GlobalState
}
from
'@/utils/communication'
;
// 在 setup 中使用
useGlobalState
((
state
:
GlobalState
,
prev
:
GlobalState
)
=>
{
console
.
log
(
'状态更新:'
,
state
);
// 处理状态变化
});
```
### 发送通知到基座
```
typescript
import
{
notify
}
from
'@/utils/communication'
;
// 发送成功通知
notify
(
'success'
,
'操作成功'
,
'数据已保存'
);
// 发送错误通知
notify
(
'error'
,
'操作失败'
,
'网络连接错误'
);
```
### 直接使用通信管理器
```
typescript
import
{
subAppCommunication
}
from
'@/utils/communication'
;
// 获取当前状态
const
state
=
subAppCommunication
.
getCurrentState
();
// 设置全局状态
subAppCommunication
.
setGlobalState
({
theme
:
{
mode
:
'dark'
,
primaryColor
:
'#1890ff'
}
});
```
## 注意事项
### 1. **基座依赖**
子应用现在完全依赖基座传递通信管理器实例,如果基座未传递:
-
会在控制台输出错误日志
-
通信功能不可用
-
不会影响应用其他功能
### 2. **类型同步**
当基座的类型定义发生变化时,需要同步更新子应用的类型定义,保持一致性。
### 3. **独立运行**
在独立运行模式下(不通过基座加载),通信功能不可用,但不会影响应用正常运行。
## 后续优化建议
### 1. **类型共享**
可以考虑将类型定义提取到独立的 npm 包或 monorepo 共享包中,避免重复定义。
### 2. **TypeScript Path Mapping**
配置 TypeScript 路径映射,直接从基座导入类型:
```
json
{
"compilerOptions"
:
{
"paths"
:
{
"@base/*"
:
[
"../venus-base/src/*"
]
}
}
}
```
### 3. **运行时类型检查**
添加运行时类型检查,确保基座传递的实例符合预期接口。
## 总结
此次重构将子应用的通信模块从"自主实现+降级方案"改为"完全依赖基座",实现了:
-
✅ 代码大幅简化
-
✅ 职责更加清晰
-
✅ 维护成本降低
-
✅ 保持向后兼容
-
✅ 类型安全保证
这是微前端架构中"基座控制,子应用依赖"模式的最佳实践。
apps/frontend-micro/venus-micro-app/src/App.vue
View file @
5aaa7c6
<
script
setup
lang=
"ts"
>
import
type
{
GlobalState
,
Notification
}
from
'./utils/communication'
;
import
{
onMounted
,
reactive
,
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
qiankunWindow
}
from
'vite-plugin-qiankun/dist/helper'
;
// 判断是否在 qiankun 环境中
const
isQiankunMode
=
ref
(
qiankunWindow
.
__POWERED_BY_QIANKUN__
);
// 数据面板显示控制
const
showDataPanel
=
ref
(
true
);
const
dataPanelExpanded
=
ref
(
true
);
// 全局状态
const
globalState
=
reactive
<
GlobalState
>
({
user
:
null
,
theme
:
{
mode
:
'light'
,
primaryColor
:
'#1890ff'
,
},
notifications
:
[],
config
:
{
apiBaseUrl
:
''
,
timeout
:
5000
,
},
currentMenu
:
null
,
});
// 切换数据面板展开/收起
const
toggleDataPanel
=
()
=>
{
dataPanelExpanded
.
value
=
!
dataPanelExpanded
.
value
;
};
// 获取通知图标
const
getNotificationIcon
=
(
type
:
Notification
[
'type'
])
=>
{
const
icons
=
{
success
:
'✅'
,
warning
:
'⚠️'
,
error
:
'❌'
,
info
:
'ℹ️'
,
};
return
icons
[
type
]
||
'ℹ️'
;
};
// 格式化时间
const
formatTime
=
(
timestamp
:
number
)
=>
{
const
date
=
new
Date
(
timestamp
);
return
date
.
toLocaleString
(
'zh-CN'
,
{
year
:
'numeric'
,
month
:
'2-digit'
,
day
:
'2-digit'
,
hour
:
'2-digit'
,
minute
:
'2-digit'
,
second
:
'2-digit'
,
});
};
onMounted
(
async
()
=>
{
console
.
log
(
'Vue3 微应用已挂载'
);
console
.
log
(
'是否在 qiankun 环境:'
,
isQiankunMode
.
value
);
// 如果在 qiankun 环境中,监听全局状态变化
if
(
isQiankunMode
.
value
)
{
try
{
const
{
useGlobalState
,
subAppCommunication
}
=
await
import
(
'./utils/communication'
);
// 首先尝试获取当前状态
const
currentState
=
subAppCommunication
.
getCurrentState
();
if
(
currentState
)
{
console
.
log
(
'获取到当前全局状态:'
,
currentState
);
Object
.
assign
(
globalState
,
currentState
);
}
// 监听状态变化
useGlobalState
((
state
,
prev
)
=>
{
console
.
log
(
'全局状态已更新:'
,
state
,
'上一个状态:'
,
prev
);
Object
.
assign
(
globalState
,
state
);
});
console
.
log
(
'✅ 主应用数据监听已启动'
);
}
catch
(
error
)
{
console
.
error
(
'❌ 初始化通信失败:'
,
error
);
}
}
});
</
script
>
<
template
>
...
...
@@ -111,94 +30,6 @@ onMounted(async () => {
</nav>
</header>
<!-- 主应用数据面板 -->
<div
v-if=
"isQiankunMode && showDataPanel"
class=
"data-panel"
>
<div
class=
"data-panel-header"
>
<h2>
📡 主应用传递的数据
</h2>
<button
@
click=
"toggleDataPanel"
class=
"toggle-btn"
>
{{
dataPanelExpanded
?
'收起'
:
'展开'
}}
</button>
</div>
<div
v-show=
"dataPanelExpanded"
class=
"data-panel-content"
>
<!-- 通知消息 -->
<div
class=
"data-section"
>
<h3
class=
"section-title"
>
🔔 通知消息
</h3>
<div
v-if=
"
globalState.notifications && globalState.notifications.length > 0
"
class=
"notifications-list"
>
<div
v-for=
"notification in globalState.notifications"
:key=
"notification.id"
class=
"notification-item"
:class=
"`notification-$
{notification.type}`"
>
<div
class=
"notification-header"
>
<span
class=
"notification-icon"
>
{{
getNotificationIcon
(
notification
.
type
)
}}
</span>
<span
class=
"notification-title"
>
{{
notification
.
title
}}
</span>
<span
class=
"notification-time"
>
{{
formatTime
(
notification
.
timestamp
)
}}
</span>
</div>
<div
class=
"notification-body"
>
<p
class=
"notification-message"
>
{{
notification
.
message
}}
</p>
<span
v-if=
"notification.from"
class=
"notification-from"
>
来自:
{{
notification
.
from
}}
</span>
</div>
</div>
</div>
<div
v-else
class=
"data-empty"
>
暂无通知消息
</div>
</div>
<!-- 当前菜单信息 -->
<div
class=
"data-section"
v-if=
"globalState.currentMenu"
>
<h3
class=
"section-title"
>
📍 当前菜单
</h3>
<div
class=
"data-grid"
>
<div
class=
"data-item"
>
<span
class=
"data-label"
>
菜单ID:
</span>
<span
class=
"data-value"
>
{{
globalState
.
currentMenu
.
menuId
}}
</span>
</div>
<div
class=
"data-item"
>
<span
class=
"data-label"
>
菜单标题:
</span>
<span
class=
"data-value"
>
<span
v-if=
"globalState.currentMenu.menuIcon"
>
{{
globalState
.
currentMenu
.
menuIcon
}}
</span>
{{
globalState
.
currentMenu
.
menuTitle
}}
</span>
</div>
<div
class=
"data-item"
>
<span
class=
"data-label"
>
菜单路径:
</span>
<span
class=
"data-value code"
>
{{
globalState
.
currentMenu
.
menuPath
}}
</span>
</div>
<div
class=
"data-item"
>
<span
class=
"data-label"
>
激活时间:
</span>
<span
class=
"data-value"
>
{{
formatTime
(
globalState
.
currentMenu
.
timestamp
)
}}
</span>
</div>
<div
v-if=
"globalState.currentMenu.menuMeta"
class=
"data-item full-width"
>
<span
class=
"data-label"
>
元数据:
</span>
<span
class=
"data-value code"
>
{{
JSON
.
stringify
(
globalState
.
currentMenu
.
menuMeta
)
}}
</span>
</div>
</div>
</div>
</div>
</div>
<main
class=
"app-main"
>
<router-view
v-slot=
"
{ Component }">
<transition
name=
"fade"
mode=
"out-in"
>
...
...
apps/frontend-micro/venus-micro-app/src/main.ts
View file @
5aaa7c6
...
...
@@ -18,12 +18,18 @@ import './style.css';
let
app
:
null
|
VueApp
<
Element
>
=
null
;
let
router
:
any
=
null
;
// 存储 qiankun 传递的 props,供组件使用
export
let
qiankunProps
:
QiankunProps
|
null
=
null
;
/**
* 渲染函数
* @param props qiankun 传递的参数
*/
async
function
render
(
props
:
QiankunProps
=
{})
{
const
{
container
}
=
props
;
// 存储 props 供组件使用
qiankunProps
=
props
;
app
=
createApp
(
App
);
...
...
@@ -38,15 +44,6 @@ async function render(props: QiankunProps = {}) {
router
=
createRouter
(
routerBase
);
app
.
use
(
router
);
// 初始化通信管理器(仅在 qiankun 环境中)
if
(
qiankunWindow
.
__POWERED_BY_QIANKUN__
&&
props
.
onGlobalStateChange
)
{
const
{
subAppCommunication
}
=
await
import
(
'./utils/communication'
);
subAppCommunication
.
init
(
props
);
// 将通信管理器挂载到全局属性,方便组件使用
app
.
config
.
globalProperties
.
$communication
=
subAppCommunication
;
}
// 挂载应用
const
containerEl
=
container
?
container
.
querySelector
(
'#app'
)
...
...
@@ -92,12 +89,6 @@ export async function mount(props: QiankunProps) {
export
async
function
unmount
(
props
:
QiankunProps
)
{
console
.
log
(
'[Vue3 微应用] unmount'
,
props
);
// 销毁通信管理器
if
(
qiankunWindow
.
__POWERED_BY_QIANKUN__
)
{
const
{
subAppCommunication
}
=
await
import
(
'./utils/communication'
);
subAppCommunication
.
destroy
();
}
if
(
app
)
{
app
.
unmount
();
app
=
null
;
...
...
apps/frontend-micro/venus-micro-app/src/views/Communication.vue
View file @
5aaa7c6
This diff is collapsed.
Click to expand it.
apps/frontend-micro/venus-micro-app/src/views/Home.vue
View file @
5aaa7c6
This diff is collapsed.
Click to expand it.
package.json
View file @
5aaa7c6
...
...
@@ -25,14 +25,23 @@
"build:filter"
:
"node scripts/build/buildToRoot.mjs"
,
"build:docs"
:
"pnpm run build --filter=@venus/docs"
,
"changeset"
:
"pnpm exec changeset"
,
"check"
:
"pnpm run check:circular && pnpm run check:dep && pnpm run check:type && pnpm check:cspell"
,
"check:circular"
:
"vsh check-circular"
,
"check:cspell"
:
"cspell lint **/*.ts **/README.md .changeset/*.md --no-progress"
,
"check:dep"
:
"vsh check-dep"
,
"check:type"
:
"turbo run typecheck"
,
"clean"
:
"node ./scripts/clean.mjs"
,
"commit"
:
"powershell -ExecutionPolicy Bypass -File ./scripts/commit.ps1"
,
"format"
:
"vsh lint --format"
,
"lint"
:
"vsh lint"
,
"postinstall"
:
"pnpm -r run stub --if-present"
,
"prepare"
:
"husky"
,
"preinstall"
:
"npx only-allow pnpm"
,
"preview"
:
"turbo-run preview"
,
"publint"
:
"vsh publint"
,
"reinstall"
:
"pnpm clean --del-lock && pnpm install"
,
"test:unit"
:
"vitest run --dom"
,
"test:e2e"
:
"turbo run test:e2e"
,
"update:deps"
:
"npx taze -r -w"
,
"version"
:
"pnpm exec changeset version && pnpm install --no-frozen-lockfile"
,
"catalog"
:
"pnpx codemod pnpm/catalog"
,
...
...
@@ -109,5 +118,8 @@
"canvas"
,
"node-gyp"
]
},
"dependencies"
:
{
"glsk-toolkit"
:
"catalog:"
}
}
pnpm-lock.yaml
View file @
5aaa7c6
...
...
@@ -189,6 +189,9 @@ catalogs:
globals
:
specifier
:
^16.3.0
version
:
16.5.0
glsk-toolkit
:
specifier
:
^1.0.5
version
:
1.0.5
happy-dom
:
specifier
:
^17.6.3
version
:
17.6.3
...
...
@@ -344,6 +347,10 @@ overrides:
importers
:
.
:
dependencies
:
glsk-toolkit
:
specifier
:
'
catalog:'
version
:
1.0.5
devDependencies
:
'
@changesets/changelog-github'
:
specifier
:
'
catalog:'
...
...
@@ -483,6 +490,9 @@ importers:
element-plus
:
specifier
:
'
catalog:'
version
:
2.11.7(vue@3.5.24(typescript@5.9.3))
glsk-toolkit
:
specifier
:
'
catalog:'
version
:
1.0.5
pinia
:
specifier
:
^3.0.3
version
:
3.0.4(typescript@5.9.3)(vue@3.5.24(typescript@5.9.3))
...
...
@@ -573,52 +583,6 @@ importers:
specifier
:
'
catalog:'
version
:
2.2.10(typescript@5.9.3)
apps/frontend-micro/venus-micro-app01
:
dependencies
:
'
@vueuse/core'
:
specifier
:
'
catalog:'
version
:
13.9.0(vue@3.5.24(typescript@5.9.3))
axios
:
specifier
:
'
catalog:'
version
:
1.13.2
pinia
:
specifier
:
^3.0.3
version
:
3.0.4(typescript@5.9.3)(vue@3.5.24(typescript@5.9.3))
vue
:
specifier
:
^3.5.17
version
:
3.5.24(typescript@5.9.3)
vue-router
:
specifier
:
'
catalog:'
version
:
4.6.3(vue@3.5.24(typescript@5.9.3))
devDependencies
:
'
@types/node'
:
specifier
:
^24.9.2
version
:
24.10.0
'
@vitejs/plugin-vue'
:
specifier
:
'
catalog:'
version
:
6.0.1(vite@7.2.2(@types/node@24.10.0)(jiti@2.6.1)(sass@1.94.0)(terser@5.44.1)(yaml@2.8.1))(vue@3.5.24(typescript@5.9.3))
'
@vitejs/plugin-vue-jsx'
:
specifier
:
'
catalog:'
version
:
5.1.1(vite@7.2.2(@types/node@24.10.0)(jiti@2.6.1)(sass@1.94.0)(terser@5.44.1)(yaml@2.8.1))(vue@3.5.24(typescript@5.9.3))
typescript
:
specifier
:
'
catalog:'
version
:
5.9.3
unplugin-auto-import
:
specifier
:
'
catalog:'
version
:
0.17.8(@vueuse/core@13.9.0(vue@3.5.24(typescript@5.9.3)))(rollup@4.53.2)
unplugin-vue-components
:
specifier
:
'
catalog:'
version
:
0.26.0(@babel/parser@7.28.5)(rollup@4.53.2)(vue@3.5.24(typescript@5.9.3))
vite
:
specifier
:
^7.1.2
version
:
7.2.2(@types/node@24.10.0)(jiti@2.6.1)(sass@1.94.0)(terser@5.44.1)(yaml@2.8.1)
vite-plugin-qiankun
:
specifier
:
'
catalog:'
version
:
1.0.15(typescript@5.9.3)(vite@7.2.2(@types/node@24.10.0)(jiti@2.6.1)(sass@1.94.0)(terser@5.44.1)(yaml@2.8.1))
vue-tsc
:
specifier
:
'
catalog:'
version
:
2.2.10(typescript@5.9.3)
docs
:
dependencies
:
vue
:
...
...
@@ -2622,6 +2586,42 @@ packages:
'
@sec-ant/readable-stream@0.4.1'
:
resolution
:
{
integrity
:
sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==
}
'
@sentry-internal/feedback@7.120.4'
:
resolution
:
{
integrity
:
sha512-eSwgvTdrh03zYYaI6UVOjI9p4VmKg6+c2+CBQfRZX++6wwnCVsNv7XF7WUIpVGBAkJ0N2oapjQmCzJKGKBRWQg==
}
engines
:
{
node
:
'
>=12'
}
'
@sentry-internal/replay-canvas@7.120.4'
:
resolution
:
{
integrity
:
sha512-2+W4CgUL1VzrPjArbTid4WhKh7HH21vREVilZdvffQPVwOEpgNTPAb69loQuTlhJVveh9hWTj2nE5UXLbLP+AA==
}
engines
:
{
node
:
'
>=12'
}
'
@sentry-internal/tracing@7.120.4'
:
resolution
:
{
integrity
:
sha512-Fz5+4XCg3akeoFK+K7g+d7HqGMjmnLoY2eJlpONJmaeT9pXY7yfUyXKZMmMajdE2LxxKJgQ2YKvSCaGVamTjHw==
}
engines
:
{
node
:
'
>=8'
}
'
@sentry/browser@7.120.4'
:
resolution
:
{
integrity
:
sha512-ymlNtIPG6HAKzM/JXpWVGCzCNufZNADfy+O/olZuVJW5Be1DtOFyRnBvz0LeKbmxJbXb2lX/XMhuen6PXPdoQw==
}
engines
:
{
node
:
'
>=8'
}
'
@sentry/core@7.120.4'
:
resolution
:
{
integrity
:
sha512-TXu3Q5kKiq8db9OXGkWyXUbIxMMuttB5vJ031yolOl5T/B69JRyAoKuojLBjRv1XX583gS1rSSoX8YXX7ATFGA==
}
engines
:
{
node
:
'
>=8'
}
'
@sentry/integrations@7.120.4'
:
resolution
:
{
integrity
:
sha512-kkBTLk053XlhDCg7OkBQTIMF4puqFibeRO3E3YiVc4PGLnocXMaVpOSCkMqAc1k1kZ09UgGi8DxfQhnFEjUkpA==
}
engines
:
{
node
:
'
>=8'
}
'
@sentry/replay@7.120.4'
:
resolution
:
{
integrity
:
sha512-FW8sPenNFfnO/K7sncsSTX4rIVak9j7VUiLIagJrcqZIC7d1dInFNjy8CdVJUlyz3Y3TOgIl3L3+ZpjfyMnaZg==
}
engines
:
{
node
:
'
>=12'
}
'
@sentry/types@7.120.4'
:
resolution
:
{
integrity
:
sha512-cUq2hSSe6/qrU6oZsEP4InMI5VVdD86aypE+ENrQ6eZEVLTCYm1w6XhW1NvIu3UuWh7gZec4a9J7AFpYxki88Q==
}
engines
:
{
node
:
'
>=8'
}
'
@sentry/utils@7.120.4'
:
resolution
:
{
integrity
:
sha512-zCKpyDIWKHwtervNK2ZlaK8mMV7gVUijAgFeJStH+CU/imcdquizV3pFLlSQYRswG+Lbyd6CT/LGRh3IbtkCFw==
}
engines
:
{
node
:
'
>=8'
}
'
@shikijs/core@2.5.0'
:
resolution
:
{
integrity
:
sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg==
}
...
...
@@ -4514,6 +4514,9 @@ packages:
globrex@0.1.2
:
resolution
:
{
integrity
:
sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==
}
glsk-toolkit@1.0.5
:
resolution
:
{
integrity
:
sha512-BUWYTM5NWzN0n2jho6b5nbTwfCiQHBz+Ce5DN6MmJi8pQxI+AXFqgD5DDY1BfRdXjAVsHXdyBauw1VJjFX3Tqw==
}
gopd@1.2.0
:
resolution
:
{
integrity
:
sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==
}
engines
:
{
node
:
'
>=
0.4'
}
...
...
@@ -4625,6 +4628,9 @@ packages:
resolution
:
{
integrity
:
sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==
}
engines
:
{
node
:
'
>=
4'
}
immediate@3.0.6
:
resolution
:
{
integrity
:
sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==
}
immutable@5.1.4
:
resolution
:
{
integrity
:
sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==
}
...
...
@@ -4948,6 +4954,9 @@ packages:
resolution
:
{
integrity
:
sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
}
engines
:
{
node
:
'
>=
0.8.0'
}
lie@3.1.1
:
resolution
:
{
integrity
:
sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==
}
lilconfig@2.1.0
:
resolution
:
{
integrity
:
sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==
}
engines
:
{
node
:
'
>=10'
}
...
...
@@ -4979,6 +4988,9 @@ packages:
resolution
:
{
integrity
:
sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==
}
engines
:
{
node
:
'
>=14'
}
localforage@1.10.0
:
resolution
:
{
integrity
:
sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==
}
locate-path@5.0.0
:
resolution
:
{
integrity
:
sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
}
engines
:
{
node
:
'
>=8'
}
...
...
@@ -8995,6 +9007,61 @@ snapshots:
'
@sec-ant/readable-stream@0.4.1'
:
{}
'
@sentry-internal/feedback@7.120.4'
:
dependencies
:
'
@sentry/core'
:
7.120.4
'
@sentry/types'
:
7.120.4
'
@sentry/utils'
:
7.120.4
'
@sentry-internal/replay-canvas@7.120.4'
:
dependencies
:
'
@sentry/core'
:
7.120.4
'
@sentry/replay'
:
7.120.4
'
@sentry/types'
:
7.120.4
'
@sentry/utils'
:
7.120.4
'
@sentry-internal/tracing@7.120.4'
:
dependencies
:
'
@sentry/core'
:
7.120.4
'
@sentry/types'
:
7.120.4
'
@sentry/utils'
:
7.120.4
'
@sentry/browser@7.120.4'
:
dependencies
:
'
@sentry-internal/feedback'
:
7.120.4
'
@sentry-internal/replay-canvas'
:
7.120.4
'
@sentry-internal/tracing'
:
7.120.4
'
@sentry/core'
:
7.120.4
'
@sentry/integrations'
:
7.120.4
'
@sentry/replay'
:
7.120.4
'
@sentry/types'
:
7.120.4
'
@sentry/utils'
:
7.120.4
'
@sentry/core@7.120.4'
:
dependencies
:
'
@sentry/types'
:
7.120.4
'
@sentry/utils'
:
7.120.4
'
@sentry/integrations@7.120.4'
:
dependencies
:
'
@sentry/core'
:
7.120.4
'
@sentry/types'
:
7.120.4
'
@sentry/utils'
:
7.120.4
localforage
:
1.10.0
'
@sentry/replay@7.120.4'
:
dependencies
:
'
@sentry-internal/tracing'
:
7.120.4
'
@sentry/core'
:
7.120.4
'
@sentry/types'
:
7.120.4
'
@sentry/utils'
:
7.120.4
'
@sentry/types@7.120.4'
:
{}
'
@sentry/utils@7.120.4'
:
dependencies
:
'
@sentry/types'
:
7.120.4
'
@shikijs/core@2.5.0'
:
dependencies
:
'
@shikijs/engine-javascript'
:
2.5.0
...
...
@@ -11191,6 +11258,11 @@ snapshots:
globrex@0.1.2
:
{}
glsk-toolkit@1.0.5
:
dependencies
:
'
@sentry/browser'
:
7.120.4
crypto-js
:
4.2.0
gopd@1.2.0
:
{}
graceful-fs@4.2.10
:
{}
...
...
@@ -11294,6 +11366,8 @@ snapshots:
ignore@7.0.5
:
{}
immediate@3.0.6
:
{}
immutable@5.1.4
:
{}
import-cwd@3.0.0
:
...
...
@@ -11546,6 +11620,10 @@ snapshots:
prelude-ls
:
1.2.1
type-check
:
0.4.0
lie@3.1.1
:
dependencies
:
immediate
:
3.0.6
lilconfig@2.1.0
:
{}
lilconfig@3.1.3
:
{}
...
...
@@ -11576,6 +11654,10 @@ snapshots:
pkg-types
:
2.3.0
quansync
:
0.2.11
localforage@1.10.0
:
dependencies
:
lie
:
3.1.1
locate-path@5.0.0
:
dependencies
:
p-locate
:
4.1.0
...
...
pnpm-workspace.yaml
View file @
5aaa7c6
...
...
@@ -79,6 +79,7 @@ catalog:
execa
:
^9.6.0
find-up
:
^7.0.0
globals
:
^16.3.0
glsk-toolkit
:
^1.0.5
happy-dom
:
^17.6.3
jsonc-eslint-parser
:
^2.4.0
lefthook
:
^1.11.14
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment