@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,17 +1,17 @@
|
|
|
1
|
-
import { b as ProvidedClientTransportOptions, c as ProvidedServerTransportOptions, n as ClientHandshakeOptions, C as Connection, r as ServerHandshakeOptions, T as Transport, A as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, B as SessionBoundSendFn } from '../context-
|
|
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, r as ServerHandshakeOptions, T as Transport, A as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, B as SessionBoundSendFn } from '../context-d6dd8a1a.js';
|
|
2
|
+
import { C as ClientTransport } from '../client-5d2e41a3.js';
|
|
3
|
+
import { S as ServerTransport } from '../server-e46399f9.js';
|
|
4
4
|
import { c as TransportClientId, f as PartialTransportMessage, b as OpaqueTransportMessage } from '../message-3def9ded.js';
|
|
5
5
|
import { Static } from '@sinclair/typebox';
|
|
6
|
-
import { E as BaseErrorSchemaType, u as Readable, X as ReadableIterator, Y as ReadableResult } from '../services-
|
|
6
|
+
import { E as BaseErrorSchemaType, u as Readable, X as ReadableIterator, Y as ReadableResult } from '../services-56cbea0d.js';
|
|
7
7
|
import NodeWs from 'ws';
|
|
8
8
|
import http from 'node:http';
|
|
9
9
|
import { W as WsLike } from '../wslike-e0b32dd5.js';
|
|
10
10
|
import { Duplex } from 'node:stream';
|
|
11
11
|
import '@sinclair/typebox/errors';
|
|
12
|
+
import '@opentelemetry/api';
|
|
12
13
|
import '../types-3e5768ec.js';
|
|
13
14
|
import '@sinclair/typebox/value';
|
|
14
|
-
import '@opentelemetry/api';
|
|
15
15
|
|
|
16
16
|
interface TestTransportOptions {
|
|
17
17
|
client?: ProvidedClientTransportOptions;
|
package/dist/testUtil/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { b as ProvidedClientTransportOptions, c as ProvidedServerTransportOptions, n as ClientHandshakeOptions, C as Connection, r as ServerHandshakeOptions, T as Transport, A as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, B as SessionBoundSendFn } from '../context-
|
|
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, r as ServerHandshakeOptions, T as Transport, A as SessionOptions, m as ClientTransportOptions, e as SessionNoConnection, B as SessionBoundSendFn } from '../context-d6dd8a1a.js';
|
|
2
|
+
import { C as ClientTransport } from '../client-5d2e41a3.js';
|
|
3
|
+
import { S as ServerTransport } from '../server-e46399f9.js';
|
|
4
4
|
import { c as TransportClientId, f as PartialTransportMessage, b as OpaqueTransportMessage } from '../message-3def9ded.js';
|
|
5
5
|
import { Static } from '@sinclair/typebox';
|
|
6
|
-
import { E as BaseErrorSchemaType, u as Readable, X as ReadableIterator, Y as ReadableResult } from '../services-
|
|
6
|
+
import { E as BaseErrorSchemaType, u as Readable, X as ReadableIterator, Y as ReadableResult } from '../services-56cbea0d.js';
|
|
7
7
|
import NodeWs from 'ws';
|
|
8
8
|
import http from 'node:http';
|
|
9
9
|
import { W as WsLike } from '../wslike-e0b32dd5.js';
|
|
10
10
|
import { Duplex } from 'node:stream';
|
|
11
11
|
import '@sinclair/typebox/errors';
|
|
12
|
+
import '@opentelemetry/api';
|
|
12
13
|
import '../types-3e5768ec.js';
|
|
13
14
|
import '@sinclair/typebox/value';
|
|
14
|
-
import '@opentelemetry/api';
|
|
15
15
|
|
|
16
16
|
interface TestTransportOptions {
|
|
17
17
|
client?: ProvidedClientTransportOptions;
|
package/dist/testUtil/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientTransport
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-DGT3MPD4.js";
|
|
4
4
|
import {
|
|
5
5
|
ServerTransport
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-D5EIDBUT.js";
|
|
7
7
|
import {
|
|
8
8
|
Connection,
|
|
9
9
|
SessionStateGraph,
|
|
10
10
|
defaultClientTransportOptions,
|
|
11
11
|
defaultTransportOptions
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-FG22HHCY.js";
|
|
13
13
|
import {
|
|
14
14
|
currentProtocolVersion
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-SZHNMLKC.js";
|
|
16
16
|
import "../chunk-LHH5LQ7C.js";
|
|
17
17
|
import "../chunk-AJGIY2UB.js";
|
|
18
18
|
|
|
@@ -398,6 +398,14 @@ var StateMachineState = class {
|
|
|
398
398
|
* and we've moved on to another state
|
|
399
399
|
*/
|
|
400
400
|
_isConsumed;
|
|
401
|
+
/**
|
|
402
|
+
* Cleanup this state machine state and mark it as consumed.
|
|
403
|
+
* After calling close, it is an error to access any properties on the state.
|
|
404
|
+
* You should never need to call this as a consumer.
|
|
405
|
+
*
|
|
406
|
+
* If you're looking to close the session from the client,
|
|
407
|
+
* use `.hardDisconnect` on the client transport.
|
|
408
|
+
*/
|
|
401
409
|
close() {
|
|
402
410
|
this._handleClose();
|
|
403
411
|
}
|
|
@@ -452,9 +460,8 @@ var CommonSession = class extends StateMachineState {
|
|
|
452
460
|
parseMsg(msg) {
|
|
453
461
|
const parsedMsg = this.options.codec.fromBuffer(msg);
|
|
454
462
|
if (parsedMsg === null) {
|
|
455
|
-
const decodedBuffer = new TextDecoder().decode(Buffer.from(msg));
|
|
456
463
|
this.log?.error(
|
|
457
|
-
`received malformed msg: ${
|
|
464
|
+
`received malformed msg: ${Buffer.from(msg).toString("base64")}`,
|
|
458
465
|
this.loggingMetadata
|
|
459
466
|
);
|
|
460
467
|
return null;
|
|
@@ -634,7 +641,7 @@ var SessionNoConnection = class extends IdentifiedSessionWithGracePeriod {
|
|
|
634
641
|
var import_api = require("@opentelemetry/api");
|
|
635
642
|
|
|
636
643
|
// package.json
|
|
637
|
-
var version = "0.
|
|
644
|
+
var version = "0.203.0";
|
|
638
645
|
|
|
639
646
|
// tracing/index.ts
|
|
640
647
|
function getPropagationContext(ctx) {
|
|
@@ -1705,6 +1712,16 @@ var ClientTransport = class extends Transport {
|
|
|
1705
1712
|
);
|
|
1706
1713
|
this.updateSession(backingOffSession);
|
|
1707
1714
|
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Manually kills all sessions to the server (including all pending state).
|
|
1717
|
+
* This is useful for when you want to close all connections to a server
|
|
1718
|
+
* and don't want to wait for the grace period to elapse.
|
|
1719
|
+
*/
|
|
1720
|
+
hardDisconnect() {
|
|
1721
|
+
for (const session of this.sessions.values()) {
|
|
1722
|
+
this.deleteSession(session);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1708
1725
|
onBackoffFinished(session) {
|
|
1709
1726
|
const connPromise = tracing_default.startActiveSpan("connect", async (span) => {
|
|
1710
1727
|
try {
|