@replit/river 0.23.0 → 0.23.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 (39) hide show
  1. package/dist/{chunk-MJUFKPBT.js → chunk-AUH7GO52.js} +4 -4
  2. package/dist/{chunk-MJUFKPBT.js.map → chunk-AUH7GO52.js.map} +1 -1
  3. package/dist/{chunk-VOJVLWVX.js → chunk-IKKP6BZG.js} +2 -2
  4. package/dist/{chunk-VOJVLWVX.js.map → chunk-IKKP6BZG.js.map} +1 -1
  5. package/dist/{chunk-DZOATC6M.js → chunk-KA5T736W.js} +2 -2
  6. package/dist/{chunk-PCKHBAVP.js → chunk-RBH47IKH.js} +2 -2
  7. package/dist/{chunk-PCKHBAVP.js.map → chunk-RBH47IKH.js.map} +1 -1
  8. package/dist/{chunk-ZF2UFTNN.js → chunk-XTVPDTQD.js} +2 -2
  9. package/dist/router/index.cjs +1 -1
  10. package/dist/router/index.cjs.map +1 -1
  11. package/dist/router/index.d.cts +3 -3
  12. package/dist/router/index.d.ts +3 -3
  13. package/dist/router/index.js +2 -2
  14. package/dist/{services-be91b485.d.ts → services-95cb17b9.d.ts} +2 -0
  15. package/dist/{services-eb9326a1.d.ts → services-e95a89d6.d.ts} +2 -0
  16. package/dist/transport/impls/uds/client.cjs +3 -3
  17. package/dist/transport/impls/uds/client.cjs.map +1 -1
  18. package/dist/transport/impls/uds/client.js +3 -3
  19. package/dist/transport/impls/uds/server.cjs +2 -2
  20. package/dist/transport/impls/uds/server.cjs.map +1 -1
  21. package/dist/transport/impls/uds/server.js +3 -3
  22. package/dist/transport/impls/ws/client.cjs +3 -3
  23. package/dist/transport/impls/ws/client.cjs.map +1 -1
  24. package/dist/transport/impls/ws/client.js +3 -3
  25. package/dist/transport/impls/ws/server.cjs +2 -2
  26. package/dist/transport/impls/ws/server.cjs.map +1 -1
  27. package/dist/transport/impls/ws/server.js +3 -3
  28. package/dist/transport/index.cjs +3 -3
  29. package/dist/transport/index.cjs.map +1 -1
  30. package/dist/transport/index.js +2 -2
  31. package/dist/util/testHelpers.cjs +2 -2
  32. package/dist/util/testHelpers.cjs.map +1 -1
  33. package/dist/util/testHelpers.d.cts +1 -1
  34. package/dist/util/testHelpers.d.ts +1 -1
  35. package/dist/util/testHelpers.js +3 -3
  36. package/dist/util/testHelpers.js.map +1 -1
  37. package/package.json +4 -4
  38. /package/dist/{chunk-DZOATC6M.js.map → chunk-KA5T736W.js.map} +0 -0
  39. /package/dist/{chunk-ZF2UFTNN.js.map → chunk-XTVPDTQD.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-eb9326a1.js';
2
- export { C as Client, E as Err, O as Ok, x as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k as ProcType, a as Procedure, n as ProcedureMap, d as ProcedureResult, o as RPCProcedure, w as ResultUnwrapErr, v as ResultUnwrapOk, u as RiverErrorSchema, c as RiverUncaughtSchema, m as SerializedServerSchema, S as Service, e as ServiceConfiguration, l as ServiceSchema, q as StreamProcedure, p as SubscriptionProcedure, t as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, r as createClient, s as serializeSchema } from '../services-eb9326a1.js';
1
+ import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-e95a89d6.js';
2
+ export { C as Client, E as Err, O as Ok, x as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k as ProcType, a as Procedure, n as ProcedureMap, d as ProcedureResult, o as RPCProcedure, w as ResultUnwrapErr, v as ResultUnwrapOk, u as RiverErrorSchema, c as RiverUncaughtSchema, m as SerializedServerSchema, S as Service, e as ServiceConfiguration, l as ServiceSchema, q as StreamProcedure, p as SubscriptionProcedure, t as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, r as createClient, s as serializeSchema } from '../services-e95a89d6.js';
3
3
  import { Static, TSchema } from '@sinclair/typebox';
4
4
  import { ServerTransport } from '../transport/index.cjs';
5
5
  import { Pushable } from 'it-pushable';
@@ -42,6 +42,6 @@ declare function createServer<Services extends AnyServiceSchemaMap, MetadataSche
42
42
  extendedContext?: Omit<ServiceContext, 'state'>;
43
43
  }>): Server<Services>;
44
44
 
