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

@catdoes/watch-web

v1.3.0

Published

Error tracking and monitoring SDK for web apps (Vite, Next.js, etc.) - by CatDoes Inc.

Readme

@catdoes/watch-web

Error tracking and monitoring SDK for web applications.

CatDoes Watch provides real-time error tracking, crash reporting, and debugging tools for your web applications built with Vite, Next.js, or any other web framework.

Features

  • Automatic Error Capture - Catches unhandled errors and promise rejections
  • React Error Boundary - Integrated error boundary component
  • Breadcrumbs - Track user actions leading up to errors
  • Offline Support - Queues events in localStorage, sends when reconnected
  • Lightweight - Zero runtime dependencies

Installation

npm install @catdoes/watch-web

Quick Start

1. Initialize the SDK

In your app's entry point (e.g., main.tsx for Vite, or app/layout.tsx for Next.js):

import { Watch, setupGlobalHandlers } from "@catdoes/watch-web";

const client = Watch.init({
  apiKey: import.meta.env.VITE_CATDOES_WATCH_KEY || "",
  debug: import.meta.env.DEV,
});

if (client) {
  setupGlobalHandlers(client);
}

2. Wrap Your App with Error Boundary

import { WatchErrorBoundary } from "@catdoes/watch-web/react";

function App() {
  return <WatchErrorBoundary>{/* Your app content */}</WatchErrorBoundary>;
}

3. Capture Errors Manually (Optional)

import { Watch } from "@catdoes/watch-web";

try {
  await riskyOperation();
} catch (error) {
  Watch.captureError(error as Error, {
    context: "riskyOperation",
    userId: currentUser.id,
  });
}

API Reference

Watch.init(config)

Initializes the Watch client.

interface WatchConfig {
  apiKey: string;
  endpoint?: string;
  environment?: "development" | "production";
  captureConsoleErrors?: boolean;
  maxBreadcrumbs?: number;
  debug?: boolean;
  beforeSend?: (event) => event | null;
}

Watch.captureError(error, extra?)

Manually capture an error.

Watch.captureError(new Error("Something went wrong"), {
  userId: "123",
  action: "checkout",
});

Watch.captureMessage(message, level?)

Capture a message as an error.

Watch.captureMessage("User attempted invalid action", "warning");

Watch.addBreadcrumb(breadcrumb)

Add a breadcrumb for context.

Watch.addBreadcrumb({
  type: "navigation",
  message: "User navigated to Settings",
  data: { screen: "Settings" },
});

Watch.setContext(key, value)

Set context that will be attached to all future events.

Watch.setContext("appVersion", "1.2.3");

Watch.setUser(user)

Set user information for error correlation.

Watch.setUser({
  id: "user123",
  email: "[email protected]",
});

Watch.flush()

Force flush all queued events to the server.

await Watch.flush();

Breadcrumb Types

  • navigation - Route or page changes
  • ui - User interactions (clicks, form submissions)
  • http - Network requests
  • console - Console logs
  • custom - Custom events

Environment Variables

# Vite
VITE_CATDOES_WATCH_KEY=your_api_key_here

# Next.js
NEXT_PUBLIC_CATDOES_WATCH_KEY=your_api_key_here

Support

License

Proprietary - All rights reserved by CatDoes.