@replit/river 0.201.0 → 0.203.0
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-UBUD2LMZ.js → chunk-D5EIDBUT.js} +3 -3
- package/dist/{chunk-OZ3ITXW5.js → chunk-DGT3MPD4.js} +13 -3
- package/dist/chunk-DGT3MPD4.js.map +1 -0
- package/dist/{chunk-PJ4GJ5CU.js → chunk-FG22HHCY.js} +11 -4
- package/dist/chunk-FG22HHCY.js.map +1 -0
- package/dist/{chunk-7IUEEQP7.js → chunk-SZHNMLKC.js} +2 -2
- package/dist/{chunk-7IUEEQP7.js.map → chunk-SZHNMLKC.js.map} +1 -1
- package/dist/{chunk-52DVJUVZ.js → chunk-XBPEUVWN.js} +2 -2
- package/dist/{client-a32692b0.d.ts → client-5d2e41a3.d.ts} +7 -1
- package/dist/{connection-48d021ca.d.ts → connection-11a4af0f.d.ts} +1 -1
- package/dist/{context-8d263a7f.d.ts → context-d6dd8a1a.d.ts} +14 -0
- package/dist/router/index.cjs +27 -9
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +9 -8
- package/dist/router/index.d.ts +9 -8
- package/dist/router/index.js +27 -9
- package/dist/router/index.js.map +1 -1
- package/dist/{server-48d90a77.d.ts → server-e46399f9.d.ts} +1 -1
- package/dist/{services-e71ea921.d.ts → services-56cbea0d.d.ts} +9 -4
- package/dist/testUtil/index.cjs +20 -3
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.d.cts +5 -5
- package/dist/testUtil/index.d.ts +5 -5
- package/dist/testUtil/index.js +4 -4
- package/dist/transport/impls/ws/client.cjs +20 -3
- 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 +4 -4
- package/dist/transport/impls/ws/server.cjs +10 -3
- 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 +4 -4
- package/dist/transport/index.cjs +20 -3
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +4 -4
- package/dist/transport/index.d.ts +4 -4
- package/dist/transport/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-OZ3ITXW5.js.map +0 -1
- package/dist/chunk-PJ4GJ5CU.js.map +0 -1
- /package/dist/{chunk-UBUD2LMZ.js.map → chunk-D5EIDBUT.js.map} +0 -0
- /package/dist/{chunk-52DVJUVZ.js.map → chunk-XBPEUVWN.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as TransportClientId } from '../../../message-3def9ded.js';
|
|
2
2
|
import { WebSocketServer } from 'ws';
|
|
3
|
-
import { W as WebSocketConnection } from '../../../connection-
|
|
3
|
+
import { W as WebSocketConnection } from '../../../connection-11a4af0f.js';
|
|
4
4
|
import { W as WsLike } from '../../../wslike-e0b32dd5.js';
|
|
5
|
-
import { S as ServerTransport } from '../../../server-
|
|
6
|
-
import { c as ProvidedServerTransportOptions } from '../../../context-
|
|
5
|
+
import { S as ServerTransport } from '../../../server-e46399f9.js';
|
|
6
|
+
import { c as ProvidedServerTransportOptions } from '../../../context-d6dd8a1a.js';
|
|
7
7
|
import { IncomingMessage } from 'http';
|
|
8
8
|
import '@sinclair/typebox/value';
|
|
9
9
|
import '@sinclair/typebox';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as TransportClientId } from '../../../message-3def9ded.js';
|
|
2
2
|
import { WebSocketServer } from 'ws';
|
|
3
|
-
import { W as WebSocketConnection } from '../../../connection-
|
|
3
|
+
import { W as WebSocketConnection } from '../../../connection-11a4af0f.js';
|
|
4
4
|
import { W as WsLike } from '../../../wslike-e0b32dd5.js';
|
|
5
|
-
import { S as ServerTransport } from '../../../server-
|
|
6
|
-
import { c as ProvidedServerTransportOptions } from '../../../context-
|
|
5
|
+
import { S as ServerTransport } from '../../../server-e46399f9.js';
|
|
6
|
+
import { c as ProvidedServerTransportOptions } from '../../../context-d6dd8a1a.js';
|
|
7
7
|
import { IncomingMessage } from 'http';
|
|
8
8
|
import '@sinclair/typebox/value';
|
|
9
9
|
import '@sinclair/typebox';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServerTransport
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-D5EIDBUT.js";
|
|
4
4
|
import {
|
|
5
5
|
WebSocketConnection
|
|
6
|
-
} from "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
8
|
-
import "../../../chunk-
|
|
6
|
+
} from "../../../chunk-XBPEUVWN.js";
|
|
7
|
+
import "../../../chunk-FG22HHCY.js";
|
|
8
|
+
import "../../../chunk-SZHNMLKC.js";
|
|
9
9
|
import "../../../chunk-LHH5LQ7C.js";
|
|
10
10
|
import "../../../chunk-AJGIY2UB.js";
|
|
11
11
|
|
package/dist/transport/index.cjs
CHANGED
|
@@ -367,6 +367,14 @@ var StateMachineState = class {
|
|
|
367
367
|
* and we've moved on to another state
|
|
368
368
|
*/
|
|
369
369
|
_isConsumed;
|
|
370
|
+
/**
|
|
371
|
+
* Cleanup this state machine state and mark it as consumed.
|
|
372
|
+
* After calling close, it is an error to access any properties on the state.
|
|
373
|
+
* You should never need to call this as a consumer.
|
|
374
|
+
*
|
|
375
|
+
* If you're looking to close the session from the client,
|
|
376
|
+
* use `.hardDisconnect` on the client transport.
|
|
377
|
+
*/
|
|
370
378
|
close() {
|
|
371
379
|
this._handleClose();
|
|
372
380
|
}
|
|
@@ -421,9 +429,8 @@ var CommonSession = class extends StateMachineState {
|
|
|
421
429
|
parseMsg(msg) {
|
|
422
430
|
const parsedMsg = this.options.codec.fromBuffer(msg);
|
|
423
431
|
if (parsedMsg === null) {
|
|
424
|
-
const decodedBuffer = new TextDecoder().decode(Buffer.from(msg));
|
|
425
432
|
this.log?.error(
|
|
426
|
-
`received malformed msg: ${
|
|
433
|
+
`received malformed msg: ${Buffer.from(msg).toString("base64")}`,
|
|
427
434
|
this.loggingMetadata
|
|
428
435
|
);
|
|
429
436
|
return null;
|
|
@@ -603,7 +610,7 @@ var SessionNoConnection = class extends IdentifiedSessionWithGracePeriod {
|
|
|
603
610
|
var import_api = require("@opentelemetry/api");
|
|
604
611
|
|
|
605
612
|
// package.json
|
|
606
|
-
var version = "0.
|
|
613
|
+
var version = "0.203.0";
|
|
607
614
|
|
|
608
615
|
// tracing/index.ts
|
|
609
616
|
function getPropagationContext(ctx) {
|
|
@@ -1744,6 +1751,16 @@ var ClientTransport = class extends Transport {
|
|
|
1744
1751
|
);
|
|
1745
1752
|
this.updateSession(backingOffSession);
|
|
1746
1753
|
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Manually kills all sessions to the server (including all pending state).
|
|
1756
|
+
* This is useful for when you want to close all connections to a server
|
|
1757
|
+
* and don't want to wait for the grace period to elapse.
|
|
1758
|
+
*/
|
|
1759
|
+
hardDisconnect() {
|
|
1760
|
+
for (const session of this.sessions.values()) {
|
|
1761
|
+
this.deleteSession(session);
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1747
1764
|
onBackoffFinished(session) {
|
|
1748
1765
|
const connPromise = tracing_default.startActiveSpan("connect", async (span) => {
|
|
1749
1766
|
try {
|