mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
17 lines
515 B
TypeScript
17 lines
515 B
TypeScript
import { extensionManifestSchema } from '../src/schema';
|
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
import { writeFile } from 'fs/promises';
|
|
import { resolve } from 'path';
|
|
|
|
const __dirname = new URL('.', import.meta.url).pathname;
|
|
const rootDir = resolve(__dirname, '..');
|
|
|
|
const jsonSchema = zodToJsonSchema(extensionManifestSchema, {
|
|
name: 'N8nExtensionSchema',
|
|
nameStrategy: 'title',
|
|
});
|
|
|
|
(async () => {
|
|
await writeFile(resolve(rootDir, 'schema.json'), JSON.stringify(jsonSchema, null, 2));
|
|
})();
|