@replit/river 0.26.6 → 0.26.8
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.
- package/dist/{chunk-3NZ73HXL.js → chunk-CATCCJAL.js} +4 -4
- package/dist/{chunk-MZM234IB.js → chunk-KTS4HBYE.js} +1 -1
- package/dist/chunk-KTS4HBYE.js.map +1 -0
- package/dist/{chunk-H677UET6.js → chunk-NHXIQELK.js} +2 -2
- package/dist/{chunk-5INVLQT5.js → chunk-QEVXZ3I7.js} +14 -4
- package/dist/chunk-QEVXZ3I7.js.map +1 -0
- package/dist/{chunk-APGOIQC4.js → chunk-QXQG6ZFZ.js} +2 -2
- package/dist/{chunk-J7AQMYUQ.js → chunk-SIRVFV3D.js} +4 -4
- package/dist/{chunk-CER7XNCN.js → chunk-XMXSGTU2.js} +4 -4
- package/dist/{chunk-H2RVJ32Z.js → chunk-ZFSQNWYX.js} +2 -2
- package/dist/{chunk-H2RVJ32Z.js.map → chunk-ZFSQNWYX.js.map} +1 -1
- package/dist/{client-96810511.d.ts → client-1229b53d.d.ts} +2 -2
- package/dist/connection-c5ffd44e.d.ts +32 -0
- package/dist/{handshake-65e0e848.d.ts → handshake-02a61755.d.ts} +3 -1
- package/dist/logging/index.cjs.map +1 -1
- package/dist/logging/index.d.cts +1 -1
- package/dist/logging/index.d.ts +1 -1
- package/dist/logging/index.js +1 -1
- package/dist/{message-e917ee98.d.ts → message-3edb8fac.d.ts} +1 -0
- package/dist/router/index.cjs +1 -1
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +8 -8
- package/dist/router/index.d.ts +8 -8
- package/dist/router/index.js +2 -2
- package/dist/{server-b8aaf116.d.ts → server-89076d9a.d.ts} +3 -2
- package/dist/{services-40e7c5cf.d.ts → services-4478e99b.d.ts} +3 -3
- package/dist/transport/impls/ws/client.cjs +13 -3
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +4 -4
- package/dist/transport/impls/ws/client.d.ts +4 -4
- package/dist/transport/impls/ws/client.js +6 -6
- package/dist/transport/impls/ws/server.cjs +27 -5
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +6 -5
- package/dist/transport/impls/ws/server.d.ts +6 -5
- package/dist/transport/impls/ws/server.js +20 -8
- package/dist/transport/impls/ws/server.js.map +1 -1
- package/dist/transport/index.cjs +1 -1
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +4 -4
- package/dist/transport/index.d.ts +4 -4
- package/dist/transport/index.js +6 -6
- package/dist/util/testHelpers.cjs +1 -1
- package/dist/util/testHelpers.cjs.map +1 -1
- package/dist/util/testHelpers.d.cts +4 -4
- package/dist/util/testHelpers.d.ts +4 -4
- package/dist/util/testHelpers.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-5INVLQT5.js.map +0 -1
- package/dist/chunk-MZM234IB.js.map +0 -1
- package/dist/connection-48133ec3.d.ts +0 -11
- /package/dist/{chunk-3NZ73HXL.js.map → chunk-CATCCJAL.js.map} +0 -0
- /package/dist/{chunk-H677UET6.js.map → chunk-NHXIQELK.js.map} +0 -0
- /package/dist/{chunk-APGOIQC4.js.map → chunk-QXQG6ZFZ.js.map} +0 -0
- /package/dist/{chunk-J7AQMYUQ.js.map → chunk-SIRVFV3D.js.map} +0 -0
- /package/dist/{chunk-CER7XNCN.js.map → chunk-XMXSGTU2.js.map} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { c as TransportClientId } from '../../../message-
|
|
1
|
+
import { c as TransportClientId } from '../../../message-3edb8fac.js';
|
|
2
2
|
import { WebSocketServer } from 'ws';
|
|
3
|
-
import { W as WebSocketConnection } from '../../../connection-
|
|
3
|
+
import { W as WebSocketConnection } from '../../../connection-c5ffd44e.js';
|
|
4
4
|
import { W as WsLike } from '../../../wslike-e0b32dd5.js';
|
|
5
|
-
import { S as ServerTransport } from '../../../server-
|
|
6
|
-
import { c as ProvidedServerTransportOptions } from '../../../handshake-
|
|
5
|
+
import { S as ServerTransport } from '../../../server-89076d9a.js';
|
|
6
|
+
import { c as ProvidedServerTransportOptions } from '../../../handshake-02a61755.js';
|
|
7
|
+
import { IncomingMessage } from 'http';
|
|
7
8
|
import '@sinclair/typebox/value';
|
|
8
9
|
import '@sinclair/typebox';
|
|
9
10
|
import '@opentelemetry/api';
|
|
@@ -13,7 +14,7 @@ import '../../../types-3e5768ec.js';
|
|
|
13
14
|
declare class WebSocketServerTransport extends ServerTransport<WebSocketConnection> {
|
|
14
15
|
wss: WebSocketServer;
|
|
15
16
|
constructor(wss: WebSocketServer, clientId: TransportClientId, providedOptions?: ProvidedServerTransportOptions);
|
|
16
|
-
connectionHandler: (ws: WsLike) => void;
|
|
17
|
+
connectionHandler: (ws: WsLike, req: IncomingMessage) => void;
|
|
17
18
|
close(): void;
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { c as TransportClientId } from '../../../message-
|
|
1
|
+
import { c as TransportClientId } from '../../../message-3edb8fac.js';
|
|
2
2
|
import { WebSocketServer } from 'ws';
|
|
3
|
-
import { W as WebSocketConnection } from '../../../connection-
|
|
3
|
+
import { W as WebSocketConnection } from '../../../connection-c5ffd44e.js';
|
|
4
4
|
import { W as WsLike } from '../../../wslike-e0b32dd5.js';
|
|
5
|
-
import { S as ServerTransport } from '../../../server-
|
|
6
|
-
import { c as ProvidedServerTransportOptions } from '../../../handshake-
|
|
5
|
+
import { S as ServerTransport } from '../../../server-89076d9a.js';
|
|
6
|
+
import { c as ProvidedServerTransportOptions } from '../../../handshake-02a61755.js';
|
|
7
|
+
import { IncomingMessage } from 'http';
|
|
7
8
|
import '@sinclair/typebox/value';
|
|
8
9
|
import '@sinclair/typebox';
|
|
9
10
|
import '@opentelemetry/api';
|
|
@@ -13,7 +14,7 @@ import '../../../types-3e5768ec.js';
|
|
|
13
14
|
declare class WebSocketServerTransport extends ServerTransport<WebSocketConnection> {
|
|
14
15
|
wss: WebSocketServer;
|
|
15
16
|
constructor(wss: WebSocketServer, clientId: TransportClientId, providedOptions?: ProvidedServerTransportOptions);
|
|
16
|
-
connectionHandler: (ws: WsLike) => void;
|
|
17
|
+
connectionHandler: (ws: WsLike, req: IncomingMessage) => void;
|
|
17
18
|
close(): void;
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServerTransport
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-SIRVFV3D.js";
|
|
4
4
|
import {
|
|
5
5
|
WebSocketConnection
|
|
6
|
-
} from "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
8
|
-
import "../../../chunk-
|
|
9
|
-
import "../../../chunk-
|
|
10
|
-
import "../../../chunk-
|
|
6
|
+
} from "../../../chunk-QEVXZ3I7.js";
|
|
7
|
+
import "../../../chunk-CATCCJAL.js";
|
|
8
|
+
import "../../../chunk-KTS4HBYE.js";
|
|
9
|
+
import "../../../chunk-NHXIQELK.js";
|
|
10
|
+
import "../../../chunk-ZFSQNWYX.js";
|
|
11
11
|
import "../../../chunk-4PVU7J25.js";
|
|
12
12
|
|
|
13
13
|
// transport/impls/ws/server.ts
|
|
14
|
+
function cleanHeaders(headers) {
|
|
15
|
+
const cleanedHeaders = {};
|
|
16
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
17
|
+
if (!key.startsWith("sec-") && value) {
|
|
18
|
+
const cleanedValue = Array.isArray(value) ? value[0] : value;
|
|
19
|
+
cleanedHeaders[key] = cleanedValue;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return cleanedHeaders;
|
|
23
|
+
}
|
|
14
24
|
var WebSocketServerTransport = class extends ServerTransport {
|
|
15
25
|
wss;
|
|
16
26
|
constructor(wss, clientId, providedOptions) {
|
|
@@ -18,8 +28,10 @@ var WebSocketServerTransport = class extends ServerTransport {
|
|
|
18
28
|
this.wss = wss;
|
|
19
29
|
this.wss.on("connection", this.connectionHandler);
|
|
20
30
|
}
|
|
21
|
-
connectionHandler = (ws) => {
|
|
22
|
-
const conn = new WebSocketConnection(ws
|
|
31
|
+
connectionHandler = (ws, req) => {
|
|
32
|
+
const conn = new WebSocketConnection(ws, {
|
|
33
|
+
headers: cleanHeaders(req.headersDistinct)
|
|
34
|
+
});
|
|
23
35
|
this.handleConnection(conn);
|
|
24
36
|
};
|
|
25
37
|
close() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../transport/impls/ws/server.ts"],"sourcesContent":["import { TransportClientId } from '../../message';\nimport { WebSocketServer } from 'ws';\nimport { WebSocketConnection } from './connection';\nimport { WsLike } from './wslike';\nimport { ServerTransport } from '../../server';\nimport { ProvidedServerTransportOptions } from '../../options';\n\nexport class WebSocketServerTransport extends ServerTransport<WebSocketConnection> {\n wss: WebSocketServer;\n\n constructor(\n wss: WebSocketServer,\n clientId: TransportClientId,\n providedOptions?: ProvidedServerTransportOptions,\n ) {\n super(clientId, providedOptions);\n this.wss = wss;\n this.wss.on('connection', this.connectionHandler);\n }\n\n connectionHandler = (ws: WsLike) => {\n const conn = new WebSocketConnection(ws);\n this.handleConnection(conn);\n };\n\n close() {\n super.close();\n this.wss.off('connection', this.connectionHandler);\n }\n}\n"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../../transport/impls/ws/server.ts"],"sourcesContent":["import { TransportClientId } from '../../message';\nimport { WebSocketServer } from 'ws';\nimport { WebSocketConnection } from './connection';\nimport { WsLike } from './wslike';\nimport { ServerTransport } from '../../server';\nimport { ProvidedServerTransportOptions } from '../../options';\nimport { type IncomingMessage } from 'http';\n\nfunction cleanHeaders(\n headers: IncomingMessage['headers'],\n): Record<string, string> {\n const cleanedHeaders: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(headers)) {\n if (!key.startsWith('sec-') && value) {\n const cleanedValue = Array.isArray(value) ? value[0] : value;\n cleanedHeaders[key] = cleanedValue;\n }\n }\n\n return cleanedHeaders;\n}\n\nexport class WebSocketServerTransport extends ServerTransport<WebSocketConnection> {\n wss: WebSocketServer;\n\n constructor(\n wss: WebSocketServer,\n clientId: TransportClientId,\n providedOptions?: ProvidedServerTransportOptions,\n ) {\n super(clientId, providedOptions);\n this.wss = wss;\n this.wss.on('connection', this.connectionHandler);\n }\n\n connectionHandler = (ws: WsLike, req: IncomingMessage) => {\n const conn = new WebSocketConnection(ws, {\n headers: cleanHeaders(req.headersDistinct),\n });\n\n this.handleConnection(conn);\n };\n\n close() {\n super.close();\n this.wss.off('connection', this.connectionHandler);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAQA,SAAS,aACP,SACwB;AACxB,QAAM,iBAAyC,CAAC;AAEhD,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,OAAO,GAAG;AAClD,QAAI,CAAC,IAAI,WAAW,MAAM,KAAK,OAAO;AACpC,YAAM,eAAe,MAAM,QAAQ,KAAK,IAAI,MAAM,CAAC,IAAI;AACvD,qBAAe,GAAG,IAAI;AAAA,IACxB;AAAA,EACF;AAEA,SAAO;AACT;AAEO,IAAM,2BAAN,cAAuC,gBAAqC;AAAA,EACjF;AAAA,EAEA,YACE,KACA,UACA,iBACA;AACA,UAAM,UAAU,eAAe;AAC/B,SAAK,MAAM;AACX,SAAK,IAAI,GAAG,cAAc,KAAK,iBAAiB;AAAA,EAClD;AAAA,EAEA,oBAAoB,CAAC,IAAY,QAAyB;AACxD,UAAM,OAAO,IAAI,oBAAoB,IAAI;AAAA,MACvC,SAAS,aAAa,IAAI,eAAe;AAAA,IAC3C,CAAC;AAED,SAAK,iBAAiB,IAAI;AAAA,EAC5B;AAAA,EAEA,QAAQ;AACN,UAAM,MAAM;AACZ,SAAK,IAAI,IAAI,cAAc,KAAK,iBAAiB;AAAA,EACnD;AACF;","names":[]}
|
package/dist/transport/index.cjs
CHANGED
|
@@ -597,7 +597,7 @@ var SessionNoConnection = class extends IdentifiedSessionWithGracePeriod {
|
|
|
597
597
|
var import_api = require("@opentelemetry/api");
|
|
598
598
|
|
|
599
599
|
// package.json
|
|
600
|
-
var version = "0.26.
|
|
600
|
+
var version = "0.26.8";
|
|
601
601
|
|
|
602
602
|
// tracing/index.ts
|
|
603
603
|
function getPropagationContext(ctx) {
|