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

@spacefast/wordpress

v0.0.23

Published

Read-only WordPress REST client for Spacefast data sources.

Downloads

682

Readme

@spacefast/wordpress

Private-beta, read-only access to WordPress content from a Spacefast site or any JavaScript app with fetch.

Set up a Spacefast site

  1. In the Dashboard, open your space, go to Settings → Data sources, add a named public WordPress site, choose the default source, and save. The site must expose standard pretty-permalink REST URLs under /wp-json; Dashboard sources do not support ?rest_route=... URLs.
  2. Connect the repository that builds the site to the same space.
  3. Install the SDK in that repository:
npm install @spacefast/wordpress
  1. Read content in build-time or SSR Node code. Omit url for the default source, or pass source to select another configured name:
import { createWordPressClient } from "@spacefast/wordpress";

const wp = createWordPressClient();
const { data: posts, pagination } = await wp.posts.list({
  perPage: 10,
  orderBy: "date",
});
const about = await wp.pages.bySlug("about");

const docs = createWordPressClient({ source: "docs" });
  1. Commit the dependency and code, then start a new Spacefast repository build. Each build receives the Dashboard source configuration and fetches the current WordPress content.
  2. Back in Settings → Data sources, choose Connect WordPress. Download the plugin, install it in WordPress, and paste the one-time connection into Settings → Spacefast. Test the connection. Public content changes now coalesce into safe, automatic production builds; Build now remains available in both WordPress and the Spacefast Dashboard.

URL and environment rules

Zero-config discovery reads Node environment variables, so it only works during a build or in an SSR Node runtime. Browser code must pass an explicit url. Explicit URLs may be a WordPress site URL, a /wp-json or /wp-json/wp/v2 REST root, or a supported non-pretty form such as https://blog.example.com/index.php?rest_route=/.

An explicit SDK url always wins. With source, the client resolves only that named entry from SPACEFAST_DATA_SOURCES (or legacy SPACEFAST_DATASOURCES) and ignores WORDPRESS_URL. Without source, a non-blank WORDPRESS_URL wins; otherwise the payload's default entry is used. Spacefast preserves user-defined build variables instead of replacing them with Dashboard-generated values.

Private beta boundaries

  • Read-only: the client only makes GET requests. It does not create, edit, or delete WordPress content.
  • Public content only: there is no authentication, preview, draft, or private content support.
  • Build snapshots: WordPress changes become visible only after a repository build succeeds. The optional Spacefast WordPress plugin starts that build automatically; without it, use Build now.
  • Controlled credential: the private-beta plugin gets a one-time API key restricted to this Space and only the builds:trigger permission. The trigger derives the production repository, saved commands, and live target server-side; the plugin cannot upload arbitrary output or override a build. Revoke the key from Developer settings if the WordPress installation is retired or compromised.
  • Private beta: the API may change before the stable release.