@replit/river 0.26.6 → 0.26.8

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.
Files changed (56) hide show
  1. package/dist/{chunk-3NZ73HXL.js → chunk-CATCCJAL.js} +4 -4
  2. package/dist/{chunk-MZM234IB.js → chunk-KTS4HBYE.js} +1 -1
  3. package/dist/chunk-KTS4HBYE.js.map +1 -0
  4. package/dist/{chunk-H677UET6.js → chunk-NHXIQELK.js} +2 -2
  5. package/dist/{chunk-5INVLQT5.js → chunk-QEVXZ3I7.js} +14 -4
  6. package/dist/chunk-QEVXZ3I7.js.map +1 -0
  7. package/dist/{chunk-APGOIQC4.js → chunk-QXQG6ZFZ.js} +2 -2
  8. package/dist/{chunk-J7AQMYUQ.js → chunk-SIRVFV3D.js} +4 -4
  9. package/dist/{chunk-CER7XNCN.js → chunk-XMXSGTU2.js} +4 -4
  10. package/dist/{chunk-H2RVJ32Z.js → chunk-ZFSQNWYX.js} +2 -2
  11. package/dist/{chunk-H2RVJ32Z.js.map → chunk-ZFSQNWYX.js.map} +1 -1
  12. package/dist/{client-96810511.d.ts → client-1229b53d.d.ts} +2 -2
  13. package/dist/connection-c5ffd44e.d.ts +32 -0
  14. package/dist/{handshake-65e0e848.d.ts → handshake-02a61755.d.ts} +3 -1
  15. package/dist/logging/index.cjs.map +1 -1
  16. package/dist/logging/index.d.cts +1 -1
  17. package/dist/logging/index.d.ts +1 -1
  18. package/dist/logging/index.js +1 -1
  19. package/dist/{message-e917ee98.d.ts → message-3edb8fac.d.ts} +1 -0
  20. package/dist/router/index.cjs +1 -1
  21. package/dist/router/index.cjs.map +1 -1
  22. package/dist/router/index.d.cts +8 -8
  23. package/dist/router/index.d.ts +8 -8
  24. package/dist/router/index.js +2 -2
  25. package/dist/{server-b8aaf116.d.ts → server-89076d9a.d.ts} +3 -2
  26. package/dist/{services-40e7c5cf.d.ts → services-4478e99b.d.ts} +3 -3
  27. package/dist/transport/impls/ws/client.cjs +13 -3
  28. package/dist/transport/impls/ws/client.cjs.map +1 -1
  29. package/dist/transport/impls/ws/client.d.cts +4 -4
  30. package/dist/transport/impls/ws/client.d.ts +4 -4
  31. package/dist/transport/impls/ws/client.js +6 -6
  32. package/dist/transport/impls/ws/server.cjs +27 -5
  33. package/dist/transport/impls/ws/server.cjs.map +1 -1
  34. package/dist/transport/impls/ws/server.d.cts +6 -5
  35. package/dist/transport/impls/ws/server.d.ts +6 -5
  36. package/dist/transport/impls/ws/server.js +20 -8
  37. package/dist/transport/impls/ws/server.js.map +1 -1
  38. package/dist/transport/index.cjs +1 -1
  39. package/dist/transport/index.cjs.map +1 -1
  40. package/dist/transport/index.d.cts +4 -4
  41. package/dist/transport/index.d.ts +4 -4
  42. package/dist/transport/index.js +6 -6
  43. package/dist/util/testHelpers.cjs +1 -1
  44. package/dist/util/testHelpers.cjs.map +1 -1
  45. package/dist/util/testHelpers.d.cts +4 -4
  46. package/dist/util/testHelpers.d.ts +4 -4
  47. package/dist/util/testHelpers.js +3 -3
  48. package/package.json +1 -1
  49. package/dist/chunk-5INVLQT5.js.map +0 -1
  50. package/dist/chunk-MZM234IB.js.map +0 -1
  51. package/dist/connection-48133ec3.d.ts +0 -11
  52. /package/dist/{chunk-3NZ73HXL.js.map → chunk-CATCCJAL.js.map} +0 -0
  53. /package/dist/{chunk-H677UET6.js.map → chunk-NHXIQELK.js.map} +0 -0
  54. /package/dist/{chunk-APGOIQC4.js.map → chunk-QXQG6ZFZ.js.map} +0 -0
  55. /package/dist/{chunk-J7AQMYUQ.js.map → chunk-SIRVFV3D.js.map} +0 -0
  56. /package/dist/{chunk-CER7XNCN.js.map → chunk-XMXSGTU2.js.map} +0 -0
