@replit/river 0.209.3 → 0.209.4
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-EHTVQM2C.js → chunk-MIO5URHT.js} +2 -2
- package/dist/chunk-MIO5URHT.js.map +1 -0
- package/dist/{chunk-JRBDMLR3.js → chunk-SWRTP3YW.js} +12 -5
- package/dist/chunk-SWRTP3YW.js.map +1 -0
- package/dist/{chunk-I24PIZXW.js → chunk-VQAPXMIR.js} +16 -7
- package/dist/chunk-VQAPXMIR.js.map +1 -0
- package/dist/{client-aETS93z1.d.cts → client-DXJRow2s.d.cts} +1 -1
- package/dist/{client-BzJwq-hg.d.ts → client-Dw0JBBs3.d.ts} +1 -1
- package/dist/codec/index.js +2 -2
- package/dist/{connection-hUWlS-hg.d.cts → connection-BWkuQM31.d.cts} +1 -1
- package/dist/{connection-b1wd5XrC.d.ts → connection-T0wHyOsa.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 +7 -7
- package/dist/router/index.d.ts +7 -7
- package/dist/router/index.js +1 -1
- package/dist/{server-BBgDVOzk.d.cts → server-BDSYa-CO.d.cts} +1 -1
- package/dist/{server-DZ0Yzmpf.d.ts → server-DFOzjvLh.d.ts} +1 -1
- package/dist/{services-DYik59tk.d.ts → services-DEubFUIR.d.ts} +4 -4
- package/dist/{services-C53K219K.d.cts → services-GJyw0jKV.d.cts} +4 -4
- package/dist/testUtil/index.cjs +15 -6
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.d.cts +4 -4
- package/dist/testUtil/index.d.ts +4 -4
- package/dist/testUtil/index.js +2 -2
- package/dist/transport/impls/ws/client.cjs +25 -9
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +3 -3
- package/dist/transport/impls/ws/client.d.ts +3 -3
- package/dist/transport/impls/ws/client.js +3 -3
- package/dist/transport/impls/ws/server.cjs +13 -5
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +3 -3
- package/dist/transport/impls/ws/server.d.ts +3 -3
- package/dist/transport/impls/ws/server.js +3 -3
- package/dist/transport/index.cjs +15 -6
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +3 -3
- package/dist/transport/index.d.ts +3 -3
- package/dist/transport/index.js +2 -2
- package/dist/{transport-CxjUaGhi.d.cts → transport-CxT7y8Qk.d.cts} +5 -0
- package/dist/{transport-DwEB67zY.d.ts → transport-pdbkDzmJ.d.ts} +5 -0
- package/package.json +1 -1
- package/dist/chunk-EHTVQM2C.js.map +0 -1
- package/dist/chunk-I24PIZXW.js.map +0 -1
- package/dist/chunk-JRBDMLR3.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as ProvidedClientTransportOptions, c as ProvidedServerTransportOptions, n as ClientHandshakeOptions, C as Connection, q as ServerHandshakeOptions, T as Transport, x as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, y as SessionBoundSendFn } from '../transport-
|
|
2
|
-
import { C as ClientTransport } from '../client-
|
|
3
|
-
import { S as ServerTransport } from '../server-
|
|
1
|
+
import { b as ProvidedClientTransportOptions, c as ProvidedServerTransportOptions, n as ClientHandshakeOptions, C as Connection, q as ServerHandshakeOptions, T as Transport, x as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, y as SessionBoundSendFn } from '../transport-CxT7y8Qk.cjs';
|
|
2
|
+
import { C as ClientTransport } from '../client-DXJRow2s.cjs';
|
|
3
|
+
import { S as ServerTransport } from '../server-BDSYa-CO.cjs';
|
|
4
4
|
import { c as TransportClientId, e as PartialTransportMessage, b as OpaqueTransportMessage } from '../message-Dlsh5WDF.cjs';
|
|
5
5
|
import { TSchema, Static } from '@sinclair/typebox';
|
|
6
|
-
import { J as BaseErrorSchemaType, v as Readable, _ as ReadableIterator, w as ReadableResult } from '../services-
|
|
6
|
+
import { J as BaseErrorSchemaType, v as Readable, _ as ReadableIterator, w as ReadableResult } from '../services-GJyw0jKV.cjs';
|
|
7
7
|
import NodeWs from 'ws';
|
|
8
8
|
import http from 'node:http';
|
|
9
9
|
import { W as WsLike } from '../wslike-Dng9H1C7.cjs';
|
package/dist/testUtil/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as ProvidedClientTransportOptions, c as ProvidedServerTransportOptions, n as ClientHandshakeOptions, C as Connection, q as ServerHandshakeOptions, T as Transport, x as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, y as SessionBoundSendFn } from '../transport-
|
|
2
|
-
import { C as ClientTransport } from '../client-
|
|
3
|
-
import { S as ServerTransport } from '../server-
|
|
1
|
+
import { b as ProvidedClientTransportOptions, c as ProvidedServerTransportOptions, n as ClientHandshakeOptions, C as Connection, q as ServerHandshakeOptions, T as Transport, x as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, y as SessionBoundSendFn } from '../transport-pdbkDzmJ.js';
|
|
2
|
+
import { C as ClientTransport } from '../client-Dw0JBBs3.js';
|
|
3
|
+
import { S as ServerTransport } from '../server-DFOzjvLh.js';
|
|
4
4
|
import { c as TransportClientId, e as PartialTransportMessage, b as OpaqueTransportMessage } from '../message-Dlsh5WDF.js';
|
|
5
5
|
import { TSchema, Static } from '@sinclair/typebox';
|
|
6
|
-
import { J as BaseErrorSchemaType, v as Readable, _ as ReadableIterator, w as ReadableResult } from '../services-
|
|
6
|
+
import { J as BaseErrorSchemaType, v as Readable, _ as ReadableIterator, w as ReadableResult } from '../services-DEubFUIR.js';
|
|
7
7
|
import NodeWs from 'ws';
|
|
8
8
|
import http from 'node:http';
|
|
9
9
|
import { W as WsLike } from '../wslike-Dng9H1C7.js';
|
package/dist/testUtil/index.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
SessionStateGraph,
|
|
6
6
|
defaultClientTransportOptions,
|
|
7
7
|
defaultTransportOptions
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-VQAPXMIR.js";
|
|
9
9
|
import "../chunk-CC7RN7GI.js";
|
|
10
10
|
import {
|
|
11
11
|
currentProtocolVersion,
|
|
12
12
|
getTracer
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-MIO5URHT.js";
|
|
14
14
|
|
|
15
15
|
// testUtil/index.ts
|
|
16
16
|
import NodeWs, { WebSocketServer } from "ws";
|
|
@@ -218,7 +218,8 @@ var defaultConnectionRetryOptions = {
|
|
|
218
218
|
maxJitterMs: 200,
|
|
219
219
|
maxBackoffMs: 32e3,
|
|
220
220
|
attemptBudgetCapacity: 5,
|
|
221
|
-
budgetRestoreIntervalMs: 200
|
|
221
|
+
budgetRestoreIntervalMs: 200,
|
|
222
|
+
isFatalConnectionError: () => false
|
|
222
223
|
};
|
|
223
224
|
var defaultClientTransportOptions = {
|
|
224
225
|
...defaultTransportOptions,
|
|
@@ -673,7 +674,7 @@ function coerceErrorString(err) {
|
|
|
673
674
|
}
|
|
674
675
|
|
|
675
676
|
// package.json
|
|
676
|
-
var version = "0.209.
|
|
677
|
+
var version = "0.209.4";
|
|
677
678
|
|
|
678
679
|
// tracing/index.ts
|
|
679
680
|
function getPropagationContext(ctx) {
|
|
@@ -1853,10 +1854,18 @@ var ClientTransport = class extends Transport {
|
|
|
1853
1854
|
const connectedSession = ClientSessionStateGraph.transition.HandshakingToConnected(session, {
|
|
1854
1855
|
onConnectionErrored: (err) => {
|
|
1855
1856
|
const errStr = coerceErrorString(err);
|
|
1856
|
-
this.
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1857
|
+
if (err instanceof Error && this.options.isFatalConnectionError(err)) {
|
|
1858
|
+
this.log?.warn(
|
|
1859
|
+
`connection to ${connectedSession.to} fatally errored: ${errStr}`,
|
|
1860
|
+
connectedSession.loggingMetadata
|
|
1861
|
+
);
|
|
1862
|
+
this.reconnectOnConnectionDrop = false;
|
|
1863
|
+
} else {
|
|
1864
|
+
this.log?.warn(
|
|
1865
|
+
`connection to ${connectedSession.to} errored: ${errStr}`,
|
|
1866
|
+
connectedSession.loggingMetadata
|
|
1867
|
+
);
|
|
1868
|
+
}
|
|
1860
1869
|
},
|
|
1861
1870
|
onConnectionClosed: () => {
|
|
1862
1871
|
this.log?.info(
|
|
@@ -2054,6 +2063,15 @@ var ClientTransport = class extends Transport {
|
|
|
2054
2063
|
|
|
2055
2064
|
// transport/impls/ws/connection.ts
|
|
2056
2065
|
var WS_HEALTHY_CLOSE_CODE = 1e3;
|
|
2066
|
+
var WebSocketCloseError = class extends Error {
|
|
2067
|
+
code;
|
|
2068
|
+
reason;
|
|
2069
|
+
constructor(code, reason) {
|
|
2070
|
+
super(`websocket closed with code and reason: ${code} - ${reason}`);
|
|
2071
|
+
this.code = code;
|
|
2072
|
+
this.reason = reason;
|
|
2073
|
+
}
|
|
2074
|
+
};
|
|
2057
2075
|
var WebSocketConnection = class extends Connection {
|
|
2058
2076
|
ws;
|
|
2059
2077
|
extras;
|
|
@@ -2075,9 +2093,7 @@ var WebSocketConnection = class extends Connection {
|
|
|
2075
2093
|
};
|
|
2076
2094
|
this.ws.onclose = ({ code, reason }) => {
|
|
2077
2095
|
if (didError) {
|
|
2078
|
-
const err = new
|
|
2079
|
-
`websocket closed with code and reason: ${code} - ${reason}`
|
|
2080
|
-
);
|
|
2096
|
+
const err = new WebSocketCloseError(code, reason);
|
|
2081
2097
|
this.onError(err);
|
|
2082
2098
|
}
|
|
2083
2099
|
this.onClose();
|