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

@nzelajs/persistence-memory

v0.1.0

Published

Nzela in-memory adapter: tenant-scoped unit of work, repositories, simulation runners and HMAC outbox signer.

Readme

@nzelajs/persistence-memory

English below · Version francaise plus bas.

The in-memory adapter of the Nzela engine: a tenant-scoped UnitOfWork with every repository port, plus the simulation runners (recording effects, registry guards) and an HMAC outbox signer. This is how you run the engine with zero infrastructure: tests, dry-runs, what-if simulation.

English

Install

npm add @nzelajs/persistence-memory

What it provides

  • InMemoryBackend (UnitOfWork): one isolated data space PER TENANT (fail-closed: an instance of tenant A does not exist inside withTenant("B")). Implements WorkflowInstanceRepo (optimistic locking: a stale fromVersion throws ConcurrencyConflictError), an append-only EventLog, TimerStore, ExternalWaitStore, DependencyStore, OutboxRepository, and a BlueprintInstallStore whose publish validates the graph (parseBlueprint) BEFORE writing, auto-increments the version, archives the previous ACTIVE and freezes the snapshot (immutable). Inspection helpers: listOutbox, listTimers.
  • SimpleBlueprintProvider: resolves an instance's blueprint by its pinned installId, else by the ACTIVE version of its request type (fail-closed when neither resolves).
  • SimpleGuardRunner: named predicate registry; unregistered guards and cel: refs FAIL CLOSED (the CEL expression adapter is a separate package).
  • RecordingEffectRunner: records every executed ref (public executed array) and invokes optional callbacks registered per base name ("notify:manager" calls notify with "manager").
  • HmacOutboxSigner: HMAC-SHA256 signing with constant-time verification.
  • Approval companions (present by default in the registry): MemoryApprovalTaskStore (claim/reassign/group listing), MemoryDeskRuleStore (decreasing-specificity findForQueue), MemoryTenantSettingsStore (settable returnRouting overrides), MemoryOrgStore (units, primary attachments, deprovisioning) and MemoryDirectoryStore (display names). Seed them via deskRuleStore(tenantId), tenantSettingsStore(tenantId), orgStore(tenantId), directoryStore(tenantId).

Not for production: no durability, no real transactions (no rollback), no encryption of sensitive fields. It is the reference simulation backend.

Francais

Installation

npm add @nzelajs/persistence-memory

Ce que ca fournit

  • InMemoryBackend (UnitOfWork) : un espace de donnees isole PAR TENANT (fail-closed : une instance du tenant A n'existe pas dans withTenant("B")). Implemente WorkflowInstanceRepo (verrou optimiste : un fromVersion perime leve ConcurrencyConflictError), un EventLog append-only, TimerStore, ExternalWaitStore, DependencyStore, OutboxRepository, et un BlueprintInstallStore dont publish valide le graphe (parseBlueprint) AVANT d'ecrire, auto-incremente la version, archive l'ACTIVE precedente et gele l'instantane (immuable). Inspection : listOutbox, listTimers.
  • SimpleBlueprintProvider : resout le blueprint d'une instance par son installId epingle, sinon par la version ACTIVE de son type de demande (fail-closed si rien ne resout).
  • SimpleGuardRunner : registre de predicats nommes ; gardes non enregistrees et refs cel: echouent FERMEES (l'adapter d'expressions CEL est un paquet a part).
  • RecordingEffectRunner : enregistre chaque ref executee (tableau public executed) et invoque les callbacks optionnels enregistres par nom de base.
  • HmacOutboxSigner : signature HMAC-SHA256, verification en temps constant.
  • Compagnons d'approbation (presents par defaut dans le registre) : MemoryApprovalTaskStore (claim/reassign/listes par groupe), MemoryDeskRuleStore (findForQueue par specificite decroissante), MemoryTenantSettingsStore (overrides returnRouting settables), MemoryOrgStore (unites, rattachements primaires, deprovisionnement) et MemoryDirectoryStore (noms affiches). Amorcage via deskRuleStore(tenantId), tenantSettingsStore(tenantId), orgStore(tenantId), directoryStore(tenantId).

Pas pour la production : pas de durabilite, pas de vraies transactions (pas de rollback), pas de chiffrement des champs sensibles. C'est le backend de simulation de reference.

License

Apache-2.0