mirror of
https://github.com/insistence/RuoYi-Vue3-FastAPI.git
synced 2026-10-13 20:51:06 +00:00
* feat: 支持 v2 插件、原生扩展与签名发布 * fix: 修复测试 * feat: 增强宿主 SDK、运行观测与制品维护能力 * feat: 增强文件传输、配置观测与本地开发能力 * feat: 支持 SSE 实时事件流并完善开发脚手架 * feat: 完善长连接鉴权复核与关闭回收 * feat: 增强生命周期与任务关闭可靠性 * feat: 收紧健康检查契约并补齐前端与真实网络验收 * feat: 增加SDK溯源与离线更新工具并验证跨版本兼容 * feat: 增加持久化业务示例与受控 Python 交付 * feat: 增加统一运行诊断与多worker状态观测 * feat: 增加固定目标发布等待与自动验收 * fix: 修复多环境插件部署前缀与代理配置不一致 * fix: 修复测试
55 lines
1.9 KiB
Python
55 lines
1.9 KiB
Python
import importlib
|
|
from functools import lru_cache
|
|
from typing import TYPE_CHECKING
|
|
|
|
import typer
|
|
|
|
from .commands.artifact import register_artifact_commands
|
|
from .commands.configuration import register_configuration_commands
|
|
from .commands.dependency import register_dependency_commands
|
|
from .commands.developer import register_developer_commands
|
|
from .commands.discovery import register_discovery_commands
|
|
from .commands.lifecycle import register_lifecycle_commands
|
|
from .commands.sdk import register_sdk_commands
|
|
|
|
if TYPE_CHECKING:
|
|
from .artifact_controller import PluginArtifactCommandController
|
|
from .controller import PluginCommandController
|
|
|
|
app = typer.Typer(
|
|
help='插件管理相关命令',
|
|
no_args_is_help=True,
|
|
context_settings={'help_option_names': ['-h', '--help']},
|
|
)
|
|
|
|
|
|
@lru_cache(maxsize=1)
|
|
def _get_plugin_command_controller() -> 'PluginCommandController':
|
|
"""
|
|
延迟获取插件命令控制器。
|
|
|
|
:return: 插件命令控制器
|
|
"""
|
|
controller_class = importlib.import_module('cli.groups.plugin.controller').PluginCommandController
|
|
return controller_class()
|
|
|
|
|
|
@lru_cache(maxsize=1)
|
|
def _get_plugin_artifact_controller() -> 'PluginArtifactCommandController':
|
|
"""
|
|
延迟获取制品命令控制器,避免帮助查询加载部署依赖。
|
|
|
|
:return: 制品命令控制器
|
|
"""
|
|
controller_class = importlib.import_module('cli.groups.plugin.artifact_controller').PluginArtifactCommandController
|
|
return controller_class()
|
|
|
|
|
|
register_discovery_commands(app, _get_plugin_command_controller)
|
|
register_configuration_commands(app, _get_plugin_command_controller)
|
|
register_dependency_commands(app, _get_plugin_command_controller)
|
|
register_lifecycle_commands(app, _get_plugin_command_controller)
|
|
register_developer_commands(app, _get_plugin_command_controller)
|
|
register_artifact_commands(app, _get_plugin_artifact_controller)
|
|
register_sdk_commands(app)
|