MCPcopy Index your code
hub / github.com/codeaashu/claude-code / findPluginByIdentifier

Function findPluginByIdentifier

src/services/plugins/pluginOperations.ts:206–223  ·  view source on GitHub ↗

* Helper function to find a plugin from loaded plugins

(
  plugin: string,
  plugins: LoadedPlugin[],
)

Source from the content-addressed store, hash-verified

204 * Helper function to find a plugin from loaded plugins
205 */
206function findPluginByIdentifier(
207 plugin: string,
208 plugins: LoadedPlugin[],
209): LoadedPlugin | undefined {
210 const { name, marketplace } = parsePluginIdentifier(plugin)
211
212 return plugins.find(p => {
213 // Check exact name match
214 if (p.name === plugin || p.name === name) return true
215
216 // If marketplace specified, check if it matches the source
217 if (marketplace && p.source) {
218 return p.name === name && p.source.includes(`@${marketplace}`)
219 }
220
221 return false
222 })
223}
224
225/**
226 * Resolve a plugin ID from V2 installed plugins data for a plugin that may

Callers 1

uninstallPluginOpFunction · 0.85

Calls 1

parsePluginIdentifierFunction · 0.85

Tested by

no test coverage detected