()
| 472 | } |
| 473 | |
| 474 | private cleanup(): void { |
| 475 | console.log() |
| 476 | console.log('Cleaning up...') |
| 477 | |
| 478 | // Clean up temp directory |
| 479 | if (this.tempDir && fs.existsSync(this.tempDir)) { |
| 480 | try { |
| 481 | fs.rmSync(this.tempDir, { recursive: true, force: true }) |
| 482 | } catch (error) { |
| 483 | this.log.error( |
| 484 | `Failed to clean up temp directory: ${error instanceof Error ? error.message : String(error)}`, |
| 485 | ) |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | if (this.appDevProcess && !this.appDevProcess.killed) { |
| 490 | this.appDevProcess.kill('SIGTERM') |
| 491 | this.appDevProcess = null |
| 492 | } |
| 493 | |
| 494 | process.exit(0) |
| 495 | } |
| 496 | |
| 497 | private startAppDevServer(): void { |
| 498 | if (this.appDevProcess) { |
no test coverage detected