Files
orca/src/shared/bounded-secure-json-file.ts
T
NeilandOrca c419aadb19 oom(01): A1-shared-readers — reintroduce #10179 subset (#10294)
Files: 18 applied, 0 deleted (from 6eb70d8370)

Co-authored-by: Orca <help@stably.ai>
2026-07-24 20:30:31 -07:00

11 lines
333 B
TypeScript

import { stringifyJsonWithinByteLimit } from './node-bounded-json-stringify'
import { writeSecureFile } from './secure-file'
export function writeSecureJsonFileWithinLimit(
targetPath: string,
value: unknown,
maxBytes: number
): void {
writeSecureFile(targetPath, stringifyJsonWithinByteLimit(value, maxBytes).serialized)
}