()
| 245 | } |
| 246 | |
| 247 | export function bugReportCommand(): Command { |
| 248 | return new Command('bug-report') |
| 249 | .description('Generate a diagnostic bundle for bug reporting') |
| 250 | .option('--reveal', 'Reveal the bundle in Finder (default: true)', true) |
| 251 | .option('--no-reveal', 'Do not reveal the bundle in Finder') |
| 252 | .action(async (opts: { reveal: boolean }) => { |
| 253 | const cwd = process.cwd(); |
| 254 | const projectSlug = resolveProjectSlug(cwd); |
| 255 | |
| 256 | try { |
| 257 | await createBundle({ |
| 258 | projectSlug, |
| 259 | cwd, |
| 260 | noReveal: !opts.reveal, |
| 261 | }); |
| 262 | } catch (err) { |
| 263 | const msg = err instanceof Error ? err.message : String(err); |
| 264 | process.stderr.write(`ok bug-report: failed — ${msg}\n`); |
| 265 | process.exitCode = 1; |
| 266 | } |
| 267 | }); |
| 268 | } |
no test coverage detected