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

Function findReverseDependents

src/utils/plugins/dependencyResolver.ts:244–263  ·  view source on GitHub ↗
(
  pluginId: PluginId,
  plugins: readonly LoadedPlugin[],
)

Source from the content-addressed store, hash-verified

242 * @returns Names of plugins that will break if `pluginId` goes away
243 */
244export function findReverseDependents(
245 pluginId: PluginId,
246 plugins: readonly LoadedPlugin[],
247): string[] {
248 const { name: targetName } = parsePluginIdentifier(pluginId)
249 return plugins
250 .filter(
251 p =>
252 p.enabled &&
253 p.source !== pluginId &&
254 (p.manifest.dependencies ?? []).some(d => {
255 const qualified = qualifyDependency(d, p.source)
256 // Bare dep (from @inline plugin): match by name only
257 return parsePluginIdentifier(qualified).marketplace
258 ? qualified === pluginId
259 : qualified === targetName
260 }),
261 )
262 .map(p => p.name)
263}
264
265/**
266 * Build the set of plugin IDs currently enabled at a given settings scope.

Callers 2

uninstallPluginOpFunction · 0.85
setPluginEnabledOpFunction · 0.85

Calls 2

parsePluginIdentifierFunction · 0.85
qualifyDependencyFunction · 0.85

Tested by

no test coverage detected