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

@resourcexjs/node-provider

v2.7.0

Published

ResourceX Node.js/Bun Provider - FileSystem stores implementation

Readme

@resourcexjs/node-provider

Node.js/Bun platform provider for ResourceX.

Installation

bun add @resourcexjs/node-provider
# or
npm install @resourcexjs/node-provider

Usage

With ResourceX Client

import { createResourceX, setProvider } from "resourcexjs";
import { NodeProvider } from "@resourcexjs/node-provider";

// Register the provider before creating client
setProvider(new NodeProvider());

const rx = createResourceX({
  path: "~/.resourcex", // optional, defaults to ~/.resourcex
  registry: "https://registry.example.com",
});

// Now use ResourceX
await rx.add("./my-prompt");
const result = await rx.use("my-prompt:1.0.0");

With ResourceX Server

import { createRegistryServer } from "@resourcexjs/server";
import { FileSystemRXAStore, FileSystemRXMStore } from "@resourcexjs/node-provider";

const server = createRegistryServer({
  rxaStore: new FileSystemRXAStore("./data/blobs"),
  rxmStore: new FileSystemRXMStore("./data/manifests"),
});

// Deploy with any runtime
Bun.serve({ fetch: server.fetch, port: 3000 });

Exports

NodeProvider

Full provider implementation for Node.js/Bun platform.

import { NodeProvider } from "@resourcexjs/node-provider";

const provider = new NodeProvider();
provider.platform; // "node"
provider.createStores({ path: "~/.resourcex" }); // { rxaStore, rxmStore }
provider.createLoader({}); // FolderLoader

FileSystemRXAStore

Content-addressable blob storage using filesystem.

import { FileSystemRXAStore } from "@resourcexjs/node-provider";

const store = new FileSystemRXAStore("./data/blobs");

// Store blob, returns digest
const digest = await store.put(buffer);

// Get blob by digest
const data = await store.get(digest);

// Check existence
const exists = await store.has(digest);

// Delete blob
await store.delete(digest);

// List all digests
const digests = await store.list();

Storage structure:

./data/blobs/
├── ab/
│   └── sha256:abcd1234...
├── cd/
│   └── sha256:cdef5678...
└── ...

FileSystemRXMStore

Manifest storage using JSON files.

import { FileSystemRXMStore } from "@resourcexjs/node-provider";

const store = new FileSystemRXMStore("./data/manifests");

// Store manifest
await store.put(storedRxm);

// Get manifest
const manifest = await store.get("my-prompt", "1.0.0");

// Get cached manifest (with registry)
const cached = await store.get("my-prompt", "1.0.0", "registry.example.com");

// Check existence
const exists = await store.has("my-prompt", "1.0.0");

// List all tags for a resource
const tags = await store.listTags("my-prompt");

// Search manifests
const results = await store.search({ query: "prompt", limit: 10 });

// Delete by registry (clear cache)
await store.deleteByRegistry("registry.example.com");

Storage structure:

./data/manifests/
├── _local/              # Local resources (no registry)
│   └── my-prompt/
│       └── 1.0.0.json
└── registry.example.com/ # Cached resources (with registry)
    └── shared-prompt/
        └── 1.0.0.json

Architecture

┌─────────────────────────────────────────────────────────┐
│                      Applications                        │
├─────────────────────┬───────────────────────────────────┤
│   resourcexjs       │   @resourcexjs/server             │
│   (Client SDK)      │   (Registry Server)               │
├─────────────────────┴───────────────────────────────────┤
│              @resourcexjs/node-provider                  │
│   ┌─────────────────┬─────────────────┬──────────────┐  │
│   │  NodeProvider   │FileSystemRXAStore│FileSystemRXMStore│
│   └─────────────────┴─────────────────┴──────────────┘  │
├─────────────────────────────────────────────────────────┤
│                   @resourcexjs/core                      │
│        (CASRegistry, RXAStore/RXMStore interfaces)       │
└─────────────────────────────────────────────────────────┘

License

Apache-2.0