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

Function removeExtraMarketplace

src/commands/plugin/PluginSettings.tsx:317–356  ·  view source on GitHub ↗

* Remove a marketplace from extraKnownMarketplaces in the given settings sources, * and also remove any associated enabled plugins.

(name: string, sources: Array<{
  source: EditableSettingSource;
}>)

Source from the content-addressed store, hash-verified

315 * and also remove any associated enabled plugins.
316 */
317function removeExtraMarketplace(name: string, sources: Array<{
318 source: EditableSettingSource;
319}>): void {
320 for (const {
321 source
322 } of sources) {
323 const settings = getSettingsForSource(source);
324 if (!settings) continue;
325 const updates: Record<string, unknown> = {};
326
327 // Remove from extraKnownMarketplaces
328 if (settings.extraKnownMarketplaces?.[name]) {
329 updates.extraKnownMarketplaces = {
330 ...settings.extraKnownMarketplaces,
331 [name]: undefined
332 };
333 }
334
335 // Remove associated enabled plugins (format: "plugin@marketplace")
336 if (settings.enabledPlugins) {
337 const suffix = `@${name}`;
338 let removedPlugins = false;
339 const updatedPlugins = {
340 ...settings.enabledPlugins
341 };
342 for (const pluginId in updatedPlugins) {
343 if (pluginId.endsWith(suffix)) {
344 updatedPlugins[pluginId] = undefined;
345 removedPlugins = true;
346 }
347 }
348 if (removedPlugins) {
349 updates.enabledPlugins = updatedPlugins;
350 }
351 }
352 if (Object.keys(updates).length > 0) {
353 updateSettingsForSource(source, updates);
354 }
355 }
356}
357function ErrorsTabContent(t0) {
358 const $ = _c(26);
359 const {

Callers 1

handleSelectFunction · 0.85

Calls 3

getSettingsForSourceFunction · 0.85
updateSettingsForSourceFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected