mirror of
https://github.com/stablyai/orca.git
synced 2026-11-02 10:08:13 +00:00
13 lines
592 B
JavaScript
13 lines
592 B
JavaScript
// Generate published JSON Schemas and author references from the Zod schemas.
|
|
import { mkdirSync, writeFileSync } from 'node:fs'
|
|
import path from 'node:path'
|
|
import { loadPluginSchemaModule, REPO_ROOT } from './plugin-schema-module-loader.mjs'
|
|
|
|
const files = loadPluginSchemaModule('manifest/plugin-json-schema.ts').pluginSchemaGeneratedFiles()
|
|
for (const [relative, content] of Object.entries(files)) {
|
|
const target = path.join(REPO_ROOT, ...relative.split('/'))
|
|
mkdirSync(path.dirname(target), { recursive: true })
|
|
writeFileSync(target, content)
|
|
console.log(`wrote ${relative}`)
|
|
}
|