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

@solenai/monitor

v0.1.0

Published

Lightweight incident reporter for Solen MetaShift webhooks (Sentry-compatible payload)

Readme

@solen/monitor

Report runtime errors to Solen MetaShift incident webhooks. Payloads use a Sentry-compatible shape so MetaShift normalizes them automatically. No runtime dependencies—Node 18+ built-in fetch only.

Install

npm install @solen/monitor

Quick setup

import { monitor } from '@solen/monitor';

const { captureError } = monitor({
  webhookUrl: process.env.SOLEN_WEBHOOK_URL!,
  secret: process.env.SOLEN_WEBHOOK_SECRET!,
  environment: 'production',
});

Calling monitor() registers uncaughtException and unhandledRejection handlers and returns manual capture helpers.

Express middleware

import express from 'express';
import { monitor } from '@solen/monitor';
import { solenErrorHandler } from '@solen/monitor/express';

const { captureError } = monitor({
  webhookUrl: process.env.SOLEN_WEBHOOK_URL!,
  secret: process.env.SOLEN_WEBHOOK_SECRET!,
});

const app = express();
app.use(solenErrorHandler({ captureError }));

solenErrorHandler captures the error with route, method, and status, then calls next(err) so your existing error handlers still run.

Manual capture

import { monitor } from '@solen/monitor';

const { captureError, captureMessage } = monitor({
  webhookUrl: process.env.SOLEN_WEBHOOK_URL!,
  secret: process.env.SOLEN_WEBHOOK_SECRET!,
});

try {
  await chargeCustomer(orderId);
} catch (err) {
  await captureError(err, {
    extra: { orderId },
    tags: { service: 'billing' },
  });
  throw err;
}

await captureMessage('Stripe webhook replay detected', { level: 'warning' });

Webhook URL and secret

Create an incident webhook endpoint in the Solen dashboard:

https://solenai.ca/integrations/webhooks

Each endpoint provides:

  • Webhook URL — MetaShift ingest URL (/api/webhooks/incident/{endpointId})
  • Secret — sent as the X-Solen-Secret header on every request

Store both in environment variables (for example SOLEN_WEBHOOK_URL and SOLEN_WEBHOOK_SECRET) and pass them to monitor().

Fastify

import Fastify from 'fastify';
import { monitor } from '@solen/monitor';
import { solenFastifyPlugin } from '@solen/monitor/fastify';

const { captureError } = monitor({ webhookUrl, secret });
const app = Fastify();
await app.register(solenFastifyPlugin, { captureError });

Requirements

  • Node.js 18+
  • Optional peers: express (for @solen/monitor/express), fastify (for @solen/monitor/fastify)