logger
Built-in middleware that logs mutation lifecycle events via ctx.logger.
Emits cart.mutation.start before delegation, cart.mutation.end on
resolve, and cart.mutation.error (at warn level) on reject before
rethrowing.
Signature
function logger(): CartMiddleware;Returns
A that observes — never alters — the chain.
Example
const kernel = createCart({
adapter,
middleware: [logger()],
});Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
LocaleTuple
Languagecountrycurrency triple that parameterizes every adapter call. Ensures currency is always colocated with locale so adapters never have to infer it from c
memoryIdempotencyStore
Inmemory backed by a Map. Suitable for tests, singleprocess dev servers, and as a reference implementation. Entries lazily expire on read; there is no backgroun