@replit/river 0.209.3 → 0.209.4
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-EHTVQM2C.js → chunk-MIO5URHT.js} +2 -2
- package/dist/chunk-MIO5URHT.js.map +1 -0
- package/dist/{chunk-JRBDMLR3.js → chunk-SWRTP3YW.js} +12 -5
- package/dist/chunk-SWRTP3YW.js.map +1 -0
- package/dist/{chunk-I24PIZXW.js → chunk-VQAPXMIR.js} +16 -7
- package/dist/chunk-VQAPXMIR.js.map +1 -0
- package/dist/{client-aETS93z1.d.cts → client-DXJRow2s.d.cts} +1 -1
- package/dist/{client-BzJwq-hg.d.ts → client-Dw0JBBs3.d.ts} +1 -1
- package/dist/codec/index.js +2 -2
- package/dist/{connection-hUWlS-hg.d.cts → connection-BWkuQM31.d.cts} +1 -1
- package/dist/{connection-b1wd5XrC.d.ts → connection-T0wHyOsa.d.ts} +1 -1
- package/dist/router/index.cjs +1 -1
- 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-BBgDVOzk.d.cts → server-BDSYa-CO.d.cts} +1 -1
- package/dist/{server-DZ0Yzmpf.d.ts → server-DFOzjvLh.d.ts} +1 -1
- package/dist/{services-DYik59tk.d.ts → services-DEubFUIR.d.ts} +4 -4
- package/dist/{services-C53K219K.d.cts → services-GJyw0jKV.d.cts} +4 -4
- package/dist/testUtil/index.cjs +15 -6
- 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 +25 -9
- 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 +3 -3
- package/dist/transport/impls/ws/server.cjs +13 -5
- 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 +3 -3
- package/dist/transport/index.cjs +15 -6
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +3 -3
- package/dist/transport/index.d.ts +3 -3
- package/dist/transport/index.js +2 -2
- package/dist/{transport-CxjUaGhi.d.cts → transport-CxT7y8Qk.d.cts} +5 -0
- package/dist/{transport-DwEB67zY.d.ts → transport-pdbkDzmJ.d.ts} +5 -0
- package/package.json +1 -1
- package/dist/chunk-EHTVQM2C.js.map +0 -1
- package/dist/chunk-I24PIZXW.js.map +0 -1
- package/dist/chunk-JRBDMLR3.js.map +0 -1
package/dist/router/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as AnyServiceSchemaMap, P as ProcedureHandlerContext, a as PayloadType, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-
|
|
2
|
-
export { J as BaseErrorSchemaType, G as CANCEL_CODE, L as Client, M as Err, Q as ErrResult, F as INVALID_REQUEST_CODE, O as Ok, T as OkResult, h as ProcErrors, d as ProcHandler, e as ProcInit, f as ProcRequest, g as ProcResponse, i as ProcType, z as Procedure, B as ProcedureErrorSchemaType, r as ProcedureMap, R as RPCProcedure, y as RawReadable, v as Readable, x as ReadableBrokenError, w as ReadableResult, H as ReaderErrorSchema, Z as ResponseData, N as Result, Y as ResultUnwrapErr, X as ResultUnwrapOk, m as SerializedProcedureSchema, q as SerializedProcedureSchemaProtocolv1, k as SerializedServerSchema, o as SerializedServerSchemaProtocolv1, l as SerializedServiceSchema, p as SerializedServiceSchemaProtocolv1, S as Service, c as ServiceConfiguration, u as StreamProcedure, t as SubscriptionProcedure, D as UNCAUGHT_ERROR_CODE, E as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, K as createClient, j as createServiceSchema, C as flattenErrorType, s as serializeSchema, n as serializeSchemaV1Compat } from '../services-
|
|
1
|
+
import { A as AnyServiceSchemaMap, P as ProcedureHandlerContext, a as PayloadType, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-GJyw0jKV.cjs';
|
|
2
|
+
export { J as BaseErrorSchemaType, G as CANCEL_CODE, L as Client, M as Err, Q as ErrResult, F as INVALID_REQUEST_CODE, O as Ok, T as OkResult, h as ProcErrors, d as ProcHandler, e as ProcInit, f as ProcRequest, g as ProcResponse, i as ProcType, z as Procedure, B as ProcedureErrorSchemaType, r as ProcedureMap, R as RPCProcedure, y as RawReadable, v as Readable, x as ReadableBrokenError, w as ReadableResult, H as ReaderErrorSchema, Z as ResponseData, N as Result, Y as ResultUnwrapErr, X as ResultUnwrapOk, m as SerializedProcedureSchema, q as SerializedProcedureSchemaProtocolv1, k as SerializedServerSchema, o as SerializedServerSchemaProtocolv1, l as SerializedServiceSchema, p as SerializedServiceSchemaProtocolv1, S as Service, c as ServiceConfiguration, u as StreamProcedure, t as SubscriptionProcedure, D as UNCAUGHT_ERROR_CODE, E as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, K as createClient, j as createServiceSchema, C as flattenErrorType, s as serializeSchema, n as serializeSchemaV1Compat } from '../services-GJyw0jKV.cjs';
|
|
3
3
|
import { TSchema, Static } from '@sinclair/typebox';
|
|
4
4
|
import { c as TransportClientId, b as OpaqueTransportMessage } from '../message-Dlsh5WDF.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-CxT7y8Qk.cjs';
|
|
6
|
+
export { r as createClientHandshakeOptions, s as createServerHandshakeOptions } from '../transport-CxT7y8Qk.cjs';
|
|
7
|
+
import { S as ServerTransport } from '../server-BDSYa-CO.cjs';
|
|
8
8
|
import '@opentelemetry/api';
|
|
9
|
-
import '../client-
|
|
9
|
+
import '../client-DXJRow2s.cjs';
|
|
10
10
|
import '../index-D9R6UTMl.cjs';
|
|
11
11
|
import '../adapter-DjiEwOYi.cjs';
|
|
12
12
|
|
|
@@ -74,6 +74,6 @@ declare function createServer<Context extends object, MetadataSchema extends TSc
|
|
|
74
74
|
middlewares?: Array<Middleware>;
|
|
75
75
|
}>): Server<Context, ParsedMetadata, Services>;
|
|
76
76
|
|
|
77
|
-
var version = "0.209.
|
|
77
|
+
var version = "0.209.4";
|
|
78
78
|
|
|
79
79
|
export { 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 { A as AnyServiceSchemaMap, P as ProcedureHandlerContext, a as PayloadType, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-
|
|
2
|
-
export { J as BaseErrorSchemaType, G as CANCEL_CODE, L as Client, M as Err, Q as ErrResult, F as INVALID_REQUEST_CODE, O as Ok, T as OkResult, h as ProcErrors, d as ProcHandler, e as ProcInit, f as ProcRequest, g as ProcResponse, i as ProcType, z as Procedure, B as ProcedureErrorSchemaType, r as ProcedureMap, R as RPCProcedure, y as RawReadable, v as Readable, x as ReadableBrokenError, w as ReadableResult, H as ReaderErrorSchema, Z as ResponseData, N as Result, Y as ResultUnwrapErr, X as ResultUnwrapOk, m as SerializedProcedureSchema, q as SerializedProcedureSchemaProtocolv1, k as SerializedServerSchema, o as SerializedServerSchemaProtocolv1, l as SerializedServiceSchema, p as SerializedServiceSchemaProtocolv1, S as Service, c as ServiceConfiguration, u as StreamProcedure, t as SubscriptionProcedure, D as UNCAUGHT_ERROR_CODE, E as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, K as createClient, j as createServiceSchema, C as flattenErrorType, s as serializeSchema, n as serializeSchemaV1Compat } from '../services-
|
|
1
|
+
import { A as AnyServiceSchemaMap, P as ProcedureHandlerContext, a as PayloadType, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-DEubFUIR.js';
|
|
2
|
+
export { J as BaseErrorSchemaType, G as CANCEL_CODE, L as Client, M as Err, Q as ErrResult, F as INVALID_REQUEST_CODE, O as Ok, T as OkResult, h as ProcErrors, d as ProcHandler, e as ProcInit, f as ProcRequest, g as ProcResponse, i as ProcType, z as Procedure, B as ProcedureErrorSchemaType, r as ProcedureMap, R as RPCProcedure, y as RawReadable, v as Readable, x as ReadableBrokenError, w as ReadableResult, H as ReaderErrorSchema, Z as ResponseData, N as Result, Y as ResultUnwrapErr, X as ResultUnwrapOk, m as SerializedProcedureSchema, q as SerializedProcedureSchemaProtocolv1, k as SerializedServerSchema, o as SerializedServerSchemaProtocolv1, l as SerializedServiceSchema, p as SerializedServiceSchemaProtocolv1, S as Service, c as ServiceConfiguration, u as StreamProcedure, t as SubscriptionProcedure, D as UNCAUGHT_ERROR_CODE, E as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, K as createClient, j as createServiceSchema, C as flattenErrorType, s as serializeSchema, n as serializeSchemaV1Compat } from '../services-DEubFUIR.js';
|
|
3
3
|
import { TSchema, Static } from '@sinclair/typebox';
|
|
4
4
|
import { c as TransportClientId, b as OpaqueTransportMessage } from '../message-Dlsh5WDF.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-pdbkDzmJ.js';
|
|
6
|
+
export { r as createClientHandshakeOptions, s as createServerHandshakeOptions } from '../transport-pdbkDzmJ.js';
|
|
7
|
+
import { S as ServerTransport } from '../server-DFOzjvLh.js';
|
|
8
8
|
import '@opentelemetry/api';
|
|
9
|
-
import '../client-
|
|
9
|
+
import '../client-Dw0JBBs3.js';
|
|
10
10
|
import '../index-CSM8soK7.js';
|
|
11
11
|
import '../adapter-Cp7_gIVA.js';
|
|
12
12
|
|
|
@@ -74,6 +74,6 @@ declare function createServer<Context extends object, MetadataSchema extends TSc
|
|
|
74
74
|
middlewares?: Array<Middleware>;
|
|
75
75
|
}>): Server<Context, ParsedMetadata, Services>;
|
|
76
76
|
|
|
77
|
-
var version = "0.209.
|
|
77
|
+
var version = "0.209.4";
|
|
78
78
|
|
|
79
79
|
export { 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, d as SessionState, u as CommonSessionProps, T as Transport, v as ServerTransportOptions, q as ServerHandshakeOptions, w as ServerSession, c as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './transport-
|
|
1
|
+
import { C as Connection, t as CommonSession, d as SessionState, u as CommonSessionProps, T as Transport, v as ServerTransportOptions, q as ServerHandshakeOptions, w as ServerSession, c as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './transport-CxT7y8Qk.cjs';
|
|
2
2
|
import { b as OpaqueTransportMessage, H as HandshakeErrorResponseCodes, P as ProtocolVersion, a as TransportMessage, c as TransportClientId } from './message-Dlsh5WDF.cjs';
|
|
3
3
|
import { Static, TSchema } from '@sinclair/typebox';
|
|
4
4
|
import { T as Tags } from './index-D9R6UTMl.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Connection, t as CommonSession, d as SessionState, u as CommonSessionProps, T as Transport, v as ServerTransportOptions, q as ServerHandshakeOptions, w as ServerSession, c as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './transport-
|
|
1
|
+
import { C as Connection, t as CommonSession, d as SessionState, u as CommonSessionProps, T as Transport, v as ServerTransportOptions, q as ServerHandshakeOptions, w as ServerSession, c as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './transport-pdbkDzmJ.js';
|
|
2
2
|
import { b as OpaqueTransportMessage, H as HandshakeErrorResponseCodes, P as ProtocolVersion, a as TransportMessage, c as TransportClientId } from './message-Dlsh5WDF.js';
|
|
3
3
|
import { Static, TSchema } from '@sinclair/typebox';
|
|
4
4
|
import { T as Tags } from './index-CSM8soK7.js';
|
|
@@ -2,8 +2,8 @@ import * as _sinclair_typebox from '@sinclair/typebox';
|
|
|
2
2
|
import { TObject, TLiteral, TString, TSchema, TNever, TUnion, Static } from '@sinclair/typebox';
|
|
3
3
|
import { Span } from '@opentelemetry/api';
|
|
4
4
|
import { c as TransportClientId } from './message-Dlsh5WDF.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-pdbkDzmJ.js';
|
|
6
|
+
import { C as ClientTransport } from './client-Dw0JBBs3.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* {@link UNCAUGHT_ERROR_CODE} is the code that is used when an error is thrown
|
|
@@ -656,7 +656,7 @@ declare const Procedure: {
|
|
|
656
656
|
interface Service<Context, State extends object, ParsedMetadata, Procs extends ProcedureMap<Context, State, ParsedMetadata>> {
|
|
657
657
|
readonly state: State;
|
|
658
658
|
readonly procedures: Procs;
|
|
659
|
-
[Symbol.asyncDispose]: () =>
|
|
659
|
+
[Symbol.asyncDispose]: () => PromiseLike<void>;
|
|
660
660
|
}
|
|
661
661
|
/**
|
|
662
662
|
* Represents any {@link Service} object.
|
|
@@ -724,7 +724,7 @@ type ProcType<S extends AnyService, ProcName extends keyof S['procedures']> = S[
|
|
|
724
724
|
*/
|
|
725
725
|
type BrandedProcedureMap<Context, State, ParsedMetadata> = Record<string, Branded<AnyProcedure<Context, State, ParsedMetadata>>>;
|
|
726
726
|
type MaybeDisposable<State extends object> = State & {
|
|
727
|
-
[Symbol.asyncDispose]?: () =>
|
|
727
|
+
[Symbol.asyncDispose]?: () => PromiseLike<void>;
|
|
728
728
|
[Symbol.dispose]?: () => void;
|
|
729
729
|
};
|
|
730
730
|
/**
|
|
@@ -2,8 +2,8 @@ import * as _sinclair_typebox from '@sinclair/typebox';
|
|
|
2
2
|
import { TObject, TLiteral, TString, TSchema, TNever, TUnion, Static } from '@sinclair/typebox';
|
|
3
3
|
import { Span } from '@opentelemetry/api';
|
|
4
4
|
import { c as TransportClientId } from './message-Dlsh5WDF.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-CxT7y8Qk.cjs';
|
|
6
|
+
import { C as ClientTransport } from './client-DXJRow2s.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* {@link UNCAUGHT_ERROR_CODE} is the code that is used when an error is thrown
|
|
@@ -656,7 +656,7 @@ declare const Procedure: {
|
|
|
656
656
|
interface Service<Context, State extends object, ParsedMetadata, Procs extends ProcedureMap<Context, State, ParsedMetadata>> {
|
|
657
657
|
readonly state: State;
|
|
658
658
|
readonly procedures: Procs;
|
|
659
|
-
[Symbol.asyncDispose]: () =>
|
|
659
|
+
[Symbol.asyncDispose]: () => PromiseLike<void>;
|
|
660
660
|
}
|
|
661
661
|
/**
|
|
662
662
|
* Represents any {@link Service} object.
|
|
@@ -724,7 +724,7 @@ type ProcType<S extends AnyService, ProcName extends keyof S['procedures']> = S[
|
|
|
724
724
|
*/
|
|
725
725
|
type BrandedProcedureMap<Context, State, ParsedMetadata> = Record<string, Branded<AnyProcedure<Context, State, ParsedMetadata>>>;
|
|
726
726
|
type MaybeDisposable<State extends object> = State & {
|
|
727
|
-
[Symbol.asyncDispose]?: () =>
|
|
727
|
+
[Symbol.asyncDispose]?: () => PromiseLike<void>;
|
|
728
728
|
[Symbol.dispose]?: () => void;
|
|
729
729
|
};
|
|
730
730
|
/**
|
package/dist/testUtil/index.cjs
CHANGED
|
@@ -267,7 +267,8 @@ var defaultConnectionRetryOptions = {
|
|
|
267
267
|
maxJitterMs: 200,
|
|
268
268
|
maxBackoffMs: 32e3,
|
|
269
269
|
attemptBudgetCapacity: 5,
|
|
270
|
-
budgetRestoreIntervalMs: 200
|
|
270
|
+
budgetRestoreIntervalMs: 200,
|
|
271
|
+
isFatalConnectionError: () => false
|
|
271
272
|
};
|
|
272
273
|
var defaultClientTransportOptions = {
|
|
273
274
|
...defaultTransportOptions,
|
|
@@ -553,7 +554,7 @@ function coerceErrorString(err) {
|
|
|
553
554
|
}
|
|
554
555
|
|
|
555
556
|
// package.json
|
|
556
|
-
var version = "0.209.
|
|
557
|
+
var version = "0.209.4";
|
|
557
558
|
|
|
558
559
|
// tracing/index.ts
|
|
559
560
|
function getPropagationContext(ctx) {
|
|
@@ -1477,10 +1478,18 @@ var ClientTransport = class extends Transport {
|
|
|
1477
1478
|
const connectedSession = ClientSessionStateGraph.transition.HandshakingToConnected(session, {
|
|
1478
1479
|
onConnectionErrored: (err) => {
|
|
1479
1480
|
const errStr = coerceErrorString(err);
|
|
1480
|
-
this.
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1481
|
+
if (err instanceof Error && this.options.isFatalConnectionError(err)) {
|
|
1482
|
+
this.log?.warn(
|
|
1483
|
+
`connection to ${connectedSession.to} fatally errored: ${errStr}`,
|
|
1484
|
+
connectedSession.loggingMetadata
|
|
1485
|
+
);
|
|
1486
|
+
this.reconnectOnConnectionDrop = false;
|
|
1487
|
+
} else {
|
|
1488
|
+
this.log?.warn(
|
|
1489
|
+
`connection to ${connectedSession.to} errored: ${errStr}`,
|
|
1490
|
+
connectedSession.loggingMetadata
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1484
1493
|
},
|
|
1485
1494
|
onConnectionClosed: () => {
|
|
1486
1495
|
this.log?.info(
|