MCPcopy
hub / github.com/callstack/agent-device / writeJsonFile

Function writeJsonFile

src/remote/remote-connection-state.ts:248–254  ·  view source on GitHub ↗
(filePath: string, value: unknown)

Source from the content-addressed store, hash-verified

246}
247
248function writeJsonFile(filePath: string, value: unknown): void {
249 fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`, {
250 encoding: 'utf8',
251 mode: 0o600,
252 });
253 fs.chmodSync(filePath, 0o600);
254}
255
256function sanitizeDaemonBaseUrl(value: string | undefined): string | undefined {
257 if (!value) return undefined;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected