mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat: Add n8n extension manifest schema (no-changelog) (#14382)
This commit is contained in:
16
packages/@n8n/extension-sdk/scripts/create-json-schema.ts
Normal file
16
packages/@n8n/extension-sdk/scripts/create-json-schema.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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));
|
||||
})();
|
||||
Reference in New Issue
Block a user