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

@alfiz/verify

v0.8.1

Published

Static verification for Alfiz deployments: call-site keys checked against the catalog, gate-shape linting, coverage linting, catalog linting, and the client-reach guard for service keys. The four-point checklist enforced by tooling, not discipline.

Readme

@alfiz/verify

Static verification: the four-point wiring checklist enforced by tooling, not discipline. Typed keys catch typos the compiler can see; this catches the rest:

  • unknown-pattern — a string at a can/require*/gateAction call site that is not a catalog key or known group wildcard. (The same rule runs at runtime in @alfiz/core for the string paths static analysis cannot see; this is the build-time half.)
  • visibility-as-gate — canAny/requireAny inside a "use server" file or route handler. Visibility affordances are never gates.
  • ungated-action — an exported async function in a "use server" file containing no gate call at all.
  • unreferenced-leaf — a catalog leaf no gate or nav item references (dead permission, or missing enforcement).
  • catalog — lintCatalog violations: the naming floor, nav wiring, requestability without a policy.
  • client-reachable-secret — a forbidden identifier (service-key env vars) appearing in a "use client" module.

Describe YOUR project, not a hypothetical one

Real projects gate through their own wrappers — the conventions encourage it (gateAction is itself one). Declare them, or every wrapped action reads as ungated and the noise buries the real findings:

  • gateNames / visibilityNames — your wrapper function names. In the CLI config these are added to the built-in defaults; on verifyProject they replace them (spread DEFAULT_GATE_NAMES / DEFAULT_VISIBILITY_NAMES to extend).

  • serverFilePatterns — extra paths treated as server enforcement points (RegExp sources in the CLI config, added to the defaults).

  • Out-of-domain surfaces — files that authenticate outside the catalog by design (system trust domains that must survive a database outage) opt out in-file, with a reason, and are listed in the report's skippedFiles:

    "use server";
    // alfiz-verify-ignore-file system trust domain: authenticates by deploy key

    The pragma belongs in the file header: the leading comments, above or below a "use server" / "use client" directive — JavaScript permits comments before and between directive-prologue statements, and so does this. A pragma without a reason still skips, but warns; a pragma past the first statement is inert and is reported as inert, because a security tool that silently drops its own escape hatch teaches you the escape hatch doesn't work.

Usage

Programmatic (recommended — no JSON step):

import { DEFAULT_GATE_NAMES, verifyProject } from "@alfiz/verify";
import { catalog } from "./src/alfiz.js";

const report = verifyProject({
  catalog,
  files: myGlob("src/**/*.{ts,tsx}"),
  gateNames: [...DEFAULT_GATE_NAMES, "assertTeaches", "gateDestructiveAction"],
  forbidClientIdentifiers: ["ALFIZ_SERVICE_KEYS"],
});
process.exitCode = report.errorCount > 0 ? 1 : 0;

CLI: export the catalog document once (catalog.toDocument() → JSON), then

alfiz-verify --config alfiz-verify.config.json
{
  "catalog": "alfiz-catalog.json",
  "include": ["src", "app"],
  "gateNames": ["assertTeaches", "gateDestructiveAction"],
  "serverFilePatterns": ["app/actions/"],
  "forbidClientIdentifiers": ["ALFIZ_SERVICE_KEYS"]
}