@replit/river 0.209.4 → 0.209.6
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-MIO5URHT.js → chunk-LTSD2AMH.js} +2 -2
- package/dist/{chunk-MIO5URHT.js.map → chunk-LTSD2AMH.js.map} +1 -1
- package/dist/{chunk-VQAPXMIR.js → chunk-V2YMCSBX.js} +88 -5
- package/dist/chunk-V2YMCSBX.js.map +1 -0
- package/dist/codec/index.cjs +29 -2
- package/dist/codec/index.cjs.map +1 -1
- package/dist/codec/index.js +2 -2
- package/dist/{connection-T0wHyOsa.d.ts → connection-C2lYgRh0.d.ts} +6 -1
- package/dist/{connection-BWkuQM31.d.cts → connection-Dzkqj18h.d.cts} +6 -1
- package/dist/router/index.cjs +1 -1
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +1 -1
- package/dist/router/index.d.ts +1 -1
- package/dist/router/index.js +1 -1
- package/dist/testUtil/index.cjs +5 -1
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.d.cts +1 -1
- package/dist/testUtil/index.d.ts +1 -1
- package/dist/testUtil/index.js +2 -2
- package/dist/transport/impls/ws/client.cjs +59 -55
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +1 -1
- package/dist/transport/impls/ws/client.d.ts +1 -1
- package/dist/transport/impls/ws/client.js +3 -5
- package/dist/transport/impls/ws/client.js.map +1 -1
- package/dist/transport/impls/ws/server.cjs +5 -1
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +1 -1
- package/dist/transport/impls/ws/server.d.ts +1 -1
- package/dist/transport/impls/ws/server.js +3 -5
- package/dist/transport/impls/ws/server.js.map +1 -1
- package/dist/transport/index.cjs +65 -3
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +2 -0
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +8 -4
- package/package.json +1 -9
- package/dist/chunk-SWRTP3YW.js +0 -62
- package/dist/chunk-SWRTP3YW.js.map +0 -1
- package/dist/chunk-VQAPXMIR.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as ClientTransport } from '../../../client-DXJRow2s.cjs';
|
|
2
2
|
import { c as TransportClientId } from '../../../message-Dlsh5WDF.cjs';
|
|
3
3
|
import { b as ProvidedClientTransportOptions } from '../../../transport-CxT7y8Qk.cjs';
|
|
4
|
-
import {
|
|
4
|
+
import { a as WebSocketConnection } from '../../../connection-Dzkqj18h.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
1
|
import { C as ClientTransport } from '../../../client-Dw0JBBs3.js';
|
|
2
2
|
import { c as TransportClientId } from '../../../message-Dlsh5WDF.js';
|
|
3
3
|
import { b as ProvidedClientTransportOptions } from '../../../transport-pdbkDzmJ.js';
|
|
4
|
-
import {
|
|
4
|
+
import { a as WebSocketConnection } from '../../../connection-C2lYgRh0.js';
|
|
5
5
|
import { W as WsLike } from '../../../wslike-Dng9H1C7.js';
|
|
6
6
|
import '@sinclair/typebox';
|
|
7
7
|
import '@opentelemetry/api';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ClientTransport,
|
|
2
3
|
WebSocketConnection
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import {
|
|
5
|
-
ClientTransport
|
|
6
|
-
} from "../../../chunk-VQAPXMIR.js";
|
|
4
|
+
} from "../../../chunk-V2YMCSBX.js";
|
|
7
5
|
import "../../../chunk-CC7RN7GI.js";
|
|
8
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-LTSD2AMH.js";
|
|
9
7
|
|
|
10
8
|
// transport/impls/ws/client.ts
|
|
11
9
|
var WebSocketClientTransport = class extends ClientTransport {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../transport/impls/ws/client.ts"],"sourcesContent":["import { ClientTransport } from '../../client';\nimport { TransportClientId } from '../../message';\nimport { ProvidedClientTransportOptions } from '../../options';\nimport { WebSocketConnection } from './connection';\nimport { WsLike } from './wslike';\n\n/**\n * A transport implementation that uses a WebSocket connection with automatic reconnection.\n * @class\n * @extends Transport\n */\nexport class WebSocketClientTransport extends ClientTransport<WebSocketConnection> {\n /**\n * A function that returns a Promise that resolves to a websocket URL.\n */\n wsGetter: (to: TransportClientId) => Promise<WsLike> | WsLike;\n\n /**\n * Creates a new WebSocketClientTransport instance.\n * @param wsGetter A function that returns a Promise that resolves to a WebSocket instance.\n * @param clientId The ID of the client using the transport. This should be unique per session.\n * @param serverId The ID of the server this transport is connecting to.\n * @param providedOptions An optional object containing configuration options for the transport.\n */\n constructor(\n wsGetter: (to: TransportClientId) => Promise<WsLike> | WsLike,\n clientId: TransportClientId,\n providedOptions?: ProvidedClientTransportOptions,\n ) {\n super(clientId, providedOptions);\n this.wsGetter = wsGetter;\n }\n\n async createNewOutgoingConnection(to: string) {\n this.log?.info(`establishing a new websocket to ${to}`, {\n clientId: this.clientId,\n connectedTo: to,\n });\n\n const ws = await this.wsGetter(to);\n\n await new Promise<void>((resolve, reject) => {\n if (ws.readyState === ws.OPEN) {\n resolve();\n\n return;\n }\n\n if (ws.readyState === ws.CLOSING || ws.readyState === ws.CLOSED) {\n reject(new Error('ws is closing or closed'));\n\n return;\n }\n\n ws.onopen = () => {\n resolve();\n };\n\n ws.onclose = (evt) => {\n reject(new Error(evt.reason));\n };\n\n ws.onerror = (err) => {\n reject(new Error(err.message));\n };\n });\n\n const conn = new WebSocketConnection(ws);\n this.log?.info(`raw websocket to ${to} ok`, {\n clientId: this.clientId,\n connectedTo: to,\n ...conn.loggingMetadata,\n });\n\n return conn;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../transport/impls/ws/client.ts"],"sourcesContent":["import { ClientTransport } from '../../client';\nimport { TransportClientId } from '../../message';\nimport { ProvidedClientTransportOptions } from '../../options';\nimport { WebSocketConnection } from './connection';\nimport { WsLike } from './wslike';\n\n/**\n * A transport implementation that uses a WebSocket connection with automatic reconnection.\n * @class\n * @extends Transport\n */\nexport class WebSocketClientTransport extends ClientTransport<WebSocketConnection> {\n /**\n * A function that returns a Promise that resolves to a websocket URL.\n */\n wsGetter: (to: TransportClientId) => Promise<WsLike> | WsLike;\n\n /**\n * Creates a new WebSocketClientTransport instance.\n * @param wsGetter A function that returns a Promise that resolves to a WebSocket instance.\n * @param clientId The ID of the client using the transport. This should be unique per session.\n * @param serverId The ID of the server this transport is connecting to.\n * @param providedOptions An optional object containing configuration options for the transport.\n */\n constructor(\n wsGetter: (to: TransportClientId) => Promise<WsLike> | WsLike,\n clientId: TransportClientId,\n providedOptions?: ProvidedClientTransportOptions,\n ) {\n super(clientId, providedOptions);\n this.wsGetter = wsGetter;\n }\n\n async createNewOutgoingConnection(to: string) {\n this.log?.info(`establishing a new websocket to ${to}`, {\n clientId: this.clientId,\n connectedTo: to,\n });\n\n const ws = await this.wsGetter(to);\n\n await new Promise<void>((resolve, reject) => {\n if (ws.readyState === ws.OPEN) {\n resolve();\n\n return;\n }\n\n if (ws.readyState === ws.CLOSING || ws.readyState === ws.CLOSED) {\n reject(new Error('ws is closing or closed'));\n\n return;\n }\n\n ws.onopen = () => {\n resolve();\n };\n\n ws.onclose = (evt) => {\n reject(new Error(evt.reason));\n };\n\n ws.onerror = (err) => {\n reject(new Error(err.message));\n };\n });\n\n const conn = new WebSocketConnection(ws);\n this.log?.info(`raw websocket to ${to} ok`, {\n clientId: this.clientId,\n connectedTo: to,\n ...conn.loggingMetadata,\n });\n\n return conn;\n }\n}\n"],"mappings":";;;;;;;;AAWO,IAAM,2BAAN,cAAuC,gBAAqC;AAAA;AAAA;AAAA;AAAA,EAIjF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,YACE,UACA,UACA,iBACA;AACA,UAAM,UAAU,eAAe;AAC/B,SAAK,WAAW;AAAA,EAClB;AAAA,EAEA,MAAM,4BAA4B,IAAY;AAC5C,SAAK,KAAK,KAAK,mCAAmC,EAAE,IAAI;AAAA,MACtD,UAAU,KAAK;AAAA,MACf,aAAa;AAAA,IACf,CAAC;AAED,UAAM,KAAK,MAAM,KAAK,SAAS,EAAE;AAEjC,UAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AAC3C,UAAI,GAAG,eAAe,GAAG,MAAM;AAC7B,gBAAQ;AAER;AAAA,MACF;AAEA,UAAI,GAAG,eAAe,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ;AAC/D,eAAO,IAAI,MAAM,yBAAyB,CAAC;AAE3C;AAAA,MACF;AAEA,SAAG,SAAS,MAAM;AAChB,gBAAQ;AAAA,MACV;AAEA,SAAG,UAAU,CAAC,QAAQ;AACpB,eAAO,IAAI,MAAM,IAAI,MAAM,CAAC;AAAA,MAC9B;AAEA,SAAG,UAAU,CAAC,QAAQ;AACpB,eAAO,IAAI,MAAM,IAAI,OAAO,CAAC;AAAA,MAC/B;AAAA,IACF,CAAC;AAED,UAAM,OAAO,IAAI,oBAAoB,EAAE;AACvC,SAAK,KAAK,KAAK,oBAAoB,EAAE,OAAO;AAAA,MAC1C,UAAU,KAAK;AAAA,MACf,aAAa;AAAA,MACb,GAAG,KAAK;AAAA,IACV,CAAC;AAED,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -299,6 +299,8 @@ var NaiveJsonCodec = {
|
|
|
299
299
|
const val = this[key];
|
|
300
300
|
if (val instanceof Uint8Array) {
|
|
301
301
|
return { $t: uint8ArrayToBase64(val) };
|
|
302
|
+
} else if (typeof val === "bigint") {
|
|
303
|
+
return { $b: val.toString() };
|
|
302
304
|
} else {
|
|
303
305
|
return val;
|
|
304
306
|
}
|
|
@@ -311,6 +313,8 @@ var NaiveJsonCodec = {
|
|
|
311
313
|
function reviver(_key, val) {
|
|
312
314
|
if (val?.$t !== void 0) {
|
|
313
315
|
return base64ToUint8Array(val.$t);
|
|
316
|
+
} else if (val?.$b !== void 0) {
|
|
317
|
+
return BigInt(val.$b);
|
|
314
318
|
} else {
|
|
315
319
|
return val;
|
|
316
320
|
}
|
|
@@ -727,7 +731,7 @@ function coerceErrorString(err) {
|
|
|
727
731
|
}
|
|
728
732
|
|
|
729
733
|
// package.json
|
|
730
|
-
var version = "0.209.
|
|
734
|
+
var version = "0.209.6";
|
|
731
735
|
|
|
732
736
|
// tracing/index.ts
|
|
733
737
|
function createSessionTelemetryInfo(tracer, sessionId, to, from, propagationCtx) {
|