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 🙏

© 2025 – Pkg Stats / Ryan Hefner

roundtable-cloudflare-bot-gate

v0.1.7

Published

Roundtable bot-gate for Cloudflare Pages

Readme

Roundtable × Cloudflare Pages — Bot‑Gate Drop‑In (Beta)

Adds Roundtable's auto‑block gate to any existing Cloudflare Pages project. The block‑list lives in Cloudflare KV, so a hot lookup adds only ~1 ms of latency.

Setup should take 15 minutes max.


1. Embed the Roundtable tracker

<script
  src="https://cdn.roundtable.ai/v1/rt.js"
  data-site-key="YOUR_SITE_KEY"
  data-auto-block="true"   <!-- **required** so the gate can call /rt-block -->
  data-user-id="OPTIONAL_USER_ID">
</script>

Get YOUR_SITE_KEY at https://accounts.roundtable.ai/account/keys. The full tracker docs are available at https://docs.roundtable.ai.

2. Install & initialize

# Add dev dependency
npm i -D roundtable-cloudflare-bot-gate

# Scaffold functions and generate token
npx roundtable-cloudflare-bot-gate init

init does two things:

  1. Adds functions/_middleware.js and functions/rt-block.js.
  2. Generates a 64‑char RT_WEBHOOK_TOKEN and prints it.

3. Store the secret in Cloudflare

echo <RT_WEBHOOK_TOKEN> | wrangler secret put RT_WEBHOOK_TOKEN

Use the token printed by init.

4. Create KV namespaces & add binding

Create the namespaces and copy the generated IDs:

wrangler kv namespace create RT_BLOCKED            # copy the production ID
wrangler kv namespace create RT_BLOCKED --preview  # copy the preview ID

Then add the binding to your Wrangler config:

For wrangler.jsonc:

{
  "kv_namespaces": [
    {
      "binding": "RT_BLOCKED",
      "id": "abcd1234...",        // paste production ID here
      "preview_id": "wxyz5678..."  // paste preview ID here
    }
  ]
}

For wrangler.toml:

[[kv_namespaces]]
binding = "RT_BLOCKED"
id = "abcd1234..."        # paste production ID here
preview_id = "wxyz5678..."  # paste preview ID here

5. Email your token + webhook URL (beta step)

Send the token printed in step 2 and your webhook endpoint to [email protected] so we can enable blocking for your site.

Endpoint:  https://<your‑domain>/rt-block
Token:     <RT_WEBHOOK_TOKEN>

6. Deploy

wrangler pages deploy

Roundtable will now write sid:<id> into RT_BLOCKED when it detects fraud; the middleware returns 403 on the very next request.


Need help?

Email [email protected] or open an issue.