MCPcopy Create free account
hub / github.com/freecodexyz/free-code / resolveValue

Function resolveValue

src/utils/plugins/mcpPluginIntegration.ts:475–490  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

473 const allMissingVars: string[] = []
474
475 const resolveValue = (value: string): string => {
476 // First substitute plugin-specific variables
477 let resolved = substitutePluginVariables(value, plugin)
478
479 // Then substitute user config variables if provided
480 if (userConfig) {
481 resolved = substituteUserConfigVariables(resolved, userConfig)
482 }
483
484 // Finally expand general environment variables
485 // This is done last so plugin-specific and user config vars take precedence
486 const { expanded, missingVars } = expandEnvVarsInString(resolved)
487 allMissingVars.push(...missingVars)
488
489 return expanded
490 }
491
492 let resolved: McpServerConfig
493

Callers 1

Calls 3

expandEnvVarsInStringFunction · 0.85

Tested by

no test coverage detected