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

@saacms/host-astro

v0.1.9

Published

The Astro [host adapter](../../CONTEXT.md#architectural-primitives) for saacms. Knows how to:

Downloads

1,500

Readme

@saacms/host-astro

The Astro host adapter for saacms. Knows how to:

  1. Generate .astro route files into src/pages/<page-url>.astro for Pages and Page templates (per ADR 0003).
  2. Emit the small mount file at src/pages/api/saacms/[...slug].ts that binds saacms's runtime handler into Astro's API surface (per ADR 0001).
  3. Generate per-Block preview routes the Puck canvas fetches at edit time (per ADR 0004 Mode 2).

This is the only host adapter shipped in v1 alpha (per ADR 0024). Other hosts (host-nextjs, host-sveltekit, host-nuxt) follow in v1.x.

Reading order (relevant ADRs)

Status

Scaffold. Interface shape and template files are defined; the route emitter is a stub. Real .astro source emission lands alongside the v1.0 alpha milestone.

Why Astro, why now

Per ADR 0024 — Astro's "lightest framework that works" philosophy aligns with the saacms performance philosophy (ADR 0022 P1). Astro Server Islands give us PPR-equivalent partial rendering without framework-specific magic. Cloudflare Pages + D1 + R2 + Astro is the cleanest single stack to prove the architecture against before fanning out to Next.js / SvelteKit / Nuxt in v1.x.

Templates

Three text templates live under templates/. They are intentionally not TypeScript — they are emitted verbatim by the saacms compile step into the user's project, where their imports refer to user-side files (../../../../saacms.config.ts, ../../../saacms/blocks/*.astro).

  • templates/api-mount.ts.txt — the file saacms init writes to src/pages/api/saacms/[...slug].ts.
  • templates/preview-route.astro.txt — the per-Block preview route template (ADR 0004 Mode 2).
  • templates/page-route.astro.txt — the per-Page route template, emitted by the route emitter.

Known reconciliation TODO

The local HostAdapter interface in src/types.ts diverges slightly from the canonical interface exported by @saacms/core (src/host/index.ts). This is a v1-scaffold artefact — subagents wrote both in parallel without final cross-check. To do before first real implementation pass:

  • Adopt core's GenerateRouteContext / GeneratedRoute / MountTemplate shape verbatim
  • Drop _core-shim.ts (use @saacms/core brand types directly)
  • Rename assetRoot()assetRoot (readonly property, per core)
  • Rename previewRouteTemplate(slug) → fold into generatePreviewRoute(ctx) per core's contract