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

openworkflow-pocketbase

v0.1.1

Published

OpenWorkflow Backend backed by a velabase /api/ow/v1 HTTP API, driven by a superuser-authed PocketBase JS SDK client.

Readme

openworkflow-pocketbase

An OpenWorkflow backend implementation for PocketBase.

Install

npm install openworkflow-pocketbase openworkflow

openworkflow is a peer dependency (ESM-only, Node ≥ 20). The PocketBase JS SDK is a regular dependency, so an app that only has pocketbase-sveltekit installed needs nothing else.

Usage

import { OpenWorkflow } from "openworkflow";
import { BackendPocketBase } from "openworkflow-pocketbase";

const backend = new BackendPocketBase({
  url: "http://localhost:8090",
  email: process.env.PB_SUPERUSER_EMAIL!,
  password: process.env.PB_SUPERUSER_PASSWORD!,
  namespaceId: "default", // optional; defaults to "default"
});

const ow = new OpenWorkflow({ backend });
// defineWorkflow / run / newWorker exactly as with BackendSqlite / BackendPostgres —
// the Worker + replay engine are unchanged.

Advanced — pass a pre-authed client you own (e.g. one shared across namespaces):

import PocketBase from "pocketbase";

const pb = new PocketBase("http://localhost:8090");
await pb.collection("_superusers").authWithPassword(email, password);

const backend = new BackendPocketBase({ client: pb, namespaceId: "team-a" });

The binding sets autoCancellation(false) (workers poll repeatedly), authenticates lazily, and re-authenticates once on a 401.

Compatibility

  • Targets PocketBase's OpenWorkflow plugin schema v5.

Development & tests

npm install
npm run build        # tsc -> dist/ (ESM + .d.ts)
npm run test:unit    # unit tests only (no server needed)

Conformance runs OpenWorkflow's shared backend suite against a live PocketBase instnace. Start a server and point the tests at it:

# from a PocketBase checkout (with the openworkflow plugin):
go build -o /tmp/pocketbase ./examples/base
/tmp/pocketbase superuser upsert [email protected] openworkflow-test-pw --dir /tmp/pb_data
/tmp/pocketbase serve --dir /tmp/pb_data --http 127.0.0.1:8090 &

PB_URL=http://127.0.0.1:8090 \
[email protected] \
PB_SUPERUSER_PASSWORD=openworkflow-test-pw \
  npm test

CI does the same against a published release binary (.github/workflows/conformance.yml).

Vendored conformance suite

test/backend.testsuite.vendored.ts is a copy of OpenWorkflow's packages/openworkflow/testing/backend.testsuite.ts. Re-sync it on each openworkflow release. Only three edits vs upstream:

  1. imports rewritten to the public openworkflow/internal surface;
  2. DEFAULT_WORKFLOW_RETRY_POLICY inlined (it is not publicly exported);
  3. one clock-mocked test (…older than the idempotency period) is .skipped — its vi.spyOn(Date,"now") cannot affect the remote server's clock.