mirror of
https://github.com/supabase/supabase.git
synced 2026-07-06 03:04:20 +08:00
* feat(docs), refactor(docs,studio): add regions list to docs Adds list of supported AWS regions to docs. Pulls the region information into `shared-data` package to provide common source of truth for dashboard and docs. * style: format
13 lines
359 B
TypeScript
13 lines
359 B
TypeScript
import type { CloudProvider, Region } from 'shared-data'
|
|
import { AWS_REGIONS, FLY_REGIONS } from 'shared-data'
|
|
|
|
export function getAvailableRegions(cloudProvider: CloudProvider): Region {
|
|
if (cloudProvider === 'AWS') {
|
|
return AWS_REGIONS
|
|
} else if (cloudProvider === 'FLY') {
|
|
return FLY_REGIONS
|
|
}
|
|
|
|
throw new Error('Invalid cloud provider')
|
|
}
|