feat: Add n8n-node CLI with commands to scaffold and develop nodes (#18090)

This commit is contained in:
Elias Meire
2025-08-15 14:55:39 +02:00
committed by GitHub
parent a1280b6bf4
commit c26104b3ba
93 changed files with 4279 additions and 380 deletions

View File

@@ -0,0 +1,34 @@
import { execSync } from 'child_process';
type GitUser = {
name?: string;
email?: string;
};
export function tryReadGitUser(): GitUser {
const user: GitUser = { name: '', email: '' };
try {
const name = execSync('git config --get user.name', {
stdio: ['pipe', 'pipe', 'ignore'],
})
.toString()
.trim();
if (name) user.name = name;
} catch {
// ignore
}
try {
const email = execSync('git config --get user.email', {
stdio: ['pipe', 'pipe', 'ignore'],
})
.toString()
.trim();
if (email) user.email = email;
} catch {
// ignore
}
return user;
}