next-ws 0.2.0 → 0.2.1-next.b55c6fe

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.
package/README.md CHANGED
@@ -147,21 +147,6 @@ interface WebSocketProviderProps {
147
147
  protocols?: string[] | string;
148
148
  /** The binary type to use. */
149
149
  binaryType?: BinaryType;
150
-
151
- /** Whether to reconnect when the WebSocket closes. */
152
- reconnect?: boolean;
153
- /** The maximum number of times to reconnect. */
154
- maxReconnectAttempts?: number;
155
- /** The delay between reconnect attempts. */
156
- reconnectDelay?: number;
157
-
158
- // NOTE: You do not need to use these, they are only here for convenience
159
- /** Event listener that is triggered when the WebSocket connection opens. */
160
- onOpen?(this: WebSocket, event: Event): any;
161
- /** Event listener that is triggered when the WebSocket connection closes. */
162
- onClose?(this: WebSocket, event: CloseEvent): any;
163
- /** Event listener that is triggered when an error occurs. */
164
- onError?(this: WebSocket, event: Event): any;
165
150
  }
166
151
  ```
167
152
 
package/package.json CHANGED
@@ -1,8 +1,14 @@
1
1
  {
2
2
  "name": "next-ws",
3
- "version": "0.2.0",
3
+ "version": "0.2.1-next.b55c6fe",
4
4
  "description": "Add support for WebSockets in Next.js 13 app directory",
5
- "keywords": ["next", "websocket", "ws", "server", "client"],
5
+ "keywords": [
6
+ "next",
7
+ "websocket",
8
+ "ws",
9
+ "server",
10
+ "client"
11
+ ],
6
12
  "license": "MIT",
7
13
  "homepage": "https://github.com/apteryxxyz/next-ws#readme",
8
14
  "repository": {
@@ -13,7 +19,12 @@
13
19
  "bugs": {
14
20
  "url": "https://github.com/apteryxxyz/next-ws/issues"
15
21
  },
16
- "files": ["index.js", "index.d.ts", "client", "server"],
22
+ "files": [
23
+ "index.js",
24
+ "index.d.ts",
25
+ "client",
26
+ "server"
27
+ ],
17
28
  "main": "./index.js",
18
29
  "types": "./index.d.ts",
19
30
  "scripts": {
@@ -43,4 +54,4 @@
43
54
  "rimraf": "^5.0.1",
44
55
  "typescript": "<5.1.0"
45
56
  }
46
- }
57
+ }
@@ -31,6 +31,6 @@ function verifyPatch() {
31
31
  throw new Error('Next.js has not been patched to support Next WS, please run `npx next-ws-cli patch`');
32
32
  const version = require('next/package.json').version.split('-')[0];
33
33
  if (patch.version !== version)
34
- throw new Error(`Next.js version mismatch, expected ${patch.version} but found ${version}`);
34
+ throw new Error(`Next.js version mismatch, expected ${patch.version} but found ${version}, try running \`npx next-ws-cli patch\``);
35
35
  }
36
36
  exports.verifyPatch = verifyPatch;