@replit/river 0.207.1 → 0.207.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.
- package/dist/{chunk-QMAVXV4Z.js → chunk-24EWYOGK.js} +21 -10
- package/dist/chunk-24EWYOGK.js.map +1 -0
- package/dist/{chunk-BCCZA7SX.js → chunk-46IVOKJU.js} +2 -2
- package/dist/{chunk-BCCZA7SX.js.map → chunk-46IVOKJU.js.map} +1 -1
- package/dist/{chunk-7LMZNSVC.js → chunk-4HE7UYRL.js} +2 -2
- package/dist/{chunk-CRD3HDVN.js → chunk-A7RGOVRV.js} +3 -3
- package/dist/{chunk-I27WBSMZ.js → chunk-XV4RQ62N.js} +3 -3
- package/dist/{connection-933c87b2.d.ts → connection-a18e31d5.d.ts} +1 -1
- package/dist/router/index.cjs +1 -1
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +3 -3
- package/dist/router/index.d.ts +3 -3
- package/dist/router/index.js +1 -1
- package/dist/{services-4cd29829.d.ts → services-43528f4b.d.ts} +2 -1
- package/dist/testUtil/index.cjs +20 -9
- 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 +4 -4
- package/dist/transport/impls/ws/client.cjs +20 -9
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +2 -2
- package/dist/transport/impls/ws/client.d.ts +2 -2
- package/dist/transport/impls/ws/client.js +4 -4
- package/dist/transport/impls/ws/server.cjs +20 -9
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +2 -2
- package/dist/transport/impls/ws/server.d.ts +2 -2
- package/dist/transport/impls/ws/server.js +4 -4
- package/dist/transport/index.cjs +20 -9
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/transport/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-QMAVXV4Z.js.map +0 -1
- /package/dist/{chunk-7LMZNSVC.js.map → chunk-4HE7UYRL.js.map} +0 -0
- /package/dist/{chunk-CRD3HDVN.js.map → chunk-A7RGOVRV.js.map} +0 -0
- /package/dist/{chunk-I27WBSMZ.js.map → chunk-XV4RQ62N.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { T as TransportClientId } from '../../../message-ffacb98a.js';
|
|
2
2
|
import { WebSocketServer } from 'ws';
|
|
3
|
-
import { W as WebSocketConnection } from '../../../connection-
|
|
3
|
+
import { W as WebSocketConnection } from '../../../connection-a18e31d5.js';
|
|
4
4
|
import { W as WsLike } from '../../../wslike-e0b32dd5.js';
|
|
5
5
|
import { ServerTransport } from '../../index.cjs';
|
|
6
|
-
import { a as ProvidedServerTransportOptions } from '../../../services-
|
|
6
|
+
import { a as ProvidedServerTransportOptions } from '../../../services-43528f4b.js';
|
|
7
7
|
import { IncomingMessage } from 'http';
|
|
8
8
|
import '@sinclair/typebox';
|
|
9
9
|
import '@opentelemetry/api';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { T as TransportClientId } from '../../../message-ffacb98a.js';
|
|
2
2
|
import { WebSocketServer } from 'ws';
|
|
3
|
-
import { W as WebSocketConnection } from '../../../connection-
|
|
3
|
+
import { W as WebSocketConnection } from '../../../connection-a18e31d5.js';
|
|
4
4
|
import { W as WsLike } from '../../../wslike-e0b32dd5.js';
|
|
5
5
|
import { ServerTransport } from '../../index.js';
|
|
6
|
-
import { a as ProvidedServerTransportOptions } from '../../../services-
|
|
6
|
+
import { a as ProvidedServerTransportOptions } from '../../../services-43528f4b.js';
|
|
7
7
|
import { IncomingMessage } from 'http';
|
|
8
8
|
import '@sinclair/typebox';
|
|
9
9
|
import '@opentelemetry/api';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServerTransport
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-XV4RQ62N.js";
|
|
4
4
|
import {
|
|
5
5
|
WebSocketConnection
|
|
6
|
-
} from "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
8
|
-
import "../../../chunk-
|
|
6
|
+
} from "../../../chunk-4HE7UYRL.js";
|
|
7
|
+
import "../../../chunk-24EWYOGK.js";
|
|
8
|
+
import "../../../chunk-46IVOKJU.js";
|
|
9
9
|
import "../../../chunk-CC7RN7GI.js";
|
|
10
10
|
import "../../../chunk-AJGIY2UB.js";
|
|
11
11
|
|
package/dist/transport/index.cjs
CHANGED
|
@@ -648,7 +648,7 @@ function coerceErrorString(err) {
|
|
|
648
648
|
}
|
|
649
649
|
|
|
650
650
|
// package.json
|
|
651
|
-
var version = "0.207.
|
|
651
|
+
var version = "0.207.2";
|
|
652
652
|
|
|
653
653
|
// tracing/index.ts
|
|
654
654
|
function getPropagationContext(ctx) {
|
|
@@ -807,6 +807,19 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
807
807
|
heartbeatHandle;
|
|
808
808
|
heartbeatMisses = 0;
|
|
809
809
|
isActivelyHeartbeating;
|
|
810
|
+
lastConstructedMsgs = [];
|
|
811
|
+
pushLastConstructedMsgs = (msg) => {
|
|
812
|
+
const trackedMsg = {
|
|
813
|
+
id: msg.id,
|
|
814
|
+
seq: msg.seq,
|
|
815
|
+
streamId: msg.streamId,
|
|
816
|
+
stack: new Error().stack
|
|
817
|
+
};
|
|
818
|
+
this.lastConstructedMsgs.push(trackedMsg);
|
|
819
|
+
if (this.lastConstructedMsgs.length > 10) {
|
|
820
|
+
this.lastConstructedMsgs.shift();
|
|
821
|
+
}
|
|
822
|
+
};
|
|
810
823
|
updateBookkeeping(ack, seq) {
|
|
811
824
|
this.sendBuffer = this.sendBuffer.filter((unacked) => unacked.seq >= ack);
|
|
812
825
|
this.ack = seq + 1;
|
|
@@ -818,13 +831,17 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
818
831
|
this.log?.error(msg, {
|
|
819
832
|
...this.loggingMetadata,
|
|
820
833
|
transportMessage: constructedMsg,
|
|
821
|
-
tags: ["invariant-violation"]
|
|
834
|
+
tags: ["invariant-violation"],
|
|
835
|
+
extras: {
|
|
836
|
+
lastConstructedMsgs: this.lastConstructedMsgs
|
|
837
|
+
}
|
|
822
838
|
});
|
|
823
839
|
throw new Error(msg);
|
|
824
840
|
}
|
|
825
841
|
}
|
|
826
842
|
send(msg) {
|
|
827
843
|
const constructedMsg = this.constructMsg(msg);
|
|
844
|
+
this.pushLastConstructedMsgs(constructedMsg);
|
|
828
845
|
this.assertSendOrdering(constructedMsg);
|
|
829
846
|
this.sendBuffer.push(constructedMsg);
|
|
830
847
|
this.conn.send(this.options.codec.toBuffer(constructedMsg));
|
|
@@ -889,12 +906,6 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
889
906
|
}
|
|
890
907
|
});
|
|
891
908
|
}
|
|
892
|
-
closeConnection() {
|
|
893
|
-
this.conn.removeDataListener(this.onMessageData);
|
|
894
|
-
this.conn.removeCloseListener(this.listeners.onConnectionClosed);
|
|
895
|
-
this.conn.removeErrorListener(this.listeners.onConnectionErrored);
|
|
896
|
-
this.conn.close();
|
|
897
|
-
}
|
|
898
909
|
onMessageData = (msg) => {
|
|
899
910
|
const parsedMsg = this.parseMsg(msg);
|
|
900
911
|
if (parsedMsg === null) {
|
|
@@ -921,7 +932,7 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
921
932
|
code: import_api3.SpanStatusCode.ERROR,
|
|
922
933
|
message: reason
|
|
923
934
|
});
|
|
924
|
-
this.
|
|
935
|
+
this.conn.close();
|
|
925
936
|
}
|
|
926
937
|
return;
|
|
927
938
|
}
|