@replit/river 0.208.4 → 0.209.1
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/README.md +36 -1
- package/dist/{adapter-ChksXKVN.d.ts → adapter-Cp7_gIVA.d.ts} +1 -1
- package/dist/{adapter-Cuc4JtfV.d.cts → adapter-DjiEwOYi.d.cts} +1 -1
- package/dist/{chunk-N62U4PDY.js → chunk-2AV3IIW5.js} +174 -168
- package/dist/chunk-2AV3IIW5.js.map +1 -0
- package/dist/{chunk-NJNR3MK5.js → chunk-2DRHPFKM.js} +2 -2
- package/dist/{chunk-7TKRCDKJ.js → chunk-UC4MQ5FP.js} +2 -2
- package/dist/{chunk-7TKRCDKJ.js.map → chunk-UC4MQ5FP.js.map} +1 -1
- package/dist/client-CRY4aeRv.d.cts +54 -0
- package/dist/client-Cvl0bF5y.d.ts +54 -0
- package/dist/codec/index.d.cts +3 -3
- package/dist/codec/index.d.ts +3 -3
- package/dist/codec/index.js +2 -2
- package/dist/common-MmS1PQN7.d.cts +577 -0
- package/dist/common-yodP-WNy.d.ts +577 -0
- package/dist/{connection-BF4zg6Qv.d.cts → connection-BVE0wfE7.d.cts} +3 -3
- package/dist/{connection-Donr3JRB.d.ts → connection-BphUYGjL.d.ts} +3 -3
- package/dist/{index-D8IOd3LG.d.ts → index-CSM8soK7.d.ts} +1 -1
- package/dist/{index-C9tpZjBN.d.cts → index-D9R6UTMl.d.cts} +1 -1
- package/dist/logging/index.d.cts +2 -2
- package/dist/logging/index.d.ts +2 -2
- package/dist/{message-Di94OL80.d.cts → message-Dlsh5WDF.d.cts} +1 -1
- package/dist/{message-Di94OL80.d.ts → message-Dlsh5WDF.d.ts} +1 -1
- package/dist/router/index.cjs +174 -168
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +21 -18
- package/dist/router/index.d.ts +21 -18
- package/dist/router/index.js +3 -3
- package/dist/server-BKZTIlAc.d.cts +72 -0
- package/dist/server-hDGOXIRA.d.ts +72 -0
- package/dist/services-9I3wdkpy.d.cts +1010 -0
- package/dist/services-BFGny14R.d.ts +1010 -0
- package/dist/testUtil/index.cjs +1 -1
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.d.cts +9 -7
- package/dist/testUtil/index.d.ts +9 -7
- package/dist/testUtil/index.js +2 -2
- package/dist/testUtil/index.js.map +1 -1
- 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.d.cts +6 -5
- package/dist/transport/impls/ws/client.d.ts +6 -5
- 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.d.cts +8 -8
- package/dist/transport/impls/ws/server.d.ts +8 -8
- package/dist/transport/impls/ws/server.js +3 -3
- package/dist/transport/impls/ws/server.js.map +1 -1
- package/dist/transport/index.cjs +1 -1
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +7 -74
- package/dist/transport/index.d.ts +7 -74
- package/dist/transport/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-N62U4PDY.js.map +0 -1
- package/dist/transport-CCaWx1Rb.d.cts +0 -1566
- package/dist/transport-CZb3vdB4.d.ts +0 -1566
- /package/dist/{chunk-NJNR3MK5.js.map → chunk-2DRHPFKM.js.map} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { C as Connection, T as Transport, m as ClientTransportOptions, L as LeakyBucketRateLimit, n as ClientHandshakeOptions, o as ClientSession, b as ProvidedClientTransportOptions, e as SessionNoConnection, f as SessionConnecting, g as SessionHandshaking, h as SessionConnected, p as SessionBackingOff } from './common-MmS1PQN7.cjs';
|
|
2
|
+
import { c as TransportClientId, b as OpaqueTransportMessage } from './message-Dlsh5WDF.cjs';
|
|
3
|
+
|
|
4
|
+
declare abstract class ClientTransport<ConnType extends Connection> extends Transport<ConnType> {
|
|
5
|
+
/**
|
|
6
|
+
* The options for this transport.
|
|
7
|
+
*/
|
|
8
|
+
protected options: ClientTransportOptions;
|
|
9
|
+
retryBudget: LeakyBucketRateLimit;
|
|
10
|
+
/**
|
|
11
|
+
* A flag indicating whether the transport should automatically reconnect
|
|
12
|
+
* when a connection is dropped.
|
|
13
|
+
* Realistically, this should always be true for clients unless you are writing
|
|
14
|
+
* tests or a special case where you don't want to reconnect.
|
|
15
|
+
*/
|
|
16
|
+
reconnectOnConnectionDrop: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Optional handshake options for this client.
|
|
19
|
+
*/
|
|
20
|
+
handshakeExtensions?: ClientHandshakeOptions;
|
|
21
|
+
sessions: Map<TransportClientId, ClientSession<ConnType>>;
|
|
22
|
+
constructor(clientId: TransportClientId, providedOptions?: ProvidedClientTransportOptions);
|
|
23
|
+
extendHandshake(options: ClientHandshakeOptions): void;
|
|
24
|
+
/**
|
|
25
|
+
* Abstract method that creates a new {@link Connection} object.
|
|
26
|
+
*
|
|
27
|
+
* @param to The client ID of the node to connect to.
|
|
28
|
+
* @returns The new connection object.
|
|
29
|
+
*/
|
|
30
|
+
protected abstract createNewOutgoingConnection(to: TransportClientId): Promise<ConnType>;
|
|
31
|
+
private tryReconnecting;
|
|
32
|
+
createUnconnectedSession(to: string): SessionNoConnection;
|
|
33
|
+
protected onConnectingFailed(session: SessionConnecting<ConnType>): SessionNoConnection;
|
|
34
|
+
protected onConnClosed(session: SessionHandshaking<ConnType> | SessionConnected<ConnType>): SessionNoConnection;
|
|
35
|
+
protected onConnectionEstablished(session: SessionConnecting<ConnType>, conn: ConnType): SessionHandshaking<ConnType>;
|
|
36
|
+
private rejectHandshakeResponse;
|
|
37
|
+
protected onHandshakeResponse(session: SessionHandshaking<ConnType>, msg: OpaqueTransportMessage): void;
|
|
38
|
+
/**
|
|
39
|
+
* Manually attempts to connect to a client.
|
|
40
|
+
* @param to The client ID of the node to connect to.
|
|
41
|
+
*/
|
|
42
|
+
connect(to: TransportClientId): void;
|
|
43
|
+
/**
|
|
44
|
+
* Manually kills all sessions to the server (including all pending state).
|
|
45
|
+
* This is useful for when you want to close all connections to a server
|
|
46
|
+
* and don't want to wait for the grace period to elapse.
|
|
47
|
+
*/
|
|
48
|
+
hardDisconnect(): void;
|
|
49
|
+
protected onBackoffFinished(session: SessionBackingOff): void;
|
|
50
|
+
private sendHandshake;
|
|
51
|
+
close(): void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { ClientTransport as C };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { C as Connection, T as Transport, m as ClientTransportOptions, L as LeakyBucketRateLimit, n as ClientHandshakeOptions, o as ClientSession, b as ProvidedClientTransportOptions, e as SessionNoConnection, f as SessionConnecting, g as SessionHandshaking, h as SessionConnected, p as SessionBackingOff } from './common-yodP-WNy.js';
|
|
2
|
+
import { c as TransportClientId, b as OpaqueTransportMessage } from './message-Dlsh5WDF.js';
|
|
3
|
+
|
|
4
|
+
declare abstract class ClientTransport<ConnType extends Connection> extends Transport<ConnType> {
|
|
5
|
+
/**
|
|
6
|
+
* The options for this transport.
|
|
7
|
+
*/
|
|
8
|
+
protected options: ClientTransportOptions;
|
|
9
|
+
retryBudget: LeakyBucketRateLimit;
|
|
10
|
+
/**
|
|
11
|
+
* A flag indicating whether the transport should automatically reconnect
|
|
12
|
+
* when a connection is dropped.
|
|
13
|
+
* Realistically, this should always be true for clients unless you are writing
|
|
14
|
+
* tests or a special case where you don't want to reconnect.
|
|
15
|
+
*/
|
|
16
|
+
reconnectOnConnectionDrop: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Optional handshake options for this client.
|
|
19
|
+
*/
|
|
20
|
+
handshakeExtensions?: ClientHandshakeOptions;
|
|
21
|
+
sessions: Map<TransportClientId, ClientSession<ConnType>>;
|
|
22
|
+
constructor(clientId: TransportClientId, providedOptions?: ProvidedClientTransportOptions);
|
|
23
|
+
extendHandshake(options: ClientHandshakeOptions): void;
|
|
24
|
+
/**
|
|
25
|
+
* Abstract method that creates a new {@link Connection} object.
|
|
26
|
+
*
|
|
27
|
+
* @param to The client ID of the node to connect to.
|
|
28
|
+
* @returns The new connection object.
|
|
29
|
+
*/
|
|
30
|
+
protected abstract createNewOutgoingConnection(to: TransportClientId): Promise<ConnType>;
|
|
31
|
+
private tryReconnecting;
|
|
32
|
+
createUnconnectedSession(to: string): SessionNoConnection;
|
|
33
|
+
protected onConnectingFailed(session: SessionConnecting<ConnType>): SessionNoConnection;
|
|
34
|
+
protected onConnClosed(session: SessionHandshaking<ConnType> | SessionConnected<ConnType>): SessionNoConnection;
|
|
35
|
+
protected onConnectionEstablished(session: SessionConnecting<ConnType>, conn: ConnType): SessionHandshaking<ConnType>;
|
|
36
|
+
private rejectHandshakeResponse;
|
|
37
|
+
protected onHandshakeResponse(session: SessionHandshaking<ConnType>, msg: OpaqueTransportMessage): void;
|
|
38
|
+
/**
|
|
39
|
+
* Manually attempts to connect to a client.
|
|
40
|
+
* @param to The client ID of the node to connect to.
|
|
41
|
+
*/
|
|
42
|
+
connect(to: TransportClientId): void;
|
|
43
|
+
/**
|
|
44
|
+
* Manually kills all sessions to the server (including all pending state).
|
|
45
|
+
* This is useful for when you want to close all connections to a server
|
|
46
|
+
* and don't want to wait for the grace period to elapse.
|
|
47
|
+
*/
|
|
48
|
+
hardDisconnect(): void;
|
|
49
|
+
protected onBackoffFinished(session: SessionBackingOff): void;
|
|
50
|
+
private sendHandshake;
|
|
51
|
+
close(): void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { ClientTransport as C };
|
package/dist/codec/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Codec } from '../adapter-
|
|
2
|
-
export { a as CodecMessageAdapter } from '../adapter-
|
|
3
|
-
import '../message-
|
|
1
|
+
import { C as Codec } from '../adapter-DjiEwOYi.cjs';
|
|
2
|
+
export { a as CodecMessageAdapter } from '../adapter-DjiEwOYi.cjs';
|
|
3
|
+
import '../message-Dlsh5WDF.cjs';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import '@opentelemetry/api';
|
|
6
6
|
|
package/dist/codec/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Codec } from '../adapter-
|
|
2
|
-
export { a as CodecMessageAdapter } from '../adapter-
|
|
3
|
-
import '../message-
|
|
1
|
+
import { C as Codec } from '../adapter-Cp7_gIVA.js';
|
|
2
|
+
export { a as CodecMessageAdapter } from '../adapter-Cp7_gIVA.js';
|
|
3
|
+
import '../message-Dlsh5WDF.js';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import '@opentelemetry/api';
|
|
6
6
|
|
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-UC4MQ5FP.js";
|
|
6
6
|
import "../chunk-CC7RN7GI.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-2AV3IIW5.js";
|
|
8
8
|
export {
|
|
9
9
|
BinaryCodec,
|
|
10
10
|
CodecMessageAdapter,
|