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

@saplings/remote-config

v0.1.1

Published

Versioned application JSON with review, publication, and tenant-scoped reads.

Readme

@saplings/remote-config

Versioned application JSON with review, publication, and tenant-scoped reads.

Server setup

Install @saplings/remote-config in the application API. Construct the service once with a transactional store, trusted scopes, and registered document validators. The Saplings SDK's InMemoryStore supports local testing. DrizzleStore uses PostgreSQL row-level security and tenant transactions for durable operation.

import { createRemoteConfig } from '@saplings/remote-config';

const config = createRemoteConfig({
  store,
  publicTenantId: 'project-wide',
  definitions: {
    welcome: {
      audience: 'public',
      validate: (value) =>
        Object.keys(value).length === 1 && typeof value.message === 'string',
    },
    workspace: {
      audience: 'signed-in',
      validate: (value) =>
        Object.keys(value).length === 1 && typeof value.message === 'string',
    },
  },
});

Resolve projectId, tenantId, environment, actorId, and permissions on the application backend. Provide config:edit to authors, config:review to reviewers, and config:read to operators viewing history. Grant project-wide public document access separately in the HTTP adapter. The application verifies signed-in reads and chooses the public partition for anonymous reads.

Draft and publish

Call saveDraft(actor, key, value, expectedLatest) with revision 0 for a new document. Submit the returned revision and approve it to publish atomically. reject records a decision. restore copies a previously published revision into a draft, with the current revision as its conflict check. Use history for the editor and review queue. Workflow identities can receive edit permission and submit drafts for human review.

The default review policy permits self-approval in development and requires a different actor in staging and production. Set reviewPolicy to operator, distinct-reviewer, or an environment map in application configuration. Keep the operator policy and validators outside editable documents. Browser-facing config should contain client-visible settings. Store credentials in the application's secret provider.

Consume published values

Return the SDK's published value, revision, and ETag from the application HTTP adapter. For React, create a reader per session and workspace, and reset it on logout or scope changes.

import { createConfigReader } from '@saplings/remote-config/browser';

const config = createConfigReader('/api/config/workspace', { message: 'Welcome' });
const current = await config.read();
console.log(current.message);

Revalidate every 30 seconds by default. The reader uses a scoped cached value for a transient failure and the app default until the first publication. A private read needs an authenticated application session.