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

@me1a/tool-async-api-builder

v0.2.6

Published

Generic AsyncAPI 3.x contract verification and SDK builder (TypeScript + Rust, NATS + WebSocket)

Readme

@me1a/tool-async-api-builder

Generic AsyncAPI 3.x contract verification and SDK builder (TypeScript + Rust, NATS Core + native WebSocket).

Sources stay in your monorepo contract package. Layout and CLI match @me1a/tool-open-api-builder — see docs/specs/sdk-pipeline.md (Layout & CLI).

Commands

async-api-builder verify --root path/to/packages/async-api
async-api-builder build --root path/to/packages/async-api
async-api-builder build --root path/to/packages/async-api --only demo-mq.v1
async-api-builder build --root path/to/packages/async-api --skip-clean
async-api-builder check --root path/to/packages/async-api
async-api-builder check --root path/to/packages/async-api --git-dirty --skip-cargo
async-api-builder init --root path/to/packages/async-api

Optional async-api.config.ts at package root (defineConfig). --config <path> overrides location.

verify, build, and check print the resolved layout paths before running.

Environment:

  • ASYNC_API_BUF_LOCAL_PLUGINS=1 — local protoc-gen-es / protoc-gen-prost instead of BSR remotes.

Default layout

Relative to --root:

| Path | Role | |------|------| | async-api/sources/*.schema.ts | Human-written contracts | | async-api/sources/<id>.proto.lock.json | Stable proto field numbers (commit in PRs) | | specs/ | Exported JSON/YAML, index.ts | | dist/specs/ | Mirror for published npm package | | proto/ | Generated .proto | | src/sdk/<id>/generated/ | Generated TypeScript SDK | | src/sdk/<id>/extensions/ | Optional overrides (init) | | rust/sdk/ | Generated Rust crates |

build --only regenerates one contract but barrel, specs/index.ts, and rust/Cargo.toml still reflect all contracts on disk.

Toolchain

  • Node ≥ 26.13.0 (type-stripped import of *.schema.ts)
  • TypeScript 5.8+ for check (tsc --noEmit via local typescript in the consumer package)
  • Rust edition 2021 for generated crates
  • Peer: @bufbuild/protobuf (required for generated TS), nats (optional, for NATS clients)

Contract semantics

  • Set info["x-transport"] to "nats" or "ws". Filename heuristics (-mq., websocket, …) still work but log a deprecation warning; remove them before 0.3.0.
  • operations[].action: send = client publishes (producer / WS outbound); receive = client subscribes (consumer / WS inbound).
  • WebSocket event keys in generated clients use normalized branch names (chat.progress → chat_progress) to match protobuf envelope fields.

Offline buf

ASYNC_API_BUF_LOCAL_PLUGINS=1 uses pinned @bufbuild/protoc-gen-es from consumer node_modules and protoc-gen-prost on PATH (cargo install protoc-gen-prost --version 0.5.0).

Optional CI smoke: ASYNC_API_BUF_SMOKE=1 yarn test runs a real buf generate on the minimal fixture.

Library API

import {
  buildAsyncApi,
  checkAsyncApi,
  loadProjectConfig,
  verifyContracts,
} from "@me1a/tool-async-api-builder";

const layout = await loadProjectConfig("/path/to/packages/async-api");
await verifyContracts(layout);
await buildAsyncApi(layout, { skipClean: false });
await checkAsyncApi(layout);

Develop

yarn install
yarn build
yarn test