@@ -96,7 +96,10 @@ export default class WebSocketClient implements ProtocolClient {
9696 response = await this . sendRequest ( ws , request ) ;
9797
9898 // Extract value from W3C response
99- const value = ( response as Record < string , unknown > ) . value !== undefined ? ( response as Record < string , unknown > ) . value : response ;
99+ const value =
100+ ( response as Record < string , unknown > ) . value !== undefined
101+ ? ( response as Record < string , unknown > ) . value
102+ : response ;
100103 return new Content (
101104 form . contentType ?? "application/json" ,
102105 this . bufferToStream ( Buffer . from ( JSON . stringify ( value ) ) )
@@ -169,7 +172,10 @@ export default class WebSocketClient implements ProtocolClient {
169172 response = await this . sendRequest ( ws , request ) ;
170173
171174 // Extract output from W3C response
172- const output = ( response as Record < string , unknown > ) . output !== undefined ? ( response as Record < string , unknown > ) . output : response ;
175+ const output =
176+ ( response as Record < string , unknown > ) . output !== undefined
177+ ? ( response as Record < string , unknown > ) . output
178+ : response ;
173179 return new Content (
174180 form . response ?. contentType ?? form . contentType ?? "application/json" ,
175181 this . bufferToStream ( Buffer . from ( JSON . stringify ( output ) ) )
@@ -549,7 +555,9 @@ export default class WebSocketClient implements ProtocolClient {
549555 const subprotocol = this . extractSubprotocol ( form ) ;
550556 const protocols = subprotocol ? [ subprotocol ] : undefined ;
551557
552- debug ( `Creating WebSocket connection to ${ form . href } ${ protocols ? ` with subprotocol ${ subprotocol } ` : "" } ` ) ;
558+ debug (
559+ `Creating WebSocket connection to ${ form . href } ${ protocols ? ` with subprotocol ${ subprotocol } ` : "" } `
560+ ) ;
553561
554562 // Connect to the full href, not just baseUrl
555563 const ws = new WebSocket ( form . href , protocols , wsOptions ) ;
0 commit comments