@replit/river 0.16.1 → 0.16.2

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.
Files changed (37) hide show
  1. package/README.md +25 -11
  2. package/dist/{chunk-7SPCAA6Q.js → chunk-CJGD7CNG.js} +17 -12
  3. package/dist/{chunk-XLJGKNV2.js → chunk-HKVP6XEL.js} +1 -1
  4. package/dist/{chunk-L65XWBX2.js → chunk-HZWCU4ZI.js} +1 -1
  5. package/dist/{chunk-Q6WPGM3K.js → chunk-SKH3JYHN.js} +10 -2
  6. package/dist/{connection-94896f3b.d.ts → connection-2db95d74.d.ts} +1 -1
  7. package/dist/{connection-99346822.d.ts → connection-c97da681.d.ts} +1 -1
  8. package/dist/{index-2e402bb8.d.ts → index-c9e9977f.d.ts} +13 -10
  9. package/dist/{procedures-f0226890.d.ts → procedures-d295c1a5.d.ts} +1 -1
  10. package/dist/router/index.cjs +10 -2
  11. package/dist/router/index.d.cts +8 -4
  12. package/dist/router/index.d.ts +8 -4
  13. package/dist/router/index.js +1 -1
  14. package/dist/transport/impls/uds/client.cjs +17 -12
  15. package/dist/transport/impls/uds/client.d.cts +2 -2
  16. package/dist/transport/impls/uds/client.d.ts +2 -2
  17. package/dist/transport/impls/uds/client.js +2 -2
  18. package/dist/transport/impls/uds/server.cjs +7 -6
  19. package/dist/transport/impls/uds/server.d.cts +2 -2
  20. package/dist/transport/impls/uds/server.d.ts +2 -2
  21. package/dist/transport/impls/uds/server.js +2 -2
  22. package/dist/transport/impls/ws/client.cjs +17 -12
  23. package/dist/transport/impls/ws/client.d.cts +2 -2
  24. package/dist/transport/impls/ws/client.d.ts +2 -2
  25. package/dist/transport/impls/ws/client.js +2 -2
  26. package/dist/transport/impls/ws/server.cjs +7 -6
  27. package/dist/transport/impls/ws/server.d.cts +2 -2
  28. package/dist/transport/impls/ws/server.d.ts +2 -2
  29. package/dist/transport/impls/ws/server.js +2 -2
  30. package/dist/transport/index.cjs +17 -12
  31. package/dist/transport/index.d.cts +1 -1
  32. package/dist/transport/index.d.ts +1 -1
  33. package/dist/transport/index.js +1 -1
  34. package/dist/util/testHelpers.d.cts +2 -2
  35. package/dist/util/testHelpers.d.ts +2 -2
  36. package/dist/util/testHelpers.js +2 -2
  37. package/package.json +1 -1
package/README.md CHANGED
@@ -22,32 +22,46 @@ See [PROTOCOL.md](./PROTOCOL.md) for more information on the protocol.
22
22
 
23
23
  Before proceeding, ensure you have TypeScript 5 installed and configured appropriately:
24
24
 
25
- 1. **Ensure `"moduleResolution": "bundler"` in tsconfig.json**:
25
+ 1. **Ensure your `tsconfig.json` is configured correctly**:
26
26
 
27
- ```json
27
+ You must verify that:
28
+
29
+ - `compilerOptions.moduleResolution` is set to `"bundler"`
30
+ - `compilerOptions.strictFunctionTypes` is set to `true`
31
+ - `compilerOptions.strictNullChecks` is set to `true`
32
+
33
+ or, preferably, that:
34
+
35
+ - `compilerOptions.moduleResolution` is set to `"bundler"`
36
+ - `compilerOptions.strict` is set to `true`
37
+
38
+ Like so:
39
+
40
+ ```jsonc
28
41
  {
29
42
  "compilerOptions": {
30
- "moduleResolution": "bundler"
43
+ "moduleResolution": "bundler",
44
+ "strict": true
31
45
  // Other compiler options...
32
46
  }
33
47
  }
34
48
  ```
35
49
 
36
- If it exists but is set to a different value, modify it to `"bundler"`.
50
+ If these options already exist in your `tsconfig.json` and don't match what is shown above, modify them. River is designed for `"strict": true`, but technically only `strictFunctionTypes` and `strictNullChecks` being set to `true` is required. Failing to set these will cause unresolvable type errors when defining services.
37
51
 
38
52
  2. Install River and Dependencies:
39
53
 
40
- To use River, install the required packages using npm:
54
+ To use River, install the required packages using npm:
41
55
 
42
- ```bash
43
- npm i @replit/river @sinclair/typebox
44
- ```
56
+ ```bash
57
+ npm i @replit/river @sinclair/typebox
58
+ ```
45
59
 
46
60
  3. If you plan on using WebSocket for the underlying transport, also install
47
61
 
48
- ```bash
49
- npm i ws isomorphic-ws
50
- ```
62
+ ```bash
63
+ npm i ws isomorphic-ws
64
+ ```
51
65
 
52
66
  ## Writing services
53
67
 
@@ -19,7 +19,8 @@ import {
19
19
  var ProtocolError = {
20
20
  RetriesExceeded: "conn_retry_exceeded",
21
21
  HandshakeFailed: "handshake_failed",
22
- UseAfterDestroy: "use_after_destroy"
22
+ UseAfterDestroy: "use_after_destroy",
23
+ MessageOrderingViolated: "message_ordering_violated"
23
24
  };
24
25
  var EventDispatcher = class {
25
26
  eventListeners = {};
@@ -331,8 +332,8 @@ var defaultConnectionRetryOptions = {
331
332
  budgetRestoreIntervalMs: 200
332
333
  };
333
334
  var defaultClientTransportOptions = {
334
- connectionRetryOptions: defaultConnectionRetryOptions,
335
- ...defaultTransportOptions
335
+ ...defaultTransportOptions,
336
+ ...defaultConnectionRetryOptions
336
337
  };
337
338
  var Transport = class {
338
339
  /**
@@ -509,11 +510,11 @@ var Transport = class {
509
510
  )}`
