()
| 448 | } |
| 449 | |
| 450 | async createZip(): Promise<Buffer> { |
| 451 | let { zipBuffer } = this; |
| 452 | if (!zipBuffer) { |
| 453 | if (!this.files) { |
| 454 | throw new Error('`files` is not defined'); |
| 455 | } |
| 456 | await sema.acquire(); |
| 457 | try { |
| 458 | zipBuffer = await createZip(this.files); |
| 459 | } finally { |
| 460 | sema.release(); |
| 461 | } |
| 462 | } |
| 463 | return zipBuffer; |
| 464 | } |
| 465 | |
| 466 | /** |
| 467 | * @deprecated Use the `supportsResponseStreaming` property instead. |