// @ts-check import {writeFile, readFile} from 'fs/promises'; const schemaNames = Object.keys( JSON.parse(await readFile('schema/core.schema.json', 'utf8')).definitions, ).filter(it => /^[a-z][0-9a-z<>]*$/i.test(it)); const source = "import type * as core from '@openstapps/core';\n\n" + 'export interface SchemaMap {\n' + schemaNames.map(name => ` '${name}': core.${name.replaceAll('<', '