@replit/river 0.15.5 → 0.15.7

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.
@@ -296,7 +296,6 @@ var LeakyBucketRateLimit = class {
296
296
  }
297
297
  this.budgetConsumed.set(user, newBudget);
298
298
  };
299
- restoreBudgetForUser();
300
299
  const intervalHandle = setInterval(
301
300
  restoreBudgetForUser,
302
301
  this.options.budgetRestoreIntervalMs
@@ -328,7 +327,7 @@ var defaultConnectionRetryOptions = {
328
327
  baseIntervalMs: 250,
329
328
  maxJitterMs: 200,
330
329
  maxBackoffMs: 32e3,
331
- attemptBudgetCapacity: 15,
330
+ attemptBudgetCapacity: 5,
332
331
  budgetRestoreIntervalMs: 200
333
332
  };
334
333
  var defaultClientTransportOptions = {
@@ -513,7 +512,8 @@ var Transport = class {
513
512
  log?.error(
514
513
  `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
515
514
  );
516
- session.closeStaleConnection(session.connection);
515
+ session.close();
516
+ this.deleteSession(session);
517
517
  }
518
518
  return;
519
519
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Connection
3
- } from "./chunk-EZQFVTBL.js";
3
+ } from "./chunk-7SPCAA6Q.js";
4
4
 
5
5
  // transport/transforms/messageFraming.ts
6
6
  import { Transform } from "node:stream";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Connection
3
- } from "./chunk-EZQFVTBL.js";
3
+ } from "./chunk-7SPCAA6Q.js";
4
4
 
5
5
  // transport/impls/ws/connection.ts
6
6
  var WebSocketConnection = class extends Connection {
@@ -483,7 +483,6 @@ var LeakyBucketRateLimit = class {
483
483
  }
484
484
  this.budgetConsumed.set(user, newBudget);
485
485
  };
486
- restoreBudgetForUser();
487
486
  const intervalHandle = setInterval(
488
487
  restoreBudgetForUser,
489
488
  this.options.budgetRestoreIntervalMs
@@ -567,7 +566,7 @@ var defaultConnectionRetryOptions = {
567
566
  baseIntervalMs: 250,
568
567
  maxJitterMs: 200,
569
568
  maxBackoffMs: 32e3,
570
- attemptBudgetCapacity: 15,
569
+ attemptBudgetCapacity: 5,
571
570
  budgetRestoreIntervalMs: 200
572
571
  };
573
572
  var defaultClientTransportOptions = {
@@ -752,7 +751,8 @@ var Transport = class {
752
751
  log?.error(
753
752
  `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
754
753
  );
755
- session.closeStaleConnection(session.connection);
754
+ session.close();
755
+ this.deleteSession(session);
756
756
  }
757
757
  return;
758
758
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  UdsConnection
3
- } from "../../../chunk-EVH5D43D.js";
3
+ } from "../../../chunk-L65XWBX2.js";
4
4
  import {
5
5
  ClientTransport
6
- } from "../../../chunk-EZQFVTBL.js";
6
+ } from "../../../chunk-7SPCAA6Q.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -407,7 +407,7 @@ var defaultConnectionRetryOptions = {
407
407
  baseIntervalMs: 250,
408
408
  maxJitterMs: 200,
409
409
  maxBackoffMs: 32e3,
410
- attemptBudgetCapacity: 15,
410
+ attemptBudgetCapacity: 5,
411
411
  budgetRestoreIntervalMs: 200
412
412
  };
