12.2.0 (2026-11-16)
Features
- http: add
FetchHealthIndicator(8f0a72c) - accept duration and size strings like
'2s'and'150mb'(9bfcc20) - add
degradedAfter()anddegradedOnFailure()(ef957dd), closes #2794 - add
withData(),withSuccessData()andwithFailureData()to attempts (3bf4cc9) - register a named swagger schema for health check results (41081e5), closes #2070, @kimseongchan0914
- export the
HealthIndicatorStatusandHealthCheckStatusobjects (79829bc)
@Get('ready')
@HealthCheck()
ready() {
return this.health.check([
() => this.db.pingCheck('database').degradedAfter('300ms').withTimeout('2s'),
() => this.http.pingCheck('payments', 'https://payments.example.com/health').withData({ owner: 'team-payments' }),
() => this.disk.checkStorage('storage', { path: '/', threshold: '250gb' }).cacheFor('30s'),
]);
}Bug Fixes
- health-check: default each
@HealthCheck()option on its own (f259b05), @thekhegay - mikro-orm: safely resolve the MikroORM context connection (2935616), closes #2793, @helmipradita
- load optional peers in a way bundlers can follow (066a7db), closes #2790, @thekhegay
- ignore reserved keys returned from
attempt()(2c4aedc), closes #2795
Deprecations
HttpHealthIndicatoris deprecated. UseFetchHealthIndicator, which needs no additional package.- The value returned by the
attempt()function is still added to the result, but the next major version ignores it. UsewithSuccessData()to choose the data.
Good to know
- The results of the memory and disk checks now include
responseTime. - A disk check on a path that does not exist is
down(503). Before, it was an error (500). @HealthCheck({ noCache: true })no longer turns off the Swagger documentation, and@HealthCheck({ swaggerDocumentation: false })no longer turns off theCache-Controlheader.- A missing optional package is now reported when the application starts (
app.init()orapp.listen()), and only for the indicators you inject. - The Swagger document uses the schemas
TerminusHealthCheckResultandTerminusHealthIndicatorResult. Generated API clients get new model names.