@replit/river 0.205.2 → 0.207.1

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 (46) hide show
  1. package/dist/{chunk-FCN2JPOE.js → chunk-7LMZNSVC.js} +2 -2
  2. package/dist/{chunk-BYA34LH3.js → chunk-BCCZA7SX.js} +14 -27
  3. package/dist/chunk-BCCZA7SX.js.map +1 -0
  4. package/dist/{chunk-W337YQLT.js → chunk-CRD3HDVN.js} +3 -3
  5. package/dist/{chunk-TP4OJAKI.js → chunk-I27WBSMZ.js} +3 -3
  6. package/dist/{chunk-FTOB2HQN.js → chunk-QMAVXV4Z.js} +8 -3
  7. package/dist/chunk-QMAVXV4Z.js.map +1 -0
  8. package/dist/{connection-8ed39cb5.d.ts → connection-933c87b2.d.ts} +2 -2
  9. package/dist/logging/index.d.cts +1 -1
  10. package/dist/logging/index.d.ts +1 -1
  11. package/dist/{message-865bba35.d.ts → message-ffacb98a.d.ts} +1 -1
  12. package/dist/router/index.cjs +15 -29
  13. package/dist/router/index.cjs.map +1 -1
  14. package/dist/router/index.d.cts +5 -8
  15. package/dist/router/index.d.ts +5 -8
  16. package/dist/router/index.js +2 -4
  17. package/dist/{services-036dcc97.d.ts → services-4cd29829.d.ts} +731 -16
  18. package/dist/testUtil/index.cjs +7 -2
  19. package/dist/testUtil/index.cjs.map +1 -1
  20. package/dist/testUtil/index.d.cts +3 -5
  21. package/dist/testUtil/index.d.ts +3 -5
  22. package/dist/testUtil/index.js +4 -4
  23. package/dist/transport/impls/ws/client.cjs +7 -2
  24. package/dist/transport/impls/ws/client.cjs.map +1 -1
  25. package/dist/transport/impls/ws/client.d.cts +3 -4
  26. package/dist/transport/impls/ws/client.d.ts +3 -4
  27. package/dist/transport/impls/ws/client.js +4 -4
  28. package/dist/transport/impls/ws/server.cjs +7 -2
  29. package/dist/transport/impls/ws/server.cjs.map +1 -1
  30. package/dist/transport/impls/ws/server.d.cts +4 -4
  31. package/dist/transport/impls/ws/server.d.ts +4 -4
  32. package/dist/transport/impls/ws/server.js +4 -4
  33. package/dist/transport/index.cjs +7 -2
  34. package/dist/transport/index.cjs.map +1 -1
  35. package/dist/transport/index.d.cts +72 -5
  36. package/dist/transport/index.d.ts +72 -5
  37. package/dist/transport/index.js +4 -4
  38. package/package.json +1 -1
  39. package/dist/chunk-BYA34LH3.js.map +0 -1
  40. package/dist/chunk-FTOB2HQN.js.map +0 -1
  41. package/dist/client-8ab60722.d.ts +0 -54
  42. package/dist/context-2c4bb66b.d.ts +0 -670
  43. package/dist/server-dc261419.d.ts +0 -70
  44. /package/dist/{chunk-FCN2JPOE.js.map → chunk-7LMZNSVC.js.map} +0 -0
  45. /package/dist/{chunk-W337YQLT.js.map → chunk-CRD3HDVN.js.map} +0 -0
  46. /package/dist/{chunk-TP4OJAKI.js.map → chunk-I27WBSMZ.js.map} +0 -0
@@ -1,9 +1,7 @@
1
- import { b as ProvidedClientTransportOptions, c as ProvidedServerTransportOptions, n as ClientHandshakeOptions, C as Connection, r as ServerHandshakeOptions, T as Transport, A as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, B as SessionBoundSendFn } from '../context-2c4bb66b.js';
2
- import { C as ClientTransport } from '../client-8ab60722.js';
3
- import { S as ServerTransport } from '../server-dc261419.js';
4
- import { c as TransportClientId, f as PartialTransportMessage, b as OpaqueTransportMessage } from '../message-865bba35.js';
1
+ import { P as ProvidedClientTransportOptions, a as ProvidedServerTransportOptions, a4 as ClientHandshakeOptions, C as ClientTransport, b as Connection, S as ServerHandshakeOptions, M as BaseErrorSchemaType, B as Readable, a5 as ReadableIterator, a6 as ReadableResult, a7 as Transport, a8 as SessionOptions, a9 as ClientTransportOptions, aa as SessionNoConnection, ab as SessionBoundSendFn } from '../services-4cd29829.js';
2
+ import { ServerTransport } from '../transport/index.cjs';
3
+ import { T as TransportClientId, b as PartialTransportMessage, O as OpaqueTransportMessage } from '../message-ffacb98a.js';
5
4
  import { Static } from '@sinclair/typebox';
6
- import { E as BaseErrorSchemaType, u as Readable, X as ReadableIterator, Y as ReadableResult } from '../services-036dcc97.js';
7
5
  import NodeWs from 'ws';
8
6
  import http from 'node:http';
9
7
  import { W as WsLike } from '../wslike-e0b32dd5.js';
@@ -1,9 +1,7 @@
1
- import { b as ProvidedClientTransportOptions, c as ProvidedServerTransportOptions, n as ClientHandshakeOptions, C as Connection, r as ServerHandshakeOptions, T as Transport, A as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, B as SessionBoundSendFn } from '../context-2c4bb66b.js';
2
- import { C as ClientTransport } from '../client-8ab60722.js';
3
- import { S as ServerTransport } from '../server-dc261419.js';
4
- import { c as TransportClientId, f as PartialTransportMessage, b as OpaqueTransportMessage } from '../message-865bba35.js';
1
+ import { P as ProvidedClientTransportOptions, a as ProvidedServerTransportOptions, a4 as ClientHandshakeOptions, C as ClientTransport, b as Connection, S as ServerHandshakeOptions, M as BaseErrorSchemaType, B as Readable, a5 as ReadableIterator, a6 as ReadableResult, a7 as Transport, a8 as SessionOptions, a9 as ClientTransportOptions, aa as SessionNoConnection, ab as SessionBoundSendFn } from '../services-4cd29829.js';
2
+ import { ServerTransport } from '../transport/index.js';
3
+ import { T as TransportClientId, b as PartialTransportMessage, O as OpaqueTransportMessage } from '../message-ffacb98a.js';
5
4
  import { Static } from '@sinclair/typebox';
6
- import { E as BaseErrorSchemaType, u as Readable, X as ReadableIterator, Y as ReadableResult } from '../services-036dcc97.js';
7
5
  import NodeWs from 'ws';
8
6
  import http from 'node:http';
9
7
  import { W as WsLike } from '../wslike-e0b32dd5.js';
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  ClientTransport
3
- } from "../chunk-W337YQLT.js";
3
+ } from "../chunk-CRD3HDVN.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../chunk-TP4OJAKI.js";
6
+ } from "../chunk-I27WBSMZ.js";
7
7
  import {
8
8
  Connection,
9
9
  SessionStateGraph,
10
10
  defaultClientTransportOptions,
11
11
  defaultTransportOptions
12
- } from "../chunk-FTOB2HQN.js";
12
+ } from "../chunk-QMAVXV4Z.js";
13
13
  import {
14
14
  currentProtocolVersion,
15
15
  getTracer
16
- } from "../chunk-BYA34LH3.js";
16
+ } from "../chunk-BCCZA7SX.js";
17
17
  import "../chunk-CC7RN7GI.js";
18
18
  import "../chunk-AJGIY2UB.js";
19
19
 
@@ -547,6 +547,9 @@ var IdentifiedSession = class extends CommonSession {
547
547
  return metadata;
548
548
  }
549
549
  constructMsg(partialMsg) {
550
+ if (this._isConsumed) {
551
+ throw new Error(ERR_CONSUMED);
552
+ }
550
553
  const msg = {
551
554
  ...partialMsg,
552
555
  id: generateId(),
@@ -676,7 +679,7 @@ function coerceErrorString(err) {
676
679
  }
677
680
 
678
681
  // package.json
679
- var version = "0.205.2";
682
+ var version = "0.207.1";
680
683
 
681
684
  // tracing/index.ts
682
685
  function getPropagationContext(ctx) {
@@ -967,7 +970,9 @@ var SessionConnected = class extends IdentifiedSession {
967
970
  transportMessage: parsedMsg
968
971
  });
969
972
  if (!this.isActivelyHeartbeating) {
970
- this.sendHeartbeat();
973
+ void Promise.resolve().then(() => {
974
+ this.sendHeartbeat();
975
+ });
971
976
  }
972
977
  };
973
978
  _handleStateExit() {