MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveEnvVarsInObject

Function resolveEnvVarsInObject

apps/sim/lib/webhooks/env-resolver.ts:15–22  ·  view source on GitHub ↗
(
  config: T,
  userId: string,
  workspaceId?: string
)

Source from the content-addressed store, hash-verified

13 * @returns A new object with all env var references resolved
14 */
15export async function resolveEnvVarsInObject<T extends Record<string, unknown>>(
16 config: T,
17 userId: string,
18 workspaceId?: string
19): Promise<T> {
20 const envVars = await getEffectiveDecryptedEnv(userId, workspaceId)
21 return resolveEnvVarReferences(config, envVars, { deep: true }) as T
22}
23
24/**
25 * Normalizes webhook provider config into a plain object for runtime resolution.

Callers 3

route.tsFile · 0.90

Calls 2

getEffectiveDecryptedEnvFunction · 0.90
resolveEnvVarReferencesFunction · 0.90

Tested by

no test coverage detected