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

@xerg/schemas

v0.3.0

Published

Versioned TypeScript wire types for Xerg audit payloads, daily rollups, findings, comparisons, and recommendations.

Readme

@xerg/schemas

Versioned TypeScript wire types for Xerg audit payloads, daily rollups, findings, comparisons, and recommendations.

What it is

@xerg/schemas defines the JSON contract shared between the Xerg CLI, the local audit engine, and any service that consumes pushed audit summaries.

It is intentionally small and stable:

  • TypeScript-first types for Xerg wire payloads
  • Daily spend and waste rollups for hosted dashboards and ingestion pipelines
  • A runtime AUDIT_PUSH_PAYLOAD_VERSION constant for compatibility checks
  • A dependency-light package surface for backends, ingestion services, and internal tooling

What it is not

This package does not perform runtime validation by itself. It provides compile-time guarantees for TypeScript consumers. If you accept untrusted JSON, add runtime validation in the consuming service and keep it aligned with these exported types.

Install

npm install @xerg/schemas

Example

import {
  AUDIT_PUSH_PAYLOAD_VERSION,
  type AuditPushPayload,
} from '@xerg/schemas';

export function acceptAuditPayload(payload: AuditPushPayload) {
  if (payload.version !== AUDIT_PUSH_PAYLOAD_VERSION) {
    throw new Error(`Unsupported payload version: ${payload.version}`);
  }

  return payload.summary.spendByDay;
}

Compatibility contract

AuditPushPayload.version is the top-level wire version.

  • Additive fields that older consumers can safely ignore should usually keep the same version.
  • Breaking changes to existing field names, meanings, or required structure should ship behind a new payload version.
  • Producers and consumers should reject payloads with a newer unsupported version instead of guessing.

Current version:

import { AUDIT_PUSH_PAYLOAD_VERSION } from '@xerg/schemas';

AUDIT_PUSH_PAYLOAD_VERSION; // 1

Daily series such as spendByDay and wasteByDay were added without bumping the payload version because they are additive fields that older consumers can ignore safely.

Exports

Primary exports include:

  • AuditPushPayload
  • DailySpendBreakdown
  • DailyWasteBreakdown
  • WireFinding
  • WireComparison
  • XergRecommendation
  • AUDIT_PUSH_PAYLOAD_VERSION

Use cases

  • Share a single payload contract between the Xerg CLI and backend services
  • Type audit ingestion pipelines without copying interface definitions
  • Gate processing logic on an explicit payload version