@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,4 +1,4 @@
|
|
|
1
|
-
import { P as ProvidedClientTransportOptions, a as ProvidedServerTransportOptions, a4 as ClientHandshakeOptions, C as ClientTransport, b as Connection, S as ServerHandshakeOptions, M as BaseErrorSchemaType, B as Readable, a5 as ReadableIterator, a6 as ReadableResult, a7 as Transport, a8 as SessionOptions, a9 as ClientTransportOptions, aa as SessionNoConnection, ab as SessionBoundSendFn } from '../services-
|
|
1
|
+
import { P as ProvidedClientTransportOptions, a as ProvidedServerTransportOptions, a4 as ClientHandshakeOptions, C as ClientTransport, b as Connection, S as ServerHandshakeOptions, M as BaseErrorSchemaType, B as Readable, a5 as ReadableIterator, a6 as ReadableResult, a7 as Transport, a8 as SessionOptions, a9 as ClientTransportOptions, aa as SessionNoConnection, ab as SessionBoundSendFn } from '../services-43528f4b.js';
|
|
2
2
|
import { ServerTransport } from '../transport/index.cjs';
|
|
3
3
|
import { T as TransportClientId, b as PartialTransportMessage, O as OpaqueTransportMessage } from '../message-ffacb98a.js';
|
|
4
4
|
import { Static } from '@sinclair/typebox';
|
package/dist/testUtil/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProvidedClientTransportOptions, a as ProvidedServerTransportOptions, a4 as ClientHandshakeOptions, C as ClientTransport, b as Connection, S as ServerHandshakeOptions, M as BaseErrorSchemaType, B as Readable, a5 as ReadableIterator, a6 as ReadableResult, a7 as Transport, a8 as SessionOptions, a9 as ClientTransportOptions, aa as SessionNoConnection, ab as SessionBoundSendFn } from '../services-
|
|
1
|
+
import { P as ProvidedClientTransportOptions, a as ProvidedServerTransportOptions, a4 as ClientHandshakeOptions, C as ClientTransport, b as Connection, S as ServerHandshakeOptions, M as BaseErrorSchemaType, B as Readable, a5 as ReadableIterator, a6 as ReadableResult, a7 as Transport, a8 as SessionOptions, a9 as ClientTransportOptions, aa as SessionNoConnection, ab as SessionBoundSendFn } from '../services-43528f4b.js';
|
|
2
2
|
import { ServerTransport } from '../transport/index.js';
|
|
3
3
|
import { T as TransportClientId, b as PartialTransportMessage, O as OpaqueTransportMessage } from '../message-ffacb98a.js';
|
|
4
4
|
import { Static } from '@sinclair/typebox';
|
package/dist/testUtil/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientTransport
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-A7RGOVRV.js";
|
|
4
4
|
import {
|
|
5
5
|
ServerTransport
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-XV4RQ62N.js";
|
|
7
7
|
import {
|
|
8
8
|
Connection,
|
|
9
9
|
SessionStateGraph,
|
|
10
10
|
defaultClientTransportOptions,
|
|
11
11
|
defaultTransportOptions
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-24EWYOGK.js";
|
|
13
13
|
import {
|
|
14
14
|
currentProtocolVersion,
|
|
15
15
|
getTracer
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-46IVOKJU.js";
|
|
17
17
|
import "../chunk-CC7RN7GI.js";
|
|
18
18
|
import "../chunk-AJGIY2UB.js";
|
|
19
19
|
|
|
@@ -679,7 +679,7 @@ function coerceErrorString(err) {
|
|
|
679
679
|
}
|
|
680
680
|
|
|
681
681
|
// package.json
|
|
682
|
-
var version = "0.207.
|
|
682
|
+
var version = "0.207.2";
|
|
683
683
|
|
|
684
684
|
// tracing/index.ts
|
|
685
685
|
function getPropagationContext(ctx) {
|
|
@@ -838,6 +838,19 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
838
838
|
heartbeatHandle;
|
|
839
839
|
heartbeatMisses = 0;
|
|
840
840
|
isActivelyHeartbeating;
|
|
841
|
+
lastConstructedMsgs = [];
|
|
842
|
+
pushLastConstructedMsgs = (msg) => {
|
|
843
|
+
const trackedMsg = {
|
|
844
|
+
id: msg.id,
|
|
845
|
+
seq: msg.seq,
|
|
846
|
+
streamId: msg.streamId,
|
|
847
|
+
stack: new Error().stack
|
|
848
|
+
};
|
|
849
|
+
this.lastConstructedMsgs.push(trackedMsg);
|
|
850
|
+
if (this.lastConstructedMsgs.length > 10) {
|
|
851
|
+
this.lastConstructedMsgs.shift();
|
|
852
|
+
}
|
|
853
|
+
};
|
|
841
854
|
updateBookkeeping(ack, seq) {
|
|
842
855
|
this.sendBuffer = this.sendBuffer.filter((unacked) => unacked.seq >= ack);
|
|
843
856
|
this.ack = seq + 1;
|
|
@@ -849,13 +862,17 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
849
862
|
this.log?.error(msg, {
|
|
850
863
|
...this.loggingMetadata,
|
|
851
864
|
transportMessage: constructedMsg,
|
|
852
|
-
tags: ["invariant-violation"]
|
|
865
|
+
tags: ["invariant-violation"],
|
|
866
|
+
extras: {
|
|
867
|
+
lastConstructedMsgs: this.lastConstructedMsgs
|
|
868
|
+
}
|
|
853
869
|
});
|
|
854
870
|
throw new Error(msg);
|
|
855
871
|
}
|
|
856
872
|
}
|
|
857
873
|
send(msg) {
|
|
858
874
|
const constructedMsg = this.constructMsg(msg);
|
|
875
|
+
this.pushLastConstructedMsgs(constructedMsg);
|
|
859
876
|
this.assertSendOrdering(constructedMsg);
|
|
860
877
|
this.sendBuffer.push(constructedMsg);
|
|
861
878
|
this.conn.send(this.options.codec.toBuffer(constructedMsg));
|
|
@@ -920,12 +937,6 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
920
937
|
}
|
|
921
938
|
});
|
|
922
939
|
}
|
|
923
|
-
closeConnection() {
|
|
924
|
-
this.conn.removeDataListener(this.onMessageData);
|
|
925
|
-
this.conn.removeCloseListener(this.listeners.onConnectionClosed);
|
|
926
|
-
this.conn.removeErrorListener(this.listeners.onConnectionErrored);
|
|
927
|
-
this.conn.close();
|
|
928
|
-
}
|
|
929
940
|
onMessageData = (msg) => {
|
|
930
941
|
const parsedMsg = this.parseMsg(msg);
|
|
931
942
|
if (parsedMsg === null) {
|
|
@@ -952,7 +963,7 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
952
963
|
code: import_api3.SpanStatusCode.ERROR,
|
|
953
964
|
message: reason
|
|
954
965
|
});
|
|
955
|
-
this.
|
|
966
|
+
this.conn.close();
|
|
956
967
|
}
|
|
957
968
|
return;
|
|
958
969
|
}
|