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

@bugreels/web-script

v0.0.9

Published

BugReels browser session recording SDK

Readme

@bugreels/web-script

The BugReels v1 browser SDK records a session and sends versioned events to the BugReels ingest API.

import { createBugReels } from "@bugreels/web-script";

const bugreels = createBugReels({ apiKey: "br_live_..." });

await bugreels.start();
bugreels.identify("customer-123");
bugreels.setTags([{ tag: "checkout" }]);
bugreels.setRelease("2026.07.17");

try {
  await submitOrder();
} catch (error) {
  bugreels.captureException(error, { flow: "checkout", attempt: 2 });
}

await bugreels.stop({ endSession: true });

captureException(error, context?) reports an error the application already handled. The event carries handled: true (automatic error capture reports handled: false), the same sanitized name/message/stack fields as automatic capture, and an optional flat context map bounded to 20 entries with string (redacted, at most 500 characters), finite number, or boolean values. Calls made before start() resolves or after the session ended are ignored with a console.debug notice, and calls on excluded pages are dropped.

createBugReels also publishes the most recently created client as window.bugreels. Browser tooling such as the BugReels QA extension uses this supported bridge to read the session ID and identify authenticated QA sessions.

By default, the SDK sends token and event requests through the production ingest proxy at https://bugreels.com/be/be-ingest. Pass an explicit endpoint when using a self-hosted or local ingest service. Custom endpoints must use HTTPS; HTTP is accepted only for loopback hosts such as localhost, 127.0.0.1, or [::1] during local development.

Configuration and public method inputs are validated at runtime. Form inputs are masked, secret-bearing keys are redacted, and HTTP request and response bodies are never captured by default. Page unload flushes pending events but does not end the session.

Individual capture features can be toggled through features; all default to true:

  • navigation emits a navigation.page event with a fresh page view ID for the initial page load and every history push/replace, back/forward (pop), and hash navigation. URLs (and the initial referrer) are sanitized and redacted; at most 200 navigation events are recorded per session.
  • interactions records document clicks as bounded structural selectors (tag names plus sanitized id/class tokens only — never text content or other attribute values) with a had_effect flag that reports whether the click caused a DOM mutation, a navigation, or a completed network request within ~800ms. Entries are batched into interaction.click events and capped at 300 per session.
  • webVitals aggregates LCP, INP (approximated as the worst observed interaction duration), and CLS per page view and emits one performance.vitals event when the page view ends. It requires the navigation feature for page view identity and no-ops in browsers without PerformanceObserver support.
const bugreels = createBugReels({
  apiKey: "br_live_...",
  features: { webVitals: false },
});

WebSocket capture is metadata-only by default: it records connection lifecycle, direction, sanitized URLs, close codes, and payload byte sizes without recording text frame contents or close reasons. Payload previews and close reasons require an explicit privacy opt-in and are redacted and limited to 2,000 characters:

const bugreels = createBugReels({
  apiKey: "br_live_...",
  privacy: { captureWebSocketPayloadPreviews: true },
});

Only enable previews for protocols whose frame contents are safe to record. Positional or otherwise unlabelled secrets may not be identifiable by key-based redaction.