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

@relayer-cms/sdk

v0.1.1

Published

Relayer Delivery SDK — typed client for published content, draft preview, populate, filter, and search

Readme

@relayer-cms/sdk

Typed Delivery SDK for Relayer — published content, draft preview, populate, filter, and search.

npm i @relayer-cms/sdk

Quickstart

import { createRelayerClient } from "@relayer-cms/sdk";

const client = createRelayerClient({
  baseUrl: process.env.RELAYER_URL!,
  bearerToken: process.env.RELAYER_DELIVERY_TOKEN,
  previewSecret: process.env.PREVIEW_SECRET,
});

const page = await client.listDocuments("article", {
  locale: "en-US",
  search: "hello",
  populate: ["cover", "author"],
  depth: 1,
});

const post = await client.getByRoute("article", "my-slug", {
  locale: "en-US",
  status: "draft", // requires previewSecret; get/by-route only
  populate: ["author"],
});

Form submissions (server / BFF only)

// app/api/contact/route.ts — runs on your server, never in the browser
const client = createRelayerClient({
  baseUrl: process.env.RELAYER_URL!,
  bearerToken: process.env.RELAYER_SUBMIT_TOKEN!, // cms_del_… with the `create` scope
});

const { documentId } = await client.submitDocument("contact_form", {
  locale: "en-US", // optional
  data: { name, email, message }, // non-private fields only
});

submitDocument posts to POST /v1/delivery/content-types/:uid/submissions. The entry is saved as a draft (never published) and cannot be read back through Delivery. The content type must have form submissions enabled.

Upload a file, then submit (BFF)

const uploaded = await client.uploadAsset(fileBlob, "resume.pdf");
await client.submitDocument("job_application", {
  locale: "en-US",
  data: { name, resume: uploaded.id },
});

uploadAsset posts multipart to POST /v1/delivery/assets (Public asset, create-scoped token). Put the returned id on media fields. Lean Delivery still returns UUIDs; use populate for { id, url, … } (Private/deleted → url: null on published).

Server / BFF only. Do not put a token with the create scope in browser code. Add your own rate limiting and bot protection (e.g. captcha) in the BFF route before calling Relayer.

Next.js helpers

import { createRelayerClientForNext } from "@relayer-cms/sdk/next";

const client = createRelayerClientForNext({
  baseUrl: process.env.RELAYER_URL!,
  draft: true,
  tags: ["route:article:my-slug"],
  previewSecret: process.env.PREVIEW_SECRET,
});

Notes

  • Wire API stays under /v1/delivery/* (token prefixes cms_del_ unchanged).
  • List is published-only — draft applies to getDocument / getByRoute only.
  • Fields marked private in the schema are never returned by Delivery.
  • Use RELAYER_URL / RELAYER_DELIVERY_TOKEN.

See docs/CONNECT_SITE.md for preview, webhooks, and populate recipes.

Publish

Package versions are explicit SemVer. The cd-npm.yml release workflow publishes verified artifacts under @relayer-cms through trusted publishing.

See docs/NPM_PUBLISHING.md (trusted publishing/OIDC).