@hivetechs/hive
Version:
HiveTechs Consensus - The world's most advanced AI-powered development assistant
43 lines (33 loc) โข 1.11 kB
JavaScript
const fs = require('fs');
const path = require('path');
const BIN_DIR = path.join(__dirname, '..', 'bin');
function cleanup() {
console.log('๐งน Cleaning up HiveTechs Consensus...');
try {
// Remove binary files
const binaries = ['hive', 'hive.exe'];
for (const binary of binaries) {
const binaryPath = path.join(BIN_DIR, binary);
if (fs.existsSync(binaryPath)) {
fs.unlinkSync(binaryPath);
console.log(`โ
Removed ${binary}`);
}
}
// Clean up any temporary files
const tempFiles = fs.readdirSync(BIN_DIR).filter(f =>
f.endsWith('.tar.gz') || f.endsWith('.tmp')
);
for (const file of tempFiles) {
const filePath = path.join(BIN_DIR, file);
fs.unlinkSync(filePath);
console.log(`โ
Removed temporary file: ${file}`);
}
console.log('๐ HiveTechs Consensus uninstalled successfully');
} catch (error) {
// Errors during uninstall are not critical
console.log('โ ๏ธ Some cleanup tasks failed:', error.message);
}
}
// Run cleanup
cleanup();