@replit/river 0.208.3 → 0.209.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/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-M2B4PVR5.js → chunk-LPWARXI3.js} +2 -2
- package/dist/{chunk-JC4XN6NC.js → chunk-RATCBAZE.js} +199 -170
- package/dist/chunk-RATCBAZE.js.map +1 -0
- package/dist/{chunk-3WYK5ZRT.js → chunk-TVN2TB6X.js} +2 -2
- package/dist/{chunk-3WYK5ZRT.js.map → chunk-TVN2TB6X.js.map} +1 -1
- package/dist/client-BzJwq-hg.d.ts +54 -0
- package/dist/client-aETS93z1.d.cts +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/{connection-Donr3JRB.d.ts → connection-b1wd5XrC.d.ts} +3 -3
- package/dist/{connection-BF4zg6Qv.d.cts → connection-hUWlS-hg.d.cts} +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 +199 -170
- 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-BBgDVOzk.d.cts +72 -0
- package/dist/server-DZ0Yzmpf.d.ts +72 -0
- package/dist/services-DBvjc-Mq.d.ts +1010 -0
- package/dist/services-DC_uol9A.d.cts +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/dist/transport-CxjUaGhi.d.cts +577 -0
- package/dist/transport-DwEB67zY.d.ts +577 -0
- package/package.json +1 -1
- package/dist/chunk-JC4XN6NC.js.map +0 -1
- package/dist/transport-CCaWx1Rb.d.cts +0 -1566
- package/dist/transport-CZb3vdB4.d.ts +0 -1566
- /package/dist/{chunk-M2B4PVR5.js.map → chunk-LPWARXI3.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 './transport-DwEB67zY.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 };
|
|
@@ -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 './transport-CxjUaGhi.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 };
|
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-TVN2TB6X.js";
|
|
6
6
|
import "../chunk-CC7RN7GI.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-RATCBAZE.js";
|
|
8
8
|
export {
|
|
9
9
|
BinaryCodec,
|
|
10
10
|
CodecMessageAdapter,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as Tags } from './index-
|
|
2
|
-
import { P as ProtocolVersion,
|
|
3
|
-
import {
|
|
1
|
+
import { T as Tags } from './index-CSM8soK7.js';
|
|
2
|
+
import { P as ProtocolVersion, b as OpaqueTransportMessage } from './message-Dlsh5WDF.js';
|
|
3
|
+
import { C as Connection } from './transport-DwEB67zY.js';
|
|
4
4
|
import { W as WsLike } from './wslike-Dng9H1C7.js';
|
|
5
5
|
|
|
6
6
|
interface ConnectionInfoExtras extends Record<string, unknown> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as Tags } from './index-
|
|
2
|
-
import { P as ProtocolVersion,
|
|
3
|
-
import {
|
|
1
|
+
import { T as Tags } from './index-D9R6UTMl.cjs';
|
|
2
|
+
import { P as ProtocolVersion, b as OpaqueTransportMessage } from './message-Dlsh5WDF.cjs';
|
|
3
|
+
import { C as Connection } from './transport-CxjUaGhi.cjs';
|
|
4
4
|
import { W as WsLike } from './wslike-Dng9H1C7.cjs';
|
|
5
5
|
|
|
6
6
|
interface ConnectionInfoExtras extends Record<string, unknown> {
|
package/dist/logging/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as LogFn, L as Logger, M as MessageMetadata, c as coloredStringLogger, j as jsonLogger, s as stringLogger } from '../index-
|
|
2
|
-
import '../message-
|
|
1
|
+
export { a as LogFn, L as Logger, M as MessageMetadata, c as coloredStringLogger, j as jsonLogger, s as stringLogger } from '../index-D9R6UTMl.cjs';
|
|
2
|
+
import '../message-Dlsh5WDF.cjs';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
import '@opentelemetry/api';
|
package/dist/logging/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as LogFn, L as Logger, M as MessageMetadata, c as coloredStringLogger, j as jsonLogger, s as stringLogger } from '../index-
|
|
2
|
-
import '../message-
|
|
1
|
+
export { a as LogFn, L as Logger, M as MessageMetadata, c as coloredStringLogger, j as jsonLogger, s as stringLogger } from '../index-CSM8soK7.js';
|
|
2
|
+
import '../message-Dlsh5WDF.js';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
import '@opentelemetry/api';
|
|
@@ -105,4 +105,4 @@ declare function isStreamOpen(controlFlag: number): boolean;
|
|
|
105
105
|
*/
|
|
106
106
|
declare function isStreamClose(controlFlag: number): boolean;
|
|
107
107
|
|
|
108
|
-
export {
|
|
108
|
+
export { HandshakeErrorResponseCodes as H, OpaqueTransportMessageSchema as O, type ProtocolVersion as P, TransportMessageSchema as T, type TransportMessage as a, type OpaqueTransportMessage as b, type TransportClientId as c, isStreamClose as d, type PartialTransportMessage as e, type TelemetryInfo as f, HandshakeErrorCustomHandlerFatalResponseCodes as g, isStreamOpen as i };
|
|
@@ -105,4 +105,4 @@ declare function isStreamOpen(controlFlag: number): boolean;
|
|
|
105
105
|
*/
|
|
106
106
|
declare function isStreamClose(controlFlag: number): boolean;
|
|
107
107
|
|
|
108
|
-
export {
|
|
108
|
+
export { HandshakeErrorResponseCodes as H, OpaqueTransportMessageSchema as O, type ProtocolVersion as P, TransportMessageSchema as T, type TransportMessage as a, type OpaqueTransportMessage as b, type TransportClientId as c, isStreamClose as d, type PartialTransportMessage as e, type TelemetryInfo as f, HandshakeErrorCustomHandlerFatalResponseCodes as g, isStreamOpen as i };
|