#!/usr/bin/env node
import'./chunk-5TAVYPOV.js';import o from'chalk';async function i(e){let n=process.cwd(),t=parseInt(e.port||"3850",10),s=e.open!==false,a=e.sections?e.sections.split(",").map(r=>r.trim()):void 0;console.log(o.cyan(`
  Starting Paradigm Platform...
`));try{let{startPlatformServer:r}=await import('./platform-server-G6MJIAJS.js');await r({port:t,projectDir:n,open:s,sections:a}),console.log(o.green(`  Platform running at ${o.bold(`http://localhost:${t}`)}`)),console.log(o.gray(`  Press Ctrl+C to stop
`)),await new Promise(()=>{});}catch(r){r.code==="EADDRINUSE"?(console.error(o.red(`
  Error: Port ${t} is already in use.`)),console.log(o.gray(`  Try: paradigm serve --port ${t+1}
`))):console.error(o.red(`
  Failed to start Platform:`),r),process.exit(1);}}export{i as serveCommand};