@@ -19,13 +19,13 @@ import {
1919import { sanitizeStackDefinition } from "../../lib/resources/stack/sanitize.js" ;
2020import { enrichStackDefinition } from "../../lib/resources/stack/enrich.js" ;
2121import { Success } from "../../rendering/react/components/Success.js" ;
22- import { Value } from "../../rendering/react/components/Value.js" ;
2322import { loadStackFromTemplate } from "../../lib/resources/stack/template-loader.js" ;
2423import { parseEnvironmentVariablesFromStr } from "../../lib/util/parser.js" ;
2524import { RawStackInput } from "../../lib/resources/stack/types.js" ;
2625
2726interface DeployResult {
2827 restartedServices : string [ ] ;
28+ deletedServices : string [ ] ;
2929}
3030
3131type StackRequest =
@@ -117,8 +117,7 @@ This flag is mutually exclusive with --compose-file.`,
117117 ) ;
118118
119119 if ( ! confirmed ) {
120- renderer . addInfo ( "deployment cancelled by user" ) ;
121- await renderer . complete ( < > </ > ) ;
120+ await renderer . error ( "deployment cancelled by user" ) ;
122121 ux . exit ( 1 ) ;
123122 }
124123
@@ -244,7 +243,7 @@ This flag is mutually exclusive with --compose-file.`,
244243 ) ;
245244 const confirmed = await this . confirmDeletion ( servicesToDelete , r ) ;
246245 if ( ! confirmed ) {
247- return { restartedServices : [ ] } ;
246+ return { restartedServices : [ ] , deletedServices : [ ] } ;
248247 }
249248
250249 const declaredStack = await this . deployStack ( stackId , stackDefinition , r ) ;
@@ -254,20 +253,22 @@ This flag is mutually exclusive with --compose-file.`,
254253 r ,
255254 ) ;
256255
257- return { restartedServices } ;
256+ return { restartedServices, deletedServices : servicesToDelete } ;
258257 }
259258
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-
259+ protected render ( {
260+ restartedServices,
261+ deletedServices,
262+ } : DeployResult ) : ReactNode {
267263 return (
268264 < Success >
269- Deployment successful. The following services were restarted:{ " " }
270- < Value > { restartedServices . join ( ", " ) } </ Value >
265+ Deployment successful.{ " " }
266+ { restartedServices . length > 0
267+ ? `The following services were restarted: ${ restartedServices . join ( ", " ) } `
268+ : "No services were restarted." } { " " }
269+ { deletedServices . length > 0
270+ ? `The following services were deleted: ${ deletedServices . join ( ", " ) } `
271+ : "No services were deleted." }
271272 </ Success >
272273 ) ;
273274 }
0 commit comments