This project updates JSON schemas from SchemaStore, generates TypeScript definitions for them, and prepares a publishable npm package per schema under the @schemastore scope.
For coding-agent specific workflows, repository conventions, and safety rules, see AGENTS.md.
- Clones/updates
SchemaStore/schemastoreautomatically (or uses--source-dir). - Converts JSON schemas with
json-schema-to-typescript. - Creates an npm package folder per schema under
schemas/<schema-name>. - Generates
index.d.ts,README.md,package.json, andLICENSEfor each schema package. - Type-checks each generated schema declaration immediately after generation.
- Writes a lock file (
schema-lock.json) with SHA-256 hashes for generated declaration files. - Skips schemas that cannot be converted or do not type-check.
- Skips non-publishable schemas listed in
schema-blocklist.json(manually maintained) during both generation and publishing.
yarn install
yarn updateOptions:
-f, --force: regenerate all schemas.--source-dir <dir>: use an existing local SchemaStore directory.
yarn testWatch mode:
yarn test:watchyarn publish:schemasPublishing attempts every generated schema package under schemas/. If one package fails to publish, the remaining packages are still attempted. Publish failures are written to publish-errors.log.
Schemas listed in schema-blocklist.json are always skipped from publishing.
The publish workflow opens a pull request with an updated schema-lock.json file after publish attempts so published package versions are tracked in git.
All published schemastore packages are visible under the @schemastore npm organization page.
Dry-run mode:
yarn publish:schemas:dry-runThis prints the packages that would be published without sending anything to npm.
- Per-schema npm packages:
schemas/<schema-name>/ - Generated declaration per package:
schemas/<schema-name>/index.d.ts - Package license per package:
schemas/<schema-name>/LICENSE - Lock file:
schema-lock.json