MCPcopy Create free account
hub / github.com/codeaashu/claude-code / checkIfLocalPlugin

Function checkIfLocalPlugin

src/commands/plugin/ManagePlugins.tsx:376–383  ·  view source on GitHub ↗

* Check if a plugin is from a local source and cannot be remotely updated * @returns Error message if local, null if remote/updatable

(pluginName: string, marketplaceName: string)

Source from the content-addressed store, hash-verified

374 * @returns Error message if local, null if remote/updatable
375 */
376async function checkIfLocalPlugin(pluginName: string, marketplaceName: string): Promise<string | null> {
377 const marketplace = await getMarketplace(marketplaceName);
378 const entry = marketplace?.plugins.find(p => p.name === pluginName);
379 if (entry && typeof entry.source === 'string') {
380 return `Local plugins cannot be updated remotely. To update, modify the source at: ${entry.source}`;
381 }
382 return null;
383}
384
385/**
386 * Filter out plugins that are force-disabled by org policy (policySettings).

Callers 1

ManagePluginsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected