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

@openstatus/health-fly

v0.1.4

Published

Fly.io server metadata for @openstatus/health

Readme

@openstatus/health-fly

Fly.io server metadata for @openstatus/health. Renders the region, machine and deployment that produced the response under a server key.

deno add jsr:@openstatus/health jsr:@openstatus/health-fly
npm install @openstatus/health @openstatus/health-fly
import { Hono } from "hono";
import { healthRoute } from "@openstatus/health-hono";
import { flyExtend } from "@openstatus/health-fly";
import { tursoProbe } from "@openstatus/health-turso";

const app = new Hono();

app.route("/", healthRoute({
  probes: [tursoProbe({ client })],
  extend: flyExtend(),
}));
{
  "status": "ok",
  "checkedAt": "2026-09-11T12:00:00.000Z",
  "latencyMs": 41,
  "checks": [{ "name": "database", "status": "ok", "critical": true, "latencyMs": 3 }],
  "server": {
    "platform": "fly",
    "region": "ams",
    "instanceId": "148e21ebd47089",
    "service": "openstatus-api",
    "version": "registry.fly.io/openstatus-api:deployment-01H9RK9EYO9PGNBYAKGXSHV0PH",
    "primaryRegion": "cdg",
    "processGroup": "app",
    "machineVersion": "01H9RKA2WPYNA",
    "memoryMb": 256
  }
}

With more than one machine behind one hostname, a health body without an instance identity answers "is something up", not "is this replica up". region against primaryRegion is the pair worth watching: a replica serving from ams while PRIMARY_REGION is cdg is a fact you want in the response, not in a dashboard.

Fields

| Field | Environment variable | | ----- | -------------------- | | region | FLY_REGION | | instanceId | FLY_MACHINE_ID, falling back to FLY_ALLOC_ID | | service | FLY_APP_NAME | | version | FLY_IMAGE_REF — the deployment, not the git sha | | primaryRegion | PRIMARY_REGION | | processGroup | FLY_PROCESS_GROUP | | machineVersion | FLY_MACHINE_VERSION | | memoryMb | FLY_VM_MEMORY_MB, as a number |

Values are passed through exactly as Fly sets them. Fields Fly does not set are absent rather than empty, and FLY_PUBLIC_IP / FLY_PRIVATE_IP are left out on purpose — they are topology, not health.

Off Fly

flyServer() returns undefined when FLY_MACHINE_ID and FLY_APP_NAME are both missing, and flyExtend() then renders no server key at all. The same code runs unchanged on your laptop, in CI and on Fly, with no branching — and nothing pretends to be a machine that does not exist.

Deploying the same build to more than one platform? Chain them; only the packages you import are bundled:

import { flyServer } from "@openstatus/health-fly";
import { vercelServer } from "@openstatus/health-vercel";

extend: () => ({ server: flyServer() ?? vercelServer() }),

Composing

flyExtend() is sugar for the common case. flyServer() returns the object, so your own fields sit beside it:

extend: (_report, c) => ({
  server: flyServer(),
  requestId: c.get("requestId"),
}),

Both accept { env } to read from a record you supply instead of the process environment, which is how the tests avoid touching the real one.

Public endpoints

extend output follows exposeChecks: when checks are hidden, server is hidden too, so a public /health never leaks the machine id. To serve both audiences from one route, gate on the request; to serve two routes, share one check so the probes run once:

app.route("/", healthRoute({
  probes,
  exposeChecks: (c) => c.req.header("x-health-token") === env.HEALTH_TOKEN,
  extend: flyExtend(),
}));

To publish part of server but not all of it, both functions take a typed omit list and drop those keys before anything is rendered:

extend: flyExtend({ omit: ["instanceId", "version"] }),

The keys are checked against FlyServerInfo, so "machineId" is a compile error, and platform may be omitted too when you would rather not advertise the host.

About openstatus

openstatus is the open-source uptime monitoring and status page platform. This package is part of @openstatus/health, the /health endpoints behind openstatus's own services, extracted so any JavaScript server can expose one. Point an openstatus monitor at the endpoint and assert on status in the body to be alerted on degraded before it becomes unhealthy.

Source: github.com/openstatusHQ/health. Issues and PRs welcome.

License

MIT