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

@geonovum/standards-checker

v1.0.0

Published

Standards checker engine with Spectral-based validation, CLI and API support

Readme

@geonovum/standards-checker

Core validation engine and CLI toolkit for checking documents against Spectral rulesets.

Part of the standards-checker workspace. For the web UI, see @geonovum/standards-checker-ui.

Installation

npm install @geonovum/standards-checker

Exports

| Entry point | Description | | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | @geonovum/standards-checker | Main: validators, types (RulesetPlugin, RulesetPluginIndex, etc.), constants, Spectral functions | | @geonovum/standards-checker/engine | Engine internals: validate, validateUrl, mapSeverity, utility functions | | @geonovum/standards-checker/engine/functions | Spectral rule functions: remoteSchema, hasParameter, hasSchemaMatch, hasPathMatch, includes, date, datetime | | @geonovum/standards-checker/engine/util | Engine utilities: errorMessage, matchSchema, queryPath, getParent, groupBy, groupBySource | | @geonovum/standards-checker/shared/util | Shared utilities: formatDocument, handleResponse, handleResponseJson, groupBy, groupBySource | | @geonovum/standards-checker/shared/constants | Constants: APPLICATION_JSON_TYPE, APPLICATION_GEO_JSON_TYPE, APPLICATION_OPENAPI_JSON_3_0_TYPE | | @geonovum/standards-checker/cli | CLI toolkit: createCli for building per-checker CLIs |

Building a CLI

Each checker app creates its own CLI binary using createCli:

#!/usr/bin/env node
import { createCli } from '@geonovum/standards-checker/cli';
import plugins from './index';

createCli({ name: 'my-checker', plugins });

Add a bin entry and build script to your package.json:

{
  "bin": {
    "my-checker": "./dist/cli.js"
  },
  "scripts": {
    "build:cli": "tsdown src/cli.ts --format esm --platform node --out-dir dist"
  }
}

This gives you a CLI with baked-in rulesets:

my-checker validate --ruleset my-spec --input ./data/document.json

See the workspace README for all CLI flags and output formats.

Building a ruleset plugin

A ruleset plugin exposes rulesets to the CLI runner. Create a RulesetPluginIndex as the default export of your index:

import type { RulesetPlugin, RulesetPluginIndex } from '@geonovum/standards-checker';

const plugin: RulesetPlugin = {
  id: 'my-spec',
  rulesets: {
    'http://example.com/conf/core': coreRuleset,
    'http://example.com/conf/extended': extendedRuleset,
  },
};

const index: RulesetPluginIndex = {
  'my-spec': plugin,
};

export default index;

Plugin hooks

Plugins can define optional lifecycle hooks:

const plugin: RulesetPlugin = {
  id: 'my-spec',
  rulesets: { ... },
  funcs: { myCustomFunction },            // Custom Spectral functions
  preprocess: (doc, ctx) => transform(doc), // Transform input before validation
  postprocess: (result, ctx) => result,     // Modify results after validation
};

Using Spectral functions

The package includes reusable Spectral rule functions:

import { remoteSchema, hasSchemaMatch, hasParameter } from '@geonovum/standards-checker';
import { errorMessage } from '@geonovum/standards-checker/engine/util';
  • remoteSchema — Validates against a remote JSON Schema
  • hasSchemaMatch — Checks if an OpenAPI schema matches a reference schema
  • hasParameter — Checks if an operation has a specific parameter
  • hasPathMatch — Checks if paths matching a pattern exist
  • includes — Checks if a value is included in an array
  • date / datetime — Validates date/datetime strings

License

EUPL-1.2