mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-24 21:35:24 +02:00
25 lines
672 B
JavaScript
Executable File
25 lines
672 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const path = require('path');
|
|
const fs = require('fs');
|
|
|
|
const {
|
|
generateNodeDefinitions,
|
|
} = require('@n8n/workflow-sdk/dist/generate-types/generate-node-defs-cli');
|
|
|
|
const cwd = process.cwd();
|
|
const nodesJsonPath = path.join(cwd, 'dist', 'types', 'nodes.json');
|
|
const outputDir = path.join(cwd, 'dist', 'node-definitions');
|
|
|
|
const packageJsonPath = path.join(cwd, 'package.json');
|
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
|
|
generateNodeDefinitions({
|
|
nodesJsonPath,
|
|
outputDir,
|
|
packageName: packageJson.name,
|
|
}).catch((error) => {
|
|
console.error('Node definition generation failed:', error);
|
|
process.exit(1);
|
|
});
|