@replit/river 0.15.4 → 0.15.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Connection
3
- } from "./chunk-5TYDJKOP.js";
3
+ } from "./chunk-EZQFVTBL.js";
4
4
 
5
5
  // transport/transforms/messageFraming.ts
6
6
  import { Transform } from "node:stream";
@@ -520,6 +520,8 @@ var Transport = class {
520
520
  session.updateBookkeeping(msg.ack, msg.seq);
521
521
  if (!isAck(msg.controlFlags)) {
522
522
  this.eventDispatcher.dispatchEvent("message", msg);
523
+ } else {
524
+ log?.debug(`${this.clientId} -- discarding msg ${msg.id} (ack bit set)`);
523
525
  }
524
526
  }
525
527
  /**
@@ -736,7 +738,7 @@ var ClientTransport = class extends Transport {
736
738
  sleep = new Promise((resolve) => setTimeout(resolve, backoffMs));
737
739
  }
738
740
  log?.info(
739
- `${this.clientId} -- attempting connection to ${to} (${backoffMs} backoff)`
741
+ `${this.clientId} -- attempting connection to ${to} (${backoffMs}ms backoff)`
740
742
  );
741
743
  this.retryBudget.consumeBudget(to);
742
744
  reconnectPromise = sleep.then(() => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Connection
3
- } from "./chunk-5TYDJKOP.js";
3
+ } from "./chunk-EZQFVTBL.js";
4
4
 
5
5
  // transport/impls/ws/connection.ts
6
6
  var WebSocketConnection = class extends Connection {
@@ -759,6 +759,8 @@ var Transport = class {
759
759
  session.updateBookkeeping(msg.ack, msg.seq);
760
760
  if (!isAck(msg.controlFlags)) {
761
761
  this.eventDispatcher.dispatchEvent("message", msg);
762
+ } else {
763
+ log?.debug(`${this.clientId} -- discarding msg ${msg.id} (ack bit set)`);
762
764
  }
763
765
  }
764
766
  /**
@@ -975,7 +977,7 @@ var ClientTransport = class extends Transport {
975
977
  sleep = new Promise((resolve) => setTimeout(resolve, backoffMs));
976
978
  }
977
979
  log?.info(
978
- `${this.clientId} -- attempting connection to ${to} (${backoffMs} backoff)`
980
+ `${this.clientId} -- attempting connection to ${to} (${backoffMs}ms backoff)`
979
981
  );
980
982
  this.retryBudget.consumeBudget(to);
981
983
  reconnectPromise = sleep.then(() => {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  UdsConnection
3
- } from "../../../chunk-QF3XH65C.js";
3
+ } from "../../../chunk-EVH5D43D.js";
4
4
  import {
5
5
  ClientTransport
6
- } from "../../../chunk-5TYDJKOP.js";
6
+ } from "../../../chunk-EZQFVTBL.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -599,6 +599,8 @@ var Transport = class {
599
599
  session.updateBookkeeping(msg.ack, msg.seq);
600
600
  if (!isAck(msg.controlFlags)) {
601
601
  this.eventDispatcher.dispatchEvent("message", msg);
602
+ } else {
603
+ log?.debug(`${this.clientId} -- discarding msg ${msg.id} (ack bit set)`);
602
604
  }
603
605
  }
604
606
  /**
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  UdsConnection
3
- } from "../../../chunk-QF3XH65C.js";
3
+ } from "../../../chunk-EVH5D43D.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../../../chunk-5TYDJKOP.js";
6
+ } from "../../../chunk-EZQFVTBL.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -663,6 +663,8 @@ var Transport = class {
663
663
  session.updateBookkeeping(msg.ack, msg.seq);
664
664
  if (!isAck(msg.controlFlags)) {
665
665
  this.eventDispatcher.dispatchEvent("message", msg);
666
+ } else {
667
+ log?.debug(`${this.clientId} -- discarding msg ${msg.id} (ack bit set)`);
666
668
  }
667
669
  }
668
670
  /**
@@ -879,7 +881,7 @@ var ClientTransport = class extends Transport {
879
881
  sleep = new Promise((resolve) => setTimeout(resolve, backoffMs));
880
882
  }
881
883
  log?.info(
882
- `${this.clientId} -- attempting connection to ${to} (${backoffMs} backoff)`
884
+ `${this.clientId} -- attempting connection to ${to} (${backoffMs}ms backoff)`
883
885
  );
884
886
  this.retryBudget.consumeBudget(to);
885
887
  reconnectPromise = sleep.then(() => {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WebSocketConnection
3
- } from "../../../chunk-DEYIG5LG.js";
3
+ } from "../../../chunk-PTRHVS6L.js";
4
4
  import {
5
5
  ClientTransport
6
- } from "../../../chunk-5TYDJKOP.js";
6
+ } from "../../../chunk-EZQFVTBL.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -599,6 +599,8 @@ var Transport = class {
599
599
  session.updateBookkeeping(msg.ack, msg.seq);
600
600
  if (!isAck(msg.controlFlags)) {
601
601
  this.eventDispatcher.dispatchEvent("message", msg);
602
+ } else {
603
+ log?.debug(`${this.clientId} -- discarding msg ${msg.id} (ack bit set)`);
602
604
  }
603
605
  }
604
606
  /**
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WebSocketConnection
3
- } from "../../../chunk-DEYIG5LG.js";
3
+ } from "../../../chunk-PTRHVS6L.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../../../chunk-5TYDJKOP.js";
6
+ } from "../../../chunk-EZQFVTBL.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import "../../../chunk-H4BYJELI.js";
9
9
  import "../../../chunk-GZ7HCLLM.js";
@@ -694,6 +694,8 @@ var Transport = class {
694
694
  session.updateBookkeeping(msg.ack, msg.seq);
695
695
  if (!isAck(msg.controlFlags)) {
696
696
  this.eventDispatcher.dispatchEvent("message", msg);
697
+ } else {
698
+ log?.debug(`${this.clientId} -- discarding msg ${msg.id} (ack bit set)`);
697
699
  }
698
700
  }
699
701
  /**
@@ -910,7 +912,7 @@ var ClientTransport = class extends Transport {
910
912
  sleep = new Promise((resolve) => setTimeout(resolve, backoffMs));
911
913
  }
912
914
  log?.info(
913
- `${this.clientId} -- attempting connection to ${to} (${backoffMs} backoff)`
915
+ `${this.clientId} -- attempting connection to ${to} (${backoffMs}ms backoff)`
914
916
  );
915
917
  this.retryBudget.consumeBudget(to);
916
918
  reconnectPromise = sleep.then(() => {
@@ -6,7 +6,7 @@ import {
6
6
  ServerTransport,
7
7
  Session,
8
8
  Transport
9
- } from "../chunk-5TYDJKOP.js";
9
+ } from "../chunk-EZQFVTBL.js";
10
10
  import {
11
11
  OpaqueTransportMessageSchema,
12
12
  TransportMessageSchema
@@ -5,7 +5,7 @@ import {
5
5
  import "../chunk-RPIDSIQG.js";
6
6
  import {
7
7
  Session
8
- } from "../chunk-5TYDJKOP.js";
8
+ } from "../chunk-EZQFVTBL.js";
9
9
  import {
10
10
  coerceErrorString
11
11
  } from "../chunk-GFRAOY75.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@replit/river",
3
3
  "description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!",
4
- "version": "0.15.4",
4
+ "version": "0.15.5",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {