@@ -26,6 +26,7 @@ import { RawStackInput } from "../../lib/resources/stack/types.js";
2626
2727interface DeployResult {
2828 restartedServices : string [ ] ;
29+ deletedServices : string [ ] ;
2930}
3031
3132type StackRequest =
@@ -117,8 +118,7 @@ This flag is mutually exclusive with --compose-file.`,
117118 ) ;
118119
119120 if ( ! confirmed ) {
120- renderer . addInfo ( "deployment cancelled by user" ) ;
121- await renderer . complete ( < > </ > ) ;
121+ await renderer . error ( "deployment cancelled by user" ) ;
122122 ux . exit ( 1 ) ;
123123 }
124124
@@ -244,7 +244,7 @@ This flag is mutually exclusive with --compose-file.`,
244244 ) ;
245245 const confirmed = await this . confirmDeletion ( servicesToDelete , r ) ;
246246 if ( ! confirmed ) {
247- return { restartedServices : [ ] } ;
247+ return { restartedServices : [ ] , deletedServices : [ ] } ;
248248 }
249249
250250 const declaredStack = await this . deployStack ( stackId , stackDefinition , r ) ;
@@ -254,20 +254,22 @@ This flag is mutually exclusive with --compose-file.`,
254254 r ,
255255 ) ;
256256
257- return { restartedServices } ;
257+ return { restartedServices, deletedServices : servicesToDelete } ;
258258 }
259259
260- protected render ( { restartedServices } : DeployResult ) : ReactNode {
261- if ( restartedServices . length === 0 ) {
262- return (
263- < Success > Deployment successful. No services were restarted.</ Success >
264- ) ;
265- }
266-
260+ protected render ( {
261+ restartedServices,
262+ deletedServices,
263+ } : DeployResult ) : ReactNode {
267264 return (
268265 < Success >
269- Deployment successful. The following services were restarted:{ " " }
270- < Value > { restartedServices . join ( ", " ) } </ Value >
266+ Deployment successful.{ " " }
267+ { restartedServices . length > 0
268+ ? `The following services were restarted: ${ restartedServices . join ( ", " ) } `
269+ : "No services were restarted." } { " " }
270+ { deletedServices . length > 0
271+ ? `The following services were deleted: ${ deletedServices . join ( ", " ) } `
272+ : "No services were deleted." }
271273 </ Success >
272274 ) ;
273275 }
0 commit comments