()
| 1517 | // V8 heap (observed on the Node.js/npm path; see GH #32920), so we must |
| 1518 | // explicitly cancel and release it regardless of how the generator exits. |
| 1519 | function releaseStreamResources(): void { |
| 1520 | cleanupStream(stream) |
| 1521 | stream = undefined |
| 1522 | if (streamResponse) { |
| 1523 | streamResponse.body?.cancel().catch(() => {}) |
| 1524 | streamResponse = undefined |
| 1525 | } |
| 1526 | } |
| 1527 | |
| 1528 | // Consume pending cache edits ONCE before paramsFromContext is defined. |
| 1529 | // paramsFromContext is called multiple times (logging, retries), so consuming |
no test coverage detected