MCPcopy
hub / github.com/ZToolsCenter/ZTools / fetchPluginInfoFromDB

Method fetchPluginInfoFromDB

src/main/managers/pluginManager.ts:107–117  ·  view source on GitHub ↗

* 从数据库查询插件信息

(pluginPath: string)

Source from the content-addressed store, hash-verified

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 配置

Callers 4

isFeatureMainHideMethod · 0.95
createPluginViewMethod · 0.95
preloadPluginMethod · 0.95

Calls 1

dbGetMethod · 0.45

Tested by

no test coverage detected