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

@overkube/gateway

v0.1.6

Published

overkube's way to a Kubernetes cluster: the API server's paths passed on, several watches over one stream, changes as JSON, a status — one handler over Node's request and response, for any host

Readme

@overkube/gateway

The page's way to a Kubernetes cluster, as one handler over Node's request and response — for any host to serve: overkube's own server, a framework's route, a platform's plugin. It passes the API server's paths on (never what reaches past it: exec, attach, portforward, a node's proxy), carries several watches over one stream, applies changes as JSON, says its status, and reaches a workload's port as data.

import { createGateway, fromKubeconfig, inCluster } from '@overkube/gateway';

const gateway = createGateway({ upstream: fromKubeconfig(process.env.KUBECONFIG), prefix: '/kube', readOnly: false });
http.createServer((req, res) => gateway.handle(req, res) || notFound(res));

Under its prefix (src/protocol.ts, the whole of it):

/api/**, /apis/**, /version, /openapi/v3/**    the API server's, passed on (never PATCH)
GET  /stream                                    one line per event (NDJSON), HELLO first: watches, logs
POST /stream/<stream>                           subscriptions added and removed → 204
POST /patch                                     a patch (merge, JSON, strategic, or server-side apply) → the API server's answer
GET  /status                                    the version, whether the cluster is reached and its version
GET  /me                                        whom the cluster takes the page for
*    /proxy/services|pods/<ns>/<[scheme:]name:port>/<path>   a workload's port, as data (GET, HEAD)

Anything but a read carries the x-overkube header (any value), and no request from another site's page is taken (Sec-Fetch-Site: cross-site, a foreign Origin): 403 cross_site. A host that signs people in gives each request an Identity (actingAs: a token of their own sent in the server's place, or a user and groups impersonated — Impersonate-User, Impersonate-Group); one it has not signed in is answered 401 unauthorized. The gateway's own failures answer { error: { code, message } } (ErrorCode); the API server's Status comes back as sent.

The upstream: fromKubeconfig(path) (a token, a token file, or a client certificate; exec plugins, auth-provider, basic auth and proxy-url refused with the reason), inCluster() (the pod's ServiceAccount), readKubeconfig; kubeState for a /readyz. Also exported: classify (what an API path is), FIELD_MANAGER, whoAmI, watchTotals.

@overkube/gateway/protocol — the types the page and the gateway speak, nothing of Node: both the connector (in the browser) and the gateway import them from here.

Built with npm run build -w @overkube/gateway (dist/); in the workspace read from src/.