510
511
  );
511
512
  } else {
513
+ const errMsg = `received out-of-order msg (got seq: ${msg.seq}, wanted seq: ${session.nextExpectedSeq})`;
512
514
  log?.error(
513
- `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
515
+ `${this.clientId} -- ${errMsg}, marking connection as dead: ${JSON.stringify(msg)}`
514
516
  );
515
- session.close();
516
- this.deleteSession(session);
517
+ this.protocolError(ProtocolError.MessageOrderingViolated, errMsg);
517
518
  }
518
519
  return;
519
520
  }
@@ -619,7 +620,13 @@ var ClientTransport = class extends Transport {
619
620
  */
620
621
  inflightConnectionPromises;
621
622
  retryBudget;
622
- tryReconnecting = true;
623
+ /**
624
+ * A flag indicating whether the transport should automatically reconnect
625
+ * when a connection is dropped.
626
+ * Realistically, this should always be true for clients unless you are writing
627
+ * tests or a special case where you don't want to reconnect.
628
+ */
629
+ reconnectOnConnectionDrop = true;
623
630
  constructor(clientId, providedOptions) {
624
631
  super(clientId, providedOptions);
625
632
  this.options = {
@@ -627,9 +634,7 @@ var ClientTransport = class extends Transport {
627
634
  ...providedOptions
628
635
  };
629
636
  this.inflightConnectionPromises = /* @__PURE__ */ new Map();
630
- this.retryBudget = new LeakyBucketRateLimit(
631
- this.options.connectionRetryOptions
632
- );
637
+ this.retryBudget = new LeakyBucketRateLimit(this.options);
633
638
  }
634
639
  handleConnection(conn, to) {
635
640
  if (this.state !== "open")
@@ -661,7 +666,7 @@ var ClientTransport = class extends Transport {
661
666
  `${this.clientId} -- connection (id: ${conn.debugId}) to ${to} disconnected`
662
667
  );
663
668
  this.inflightConnectionPromises.delete(to);
664
- if (this.tryReconnecting) {
669
+ if (this.reconnectOnConnectionDrop) {
665
670
  void this.connect(to);
666
671
  }
667
672
  });
@@ -767,7 +772,7 @@ var ClientTransport = class extends Transport {
767
772
  } catch (error) {
768
773
  this.inflightConnectionPromises.delete(to);
769
774
  const errStr = coerceErrorString(error);
770
- if (!this.tryReconnecting || !canProceedWithConnection()) {
775
+ if (!this.reconnectOnConnectionDrop || !canProceedWithConnection()) {
771
776
  log?.warn(`${this.clientId} -- connection to ${to} failed (${errStr})`);
772
777
  } else {
773
778
  log?.warn(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Connection
3
- } from "./chunk-7SPCAA6Q.js";
3
+ } from "./chunk-CJGD7CNG.js";
4
4
 
5
5
  // transport/impls/ws/connection.ts
6
6
  var WebSocketConnection = class extends Connection {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Connection
3
- } from "./chunk-7SPCAA6Q.js";
3
+ } from "./chunk-CJGD7CNG.js";
4
4
 
5
5
  // transport/transforms/messageFraming.ts
6
6
  import { Transform } from "node:stream";
@@ -570,8 +570,13 @@ function _createRecursiveProxy(callback, path) {
570
570
  });
571
571
  return proxy;
572
572
  }
573
- var createClient = (transport, serverId, eagerlyConnect = true) => {
574
- if (eagerlyConnect) {
573
+ var defaultClientOptions = {
574
+ connectOnInvoke: true,
575
+ eagerlyConnect: true
576
+ };
577
+ var createClient = (transport, serverId, providedClientOptions = {}) => {
578
+ const options = { ...defaultClientOptions, ...providedClientOptions };
579
+ if (options.eagerlyConnect) {
575
580
  void transport.connect(serverId);
576
581
  }
577
582
  return _createRecursiveProxy(async (opts) => {
@@ -587,6 +592,9 @@ var createClient = (transport, serverId, eagerlyConnect = true) => {
587
592
  input
588
593
  )}`
589
594
  );
595
+ if (options.connectOnInvoke && !transport.connections.has(serverId)) {
596
+ void transport.connect(serverId);
597
+ }
590
598
  if (procType === "rpc") {
591
599
  return handleRpc(
592
600
  transport,
@@ -1,4 +1,4 @@
1
- import { C as Connection } from './index-2e402bb8.js';
1
+ import { C as Connection } from './index-c9e9977f.js';
2
2
  import { Socket } from 'node:net';
3
3
  import stream, { Transform, TransformCallback, TransformOptions } from 'node:stream';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import WebSocket from 'isomorphic-ws';
2
- import { C as Connection } from './index-2e402bb8.js';
2
+ import { C as Connection } from './index-c9e9977f.js';
3
3
 
4
4
  declare class WebSocketConnection extends Connection {
5
5
  ws: WebSocket;
@@ -222,6 +222,7 @@ declare const ProtocolError: {
222
222
  readonly RetriesExceeded: "conn_retry_exceeded";
223
223
  readonly HandshakeFailed: "handshake_failed";
224
224
  readonly UseAfterDestroy: "use_after_destroy";
225
+ readonly MessageOrderingViolated: "message_ordering_violated";
225
226
  };
226
227
  type ProtocolErrorType = (typeof ProtocolError)[keyof typeof ProtocolError];
227
228
  interface EventMap {
@@ -308,14 +309,10 @@ declare class LeakyBucketRateLimit {
308
309
  * @property {'destroyed'} destroyed - The transport is permanently destroyed and cannot be reopened.
309
310
  */
310
311
  type TransportStatus = 'open' | 'closed' | 'destroyed';
311
- type ProvidedTransportOptions = Partial<SessionOptions>;
312
- type TransportOptions = Required<ProvidedTransportOptions>;
313
- type ProvidedClientTransportOptions = {
314
- connectionRetryOptions?: Partial<ConnectionRetryOptions>;
315
- } & ProvidedTransportOptions;
316
- type ClientTransportOptions = SessionOptions & {
317
- connectionRetryOptions: ConnectionRetryOptions;
318
- };
312
+ type TransportOptions = SessionOptions;
313
+ type ProvidedTransportOptions = Partial<TransportOptions>;
314
+ type ProvidedClientTransportOptions = Partial<ClientTransportOptions>;
315
+ type ClientTransportOptions = SessionOptions & ConnectionRetryOptions;
319
316
  /**
320
317
  * Transports manage the lifecycle (creation/deletion) of sessions and connections. Its responsibilities include:
321
318
  *
@@ -469,8 +466,14 @@ declare abstract class ClientTransport<ConnType extends Connection> extends Tran
469
466
  */
470
467
  inflightConnectionPromises: Map<TransportClientId, Promise<ConnType>>;
471
468
  retryBudget: LeakyBucketRateLimit;
472
- tryReconnecting: boolean;
473
- constructor(clientId: TransportClientId, providedOptions?: ProvidedTransportOptions);
469
+ /**
470
+ * A flag indicating whether the transport should automatically reconnect
471
+ * when a connection is dropped.
472
+ * Realistically, this should always be true for clients unless you are writing
473
+ * tests or a special case where you don't want to reconnect.
474
+ */
475
+ reconnectOnConnectionDrop: boolean;
476
+ constructor(clientId: TransportClientId, providedOptions?: ProvidedClientTransportOptions);
474
477
  protected handleConnection(conn: ConnType, to: TransportClientId): void;
475
478
  receiveHandshakeResponseMessage(data: Uint8Array): false | {
476
479
  instanceId: string;
@@ -1,6 +1,6 @@
1
1
  import { TObject, TUnion, TString, TSchema, TNever, TLiteral, Static } from '@sinclair/typebox';
2
2
  import { Pushable } from 'it-pushable';
3
- import { b as TransportClientId, e as Session, C as Connection } from './index-2e402bb8.js';
3
+ import { b as TransportClientId, e as Session, C as Connection } from './index-c9e9977f.js';
4
4
 
5
5
  type TLiteralString = TLiteral<string>;
6
6
  type RiverErrorSchema = TObject<{
@@ -655,8 +655,13 @@ function _createRecursiveProxy(callback, path) {
655
655
  });
656
656
  return proxy;
657
657
  }
658
- var createClient = (transport, serverId, eagerlyConnect = true) => {
659
- if (eagerlyConnect) {
658
+ var defaultClientOptions = {
659
+ connectOnInvoke: true,
660
+ eagerlyConnect: true
661
+ };
662
+ var createClient = (transport, serverId, providedClientOptions = {}) => {
663
+ const options = { ...defaultClientOptions, ...providedClientOptions };
664
+ if (options.eagerlyConnect) {
660
665
  void transport.connect(serverId);
661
666
  }
662
667
  return _createRecursiveProxy(async (opts) => {
@@ -672,6 +677,9 @@ var createClient = (transport, serverId, eagerlyConnect = true) => {
672
677
  input
673
678
  )}`
674
679
  );
680
+ if (options.connectOnInvoke && !transport.connections.has(serverId)) {
681
+ void transport.connect(serverId);
682
+ }
675
683
  if (procType === "rpc") {
676
684
  return handleRpc(
677
685
  transport,
@@ -1,7 +1,7 @@
1
1
  import { TObject, TUnion, Static } from '@sinclair/typebox';
2
- import { e as ProcedureMap, c as RiverUncaughtSchema, U as Unbranded, B as Branded, A as AnyProcedure, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../procedures-f0226890.js';
3
- export { E as Err, O as Ok, a as Procedure, d as ProcedureResult, f as RPCProcedure, m as RiverErrorSchema, j as ServiceContextWithState, k as ServiceContextWithTransportInfo, i as StreamProcedure, h as SubscriptionProcedure, l as UNCAUGHT_ERROR, g as UploadProcedure, V as ValidProcType } from '../procedures-f0226890.js';
4
- import { S as ServerTransport, C as Connection, a as ClientTransport, b as TransportClientId } from '../index-2e402bb8.js';
2
+ import { e as ProcedureMap, c as RiverUncaughtSchema, U as Unbranded, B as Branded, A as AnyProcedure, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../procedures-d295c1a5.js';
3
+ export { E as Err, O as Ok, a as Procedure, d as ProcedureResult, f as RPCProcedure, m as RiverErrorSchema, j as ServiceContextWithState, k as ServiceContextWithTransportInfo, i as StreamProcedure, h as SubscriptionProcedure, l as UNCAUGHT_ERROR, g as UploadProcedure, V as ValidProcType } from '../procedures-d295c1a5.js';
4
+ import { S as ServerTransport, C as Connection, a as ClientTransport, b as TransportClientId } from '../index-c9e9977f.js';
5
5
  import { Pushable } from 'it-pushable';
6
6
  import '../types-3e5768ec.js';
7
7
 
@@ -381,6 +381,10 @@ type ServiceClient<Router extends AnyService> = {
381
381
  type ServerClient<Srv extends Server<ServiceSchemaMap>> = {
382
382
  [SvcName in keyof Srv['services']]: ServiceClient<Srv['services'][SvcName]>;
383
383
  };
384
+ interface ClientOptions {
385
+ connectOnInvoke: boolean;
386
+ eagerlyConnect: boolean;
387
+ }
384
388
  /**
385
389
  * Creates a client for a given server using the provided transport.
386
390
  * Note that the client only needs the type of the server, not the actual
@@ -394,6 +398,6 @@ type ServerClient<Srv extends Server<ServiceSchemaMap>> = {
394
398
  * @param {Transport} transport - The transport to use for communication.
395
399
  * @returns The client for the server.
396
400
  */
397
- declare const createClient: <Srv extends Server<ServiceSchemaMap>>(transport: ClientTransport<Connection>, serverId: TransportClientId, eagerlyConnect?: boolean) => ServerClient<Srv>;
401
+ declare const createClient: <Srv extends Server<ServiceSchemaMap>>(transport: ClientTransport<Connection>, serverId: TransportClientId, providedClientOptions?: Partial<ClientOptions>) => ServerClient<Srv>;
398
402
 
399
403
  export { PayloadType, ProcErrors, ProcHandler, ProcInit, ProcInput, ProcOutput, ProcType, ProcedureMap, Result, RiverError, RiverUncaughtSchema, Server, ServerClient, Service, ServiceConfiguration, ServiceContext, ServiceSchema, createClient, createServer };
@@ -1,7 +1,7 @@
1
1
  import { TObject, TUnion, Static } from '@sinclair/typebox';
2
- import { e as ProcedureMap, c as RiverUncaughtSchema, U as Unbranded, B as Branded, A as AnyProcedure, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../procedures-f0226890.js';
3
- export { E as Err, O as Ok, a as Procedure, d as ProcedureResult, f as RPCProcedure, m as RiverErrorSchema, j as ServiceContextWithState, k as ServiceContextWithTransportInfo, i as StreamProcedure, h as SubscriptionProcedure, l as UNCAUGHT_ERROR, g as UploadProcedure, V as ValidProcType } from '../procedures-f0226890.js';
4
- import { S as ServerTransport, C as Connection, a as ClientTransport, b as TransportClientId } from '../index-2e402bb8.js';
2
+ import { e as ProcedureMap, c as RiverUncaughtSchema, U as Unbranded, B as Branded, A as AnyProcedure, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../procedures-d295c1a5.js';
3
+ export { E as Err, O as Ok, a as Procedure, d as ProcedureResult, f as RPCProcedure, m as RiverErrorSchema, j as ServiceContextWithState, k as ServiceContextWithTransportInfo, i as StreamProcedure, h as SubscriptionProcedure, l as UNCAUGHT_ERROR, g as UploadProcedure, V as ValidProcType } from '../procedures-d295c1a5.js';
4
+ import { S as ServerTransport, C as Connection, a as ClientTransport, b as TransportClientId } from '../index-c9e9977f.js';
5
5
  import { Pushable } from 'it-pushable';
6
6
  import '../types-3e5768ec.js';
7
7
 
@@ -381,6 +381,10 @@ type ServiceClient<Router extends AnyService> = {
381
381
  type ServerClient<Srv extends Server<ServiceSchemaMap>> = {
382
382
  [SvcName in keyof Srv['services']]: ServiceClient<Srv['services'][SvcName]>;
383
383
  };
384
+ interface ClientOptions {
385
+ connectOnInvoke: boolean;
386
+ eagerlyConnect: boolean;
387
+ }
384
388
  /**
385
389
  * Creates a client for a given server using the provided transport.
386
390
  * Note that the client only needs the type of the server, not the actual
@@ -394,6 +398,6 @@ type ServerClient<Srv extends Server<ServiceSchemaMap>> = {
394
398
  * @param {Transport} transport - The transport to use for communication.
395
399
  * @returns The client for the server.
396
400
  */
397
- declare const createClient: <Srv extends Server<ServiceSchemaMap>>(transport: ClientTransport<Connection>, serverId: TransportClientId, eagerlyConnect?: boolean) => ServerClient<Srv>;
401
+ declare const createClient: <Srv extends Server<ServiceSchemaMap>>(transport: ClientTransport<Connection>, serverId: TransportClientId, providedClientOptions?: Partial<ClientOptions>) => ServerClient<Srv>;
398
402
 
399
403
  export { PayloadType, ProcErrors, ProcHandler, ProcInit, ProcInput, ProcOutput, ProcType, ProcedureMap, Result, RiverError, RiverUncaughtSchema, Server, ServerClient, Service, ServiceConfiguration, ServiceContext, ServiceSchema, createClient, createServer };
@@ -7,7 +7,7 @@ import {
7
7
  UNCAUGHT_ERROR,
8
8
  createClient,
9
9
  createServer
10
- } from "../chunk-Q6WPGM3K.js";
10
+ } from "../chunk-SKH3JYHN.js";
11
11
  import "../chunk-GFRAOY75.js";
12
12
  import "../chunk-H4BYJELI.js";
13
13
  export {
@@ -392,7 +392,8 @@ var import_value = require("@sinclair/typebox/value");
392
392
  var ProtocolError = {
393
393
  RetriesExceeded: "conn_retry_exceeded",
394
394
  HandshakeFailed: "handshake_failed",
395
- UseAfterDestroy: "use_after_destroy"
395
+ UseAfterDestroy: "use_after_destroy",
396
+ MessageOrderingViolated: "message_ordering_violated"
396
397
  };
397
398
  var EventDispatcher = class {
398
399
  eventListeners = {};
@@ -570,8 +571,8 @@ var defaultConnectionRetryOptions = {
570
571
  budgetRestoreIntervalMs: 200
571
572
  };
572
573
  var defaultClientTransportOptions = {
573
- connectionRetryOptions: defaultConnectionRetryOptions,
574
- ...defaultTransportOptions
574
+ ...defaultTransportOptions,
575
+ ...defaultConnectionRetryOptions
575
576
  };
576
577
  var Transport = class {
577
578
  /**
@@ -748,11 +749,11 @@ var Transport = class {
748
749
  )}`
749
750
  );
750
751
  } else {
752
+ const errMsg = `received out-of-order msg (got seq: ${msg.seq}, wanted seq: ${session.nextExpectedSeq})`;
751
753
  log?.error(
752
- `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
754
+ `${this.clientId} -- ${errMsg}, marking connection as dead: ${JSON.stringify(msg)}`
753
755
  );
754
- session.close();
755
- this.deleteSession(session);
756
+ this.protocolError(ProtocolError.MessageOrderingViolated, errMsg);
756
757
  }
757
758
  return;
758
759
  }
@@ -858,7 +859,13 @@ var ClientTransport = class extends Transport {
858
859
  */
859
860
  inflightConnectionPromises;
860
861
  retryBudget;
861
- tryReconnecting = true;
862
+ /**
863
+ * A flag indicating whether the transport should automatically reconnect
864
+ * when a connection is dropped.
865
+ * Realistically, this should always be true for clients unless you are writing
866
+ * tests or a special case where you don't want to reconnect.
867
+ */
868
+ reconnectOnConnectionDrop = true;
862
869
  constructor(clientId, providedOptions) {
863
870
  super(clientId, providedOptions);
864
871
  this.options = {
@@ -866,9 +873,7 @@ var ClientTransport = class extends Transport {
866
873
  ...providedOptions
867
874
  };
868
875
  this.inflightConnectionPromises = /* @__PURE__ */ new Map();
869
- this.retryBudget = new LeakyBucketRateLimit(
870
- this.options.connectionRetryOptions
871
- );
876
+ this.retryBudget = new LeakyBucketRateLimit(this.options);
872
877
  }
873
878
  handleConnection(conn, to) {
874
879
  if (this.state !== "open")
@@ -900,7 +905,7 @@ var ClientTransport = class extends Transport {
900
905
  `${this.clientId} -- connection (id: ${conn.debugId}) to ${to} disconnected`
901
906
  );
902
907
  this.inflightConnectionPromises.delete(to);
903
- if (this.tryReconnecting) {
908
+ if (this.reconnectOnConnectionDrop) {
904
909
  void this.connect(to);
905
910
  }
906
911
  });
@@ -1006,7 +1011,7 @@ var ClientTransport = class extends Transport {
1006
1011
  } catch (error) {
1007
1012
  this.inflightConnectionPromises.delete(to);
1008
1013
  const errStr = coerceErrorString(error);
1009
- if (!this.tryReconnecting || !canProceedWithConnection()) {
1014
+ if (!this.reconnectOnConnectionDrop || !canProceedWithConnection()) {
1010
1015
  log?.warn(`${this.clientId} -- connection to ${to} failed (${errStr})`);
1011
1016
  } else {
1012
1017
  log?.warn(
@@ -1,5 +1,5 @@
1
- import { a as ClientTransport, c as ProvidedClientTransportOptions, b as TransportClientId } from '../../../index-2e402bb8.js';
2
- import { U as UdsConnection } from '../../../connection-94896f3b.js';
1
+ import { a as ClientTransport, c as ProvidedClientTransportOptions, b as TransportClientId } from '../../../index-c9e9977f.js';
2
+ import { U as UdsConnection } from '../../../connection-2db95d74.js';
3
3
  import '../../../types-3e5768ec.js';
4
4
  import '@sinclair/typebox';
5
5
  import 'node:net';
@@ -1,5 +1,5 @@
1
- import { a as ClientTransport, c as ProvidedClientTransportOptions, b as TransportClientId } from '../../../index-2e402bb8.js';
2
- import { U as UdsConnection } from '../../../connection-94896f3b.js';
1
+ import { a as ClientTransport, c as ProvidedClientTransportOptions, b as TransportClientId } from '../../../index-c9e9977f.js';
2
+ import { U as UdsConnection } from '../../../connection-2db95d74.js';
3
3
  import '../../../types-3e5768ec.js';
4
4
  import '@sinclair/typebox';
5
5
  import 'node:net';
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  UdsConnection
3
- } from "../../../chunk-L65XWBX2.js";
3
+ } from "../../../chunk-HZWCU4ZI.js";
4
4
  import {
5
5
  ClientTransport
6
- } from "../../../chunk-7SPCAA6Q.js";
6
+ } from "../../../chunk-CJGD7CNG.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -111,7 +111,8 @@ function isAck(controlFlag) {
111
111
  var ProtocolError = {
112
112
  RetriesExceeded: "conn_retry_exceeded",
113
113
  HandshakeFailed: "handshake_failed",
114
- UseAfterDestroy: "use_after_destroy"
114
+ UseAfterDestroy: "use_after_destroy",
115
+ MessageOrderingViolated: "message_ordering_violated"
115
116
  };
116
117
  var EventDispatcher = class {
117
118
  eventListeners = {};
@@ -411,8 +412,8 @@ var defaultConnectionRetryOptions = {
411
412
  budgetRestoreIntervalMs: 200
412
413
  };
413
414
  var defaultClientTransportOptions = {
414
- connectionRetryOptions: defaultConnectionRetryOptions,
415
- ...defaultTransportOptions
415
+ ...defaultTransportOptions,
416
+ ...defaultConnectionRetryOptions
416
417
  };
417
418
  var Transport = class {
418
419
  /**
@@ -589,11 +590,11 @@ var Transport = class {
589
590
  )}`
590
591
  );
591
592
  } else {
593
+ const errMsg = `received out-of-order msg (got seq: ${msg.seq}, wanted seq: ${session.nextExpectedSeq})`;
592
594
  log?.error(
593
- `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
595
+ `${this.clientId} -- ${errMsg}, marking connection as dead: ${JSON.stringify(msg)}`
594
596
  );
595
- session.close();
596
- this.deleteSession(session);
597
+ this.protocolError(ProtocolError.MessageOrderingViolated, errMsg);
597
598
  }
598
599
  return;
599
600
  }
@@ -1,6 +1,6 @@
1
1
  import { Server, Socket } from 'node:net';
2
- import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-2e402bb8.js';
3
- import { U as UdsConnection } from '../../../connection-94896f3b.js';
2
+ import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-c9e9977f.js';
3
+ import { U as UdsConnection } from '../../../connection-2db95d74.js';
4
4
  import '../../../types-3e5768ec.js';
5
5
  import '@sinclair/typebox';
6
6
  import 'node:stream';
@@ -1,6 +1,6 @@
1
1
  import { Server, Socket } from 'node:net';
2
- import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-2e402bb8.js';
3
- import { U as UdsConnection } from '../../../connection-94896f3b.js';
2
+ import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-c9e9977f.js';
3
+ import { U as UdsConnection } from '../../../connection-2db95d74.js';
4
4
  import '../../../types-3e5768ec.js';
5
5
  import '@sinclair/typebox';
6
6
  import 'node:stream';
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  UdsConnection
3
- } from "../../../chunk-L65XWBX2.js";
3
+ } from "../../../chunk-HZWCU4ZI.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../../../chunk-7SPCAA6Q.js";
6
+ } from "../../../chunk-CJGD7CNG.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -103,7 +103,8 @@ var log;
103
103
  var ProtocolError = {
104
104
  RetriesExceeded: "conn_retry_exceeded",
105
105
  HandshakeFailed: "handshake_failed",
106
- UseAfterDestroy: "use_after_destroy"
106
+ UseAfterDestroy: "use_after_destroy",
107
+ MessageOrderingViolated: "message_ordering_violated"
107
108
  };
108
109
  var EventDispatcher = class {
109
110
  eventListeners = {};
@@ -474,8 +475,8 @@ var defaultConnectionRetryOptions = {
474
475
  budgetRestoreIntervalMs: 200
475
476
  };
476
477
  var defaultClientTransportOptions = {
477
- connectionRetryOptions: defaultConnectionRetryOptions,
478
- ...defaultTransportOptions
478
+ ...defaultTransportOptions,
479
+ ...defaultConnectionRetryOptions
479
480
  };
480
481
  var Transport = class {
481
482
  /**
@@ -652,11 +653,11 @@ var Transport = class {
652
653
  )}`
653
654
  );
654
655
  } else {
656
+ const errMsg = `received out-of-order msg (got seq: ${msg.seq}, wanted seq: ${session.nextExpectedSeq})`;
655
657
  log?.error(
656
- `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
658
+ `${this.clientId} -- ${errMsg}, marking connection as dead: ${JSON.stringify(msg)}`
657
659
  );
658
- session.close();
659
- this.deleteSession(session);
660
+ this.protocolError(ProtocolError.MessageOrderingViolated, errMsg);
660
661
  }
661
662
  return;
662
663
  }
@@ -762,7 +763,13 @@ var ClientTransport = class extends Transport {
762
763
  */
763
764
  inflightConnectionPromises;
764
765
  retryBudget;
765
- tryReconnecting = true;
766
+ /**
767
+ * A flag indicating whether the transport should automatically reconnect
768
+ * when a connection is dropped.
769
+ * Realistically, this should always be true for clients unless you are writing
770
+ * tests or a special case where you don't want to reconnect.
771
+ */
772
+ reconnectOnConnectionDrop = true;
766
773
  constructor(clientId, providedOptions) {
767
774
  super(clientId, providedOptions);
768
775
  this.options = {
@@ -770,9 +777,7 @@ var ClientTransport = class extends Transport {
770
777
  ...providedOptions
771
778
  };
772
779
  this.inflightConnectionPromises = /* @__PURE__ */ new Map();
773
- this.retryBudget = new LeakyBucketRateLimit(
774
- this.options.connectionRetryOptions
775
- );
780
+ this.retryBudget = new LeakyBucketRateLimit(this.options);
776
781
  }
777
782
  handleConnection(conn, to) {
778
783
  if (this.state !== "open")
@@ -804,7 +809,7 @@ var ClientTransport = class extends Transport {
804
809
  `${this.clientId} -- connection (id: ${conn.debugId}) to ${to} disconnected`
805
810
  );
806
811
  this.inflightConnectionPromises.delete(to);
807
- if (this.tryReconnecting) {
812
+ if (this.reconnectOnConnectionDrop) {
808
813
  void this.connect(to);
809
814
  }
810
815
  });
@@ -910,7 +915,7 @@ var ClientTransport = class extends Transport {
910
915
  } catch (error) {
911
916
  this.inflightConnectionPromises.delete(to);
912
917
  const errStr = coerceErrorString(error);
913
- if (!this.tryReconnecting || !canProceedWithConnection()) {
918
+ if (!this.reconnectOnConnectionDrop || !canProceedWithConnection()) {
914
919
  log?.warn(`${this.clientId} -- connection to ${to} failed (${errStr})`);
915
920
  } else {
916
921
  log?.warn(
@@ -1,6 +1,6 @@
1
1
  import WebSocket from 'isomorphic-ws';
2
- import { a as ClientTransport, b as TransportClientId, c as ProvidedClientTransportOptions } from '../../../index-2e402bb8.js';
3
- import { W as WebSocketConnection } from '../../../connection-99346822.js';
2
+ import { a as ClientTransport, b as TransportClientId, c as ProvidedClientTransportOptions } from '../../../index-c9e9977f.js';
3
+ import { W as WebSocketConnection } from '../../../connection-c97da681.js';
4
4
  import '../../../types-3e5768ec.js';
5
5
  import '@sinclair/typebox';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import WebSocket from 'isomorphic-ws';
2
- import { a as ClientTransport, b as TransportClientId, c as ProvidedClientTransportOptions } from '../../../index-2e402bb8.js';
3
- import { W as WebSocketConnection } from '../../../connection-99346822.js';
2
+ import { a as ClientTransport, b as TransportClientId, c as ProvidedClientTransportOptions } from '../../../index-c9e9977f.js';
3
+ import { W as WebSocketConnection } from '../../../connection-c97da681.js';
4
4
  import '../../../types-3e5768ec.js';
5
5
  import '@sinclair/typebox';
6
6
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WebSocketConnection
3
- } from "../../../chunk-XLJGKNV2.js";
3
+ } from "../../../chunk-HKVP6XEL.js";
4
4
  import {
5
5
  ClientTransport
6
- } from "../../../chunk-7SPCAA6Q.js";
6
+ } from "../../../chunk-CJGD7CNG.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -111,7 +111,8 @@ var log;
111
111
  var ProtocolError = {
112
112
  RetriesExceeded: "conn_retry_exceeded",
113
113
  HandshakeFailed: "handshake_failed",
114
- UseAfterDestroy: "use_after_destroy"
114
+ UseAfterDestroy: "use_after_destroy",
115
+ MessageOrderingViolated: "message_ordering_violated"
115
116
  };
116
117
  var EventDispatcher = class {
117
118
  eventListeners = {};
@@ -411,8 +412,8 @@ var defaultConnectionRetryOptions = {
411
412
  budgetRestoreIntervalMs: 200
412
413
  };
413
414
  var defaultClientTransportOptions = {
414
- connectionRetryOptions: defaultConnectionRetryOptions,
415
- ...defaultTransportOptions
415
+ ...defaultTransportOptions,
416
+ ...defaultConnectionRetryOptions
416
417
  };
417
418
  var Transport = class {
418
419
  /**
@@ -589,11 +590,11 @@ var Transport = class {
589
590
  )}`
590
591
  );
591
592
  } else {
593
+ const errMsg = `received out-of-order msg (got seq: ${msg.seq}, wanted seq: ${session.nextExpectedSeq})`;
592
594
  log?.error(
593
- `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
595
+ `${this.clientId} -- ${errMsg}, marking connection as dead: ${JSON.stringify(msg)}`
594
596
  );
595
- session.close();
596
- this.deleteSession(session);
597
+ this.protocolError(ProtocolError.MessageOrderingViolated, errMsg);
597
598
  }
598
599
  return;
599
600
  }
@@ -1,7 +1,7 @@
1
- import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-2e402bb8.js';
1
+ import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-c9e9977f.js';
2
2
  import { WebSocketServer } from 'ws';
3
3
  import { WebSocket } from 'isomorphic-ws';
4
- import { W as WebSocketConnection } from '../../../connection-99346822.js';
4
+ import { W as WebSocketConnection } from '../../../connection-c97da681.js';
5
5
  import '../../../types-3e5768ec.js';
6
6
  import '@sinclair/typebox';
7
7
 
@@ -1,7 +1,7 @@
1
- import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-2e402bb8.js';
1
+ import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-c9e9977f.js';
2
2
  import { WebSocketServer } from 'ws';
3
3
  import { WebSocket } from 'isomorphic-ws';
4
- import { W as WebSocketConnection } from '../../../connection-99346822.js';
4
+ import { W as WebSocketConnection } from '../../../connection-c97da681.js';
5
5
  import '../../../types-3e5768ec.js';
6
6
  import '@sinclair/typebox';
7
7
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WebSocketConnection
3
- } from "../../../chunk-XLJGKNV2.js";
3
+ } from "../../../chunk-HKVP6XEL.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../../../chunk-7SPCAA6Q.js";
6
+ } from "../../../chunk-CJGD7CNG.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import "../../../chunk-H4BYJELI.js";
9
9
  import "../../../chunk-GZ7HCLLM.js";
@@ -134,7 +134,8 @@ var log;
134
134
  var ProtocolError = {
135
135
  RetriesExceeded: "conn_retry_exceeded",
136
136
  HandshakeFailed: "handshake_failed",
137
- UseAfterDestroy: "use_after_destroy"
137
+ UseAfterDestroy: "use_after_destroy",
138
+ MessageOrderingViolated: "message_ordering_violated"
138
139
  };
139
140
  var EventDispatcher = class {
140
141
  eventListeners = {};
@@ -505,8 +506,8 @@ var defaultConnectionRetryOptions = {
505
506
  budgetRestoreIntervalMs: 200
506
507
  };
507
508
  var defaultClientTransportOptions = {
508
- connectionRetryOptions: defaultConnectionRetryOptions,
509
- ...defaultTransportOptions
509
+ ...defaultTransportOptions,
510
+ ...defaultConnectionRetryOptions
510
511
  };
511
512
  var Transport = class {
512
513
  /**
@@ -683,11 +684,11 @@ var Transport = class {
683
684
  )}`
684
685
  );
685
686
  } else {
687
+ const errMsg = `received out-of-order msg (got seq: ${msg.seq}, wanted seq: ${session.nextExpectedSeq})`;
686
688
  log?.error(
687
- `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
689
+ `${this.clientId} -- ${errMsg}, marking connection as dead: ${JSON.stringify(msg)}`
688
690
  );
689
- session.close();
690
- this.deleteSession(session);
691
+ this.protocolError(ProtocolError.MessageOrderingViolated, errMsg);
691
692
  }
692
693
  return;
693
694
  }
@@ -793,7 +794,13 @@ var ClientTransport = class extends Transport {
793
794
  */
794
795
  inflightConnectionPromises;
795
796
  retryBudget;
796
- tryReconnecting = true;
797
+ /**
798
+ * A flag indicating whether the transport should automatically reconnect
799
+ * when a connection is dropped.
800
+ * Realistically, this should always be true for clients unless you are writing
801
+ * tests or a special case where you don't want to reconnect.
802
+ */
803
+ reconnectOnConnectionDrop = true;
797
804
  constructor(clientId, providedOptions) {
798
805
  super(clientId, providedOptions);
799
806
  this.options = {
@@ -801,9 +808,7 @@ var ClientTransport = class extends Transport {
801
808
  ...providedOptions
802
809
  };
803
810
  this.inflightConnectionPromises = /* @__PURE__ */ new Map();
804
- this.retryBudget = new LeakyBucketRateLimit(
805
- this.options.connectionRetryOptions
806
- );
811
+ this.retryBudget = new LeakyBucketRateLimit(this.options);
807
812
  }
808
813
  handleConnection(conn, to) {
809
814
  if (this.state !== "open")
@@ -835,7 +840,7 @@ var ClientTransport = class extends Transport {
835
840
  `${this.clientId} -- connection (id: ${conn.debugId}) to ${to} disconnected`
836
841
  );
837
842
  this.inflightConnectionPromises.delete(to);
838
- if (this.tryReconnecting) {
843
+ if (this.reconnectOnConnectionDrop) {
839
844
  void this.connect(to);
840
845
  }
841
846
  });
@@ -941,7 +946,7 @@ var ClientTransport = class extends Transport {
941
946
  } catch (error) {
942
947
  this.inflightConnectionPromises.delete(to);
943
948
  const errStr = coerceErrorString(error);
944
- if (!this.tryReconnecting || !canProceedWithConnection()) {
949
+ if (!this.reconnectOnConnectionDrop || !canProceedWithConnection()) {
945
950
  log?.warn(`${this.clientId} -- connection to ${to} failed (${errStr})`);
946
951
  } else {
947
952
  log?.warn(
@@ -1,3 +1,3 @@
1
- export { a as ClientTransport, c as ClientTransportOptions, C as Connection, m as EventHandler, E as EventMap, l as EventTypes, O as OpaqueTransportMessage, h as OpaqueTransportMessageSchema, n as ProtocolError, o as ProtocolErrorType, S as ServerTransport, e as Session, T as Transport, b as TransportClientId, i as TransportMessage, g as TransportMessageSchema, d as TransportOptions, f as TransportStatus, k as isStreamClose, j as isStreamOpen } from '../index-2e402bb8.js';
1
+ export { a as ClientTransport, c as ClientTransportOptions, C as Connection, m as EventHandler, E as EventMap, l as EventTypes, O as OpaqueTransportMessage, h as OpaqueTransportMessageSchema, n as ProtocolError, o as ProtocolErrorType, S as ServerTransport, e as Session, T as Transport, b as TransportClientId, i as TransportMessage, g as TransportMessageSchema, d as TransportOptions, f as TransportStatus, k as isStreamClose, j as isStreamOpen } from '../index-c9e9977f.js';
2
2
  import '../types-3e5768ec.js';
3
3
  import '@sinclair/typebox';
@@ -1,3 +1,3 @@
1
- export { a as ClientTransport, c as ClientTransportOptions, C as Connection, m as EventHandler, E as EventMap, l as EventTypes, O as OpaqueTransportMessage, h as OpaqueTransportMessageSchema, n as ProtocolError, o as ProtocolErrorType, S as ServerTransport, e as Session, T as Transport, b as TransportClientId, i as TransportMessage, g as TransportMessageSchema, d as TransportOptions, f as TransportStatus, k as isStreamClose, j as isStreamOpen } from '../index-2e402bb8.js';
1
+ export { a as ClientTransport, c as ClientTransportOptions, C as Connection, m as EventHandler, E as EventMap, l as EventTypes, O as OpaqueTransportMessage, h as OpaqueTransportMessageSchema, n as ProtocolError, o as ProtocolErrorType, S as ServerTransport, e as Session, T as Transport, b as TransportClientId, i as TransportMessage, g as TransportMessageSchema, d as TransportOptions, f as TransportStatus, k as isStreamClose, j as isStreamOpen } from '../index-c9e9977f.js';
2
2
  import '../types-3e5768ec.js';
3
3
  import '@sinclair/typebox';
@@ -6,7 +6,7 @@ import {
6
6
  ServerTransport,
7
7
  Session,
8
8
  Transport
9
- } from "../chunk-7SPCAA6Q.js";
9
+ } from "../chunk-CJGD7CNG.js";
10
10
  import {
11
11
  OpaqueTransportMessageSchema,
12
12
  TransportMessageSchema
@@ -1,6 +1,6 @@
1
1
  import { Static } from '@sinclair/typebox';
2
- import { P as PayloadType, R as RiverError, a as Procedure, S as ServiceContext, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../procedures-f0226890.js';
3
- import { P as PartialTransportMessage, T as Transport, C as Connection, O as OpaqueTransportMessage } from '../index-2e402bb8.js';
2
+ import { P as PayloadType, R as RiverError, a as Procedure, S as ServiceContext, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../procedures-d295c1a5.js';
3
+ import { P as PartialTransportMessage, T as Transport, C as Connection, O as OpaqueTransportMessage } from '../index-c9e9977f.js';
4
4
  import * as it_pushable from 'it-pushable';
5
5
  import { C as Codec } from '../types-3e5768ec.js';
6
6
  import WebSocket from 'isomorphic-ws';
@@ -1,6 +1,6 @@
1
1
  import { Static } from '@sinclair/typebox';
2
- import { P as PayloadType, R as RiverError, a as Procedure, S as ServiceContext, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../procedures-f0226890.js';
3
- import { P as PartialTransportMessage, T as Transport, C as Connection, O as OpaqueTransportMessage } from '../index-2e402bb8.js';
2
+ import { P as PayloadType, R as RiverError, a as Procedure, S as ServiceContext, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../procedures-d295c1a5.js';
3
+ import { P as PartialTransportMessage, T as Transport, C as Connection, O as OpaqueTransportMessage } from '../index-c9e9977f.js';
4
4
  import * as it_pushable from 'it-pushable';
5
5
  import { C as Codec } from '../types-3e5768ec.js';
6
6
  import WebSocket from 'isomorphic-ws';
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  UNCAUGHT_ERROR,
3
3
  pushable
4
- } from "../chunk-Q6WPGM3K.js";
4
+ } from "../chunk-SKH3JYHN.js";
5
5
  import "../chunk-RPIDSIQG.js";
6
6
  import {
7
7
  Session
8
- } from "../chunk-7SPCAA6Q.js";
8
+ } from "../chunk-CJGD7CNG.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.16.1",
4
+ "version": "0.16.2",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {