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

@alsania-io/browser-capture

v1.0.0

Published

Real-Chrome CDP driver, XHR/fetch capture, and OpenAPI 3.0 exporter. Extracted from extrApi.

Readme

@alsania-io/browser-capture

Real-Chrome CDP driver + XHR/fetch capture + OpenAPI 3.0 exporter for Alsania agents.

Extracted from: extrApi by Youssef Kritet.

⚠️ License note: The upstream source declares "license": "MIT" in package.json and the README, but no LICENSE file was present in the source tree. We treat this as MIT with attribution. If the Alsania project needs an ironclad license, we should reimplement from scratch using this code as reference (see the deep-dive notes), or contact the author to confirm MIT grant.

What it does

Open a real, already-installed browser, log in manually, and record all XHR/fetch API traffic as you use a web app. Export a complete OpenAPI 3.0 spec plus LLM-callable tool definitions. Extract the session token (Bearer / cookies / auth localStorage) so you can drive that API headlessly afterward.

Backends

  • CDP (default): drives an existing Chrome/Chromium/Brave/Edge binary via raw Chrome DevTools Protocol over WebSocket. No bundled Chromium. Lightweight and Alsania-Code-compatible.
  • Playwright (fallback, optional): same interface, using playwright's bundled Chromium. Install separately with make install-playwright.

Backend swap is a source-level import change (see src/index.ts).

Session interface (shared)

openSession / navigate / click / fill / pressKey / getSnapshot / startCapture / stopCapture / extractSession / closeSession

Security model

Inherited from upstream and to be extended:

  • findChrome() uses a fixed allowlist of standard install paths — no arbitrary binary is launched.
  • validateUrl() restricts open_session/navigate to http:/https: (blocks file:, javascript:, data:).
  • CDP debug port always bound to 127.0.0.1, random private-range port.
  • Chrome runs against a throwaway --user-data-dir — never your real profile.
  • Locator strings and fill values escaped via JSON.stringify before evaluation.
  • Spawned Chrome child is non-detached — dies with the MCP server.

Alsania additions (TODO)

  • src/security/domain-allowlist.ts — restrict outbound navigation to approved domains per session.
  • src/security/token-vault.ts — encrypt extracted tokens at rest if persisted (AES-GCM-256).

Usage

make install
make build
make test

License

MIT (assumed). Upstream author: Youssef Kritet. See README.original.md for the original documentation.