UNPKG

mak3r-hub

Version:

Universal Claude Code force multiplier for website development

68 lines (54 loc) â€ĸ 2.51 kB
#!/usr/bin/env node const { execSync } = require('child_process'); const fs = require('fs-extra'); const path = require('path'); const os = require('os'); const chalk = require('chalk'); console.log(chalk.blue('🚀 MAK3R-HUB Post-Installation Setup')); async function postInstall() { try { // Check if running on Windows and .NET is available const isWindows = os.platform() === 'win32'; if (isWindows) { console.log(chalk.yellow('đŸ“Ļ Checking for .NET runtime...')); try { // Check if dotnet is available execSync('dotnet --version', { stdio: 'ignore' }); console.log(chalk.green('✅ .NET runtime found')); // Check if C# engine already exists const enginePath = path.join(__dirname, '..', 'src-csharp', 'MAK3R.Core', 'bin', 'Debug', 'net9.0', 'win-x64', 'MAK3R.Core.exe'); if (!fs.existsSync(enginePath)) { console.log(chalk.yellow('🔧 Building C# automation engine...')); // Build the C# project const csharpDir = path.join(__dirname, '..', 'src-csharp', 'MAK3R.Core'); if (fs.existsSync(csharpDir)) { execSync('dotnet build', { cwd: csharpDir, stdio: 'inherit' }); console.log(chalk.green('✅ C# automation engine built successfully')); } else { console.log(chalk.yellow('âš ī¸ C# source not found - engine will be built on first use')); } } else { console.log(chalk.green('✅ C# automation engine already available')); } } catch (error) { console.log(chalk.yellow('âš ī¸ .NET not found - C# automation features will be unavailable')); console.log(chalk.gray(' Install .NET 6+ from https://dotnet.microsoft.com/download')); } } else { console.log(chalk.gray('â„šī¸ Non-Windows platform detected - C# automation features not available')); } console.log(chalk.green('✅ MAK3R-HUB installation complete!')); console.log(chalk.blue('đŸŽ¯ Run "mak3r-hub doctor" to verify installation')); } catch (error) { console.log(chalk.red('❌ Post-install setup failed:'), error.message); console.log(chalk.yellow(' MAK3R-HUB will still work but some features may be limited')); } } // Only run if this script is executed directly (not required) if (require.main === module) { postInstall(); } module.exports = { postInstall };