Skip to content

@xtandard/audit/storage/file

File-system storage: createFileStorage() persists each key as a JSON file under a base directory. Zero dependencies; Bun and Node. KV only — events use the core’s generic KV event log, single writer per tenant.

import { … } from "@xtandard/audit/storage/file";
Name Summary
createFileStorage Create a file-backed storage. Values are serialized as JSON. watch is implemented via fs.watch on the base directory (recursive); it is best-effort and may coalesce or miss events on platforms without recursive-watch support.
Name Summary
FileAuditStorage A watchable, compare-and-swap capable file-backed storage.
FileStorageOptions Options for createFileStorage: the base dir, created on demand.