(args: string[], env: Record<string, string> = {})
| 29 | } |
| 30 | |
| 31 | function runScript(args: string[], env: Record<string, string> = {}): { stdout: string; stderr: string; exitCode: number } { |
| 32 | const result = spawnSync("bun", [SCRIPT, ...args], { |
| 33 | encoding: "utf-8", |
| 34 | timeout: 30000, |
| 35 | env: { ...process.env, ...env }, |
| 36 | }); |
| 37 | return { |
| 38 | stdout: result.stdout || "", |
| 39 | stderr: result.stderr || "", |
| 40 | exitCode: result.status ?? 1, |
| 41 | }; |
| 42 | } |
| 43 | |
| 44 | function writeClaudeCodeSession(home: string, projectName: string, sessionId: string, content: string): string { |
| 45 | const projectsDir = join(home, ".claude", "projects", projectName); |
no test coverage detected