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

Function parsePluginSettings

src/utils/plugins/pluginLoader.ts:1789–1801  ·  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

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

Callers 1

loadPluginSettingsFunction · 0.85

Calls 1

keysMethod · 0.65

Tested by

no test coverage detected