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

@diby/openset-validator

v1.0.0

Published

Validator for OpenSet training workout and program documents

Readme

@diby/openset-validator

Validator for OpenSet training workout and program documents.

Validates documents against the OpenSet v1.0 specification, checking both structural correctness and semantic rules.

Installation

npm install @diby/openset-validator

Programmatic API

import { validate } from '@diby/openset-validator';

const result = validate(document);

// result shape:
// {
//   valid: boolean;
//   errors: ValidationMessage[];
//   warnings: ValidationMessage[];
// }

// ValidationMessage shape:
// {
//   code: string;          // e.g. "E003"
//   level: 'error' | 'warn';
//   path: string;          // JSON path, e.g. "blocks[0].series[0].exercises[1].sets[0]"
//   message: string;       // Human-readable description
// }

CLI

# Validate a file
npx openset validate ./my-workout.json

# Validate with structural summary
npx openset validate ./my-workout.json --summary

# Validate with verbose output
npx openset validate ./my-workout.json --verbose

# Output as JSON
npx openset validate ./my-workout.json --json

Validation Rules

Errors (invalid document)

| Code | Rule | |------|------| | E001 | Each entry in the dimensions array must be a known dimension name | | E003 | Every dimension listed in the dimensions array must have a corresponding field on the set | | E005 | Value object type must be valid (fixed, range, min, amrap, max, any) | | E006 | Range min must be less than max | | E007 | Dimension must use allowed value types | | E008 | sides must be 1 or 2 | | E009 | heart_rate_zone must be 1-5 | | E010 | rpe must be 1-10 | | E011 | group only valid in CLUSTER mode | | E012 | Mutually exclusive dimensions (pace+speed, heart_rate+heart_rate_zone) | | E013 | Unknown dimension without valid namespace prefix | | E014 | Unsupported major openset_version | | E015 | Extension field has invalid value shape (must be a valid ValueObject) |

Warnings (valid but suspicious)

| Code | Rule | |------|------| | W001 | rest_after at both SET and SERIES level | | W002 | rest_after in group on non-last exercise | | W003 | exercise_id not in canonical library | | W004 | No exercise_id and no name | | W005 | CLUSTER mode but no group fields | | W006 | No date field on workout | | W007 | Load range without rpe | | W008 | Uneven set counts in non-SEQUENTIAL series | | W009 | Unknown namespaced extension field | | W010 | Document minor version newer than validator minor version |

License

MIT