@replit/river 0.18.1 → 0.18.2

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.
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-VH3NGOXQ.js";
7
7
  import {
8
8
  log
9
- } from "./chunk-XCQF55SQ.js";
9
+ } from "./chunk-WER2DWCP.js";
10
10
 
11
11
  // router/services.ts
12
12
  import { Type } from "@sinclair/typebox";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Connection
3
- } from "./chunk-UNTGVPI6.js";
3
+ } from "./chunk-UABIFWM7.js";
4
4
 
5
5
  // transport/impls/ws/connection.ts
6
6
  var WebSocketConnection = class extends Connection {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Connection
3
- } from "./chunk-UNTGVPI6.js";
3
+ } from "./chunk-UABIFWM7.js";
4
4
 
5
5
  // transport/transforms/messageFraming.ts
6
6
  import { Transform } from "node:stream";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-VH3NGOXQ.js";
11
11
  import {
12
12
  log
13
- } from "./chunk-XCQF55SQ.js";
13
+ } from "./chunk-WER2DWCP.js";
14
14
  import {
15
15
  NaiveJsonCodec
16
16
  } from "./chunk-GZ7HCLLM.js";
@@ -33,7 +33,7 @@ var BaseLogger = class {
33
33
  }
34
34
  }
35
35
  };
36
- var stringLogger = (msg, _ctx, level) => {
36
+ var stringLogger = (msg, _ctx, level = "info") => {
37
37
  console.log(`[river:${level}] ${msg}`);
38
38
  };
39
39
  var colorMap = {
@@ -42,8 +42,8 @@ var colorMap = {
42
42
  warn: "\x1B[33m",
43
43
  error: "\x1B[31m"
44
44
  };
45
- var coloredStringLogger = (msg, _ctx, level) => {
46
- const color = colorMap[level ?? "info"];
45
+ var coloredStringLogger = (msg, _ctx, level = "info") => {
46
+ const color = colorMap[level];
47
47
  console.log(`[river:${color}${level}\x1B[0m] ${msg}`);
48
48
  };
49
49
  var jsonLogger = (msg, ctx, level) => {
@@ -55,7 +55,7 @@ function bindLogger(fn, level) {
55
55
  log = void 0;
56
56
  return;
57
57
  }
58
- if (fn instanceof Function) {
58
+ if (typeof fn === "function") {
59
59
  log = new BaseLogger(fn, level);
60
60
  return log;
61
61
  }
@@ -62,7 +62,7 @@ var BaseLogger = class {
62
62
  }
63
63
  }
64
64
  };
65
- var stringLogger = (msg, _ctx, level) => {
65
+ var stringLogger = (msg, _ctx, level = "info") => {
66
66
  console.log(`[river:${level}] ${msg}`);
67
67
  };
68
68
  var colorMap = {
@@ -71,8 +71,8 @@ var colorMap = {
71
71
  warn: "\x1B[33m",
72
72
  error: "\x1B[31m"
73
73
  };
74
- var coloredStringLogger = (msg, _ctx, level) => {
75
- const color = colorMap[level ?? "info"];
74
+ var coloredStringLogger = (msg, _ctx, level = "info") => {
75
+ const color = colorMap[level];
76
76
  console.log(`[river:${color}${level}\x1B[0m] ${msg}`);
77
77
  };
78
78
  var jsonLogger = (msg, ctx, level) => {
@@ -84,7 +84,7 @@ function bindLogger(fn, level) {
84
84
  log = void 0;
85
85
  return;
86
86
  }
87
- if (fn instanceof Function) {
87
+ if (typeof fn === "function") {
88
88
  log = new BaseLogger(fn, level);
89
89
  return log;
90
90
  }
@@ -3,7 +3,7 @@ import {
3
3
  coloredStringLogger,
4
4
  jsonLogger,
5
5
  stringLogger
6
- } from "../chunk-XCQF55SQ.js";
6
+ } from "../chunk-WER2DWCP.js";
7
7
  export {
8
8
  bindLogger,
9
9
  coloredStringLogger,
@@ -7,9 +7,9 @@ import {
7
7
  UNCAUGHT_ERROR,
8
8
  createClient,
9
9
  createServer
10
- } from "../chunk-QBGGJSQM.js";
10
+ } from "../chunk-D3CC5GL7.js";
11
11
  import "../chunk-VH3NGOXQ.js";
12
- import "../chunk-XCQF55SQ.js";
12
+ import "../chunk-WER2DWCP.js";
13
13
  export {
14
14
  Err,
15
15
  Ok,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  UdsConnection
3
- } from "../../../chunk-O36533OC.js";
3
+ } from "../../../chunk-PUX3U2SZ.js";
4
4
  import {
5
5
  ClientTransport
6
- } from "../../../chunk-UNTGVPI6.js";
6
+ } from "../../../chunk-UABIFWM7.js";
7
7
  import "../../../chunk-VH3NGOXQ.js";
8
8
  import {
9
9
  log
10
- } from "../../../chunk-XCQF55SQ.js";
10
+ } from "../../../chunk-WER2DWCP.js";
11
11
  import "../../../chunk-GZ7HCLLM.js";
12
12
 
13
13
  // transport/impls/uds/client.ts
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  UdsConnection
3
- } from "../../../chunk-O36533OC.js";
3
+ } from "../../../chunk-PUX3U2SZ.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../../../chunk-UNTGVPI6.js";
6
+ } from "../../../chunk-UABIFWM7.js";
7
7
  import "../../../chunk-VH3NGOXQ.js";
8
- import "../../../chunk-XCQF55SQ.js";
8
+ import "../../../chunk-WER2DWCP.js";
9
9
  import "../../../chunk-GZ7HCLLM.js";
10
10
 
11
11
  // transport/impls/uds/server.ts
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  WebSocketConnection
3
- } from "../../../chunk-5YDJDYVB.js";
3
+ } from "../../../chunk-K7CUSLWL.js";
4
4
  import {
5
5
  ClientTransport
6
- } from "../../../chunk-UNTGVPI6.js";
6
+ } from "../../../chunk-UABIFWM7.js";
7
7
  import "../../../chunk-VH3NGOXQ.js";
