| 473 | const worker = async () => { |
| 474 | for (let id = pending.pop(); id !== undefined; id = pending.pop()) { |
| 475 | const endpoint = `/v1/projects/${encodeURIComponent(context.project)}/env/${encodeURIComponent(id)}`; |
| 476 | const response = apiResponse( |
| 477 | await vercelAsync(context, apiArgs(context, endpoint)), |
| 478 | operation |
| 479 | ); |
| 480 | const value = stringValue(response, 'value'); |
| 481 | if (response.decrypted === true && value !== undefined) values.set(id, value); |
| 482 | } |
| 483 | }; |
| 484 | await Promise.all(Array.from({ length: 8 }, worker)); |
| 485 | return values; |