Skip to content

Commit 234c280

Browse files
committed
refactor: extract auto region to constant
1 parent c597b02 commit 234c280

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/region.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export const REGION_AUTO = 'auto'
2+
13
const regions = {
24
'us-east-1': true,
35
'us-east-2': true,

src/store_factory.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Client, ClientOptions, getClientOptions } from './client.ts'
22
import { getEnvironmentContext, MissingBlobsEnvironmentError } from './environment.ts'
3-
import { Region } from './region.ts'
3+
import { Region, REGION_AUTO } from './region.ts'
44
import { Store } from './store.ts'
55

66
interface GetDeployStoreOptions extends Partial<ClientOptions> {
@@ -38,7 +38,7 @@ export const getDeployStore = (input: GetDeployStoreOptions | string = {}): Stor
3838
} else {
3939
// For API requests, we can use `auto` and let the API choose the right
4040
// region.
41-
clientOptions.region = 'auto'
41+
clientOptions.region = REGION_AUTO
4242
}
4343
}
4444

0 commit comments

Comments
 (0)