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

@plugdash/autobuild

v0.3.0

Published

Fires a Cloudflare Pages, Netlify, or Vercel build hook when content is published or unpublished, for static sites that read EmDash at build time

Readme

@plugdash/autobuild

Use autobuild only when a static or prerendered site reads EmDash content at build time. A server-rendered EmDash site (output: "server", the default in all templates) shows new content at once and does not need a rebuild.

When one of those static sites needs a rebuild, autobuild calls a Cloudflare Pages, Netlify, or Vercel deploy hook after you publish or unpublish. Only on EmDash - the hook fires from the CMS lifecycle, not from a git push.

Install

pnpm add @plugdash/autobuild

Register

// astro.config.mjs
import { defineConfig } from "astro/config";
import emdash from "emdash/astro";
import { autobuildPlugin } from "@plugdash/autobuild";

export default defineConfig({
	integrations: [
		emdash({
			plugins: [
				autobuildPlugin({
					hookUrl: process.env.DEPLOY_HOOK_URL,
					collections: ["posts"],
					debounceMs: 5000,
				}),
			],
		}),
	],
});

Keep the hook URL in an environment variable. Never commit it. Options are passed to the plugin by EmDash at runtime, so they work in astro dev and in a production build.

Or set the URL in the admin: Plugins - Autobuild - settings, field "Deploy hook URL" (a secret). The admin value wins over the hookUrl option. Secret settings need EMDASH_ENCRYPTION_KEY in the server environment (pnpm exec emdash secrets generate; a Worker secret on Cloudflare). The admin page shows whether the URL is accepted.

Getting a deploy hook URL

  • Cloudflare Pages: Project -> Settings -> Builds & deployments -> Deploy hooks. Creates a URL like https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/...
  • Netlify: Site settings -> Build & deploy -> Build hooks. Creates a URL like https://api.netlify.com/build_hooks/...
  • Vercel: Project Settings -> Git -> Deploy Hooks. Creates a URL like https://api.vercel.com/v1/integrations/deploy/...

Options

| Option | Type | Default | Description | | -------------- | ------------------------- | --------------- | ----------------------------------------------------------- | | hookUrl | string | none | Deploy webhook URL. https only, no localhost or private IPs | | method | "POST" \| "GET" | "POST" | HTTP method | | collections | string[] | all collections | Only these collections trigger a deploy | | debounceMs | number | 5000 | Triggers inside this window make one deploy | | timeout | number | 5000 | Request timeout in ms | | body | Record<string, unknown> | none | Optional JSON body | | headers | Record<string, string> | none | Optional extra headers | | allowedHosts | string[] | see below | Extra hosts the plugin may call, added to the defaults |

allowedHosts always includes api.cloudflare.com, api.netlify.com, api.vercel.com and the host of the hookUrl option. A hook URL entered in the admin on any other host is refused until you add that host here.

How it works

  1. content:afterPublish and content:afterUnpublish schedule a deploy. Autosaves do not: editing a draft or a live post changes nothing a reader can see.
  2. Deleting an entry schedules a deploy only if it was published. content:beforeDelete notes that in KV, because afterDelete only carries the id.
  3. Each trigger writes a token to plugin KV and waits debounceMs. Only the trigger whose token is still the latest calls the hook, so a burst makes one request, even across Workers isolates.
  4. The request goes out through ctx.http.fetch(). A failure is logged and never fails the publish.
  5. With no hook URL, the plugin logs one warning per process: no hook URL configured, deploys are off.

Security

The hook URL is checked before every request: https:// only, no localhost, 127.x, 10.x, 172.16-31.x, 192.168.x, 169.254.x, ::1, 0.0.0.0, and the host must be in allowedHosts. A bad URL fails closed with a logged error.

What it does not do

  • Does not retry failed deploys. The next publish retries.
  • Does not check that the deploy succeeded - use your host's dashboard.
  • Does not sign requests. Deploy hooks are already secret URLs.
  • Does not ship a UI component. This plugin is pure infrastructure.