Context manager for Kysely using AsyncLocalStorage. Automatically propagates transactions through call chains without explicit parameter passing. Keeps Kysely simple while adding convenient transaction support to repositories.
npm i kysely-context
# or
bun add kysely-context- Simple — Kysely doesn't become a monster, API stays clean
- Automatic transaction propagation — no need to pass
trxthrough all application layers - Transparent — repositories work the same inside and outside transactions
See examples/ directory.
MIT