@replit/river 0.216.0 → 0.216.1

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 (33) hide show
  1. package/dist/{chunk-75ZMPCKC.js → chunk-62BM2WOT.js} +2 -2
  2. package/dist/{chunk-ZLMQQI43.js → chunk-C4EPHIKQ.js} +11 -3
  3. package/dist/chunk-C4EPHIKQ.js.map +1 -0
  4. package/dist/codec/index.js +2 -2
  5. package/dist/protobuf/index.cjs +1 -1
  6. package/dist/protobuf/index.cjs.map +1 -1
  7. package/dist/protobuf/index.d.cts +2 -2
  8. package/dist/protobuf/index.d.ts +2 -2
  9. package/dist/protobuf/index.js +1 -1
  10. package/dist/router/index.cjs +10 -2
  11. package/dist/router/index.cjs.map +1 -1
  12. package/dist/router/index.d.cts +3 -3
  13. package/dist/router/index.d.ts +3 -3
  14. package/dist/router/index.js +1 -1
  15. package/dist/{services-cwGAC2rB.d.cts → services-CjigASqe.d.cts} +11 -1
  16. package/dist/{services-BrTFTO5Q.d.ts → services-DpT2yNtt.d.ts} +11 -1
  17. package/dist/testUtil/index.cjs +1 -1
  18. package/dist/testUtil/index.cjs.map +1 -1
  19. package/dist/testUtil/index.d.cts +1 -1
  20. package/dist/testUtil/index.d.ts +1 -1
  21. package/dist/testUtil/index.js +2 -2
  22. package/dist/transport/impls/ws/client.cjs +1 -1
  23. package/dist/transport/impls/ws/client.cjs.map +1 -1
  24. package/dist/transport/impls/ws/client.js +2 -2
  25. package/dist/transport/impls/ws/server.cjs +1 -1
  26. package/dist/transport/impls/ws/server.cjs.map +1 -1
  27. package/dist/transport/impls/ws/server.js +2 -2
  28. package/dist/transport/index.cjs +1 -1
  29. package/dist/transport/index.cjs.map +1 -1
  30. package/dist/transport/index.js +2 -2
  31. package/package.json +1 -1
  32. package/dist/chunk-ZLMQQI43.js.map +0 -1
  33. /package/dist/{chunk-75ZMPCKC.js.map → chunk-62BM2WOT.js.map} +0 -0
