@centralping/ergo
Version [0.6.0]
Added
-
Intrinsic
setPathon built-in middleware factory return values. (#153) Domain-producing middleware factories (url,logger,body,accepts,cookie,authorization,tracing,prefer,paginate,idempotency) now attach a non-enumerablesetPathproperty to their returned middleware function.normalizeOpincompose-with.jsreads this property, allowing bare functions to be composed without explicit{fn, setPath}wrappers:// Before: compose({fn: url(), setPath: 'url'}, {fn: body(), setPath: 'body'})// After: compose(url(), body())The explicit
{fn, setPath}form remains fully supported for custom middleware. TypeScript declarations updated with& {readonly setPath: '...'}intersection types andMiddlewareOp<K, F>union type in compose-with overloads.
Fixed
- JSDoc
@exampleblocks inhandler,tracing, andindexnow include theimport http from 'node:http'line. (#155)