Skip to content

@eristack/idempotency

Idempotency-Key guard with Drizzle store, scoped keys, lease, Express/Nest/client adapters

idempotency-adapters

20 linesSource

Drizzle idempotency store, Express wrapIdempotentHandler, client fetch helper — production path.

Idempotency adapters

  • Store: createDrizzleIdempotencyStore + createIdempotencyTables from @eristack/idempotency/drizzle.
  • Express: wrapIdempotentHandler({ guard }, handler) from @eristack/idempotency/express.
  • Client: createIdempotencyClientFetch() from @eristack/idempotency/client.
  • Use scoped runScoped with hashIdempotencyRequest(body) when not using Express wrapper.

Memory store: unit tests only.