(arch: string)
| 79 | |
| 80 | /** Validate and normalize a VERCEL_BUILD_ARCH value. */ |
| 81 | export function validateBuildArch(arch: string): 'x86_64' | 'aarch64' { |
| 82 | switch (arch.toLowerCase()) { |
| 83 | case 'x86_64': |
| 84 | return 'x86_64'; |
| 85 | case 'aarch64': |
| 86 | return 'aarch64'; |
| 87 | default: |
| 88 | throw new NowBuildError({ |
| 89 | code: 'INVALID_BUILD_ARCH', |
| 90 | message: `Unrecognized VERCEL_BUILD_ARCH "${arch}". Expected "x86_64" or "aarch64".`, |
| 91 | }); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Return platform info for the Lambda runtime target. |
no outgoing calls
no test coverage detected