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

@mikrojs/registry

v0.22.0

Published

Reference OTA update registry for Mikro.js: a portable fetch handler with pluggable storage and auth

Readme

@mikrojs/registry

Reference OTA update registry for Mikro.js: a portable fetch handler implementing the OTA Registry Spec. Publish builds with mikro ota push, enroll devices with mikro ota enroll, and serve update offers and per-device config to the mikro/ota check-in flow, on Node, Bun, Deno, Cloudflare Workers, or behind any framework that speaks fetch.

Scope. This is built for a private network or a small hobby fleet: a few devices, one operator, a box you control. It is not built for scale or for serving strangers, and it leaves out much of what that would need — rate limiting that survives a reverse proxy, per-caller quotas, storage sturdier than flat files, backups, secret rotation, and any notion of tenants or orgs. Past that, build your own against the same spec; the storage, verifyAdmin, and verifyDevice seams are there for it.

Whatever the scale, the admin token is publish and enrol for the whole fleet, and holding it means running code on every device. Generate one rather than choosing one, and put the registry behind TLS if it is reachable from anywhere you do not control.

import {createRegistry, memoryStorage} from '@mikrojs/registry'

const registry = createRegistry({storage: memoryStorage(), token: 'choose-a-secret'})
// registry.fetch(request) => Promise<Response>

On Node, @mikrojs/registry/node adds file-backed storage and a plain node:http server:

import {createRegistry} from '@mikrojs/registry'
import {fileStorage, serve} from '@mikrojs/registry/node'

serve(createRegistry({storage: fileStorage('./data'), token: 'choose-a-secret'}), {port: 4873})

Both storage (a small interface over build blobs, build and channel records, device records, config schemas, and issued tokens) and auth (verifyAdmin, verifyDevice) are pluggable, so the same handler runs against whatever backend you already operate. See examples/ota in the repo (its registry/server.ts) for a runnable walkthrough with a real device.

Build downloads are authenticated: the endpoint takes a device update key, and it serves a build only to a device enrolled under that build's app. A checksum is not a credential, so one recovered from a device's flash reads nothing on its own, and rotating a device's update key cuts off the old key here as well.

Browser login

With token auth, the registry also serves the spec's optional browser-login flow: a client POSTs /api/v1/auth/sessions (optionally with {app} context), sends the user to the returned loginUrl to type the returned userCode there, and polls for the result. The code is what ties the browser back to the client that asked, so a login someone else started is not the one you approve. The approve page authenticates with the registry password (the token option), typed once in the browser, and issues a tok_... scoped to publishing that app plus enrolling devices. Workstations then hold scoped tokens; the password itself never leaves the operator. Registries using verifyAdmin answer 404 there (the spec's "not supported" signal) and wire their own login.