@replit/river 0.26.6 → 0.26.7

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 (56) hide show
  1. package/dist/{chunk-APGOIQC4.js → chunk-C7OSTU6D.js} +2 -2
  2. package/dist/{chunk-H677UET6.js → chunk-F32IOMOX.js} +2 -2
  3. package/dist/{chunk-3NZ73HXL.js → chunk-I3Z6XQVK.js} +4 -4
  4. package/dist/{chunk-CER7XNCN.js → chunk-JJX4ALPO.js} +4 -4
  5. package/dist/{chunk-5INVLQT5.js → chunk-KMH4I245.js} +12 -3
  6. package/dist/chunk-KMH4I245.js.map +1 -0
  7. package/dist/{chunk-MZM234IB.js → chunk-KTS4HBYE.js} +1 -1
  8. package/dist/chunk-KTS4HBYE.js.map +1 -0
  9. package/dist/{chunk-H2RVJ32Z.js → chunk-NHM3XC6K.js} +2 -2
  10. package/dist/{chunk-H2RVJ32Z.js.map → chunk-NHM3XC6K.js.map} +1 -1
  11. package/dist/{chunk-J7AQMYUQ.js → chunk-X4TDCNNT.js} +4 -4
  12. package/dist/{client-96810511.d.ts → client-1229b53d.d.ts} +2 -2
  13. package/dist/connection-c5ffd44e.d.ts +32 -0
  14. package/dist/{handshake-65e0e848.d.ts → handshake-02a61755.d.ts} +3 -1
  15. package/dist/logging/index.cjs.map +1 -1
  16. package/dist/logging/index.d.cts +1 -1
  17. package/dist/logging/index.d.ts +1 -1
  18. package/dist/logging/index.js +1 -1
  19. package/dist/{message-e917ee98.d.ts → message-3edb8fac.d.ts} +1 -0
  20. package/dist/router/index.cjs +1 -1
  21. package/dist/router/index.cjs.map +1 -1
  22. package/dist/router/index.d.cts +8 -8
  23. package/dist/router/index.d.ts +8 -8
  24. package/dist/router/index.js +2 -2
  25. package/dist/{server-b8aaf116.d.ts → server-89076d9a.d.ts} +3 -2
  26. package/dist/{services-40e7c5cf.d.ts → services-4478e99b.d.ts} +3 -3
  27. package/dist/transport/impls/ws/client.cjs +11 -2
  28. package/dist/transport/impls/ws/client.cjs.map +1 -1
  29. package/dist/transport/impls/ws/client.d.cts +4 -4
  30. package/dist/transport/impls/ws/client.d.ts +4 -4
  31. package/dist/transport/impls/ws/client.js +6 -6
  32. package/dist/transport/impls/ws/server.cjs +25 -4
  33. package/dist/transport/impls/ws/server.cjs.map +1 -1
  34. package/dist/transport/impls/ws/server.d.cts +6 -5
  35. package/dist/transport/impls/ws/server.d.ts +6 -5
  36. package/dist/transport/impls/ws/server.js +20 -8
  37. package/dist/transport/impls/ws/server.js.map +1 -1
  38. package/dist/transport/index.cjs +1 -1
  39. package/dist/transport/index.cjs.map +1 -1
  40. package/dist/transport/index.d.cts +4 -4
  41. package/dist/transport/index.d.ts +4 -4
  42. package/dist/transport/index.js +6 -6
  43. package/dist/util/testHelpers.cjs +1 -1
  44. package/dist/util/testHelpers.cjs.map +1 -1
  45. package/dist/util/testHelpers.d.cts +4 -4
  46. package/dist/util/testHelpers.d.ts +4 -4
  47. package/dist/util/testHelpers.js +3 -3
  48. package/package.json +1 -1
  49. package/dist/chunk-5INVLQT5.js.map +0 -1
  50. package/dist/chunk-MZM234IB.js.map +0 -1
  51. package/dist/connection-48133ec3.d.ts +0 -11
  52. /package/dist/{chunk-APGOIQC4.js.map → chunk-C7OSTU6D.js.map} +0 -0
  53. /package/dist/{chunk-H677UET6.js.map → chunk-F32IOMOX.js.map} +0 -0
  54. /package/dist/{chunk-3NZ73HXL.js.map → chunk-I3Z6XQVK.js.map} +0 -0
  55. /package/dist/{chunk-CER7XNCN.js.map → chunk-JJX4ALPO.js.map} +0 -0
  56. /package/dist/{chunk-J7AQMYUQ.js.map → chunk-X4TDCNNT.js.map} +0 -0
