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

@stnd/cloudflare

v0.5.0

Published

--- title: "@stnd/cloudflare" aliases: [] created: 2026-07-04 23:26 modified: 2026-07-05 19:22 last_audited: 2026-07-14 audit_interval_days: 90 next_audit: 2026-10-12 audit_priority: 3 maturity: sprout mode: read publish: false status: active tags: - pa

Readme


title: "@stnd/cloudflare" aliases: [] created: 2026-07-04 23:26 modified: 2026-07-05 19:22 last_audited: 2026-07-14 audit_interval_days: 90 next_audit: 2026-10-12 audit_priority: 3 maturity: sprout mode: read publish: false status: active tags:

  • package
  • stnd theme: kernel type: package visibility: private

@stnd/cloudflare

Edge-first deployment utilities and integrations for Cloudflare.

ELI5

Two unrelated jobs live here because they’re both “Cloudflare-specific plumbing no app should have to rewrite”:

  1. Image helpers — build a resized/optimized image URL without hand-rolling Cloudflare’s URL query params.
  2. ssrDepsPlugin — a dev-only fix so astro dev doesn’t randomly 504 on Cloudflare’s local runtime (Workers dev server gets confused if it discovers dependencies one at a time; this pre-declares them all up front).

Install: already included when you use @stnd/core.

Use it (images):

Usage

import { buildCloudflareImageUrl } from "@stnd/cloudflare";
const url = buildCloudflareImageUrl("/my-image.jpg", { width: 800 });

Use it (the dev-server fix, in astro.config.mjs): see the ssrDepsPlugin section below — you only need this if astro dev is misbehaving on Cloudflare.

Overview

@stnd/cloudflare provides the infrastructure for deploying and running Standard applications on the Cloudflare edge. It includes an Astro integration for orchestrating Cloudflare-specific features like image optimization, KV bindings, and Pages Functions.

Features

  • Image Optimization: Automatic integration with Cloudflare Images for high-performance delivery.
  • Pages Functions Orchestration: Simplifies the management of serverless functions on Cloudflare Pages.
  • KV Store Integration: Easy access to Cloudflare KV for session management and caching.
  • D1 & R2 Ready: Foundational support for Cloudflare’s SQL database and object storage.

Astro Integration

Add it to your astro.config.mjs:

import { defineConfig } from "astro/config";
import cloudflare from "@astrojs/cloudflare";
import standard from "@stnd/core";
import stndCloudflare from "@stnd/cloudflare";

export default defineConfig({
  adapter: cloudflare(),
  integrations: [
    standard(),
    stndCloudflare({
      images: { enabled: true, quality: 85, format: "auto" },
      functions: { enabled: false },
    }),
  ],
});

Manual Usage

The image helpers are named exports:

import { buildCloudflareImageUrl, generateImageSrcset } from "@stnd/cloudflare";

const optimizedUrl = buildCloudflareImageUrl("/my-image.jpg", { width: 800 });
const srcset = generateImageSrcset("/my-image.jpg", { widths: [400, 800, 1200] });

Also exported: shouldUseCloudflareImage, generateBlurPlaceholder, and the CloudflareImage / CloudflarePicture / ResponsiveImage component helpers.

SSR dependency pre-bundling (ssrDepsPlugin)

Dev-only Vite plugin that pre-declares SSR dependencies for the Cloudflare Workers module runner, preventing the first-request re-optimization crashes (504 / “file does not exist”). It owns the framework deps every Standard-on-Cloudflare app needs; the app passes its own deps in — keeping app-specific knowledge in the app (no assumption bleed).

// astro.config.mjs
import { ssrDepsPlugin } from "@stnd/cloudflare";

export default defineConfig({
  vite: {
    plugins: [
      ssrDepsPlugin({
        ssrInclude: ["better-auth", "stripe"], // your server-side deps
        clientInclude: ["codemirror", "p5"], // your client-side deps
      }),
    ],
  },
});

Status

Formerly flagged for possible removal — kept: it now owns image optimization and ssrDepsPlugin, which are real, used jobs. The image/functions/comments config surface is still worth an audit for what’s actually wired.

Notes / Observations

(jot down anything noticed here — quirks, gotchas, ideas)

Todo

  • [ ] Audit which of the image/functions/comments config options in [priority:: 3] [token_scale:: 3] [created:: 2026-07-14] [area:: framework] integration.js are actually wired vs. vestigial.