MCPcopy
hub / github.com/codeaashu/claude-code / getAddDirEnabledPlugins

Function getAddDirEnabledPlugins

src/utils/plugins/addDirPluginSettings.ts:34–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 * on top to let user/project/local/flag/policy override.
33 */
34export function getAddDirEnabledPlugins(): NonNullable<
35 SettingsJson['enabledPlugins']
36> {
37 const result: NonNullable<SettingsJson['enabledPlugins']> = {}
38 for (const dir of getAdditionalDirectoriesForClaudeMd()) {
39 for (const file of SETTINGS_FILES) {
40 const { settings } = parseSettingsFile(join(dir, '.claude', file))
41 if (!settings?.enabledPlugins) {
42 continue
43 }
44 Object.assign(result, settings.enabledPlugins)
45 }
46 }
47 return result
48}
49
50/**
51 * Returns a merged record of extraKnownMarketplaces from all --add-dir directories.

Callers 4

getDeclaredMarketplacesFunction · 0.85
checkEnabledPluginsFunction · 0.85
getPluginEditableScopesFunction · 0.85

Calls 2

parseSettingsFileFunction · 0.85

Tested by

no test coverage detected