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

@chaos-overlords/worker

v0.9.1

Published

Cloudflare Workers runtime facade: the shared Hono app over D1, with one Durable Object per match for SSE fan-out and turn-deadline alarms.

Readme

@chaos-overlords/worker

Cloudflare Worker for the Chaos Overlords: New Chrome multiplayer server.

The Cloudflare Workers facade: the shared Hono app over D1, with one MatchHub Durable Object per match for SSE fan-out and turn-deadline alarms, and a cron sweeper.

This package ships TypeScript sources rather than a bundle, because wrangler bundles the entry itself. A deployment re-exports both the handler and the Durable Object class:

export { MatchHub } from '@chaos-overlords/worker'
export { default } from '@chaos-overlords/worker'

It needs two D1 bindings (DB, BUG_DB), an R2 bucket (BUG_BLOBS) and the MATCH_HUB Durable Object namespace, whose migration lineage starts at tag v1 with new_sqlite_classes = ["MatchHub"]. The D1 migration lineages ship in @chaos-overlords/storage and @chaos-overlords/bug-reports; point wrangler d1 migrations apply at them rather than copying them.

PUBLIC_LISTING, RATE_LIMIT_PER_MINUTE, MEMBER_RATE_LIMIT_PER_MINUTE, UPLOAD_RATE_LIMIT_PER_MINUTE, BUG_REPORT_RATE_LIMIT_PER_MINUTE, RETENTION_DAYS, ABANDONED_RETENTION_DAYS, BUG_REPORT_RETENTION_DAYS and BUG_REPORT_DAILY_STATE_MB are vars. The scheduled handler expects a cron trigger; five minutes is the interval its sweeper is written for.

A deployment without a cron trigger has no safety net. The sweeper is what seals a turn whose Durable Object alarm never fired, finishes a seal whose isolate died halfway through, re-runs the verdict of a match left paused by an interrupted one, and collects retention. Nothing else does any of it, and nothing fails loudly when it is missing: matches simply stop advancing for the players in them. wrangler.dev.toml deliberately carries no [triggers] block, because it is not a deployment — so the first thing to add to a real one is:

[triggers]
crons = ["*/5 * * * *"]

The Worker logs cron trigger has not fired on a request once it has been up for an hour without one, which is how a deployment that forgot finds out from its own logs rather than from a player.

Install

npm install @chaos-overlords/worker

Requires Node.js 22 or newer.

Documentation

The operator and contributor manual for the whole multiplayer workspace is in multiplayer/README.md; the design notes are in docs/MULTIPLAYER.md.

Licence

GPL-3.0-only. See LICENSE and NOTICE.