tops-bmad
Version:
CLI tool to install BMAD workflow files into any project with integrated Shai-Hulud 2.0 security scanning
30 lines (22 loc) • 730 B
JavaScript
/**
* TOPS BMAD Security Scanner - Database Updater
*/
import { resolve, dirname } from 'path';
import { fileURLToPath } from 'url';
import { spawn } from 'child_process';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const PROJECT_ROOT = resolve(__dirname, '..');
const UPDATE_SCRIPT = resolve(PROJECT_ROOT, 'security-tools', 'scripts', 'update-package-db.js');
const updateProcess = spawn('node', [UPDATE_SCRIPT], {
stdio: 'inherit',
cwd: PROJECT_ROOT
});
updateProcess.on('close', (code) => {
process.exit(code || 0);
});
updateProcess.on('error', (error) => {
console.error('❌ Error updating database:', error.message);
process.exit(1);
});