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

beescrape

v1.1.0

Published

Scrapes /metrics and /peers from a range of localhost ports and POSTs the results to the ingress service.

Readme

beescrape

Collects metrics from local Ethereum Swarm Bee nodes.

Walks BEE_COUNT localhost ports starting at BEE_START_PORT, and for each port fetches GET /metrics and GET /peers, forwarding each body to the ingress service as a named file.

Setup

pnpm install
pnpm build

Configuration

All four variables are required; the run aborts at startup if any is missing or malformed.

| Variable | Purpose | | ------------------- | ------------------------------------------------------------- | | BEE_START_PORT | Port the first node listens on, e.g. 1633 | | BEE_COUNT | How many consecutive ports to scrape, e.g. 128 | | NAMESPACE | Cluster name embedded in every forwarded filename | | ETHERSAAS_API_KEY | Sent as X-API-Key on every request to the ingress service |

NAMESPACE becomes part of a filename, so it is restricted to letters, digits, dots, dashes and underscores.

Run

BEE_START_PORT=1633 BEE_COUNT=128 NAMESPACE=alpha ETHERSAAS_API_KEY=… pnpm start

Behaviour

  • Each port serves a Bee node's debug API; /metrics is Prometheus text and /peers is the connected-peer list.
  • For each of the BEE_COUNT ports from BEE_START_PORT upwards, it fetches /metrics then /peers.
  • Each fetched body is POSTed verbatim to https://ethersaas.com/?filename=<name>-<namespace>-<port>.txt (e.g. metrics-alpha-1633.txt, peers-alpha-1633.txt).
  • Every request — scrapes and forwards alike — runs serially, with a 15 second timeout each.
  • A dead or failing port never sinks the run: every fetch failure is logged and the scan moves on. Forward failures cause a non-zero exit so cron mails them.

Cron

cron runs with a minimal environment, so use absolute paths and set the variables in the crontab itself. Every five minutes:

BEE_START_PORT=1633
BEE_COUNT=128
NAMESPACE=alpha
ETHERSAAS_API_KEY=…
*/5 * * * * /path/to/node /path/to/beescrape/dist/index.js

Use the absolute path from which node — under a version manager such as nvm it will look like /Users/you/.nvm/versions/node/v24.13.0/bin/node.

Layout

| File | Purpose | | --------------- | ------------------------------------------------------- | | src/config.ts | Environment loading, timeout, endpoints, ingress URLs | | src/scrape.ts | Per-endpoint fetch from a single port | | src/report.ts | Forwarding a fetched body to the ingress service | | src/index.ts | Entry point: the serial scrape/forward loop, exit codes | | src/types.ts | Config, endpoint and fetch-result types |