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

@buildtovalue/adapters-bpmn

v1.2.0-next.1

Published

ArtifactAdapter implementations for the BuildToValue Studio library (Handoff 6 S-2): BPMN flow, persona, prompt, connector and policy adapters over the version registry, a DMN decision adapter, headless SVG thumbnails, plus the in-memory "recipe" fixture

Readme

@buildtovalue/adapters-bpmn

The concrete ArtifactAdapter implementations that connect the BPMN ecosystem to the generic library (Handoff 6, S-2). This package is the side of the boundary that KNOWS BPMN — @buildtovalue/library never does.

Workspace-only until the npm-scope decision (pendencias.md §1). The final published name will be <scope>/adapters-bpmn.

Adapters

All registry-backed adapters are thin configurations of one factory, createRegistryAdapter({ id, typeLabel, registry, match, target?, boundRuns? }):

| Factory | id | typeLabel | Claims | |---|---|---|---| | bpmnDiagramAdapter | bpmn-diagram | FLUXO | diagrams not claimed by a specific kind | | personaAdapter | btv-persona | PERSONA | persona-definition diagrams | | promptAdapter | btv-prompt | PROMPT | prompt-definition diagrams | | connectorAdapter | btv-connector | CONNECTOR | connector-definition diagrams | | policyAdapter | btv-policy | POLÍTICA | approval-gate diagrams (see note) | | dmnDecisionAdapter | dmn-decision | DECISÃO | dmn:decision nodes inside registered diagrams |

Classification (classifyDiagram): an explicit diagram.metadata.artifactType (pt/en aliases) wins; otherwise a diagram whose active nodes are all one mapped btv: type IS that artifact; everything else is a flow.

Nota — "política": there is no dedicated policy node type in the domain today; the policy adapter maps to the BuildToValue Approval Gate (btv:gate). Open product decision in pendencias.md (Handoff 6).

DMN: decisions enter as "mais um adapter, nunca caso especial". The adapter is duck-typed on the DMN vocabulary (dmn:decision + properties.decisionTable) so this package stays headless (the dmn package bundles React components); once the npm scope lands it can move into the dmn package — the end state the handoff describes — with zero changes to library/library-react.

What the adapters translate

  • ArtifactRef.artifactId = the logical diagram.id (shared across versions); the registry stores one entry per version and the adapter groups them (logicalArtifacts).
  • The observer's channel (target) picks the relevant version via the open publication window; without a target the newest version wins.
  • approversversion.approvedBy; provenance.ledgerHash ← snapshot hash; versions timeline newest-first; boundRuns comes from the host (the registry stores no runs).
  • Thumbnails are headless SVG strings (diagramThumbnail, decisionThumbnail) drawn from the diagram geometry with --btv-* token colors — the library only places them (§3.1).
  • Actions are descriptors ("Abrir no Designer", "Diff vs versão ativa") the Studio resolves (§3.2) — nothing here mutates anything.
  • subscribe + notifyChanged(): the registry has no observer, so the host calls adapter.notifyChanged() after register/publish.

The acid-test fixture

createRecipeAdapter() — a fake adapter for cooking recipes, with no relation to BPMN, importing only @buildtovalue/library. It exists to prove the architecture (Handoff 6 §10.1): the whole Biblioteca must work with it alone, without touching library/library-react. tests/acidez.test.ts runs the catalog only with this adapter; S-3 extends the same fixture to the UI.