@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
|
@@ -4,9 +4,9 @@ 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
6
|
import { J as BaseErrorSchemaType, v as Readable, _ as ReadableIterator, w as ReadableResult } from '../services-GJyw0jKV.cjs';
|
|
7
|
+
import { W as WsLike } from '../wslike-Dng9H1C7.cjs';
|
|
7
8
|
import NodeWs from 'ws';
|
|
8
9
|
import http from 'node:http';
|
|
9
|
-
import { W as WsLike } from '../wslike-Dng9H1C7.cjs';
|
|
10
10
|
import { Duplex } from 'node:stream';
|
|
11
11
|
import '../index-D9R6UTMl.cjs';
|
|
12
12
|
import '../adapter-DjiEwOYi.cjs';
|
package/dist/testUtil/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ 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
6
|
import { J as BaseErrorSchemaType, v as Readable, _ as ReadableIterator, w as ReadableResult } from '../services-DEubFUIR.js';
|
|
7
|
+
import { W as WsLike } from '../wslike-Dng9H1C7.js';
|
|
7
8
|
import NodeWs from 'ws';
|
|
8
9
|
import http from 'node:http';
|
|
9
|
-
import { W as WsLike } from '../wslike-Dng9H1C7.js';
|
|
10
10
|
import { Duplex } from 'node:stream';
|
|
11
11
|
import '../index-CSM8soK7.js';
|
|
12
12
|
import '../adapter-Cp7_gIVA.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-V2YMCSBX.js";
|
|
9
9
|
import "../chunk-CC7RN7GI.js";
|
|
10
10
|
import {
|
|
11
11
|
currentProtocolVersion,
|
|
12
12
|
getTracer
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-LTSD2AMH.js";
|
|
14
14
|
|
|
15
15
|
// testUtil/index.ts
|
|
16
16
|
import NodeWs, { WebSocketServer } from "ws";
|
|
@@ -179,6 +179,8 @@ var NaiveJsonCodec = {
|
|
|
179
179
|
const val = this[key];
|
|
180
180
|
if (val instanceof Uint8Array) {
|
|
181
181
|
return { $t: uint8ArrayToBase64(val) };
|
|
182
|
+
} else if (typeof val === "bigint") {
|
|
183
|
+
return { $b: val.toString() };
|
|
182
184
|
} else {
|
|
183
185
|
return val;
|
|
184
186
|
}
|
|
@@ -191,6 +193,8 @@ var NaiveJsonCodec = {
|
|
|
191
193
|
function reviver(_key, val) {
|
|
192
194
|
if (val?.$t !== void 0) {
|
|
193
195
|
return base64ToUint8Array(val.$t);
|
|
196
|
+
} else if (val?.$b !== void 0) {
|
|
197
|
+
return BigInt(val.$b);
|
|
194
198
|
} else {
|
|
195
199
|
return val;
|
|
196
200
|
}
|
|
@@ -674,7 +678,7 @@ function coerceErrorString(err) {
|
|
|
674
678
|
}
|
|
675
679
|
|
|
676
680
|
// package.json
|
|
677
|
-
var version = "0.209.
|
|
681
|
+
var version = "0.209.6";
|
|
678
682
|
|
|
679
683
|
// tracing/index.ts
|
|
680
684
|
function getPropagationContext(ctx) {
|
|
@@ -1095,6 +1099,60 @@ var Connection = class {
|
|
|
1095
1099
|
}
|
|
1096
1100
|
};
|
|
1097
1101
|
|
|
1102
|
+
// transport/impls/ws/connection.ts
|
|
1103
|
+
var WS_HEALTHY_CLOSE_CODE = 1e3;
|
|
1104
|
+
var WebSocketCloseError = class extends Error {
|
|
1105
|
+
code;
|
|
1106
|
+
reason;
|
|
1107
|
+
constructor(code, reason) {
|
|
1108
|
+
super(`websocket closed with code and reason: ${code} - ${reason}`);
|
|
1109
|
+
this.code = code;
|
|
1110
|
+
this.reason = reason;
|
|
1111
|
+
}
|
|
1112
|
+
};
|
|
1113
|
+
var WebSocketConnection = class extends Connection {
|
|
1114
|
+
ws;
|
|
1115
|
+
extras;
|
|
1116
|
+
get loggingMetadata() {
|
|
1117
|
+
const metadata = super.loggingMetadata;
|
|
1118
|
+
if (this.extras) {
|
|
1119
|
+
metadata.extras = this.extras;
|
|
1120
|
+
}
|
|
1121
|
+
return metadata;
|
|
1122
|
+
}
|
|
1123
|
+
constructor(ws, extras) {
|
|
1124
|
+
super();
|
|
1125
|
+
this.ws = ws;
|
|
1126
|
+
this.extras = extras;
|
|
1127
|
+
this.ws.binaryType = "arraybuffer";
|
|
1128
|
+
let didError = false;
|
|
1129
|
+
this.ws.onerror = () => {
|
|
1130
|
+
didError = true;
|
|
1131
|
+
};
|
|
1132
|
+
this.ws.onclose = ({ code, reason }) => {
|
|
1133
|
+
if (didError) {
|
|
1134
|
+
const err = new WebSocketCloseError(code, reason);
|
|
1135
|
+
this.onError(err);
|
|
1136
|
+
}
|
|
1137
|
+
this.onClose();
|
|
1138
|
+
};
|
|
1139
|
+
this.ws.onmessage = (msg) => {
|
|
1140
|
+
this.onData(msg.data);
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
send(payload) {
|
|
1144
|
+
try {
|
|
1145
|
+
this.ws.send(payload);
|
|
1146
|
+
return true;
|
|
1147
|
+
} catch {
|
|
1148
|
+
return false;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
close() {
|
|
1152
|
+
this.ws.close(WS_HEALTHY_CLOSE_CODE);
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1098
1156
|
// codec/adapter.ts
|
|
1099
1157
|
var CodecMessageAdapter = class {
|
|
1100
1158
|
constructor(codec) {
|
|
@@ -2061,60 +2119,6 @@ var ClientTransport = class extends Transport {
|
|
|
2061
2119
|
}
|
|
2062
2120
|
};
|
|
2063
2121
|
|
|
2064
|
-
// transport/impls/ws/connection.ts
|
|
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
|
-
};
|
|
2075
|
-
var WebSocketConnection = class extends Connection {
|
|
2076
|
-
ws;
|
|
2077
|
-
extras;
|
|
2078
|
-
get loggingMetadata() {
|
|
2079
|
-
const metadata = super.loggingMetadata;
|
|
2080
|
-
if (this.extras) {
|
|
2081
|
-
metadata.extras = this.extras;
|
|
2082
|
-
}
|
|
2083
|
-
return metadata;
|
|
2084
|
-
}
|
|
2085
|
-
constructor(ws, extras) {
|
|
2086
|
-
super();
|
|
2087
|
-
this.ws = ws;
|
|
2088
|
-
this.extras = extras;
|
|
2089
|
-
this.ws.binaryType = "arraybuffer";
|
|
2090
|
-
let didError = false;
|
|
2091
|
-
this.ws.onerror = () => {
|
|
2092
|
-
didError = true;
|
|
2093
|
-
};
|
|
2094
|
-
this.ws.onclose = ({ code, reason }) => {
|
|
2095
|
-
if (didError) {
|
|
2096
|
-
const err = new WebSocketCloseError(code, reason);
|
|
2097
|
-
this.onError(err);
|
|
2098
|
-
}
|
|
2099
|
-
this.onClose();
|
|
2100
|
-
};
|
|
2101
|
-
this.ws.onmessage = (msg) => {
|
|
2102
|
-
this.onData(msg.data);
|
|
2103
|
-
};
|
|
2104
|
-
}
|
|
2105
|
-
send(payload) {
|
|
2106
|
-
try {
|
|
2107
|
-
this.ws.send(payload);
|
|
2108
|
-
return true;
|
|
2109
|
-
} catch {
|
|
2110
|
-
return false;
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
close() {
|
|
2114
|
-
this.ws.close(WS_HEALTHY_CLOSE_CODE);
|
|
2115
|
-
}
|
|
2116
|
-
};
|
|
2117
|
-
|
|
2118
2122
|
// transport/impls/ws/client.ts
|
|
2119
2123
|
var WebSocketClientTransport = class extends ClientTransport {
|
|
2120
2124
|
/**
|