@replit/river 0.1.9 → 0.1.10

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.
@@ -110,7 +110,7 @@ describe('server-side test', () => {
110
110
  expect(o.readableLength).toBe(0);
111
111
  });
112
112
  });
113
- const port = 3001;
113
+ const port = 4445;
114
114
  describe('client <-> server integration test', () => {
115
115
  const server = http.createServer();
116
116
  let wss;
@@ -10,7 +10,7 @@ export class WebSocketTransport extends Transport {
10
10
  constructor(ws, clientId) {
11
11
  super(NaiveJsonCodec, clientId);
12
12
  this.ws = ws;
13
- ws.on('message', (msg) => this.onMessage(msg.toString()));
13
+ ws.onmessage = (msg) => this.onMessage(msg.data.toString());
14
14
  }
15
15
  send(msg) {
16
16
  const id = msg.id;
@@ -2,7 +2,7 @@ import http from 'http';
2
2
  import { WebSocketTransport } from './ws';
3
3
  import { describe, test, expect, beforeAll, afterAll } from 'vitest';
4
4
  import { createWebSocketClient, createWebSocketServer, onServerReady, waitForMessage, } from './util';
5
- const port = 3000;
5
+ const port = 4444;
6
6
  describe('sending and receiving across websockets works', () => {
7
7
  const server = http.createServer();
8
8
  let wss;
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@replit/river",
3
+ "sideEffects": false,
3
4
  "description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!",
4
- "version": "0.1.9",
5
+ "version": "0.1.10",
5
6
  "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
7
+ "main": "index.js",
8
+ "types": "index.d.ts",
8
9
  "files": [
9
10
  "dist"
10
11
  ],