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

@argusdev/sdk-astro

v0.3.0

Published

Argus SDK for Astro — one integration wires browser capture on every page and SSR error capture in middleware.

Readme

@argusdev/sdk-astro

Astro SDK for Argus — one integration wires both runtimes: browser capture (errors + web vitals) on every page, and SSR error capture in middleware.

Install

npm install @argusdev/sdk-astro

Usage

// astro.config.mjs
import { defineConfig } from "astro/config";
import argus from "@argusdev/sdk-astro";

export default defineConfig({
  integrations: [
    argus({ dsn: "https://<publicKey>@<host>/<projectId>", environment: "production" }),
  ],
});

That one line does three things at astro:config:setup:

  1. Injects a page script — the browser SDK's init() on every page: window.onerror, unhandled rejections, web vitals (vitals: false opts out).
  2. Adds server middleware (order: "pre") — wraps the request pipeline, captures SSR errors (frontmatter, endpoints, server islands), and rethrows untouched so Astro still renders its error page and dev overlay.
  3. Compiles your DSN into the middleware via vite define — no config files, no env-var contract.

Options

| Option | Default | What | | ------------- | ---------- | --------------------------------------------- | | dsn | required | https://KEY@host/PROJECT_ID | | environment | — | e.g. "production" | | release | — | version string, for regression tracking | | vitals | true | page.load transaction with LCP/CLS/FCP/TTFB |

What server events carry

| Tag / field | Example | | -------------- | --------------- | | routePattern | /blog/[slug] | | request.url | /blog/hello | | request.method | GET |

routePattern (Astro 5+) is the dynamic pattern, stable across requests — the tag worth filtering by. Only user-agent is forwarded from headers; cookies and authorization never are.

Manual capture

import { captureException } from "@argusdev/sdk-astro/client";

try {
  await checkout();
} catch (err) {
  captureException(err);
}

Notes

  • No astro dependency — the integration and middleware are typed structurally and satisfy Astro's own AstroIntegration / MiddlewareHandler types (verified against Astro 5).
  • The middleware entry uses no Node built-ins and never imports sdk-browser, so it runs on edge adapters as-is.
  • The injected page script imports from @argusdev/sdk-astro/client (the package you installed) rather than a transitive dep — it resolves under pnpm's strict node_modules layout too.

MIT © Treasure Odetokun