npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@absolutejs/health

v0.1.0

Published

Liveness + readiness probes for the AbsoluteJS substrate. createHealthChecker composes named checks; healthPlugin exposes /healthz (process alive?) + /readyz (can serve traffic?) with a standard JSON envelope. Per-check timeout, aggregate worst-of-any sta

Readme

@absolutejs/health

Liveness + readiness probes for the AbsoluteJS substrate. One Elysia plugin, two endpoints, a standard JSON envelope that load balancers and Kubernetes-style orchestrators understand out of the box.

import { Elysia } from 'elysia';
import {
  createHealthChecker,
  healthPlugin,
  metricsCheck,
  probeCheck,
  httpCheck,
} from '@absolutejs/health';

const checker = createHealthChecker({
  checks: [
    // Synthesis from a substrate package's metrics() snapshot.
    metricsCheck('queue', () => worker.metrics(), (m) => ({
      status: m.failed > 100 ? 'warn' : 'pass',
      observed: { runs: m.runs, failed: m.failed },
    })),

    // Wrap an arbitrary probe.
    probeCheck('postgres', () => pg.query('SELECT 1')),

    // Downstream HTTP dependency.
    httpCheck('otlp-collector', 'http://collector:4318/healthz', {
      kind: 'readiness',  // run only under /readyz
    }),
  ],
});

const app = new Elysia().use(await healthPlugin({ checker }));
// GET /healthz → liveness:  200 / 503 with { status, checks, at }
// GET /readyz  → readiness: same shape, filtered to readiness + both

Two endpoints, two semantics

| Endpoint | Purpose | Used by | | --- | --- | --- | | /healthz | "Is this process alive?" If fail, the orchestrator restarts the container. | Kubernetes liveness probe, systemd WatchdogSec, @absolutejs/runtime | | /readyz | "Can this instance serve traffic right now?" If fail, the LB stops routing to it (but doesn't kill it). | Load balancer health checks, drain workflows |

The distinction matters: a draining instance returns readyz: fail

  • healthz: pass. The LB stops sending new traffic while in-flight requests finish.

Body shape

{
  "status": "pass",
  "at": 1717161600000,
  "checks": {
    "queue": {
      "status": "pass",
      "latencyMs": 1,
      "observed": { "runs": 1057, "failed": 0 }
    },
    "postgres": { "status": "pass", "latencyMs": 12 }
  }
}

Compatible with the IETF health-check JSON draft and the Kubernetes livez / readyz conventions. content-type: application/health+json.

Status codes

  • pass200 OK
  • warn200 OK (don't reroute traffic; surface in your dashboard)
  • fail503 Service Unavailable

LBs route on status code; humans + dashboards read the body.

Aggregation

Status is the WORST of any check: fail > warn > pass. A single failing dependency fails the whole envelope — same as Kubernetes /healthz rollup behavior.

Check factories

  • probeCheck(name, () => promise) — wrap any () => Promise<unknown>. Resolves → pass; throws → fail with the error message.
  • metricsCheck(name, () => metrics(), evaluator) — read a substrate package's metrics() and decide pass/warn/fail. Snapshot values can land in observed for dashboards.
  • httpCheck(name, url, options?)GET url and grade by HTTP status. 2xx → pass, anything else → fail.
  • Roll your own — any { name, check: () => CheckResult | Promise<CheckResult> } works.

Kind filtering

{ name: 'shutting-down', kind: 'readiness', check: () => ({
  status: draining ? 'fail' : 'pass'
})}

A check's kind ('liveness' / 'readiness' / 'both', default 'both') controls which endpoint runs it. Run heavy downstream checks under readiness only; keep liveness limited to "the JS process is responsive."

License

BSL-1.1 with named carveout against hosted uptime / synthetic- monitoring services. Change date: 2030-05-31 (Apache 2.0).