@replit/river
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -46,9 +46,13 @@ import { Value } from '@sinclair/typebox/value'; | ||
if (parsedMsg === null) { | ||
log?.warn(`${this.clientId} -- received malformed msg: ${msg.toString()}`); | ||
log?.warn(`${this.clientId} -- received malformed msg: ${new TextDecoder().decode(msg)}`); | ||
return; | ||
} | ||
let stringifiedMessage; | ||
if (log) { | ||
stringifiedMessage = JSON.stringify(parsedMsg); | ||
} | ||
if (Value.Check(TransportAckSchema, parsedMsg) && | ||
isAck(parsedMsg.controlFlags)) { | ||
// process ack | ||
log?.info(`${this.clientId} -- received ack: ${msg.toString()}`); | ||
log?.info(`${this.clientId} -- received ack: ${stringifiedMessage}`); | ||
if (this.sendBuffer.has(parsedMsg.payload.ack)) { | ||
@@ -60,3 +64,3 @@ this.sendBuffer.delete(parsedMsg.payload.ack); | ||
// regular river message | ||
log?.info(`${this.clientId} -- received msg: ${msg.toString()}`); | ||
log?.info(`${this.clientId} -- received msg: ${stringifiedMessage}`); | ||
// ignore if not for us | ||
@@ -76,3 +80,3 @@ if (parsedMsg.to !== this.clientId && parsedMsg.to !== 'broadcast') { | ||
else { | ||
log?.warn(`${this.clientId} -- received invalid transport msg: ${msg.toString()}`); | ||
log?.warn(`${this.clientId} -- received invalid transport msg: ${stringifiedMessage}`); | ||
} | ||
@@ -79,0 +83,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
203997
4445