()
| 18 | } |
| 19 | |
| 20 | function makeCapture(): { |
| 21 | capture: CapturedOutput; |
| 22 | deps: Pick<UsageDeps, 'stdout' | 'stderr'>; |
| 23 | } { |
| 24 | const capture: CapturedOutput = { stdout: [], stderr: [] }; |
| 25 | return { |
| 26 | capture, |
| 27 | deps: { |
| 28 | stdout: line => capture.stdout.push(line), |
| 29 | stderr: line => capture.stderr.push(line), |
| 30 | }, |
| 31 | }; |
| 32 | } |
| 33 | |
| 34 | /** Minimal MeResponse without credits/subPlan (backend current state) */ |
| 35 | const meWithoutCredits = { |