MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / substituteEnvInRecord

Function substituteEnvInRecord

common/src/mcp/client.ts:39–47  ·  view source on GitHub ↗

* Substitutes environment variable references in all values of a record.

(
  record: Record<string, string>,
)

Source from the content-addressed store, hash-verified

37 * Substitutes environment variable references in all values of a record.
38 */
39function substituteEnvInRecord(
40 record: Record<string, string>,
41): Record<string, string> {
42 const result: Record<string, string> = {}
43 for (const [key, value] of Object.entries(record)) {
44 result[key] = substituteEnvInValue(value)
45 }
46 return result
47}
48
49function hashConfig(config: MCPConfig): string {
50 if (config.type === 'stdio') {

Callers 1

getMCPClientFunction · 0.85

Calls 1

substituteEnvInValueFunction · 0.85

Tested by

no test coverage detected