@replit/river 0.208.3 → 0.208.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-3WYK5ZRT.js → chunk-7TKRCDKJ.js} +2 -2
- package/dist/{chunk-JC4XN6NC.js → chunk-N62U4PDY.js} +27 -4
- package/dist/{chunk-JC4XN6NC.js.map → chunk-N62U4PDY.js.map} +1 -1
- package/dist/{chunk-M2B4PVR5.js → chunk-NJNR3MK5.js} +2 -2
- package/dist/codec/index.js +2 -2
- package/dist/router/index.cjs +26 -3
- 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 +1 -1
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.js +2 -2
- package/dist/transport/impls/ws/client.cjs +1 -1
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.js +3 -3
- package/dist/transport/impls/ws/server.cjs +1 -1
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.js +3 -3
- package/dist/transport/index.cjs +1 -1
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-3WYK5ZRT.js.map → chunk-7TKRCDKJ.js.map} +0 -0
- /package/dist/{chunk-M2B4PVR5.js.map → chunk-NJNR3MK5.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Connection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7TKRCDKJ.js";
|
|
4
4
|
|
|
5
5
|
// transport/impls/ws/connection.ts
|
|
6
6
|
var WS_HEALTHY_CLOSE_CODE = 1e3;
|
|
@@ -52,4 +52,4 @@ var WebSocketConnection = class extends Connection {
|
|
|
52
52
|
export {
|
|
53
53
|
WebSocketConnection
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-NJNR3MK5.js.map
|
package/dist/codec/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
BinaryCodec,
|
|
3
3
|
CodecMessageAdapter,
|
|
4
4
|
NaiveJsonCodec
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-7TKRCDKJ.js";
|
|
6
6
|
import "../chunk-CC7RN7GI.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-N62U4PDY.js";
|
|
8
8
|
export {
|
|
9
9
|
BinaryCodec,
|
|
10
10
|
CodecMessageAdapter,
|
package/dist/router/index.cjs
CHANGED
|
@@ -964,6 +964,9 @@ function createClient(transport, serverId, providedClientOptions = {}) {
|
|
|
964
964
|
}, []);
|
|
965
965
|
}
|
|
966
966
|
function handleProc(procType, transport, serverId, init, serviceName, procedureName, abortSignal) {
|
|
967
|
+
if (transport.getStatus() === "closed") {
|
|
968
|
+
return getPreClosedReturnForProc(procType);
|
|
969
|
+
}
|
|
967
970
|
const session = transport.sessions.get(serverId) ?? transport.createUnconnectedSession(serverId);
|
|
968
971
|
const sessionScopedSend = transport.getSessionBoundSendFn(
|
|
969
972
|
serverId,
|
|
@@ -1140,13 +1143,33 @@ function handleProc(procType, transport, serverId, init, serviceName, procedureN
|
|
|
1140
1143
|
if (procClosesWithInit) {
|
|
1141
1144
|
reqWritable.close();
|
|
1142
1145
|
}
|
|
1146
|
+
return getReturnForProc(procType, resReadable, reqWritable, transport.log);
|
|
1147
|
+
}
|
|
1148
|
+
function getPreClosedReturnForProc(procType) {
|
|
1149
|
+
const readable = new ReadableImpl();
|
|
1150
|
+
const err = Err({
|
|
1151
|
+
code: UNEXPECTED_DISCONNECT_CODE,
|
|
1152
|
+
message: `transport is closed`
|
|
1153
|
+
});
|
|
1154
|
+
readable._pushValue(err);
|
|
1155
|
+
readable._triggerClose();
|
|
1156
|
+
const writable = new WritableImpl({
|
|
1157
|
+
writeCb: () => {
|
|
1158
|
+
},
|
|
1159
|
+
closeCb: () => {
|
|
1160
|
+
}
|
|
1161
|
+
});
|
|
1162
|
+
writable.close();
|
|
1163
|
+
return getReturnForProc(procType, readable, writable);
|
|
1164
|
+
}
|
|
1165
|
+
function getReturnForProc(procType, resReadable, reqWritable, log) {
|
|
1143
1166
|
if (procType === "subscription") {
|
|
1144
1167
|
return {
|
|
1145
1168
|
resReadable
|
|
1146
1169
|
};
|
|
1147
1170
|
}
|
|
1148
1171
|
if (procType === "rpc") {
|
|
1149
|
-
return getSingleMessage(resReadable,
|
|
1172
|
+
return getSingleMessage(resReadable, log);
|
|
1150
1173
|
}
|
|
1151
1174
|
if (procType === "upload") {
|
|
1152
1175
|
let didFinalize = false;
|
|
@@ -1160,7 +1183,7 @@ function handleProc(procType, transport, serverId, init, serviceName, procedureN
|
|
|
1160
1183
|
if (!reqWritable.isClosed()) {
|
|
1161
1184
|
reqWritable.close();
|
|
1162
1185
|
}
|
|
1163
|
-
return getSingleMessage(resReadable,
|
|
1186
|
+
return getSingleMessage(resReadable, log);
|
|
1164
1187
|
}
|
|
1165
1188
|
};
|
|
1166
1189
|
}
|
|
@@ -1895,7 +1918,7 @@ function createServerHandshakeOptions(schema, validate) {
|
|
|
1895
1918
|
}
|
|
1896
1919
|
|
|
1897
1920
|
// package.json
|
|
1898
|
-
var version = "0.208.
|
|
1921
|
+
var version = "0.208.4";
|
|
1899
1922
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1900
1923
|
0 && (module.exports = {
|
|
1901
1924
|
CANCEL_CODE,
|