tekir
All Packages
Dev Toolsv0.1.4

@tekir/health

Health check endpoints with caching.

Installation

$bun add @tekir/health

Features

  • Register custom checks: DB, Redis, memory heap, memory RSS
  • Health report with isHealthy, status, and debug info
  • BaseCheck class for custom health checks
  • Parallel check execution
  • HealthProvider for DI registration

Quick Example

TypeScript
import { Health, DbCheck, MemoryHeapCheck } from '@tekir/health'

const health = new Health()
health.register([new DbCheck(db), new MemoryHeapCheck(512)])

app.router.get('/health', async (ctx) => {
  const report = await health.run()
  return ctx.response.json(report)
})

Changelog

v0.1.4LatestSeptember 16, 2026
  • Published output now uses the shared Node-targeted ESM bundle pipeline with external dependencies and generated TypeScript declarations, while Bun consumers keep the native source export.
v0.1.3July 23, 2026
  • Package metadata now follows the shared compatible 0.1.x dependency range used by this coordinated Tekir release.
v0.1.2July 16, 2026
  • Memory health checks retain two-decimal precision so small but valid heap/RSS measurements are no longer reported as zero.
v0.1.1June 13, 2026
  • Debug info is no longer included in the report by default. Pass run({ debug: true }) (from an internal or authorized endpoint) to include it. Behavior change: the public report no longer exposes pid, platform, or version.
  • Each check now runs under a timeout (default 5000 ms, configurable via run({ timeout })); a timed-out or throwing check is reported as an error result instead of taking down the whole report.
  • DbCheck/RedisCheck now return a generic Connection failed; the raw error is log-only, so connection details are not leaked in the response. A report with no checks registered now warns rather than reporting a misleading healthy.
  • Found and fixed with Fable.
v0.1.0April 1, 2026
  • Initial release

Other Dev Tools packages