@@ -6,24 +6,24 @@ import * as gcp from "../gcp/frameworks";
66import { promptOnce } from "../prompt" ;
77import * as utils from "../utils" ;
88
9- export const command = new Command ( "stacks :delete" )
10- . description ( "Delete a stack from a Firebase project" )
9+ export const command = new Command ( "backends :delete" )
10+ . description ( "Delete a backend from a Firebase project" )
1111 . option ( "-l, --location <location>" , "App Backend location" , "us-central1" )
12- . option ( "-s, --stackId <stackId >" , "Stack Id" , "" )
12+ . option ( "-s, --backendId <backendId >" , "Backend Id" , "" )
1313 . withForce ( )
1414 . action ( async ( options : Options ) => {
1515 const projectId = needProjectId ( options ) ;
1616 const location = options . location as string ;
17- const stackId = options . stackId as string ;
18- if ( ! stackId ) {
19- throw new FirebaseError ( "Stack id can't be empty." ) ;
17+ const backendId = options . backendId as string ;
18+ if ( ! backendId ) {
19+ throw new FirebaseError ( "Backend id can't be empty." ) ;
2020 }
2121 const confirmDeletion = await promptOnce (
2222 {
2323 type : "confirm" ,
2424 name : "force" ,
2525 default : false ,
26- message : "You are about to delete the Stack with id: " + stackId + "\n Are you sure?" ,
26+ message : "You are about to delete the backend with id: " + backendId + "\n Are you sure?" ,
2727 } ,
2828 options
2929 ) ;
@@ -32,11 +32,11 @@ export const command = new Command("stacks:delete")
3232 }
3333
3434 try {
35- await gcp . deleteStack ( projectId , location , stackId ) ;
36- utils . logSuccess ( `Successfully deleted the stack : ${ stackId } ` ) ;
35+ await gcp . deleteBackend ( projectId , location , backendId ) ;
36+ utils . logSuccess ( `Successfully deleted the backend : ${ backendId } ` ) ;
3737 } catch ( err : any ) {
3838 throw new FirebaseError (
39- `Failed to delete stack : ${ stackId } . Please check the parameters you have provided.` ,
39+ `Failed to delete backend : ${ backendId } . Please check the parameters you have provided.` ,
4040 { original : err }
4141 ) ;
4242 }
0 commit comments