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

@fragno-dev/cloudflare-fragment

v0.0.1

Published

Fragno Cloudflare Workers for Platforms deployment fragment

Readme

@fragno-dev/cloudflare-fragment

Fragno fragment for queueing and tracking Cloudflare Workers for Platforms deployments against an existing dispatch namespace.

Scope

  • Queues a single ES module deployment for an app-facing ID
  • Persists app and deployment state in the fragment database
  • Reconciles remote deployments by tagging the live Worker with <deploymentTagPrefix>-app-<appId> and <deploymentTagPrefix>-dep-<deploymentId>
  • Runs the Cloudflare upload through a durable hook after the request transaction commits
  • Builds the official cloudflare SDK client and exposes it through fragment.services.cloudflare.getClient()
  • Exposes typed routes and client hooks for queueing and status reads

Server Setup

import { createCloudflareFragment } from "@fragno-dev/cloudflare-fragment";

const fragment = createCloudflareFragment(
  {
    accountId: process.env.CLOUDFLARE_ACCOUNT_ID!,
    apiToken: process.env.CLOUDFLARE_API_TOKEN!,
    dispatcher: {
      binding: env.DISPATCHER,
      namespace: "my-dispatch-namespace",
    },
    compatibilityDate: "2026-03-10",
    compatibilityFlags: ["nodejs_compat"],
    deploymentTagPrefix: "fragno",
    scriptNamePrefix: "fragno",
    scriptNameSuffix: "worker",
  },
  {
    databaseAdapter,
  },
);

Outside Cloudflare Workers, you can still pass dispatchNamespace: "my-dispatch-namespace" if you do not have a bound dispatch namespace object available.

The fragment computes a deterministic scriptName from the app-facing ID and stores it in the app table the first time that app is deployed.

If you already construct your own Cloudflare SDK client, pass it as cloudflare in fragment config instead of apiToken.

For the detailed write path, see APP_DEPLOYMENT_FLOW.md.

Routes

  • GET /apps lists known workers and their latest deployment
  • POST /apps/:appId/deployments queues a deployment request
  • GET /apps/:appId returns the app summary plus the latest deployment
  • GET /apps/:appId/deployments returns the deployment history for one app
  • GET /deployments/:deploymentId returns a single deployment status record

Queued deployments stay queued until durable hooks are processed.

Durable Hooks

This fragment will not upload to Cloudflare unless the host runtime runs a durable hooks processor. Use the Fragno DB dispatchers in Node or Cloudflare and include this fragment in the processor.

The hook payload carries the immutable deployment snapshot so the hook can reconcile remote state before a single local finalize transaction. If the deployment tag is already live in Cloudflare, the hook marks the deployment succeeded locally without re-uploading. The configured prefix is capped per tag so <prefix>-app-... and <prefix>-dep-... stay within Cloudflare's 63 character limit.

Client Builders

createCloudflareFragmentClients() exposes:

  • useApps
  • useApp
  • useAppDeployments
  • useDeployment
  • useQueueDeployment

Framework entrypoints are available at @fragno-dev/cloudflare-fragment/react, ./vue, ./svelte, ./solid, and ./vanilla.

Development

pnpm exec turbo types:check --filter=./packages/cloudflare-fragment --output-logs=errors-only
pnpm exec turbo test --filter=./packages/cloudflare-fragment --output-logs=errors-only
pnpm exec turbo build --filter=./packages/cloudflare-fragment --output-logs=errors-only