#!/usr/bin/env node /** * Simple build validation test for Crawlab MCP Server */ import { CrawlabClient } from "./dist/client.js"; console.log("๐Ÿงช Testing Crawlab MCP Server build...\n"); // Test that we can instantiate the client try { const client = new CrawlabClient("http://localhost:8080", "test-token"); console.log("โœ… CrawlabClient class - OK"); } catch (error) { console.log("โŒ CrawlabClient class - FAILED"); console.log(" Error:", error.message); process.exit(1); } // Test that the main entry point is valid try { const entryPoint = await import("./dist/index.js"); console.log("โœ… Main entry point - OK"); } catch (error) { console.log("โŒ Main entry point - FAILED"); console.log(" Error:", error.message); process.exit(1); } // Test tools module try { const toolsModule = await import("./dist/tools.js"); if (typeof toolsModule.configureAllTools === 'function') { console.log("โœ… Tools configuration - OK"); } else { console.log("โŒ Tools configuration - FAILED (configureAllTools not a function)"); } } catch (error) { console.log("โŒ Tools configuration - FAILED"); console.log(" Error:", error.message); } console.log("\n๐ŸŽ‰ Build validation completed successfully!"); console.log("\n๐Ÿ“‹ Ready to use:"); console.log(" npm start [api_token]"); console.log(" Example: npm start http://localhost:8080 your-token"); console.log("\n Or use the binary directly:"); console.log(" ./dist/index.js http://localhost:8080 your-token");