@replit/river 0.200.0-rc.9 → 0.200.2
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 +8 -8
- package/dist/{chunk-42Z2FQIU.js → chunk-6BH2CXVE.js} +21 -13
- package/dist/chunk-6BH2CXVE.js.map +1 -0
- package/dist/{chunk-4HT6P2ZG.js → chunk-A4JKES5A.js} +22 -30
- package/dist/chunk-A4JKES5A.js.map +1 -0
- package/dist/{chunk-4PVU7J25.js → chunk-AJGIY2UB.js} +1 -1
- package/dist/chunk-AJGIY2UB.js.map +1 -0
- package/dist/{chunk-EETL2L77.js → chunk-GJUUVID2.js} +14 -32
- package/dist/chunk-GJUUVID2.js.map +1 -0
- package/dist/{chunk-GR3AQKHL.js → chunk-HRKM7BIE.js} +14 -4
- package/dist/chunk-HRKM7BIE.js.map +1 -0
- package/dist/{chunk-ZXZE253M.js → chunk-PJB2Y2AV.js} +24 -37
- package/dist/chunk-PJB2Y2AV.js.map +1 -0
- package/dist/{chunk-I75XYO5W.js → chunk-QIDEN5PP.js} +82 -20
- package/dist/chunk-QIDEN5PP.js.map +1 -0
- package/dist/{chunk-VXYHC666.js → chunk-YTMS7OP6.js} +1 -1
- package/dist/chunk-YTMS7OP6.js.map +1 -0
- package/dist/chunk-Z4PX66JO.js +307 -0
- package/dist/chunk-Z4PX66JO.js.map +1 -0
- package/dist/{client-22a47343.d.ts → client-9292552a.d.ts} +3 -4
- package/dist/codec/index.cjs.map +1 -1
- package/dist/codec/index.js +1 -1
- package/dist/connection-94dea547.d.ts +32 -0
- package/dist/{context-b4aff18f.d.ts → context-69f37ac1.d.ts} +48 -43
- package/dist/logging/index.cjs.map +1 -1
- package/dist/logging/index.d.cts +1 -1
- package/dist/logging/index.d.ts +1 -1
- package/dist/logging/index.js +1 -1
- package/dist/{message-7d135e38.d.ts → message-57bb8187.d.ts} +5 -3
- package/dist/router/index.cjs +649 -709
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +22 -12
- package/dist/router/index.d.ts +22 -12
- package/dist/router/index.js +502 -404
- package/dist/router/index.js.map +1 -1
- package/dist/{server-dd6a9853.d.ts → server-8fdd7fb2.d.ts} +5 -5
- package/dist/{services-1b5ac5bc.d.ts → services-259f39a3.d.ts} +191 -194
- package/dist/transport/impls/ws/client.cjs +129 -62
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +4 -4
- package/dist/transport/impls/ws/client.d.ts +4 -4
- package/dist/transport/impls/ws/client.js +7 -7
- package/dist/transport/impls/ws/client.js.map +1 -1
- package/dist/transport/impls/ws/server.cjs +146 -70
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +6 -5
- package/dist/transport/impls/ws/server.d.ts +6 -5
- package/dist/transport/impls/ws/server.js +21 -9
- package/dist/transport/impls/ws/server.js.map +1 -1
- package/dist/transport/index.cjs +138 -92
- 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 +7 -7
- package/dist/util/testHelpers.cjs +265 -327
- package/dist/util/testHelpers.cjs.map +1 -1
- package/dist/util/testHelpers.d.cts +36 -31
- package/dist/util/testHelpers.d.ts +36 -31
- package/dist/util/testHelpers.js +82 -52
- package/dist/util/testHelpers.js.map +1 -1
- package/package.json +4 -3
- package/dist/chunk-42Z2FQIU.js.map +0 -1
- package/dist/chunk-4HT6P2ZG.js.map +0 -1
- package/dist/chunk-4PVU7J25.js.map +0 -1
- package/dist/chunk-EETL2L77.js.map +0 -1
- package/dist/chunk-GR3AQKHL.js.map +0 -1
- package/dist/chunk-I75XYO5W.js.map +0 -1
- package/dist/chunk-MQ6ANR3H.js +0 -451
- package/dist/chunk-MQ6ANR3H.js.map +0 -1
- package/dist/chunk-VXYHC666.js.map +0 -1
- package/dist/chunk-ZXZE253M.js.map +0 -1
- package/dist/connection-260e45a8.d.ts +0 -11
package/dist/router/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap } from '../services-
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, g as AnyProcedure } from '../services-259f39a3.js';
|
|
2
|
+
export { B as BaseErrorSchemaType, H as CANCEL_CODE, K as Client, L as Err, N as ErrResult, G as INVALID_REQUEST_CODE, O as Ok, Q as OkResult, P as PayloadType, m as ProcErrors, i as ProcHandler, j as ProcInit, k as ProcRequest, l as ProcResponse, n as ProcType, d as Procedure, c as ProcedureErrorSchemaType, x as ProcedureMap, y as RPCProcedure, R as Readable, f as ReaderErrorSchema, Y as ResponseData, e as Result, X as ResultUnwrapErr, T as ResultUnwrapOk, r as SerializedProcedureSchema, w as SerializedProcedureSchemaProtocolv1, p as SerializedServerSchema, u as SerializedServerSchemaProtocolv1, q as SerializedServiceSchema, v as SerializedServiceSchemaProtocolv1, S as Service, h as ServiceConfiguration, o as ServiceSchema, C as StreamProcedure, z as SubscriptionProcedure, E as UNCAUGHT_ERROR_CODE, F as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, J as createClient, D as flattenErrorType, s as serializeSchema, t as serializeSchemaV1Compat, M as unwrapOrThrow } from '../services-259f39a3.js';
|
|
3
|
+
import { c as TransportClientId, b as OpaqueTransportMessage } from '../message-57bb8187.js';
|
|
4
|
+
import { t as ParsedMetadata, C as Connection, u as ServerHandshakeOptions, p as ServiceContext } from '../context-69f37ac1.js';
|
|
5
|
+
export { v as ProcedureHandlerContext, w as createClientHandshakeOptions, x as createServerHandshakeOptions } from '../context-69f37ac1.js';
|
|
6
|
+
import { S as ServerTransport } from '../server-8fdd7fb2.js';
|
|
6
7
|
import '@sinclair/typebox';
|
|
7
|
-
import '../
|
|
8
|
+
import '../client-9292552a.js';
|
|
8
9
|
import '@sinclair/typebox/value';
|
|
9
10
|
import '@opentelemetry/api';
|
|
10
|
-
import '../client-22a47343.js';
|
|
11
11
|
import '@sinclair/typebox/errors';
|
|
12
12
|
import '../types-3e5768ec.js';
|
|
13
13
|
|
|
@@ -24,7 +24,17 @@ interface Server<Services extends AnyServiceSchemaMap> {
|
|
|
24
24
|
/**
|
|
25
25
|
* A set of stream ids that are currently open.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
streams: Map<StreamId, ProcStream>;
|
|
28
|
+
}
|
|
29
|
+
interface ProcStream {
|
|
30
|
+
streamId: StreamId;
|
|
31
|
+
from: TransportClientId;
|
|
32
|
+
procedureName: string;
|
|
33
|
+
serviceName: string;
|
|
34
|
+
sessionMetadata: ParsedMetadata;
|
|
35
|
+
procedure: AnyProcedure;
|
|
36
|
+
handleMsg: (msg: OpaqueTransportMessage) => void;
|
|
37
|
+
handleSessionDisconnect: () => void;
|
|
28
38
|
}
|
|
29
39
|
/**
|
|
30
40
|
* Creates a server instance that listens for incoming messages from a transport and routes them to the appropriate service and procedure.
|
|
@@ -39,12 +49,12 @@ declare function createServer<Services extends AnyServiceSchemaMap>(transport: S
|
|
|
39
49
|
handshakeOptions?: ServerHandshakeOptions;
|
|
40
50
|
extendedContext?: Omit<ServiceContext, 'state'>;
|
|
41
51
|
/**
|
|
42
|
-
* Maximum number of
|
|
52
|
+
* Maximum number of cancelled streams to keep track of to avoid
|
|
43
53
|
* cascading stream errors.
|
|
44
54
|
*/
|
|
45
|
-
|
|
55
|
+
maxCancelledStreamTombstonesPerSession?: number;
|
|
46
56
|
}>): Server<Services>;
|
|
47
57
|
|
|
48
|
-
var version = "0.200.
|
|
58
|
+
var version = "0.200.2";
|
|
49
59
|
|
|
50
|
-
export { version as RIVER_VERSION, Server, ServiceContext, createServer };
|
|
60
|
+
export { ParsedMetadata, version as RIVER_VERSION, Server, ServiceContext, createServer };
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap } from '../services-
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, g as AnyProcedure } from '../services-259f39a3.js';
|
|
2
|
+
export { B as BaseErrorSchemaType, H as CANCEL_CODE, K as Client, L as Err, N as ErrResult, G as INVALID_REQUEST_CODE, O as Ok, Q as OkResult, P as PayloadType, m as ProcErrors, i as ProcHandler, j as ProcInit, k as ProcRequest, l as ProcResponse, n as ProcType, d as Procedure, c as ProcedureErrorSchemaType, x as ProcedureMap, y as RPCProcedure, R as Readable, f as ReaderErrorSchema, Y as ResponseData, e as Result, X as ResultUnwrapErr, T as ResultUnwrapOk, r as SerializedProcedureSchema, w as SerializedProcedureSchemaProtocolv1, p as SerializedServerSchema, u as SerializedServerSchemaProtocolv1, q as SerializedServiceSchema, v as SerializedServiceSchemaProtocolv1, S as Service, h as ServiceConfiguration, o as ServiceSchema, C as StreamProcedure, z as SubscriptionProcedure, E as UNCAUGHT_ERROR_CODE, F as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, J as createClient, D as flattenErrorType, s as serializeSchema, t as serializeSchemaV1Compat, M as unwrapOrThrow } from '../services-259f39a3.js';
|
|
3
|
+
import { c as TransportClientId, b as OpaqueTransportMessage } from '../message-57bb8187.js';
|
|
4
|
+
import { t as ParsedMetadata, C as Connection, u as ServerHandshakeOptions, p as ServiceContext } from '../context-69f37ac1.js';
|
|
5
|
+
export { v as ProcedureHandlerContext, w as createClientHandshakeOptions, x as createServerHandshakeOptions } from '../context-69f37ac1.js';
|
|
6
|
+
import { S as ServerTransport } from '../server-8fdd7fb2.js';
|
|
6
7
|
import '@sinclair/typebox';
|
|
7
|
-
import '../
|
|
8
|
+
import '../client-9292552a.js';
|
|
8
9
|
import '@sinclair/typebox/value';
|
|
9
10
|
import '@opentelemetry/api';
|
|
10
|
-
import '../client-22a47343.js';
|
|
11
11
|
import '@sinclair/typebox/errors';
|
|
12
12
|
import '../types-3e5768ec.js';
|
|
13
13
|
|
|
@@ -24,7 +24,17 @@ interface Server<Services extends AnyServiceSchemaMap> {
|
|
|
24
24
|
/**
|
|
25
25
|
* A set of stream ids that are currently open.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
streams: Map<StreamId, ProcStream>;
|
|
28
|
+
}
|
|
29
|
+
interface ProcStream {
|
|
30
|
+
streamId: StreamId;
|
|
31
|
+
from: TransportClientId;
|
|
32
|
+
procedureName: string;
|
|
33
|
+
serviceName: string;
|
|
34
|
+
sessionMetadata: ParsedMetadata;
|
|
35
|
+
procedure: AnyProcedure;
|
|
36
|
+
handleMsg: (msg: OpaqueTransportMessage) => void;
|
|
37
|
+
handleSessionDisconnect: () => void;
|
|
28
38
|
}
|
|
29
39
|
/**
|
|
30
40
|
* Creates a server instance that listens for incoming messages from a transport and routes them to the appropriate service and procedure.
|
|
@@ -39,12 +49,12 @@ declare function createServer<Services extends AnyServiceSchemaMap>(transport: S
|
|
|
39
49
|
handshakeOptions?: ServerHandshakeOptions;
|
|
40
50
|
extendedContext?: Omit<ServiceContext, 'state'>;
|
|
41
51
|
/**
|
|
42
|
-
* Maximum number of
|
|
52
|
+
* Maximum number of cancelled streams to keep track of to avoid
|
|
43
53
|
* cascading stream errors.
|
|
44
54
|
*/
|
|
45
|
-
|
|
55
|
+
maxCancelledStreamTombstonesPerSession?: number;
|
|
46
56
|
}>): Server<Services>;
|
|
47
57
|
|
|
48
|
-
var version = "0.200.
|
|
58
|
+
var version = "0.200.2";
|
|
49
59
|
|
|
50
|
-
export { version as RIVER_VERSION, Server, ServiceContext, createServer };
|
|
60
|
+
export { ParsedMetadata, version as RIVER_VERSION, Server, ServiceContext, createServer };
|