(prompt: string)
| 482 | } |
| 483 | }; |
| 484 | await Promise.all(Array.from({ length: 8 }, worker)); |
| 485 | return values; |
| 486 | } |
| 487 | |
| 488 | export function setVariable( |
| 489 | context: VercelContext, |
| 490 | environment: Environment, |
| 491 | name: string, |
| 492 | value: string, |
| 493 | sensitive: boolean |
| 494 | ): void { |
| 495 | const shouldBeSensitive = sensitive && environment !== 'development'; |
| 496 | vercel( |
| 497 | context, |
| 498 | [ |
| 499 | 'env', |
| 500 | 'add', |
| 501 | name, |
| 502 | environment, |
| 503 | '--force', |
| 504 | shouldBeSensitive ? '--sensitive' : '--no-sensitive', |
| 505 | '--yes', |
| 506 | ], |
| 507 | value |
| 508 | ); |
| 509 | } |
| 510 | |
| 511 | export async function redeployLatest( |
| 512 | context: VercelContext, |
| 513 | environment: Exclude<Environment, 'development'> |
| 514 | ): Promise<string | undefined> { |
| 515 | const response = parseJson( |
| 516 | await vercelAsync(context, [ |
| 517 | 'list', |
| 518 | context.project, |
| 519 | '--environment', |
| 520 | environment, |
| 521 | '--status', |
| 522 | 'READY', |
| 523 | '--format=json', |
no test coverage detected