MCPcopy Create free account
hub / github.com/Noumena-Network/code / resolveSecretPath

Function resolveSecretPath

src/utils/fileBackedSecrets.ts:32–41  ·  view source on GitHub ↗
(secret: FileBackedSecret, configDir: string)

Source from the content-addressed store, hash-verified

30]
31
32function resolveSecretPath(secret: FileBackedSecret, configDir: string): string {
33 for (const overrideEnvVar of secret.overrideEnvVars) {
34 const candidate = process.env[overrideEnvVar]
35 if (candidate) {
36 return candidate
37 }
38 }
39
40 return join(configDir, secret.defaultFileName)
41}
42
43function readSecretIfPresent(secretPath: string): string | null {
44 try {

Callers 1

loadFileBackedSecretsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected