@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,9 +1,9 @@
1
1
  import { T as TransportClientId } from '../../../message-CpXWqmJw.cjs';
2
2
  import { WebSocketServer } from 'ws';
3
- import { a as WebSocketConnection } from '../../../connection-xxgJHs2o.cjs';
3
+ import { a as WebSocketConnection } from '../../../connection-DkWD1Ptu.cjs';
4
4
  import { W as WsLike } from '../../../wslike-Dng9H1C7.cjs';
5
- import { S as ServerTransport } from '../../../server-JdnoVO11.cjs';
6
- import { e as ProvidedServerTransportOptions } from '../../../transport-BnU3Zb0Q.cjs';
5
+ import { S as ServerTransport } from '../../../server-BrCIPno6.cjs';
6
+ import { e as ProvidedServerTransportOptions } from '../../../transport-CxBpuW-Q.cjs';
7
7
  import { IncomingMessage } from 'http';
8
8
  import { TSchema } from '@sinclair/typebox';
9
9
  import '@opentelemetry/api';
@@ -1,9 +1,9 @@
1
1
  import { T as TransportClientId } from '../../../message-CpXWqmJw.js';
2
2
  import { WebSocketServer } from 'ws';
3
- import { a as WebSocketConnection } from '../../../connection-ou9w2dSY.js';
3
+ import { a as WebSocketConnection } from '../../../connection-Dngmtp2E.js';
4
4
  import { W as WsLike } from '../../../wslike-Dng9H1C7.js';
5
- import { S as ServerTransport } from '../../../server-BPu7Td80.js';
6
- import { e as ProvidedServerTransportOptions } from '../../../transport-B1MUtXL7.js';
5
+ import { S as ServerTransport } from '../../../server-CSkUpJcH.js';
6
+ import { e as ProvidedServerTransportOptions } from '../../../transport-KOCn1fvT.js';
7
7
  import { IncomingMessage } from 'http';
8
8
  import { TSchema } from '@sinclair/typebox';
9
9
  import '@opentelemetry/api';
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ServerTransport,
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/server.ts
9
9
  function cleanHeaders(headers) {
@@ -652,7 +652,7 @@ function coerceErrorString(err) {
652
652
  }
653
653
 
654
654
  // package.json
655
- var version = "0.216.1";
655
+ var version = "0.216.2";
656
656
 
657
657
  // tracing/index.ts
658
658
  function getPropagationContext(ctx) {
@@ -953,6 +953,12 @@ var SessionConnected = class extends IdentifiedSession {
953
953
  return;
954
954
  }
955
955
  const parsedMsg = parsedMsgRes.value;
956
+ if (parsedMsg.from !== this.to) {
957
+ this.listeners.onInvalidMessage(
958
+ `received message with 'from' (${parsedMsg.from}) that does not match the session peer (${this.to})`
959
+ );
960
+ return;
961
+ }
956
962
  if (parsedMsg.seq !== this.ack) {
957
963
  if (parsedMsg.seq < this.ack) {
958
964
  this.log?.debug(
@@ -2367,7 +2373,8 @@ var ServerTransport = class extends Transport {
2367
2373
  try {
2368
2374
  parsedMetadataOrFailureCode = await this.handshakeExtensions.validate(
2369
2375
  msg.payload.metadata,
2370
- previousParsedMetadata
2376
+ previousParsedMetadata,
2377
+ msg.from
2371
2378
  );
2372
2379
  } catch (err) {
2373
2380
  this.rejectHandshakeRequest(