@@ -1,14 +1,14 @@
1
- import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-40e7c5cf.js';
2
- export { C as Client, E as Err, O as Ok, z as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k 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, m as SerializedServerSchema, n as SerializedServiceSchema, S as Service, e as ServiceConfiguration, l 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-40e7c5cf.js';
1
+ import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-4478e99b.js';
2
+ export { C as Client, E as Err, O as Ok, z as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k 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, m as SerializedServerSchema, n as SerializedServiceSchema, S as Service, e as ServiceConfiguration, l 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-4478e99b.js';
3
3
  import { Static } from '@sinclair/typebox';
4
4
  import { Pushable } from 'it-pushable';
5
- import { C as Connection, s as ServerHandshakeOptions, o as ServiceContext } from '../handshake-65e0e848.js';
6
- export { t as ParsedMetadata, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, w as createClientHandshakeOptions, x as createServerHandshakeOptions } from '../handshake-65e0e848.js';
7
- import { S as ServerTransport } from '../server-b8aaf116.js';
8
- import '../message-e917ee98.js';
5
+ import { C as Connection, s as ServerHandshakeOptions, o as ServiceContext } from '../handshake-02a61755.js';
6
+ export { t as ParsedMetadata, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, w as createClientHandshakeOptions, x as createServerHandshakeOptions } from '../handshake-02a61755.js';
7
+ import { S as ServerTransport } from '../server-89076d9a.js';
8
+ import '../message-3edb8fac.js';
9
9
  import '@sinclair/typebox/value';
10
10
  import '@opentelemetry/api';
11
- import '../client-96810511.js';
11
+ import '../client-1229b53d.js';
12
12
  import '@sinclair/typebox/errors';
13
13
  import '../types-3e5768ec.js';
14
14
 
@@ -46,6 +46,6 @@ declare function createServer<Services extends AnyServiceSchemaMap>(transport: S
46
46
  extendedContext?: Omit<ServiceContext, 'state'>;
47
47
  }>): Server<Services>;
48
48
 
49
- var version = "0.26.6";
49
+ var version = "0.26.8";
50
50
 
51
51
  export { PayloadType, version as RIVER_VERSION, Result, RiverError, Server, ServiceContext, createServer };
@@ -1,14 +1,14 @@
1
- import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-40e7c5cf.js';
2
- export { C as Client, E as Err, O as Ok, z as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k 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, m as SerializedServerSchema, n as SerializedServiceSchema, S as Service, e as ServiceConfiguration, l 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-40e7c5cf.js';
1
+ import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-4478e99b.js';
2
+ export { C as Client, E as Err, O as Ok, z as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k 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, m as SerializedServerSchema, n as SerializedServiceSchema, S as Service, e as ServiceConfiguration, l 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-4478e99b.js';
3
3
  import { Static } from '@sinclair/typebox';
4
4
  import { Pushable } from 'it-pushable';
5
- import { C as Connection, s as ServerHandshakeOptions, o as ServiceContext } from '../handshake-65e0e848.js';
6
- export { t as ParsedMetadata, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, w as createClientHandshakeOptions, x as createServerHandshakeOptions } from '../handshake-65e0e848.js';
7
- import { S as ServerTransport } from '../server-b8aaf116.js';
8
- import '../message-e917ee98.js';
5
+ import { C as Connection, s as ServerHandshakeOptions, o as ServiceContext } from '../handshake-02a61755.js';
6
+ export { t as ParsedMetadata, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, w as createClientHandshakeOptions, x as createServerHandshakeOptions } from '../handshake-02a61755.js';
7
+ import { S as ServerTransport } from '../server-89076d9a.js';
8
+ import '../message-3edb8fac.js';
9
9
  import '@sinclair/typebox/value';
10
10
  import '@opentelemetry/api';
11
- import '../client-96810511.js';
11
+ import '../client-1229b53d.js';
12
12
  import '@sinclair/typebox/errors';
13
13
  import '../types-3e5768ec.js';
14
14
 
@@ -46,6 +46,6 @@ declare function createServer<Services extends AnyServiceSchemaMap>(transport: S
46
46
  extendedContext?: Omit<ServiceContext, 'state'>;
47
47
  }>): Server<Services>;
48
48
 
49
- var version = "0.26.6";
49
+ var version = "0.26.8";
50
50
 
51
51
  export { PayloadType, version as RIVER_VERSION, Result, RiverError, Server, ServiceContext, createServer };
@@ -10,10 +10,10 @@ import {
10
10
  createServer,
11
11
  createServerHandshakeOptions,
12
12
  serializeSchema
13
- } from "../chunk-APGOIQC4.js";
13
+ } from "../chunk-QXQG6ZFZ.js";
14
14
  import {
15
15
  version
16
- } from "../chunk-H2RVJ32Z.js";
16
+ } from "../chunk-ZFSQNWYX.js";
17
17
  export {
18
18
  Err,
19
19
  Ok,
@@ -1,5 +1,5 @@
1
- import { C as Connection, y as CommonSession, d as SessionState, z as CommonSessionProps, T as Transport, A as ServerTransportOptions, s as ServerHandshakeOptions, t as ParsedMetadata, B as ServerSession, c as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './handshake-65e0e848.js';
2
- import { b as OpaqueTransportMessage, e as Tags, a as TransportMessage, H as HandshakeErrorResponseCodes, c as TransportClientId, P as PartialTransportMessage } from './message-e917ee98.js';
1
+ import { C as Connection, y as CommonSession, d as SessionState, z as CommonSessionProps, T as Transport, A as ServerTransportOptions, s as ServerHandshakeOptions, t as ParsedMetadata, B as ServerSession, c as ProvidedServerTransportOptions, D as DeleteSessionOptions } from './handshake-02a61755.js';
2
+ import { b as OpaqueTransportMessage, e as Tags, a as TransportMessage, H as HandshakeErrorResponseCodes, c as TransportClientId, P as PartialTransportMessage } from './message-3edb8fac.js';
3
3
  import * as _sinclair_typebox_errors from '@sinclair/typebox/errors';
4
4
  import { Static } from '@sinclair/typebox';
5
5
 
@@ -33,6 +33,7 @@ declare class SessionWaitingForHandshake<ConnType extends Connection> extends Co
33
33
  traceId: string;
34
34
  spanId: string;
35
35
  } | undefined;
36
+ extras?: unknown;
36
37
  };
