UNPKG

@mixio-pro/kalaasetu-mcp

Version:

A powerful Model Context Protocol server providing AI tools for content generation and analysis

34 lines (28 loc) 907 B
#!/usr/bin/env node // Wrapper to run with Bun if available, otherwise Node import { spawn } from 'child_process'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const indexPath = join(__dirname, '..', 'src', 'index.ts'); // Try to run with Bun first const bunProcess = spawn('bun', [indexPath], { stdio: 'inherit', shell: true }); bunProcess.on('error', (error) => { if (error.code === 'ENOENT') { console.error('Error: This package requires Bun to be installed.'); console.error('Please install Bun from https://bun.sh'); console.error(''); console.error('Install with:'); console.error(' curl -fsSL https://bun.sh/install | bash'); process.exit(1); } else { throw error; } }); bunProcess.on('exit', (code) => { process.exit(code || 0); });