@@ -212,7 +212,7 @@ export class Toolkit extends CloudAssemblySourceBuilder {
212212 /**
213213 * Bootstrap Action
214214 */
215- public async bootstrap ( environments : BootstrapEnvironments , options : BootstrapOptions ) : Promise < BootstrapResult > {
215+ public async bootstrap ( environments : BootstrapEnvironments , options : BootstrapOptions = { } ) : Promise < BootstrapResult > {
216216 const startTime = Date . now ( ) ;
217217 const results : EnvironmentBootstrapResult [ ] = [ ] ;
218218
@@ -323,7 +323,7 @@ export class Toolkit extends CloudAssemblySourceBuilder {
323323 /**
324324 * Diff Action
325325 */
326- public async diff ( cx : ICloudAssemblySource , options : DiffOptions ) : Promise < { [ name : string ] : TemplateDiff } > {
326+ public async diff ( cx : ICloudAssemblySource , options : DiffOptions = { } ) : Promise < { [ name : string ] : TemplateDiff } > {
327327 const ioHelper = asIoHelper ( this . ioHost , 'diff' ) ;
328328 const selectStacks = options . stacks ?? ALL_STACKS ;
329329 const synthSpan = await ioHelper . span ( SPAN . SYNTH_ASSEMBLY ) . begin ( { stacks : selectStacks } ) ;
@@ -748,7 +748,7 @@ export class Toolkit extends CloudAssemblySourceBuilder {
748748 *
749749 * This function returns immediately, starting a watcher in the background.
750750 */
751- public async watch ( cx : ICloudAssemblySource , options : WatchOptions ) : Promise < IWatcher > {
751+ public async watch ( cx : ICloudAssemblySource , options : WatchOptions = { } ) : Promise < IWatcher > {
752752 const ioHelper = asIoHelper ( this . ioHost , 'watch' ) ;
753753 await using assembly = await assemblyFromSource ( ioHelper , cx , false ) ;
754754 const rootDir = options . watchDir ?? process . cwd ( ) ;
@@ -892,7 +892,7 @@ export class Toolkit extends CloudAssemblySourceBuilder {
892892 *
893893 * Rolls back the selected stacks.
894894 */
895- public async rollback ( cx : ICloudAssemblySource , options : RollbackOptions ) : Promise < RollbackResult > {
895+ public async rollback ( cx : ICloudAssemblySource , options : RollbackOptions = { } ) : Promise < RollbackResult > {
896896 const ioHelper = asIoHelper ( this . ioHost , 'rollback' ) ;
897897 await using assembly = await assemblyFromSource ( ioHelper , cx ) ;
898898 return await this . _rollback ( assembly , 'rollback' , options ) ;
@@ -902,9 +902,10 @@ export class Toolkit extends CloudAssemblySourceBuilder {
902902 * Helper to allow rollback being called as part of the deploy or watch action.
903903 */
904904 private async _rollback ( assembly : StackAssembly , action : 'rollback' | 'deploy' | 'watch' , options : RollbackOptions ) : Promise < RollbackResult > {
905+ const selectStacks = options . stacks ?? ALL_STACKS ;
905906 const ioHelper = asIoHelper ( this . ioHost , action ) ;
906- const synthSpan = await ioHelper . span ( SPAN . SYNTH_ASSEMBLY ) . begin ( { stacks : options . stacks } ) ;
907- const stacks = await assembly . selectStacksV2 ( options . stacks ) ;
907+ const synthSpan = await ioHelper . span ( SPAN . SYNTH_ASSEMBLY ) . begin ( { stacks : selectStacks } ) ;
908+ const stacks = await assembly . selectStacksV2 ( selectStacks ) ;
908909 await this . validateStacksMetadata ( stacks , ioHelper ) ;
909910 await synthSpan . end ( ) ;
910911
@@ -1034,7 +1035,7 @@ export class Toolkit extends CloudAssemblySourceBuilder {
10341035 *
10351036 * Destroys the selected Stacks.
10361037 */
1037- public async destroy ( cx : ICloudAssemblySource , options : DestroyOptions ) : Promise < DestroyResult > {
1038+ public async destroy ( cx : ICloudAssemblySource , options : DestroyOptions = { } ) : Promise < DestroyResult > {
10381039 const ioHelper = asIoHelper ( this . ioHost , 'destroy' ) ;
10391040 await using assembly = await assemblyFromSource ( ioHelper , cx ) ;
10401041 return await this . _destroy ( assembly , 'destroy' , options ) ;
@@ -1044,10 +1045,11 @@ export class Toolkit extends CloudAssemblySourceBuilder {
10441045 * Helper to allow destroy being called as part of the deploy action.
10451046 */
10461047 private async _destroy ( assembly : StackAssembly , action : 'deploy' | 'destroy' , options : DestroyOptions ) : Promise < DestroyResult > {
1048+ const selectStacks = options . stacks ?? ALL_STACKS ;
10471049 const ioHelper = asIoHelper ( this . ioHost , action ) ;
1048- const synthSpan = await ioHelper . span ( SPAN . SYNTH_ASSEMBLY ) . begin ( { stacks : options . stacks } ) ;
1050+ const synthSpan = await ioHelper . span ( SPAN . SYNTH_ASSEMBLY ) . begin ( { stacks : selectStacks } ) ;
10491051 // The stacks will have been ordered for deployment, so reverse them for deletion.
1050- const stacks = ( await assembly . selectStacksV2 ( options . stacks ) ) . reversed ( ) ;
1052+ const stacks = ( await assembly . selectStacksV2 ( selectStacks ) ) . reversed ( ) ;
10511053 await synthSpan . end ( ) ;
10521054
10531055 const ret : DestroyResult = {
0 commit comments