mirror of
https://github.com/insistence/RuoYi-Vue3-FastAPI.git
synced 2026-09-21 04:46:28 +00:00
feat: 新增插件系统 (#112)
* feat: 初始化插件系统 * refactor: 收口插件系统运行时重构 * perf: 优化插件系统类型提示 * fix&perf: 修复和优化插件系统 * fix: 修复gitignore规则误忽略插件文件的问题 * fix: 修复运行时插件根路径算错的问题 * fix: 加强插件发现和路由注册的防护措施 * revert: 回滚定时任务白名单 * fix: 移除未使用的应用路由注册探测 * revert: 恢复部分代码 * perf: 优化插件系统 * docs: 新增插件开发文档 * perf: 优化插件管理模块 * perf: 提升插件系统核心能力 * refactor: 重构生命周期 step runner * fix: 修复lint错误 * test: 清理测试用例 * test: 调整测试目录名称 * fix: 修复前后端目录硬编码的问题 * fix: 修复插件系统安全性缺口 * refactor: 重新设计插件生命周期 Migration 事务与回滚 * perf: 优化插件系统边界问题 * refactor: 重构当前插件系统的依赖体系设计 * perf: 优化代码 * perf: 优化代码 * fix: 修复代码合并问题 * fix: 修复bug * perf: 优化代码 * perf&fix: 优化代码和修复bug * docs: 优化文档格式 * feat: 适配Vue2版本 * docs: 更新README文档 * fix: 修复ruff lint错误 * chore: 更新后端依赖文件
This commit is contained in:
@@ -204,6 +204,45 @@ DEFAULT_DANGEROUS_COMMAND_RULES: dict[str, DangerousCommandRule] = {
|
||||
'gen create-table': DangerousCommandRule(command_name='gen create-table', risk_level='high', supports_dry_run=True),
|
||||
'gen export': DangerousCommandRule(command_name='gen export', risk_level='high', supports_dry_run=True),
|
||||
'gen sync-db': DangerousCommandRule(command_name='gen sync-db', risk_level='normal', supports_dry_run=False),
|
||||
'plugin install': DangerousCommandRule(command_name='plugin install', risk_level='high', supports_dry_run=True),
|
||||
'plugin install-deps': DangerousCommandRule(
|
||||
command_name='plugin install-deps',
|
||||
risk_level='high',
|
||||
supports_dry_run=True,
|
||||
),
|
||||
'plugin upgrade': DangerousCommandRule(command_name='plugin upgrade', risk_level='high', supports_dry_run=True),
|
||||
'plugin batch': DangerousCommandRule(command_name='plugin batch', risk_level='high', supports_dry_run=True),
|
||||
'plugin enable': DangerousCommandRule(command_name='plugin enable', risk_level='normal', supports_dry_run=True),
|
||||
'plugin disable': DangerousCommandRule(command_name='plugin disable', risk_level='normal', supports_dry_run=True),
|
||||
'plugin config set': DangerousCommandRule(
|
||||
command_name='plugin config set',
|
||||
risk_level='normal',
|
||||
supports_dry_run=False,
|
||||
),
|
||||
'plugin config import': DangerousCommandRule(
|
||||
command_name='plugin config import',
|
||||
risk_level='normal',
|
||||
supports_dry_run=False,
|
||||
),
|
||||
'plugin config export': DangerousCommandRule(
|
||||
command_name='plugin config export',
|
||||
risk_level='normal',
|
||||
supports_dry_run=False,
|
||||
),
|
||||
'plugin uninstall': DangerousCommandRule(
|
||||
command_name='plugin uninstall', risk_level='normal', supports_dry_run=True
|
||||
),
|
||||
'plugin purge': DangerousCommandRule(command_name='plugin purge', risk_level='high', supports_dry_run=True),
|
||||
'plugin mark-success': DangerousCommandRule(
|
||||
command_name='plugin mark-success',
|
||||
risk_level='high',
|
||||
supports_dry_run=False,
|
||||
),
|
||||
'plugin mark-failed': DangerousCommandRule(
|
||||
command_name='plugin mark-failed',
|
||||
risk_level='high',
|
||||
supports_dry_run=False,
|
||||
),
|
||||
}
|
||||
|
||||
DEFAULT_DANGEROUS_COMMAND_RULE_REGISTRY = DangerousCommandRuleRegistry(rules=DEFAULT_DANGEROUS_COMMAND_RULES)
|
||||
|
||||
Reference in New Issue
Block a user