mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 16:02:24 +00:00
* test(vm): reproduce runtime store rollback poisoning * fix(vm): keep runtime sidecar rollback-readable * fix(vm): harden rollback-compatible runtime persistence * fix(vm): publish rollback lifecycle authority first * test(vm): harden rollback compatibility coverage
12 lines
381 B
TypeScript
12 lines
381 B
TypeScript
import { stringifyJsonWithinByteLimit } from './node-bounded-json-stringify'
|
|
import { writeSecureFile } from './secure-file'
|
|
|
|
export function writeSecureJsonFileWithinLimit(
|
|
targetPath: string,
|
|
value: unknown,
|
|
maxBytes: number,
|
|
options: { durable?: boolean } = {}
|
|
): void {
|
|
writeSecureFile(targetPath, stringifyJsonWithinByteLimit(value, maxBytes).serialized, options)
|
|
}
|