@@ -6,14 +6,15 @@ import { doSetup } from "../apphosting/backend";
66import { ensureApiEnabled } from "../gcp/apphosting" ;
77import { APPHOSTING_TOS_ID } from "../gcp/firedata" ;
88import { requireTosAcceptance } from "../requireTosAcceptance" ;
9+ import { logWarning } from "../utils" ;
910
1011export const command = new Command ( "apphosting:backends:create" )
1112 . description ( "create a Firebase App Hosting backend" )
1213 . option (
1314 "-a, --app <webAppId>" ,
1415 "specify an existing Firebase web app's ID to associate your App Hosting backend with" ,
1516 )
16- . option ( "-l, --location <location>" , "specify the location of the backend" , "" )
17+ . option ( "-l, --location <location>" , "specify the location of the backend" )
1718 . option (
1819 "-s, --service-account <serviceAccount>" ,
1920 "specify the service account used to run the server" ,
@@ -23,9 +24,15 @@ export const command = new Command("apphosting:backends:create")
2324 . before ( requireInteractive )
2425 . before ( requireTosAcceptance ( APPHOSTING_TOS_ID ) )
2526 . 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+ }
2633 const projectId = needProjectId ( options ) ;
2734 const webAppId = options . app ;
28- const location = options . location ;
35+ const location = options . location as string ;
2936 const serviceAccount = options . serviceAccount ;
3037
3138 await doSetup (
0 commit comments