MCPcopy Create free account
hub / github.com/coder/mux / loadSecretsConfig

Method loadSecretsConfig

src/node/config.ts:2377–2389  ·  view source on GitHub ↗

* Load secrets configuration from JSON file * Returns empty config if file doesn't exist

()

Source from the content-addressed store, hash-verified

2375 * Returns empty config if file doesn't exist
2376 */
2377 loadSecretsConfig(): SecretsConfig {
2378 try {
2379 if (fs.existsSync(this.secretsFile)) {
2380 const data = fs.readFileSync(this.secretsFile, "utf-8");
2381 const parsed = JSON.parse(data) as unknown;
2382 return Config.normalizeSecretsConfig(parsed);
2383 }
2384 } catch (error) {
2385 log.error("Error loading secrets config:", error);
2386 }
2387
2388 return {};
2389 }
2390
2391 /**
2392 * Save secrets configuration to JSON file

Callers 7

mainFunction · 0.95
getGlobalSecretsMethod · 0.95
updateGlobalSecretsMethod · 0.95
getEffectiveSecretsMethod · 0.95
getProjectSecretsMethod · 0.95
updateProjectSecretsMethod · 0.95
copyPersistentConfigFunction · 0.80

Calls 2

parseMethod · 0.45

Tested by

no test coverage detected