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