feat: 新增xq0031_xq0032 ERP报表导出插件,完成功能与基建更新
1. 新增xq0031_xq0032插件:包含前后端源码、打包脚本、配置文件与插件元数据 2. 新增内网文件服务器组件:exe、启停脚本、打包脚本与配置 3. 新增敏感凭证RSA加密下发能力与存储结构 4. 新增大文件源管理表与相关API 5. 优化登录流程与会话管理,新增Chrome自动化安装工具链 6. 清理废弃插件与示例代码 7. 更新版本号至1.1.3,完善安装包与.gitignore配置
This commit is contained in:
@@ -41,7 +41,13 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _discover_modules() -> list:
|
||||
"""发现插件模块:目录优先,排除 base 与 `_` 前缀的私有文件。"""
|
||||
"""发现插件模块:目录优先,排除 base 与 `_` 前缀的私有文件。
|
||||
|
||||
全新安装时 plugins/ 尚不存在(插件由登录后按权限自下载,不随安装包分发),
|
||||
必须视为"零插件"而不是抛错——否则 lifespan 失败导致壳子无法启动。
|
||||
"""
|
||||
if not _PLUGINS_ROOT.is_dir():
|
||||
return []
|
||||
names: list = []
|
||||
seen: set = set()
|
||||
for d in sorted(_PLUGINS_ROOT.iterdir()):
|
||||
@@ -66,8 +72,11 @@ def load_plugins(allowed: set = None, reload: bool = False) -> None:
|
||||
"""
|
||||
if reload:
|
||||
PLUGINS.clear()
|
||||
# base 是 PLUGINS 注册表的单例宿主:reload 时绝不能删,否则插件模块重新
|
||||
# import base 会得到全新空注册表,注册的插件对 meta/runs 等引用方全部不可见。
|
||||
for _m in [m for m in sys.modules
|
||||
if m.startswith(_PKG_NAME + ".") and m != _PKG_NAME]:
|
||||
if m.startswith(_PKG_NAME + ".") and m != _PKG_NAME
|
||||
and m != _PKG_NAME + ".base"]:
|
||||
del sys.modules[_m]
|
||||
for _mod in _discover_modules():
|
||||
if allowed is not None and _mod not in allowed:
|
||||
|
||||
Reference in New Issue
Block a user