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

Function getConfigSchemaArray

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

Source from the content-addressed store, hash-verified

6export const SECRET_FIELD_VALUE = '**************** POSTHOG SECRET FIELD ****************'
7
8export function getConfigSchemaArray(
9 configSchema: Record<string, PluginConfigSchema> | PluginConfigSchema[]
10): PluginConfigSchema[] {
11 if (Array.isArray(configSchema)) {
12 return configSchema
13 } else {
14 return Object.entries(configSchema)
15 .map(([key, value]) => ({ key, ...value }))
16 .sort((a, b) => (a.order || 999999) - (b.order || 999999))
17 }
18}
19
20export function getConfigSchemaObject(
21 configSchema: Record<string, PluginConfigSchema> | PluginConfigSchema[]

Callers 5

pluginsLogic.tsFile · 0.90
PluginDrawerFunction · 0.90
defaultConfigForPluginFunction · 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…