Skip to content

@xtandard/webhooks/storage/file

File-system storage: createFileStorage() persists each key as a JSON file under a base directory. Zero dependencies; Bun and Node.

import { … } from "@xtandard/webhooks/storage/file";
Name Summary
createFileStorage Create a file-backed storage. 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
FileStorageOptions Options for createFileStorage. legacy defaults to "warn": leaves in the v0.1.4 layout are ignored, and a warning pointing at migrateFileStorage is printed once.
FileWebhooksStorage A watchable, compare-and-swap capable file-backed storage.