MCPcopy Index your code
hub / github.com/PostHog/posthog / getConfigSchemaObject

Function getConfigSchemaObject

frontend/src/scenes/plugins/utils.ts:20–34  ·  view source on GitHub ↗
(
    configSchema: Record<string, PluginConfigSchema> | PluginConfigSchema[]
)

Source from the content-addressed store, hash-verified

18}
19
20export function getConfigSchemaObject(
21 configSchema: Record<string, PluginConfigSchema> | PluginConfigSchema[]
22): Record<string, PluginConfigSchema> {
23 if (Array.isArray(configSchema)) {
24 const newSchema: Record<string, PluginConfigSchema> = {}
25 configSchema.forEach((conf, order) => {
26 if (conf.key) {
27 newSchema[conf.key] = { ...conf, order }
28 }
29 })
30 return newSchema
31 } else {
32 return configSchema
33 }
34}
35
36export function defaultConfigForPlugin(plugin: PluginTypeWithConfig): Record<string, any> {
37 const config: Record<string, any> = {}

Callers 2

pluginsLogic.tsFile · 0.90
getPluginConfigFormDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…