@flowlinejs/storage-memory
v0.3.0
Published
In-memory StorageAdapter for the Flowline engine, for tests and quick starts.
Maintainers
Readme
@flowlinejs/storage-memory
An in-memory StorageAdapter for the @flowlinejs/engine: everything lives in a plain
object in the current process. Values are deep-cloned with structuredClone on the way in and out,
so callers can never mutate stored state. Use it for tests, examples and single-process
prototypes — data does not persist across restarts and is not shared across processes; use
@flowlinejs/storage-postgres when you need either.
Install
pnpm add @flowlinejs/storage-memory @flowlinejs/engine @flowlinejs/core zod@^4zod 4 is a required peer dependency.
Usage
import { createEngine } from "@flowlinejs/engine";
import { createMemoryStorage } from "@flowlinejs/storage-memory";
import { createRegistry } from "@flowlinejs/core";
export const engine = createEngine({
registry: createRegistry([]),
storage: createMemoryStorage(),
authorize: async () => ({ tenantId: "acme", userId: "u1" }),
});See the root README for the full quick start and docs/ for the design spec.