37
38
  onHandshakeData: (msg: Uint8Array) => void;
38
39
  sendHandshake(msg: TransportMessage): boolean;
@@ -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, p as ClientHandshakeOptions, v as ServiceContextWithTransportInfo, o as ServiceContext } from './handshake-65e0e848.js';
4
- import { c as TransportClientId } from './message-e917ee98.js';
5
- import { C as ClientTransport } from './client-96810511.js';
3
+ import { C as Connection, p as ClientHandshakeOptions, v as ServiceContextWithTransportInfo, o as ServiceContext } from './handshake-02a61755.js';
4
+ import { c as TransportClientId } from './message-3edb8fac.js';
5
+ import { C as ClientTransport } from './client-1229b53d.js';
6
6
 
7
7
  type AsyncIter<T> = AsyncGenerator<T, T>;
8
8
  /**
@@ -632,7 +632,7 @@ var SessionNoConnection = class extends IdentifiedSessionWithGracePeriod {
632
632
  var import_api = require("@opentelemetry/api");
633
633
 
634
634
  // package.json
635
- var version = "0.26.6";
635
+ var version = "0.26.8";
636
636
 
637
637
  // tracing/index.ts
638
638
  function getPropagationContext(ctx) {
@@ -1805,11 +1805,21 @@ var Connection = class {
1805
1805
  };
1806
1806
 
1807
1807
  // transport/impls/ws/connection.ts
1808
+ var WS_HEALTHY_CLOSE_CODE = 1e3;
1808
1809
  var WebSocketConnection = class extends Connection {
1809
1810
  ws;
1810
- constructor(ws) {
1811
+ extras;
1812
+ get loggingMetadata() {
1813
+ const metadata = super.loggingMetadata;
1814
+ if (this.extras) {
1815
+ metadata.extras = this.extras;
1816
+ }
1817
+ return metadata;
1818
+ }
1819
+ constructor(ws, extras) {
1811
1820
  super();
1812
1821
  this.ws = ws;
1822
+ this.extras = extras;
1813
1823
  this.ws.binaryType = "arraybuffer";
1814
1824
  let didError = false;
1815
1825
  this.ws.onerror = () => {
@@ -1842,7 +1852,7 @@ var WebSocketConnection = class extends Connection {
1842
1852
  return true;
1843
1853
  }
1844
1854
  close() {
1845
- this.ws.close();
1855
+ this.ws.close(WS_HEALTHY_CLOSE_CODE);
1846
1856
  }
1847
1857
  };
1848
1858