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

@flowget/graph-validation

v0.3.0

Published

Isomorphic, zero-runtime-dependency static validator for Flowget workflow graphs — the single source of validation logic so the builder's pre-submit verdict and the worker's pre-flight verdict are equal by construction. Template-grammar classifier, refere

Readme

@flowget/graph-validation

Isomorphic, zero-runtime-dependency static validator for Flowget workflow graphs.

This is the single source of validation logic shared by the Flowget builder (design-time, pre-submit) and the Flowget worker (host-side, pre-flight). Because both call the exact same pure functions over the exact same (graph, catalog) input, the builder's verdict and the worker's verdict are equal by construction — a graph the builder accepts is a graph the worker accepts.

Contingency. "Equal by construction" holds given both consumers feed catalogs derived from the same node-definition source. Catalog outputFields / triggerPayload / options can be factory functions — code, not data — so this package guarantees the validation function is identical, not that the two sides' catalog inputs are. Keeping those definitions in sync is the job of the shared registry and the compareFieldCoherence boot check, not of this validator.

What it does:

  • Template-grammar classifier — parses {{ … }} template strings into the @flowget/types TemplateAst (v2-step / v1-reserved / v1-step operands, ?? fallback chains). ReDoS-safe on untrusted input.
  • Reference existence + reachability — every {{ steps.<id>.output.<key> }} token must name a real upstream node and a declared output.
  • Nested fields via dotted keys — a . in an OutputField / trigger-payload key is the path separator (matching the template grammar, which has no bracket form). A flat list of payment.id / payment.amount reconstructs a payment object so {{ trigger.payment.amount }} resolves at leaf granularity. An undeclared nested child is an advisory warning (the runtime payload may still carry it); a key declared as both a scalar and an object parent is a hard error.
  • Coarse value-type latticeisAssignable(producer, consumer) over the FieldValueType set; permissive on unknown / object / array so a "valid" verdict never lies (zero false positives).
  • Declarative field rulesrequired, coarse type, enum membership, min / max / pattern.
  • validateGraphStatic(graph, catalog) — the aggregator, returning a flat ValidationIssue[].
  • validateTriggerInputs(graph, catalog, input) — a run-input gate: flags every {{ trigger.<path> }} the graph references that the run input (the builder's test input, or the worker's real event payload) does not provide, path-aware and false-positive-free. Config traversal is bounded (a stack-overflow-DoS guard); a reference nested deeper than the bound is left to the runtime resolver's non-retryable throw rather than pre-checked.

Install

npm install @flowget/graph-validation

@flowget/types is a peer dependency (>=0.5.0 <1.0.0) — install it too if it is not already in your tree.

Usage

import { validateGraphStatic } from "@flowget/graph-validation";

const issues = validateGraphStatic(graph, catalog);

const blocking = issues.filter((i) => i.severity === "error");
if (blocking.length > 0) {
  // builder: disable the Run button; worker: refuse the pre-flight
}

graph is a @flowget/types WorkflowGraph; catalog is the list of node definitions (structurally a subset of NodeMetadata<BuilderHints>), fed identically by both consumers.

⚠️ 0.x is unstable

This package is on the 0.x line. The surface may change in breaking ways between 0.x minors until 1.0.0 (0.x semver: minor = breaking, patch = additive). Pin a caret range and read the CHANGELOG before upgrading.

Links