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

@nodii/contract-manifest

v0.2.0

Published

A service's list of the routes, RPCs, topics and workers it actually registers: built at runtime, hashed the same in TypeScript, Go and Python, and published to Dev.

Readme

@nodii/contract-manifest

A service's list of the routes, RPCs, topics and workers it actually registers (LIB-CON-5, S07-50). The service builds it at boot from the same objects that serve traffic, serves it at GET /.well-known/nodii-contracts and publishes it to Dev. Ships in TypeScript, Go (nodii.co/nodii-libs/go/contract-manifest) and Python (nodii-contract-manifest). All three produce identical bytes and an identical hash, proved by synthetic-consumers/contract-manifest.

Use

import {
  buildManifest,
  manifestResponse,
  publishManifest,
  routesFromHono,
  rpcsFromServiceDefinition,
  topicsFromReplicas,
  WELL_KNOWN_PATH,
  workersFromSpecs,
} from "@nodii/contract-manifest";

const manifest = buildManifest({
  service: "nodii-crm",
  serviceVersion: version,
  routes: routesFromHono(app),
  rpcs: rpcsFromServiceDefinition(LeadService.service, REQUIRED_SCOPES_BY_METHOD),
  topicsProduced: PRODUCED_TOPICS,
  topicsConsumed: topicsFromReplicas(replicas),
  workers: workersFromSpecs(workerSpecs),
});

app.get(WELL_KNOWN_PATH, () => {
  const { body, status, headers } = manifestResponse(manifest);
  return new Response(body, { status, headers });
});

// After boot. Dev being down must not stop a service from booting.
publishManifest(manifest, { baseUrl, headers }).catch((error) => logger.warn(error));

What each list comes from

| List | TypeScript | Go | Python | |---|---|---|---| | Routes | routesFromHono(app) | RecordingMux.Routes() | routes_from_asgi(app) | | RPCs | rpcsFromServiceDefinition(def, scopes) | RPCsFromServer(server, scopes) | rpcs_from_descriptors(descriptors, scopes) | | Consumed topics | topicsFromReplicas(replicas) | pass the list | topics_from_replicas(replicas) | | Workers | workersFromSpecs(specs) | pass the list | workers_from_specs(specs) | | Produced topics | pass the list | pass the list | pass the list |

Produced topics are passed in because a dispatcher's streamFor is a function and cannot list them. Pass the constant the service's outbox writes use.

Limits

  • routesFromHono skips method ALL, because Hono records app.use middleware under it. An app.all route is therefore not listed. A manifest must under-claim rather than claim a route the service does not serve.
  • An RPC's requiredScope is null when the method has no bound scope. The server denies that method (LIB-AUTH-13), so a null in a manifest is worth looking at.
  • Every value must be printable ASCII without " or \. That is the range all three JSON encoders write identically, and it is what keeps the hash equal.
  • Credentials for Dev come from the caller. The library reads no environment variable.