@@ -6,14 +6,15 @@ import { doSetup } from "../apphosting/backend";
6
6
import { ensureApiEnabled } from "../gcp/apphosting" ;
7
7
import { APPHOSTING_TOS_ID } from "../gcp/firedata" ;
8
8
import { requireTosAcceptance } from "../requireTosAcceptance" ;
9
+ import { logWarning } from "../utils" ;
9
10
10
11
export const command = new Command ( "apphosting:backends:create" )
11
12
. description ( "create a Firebase App Hosting backend" )
12
13
. option (
13
14
"-a, --app <webAppId>" ,
14
15
"specify an existing Firebase web app's ID to associate your App Hosting backend with" ,
15
16
)
16
- . option ( "-l, --location <location>" , "specify the location of the backend" , "" )
17
+ . option ( "-l, --location <location>" , "specify the location of the backend" )
17
18
. option (
18
19
"-s, --service-account <serviceAccount>" ,
19
20
"specify the service account used to run the server" ,
@@ -23,9 +24,15 @@ export const command = new Command("apphosting:backends:create")
23
24
. before ( requireInteractive )
24
25
. before ( requireTosAcceptance ( APPHOSTING_TOS_ID ) )
25
26
. action ( async ( options : Options ) => {
27
+ if ( options . location !== undefined ) {
28
+ logWarning (
29
+ "--location is being removed in the next major release. " +
30
+ "The CLI will prompt for a Primary Region where appropriate." ,
31
+ ) ;
32
+ }
26
33
const projectId = needProjectId ( options ) ;
27
34
const webAppId = options . app ;
28
- const location = options . location ;
35
+ const location = options . location as string ;
29
36
const serviceAccount = options . serviceAccount ;
30
37
31
38
await doSetup (
0 commit comments