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

Function parsePluginSettings

src/utils/plugins/pluginLoader.ts:1788–1800  ·  view source on GitHub ↗

* Parse raw settings through PluginSettingsSchema, returning only allowlisted keys. * Returns undefined if parsing fails or all keys are filtered out.

(
  raw: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

1786 * Returns undefined if parsing fails or all keys are filtered out.
1787 */
1788function parsePluginSettings(
1789 raw: Record<string, unknown>,
1790): Record<string, unknown> | undefined {
1791 const result = PluginSettingsSchema().safeParse(raw)
1792 if (!result.success) {
1793 return undefined
1794 }
1795 const data = result.data
1796 if (Object.keys(data).length === 0) {
1797 return undefined
1798 }
1799 return data
1800}
1801
1802/**
1803 * Load plugin settings from settings.json file or manifest.settings.

Callers 1

loadPluginSettingsFunction · 0.85

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected