// Regenerates src/api/schema.d.ts from the API spec in the Go module. // openapi-typescript is run through npx because it still asks for TypeScript 5 as a peer. import { execFileSync } from 'node:child_process' import { fileURLToPath } from 'node:url' const root = fileURLToPath(new URL('..', import.meta.url)) const spec = fileURLToPath(new URL('../../internal/api/openapi/openapi.yaml', import.meta.url)) execFileSync( 'npx', ['--yes', 'openapi-typescript@7.13.0', spec, '-o', 'src/api/schema.d.ts'], { cwd: root, stdio: 'inherit' }, )