8
8
  import {
9
9
  log
10
- } from "../../../chunk-XCQF55SQ.js";
10
+ } from "../../../chunk-WER2DWCP.js";
11
11
  import "../../../chunk-GZ7HCLLM.js";
12
12
 
13
13
  // transport/impls/ws/client.ts
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WebSocketConnection
3
- } from "../../../chunk-5YDJDYVB.js";
3
+ } from "../../../chunk-K7CUSLWL.js";
4
4
  import {
5
5
  ServerTransport
6
- } from "../../../chunk-UNTGVPI6.js";
6
+ } from "../../../chunk-UABIFWM7.js";
7
7
  import "../../../chunk-VH3NGOXQ.js";
8
- import "../../../chunk-XCQF55SQ.js";
8
+ import "../../../chunk-WER2DWCP.js";
9
9
  import "../../../chunk-GZ7HCLLM.js";
10
10
 
11
11
  // transport/impls/ws/server.ts
@@ -6,12 +6,12 @@ import {
6
6
  ServerTransport,
7
7
  Session,
8
8
  Transport
9
- } from "../chunk-UNTGVPI6.js";
9
+ } from "../chunk-UABIFWM7.js";
10
10
  import {
11
11
  OpaqueTransportMessageSchema,
12
12
  TransportMessageSchema
13
13
  } from "../chunk-VH3NGOXQ.js";
14
- import "../chunk-XCQF55SQ.js";
14
+ import "../chunk-WER2DWCP.js";
15
15
  import "../chunk-GZ7HCLLM.js";
16
16
  export {
17
17
  ClientTransport,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  UNCAUGHT_ERROR,
3
3
  pushable
4
- } from "../chunk-QBGGJSQM.js";
4
+ } from "../chunk-D3CC5GL7.js";
5
5
  import "../chunk-RPIDSIQG.js";
6
6
  import {
7
7
  Session,
8
8
  defaultTransportOptions
9
- } from "../chunk-UNTGVPI6.js";
9
+ } from "../chunk-UABIFWM7.js";
10
10
  import {
11
11
  coerceErrorString
12
12
  } from "../chunk-VH3NGOXQ.js";
13
- import "../chunk-XCQF55SQ.js";
13
+ import "../chunk-WER2DWCP.js";
14
14
  import "../chunk-GZ7HCLLM.js";
15
15
 
16
16
  // util/testHelpers.ts
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.18.1",
4
+ "version": "0.18.2",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {