@replit/river 0.216.1 → 0.216.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 (48) hide show
  1. package/dist/{chunk-62BM2WOT.js → chunk-CH3OPDPY.js} +10 -3
  2. package/dist/chunk-CH3OPDPY.js.map +1 -0
  3. package/dist/{chunk-C4EPHIKQ.js → chunk-QFJGMDOX.js} +2 -2
  4. package/dist/{chunk-C4EPHIKQ.js.map → chunk-QFJGMDOX.js.map} +1 -1
  5. package/dist/{client-BNc5Pj_4.d.ts → client-CKThx0WA.d.ts} +1 -1
  6. package/dist/{client-BZUvFL6B.d.cts → client-CNO_SC1d.d.cts} +1 -1
  7. package/dist/codec/index.js +2 -2
  8. package/dist/{connection-xxgJHs2o.d.cts → connection-DkWD1Ptu.d.cts} +1 -1
  9. package/dist/{connection-ou9w2dSY.d.ts → connection-Dngmtp2E.d.ts} +1 -1
  10. package/dist/protobuf/index.cjs +3 -3
  11. package/dist/protobuf/index.cjs.map +1 -1
  12. package/dist/protobuf/index.d.cts +6 -6
  13. package/dist/protobuf/index.d.ts +6 -6
  14. package/dist/protobuf/index.js +3 -3
  15. package/dist/protobuf/index.js.map +1 -1
  16. package/dist/router/index.cjs +1 -1
  17. package/dist/router/index.cjs.map +1 -1
  18. package/dist/router/index.d.cts +7 -7
  19. package/dist/router/index.d.ts +7 -7
  20. package/dist/router/index.js +1 -1
  21. package/dist/{server-JdnoVO11.d.cts → server-BrCIPno6.d.cts} +1 -1
  22. package/dist/{server-BPu7Td80.d.ts → server-CSkUpJcH.d.ts} +1 -1
  23. package/dist/{services-DpT2yNtt.d.ts → services-BlGhziCQ.d.ts} +2 -2
  24. package/dist/{services-CjigASqe.d.cts → services-DoCToSxW.d.cts} +2 -2
  25. package/dist/testUtil/index.cjs +9 -2
  26. package/dist/testUtil/index.cjs.map +1 -1
  27. package/dist/testUtil/index.d.cts +4 -4
  28. package/dist/testUtil/index.d.ts +4 -4
  29. package/dist/testUtil/index.js +2 -2
  30. package/dist/transport/impls/ws/client.cjs +7 -1
  31. package/dist/transport/impls/ws/client.cjs.map +1 -1
  32. package/dist/transport/impls/ws/client.d.cts +3 -3
  33. package/dist/transport/impls/ws/client.d.ts +3 -3
  34. package/dist/transport/impls/ws/client.js +2 -2
  35. package/dist/transport/impls/ws/server.cjs +9 -2
  36. package/dist/transport/impls/ws/server.cjs.map +1 -1
  37. package/dist/transport/impls/ws/server.d.cts +3 -3
  38. package/dist/transport/impls/ws/server.d.ts +3 -3
  39. package/dist/transport/impls/ws/server.js +2 -2
  40. package/dist/transport/index.cjs +9 -2
  41. package/dist/transport/index.cjs.map +1 -1
  42. package/dist/transport/index.d.cts +4 -4
  43. package/dist/transport/index.d.ts +4 -4
  44. package/dist/transport/index.js +2 -2
  45. package/dist/{transport-BnU3Zb0Q.d.cts → transport-CxBpuW-Q.d.cts} +9 -8
  46. package/dist/{transport-B1MUtXL7.d.ts → transport-KOCn1fvT.d.ts} +9 -8
  47. package/package.json +1 -1
  48. package/dist/chunk-62BM2WOT.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { C as ClientTransport } from '../../../client-BZUvFL6B.cjs';
1
+ import { C as ClientTransport } from '../../../client-CNO_SC1d.cjs';
2
2
  import { T as TransportClientId } from '../../../message-CpXWqmJw.cjs';
3
- import { P as ProvidedClientTransportOptions } from '../../../transport-BnU3Zb0Q.cjs';
4
- import { a as WebSocketConnection } from '../../../connection-xxgJHs2o.cjs';
3
+ import { P as ProvidedClientTransportOptions } from '../../../transport-CxBpuW-Q.cjs';
4
+ import { a as WebSocketConnection } from '../../../connection-DkWD1Ptu.cjs';
5
5
  import { W as WsLike } from '../../../wslike-Dng9H1C7.cjs';
6
6
  import '@sinclair/typebox';
7
7
  import '@opentelemetry/api';
@@ -1,7 +1,7 @@
1
- import { C as ClientTransport } from '../../../client-BNc5Pj_4.js';
1
+ import { C as ClientTransport } from '../../../client-CKThx0WA.js';
2
2
  import { T as TransportClientId } from '../../../message-CpXWqmJw.js';
3
- import { P as ProvidedClientTransportOptions } from '../../../transport-B1MUtXL7.js';
4
- import { a as WebSocketConnection } from '../../../connection-ou9w2dSY.js';
3
+ import { P as ProvidedClientTransportOptions } from '../../../transport-KOCn1fvT.js';
4
+ import { a as WebSocketConnection } from '../../../connection-Dngmtp2E.js';
5
5
  import { W as WsLike } from '../../../wslike-Dng9H1C7.js';
6
6
  import '@sinclair/typebox';
7
7
  import '@opentelemetry/api';
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ClientTransport,
3
3
  WebSocketConnection
4
- } from "../../../chunk-62BM2WOT.js";
4
+ } from "../../../chunk-CH3OPDPY.js";
5
5
  import "../../../chunk-CC7RN7GI.js";
6
- import "../../../chunk-C4EPHIKQ.js";
6
+ import "../../../chunk-QFJGMDOX.js";
7
7
 
8
8
  // transport/impls/ws/client.ts
9
9
  var WebSocketClientTransport = class extends ClientTransport {
@@ -736,7 +736,7 @@ function coerceErrorString(err) {
736
736
  }
737
737
 
738
738
  // package.json
739
- var version = "0.216.1";
739
+ var version = "0.216.2";
740
740
 
741
741
  // tracing/index.ts
742
742
  function createSessionTelemetryInfo(tracer, sessionId, to, from, propagationCtx) {
@@ -1029,6 +1029,12 @@ var SessionConnected = class extends IdentifiedSession {
1029
1029
  return;
1030
1030
  }
1031
1031
  const parsedMsg = parsedMsgRes.value;
1032
+ if (parsedMsg.from !== this.to) {
1033
+ this.listeners.onInvalidMessage(
1034
+ `received message with 'from' (${parsedMsg.from}) that does not match the session peer (${this.to})`
1035
+ );
1036
+ return;
1037
+ }
1032
1038
  if (parsedMsg.seq !== this.ack) {
1033
1039
  if (parsedMsg.seq < this.ack) {
1034
1040
  this.log?.debug(
@@ -1923,7 +1929,8 @@ var ServerTransport = class extends Transport {
1923
1929
  try {
1924
1930
  parsedMetadataOrFailureCode = await this.handshakeExtensions.validate(
1925
1931
  msg.payload.metadata,
1926
- previousParsedMetadata
1932
+ previousParsedMetadata,
1933
+ msg.from
1927
1934
  );
1928
1935
  } catch (err) {
1929
1936
  this.rejectHandshakeRequest(