413
413
  var defaultClientTransportOptions = {
@@ -592,7 +592,8 @@ var Transport = class {
592
592
  log?.error(
593
593
  `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
594
594
  );
595
- session.closeStaleConnection(session.connection);
595
+ session.close();
596
+ this.deleteSession(session);
596
597
  }
597
598
  return;
598
599
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  UdsConnection
3
- } from "../../../chunk-EVH5D43D.js";
3
+ } from "../../../chunk-L65XWBX2.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../../../chunk-EZQFVTBL.js";
6
+ } from "../../../chunk-7SPCAA6Q.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -387,7 +387,6 @@ var LeakyBucketRateLimit = class {
387
387
  }
388
388
  this.budgetConsumed.set(user, newBudget);
389
389
  };
390
- restoreBudgetForUser();
391
390
  const intervalHandle = setInterval(
392
391
  restoreBudgetForUser,
393
392
  this.options.budgetRestoreIntervalMs
@@ -471,7 +470,7 @@ var defaultConnectionRetryOptions = {
471
470
  baseIntervalMs: 250,
472
471
  maxJitterMs: 200,
473
472
  maxBackoffMs: 32e3,
474
- attemptBudgetCapacity: 15,
473
+ attemptBudgetCapacity: 5,
475
474
  budgetRestoreIntervalMs: 200
476
475
  };
477
476
  var defaultClientTransportOptions = {
@@ -656,7 +655,8 @@ var Transport = class {
656
655
  log?.error(
657
656
  `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
658
657
  );
659
- session.closeStaleConnection(session.connection);
658
+ session.close();
659
+ this.deleteSession(session);
660
660
  }
661
661
  return;
662
662
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WebSocketConnection
3
- } from "../../../chunk-PTRHVS6L.js";
3
+ } from "../../../chunk-XLJGKNV2.js";
4
4
  import {
5
5
  ClientTransport
6
- } from "../../../chunk-EZQFVTBL.js";
6
+ } from "../../../chunk-7SPCAA6Q.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import {
9
9
  log
@@ -407,7 +407,7 @@ var defaultConnectionRetryOptions = {
407
407
  baseIntervalMs: 250,
408
408
  maxJitterMs: 200,
409
409
  maxBackoffMs: 32e3,
410
- attemptBudgetCapacity: 15,
410
+ attemptBudgetCapacity: 5,
411
411
  budgetRestoreIntervalMs: 200
412
412
  };
413
413
  var defaultClientTransportOptions = {
@@ -592,7 +592,8 @@ var Transport = class {
592
592
  log?.error(
593
593
  `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
594
594
  );
595
- session.closeStaleConnection(session.connection);
595
+ session.close();
596
+ this.deleteSession(session);
596
597
  }
597
598
  return;
598
599
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  WebSocketConnection
3
- } from "../../../chunk-PTRHVS6L.js";
3
+ } from "../../../chunk-XLJGKNV2.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../../../chunk-EZQFVTBL.js";
6
+ } from "../../../chunk-7SPCAA6Q.js";
7
7
  import "../../../chunk-GFRAOY75.js";
8
8
  import "../../../chunk-H4BYJELI.js";
9
9
  import "../../../chunk-GZ7HCLLM.js";
@@ -418,7 +418,6 @@ var LeakyBucketRateLimit = class {
418
418
  }
419
419
  this.budgetConsumed.set(user, newBudget);
420
420
  };
421
- restoreBudgetForUser();
422
421
  const intervalHandle = setInterval(
423
422
  restoreBudgetForUser,
424
423
  this.options.budgetRestoreIntervalMs
@@ -502,7 +501,7 @@ var defaultConnectionRetryOptions = {
502
501
  baseIntervalMs: 250,
503
502
  maxJitterMs: 200,
504
503
  maxBackoffMs: 32e3,
505
- attemptBudgetCapacity: 15,
504
+ attemptBudgetCapacity: 5,
506
505
  budgetRestoreIntervalMs: 200
507
506
  };
508
507
  var defaultClientTransportOptions = {
@@ -687,7 +686,8 @@ var Transport = class {
687
686
  log?.error(
688
687
  `${this.clientId} -- received out-of-order msg (got: ${msg.seq}, wanted: ${session.nextExpectedSeq}), marking connection as dead: ${JSON.stringify(msg)}`
689
688
  );
690
- session.closeStaleConnection(session.connection);
689
+ session.close();
690
+ this.deleteSession(session);
691
691
  }
692
692
  return;
693
693
  }
@@ -6,7 +6,7 @@ import {
6
6
  ServerTransport,
7
7
  Session,
8
8
  Transport
9
- } from "../chunk-EZQFVTBL.js";
9
+ } from "../chunk-7SPCAA6Q.js";
10
10
  import {
11
11
  OpaqueTransportMessageSchema,
12
12
  TransportMessageSchema
@@ -5,7 +5,7 @@ import {
5
5
  import "../chunk-RPIDSIQG.js";
6
6
  import {
7
7
  Session
8
- } from "../chunk-EZQFVTBL.js";
8
+ } from "../chunk-7SPCAA6Q.js";
9
9
  import {
10
10
  coerceErrorString
11
11
  } from "../chunk-GFRAOY75.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@replit/river",
3
3
  "description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!",
4
- "version": "0.15.5",
4
+ "version": "0.15.7",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {