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

@nwire/scan

v0.15.1

Published

Nwire — system registry scanner. Walks AppDefinition[] manifests and writes the .nwire/ cache (actions, events, actors, projections, queries, routes, event graph). Vite plugin + standalone function.

Readme

@nwire/scan

Walks AppDefinition[] and produces the .nwire/ cache — the framework's static-reflection layer.

Reads every action / event / actor / projection / query / workflow / module / resolver / route / orchestrator-primitive / hook / plugin / DI binding across all registered apps and emits a set of JSON files under .nwire/. Studio reads these; the CLI reads these; codegen reads these. Rebuilt from scratch on each invocation (a few ms for hundreds of definitions).

pnpm add @nwire/scan

Quick example

import { buildCache, writeCache } from "@nwire/scan";
import { allApps } from "../apps";

const cache = buildCache(allApps, { mounts: rest.listMounts() });
await writeCache(cache, ".nwire");

Most users go through the CLI: nwire cache.

Emitted files

writeCache(cache, ".nwire") produces:

| File | Contents | | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | manifest.json | The whole Cache object — single read for tools that want it all. | | apps.json / modules.json | App + module surface (name, paths, members, source). | | actions.json | Per-action: schema, retry, policy, emits, persona, journeyStep, SLO, source. | | events.json | Per-event: schema, audience, outcome, visibility, source. | | actors.json | Per-actor: schema, states, methods, timers, stuckThresholds, SLA. | | projections.json / queries.json | Read-side definitions. | | resolvers.json / routes.json | Resolver bindings + their HTTP mount tuples (passed via BuildCacheOptions.mounts). | | models.json / errors.json / middleware.json | Interface-layer primitives — defineResource / defineError / defineMiddleware values passed via BuildCacheOptions.resources / .errors / .middleware. | | workflows.json | Reaction + saga definitions. | | external-calls.json / inbound-webhooks.json / outboxes.json / inboxes.json / crons.json | Orchestrator primitives. | | commands.json | Operator-script defineCommand entries. | | hooks.json | One entry per hook() instantiated in the process at scan time (id, name, chain count, listener count, source). | | plugins.json | One entry per registered plugin OR module (kind: "plugin" | "module"). | | di.json | One row per container binding visible at scan time (name, kind, source). | | graph.json | Cross-module event-graph edges (publisher → subscriber). |

Surface

| Export | Role | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | buildCache(apps, options?) | Returns the Cache object (every entry list + graph). | | writeCache(cache, dir) | Persist the cache as JSON files in dir. | | BuildCacheOptions | { mounts?: ResolverMount[] } — pass HTTP mount tuples in. | | zodToJsonSchema(schema) | Internal helper, exported for downstream schema tooling. | | Entry types | ActionEntry, EventEntry, ActorEntry, ProjectionEntry, QueryEntry, WorkflowEntry, ResolverEntry, RouteEntry, ModuleEntry, AppEntry, HookEntry, PluginEntry, DIBindingEntry, CommandEntry, ExternalCallEntry, InboundWebhookEntry, OutboxEntry, InboxEntry, CronEntry, EventGraphEdge, SourceLocationEntry. | | Cache | Top-level shape; manifest.json is JSON.stringify(cache). |

Hook + plugin + DI introspection

  • hooks.json is snapshotted from listHooks() after the consumer's apps have loaded — runtime construction, plugin registration, and module wiring all create hooks during import, so the snapshot covers the full extension surface.
  • plugins.json distinguishes plugins from modules-compiled-as-plugins via the kind field so Studio can render each with the right affordances.
  • di.json walks app.container.list() defensively (older apps that predate list() are skipped silently).

Related

  • @nwire/forge — provides the AppDefinition shape buildCache walks.
  • @nwire/hookslistHooks() is the source for hooks.json.
  • @nwire/clinwire cache invokes this package; nwire ls / nwire studio read its output.
  • @nwire/studio — reads .nwire/manifest.json to render every page.
  • @nwire/mcp — read-only inspect tools fall back to .nwire/*.json when no live wire is mounted.

Status

v0.x — every entry type and emitted file is additive; new fields land as minor bumps. The cache contract IS the framework's static API for tooling.