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

@panerelay/site-kit

v0.11.1

Published

Authoring and build toolkit for Panerelay fetch site adapters.

Readme

@panerelay/site-kit

Public authoring and build toolkit for Panerelay fetch site adapters. A site is ordinary TypeScript with one command per file; it does not need a package.json, tsconfig.json, handwritten manifest, or build script.

panerelay.site.ts
commands/me.ts
commands/me.test.ts        # optional
shared.ts                  # optional relative module

Create and validate a site:

npx --yes @panerelay/site-kit init ./my-site --id example
npx --yes @panerelay/site-kit check ./my-site
npx --yes @panerelay/site-kit test ./my-site
npx --yes @panerelay/site-kit build ./my-site --out ./example-adapter

build writes exactly panerelay-fetch-adapter.json and a self-contained adapter.mjs. check performs the same build in temporary storage and removes it. test is the only command that executes author test code; checking and building discover metadata statically and never run the site modules or repository scripts.

Source API

panerelay.site.ts exports literal site metadata:

import { defineSite } from '@panerelay/site-kit';

export default defineSite({
  id: 'example',
  name: 'Example',
  version: '0.1.0',
  description: 'Example commands using the current browser session.',
});

Each direct commands/*.ts file exports one matching command. Literal help metadata stays beside its handler:

import { defineCommand } from '@panerelay/site-kit';

export default defineCommand({
  name: 'me',
  description: 'Show the current profile.',
  access: 'read',
  args: [],
  output: ['name'],
  examples: ['panerelay example me'],
  async run(context) {
    const response = await context.fetch({
      url: 'https://example.com/api/me',
      responseType: 'json',
      withCookies: true,
    });
    return response.body;
  },
});

Commands may declare one file argument. Panerelay reads only that explicit regular file (up to 12 MiB), removes its local path, and exposes it as context.artifact(argumentName). createMultipartBody turns one artifact and bounded text fields into a Base64 browser-fetch body and matching content type. decodeBase64Bytes, decodeBase64Text, responseBytes, responseText, seedSameOriginPage, and fetchValidatedJson cover bounded binary/charset and seed-then-JSON workflows. Throw SiteError to return a stable structured failure code.

Site adapters may use the selected browser's Cookie-backed login state, including protected Cookie-to-CSRF bindings. A manifest may also declare a protected exact-origin localStorage source, fixed JSON Pointer fallback, fixed destination, and allowed request origins. Only the Extension reads and injects that value from an already-open matching tab; the adapter never receives it. Arbitrary storage reads and sessionStorage remain unsupported. Adapters cannot request user-supplied API keys, personal access tokens, client secrets, or other manually configured credentials.

Production source may import relative TypeScript modules, node: built-ins, and @panerelay/site-kit. Other package imports, source-root escapes, symbolic links, and computed metadata are rejected. Browser site permission and Panerelay domain policy remain separate runtime concerns.