feat(plugin): 集成 WASM 插件系统到主服务并修复链路问题

- 新增 erp-plugin crate:插件管理、WASM 运行时、动态表、数据 CRUD
- 新增前端插件管理页面(PluginAdmin/PluginCRUDPage)和 API 层
- 新增插件数据迁移(plugins/plugin_entities/plugin_event_subscriptions)
- 新增权限补充迁移(为已有租户补充 plugin.admin/plugin.list 权限)
- 修复 PluginAdmin 页面 InstallOutlined 图标不存在的崩溃问题
- 修复 settings 唯一索引迁移顺序错误(先去重再建索引)
- 更新 wiki 和 CLAUDE.md 反映插件系统集成状态
- 新增 dev.ps1 一键启动脚本
This commit is contained in:
iven
2026-04-15 23:32:02 +08:00
parent 7e8fabb095
commit ff352a4c24
46 changed files with 6723 additions and 19 deletions

57
Cargo.lock generated
View File

@@ -256,6 +256,7 @@ dependencies = [
"matchit",
"memchr",
"mime",
"multer",
"percent-encoding",
"pin-project-lite",
"serde_core",
@@ -985,6 +986,20 @@ dependencies = [
"syn 2.0.117",
]
[[package]]
name = "dashmap"
version = "6.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
dependencies = [
"cfg-if",
"crossbeam-utils",
"hashbrown 0.14.5",
"lock_api",
"once_cell",
"parking_lot_core",
]
[[package]]
name = "debugid"
version = "0.8.0"
@@ -1189,6 +1204,7 @@ dependencies = [
"thiserror 2.0.18",
"tokio",
"tracing",
"utoipa",
"uuid",
]
@@ -1212,6 +1228,29 @@ dependencies = [
"validator",
]
[[package]]
name = "erp-plugin"
version = "0.1.0"
dependencies = [
"async-trait",
"axum",
"chrono",
"dashmap",
"erp-core",
"sea-orm",
"serde",
"serde_json",
"sha2",
"thiserror 2.0.18",
"tokio",
"toml 0.8.23",
"tracing",
"utoipa",
"uuid",
"wasmtime",
"wasmtime-wasi",
]
[[package]]
name = "erp-plugin-prototype"
version = "0.1.0"
@@ -1246,6 +1285,7 @@ dependencies = [
"erp-config",
"erp-core",
"erp-message",
"erp-plugin",
"erp-server-migration",
"erp-workflow",
"redis",
@@ -2285,6 +2325,23 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "multer"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b"
dependencies = [
"bytes",
"encoding_rs",
"futures-util",
"http",
"httparse",
"memchr",
"mime",
"spin",
"version_check",
]
[[package]]
name = "nix"
version = "0.29.0"