@@ -3,8 +3,8 @@ import { DescService, DescMethod, DescMethodUnary, MessageShape, MessageInitShap
3
3
  import { C as ClientTransport } from '../client-BZUvFL6B.cjs';
4
4
  import { z as SessionId, C as Connection, n as ClientHandshakeOptions, q as ServerHandshakeOptions } from '../transport-BnU3Zb0Q.cjs';
5
5
  import { T as TransportClientId, f as HandshakeErrorCustomHandlerFatalResponseCodes, O as OpaqueTransportMessage } from '../message-CpXWqmJw.cjs';
6
- import { a0 as ErrorPayload, C as CANCEL_CODE, e as INVALID_REQUEST_CODE, U as UNCAUGHT_ERROR_CODE, N as UNEXPECTED_DISCONNECT_CODE, d as ErrResult, v as Result, W as Writable, q as Readable } from '../services-cwGAC2rB.cjs';
7
- export { E as Err, O as Ok, f as OkResult, r as ReadableBrokenError, s as ReadableResult, w as ResultUnwrapErr, x as ResultUnwrapOk } from '../services-cwGAC2rB.cjs';
6
+ import { a2 as ErrorPayload, C as CANCEL_CODE, g as INVALID_REQUEST_CODE, U as UNCAUGHT_ERROR_CODE, T as UNEXPECTED_DISCONNECT_CODE, f as ErrResult, x as Result, X as Writable, s as Readable } from '../services-CjigASqe.cjs';
7
+ export { E as Err, O as Ok, h as OkResult, t as ReadableBrokenError, u as ReadableResult, y as ResultUnwrapErr, z as ResultUnwrapOk } from '../services-CjigASqe.cjs';
8
8
  import { Span } from '@opentelemetry/api';
9
9
  import * as _sinclair_typebox from '@sinclair/typebox';
10
10
  import { Static, TSchema } from '@sinclair/typebox';
@@ -3,8 +3,8 @@ import { DescService, DescMethod, DescMethodUnary, MessageShape, MessageInitShap
3
3
  import { C as ClientTransport } from '../client-BNc5Pj_4.js';
4
4
  import { z as SessionId, C as Connection, n as ClientHandshakeOptions, q as ServerHandshakeOptions } from '../transport-B1MUtXL7.js';
5
5
  import { T as TransportClientId, f as HandshakeErrorCustomHandlerFatalResponseCodes, O as OpaqueTransportMessage } from '../message-CpXWqmJw.js';
6
- import { a0 as ErrorPayload, C as CANCEL_CODE, e as INVALID_REQUEST_CODE, U as UNCAUGHT_ERROR_CODE, N as UNEXPECTED_DISCONNECT_CODE, d as ErrResult, v as Result, W as Writable, q as Readable } from '../services-BrTFTO5Q.js';
7
- export { E as Err, O as Ok, f as OkResult, r as ReadableBrokenError, s as ReadableResult, w as ResultUnwrapErr, x as ResultUnwrapOk } from '../services-BrTFTO5Q.js';
6
+ import { a2 as ErrorPayload, C as CANCEL_CODE, g as INVALID_REQUEST_CODE, U as UNCAUGHT_ERROR_CODE, T as UNEXPECTED_DISCONNECT_CODE, f as ErrResult, x as Result, X as Writable, s as Readable } from '../services-DpT2yNtt.js';
7
+ export { E as Err, O as Ok, h as OkResult, t as ReadableBrokenError, u as ReadableResult, y as ResultUnwrapErr, z as ResultUnwrapOk } from '../services-DpT2yNtt.js';
8
8
  import { Span } from '@opentelemetry/api';
9
9
  import * as _sinclair_typebox from '@sinclair/typebox';
10
10
  import { Static, TSchema } from '@sinclair/typebox';
@@ -26,7 +26,7 @@ import {
26
26
  isStreamClose,
27
27
  isStreamOpen,
28
28
  recordRiverError
29
- } from "../chunk-ZLMQQI43.js";
29
+ } from "../chunk-C4EPHIKQ.js";
30
30
 
31
31
  // protobuf/client.ts
32
32
  import { Value } from "@sinclair/typebox/value";
@@ -981,6 +981,10 @@ function createClient(transport, serverId, providedClientOptions = {}) {
981
981
  `invalid river call, unknown procedure type ${procMethod}`
982
982
  );
983
983
  }
984
+ const merged = mergeCallOptions(
985
+ clientOptions.defaultCallOptions,
986
+ callOptions
987
+ );
984
988
  return handleProc(
985
989
  procMethod === "subscribe" ? "subscription" : procMethod,
986
990
  transport,
@@ -988,10 +992,14 @@ function createClient(transport, serverId, providedClientOptions = {}) {
988
992
  init,
989
993
  serviceName,
990
994
  procName,
991
- callOptions ? callOptions.signal : void 0
995
+ merged.signal
992
996
  );
993
997
  }, []);
994
998
  }
999
+ function mergeCallOptions(defaults, caller) {
1000
+ const resolved = typeof defaults === "function" ? defaults() : defaults ?? {};
1001
+ return { ...resolved, ...caller };
1002
+ }
995
1003
  function handleProc(procType, transport, serverId, init, serviceName, procedureName, abortSignal) {
996
1004
  if (transport.getStatus() === "closed") {
997
1005
  return getPreClosedReturnForProc(procType);
@@ -2009,7 +2017,7 @@ function createServerHandshakeOptions(schema, validate) {
2009
2017
  }
2010
2018
 
2011
2019
  // package.json
2012
- var version = "0.216.0";
2020
+ var version = "0.216.1";
2013
2021
  // Annotate the CommonJS export names for ESM import in node:
2014
2022
  0 && (module.exports = {
2015
2023
  CANCEL_CODE,