@sanskarin/repodna-schema
v1.4.5
Published
TypeScript models of the RepoDNA artifact, generated from its JSON Schema, with loading helpers.
Maintainers
Readme
RepoDNA artifact schema
TypeScript types for the RepoDNA analysis artifact,
the JSON that repodna analyze --format json writes, generated from its JSON Schema, with
helpers to load, check, and describe artifacts. The JSON Schemas of the artifact and of the
configuration file are included.
import { readFile } from "node:fs/promises";
import { findingCounts, parseArtifact } from "@sanskarin/repodna-schema";
const { artifact, warnings } = parseArtifact(await readFile("repodna.json", "utf8"));
console.log(artifact.identity.name, findingCounts(artifact), warnings);The schemas are exported as @sanskarin/repodna-schema/artifact.schema.json and
@sanskarin/repodna-schema/config.schema.json.
Install
npm install @sanskarin/repodna-schemaThe package is on npmjs.com and on GitHub Packages, which asks for a GitHub token even to install public packages; see the installation guide.
Licensed under the Apache License 2.0.
