Merge pull request #5 from modelcontextprotocol/sammorrowdrums/regenerate-schema-json
chore: regenerate schema.json to match schema.ts
This commit is contained in:
commit
c20e3b0245
1 changed files with 4 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
import { exec } from "child_process";
|
||||
import { readFileSync, writeFileSync } from "fs";
|
||||
import { promisify } from "util";
|
||||
import prettier from "prettier";
|
||||
|
||||
const execAsync = promisify(exec);
|
||||
|
||||
|
|
@ -31,7 +32,9 @@ async function generate(): Promise<string> {
|
|||
const { stdout } = await execAsync(
|
||||
`npx typescript-json-schema --defaultNumberType integer --required --skipLibCheck "${SCHEMA_TS}" "*"`,
|
||||
);
|
||||
return applyJsonSchema202012Transformations(stdout).trim() + "\n";
|
||||
const transformed = applyJsonSchema202012Transformations(stdout);
|
||||
const config = (await prettier.resolveConfig(SCHEMA_JSON)) ?? {};
|
||||
return prettier.format(transformed, { ...config, filepath: SCHEMA_JSON });
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue