MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / main

Function main

cli/release-staging/index.js:573–606  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

571}
572
573async function main() {
574 console.log('\x1b[1m\x1b[91m' + '='.repeat(60) + '\x1b[0m')
575 console.log('\x1b[1m\x1b[93m❄️ CODECANE STAGING ENVIRONMENT ❄️\x1b[0m')
576 console.log(
577 '\x1b[1m\x1b[91mFOR TESTING PURPOSES ONLY - NOT FOR PRODUCTION USE\x1b[0m',
578 )
579 console.log('\x1b[1m\x1b[91m' + '='.repeat(60) + '\x1b[0m')
580 console.log('')
581
582 await ensureBinaryExists()
583
584 const child = spawn(CONFIG.binaryPath, process.argv.slice(2), {
585 stdio: 'inherit',
586 })
587
588 const exitListener = (code, signal) => {
589 resetTerminal({
590 exitAlternateScreen: shouldExitAlternateScreen(code, signal),
591 })
592 printCrashDiagnostics(code, signal)
593 process.exit(signal ? 1 : (code || 0))
594 }
595
596 child.on('exit', exitListener)
597
598 child.on('error', (err) => {
599 console.error('Failed to start codecane:', err.message)
600 process.exit(1)
601 })
602
603 setTimeout(() => {
604 checkForUpdates(child, exitListener)
605 }, 100)
606}
607
608main().catch((error) => {
609 console.error('❌ Unexpected error:', error.message)

Callers 1

index.jsFile · 0.70

Calls 4

setTimeoutFunction · 0.85
ensureBinaryExistsFunction · 0.70
checkForUpdatesFunction · 0.70
onMethod · 0.65

Tested by

no test coverage detected