MCPcopy Index your code
hub / github.com/MiniMax-AI/cli / writeConfigFile

Function writeConfigFile

src/config/loader.ts:23–29  ·  view source on GitHub ↗
(data: Record<string, unknown>)

Source from the content-addressed store, hash-verified

21}
22
23export async function writeConfigFile(data: Record<string, unknown>): Promise<void> {
24 await ensureConfigDir();
25 const path = getConfigPath();
26 const tmp = path + '.tmp';
27 writeFileSync(tmp, JSON.stringify(data, null, 2) + '\n', { mode: 0o600 });
28 renameSync(tmp, path);
29}
30
31export function loadConfig(flags: GlobalFlags): Config {
32 const file = readConfigFile();

Callers 8

saveCredentialsFunction · 0.90
clearCredentialsFunction · 0.90
runOAuthLoginFunction · 0.90
persistApiKeyFunction · 0.90
loginWithApiKeyFunction · 0.90
runFunction · 0.90
runFunction · 0.90
saveDetectedRegionFunction · 0.90

Calls 2

ensureConfigDirFunction · 0.90
getConfigPathFunction · 0.90

Tested by

no test coverage detected