MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / buildConfig

Function buildConfig

apps/local/src/db/v1-v2-migration.ts:354–359  ·  view source on GitHub ↗
(kind: string, data: Record<string, unknown>)

Source from the content-addressed store, hash-verified

352 pluginId === "graphql-greenfield" ? "graphql" : pluginId || kind;
353
354const buildConfig = (kind: string, data: Record<string, unknown>): MigratedSourceConfig => {
355 const cfg = (data.config as Record<string, unknown> | undefined) ?? data;
356 if (kind === "mcp") return migrateMcpSourceConfig(cfg as never);
357 if (kind === "graphql") return migrateGraphqlSourceConfig(cfg as never);
358 return migrateOpenApiSourceConfig(cfg as never);
359};
360
361const isObjectRecord = (value: unknown): value is Record<string, unknown> =>
362 typeof value === "object" && value !== null && !Array.isArray(value);

Callers 1

readV1SnapshotFunction · 0.70

Calls 3

migrateMcpSourceConfigFunction · 0.90

Tested by

no test coverage detected