@replit/river 0.216.0 → 0.216.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/dist/{chunk-75ZMPCKC.js → chunk-CH3OPDPY.js} +10 -3
- package/dist/chunk-CH3OPDPY.js.map +1 -0
- package/dist/{chunk-ZLMQQI43.js → chunk-QFJGMDOX.js} +11 -3
- package/dist/chunk-QFJGMDOX.js.map +1 -0
- package/dist/{client-BNc5Pj_4.d.ts → client-CKThx0WA.d.ts} +1 -1
- package/dist/{client-BZUvFL6B.d.cts → client-CNO_SC1d.d.cts} +1 -1
- package/dist/codec/index.js +2 -2
- package/dist/{connection-xxgJHs2o.d.cts → connection-DkWD1Ptu.d.cts} +1 -1
- package/dist/{connection-ou9w2dSY.d.ts → connection-Dngmtp2E.d.ts} +1 -1
- package/dist/protobuf/index.cjs +3 -3
- package/dist/protobuf/index.cjs.map +1 -1
- package/dist/protobuf/index.d.cts +6 -6
- package/dist/protobuf/index.d.ts +6 -6
- package/dist/protobuf/index.js +3 -3
- package/dist/protobuf/index.js.map +1 -1
- package/dist/router/index.cjs +10 -2
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +7 -7
- package/dist/router/index.d.ts +7 -7
- package/dist/router/index.js +1 -1
- package/dist/{server-JdnoVO11.d.cts → server-BrCIPno6.d.cts} +1 -1
- package/dist/{server-BPu7Td80.d.ts → server-CSkUpJcH.d.ts} +1 -1
- package/dist/{services-BrTFTO5Q.d.ts → services-BlGhziCQ.d.ts} +13 -3
- package/dist/{services-cwGAC2rB.d.cts → services-DoCToSxW.d.cts} +13 -3
- package/dist/testUtil/index.cjs +9 -2
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.d.cts +4 -4
- package/dist/testUtil/index.d.ts +4 -4
- package/dist/testUtil/index.js +2 -2
- package/dist/transport/impls/ws/client.cjs +7 -1
- 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 +2 -2
- package/dist/transport/impls/ws/server.cjs +9 -2
- 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 +2 -2
- package/dist/transport/index.cjs +9 -2
- 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 +2 -2
- package/dist/{transport-BnU3Zb0Q.d.cts → transport-CxBpuW-Q.d.cts} +9 -8
- package/dist/{transport-B1MUtXL7.d.ts → transport-KOCn1fvT.d.ts} +9 -8
- package/package.json +1 -1
- package/dist/chunk-75ZMPCKC.js.map +0 -1
- package/dist/chunk-ZLMQQI43.js.map +0 -1
package/dist/router/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as ProcedureHandlerContext, a as PayloadType, M as MaybeDisposable, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-
|
|
2
|
-
export { B as BaseErrorSchemaType, C as CANCEL_CODE, c as Client, E as Err,
|
|
1
|
+
import { P as ProcedureHandlerContext, a as PayloadType, M as MaybeDisposable, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-DoCToSxW.cjs';
|
|
2
|
+
export { B as BaseErrorSchemaType, C as CANCEL_CODE, c as CallOptions, d as Client, e as ClientOptions, E as Err, f as ErrResult, g as INVALID_REQUEST_CODE, O as Ok, h as OkResult, i as ProcErrors, j as ProcHandler, k as ProcInit, l as ProcRequest, m as ProcResponse, n as ProcType, o as Procedure, p as ProcedureErrorSchemaType, q as ProcedureMap, R as RPCProcedure, r as RawReadable, s as Readable, t as ReadableBrokenError, u as ReadableResult, v as ReaderErrorSchema, w as ResponseData, x as Result, y as ResultUnwrapErr, z as ResultUnwrapOk, S as SerializedProcedureSchema, D as SerializedProcedureSchemaProtocolv1, F as SerializedServerSchema, G as SerializedServerSchemaProtocolv1, H as SerializedServiceSchema, J as SerializedServiceSchemaProtocolv1, K as Service, L as ServiceConfiguration, N as StreamProcedure, Q as SubscriptionProcedure, U as UNCAUGHT_ERROR_CODE, T as UNEXPECTED_DISCONNECT_CODE, V as UploadProcedure, W as ValidProcType, X as Writable, Y as createClient, Z as createServiceSchema, _ as flattenErrorType, $ as serializeSchema, a0 as serializeSchemaV1Compat } from '../services-DoCToSxW.cjs';
|
|
3
3
|
import { Static, TSchema } from '@sinclair/typebox';
|
|
4
4
|
import { T as TransportClientId, O as OpaqueTransportMessage } from '../message-CpXWqmJw.cjs';
|
|
5
|
-
import { C as Connection, q as ServerHandshakeOptions } from '../transport-
|
|
6
|
-
export { r as createClientHandshakeOptions, s as createServerHandshakeOptions } from '../transport-
|
|
7
|
-
import { S as ServerTransport } from '../server-
|
|
5
|
+
import { C as Connection, q as ServerHandshakeOptions } from '../transport-CxBpuW-Q.cjs';
|
|
6
|
+
export { r as createClientHandshakeOptions, s as createServerHandshakeOptions } from '../transport-CxBpuW-Q.cjs';
|
|
7
|
+
import { S as ServerTransport } from '../server-BrCIPno6.cjs';
|
|
8
8
|
import '@opentelemetry/api';
|
|
9
|
-
import '../client-
|
|
9
|
+
import '../client-CNO_SC1d.cjs';
|
|
10
10
|
import '../index-BAGGleT3.cjs';
|
|
11
11
|
import '../types-BGGvYIJM.cjs';
|
|
12
12
|
import '../adapter-D5X11kmP.cjs';
|
|
@@ -75,6 +75,6 @@ declare function createServer<MetadataSchema extends TSchema, ParsedMetadata ext
|
|
|
75
75
|
middlewares?: Array<Middleware>;
|
|
76
76
|
}>): Server<Context, ParsedMetadata, Services>;
|
|
77
77
|
|
|
78
|
-
var version = "0.216.
|
|
78
|
+
var version = "0.216.2";
|
|
79
79
|
|
|
80
80
|
export { MaybeDisposable, type Middleware, type MiddlewareContext, type MiddlewareParam, PayloadType, ProcedureHandlerContext, version as RIVER_VERSION, type Server, createServer };
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as ProcedureHandlerContext, a as PayloadType, M as MaybeDisposable, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-
|
|
2
|
-
export { B as BaseErrorSchemaType, C as CANCEL_CODE, c as Client, E as Err,
|
|
1
|
+
import { P as ProcedureHandlerContext, a as PayloadType, M as MaybeDisposable, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-BlGhziCQ.js';
|
|
2
|
+
export { B as BaseErrorSchemaType, C as CANCEL_CODE, c as CallOptions, d as Client, e as ClientOptions, E as Err, f as ErrResult, g as INVALID_REQUEST_CODE, O as Ok, h as OkResult, i as ProcErrors, j as ProcHandler, k as ProcInit, l as ProcRequest, m as ProcResponse, n as ProcType, o as Procedure, p as ProcedureErrorSchemaType, q as ProcedureMap, R as RPCProcedure, r as RawReadable, s as Readable, t as ReadableBrokenError, u as ReadableResult, v as ReaderErrorSchema, w as ResponseData, x as Result, y as ResultUnwrapErr, z as ResultUnwrapOk, S as SerializedProcedureSchema, D as SerializedProcedureSchemaProtocolv1, F as SerializedServerSchema, G as SerializedServerSchemaProtocolv1, H as SerializedServiceSchema, J as SerializedServiceSchemaProtocolv1, K as Service, L as ServiceConfiguration, N as StreamProcedure, Q as SubscriptionProcedure, U as UNCAUGHT_ERROR_CODE, T as UNEXPECTED_DISCONNECT_CODE, V as UploadProcedure, W as ValidProcType, X as Writable, Y as createClient, Z as createServiceSchema, _ as flattenErrorType, $ as serializeSchema, a0 as serializeSchemaV1Compat } from '../services-BlGhziCQ.js';
|
|
3
3
|
import { Static, TSchema } from '@sinclair/typebox';
|
|
4
4
|
import { T as TransportClientId, O as OpaqueTransportMessage } from '../message-CpXWqmJw.js';
|
|
5
|
-
import { C as Connection, q as ServerHandshakeOptions } from '../transport-
|
|
6
|
-
export { r as createClientHandshakeOptions, s as createServerHandshakeOptions } from '../transport-
|
|
7
|
-
import { S as ServerTransport } from '../server-
|
|
5
|
+
import { C as Connection, q as ServerHandshakeOptions } from '../transport-KOCn1fvT.js';
|
|
6
|
+
export { r as createClientHandshakeOptions, s as createServerHandshakeOptions } from '../transport-KOCn1fvT.js';
|
|
7
|
+
import { S as ServerTransport } from '../server-CSkUpJcH.js';
|
|
8
8
|
import '@opentelemetry/api';
|
|
9
|
-
import '../client-
|
|
9
|
+
import '../client-CKThx0WA.js';
|
|
10
10
|
import '../index-ZWkoesQD.js';
|
|
11
11
|
import '../types-BGGvYIJM.js';
|
|
12
12
|
import '../adapter-BXCk-dmy.js';
|
|
@@ -75,6 +75,6 @@ declare function createServer<MetadataSchema extends TSchema, ParsedMetadata ext
|
|
|
75
75
|
middlewares?: Array<Middleware>;
|
|
76
76
|
}>): Server<Context, ParsedMetadata, Services>;
|
|
77
77
|
|
|
78
|
-
var version = "0.216.
|
|
78
|
+
var version = "0.216.2";
|
|
79
79
|
|
|
80
80
|
export { MaybeDisposable, type Middleware, type MiddlewareContext, type MiddlewareParam, PayloadType, ProcedureHandlerContext, version as RIVER_VERSION, type Server, createServer };
|
package/dist/router/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Connection, t as CommonSession, j as SessionState, u as CommonSessionProps, T as Transport, v as ServerTransportOptions, q as ServerHandshakeOptions, w as ServerSession, e as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './transport-
|
|
1
|
+
import { C as Connection, t as CommonSession, j as SessionState, u as CommonSessionProps, T as Transport, v as ServerTransportOptions, q as ServerHandshakeOptions, w as ServerSession, e as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './transport-CxBpuW-Q.cjs';
|
|
2
2
|
import { O as OpaqueTransportMessage, H as HandshakeErrorResponseCodes, P as ProtocolVersion, b as TransportMessage, T as TransportClientId } from './message-CpXWqmJw.cjs';
|
|
3
3
|
import { Static, TSchema } from '@sinclair/typebox';
|
|
4
4
|
import { T as Tags } from './index-BAGGleT3.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Connection, t as CommonSession, j as SessionState, u as CommonSessionProps, T as Transport, v as ServerTransportOptions, q as ServerHandshakeOptions, w as ServerSession, e as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './transport-
|
|
1
|
+
import { C as Connection, t as CommonSession, j as SessionState, u as CommonSessionProps, T as Transport, v as ServerTransportOptions, q as ServerHandshakeOptions, w as ServerSession, e as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './transport-KOCn1fvT.js';
|
|
2
2
|
import { O as OpaqueTransportMessage, H as HandshakeErrorResponseCodes, P as ProtocolVersion, b as TransportMessage, T as TransportClientId } from './message-CpXWqmJw.js';
|
|
3
3
|
import { Static, TSchema } from '@sinclair/typebox';
|
|
4
4
|
import { T as Tags } from './index-ZWkoesQD.js';
|
|
@@ -2,8 +2,8 @@ import * as _sinclair_typebox from '@sinclair/typebox';
|
|
|
2
2
|
import { TObject, TLiteral, TEnum, TString, TSchema, TNever, TUnion, Static } from '@sinclair/typebox';
|
|
3
3
|
import { Span } from '@opentelemetry/api';
|
|
4
4
|
import { T as TransportClientId } from './message-CpXWqmJw.js';
|
|
5
|
-
import { C as Connection, n as ClientHandshakeOptions, z as SessionId } from './transport-
|
|
6
|
-
import { C as ClientTransport } from './client-
|
|
5
|
+
import { C as Connection, n as ClientHandshakeOptions, z as SessionId } from './transport-KOCn1fvT.js';
|
|
6
|
+
import { C as ClientTransport } from './client-CKThx0WA.js';
|
|
7
7
|
|
|
8
8
|
declare const ReadableBrokenError: {
|
|
9
9
|
readonly code: "READABLE_BROKEN";
|
|
@@ -225,6 +225,16 @@ type Client<Services extends AnyServiceSchemaMap<any>, IS extends InstantiatedSe
|
|
|
225
225
|
interface ClientOptions {
|
|
226
226
|
connectOnInvoke: boolean;
|
|
227
227
|
eagerlyConnect: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Default options merged into every leaf call (`rpc`, `stream`,
|
|
230
|
+
* `upload`, `subscribe`). Caller-supplied `options` win field-by-field,
|
|
231
|
+
* so a caller can override `signal` while keeping other defaults.
|
|
232
|
+
*
|
|
233
|
+
* Pass a function form when the default needs to be re-resolved per
|
|
234
|
+
* call (e.g. an ambient signal that changes between invocations of
|
|
235
|
+
* the same client).
|
|
236
|
+
*/
|
|
237
|
+
defaultCallOptions?: CallOptions | (() => CallOptions);
|
|
228
238
|
}
|
|
229
239
|
/**
|
|
230
240
|
* Creates a client for a given server using the provided transport.
|
|
@@ -1122,4 +1132,4 @@ declare class ServiceScaffold<Context extends MaybeDisposable, State extends obj
|
|
|
1122
1132
|
};
|
|
1123
1133
|
}
|
|
1124
1134
|
|
|
1125
|
-
export {
|
|
1135
|
+
export { serializeSchema as $, type AnyServiceSchemaMap as A, type BaseErrorSchemaType as B, CANCEL_CODE as C, type SerializedProcedureSchemaProtocolv1 as D, Err as E, type SerializedServerSchema as F, type SerializedServerSchemaProtocolv1 as G, type SerializedServiceSchema as H, type InstantiatedServiceSchemaMap as I, type SerializedServiceSchemaProtocolv1 as J, type Service as K, type ServiceConfiguration as L, type MaybeDisposable as M, type StreamProcedure as N, Ok as O, type ProcedureHandlerContext as P, type SubscriptionProcedure as Q, type RpcProcedure as R, type SerializedProcedureSchema as S, UNEXPECTED_DISCONNECT_CODE as T, UNCAUGHT_ERROR_CODE as U, type UploadProcedure as V, type ValidProcType as W, type Writable as X, createClient as Y, createServiceSchema as Z, flattenErrorType as _, type PayloadType as a, serializeSchemaV1Compat as a0, type ReadableIterator as a1, type ErrorPayload as a2, type AnyProcedure as b, type CallOptions as c, type Client as d, type ClientOptions as e, type ErrResult as f, INVALID_REQUEST_CODE as g, type OkResult as h, type ProcErrors as i, type ProcHandler as j, type ProcInit as k, type ProcRequest as l, type ProcResponse as m, type ProcType as n, Procedure as o, type ProcedureErrorSchemaType as p, type ProcedureMap as q, ReadableImpl as r, type Readable as s, ReadableBrokenError as t, type ReadableResult as u, ReaderErrorSchema as v, type ResponseData as w, type Result as x, type ResultUnwrapErr as y, type ResultUnwrapOk as z };
|
|
@@ -2,8 +2,8 @@ import * as _sinclair_typebox from '@sinclair/typebox';
|
|
|
2
2
|
import { TObject, TLiteral, TEnum, TString, TSchema, TNever, TUnion, Static } from '@sinclair/typebox';
|
|
3
3
|
import { Span } from '@opentelemetry/api';
|
|
4
4
|
import { T as TransportClientId } from './message-CpXWqmJw.cjs';
|
|
5
|
-
import { C as Connection, n as ClientHandshakeOptions, z as SessionId } from './transport-
|
|
6
|
-
import { C as ClientTransport } from './client-
|
|
5
|
+
import { C as Connection, n as ClientHandshakeOptions, z as SessionId } from './transport-CxBpuW-Q.cjs';
|
|
6
|
+
import { C as ClientTransport } from './client-CNO_SC1d.cjs';
|
|
7
7
|
|
|
8
8
|
declare const ReadableBrokenError: {
|
|
9
9
|
readonly code: "READABLE_BROKEN";
|
|
@@ -225,6 +225,16 @@ type Client<Services extends AnyServiceSchemaMap<any>, IS extends InstantiatedSe
|
|
|
225
225
|
interface ClientOptions {
|
|
226
226
|
connectOnInvoke: boolean;
|
|
227
227
|
eagerlyConnect: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Default options merged into every leaf call (`rpc`, `stream`,
|
|
230
|
+
* `upload`, `subscribe`). Caller-supplied `options` win field-by-field,
|
|
231
|
+
* so a caller can override `signal` while keeping other defaults.
|
|
232
|
+
*
|
|
233
|
+
* Pass a function form when the default needs to be re-resolved per
|
|
234
|
+
* call (e.g. an ambient signal that changes between invocations of
|
|
235
|
+
* the same client).
|
|
236
|
+
*/
|
|
237
|
+
defaultCallOptions?: CallOptions | (() => CallOptions);
|
|
228
238
|
}
|
|
229
239
|
/**
|
|
230
240
|
* Creates a client for a given server using the provided transport.
|
|
@@ -1122,4 +1132,4 @@ declare class ServiceScaffold<Context extends MaybeDisposable, State extends obj
|
|
|
1122
1132
|
};
|
|
1123
1133
|
}
|
|
1124
1134
|
|
|
1125
|
-
export {
|
|
1135
|
+
export { serializeSchema as $, type AnyServiceSchemaMap as A, type BaseErrorSchemaType as B, CANCEL_CODE as C, type SerializedProcedureSchemaProtocolv1 as D, Err as E, type SerializedServerSchema as F, type SerializedServerSchemaProtocolv1 as G, type SerializedServiceSchema as H, type InstantiatedServiceSchemaMap as I, type SerializedServiceSchemaProtocolv1 as J, type Service as K, type ServiceConfiguration as L, type MaybeDisposable as M, type StreamProcedure as N, Ok as O, type ProcedureHandlerContext as P, type SubscriptionProcedure as Q, type RpcProcedure as R, type SerializedProcedureSchema as S, UNEXPECTED_DISCONNECT_CODE as T, UNCAUGHT_ERROR_CODE as U, type UploadProcedure as V, type ValidProcType as W, type Writable as X, createClient as Y, createServiceSchema as Z, flattenErrorType as _, type PayloadType as a, serializeSchemaV1Compat as a0, type ReadableIterator as a1, type ErrorPayload as a2, type AnyProcedure as b, type CallOptions as c, type Client as d, type ClientOptions as e, type ErrResult as f, INVALID_REQUEST_CODE as g, type OkResult as h, type ProcErrors as i, type ProcHandler as j, type ProcInit as k, type ProcRequest as l, type ProcResponse as m, type ProcType as n, Procedure as o, type ProcedureErrorSchemaType as p, type ProcedureMap as q, ReadableImpl as r, type Readable as s, ReadableBrokenError as t, type ReadableResult as u, ReaderErrorSchema as v, type ResponseData as w, type Result as x, type ResultUnwrapErr as y, type ResultUnwrapOk as z };
|
package/dist/testUtil/index.cjs
CHANGED
|
@@ -564,7 +564,7 @@ function coerceErrorString(err) {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
// package.json
|
|
567
|
-
var version = "0.216.
|
|
567
|
+
var version = "0.216.2";
|
|
568
568
|
|
|
569
569
|
// tracing/index.ts
|
|
570
570
|
function getPropagationContext(ctx) {
|
|
@@ -865,6 +865,12 @@ var SessionConnected = class extends IdentifiedSession {
|
|
|
865
865
|
return;
|
|
866
866
|
}
|
|
867
867
|
const parsedMsg = parsedMsgRes.value;
|
|
868
|
+
if (parsedMsg.from !== this.to) {
|
|
869
|
+
this.listeners.onInvalidMessage(
|
|
870
|
+
`received message with 'from' (${parsedMsg.from}) that does not match the session peer (${this.to})`
|
|
871
|
+
);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
868
874
|
if (parsedMsg.seq !== this.ack) {
|
|
869
875
|
if (parsedMsg.seq < this.ack) {
|
|
870
876
|
this.log?.debug(
|
|
@@ -2026,7 +2032,8 @@ var ServerTransport = class extends Transport {
|
|
|
2026
2032
|
try {
|
|
2027
2033
|
parsedMetadataOrFailureCode = await this.handshakeExtensions.validate(
|
|
2028
2034
|
msg.payload.metadata,
|
|
2029
|
-
previousParsedMetadata
|
|
2035
|
+
previousParsedMetadata,
|
|
2036
|
+
msg.from
|
|
2030
2037
|
);
|
|
2031
2038
|
} catch (err) {
|
|
2032
2039
|
this.rejectHandshakeRequest(
|