From fac989166831c51d6d59bb65193a4aee0267d925 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Sat, 20 Jul 2024 01:24:55 +0800 Subject: [PATCH] feat: add schema to jsonschema exporter --- apps/cli/src/linter/exporter.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 apps/cli/src/linter/exporter.ts diff --git a/apps/cli/src/linter/exporter.ts b/apps/cli/src/linter/exporter.ts new file mode 100644 index 0000000..6c4658f --- /dev/null +++ b/apps/cli/src/linter/exporter.ts @@ -0,0 +1,9 @@ +import { writeFileSync } from 'fs'; +import zodToJsonSchema from 'zod-to-json-schema'; + +import { ConfigurationSchema } from './schema'; + +writeFileSync( + 'schema.json', + JSON.stringify(zodToJsonSchema(ConfigurationSchema)), +);