45
- var version = "0.23.0";
45
+ var version = "0.23.1";
46
46
 
47
47
  export { PayloadType, version as RIVER_VERSION, Result, RiverError, Server, ServiceContext, createServer };
@@ -1,5 +1,5 @@
1
- import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-be91b485.js';
2
- export { C as Client, E as Err, O as Ok, x as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k as ProcType, a as Procedure, n as ProcedureMap, d as ProcedureResult, o as RPCProcedure, w as ResultUnwrapErr, v as ResultUnwrapOk, u as RiverErrorSchema, c as RiverUncaughtSchema, m as SerializedServerSchema, S as Service, e as ServiceConfiguration, l as ServiceSchema, q as StreamProcedure, p as SubscriptionProcedure, t as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, r as createClient, s as serializeSchema } from '../services-be91b485.js';
1
+ import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-95cb17b9.js';
2
+ export { C as Client, E as Err, O as Ok, x as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k as ProcType, a as Procedure, n as ProcedureMap, d as ProcedureResult, o as RPCProcedure, w as ResultUnwrapErr, v as ResultUnwrapOk, u as RiverErrorSchema, c as RiverUncaughtSchema, m as SerializedServerSchema, S as Service, e as ServiceConfiguration, l as ServiceSchema, q as StreamProcedure, p as SubscriptionProcedure, t as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, r as createClient, s as serializeSchema } from '../services-95cb17b9.js';
3
3
  import { Static, TSchema } from '@sinclair/typebox';
4
4
  import { ServerTransport } from '../transport/index.js';
5
5
  import { Pushable } from 'it-pushable';
@@ -42,6 +42,6 @@ declare function createServer<Services extends AnyServiceSchemaMap, MetadataSche
42
42
  extendedContext?: Omit<ServiceContext, 'state'>;
43
43
  }>): Server<Services>;
44
44
 
45
- var version = "0.23.0";
45
+ var version = "0.23.1";
46
46
 
47
47
  export { PayloadType, version as RIVER_VERSION, Result, RiverError, Server, ServiceContext, createServer };
@@ -8,10 +8,10 @@ import {
8
8
  createClient,
9
9
  createServer,
10
10
  serializeSchema
11
- } from "../chunk-VOJVLWVX.js";
11
+ } from "../chunk-IKKP6BZG.js";
12
12
  import {
13
13
  version
14
- } from "../chunk-PCKHBAVP.js";
14
+ } from "../chunk-RBH47IKH.js";
15
15
  import "../chunk-OTQNCLFH.js";
16
16
  export {
17
17
  Err,
@@ -93,6 +93,8 @@ type Result<T, E> = {
93
93
  ok: false;
94
94
  payload: E;
95
95
  };
96
+ declare function Ok<const T extends Array<unknown>, const E>(p: T): Result<T, E>;
97
+ declare function Ok<const T extends ReadonlyArray<unknown>, const E>(p: T): Result<T, E>;
96
98
  declare function Ok<const T, const E>(payload: T): Result<T, E>;
97
99
  declare function Err<const T, const E>(error: E): Result<T, E>;
98
100
  /**
@@ -93,6 +93,8 @@ type Result<T, E> = {
93
93
  ok: false;
94
94
  payload: E;
95
95
  };
96
+ declare function Ok<const T extends Array<unknown>, const E>(p: T): Result<T, E>;
97
+ declare function Ok<const T extends ReadonlyArray<unknown>, const E>(p: T): Result<T, E>;
96
98
  declare function Ok<const T, const E>(payload: T): Result<T, E>;
97
99
  declare function Err<const T, const E>(error: E): Result<T, E>;
98
100
  /**
@@ -113,7 +113,7 @@ function isAck(controlFlag) {
113
113
  var import_api = require("@opentelemetry/api");
114
114
 
115
115
  // package.json
116
- var version = "0.23.0";
116
+ var version = "0.23.1";
117
117
 
118
118
  // tracing/index.ts
119
119
  function getPropagationContext(ctx) {
@@ -349,8 +349,8 @@ var Session = class {
349
349
  replaceWithNewConnection(newConn) {
350
350
  this.closeStaleConnection(newConn);
351
351
  this.cancelGrace();
352
- this.connection = newConn;
353
352
  this.sendBufferedMessages(newConn);
353
+ this.connection = newConn;
354
354
  }
355
355
  beginGrace(cb) {
356
356
  log?.info(
@@ -1254,7 +1254,7 @@ var ClientTransport = class extends Transport {
1254
1254
  return false;
1255
1255
  }
1256
1256
  }
1257
- const { session } = this.getOrCreateSession(to, conn);
1257
+ const { session } = this.getOrCreateSession(to);
1258
1258
  const requestMsg = handshakeRequestMessage(
1259
1259
  this.clientId,
1260
1260
  to,