File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -86,16 +86,16 @@ export const space: CommandDefinition = (program) => {
86
86
. argument ( "<space_name>" , "The name of the Space" )
87
87
. option ( "--id <id>" , "Hub Id" )
88
88
. option ( "--all" , "Disconnects all self-hosted Hubs connected to Space" , false )
89
- . action ( async ( spaceName : string , id : string , all : string ) => {
89
+ . action ( async ( spaceName : string , options : { id : string , all : boolean } ) => {
90
90
const mwClient = getMiddlewareClient ( ) ;
91
91
const managerClient = mwClient . getManagerClient ( spaceName ) ;
92
92
let opts = { } as PostDisconnectPayload ;
93
93
94
- if ( typeof id === "string" ) {
95
- opts = { id } ;
94
+ if ( typeof options . id === "string" ) {
95
+ opts = { id : options . id } ;
96
96
}
97
97
98
- if ( all ) {
98
+ if ( options . all ) {
99
99
opts = { limit : 0 } ;
100
100
}
101
101
Original file line number Diff line number Diff line change @@ -295,9 +295,6 @@ export class CPMConnector extends TypedEmitter<Events> {
295
295
[ CPMMessageCode . NETWORK_INFO , await this . getNetworkInfo ( ) ]
296
296
) ;
297
297
298
-
299
-
300
-
301
298
this . emit ( "connect" ) ;
302
299
303
300
return new Promise ( ( resolve , reject ) => {
@@ -344,7 +341,8 @@ export class CPMConnector extends TypedEmitter<Events> {
344
341
345
342
connection . socket
346
343
. once ( "close" , async ( ) => {
347
- this . logger . warn ( "CLOSE STATUS" , connection . res . statusCode )
344
+ this . logger . warn ( "CLOSE STATUS" , connection . res . statusCode ) ;
345
+
348
346
await this . handleConnectionClose ( connection . res . statusCode || - 1 ) ;
349
347
} ) ;
350
348
} catch ( error : any ) {
You can’t perform that action at this time.
0 commit comments