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

@czap/cloudflare

v0.3.1

Published

Cloudflare Workers siteAdapter — KV boundary cache and Astro middleware glue

Readme

@czap/cloudflare

Astro middleware glue that serves LiteShip's per-tier compiled boundary CSS from Cloudflare Workers KV.

Install this directly when you deploy an Astro 6 site on Cloudflare Workers. If you're starting a new project, start with @czap/astro and add this package when you pick Cloudflare as the host.

Install

pnpm add @czap/cloudflare @czap/astro @astrojs/cloudflare astro@^6 wrangler@^4

Also install the Effect 4 beta peer with pnpm add effect@beta — a bare pnpm add effect installs 3.x and fails the peer check.

30 seconds

// src/middleware.ts
import { cloudflareMiddleware } from '@czap/cloudflare';
import { boundaries } from 'virtual:czap/boundaries';

export const onRequest = cloudflareMiddleware({
  binding: 'CZAP_BOUNDARY_CACHE',   // KV namespace name in wrangler.jsonc
  manifest: boundaries,
  boundary: 'viewport',             // optional when the manifest has one entry
});

Each request now resolves the visitor's device tier and serves that tier's precompiled boundary CSS through Astro.locals.czaplocals.czap.edge.cacheStatus reads precompiled or hit once KV is wired. virtual:czap/boundaries is the manifest the @czap/vite plugin derives at build time: each entry carries the boundary's minted content address (a hash of its definition) plus per-tier outputs, so nothing is hand-typed. For editor types, add /// <reference types="@czap/vite/virtual" /> to src/env.d.ts.

Where it sits

A host adapter — it touches Cloudflare APIs (the cloudflare:workers env and KV namespaces) so nothing else has to. It depends on @czap/astro for the middleware contract, @czap/edge for tier detection and the content-addressed cache, and @czap/core for the id types. Boundary authoring and compilation live upstream; this package is four files of glue. See the package surfaces map for the full layout.

If it does nothing

A mistyped binding fails silently: KV reads return null, writes no-op, and every request falls back to the manifest or compile path with cacheStatus: 'miss'. Check that binding matches the KV namespace name in wrangler.jsonc, then run czap doctor --target cloudflare (from @czap/cli) for a preflight of Astro, adapter, and wrangler config.

Docs


Part of LiteShip — powered by the CZAP engine (Content-Zoned Adaptive Projection), distributed as @czap/* packages.