@replit/river 0.23.15 → 0.23.16
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-IJTGEBLG.js → chunk-JA7XGTAL.js} +4 -4
- package/dist/{chunk-AEY7BBOZ.js → chunk-LTSLICON.js} +2 -2
- package/dist/{chunk-JMVKSGND.js → chunk-MQCGG6KL.js} +4 -4
- package/dist/{chunk-RQQZUQGE.js → chunk-R47IZD67.js} +2 -2
- package/dist/{chunk-OXVWMLID.js → chunk-TXSQRTZB.js} +2 -2
- package/dist/{chunk-OXVWMLID.js.map → chunk-TXSQRTZB.js.map} +1 -1
- package/dist/{chunk-XYEOXPZQ.js → chunk-UDXM64QK.js} +2 -2
- package/dist/{chunk-MD4S7GO2.js → chunk-WN77AT67.js} +4 -4
- package/dist/chunk-WN77AT67.js.map +1 -0
- package/dist/{chunk-5HK7ZQYH.js → chunk-YXDAOVP7.js} +14 -2
- package/dist/{chunk-5HK7ZQYH.js.map → chunk-YXDAOVP7.js.map} +1 -1
- package/dist/{client-e13979ac.d.ts → client-0926d3d6.d.ts} +1 -1
- package/dist/{connection-e57e98ea.d.ts → connection-99a67d3e.d.ts} +1 -1
- package/dist/{connection-5d0978ce.d.ts → connection-d738cc08.d.ts} +1 -1
- package/dist/{handshake-5665ffd3.d.ts → handshake-75d0124f.d.ts} +5 -0
- 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 +2 -2
- package/dist/{server-1cfc88d1.d.ts → server-3740c5d9.d.ts} +1 -1
- package/dist/{services-86c4d10d.d.ts → services-75e84a9f.d.ts} +2 -2
- package/dist/transport/impls/uds/client.cjs +14 -2
- package/dist/transport/impls/uds/client.cjs.map +1 -1
- package/dist/transport/impls/uds/client.d.cts +3 -3
- package/dist/transport/impls/uds/client.d.ts +3 -3
- package/dist/transport/impls/uds/client.js +5 -5
- package/dist/transport/impls/uds/server.cjs +14 -2
- package/dist/transport/impls/uds/server.cjs.map +1 -1
- package/dist/transport/impls/uds/server.d.cts +3 -3
- package/dist/transport/impls/uds/server.d.ts +3 -3
- package/dist/transport/impls/uds/server.js +5 -5
- package/dist/transport/impls/ws/client.cjs +14 -2
- 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 +5 -5
- package/dist/transport/impls/ws/server.cjs +14 -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 +5 -5
- package/dist/transport/index.cjs +14 -2
- 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 +5 -5
- package/dist/util/testHelpers.cjs +13 -1
- package/dist/util/testHelpers.cjs.map +1 -1
- package/dist/util/testHelpers.d.cts +3 -3
- package/dist/util/testHelpers.d.ts +3 -3
- package/dist/util/testHelpers.js +3 -3
- package/package.json +14 -13
- package/dist/chunk-MD4S7GO2.js.map +0 -1
- /package/dist/{chunk-IJTGEBLG.js.map → chunk-JA7XGTAL.js.map} +0 -0
- /package/dist/{chunk-AEY7BBOZ.js.map → chunk-LTSLICON.js.map} +0 -0
- /package/dist/{chunk-JMVKSGND.js.map → chunk-MQCGG6KL.js.map} +0 -0
- /package/dist/{chunk-RQQZUQGE.js.map → chunk-R47IZD67.js.map} +0 -0
- /package/dist/{chunk-XYEOXPZQ.js.map → chunk-UDXM64QK.js.map} +0 -0
package/dist/router/index.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as SerializedServerSchema, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-
|
|
2
|
-
export { C as Client, E as Err, O as Ok, z as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, p as ProcedureMap, d as ProcedureResult, q as RPCProcedure, y as ResultUnwrapErr, x as ResultUnwrapOk, w as RiverErrorSchema, c as RiverUncaughtSchema, o as SerializedProcedureSchema, n as SerializedServiceSchema, e as Service, f as ServiceConfiguration, m as ServiceSchema, t as StreamProcedure, r as SubscriptionProcedure, v as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, u as createClient, s as serializeSchema } from '../services-
|
|
1
|
+
import { S as SerializedServerSchema, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-75e84a9f.js';
|
|
2
|
+
export { C as Client, E as Err, O as Ok, z as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, p as ProcedureMap, d as ProcedureResult, q as RPCProcedure, y as ResultUnwrapErr, x as ResultUnwrapOk, w as RiverErrorSchema, c as RiverUncaughtSchema, o as SerializedProcedureSchema, n as SerializedServiceSchema, e as Service, f as ServiceConfiguration, m as ServiceSchema, t as StreamProcedure, r as SubscriptionProcedure, v as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, u as createClient, s as serializeSchema } from '../services-75e84a9f.js';
|
|
3
3
|
import { Static } from '@sinclair/typebox';
|
|
4
4
|
import { Pushable } from 'it-pushable';
|
|
5
|
-
import { C as Connection, m as ServerHandshakeOptions, i as ServiceContext } from '../handshake-
|
|
6
|
-
export { n as ParsedMetadata, o as ServiceContextWithState, p as ServiceContextWithTransportInfo, q as createClientHandshakeOptions, r as createServerHandshakeOptions } from '../handshake-
|
|
7
|
-
import { S as ServerTransport } from '../server-
|
|
5
|
+
import { C as Connection, m as ServerHandshakeOptions, i as ServiceContext } from '../handshake-75d0124f.js';
|
|
6
|
+
export { n as ParsedMetadata, o as ServiceContextWithState, p as ServiceContextWithTransportInfo, q as createClientHandshakeOptions, r as createServerHandshakeOptions } from '../handshake-75d0124f.js';
|
|
7
|
+
import { S as ServerTransport } from '../server-3740c5d9.js';
|
|
8
8
|
import '../index-ea74cdbb.js';
|
|
9
9
|
import '@sinclair/typebox/value';
|
|
10
10
|
import '@opentelemetry/api';
|
|
11
|
-
import '../client-
|
|
11
|
+
import '../client-0926d3d6.js';
|
|
12
12
|
import '../types-3e5768ec.js';
|
|
13
13
|
|
|
14
14
|
interface ServerBreakage {
|
|
@@ -83,6 +83,6 @@ declare function createServer<Services extends AnyServiceSchemaMap>(transport: S
|
|
|
83
83
|
extendedContext?: Omit<ServiceContext, 'state'>;
|
|
84
84
|
}>): Server<Services>;
|
|
85
85
|
|
|
86
|
-
var version = "0.23.
|
|
86
|
+
var version = "0.23.16";
|
|
87
87
|
|
|
88
88
|
export { DiffOptions, PayloadBreakage, PayloadType, ProcedureBreakage, version as RIVER_VERSION, Result, RiverError, SerializedServerSchema, Server, ServerBreakage, ServiceBreakage, ServiceContext, createServer, diffServerSchema };
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as SerializedServerSchema, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-
|
|
2
|
-
export { C as Client, E as Err, O as Ok, z as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, p as ProcedureMap, d as ProcedureResult, q as RPCProcedure, y as ResultUnwrapErr, x as ResultUnwrapOk, w as RiverErrorSchema, c as RiverUncaughtSchema, o as SerializedProcedureSchema, n as SerializedServiceSchema, e as Service, f as ServiceConfiguration, m as ServiceSchema, t as StreamProcedure, r as SubscriptionProcedure, v as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, u as createClient, s as serializeSchema } from '../services-
|
|
1
|
+
import { S as SerializedServerSchema, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-75e84a9f.js';
|
|
2
|
+
export { C as Client, E as Err, O as Ok, z as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, p as ProcedureMap, d as ProcedureResult, q as RPCProcedure, y as ResultUnwrapErr, x as ResultUnwrapOk, w as RiverErrorSchema, c as RiverUncaughtSchema, o as SerializedProcedureSchema, n as SerializedServiceSchema, e as Service, f as ServiceConfiguration, m as ServiceSchema, t as StreamProcedure, r as SubscriptionProcedure, v as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, u as createClient, s as serializeSchema } from '../services-75e84a9f.js';
|
|
3
3
|
import { Static } from '@sinclair/typebox';
|
|
4
4
|
import { Pushable } from 'it-pushable';
|
|
5
|
-
import { C as Connection, m as ServerHandshakeOptions, i as ServiceContext } from '../handshake-
|
|
6
|
-
export { n as ParsedMetadata, o as ServiceContextWithState, p as ServiceContextWithTransportInfo, q as createClientHandshakeOptions, r as createServerHandshakeOptions } from '../handshake-
|
|
7
|
-
import { S as ServerTransport } from '../server-
|
|
5
|
+
import { C as Connection, m as ServerHandshakeOptions, i as ServiceContext } from '../handshake-75d0124f.js';
|
|
6
|
+
export { n as ParsedMetadata, o as ServiceContextWithState, p as ServiceContextWithTransportInfo, q as createClientHandshakeOptions, r as createServerHandshakeOptions } from '../handshake-75d0124f.js';
|
|
7
|
+
import { S as ServerTransport } from '../server-3740c5d9.js';
|
|
8
8
|
import '../index-ea74cdbb.js';
|
|
9
9
|
import '@sinclair/typebox/value';
|
|
10
10
|
import '@opentelemetry/api';
|
|
11
|
-
import '../client-
|
|
11
|
+
import '../client-0926d3d6.js';
|
|
12
12
|
import '../types-3e5768ec.js';
|
|
13
13
|
|
|
14
14
|
interface ServerBreakage {
|
|
@@ -83,6 +83,6 @@ declare function createServer<Services extends AnyServiceSchemaMap>(transport: S
|
|
|
83
83
|
extendedContext?: Omit<ServiceContext, 'state'>;
|
|
84
84
|
}>): Server<Services>;
|
|
85
85
|
|
|
86
|
-
var version = "0.23.
|
|
86
|
+
var version = "0.23.16";
|
|
87
87
|
|
|
88
88
|
export { DiffOptions, PayloadBreakage, PayloadType, ProcedureBreakage, version as RIVER_VERSION, Result, RiverError, SerializedServerSchema, Server, ServerBreakage, ServiceBreakage, ServiceContext, createServer, diffServerSchema };
|
package/dist/router/index.js
CHANGED
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
createServerHandshakeOptions,
|
|
12
12
|
diffServerSchema,
|
|
13
13
|
serializeSchema
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-LTSLICON.js";
|
|
15
15
|
import {
|
|
16
16
|
version
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-TXSQRTZB.js";
|
|
18
18
|
export {
|
|
19
19
|
Err,
|
|
20
20
|
Ok,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Connection, T as Transport, l as ServerTransportOptions, m as ServerHandshakeOptions, S as Session, n as ParsedMetadata, c as ProvidedServerTransportOptions } from './handshake-
|
|
1
|
+
import { C as Connection, T as Transport, l as ServerTransportOptions, m as ServerHandshakeOptions, S as Session, n as ParsedMetadata, c as ProvidedServerTransportOptions } from './handshake-75d0124f.js';
|
|
2
2
|
import { c as TransportClientId } from './index-ea74cdbb.js';
|
|
3
3
|
|
|
4
4
|
declare abstract class ServerTransport<ConnType extends Connection> extends Transport<ConnType> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Static, TObject, TUnion, TString, TSchema, TNever, TLiteral } from '@sinclair/typebox';
|
|
2
2
|
import { Pushable } from 'it-pushable';
|
|
3
|
-
import { C as Connection, k as ClientHandshakeOptions, p as ServiceContextWithTransportInfo } from './handshake-
|
|
3
|
+
import { C as Connection, k as ClientHandshakeOptions, p as ServiceContextWithTransportInfo } from './handshake-75d0124f.js';
|
|
4
4
|
import { c as TransportClientId } from './index-ea74cdbb.js';
|
|
5
|
-
import { C as ClientTransport } from './client-
|
|
5
|
+
import { C as ClientTransport } from './client-0926d3d6.js';
|
|
6
6
|
|
|
7
7
|
type AsyncIter<T> = AsyncGenerator<T, T>;
|
|
8
8
|
/**
|
|
@@ -134,7 +134,7 @@ function isAck(controlFlag) {
|
|
|
134
134
|
var import_api = require("@opentelemetry/api");
|
|
135
135
|
|
|
136
136
|
// package.json
|
|
137
|
-
var version = "0.23.
|
|
137
|
+
var version = "0.23.16";
|
|
138
138
|
|
|
139
139
|
// tracing/index.ts
|
|
140
140
|
function getPropagationContext(ctx) {
|
|
@@ -454,6 +454,18 @@ var Session = class {
|
|
|
454
454
|
get nextExpectedSeq() {
|
|
455
455
|
return this.ack;
|
|
456
456
|
}
|
|
457
|
+
/**
|
|
458
|
+
* Check that the peer's next expected seq number matches something that is in our send buffer
|
|
459
|
+
* _or_ matches our actual next seq.
|
|
460
|
+
*/
|
|
461
|
+
nextExpectedSeqInRange(nextExpectedSeq) {
|
|
462
|
+
for (const msg of this.sendBuffer) {
|
|
463
|
+
if (nextExpectedSeq === msg.seq) {
|
|
464
|
+
return true;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
return nextExpectedSeq === this.seq;
|
|
468
|
+
}
|
|
457
469
|
// This is only used in tests to make the session misbehave.
|
|
458
470
|
/* @internal */
|
|
459
471
|
advanceAckForTesting(by) {
|
|
@@ -954,7 +966,7 @@ var Transport = class {
|
|
|
954
966
|
if (
|
|
955
967
|
// reject this request if there was no previous session to replace
|
|
956
968
|
session === void 0 || // or if both parties do not agree about the next expected sequence number
|
|
957
|
-
session.
|
|
969
|
+
!session.nextExpectedSeqInRange(nextExpectedSeq) || // or if both parties do not agree on the advertised session id
|
|
958
970
|
session.advertisedSessionId !== sessionId
|
|
959
971
|
) {
|
|
960
972
|
return false;
|