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

@skriva/payload-plugin

v0.1.0

Published

Payload CMS 3 plugin for publishing from Skriva — manifest/schema/publish endpoints, markdown→Lexical conversion, idempotent upsert.

Readme

@skriva/payload-plugin

npm version CI License: MIT

Payload CMS 3 plugin that lets Skriva publish generated articles into any collection of any Payload site. Skriva discovers your collection's schema at runtime — no hardcoded field mapping, and Skriva never needs to know your content model up front.

Requirements

  • Payload ^3.0.0 with @payloadcms/richtext-lexical (peer dependencies — already present in any Payload 3 project)
  • Node.js 18+

Install

pnpm add @skriva/payload-plugin
# or: npm install @skriva/payload-plugin
// payload.config.ts
import { contentIngest } from '@skriva/payload-plugin'

export default buildConfig({
  // ...
  plugins: [
    contentIngest({
      targetCollection: 'posts',       // where to publish (required)
      mediaCollections: ['media'],     // relation/upload fields to these are skipped (text-only v1)
      // authCollection: 'users',      // default; useAPIKey is enabled on it
      // blockAllowlist: ['hero', 'content', 'cta'], // for block-based collections
      // relationDefaults: { author: '<docId>' },    // fills relations the AI can't pick
    }),
  ],
})

Connect to Skriva

  1. In the Payload admin, open a document in your authCollection (default users) and enable its API key.
  2. In Skriva, open your site's Connection page, choose destination "Payload", and paste the site's base URL and the API key.
  3. Hit "Test connection" — Skriva reads /manifest and confirms the publish target.

Note: rotating PAYLOAD_SECRET invalidates all Payload API keys — regenerate the key and update it in Skriva afterwards.

How it works

All configuration that is shaped like your CMS (target collection, media collections, block allowlist, relationship defaults) lives here, in your payload.config. Skriva only stores a base URL and an API key, sends markdown plus scalar values, and the plugin owns the conversion to Lexical.

The plugin registers three endpoints under /api/content-ingest:

| Endpoint | Purpose | | --- | --- | | GET /manifest | Health check + the configured publish target (drives "Test connection"). | | GET /schema | The target collection's field tree as JSON. Relationship/upload fields pointing at mediaCollections are flagged isMedia; other relations are enriched with candidate options (cap 100); the block palette is restricted to blockAllowlist. | | POST /publish | Idempotent upsert into the target collection. richText slots arrive as markdown and are converted to Lexical with each field's own editor config (convertMarkdownToLexical); relationship defaults are filled server-side. Drafts supported via _status / draft: true. |

Develop

pnpm install   # devDeps only; peers are not auto-installed
pnpm test      # vitest — covers the pure schema walker
pnpm build     # tsc → dist

The pure serializeFields walker is unit-tested here; the endpoint handlers and markdown→Lexical conversion are integration-tested against a real Payload instance.

License

MIT