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

@iterativeflow/durable-objects

v2.1.1

Published

Readme

@iterativeflow/durable-objects

Run iterativeflow inside a Cloudflare Durable Object, on the DO's built-in SQLite storage. It's the @iterativeflow/sqlite backend driven through a thin adapter over ctx.storage.sql — so a single DO becomes a self-contained, strongly-consistent durable-execution engine at the edge, no external database.

import { createDurableObjectBackend, applySchema } from "@iterativeflow/durable-objects";
import { createEngine } from "@iterativeflow/core";

export class WorkflowDO {
  #engine;
  constructor(ctx: DurableObjectState) {
    ctx.blockConcurrencyWhile(() => applySchema(ctx.storage.sql));
    this.#engine = createEngine(createDurableObjectBackend(ctx.storage.sql), [
      /* your flows */
    ]);
  }
  // drive the engine from an alarm() handler or fetch()
}

Notes

  • No dependencies beyond @iterativeflow/core + @iterativeflow/sqlite — the SqlStorage type is structural, so you don't need @cloudflare/workers-types at build.
  • Consistency model. ctx.storage.sql is synchronous and a DO serves one request at a time, so a Store method runs to completion without another interleaving — single-writer-safe by construction. A DO commits an invocation's writes on return and rolls them back on an uncaught throw. DO SQLite forbids a manual BEGIN/COMMIT, so the transactional-outbox's all-or-nothing guarantee under a caught, mid-write storage error is weaker here than in the SQL backends' explicit transactions. In practice storage writes to a local DO don't fail mid-outbox, so the happy path is atomic — and the real DO's invocation rollback is stronger than the equivalence used to test this. It passes the same nine conformance suites as every other backend (verified against Node's synchronous node:sqlite, which matches ctx.storage.sql's shape); a transactionSync path to also cover a caught mid-outbox fault is a possible refinement.
  • Wakeup is in-process (the DO itself); wire completion latency to an alarm() cadence.
  • One DO = one engine instance. Shard workflows across DOs by id for horizontal scale.