mirror of
https://github.com/supabase/supabase.git
synced 2026-07-03 22:54:19 +08:00
* chore: transition from AWS_NEW to AWS_K8S * chore: transition from useIsAwsNew to useIsAwsK8s
15 lines
385 B
TypeScript
15 lines
385 B
TypeScript
import type { CloudProvider, Region } from 'shared-data'
|
|
import { AWS_REGIONS, FLY_REGIONS } from 'shared-data'
|
|
|
|
export function getAvailableRegions(cloudProvider: CloudProvider): Region {
|
|
switch (cloudProvider) {
|
|
case 'AWS':
|
|
case 'AWS_K8S':
|
|
return AWS_REGIONS
|
|
case 'FLY':
|
|
return FLY_REGIONS
|
|
default:
|
|
throw new Error('Invalid cloud provider')
|
|
}
|
|
}
|