v0.52.2
Revert
Rolls back defineRouteKit, mapDomainErrors, and the $use MiddlewareDef union overload added in v0.52.1 (#10).
In practice, these helpers made route-level dependency injection typeable instead of removing it — and the DI pattern itself is the real source of the any ctx and GuardDef<any, any> noise reported in #9. The cleaner fix is the shared rpc package pattern (export s + shared guards from an internal package, import directly in domain packages) which removes the boilerplate without new API surface. See #9 for the pattern and rationale.
Breaking for v0.52.1 consumers only. If you adopted one of these in v0.52.1:
-
defineRouteKit<Ctx>()→ inline the route in the package that owns thesilgi()instance, or importsfrom a shared package. -
mapDomainErrors(mapper)→ keep as a userland wrapper; ~10 lines, not core. -
$use(mw)with aGuardDef | WrapDefunion → pass the concrete middleware; the union boundary was only needed for the factory pattern we're recommending against. -
Revert: defineRouteKit, mapDomainErrors, $use union overload (#10) - by @productdevbook (ae33d)