@replit/river 0.25.2 → 0.26.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/dist/{chunk-PF74DCPQ.js → chunk-5FDAIAQ5.js} +3 -3
- package/dist/{chunk-ONIPHO7J.js → chunk-5S64PXTU.js} +4 -4
- package/dist/{chunk-QXMZJ7LF.js → chunk-7ETNUCOL.js} +41 -40
- package/dist/chunk-7ETNUCOL.js.map +1 -0
- package/dist/{chunk-GDHQCPWW.js → chunk-BNNELZM4.js} +2 -2
- package/dist/{chunk-GDHQCPWW.js.map → chunk-BNNELZM4.js.map} +1 -1
- package/dist/{chunk-EHD2JJBW.js → chunk-CCUYKR5C.js} +14 -4
- package/dist/chunk-CCUYKR5C.js.map +1 -0
- package/dist/{chunk-Q3PZBJXR.js → chunk-JSU2KACV.js} +2 -2
- package/dist/{chunk-ZWMWRM23.js → chunk-KP4UB5NW.js} +2 -2
- package/dist/{client-edc8e2de.d.ts → client-162c509c.d.ts} +2 -2
- package/dist/{connection-ef50ac3a.d.ts → connection-6a404bb8.d.ts} +1 -1
- package/dist/{handshake-12d57161.d.ts → handshake-3342bb94.d.ts} +2 -2
- package/dist/logging/index.d.cts +1 -1
- package/dist/logging/index.d.ts +1 -1
- package/dist/{message-e6c560fd.d.ts → message-1a434848.d.ts} +2 -1
- package/dist/router/index.cjs +12 -3
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +8 -8
- package/dist/router/index.d.ts +8 -8
- package/dist/router/index.js +2 -2
- package/dist/{server-f8228636.d.ts → server-1b695374.d.ts} +2 -2
- package/dist/{services-4b9e5232.d.ts → services-c17f7eff.d.ts} +3 -3
- package/dist/transport/impls/ws/client.cjs +12 -3
- 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 +5 -5
- package/dist/transport/impls/ws/server.cjs +48 -39
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +4 -4
- package/dist/transport/impls/ws/server.d.ts +4 -4
- package/dist/transport/impls/ws/server.js +5 -5
- package/dist/transport/index.cjs +48 -39
- 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 +5 -5
- package/dist/util/testHelpers.cjs +12 -3
- package/dist/util/testHelpers.cjs.map +1 -1
- package/dist/util/testHelpers.d.cts +4 -4
- package/dist/util/testHelpers.d.ts +4 -4
- package/dist/util/testHelpers.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-EHD2JJBW.js.map +0 -1
- package/dist/chunk-QXMZJ7LF.js.map +0 -1
- /package/dist/{chunk-PF74DCPQ.js.map → chunk-5FDAIAQ5.js.map} +0 -0
- /package/dist/{chunk-ONIPHO7J.js.map → chunk-5S64PXTU.js.map} +0 -0
- /package/dist/{chunk-Q3PZBJXR.js.map → chunk-JSU2KACV.js.map} +0 -0
- /package/dist/{chunk-ZWMWRM23.js.map → chunk-KP4UB5NW.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as ClientTransport } from '../../../client-
|
|
2
|
-
import { c as TransportClientId } from '../../../message-
|
|
3
|
-
import { b as ProvidedClientTransportOptions } from '../../../handshake-
|
|
4
|
-
import { W as WebSocketConnection } from '../../../connection-
|
|
1
|
+
import { C as ClientTransport } from '../../../client-162c509c.js';
|
|
2
|
+
import { c as TransportClientId } from '../../../message-1a434848.js';
|
|
3
|
+
import { b as ProvidedClientTransportOptions } from '../../../handshake-3342bb94.js';
|
|
4
|
+
import { W as WebSocketConnection } from '../../../connection-6a404bb8.js';
|
|
5
5
|
import { W as WsLike } from '../../../wslike-e0b32dd5.js';
|
|
6
6
|
import '@sinclair/typebox/value';
|
|
7
7
|
import '@sinclair/typebox';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as ClientTransport } from '../../../client-
|
|
2
|
-
import { c as TransportClientId } from '../../../message-
|
|
3
|
-
import { b as ProvidedClientTransportOptions } from '../../../handshake-
|
|
4
|
-
import { W as WebSocketConnection } from '../../../connection-
|
|
1
|
+
import { C as ClientTransport } from '../../../client-162c509c.js';
|
|
2
|
+
import { c as TransportClientId } from '../../../message-1a434848.js';
|
|
3
|
+
import { b as ProvidedClientTransportOptions } from '../../../handshake-3342bb94.js';
|
|
4
|
+
import { W as WebSocketConnection } from '../../../connection-6a404bb8.js';
|
|
5
5
|
import { W as WsLike } from '../../../wslike-e0b32dd5.js';
|
|
6
6
|
import '@sinclair/typebox/value';
|
|
7
7
|
import '@sinclair/typebox';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientTransport
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-5S64PXTU.js";
|
|
4
4
|
import {
|
|
5
5
|
WebSocketConnection
|
|
6
|
-
} from "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
6
|
+
} from "../../../chunk-KP4UB5NW.js";
|
|
7
|
+
import "../../../chunk-5FDAIAQ5.js";
|
|
8
8
|
import "../../../chunk-TAH2GVTJ.js";
|
|
9
|
-
import "../../../chunk-
|
|
10
|
-
import "../../../chunk-
|
|
9
|
+
import "../../../chunk-JSU2KACV.js";
|
|
10
|
+
import "../../../chunk-CCUYKR5C.js";
|
|
11
11
|
import "../../../chunk-4PVU7J25.js";
|
|
12
12
|
|
|
13
13
|
// transport/impls/ws/client.ts
|
|
@@ -196,11 +196,20 @@ var ControlMessageHandshakeRequestSchema = import_typebox.Type.Object({
|
|
|
196
196
|
var HandshakeErrorRetriableResponseCodes = import_typebox.Type.Union([
|
|
197
197
|
import_typebox.Type.Literal("SESSION_STATE_MISMATCH")
|
|
198
198
|
]);
|
|
199
|
+
var HandshakeErrorCustomHandlerFatalResponseCodes = import_typebox.Type.Union([
|
|
200
|
+
// The custom validation handler rejected the handler because the client is unsupported.
|
|
201
|
+
import_typebox.Type.Literal("REJECTED_UNSUPPORTED_CLIENT"),
|
|
202
|
+
// The custom validation handler rejected the handshake.
|
|
203
|
+
import_typebox.Type.Literal("REJECTED_BY_CUSTOM_HANDLER")
|
|
204
|
+
]);
|
|
199
205
|
var HandshakeErrorFatalResponseCodes = import_typebox.Type.Union([
|
|
206
|
+
HandshakeErrorCustomHandlerFatalResponseCodes,
|
|
207
|
+
// The ciient sent a handshake that doesn't comply with the extended handshake metadata.
|
|
200
208
|
import_typebox.Type.Literal("MALFORMED_HANDSHAKE_META"),
|
|
209
|
+
// The ciient sent a handshake that doesn't comply with ControlMessageHandshakeRequestSchema.
|
|
201
210
|
import_typebox.Type.Literal("MALFORMED_HANDSHAKE"),
|
|
202
|
-
|
|
203
|
-
import_typebox.Type.Literal("
|
|
211
|
+
// The client's protocol version does not match the server's.
|
|
212
|
+
import_typebox.Type.Literal("PROTOCOL_VERSION_MISMATCH")
|
|
204
213
|
]);
|
|
205
214
|
var HandshakeErrorResponseCodes = import_typebox.Type.Union([
|
|
206
215
|
HandshakeErrorRetriableResponseCodes,
|
|
@@ -636,7 +645,7 @@ var SessionNoConnection = class extends IdentifiedSession {
|
|
|
636
645
|
var import_api = require("@opentelemetry/api");
|
|
637
646
|
|
|
638
647
|
// package.json
|
|
639
|
-
var version = "0.
|
|
648
|
+
var version = "0.26.0";
|
|
640
649
|
|
|
641
650
|
// tracing/index.ts
|
|
642
651
|
function createSessionTelemetryInfo(sessionId, to, from, propagationCtx) {
|
|
@@ -1624,43 +1633,43 @@ var ServerTransport = class extends Transport {
|
|
|
1624
1633
|
connectedSession.startActiveHeartbeat();
|
|
1625
1634
|
}
|
|
1626
1635
|
async validateHandshakeMetadata(handshakingSession, existingSession, rawMetadata, from) {
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
return false;
|
|
1644
|
-
}
|
|
1645
|
-
const previousParsedMetadata = existingSession ? this.sessionHandshakeMetadata.get(existingSession.to) : void 0;
|
|
1646
|
-
parsedMetadata = await this.handshakeExtensions.validate(
|
|
1647
|
-
rawMetadata,
|
|
1648
|
-
previousParsedMetadata
|
|
1636
|
+
if (!this.handshakeExtensions) {
|
|
1637
|
+
return {};
|
|
1638
|
+
}
|
|
1639
|
+
if (!import_value2.Value.Check(this.handshakeExtensions.schema, rawMetadata)) {
|
|
1640
|
+
this.rejectHandshakeRequest(
|
|
1641
|
+
handshakingSession,
|
|
1642
|
+
from,
|
|
1643
|
+
"received malformed handshake metadata",
|
|
1644
|
+
"MALFORMED_HANDSHAKE_META",
|
|
1645
|
+
{
|
|
1646
|
+
...handshakingSession.loggingMetadata,
|
|
1647
|
+
connectedTo: from,
|
|
1648
|
+
validationErrors: [
|
|
1649
|
+
...import_value2.Value.Errors(this.handshakeExtensions.schema, rawMetadata)
|
|
1650
|
+
]
|
|
1651
|
+
}
|
|
1649
1652
|
);
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1653
|
+
return false;
|
|
1654
|
+
}
|
|
1655
|
+
const previousParsedMetadata = existingSession ? this.sessionHandshakeMetadata.get(existingSession.to) : void 0;
|
|
1656
|
+
const parsedMetadata = await this.handshakeExtensions.validate(
|
|
1657
|
+
rawMetadata,
|
|
1658
|
+
previousParsedMetadata
|
|
1659
|
+
);
|
|
1660
|
+
if (import_value2.Value.Check(HandshakeErrorCustomHandlerFatalResponseCodes, parsedMetadata)) {
|
|
1661
|
+
this.rejectHandshakeRequest(
|
|
1662
|
+
handshakingSession,
|
|
1663
|
+
from,
|
|
1664
|
+
"rejected by handshake handler",
|
|
1665
|
+
parsedMetadata,
|
|
1666
|
+
{
|
|
1667
|
+
...handshakingSession.loggingMetadata,
|
|
1668
|
+
connectedTo: from,
|
|
1669
|
+
clientId: this.clientId
|
|
1670
|
+
}
|
|
1671
|
+
);
|
|
1672
|
+
return false;
|
|
1664
1673
|
}
|
|
1665
1674
|
return parsedMetadata;
|
|
1666
1675
|
}
|