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

@cloudflarebase/storage

v0.4.0

Published

Object storage on Cloudflare R2 - buckets of files with per-bucket access modes, an object index with keyset paging, one Durable Object orchestrator per project - the storage primitive behind Cloudflarebase.

Readme

@cloudflarebase/storage

Object storage on Cloudflare R2 - buckets of files with per-bucket access modes, served through your worker with a sorted, pageable index. The storage primitive behind Cloudflarebase.

One StorageAgent Durable Object per project holds the bucket registry and access config; one StorageBucket per bucket holds the object index (keyset paging, counts, owner scoping - everything R2's list() cannot do). Bytes never enter a Durable Object: the worker streams uploads straight to R2 and serves downloads with Range, conditional requests, and edge caching.

Install

npx @cloudflarebase/cli add storage

The CLI installs this package, merges template/wrangler-fragment.jsonc into your wrangler.jsonc, prepends the entrypoint re-export, and reruns wrangler types. R2 is an account-level opt-in on Cloudflare; the fragment's header documents the one manual step (enable R2, add the BUCKET binding) - until then the agent deploys fine and object requests answer 503 with the setup steps.

What it serves

  • Buckets with public / auth / owner read and write modes, verified against your project's JWTs; new buckets default to auth on both - never anonymous by accident. owner mode scopes every object to the user that wrote it.
  • Listing is a separate grant (publicListing): serving a known key to anyone is not the same as letting anyone enumerate every key.
  • Single-shot uploads to 100 MB, per-bucket size and content-type rules, and a serve-time inline allowlist - HTML and SVG always download as attachments, so user uploads can never become stored XSS on your origin.
  • One shared R2 bucket, key-prefixed per project. Never enable r2.dev or attach a custom domain to that bucket - the worker path is what enforces the prefix. To serve objects on a dedicated hostname, route the domain at THIS worker and set STORAGE_SERVE_DOMAIN.

What your Worker serves

The /buckets/* object paths - they are the product API and carry their own per-bucket gate. The operator plane (/overview, /admin/*, the state-sync socket) authenticates nobody and answers 404 on your public Worker; drive it from your own code through the Durable Object namespace bindings, or put your own authentication in front and set "EXPOSE_OPERATOR_API": "true" - only on a Worker with no public hostname of its own.

License

Apache-2.0. See NOTICE.