@horizon36596/zenith-schema
v0.1.2
Published
The Zenith file formats (link, robot, field, waypoints, auto) as zod schemas, TypeScript types and JSON Schema, with the migrations between format versions.
Maintainers
Readme
@horizon36596/zenith-schema
The file formats of Zenith, the FTC autonomous planner
by Horizon (FTC 36596): zenith.json, robot.json, *.field.json, waypoints.json and
*.auto.json, as zod schemas and the TypeScript types inferred from them, plus the migrations
between format versions and the estimateS expression grammar.
npm install @horizon36596/zenith-schemaimport { parseAuto, SCHEMA_ID } from "@horizon36596/zenith-schema";
const auto = parseAuto(JSON.parse(text)); // throws SchemaError with every issue listedThe same schemas ship as JSON Schema (draft 2020-12) under json/, for example
@horizon36596/zenith-schema/json/auto.json, and are served at
https://libraries.horizon36596.org/zenith/schema/v1/<kind>.json.
The package is pure: no DOM, no clock, no randomness and no Node APIs, so it runs anywhere.
Documentation: https://libraries.horizon36596.org/zenith/. Licence: MIT.
