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

@substrat-run/vertical-host

v0.79.0

Published

The platform's /internal/* surface + error envelope, authored once — mount it in a vertical worker instead of re-copying the control-plane contract

Readme

@substrat-run/vertical-host

The platform's /internal/* surface — provision, reconcile, introspection, the read-only SQL console, platform-request drain, snapshot / delete / export / restore / bookmarks / rewind, and per-instance configure — authored once and mounted into a vertical's Hono worker, plus the error envelope that turns a thrown route into a readable { error }.

Before this package every sandbox-clean vertical hand-copied those ~14 routes and a Hono onError into its own worker.ts. The copies drifted — route sets disagreed and two workers shipped without the error handler, so a failing /internal/restore surfaced as the Workers runtime's bare Internal Server Error with no diagnosis (issue #510).

Full documentation: https://substrat.net/reference/vertical-host

Usage

import { Hono } from 'hono';
import { mountPlatformSurface } from '@substrat-run/vertical-host';
import { CloudflareScopeHost } from '@substrat-run/adapter-cloudflare';
import { ROLES } from './provision.js';

const app = new Hono<{ Bindings: Env }>();

// the vertical's own user-facing surface:
app.get('/me', /* … */);
app.post('/op/:name', /* … */);

// the entire platform contract + guaranteed error envelope, in one call:
mountPlatformSurface(app, {
  platformSecret: (env) => env.PLATFORM_SECRET,
  hostFor: (env) => new CloudflareScopeHost({ scope: env.SCOPE }),
  roles: ROLES,
  ownerRoleKey: 'hr-admin',
  onProvision:  (env, b) => identityDo(env, b).setPendingOwner(b.scopeId, b.owner),
  resolveOwner: (env, r) => identityDo(env, r).getOwnerOfRecord(r.scopeId),
  onConfigure:  (env, b) => identityDo(env, b).putConfig(b.scopeId, b.entries),
});

export default app;

What it owns vs. what you supply

  • Generic routes (export, restore, bookmarks, rewind, snapshot, delete-scope, tables, tables/:table, query, platform-requests, platform-requests/settle) — pure delegations to the scope host, owned entirely here.
  • Flavored routesprovision (onProvision), reconcile (resolveOwner), configure (onConfigure). The platform keeps the secret gate, body parse, and response envelope; you supply only the hook. Omit resolveOwner / onConfigure and that route answers 501.
  • The gate — one /internal/* middleware runs assertPlatformCall; an unset secret fails closed (403).
  • The error envelope — registered last, so mounting the surface installs it.

The scope host is taken structurally (VerticalScopeHost), so this package depends on neither adapter-cloudflare nor any concrete host.

Self-enforcing

A vertical that never calls mountPlatformSurface has no /internal/provision and fails to provision on first deploy and in its scenario test — louder than any lint.