* 从数据库查询插件信息
(pluginPath: string)
| 105 | * 从数据库查询插件信息 |
| 106 | */ |
| 107 | private fetchPluginInfoFromDB(pluginPath: string): any { |
| 108 | try { |
| 109 | const plugins = api.dbGet('plugins') |
| 110 | if (plugins && Array.isArray(plugins)) { |
| 111 | return plugins.find((p: any) => p.path === pluginPath) || null |
| 112 | } |
| 113 | } catch (error) { |
| 114 | console.error('[Plugin] 查询插件信息失败:', error) |
| 115 | } |
| 116 | return null |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * 读取 plugin.json 配置 |
no test coverage detected