@@ -184,6 +184,10 @@ enum Commands {
184184 /// Create stream on read with basin defaults if it doesn't exist.
185185 #[ arg( long) ]
186186 create_stream_on_read : Option < bool > ,
187+
188+ /// Delete-on-empty configuration for the default stream config.
189+ #[ arg( long) ]
190+ delete_on_empty : Option < DeleteOnEmpty > ,
187191 } ,
188192
189193 /// Issue an access token.
@@ -649,6 +653,7 @@ fn build_basin_reconfig(
649653 timestamping_uncapped : Option < & bool > ,
650654 create_stream_on_append : Option < & bool > ,
651655 create_stream_on_read : Option < & bool > ,
656+ delete_on_empty : Option < & DeleteOnEmpty > ,
652657) -> ( Option < StreamConfig > , Vec < String > ) {
653658 let mut mask = Vec :: new ( ) ;
654659 let has_stream_args = storage_class. is_some ( )
@@ -670,7 +675,7 @@ fn build_basin_reconfig(
670675 storage_class : storage_class. cloned ( ) ,
671676 retention_policy : retention_policy. cloned ( ) ,
672677 timestamping,
673- delete_on_empty : None ,
678+ delete_on_empty : delete_on_empty . cloned ( ) ,
674679 } )
675680 } else {
676681 None
@@ -688,6 +693,9 @@ fn build_basin_reconfig(
688693 if timestamping_uncapped. is_some ( ) {
689694 mask. push ( "default_stream_config.timestamping.uncapped" . to_owned ( ) ) ;
690695 }
696+ if delete_on_empty. is_some ( ) {
697+ mask. push ( "default_stream_config.delete_on_empty" . to_owned ( ) ) ;
698+ }
691699 if create_stream_on_append. is_some ( ) {
692700 mask. push ( "create_stream_on_append" . to_owned ( ) ) ;
693701 }
@@ -1006,6 +1014,7 @@ async fn run() -> Result<(), S2CliError> {
10061014 timestamping_uncapped,
10071015 create_stream_on_append,
10081016 create_stream_on_read,
1017+ delete_on_empty,
10091018 } => {
10101019 let cfg = config:: load_config ( & config_path) ?;
10111020 let client_config = client_config ( cfg. access_token ) ?;
@@ -1018,6 +1027,7 @@ async fn run() -> Result<(), S2CliError> {
10181027 timestamping_uncapped. as_ref ( ) ,
10191028 create_stream_on_append. as_ref ( ) ,
10201029 create_stream_on_read. as_ref ( ) ,
1030+ delete_on_empty. as_ref ( ) ,
10211031 ) ;
10221032
10231033 let basin_config = BasinConfig {
0 commit comments