@@ -1,7 +1,7 @@
1
- import { C as ClientTransport } from '../../../client-96810511.js';
2
- import { c as TransportClientId } from '../../../message-e917ee98.js';
3
- import { b as ProvidedClientTransportOptions } from '../../../handshake-65e0e848.js';
4
- import { W as WebSocketConnection } from '../../../connection-48133ec3.js';
1
+ import { C as ClientTransport } from '../../../client-1229b53d.js';
2
+ import { c as TransportClientId } from '../../../message-3edb8fac.js';
3
+ import { b as ProvidedClientTransportOptions } from '../../../handshake-02a61755.js';
4
+ import { W as WebSocketConnection } from '../../../connection-c5ffd44e.js';
5
5
  import { W as WsLike } from '../../../wslike-e0b32dd5.js';
6
6
  import '@sinclair/typebox/value';
7
7
  import '@sinclair/typebox';
@@ -1,7 +1,7 @@
1
- import { C as ClientTransport } from '../../../client-96810511.js';
2
- import { c as TransportClientId } from '../../../message-e917ee98.js';
3
- import { b as ProvidedClientTransportOptions } from '../../../handshake-65e0e848.js';
4
- import { W as WebSocketConnection } from '../../../connection-48133ec3.js';
1
+ import { C as ClientTransport } from '../../../client-1229b53d.js';
2
+ import { c as TransportClientId } from '../../../message-3edb8fac.js';
3
+ import { b as ProvidedClientTransportOptions } from '../../../handshake-02a61755.js';
4
+ import { W as WebSocketConnection } from '../../../connection-c5ffd44e.js';
5
5
  import { W as WsLike } from '../../../wslike-e0b32dd5.js';
6
6
  import '@sinclair/typebox/value';
7
7
  import '@sinclair/typebox';
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ClientTransport
3
- } from "../../../chunk-CER7XNCN.js";
3
+ } from "../../../chunk-JJX4ALPO.js";
4
4
  import {
5
5
  WebSocketConnection
6
- } from "../../../chunk-5INVLQT5.js";
7
- import "../../../chunk-3NZ73HXL.js";
8
- import "../../../chunk-MZM234IB.js";
9
- import "../../../chunk-H677UET6.js";
10
- import "../../../chunk-H2RVJ32Z.js";
6
+ } from "../../../chunk-KMH4I245.js";
7
+ import "../../../chunk-I3Z6XQVK.js";
8
+ import "../../../chunk-KTS4HBYE.js";
9
+ import "../../../chunk-F32IOMOX.js";
10
+ import "../../../chunk-NHM3XC6K.js";
11
11
  import "../../../chunk-4PVU7J25.js";
12
12
 
13
13
  // transport/impls/ws/client.ts
@@ -105,9 +105,18 @@ var Connection = class {
105
105
  // transport/impls/ws/connection.ts
106
106
  var WebSocketConnection = class extends Connection {
107
107
  ws;
108
- constructor(ws) {
108
+ extras;
109
+ get loggingMetadata() {
110
+ const metadata = super.loggingMetadata;
111
+ if (this.extras) {
112
+ metadata.extras = this.extras;
113
+ }
114
+ return metadata;
115
+ }
116
+ constructor(ws, extras) {
109
117
  super();
110
118
  this.ws = ws;
119
+ this.extras = extras;
111
120
  this.ws.binaryType = "arraybuffer";
112
121
  let didError = false;
113
122
  this.ws.onerror = () => {
@@ -669,7 +678,7 @@ var SessionNoConnection = class extends IdentifiedSessionWithGracePeriod {
669
678
  var import_api = require("@opentelemetry/api");
670
679
 
671
680
  // package.json
672
- var version = "0.26.6";
681
+ var version = "0.26.7";
673
682
 
674
683
  // tracing/index.ts
675
684
  function createSessionTelemetryInfo(sessionId, to, from, propagationCtx) {
@@ -1786,6 +1795,16 @@ var ServerTransport = class extends Transport {
1786
1795
  };
1787
1796
 
1788
1797
  // transport/impls/ws/server.ts
1798
+ function cleanHeaders(headers) {
1799
+ const cleanedHeaders = {};
1800
+ for (const [key, value] of Object.entries(headers)) {
1801
+ if (!key.startsWith("sec-") && value) {
1802
+ const cleanedValue = Array.isArray(value) ? value[0] : value;
1803
+ cleanedHeaders[key] = cleanedValue;
1804
+ }
1805
+ }
1806
+ return cleanedHeaders;
1807
+ }
1789
1808
  var WebSocketServerTransport = class extends ServerTransport {
1790
1809
  wss;
1791
1810
  constructor(wss, clientId, providedOptions) {
@@ -1793,8 +1812,10 @@ var WebSocketServerTransport = class extends ServerTransport {
1793
1812
  this.wss = wss;
1794
1813
  this.wss.on("connection", this.connectionHandler);
1795
1814
  }
1796
- connectionHandler = (ws) => {
1797
- const conn = new WebSocketConnection(ws);
1815
+ connectionHandler = (ws, req) => {
1816
+ const conn = new WebSocketConnection(ws, {
1817
+ headers: cleanHeaders(req.headersDistinct)
1818
+ });
1798
1819
  this.handleConnection(conn);
1799
1820
  };
1800
1821
  close() {