centrifuge 2.8.4 → 2.8.5

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.
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: centrifugal
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 2.8.5
2
+ =====
3
+
4
+ * fix typing of subscribe error context [#187](https://github.com/centrifugal/centrifuge-js/pull/187)
5
+ * throw error if no transport configured [#176](https://github.com/centrifugal/centrifuge-js/pull/176)
6
+
1
7
  2.8.4
2
8
  =====
3
9
 
package/README.md CHANGED
@@ -19,18 +19,14 @@ This client can connect to [Centrifuge](https://github.com/centrifugal/centrifug
19
19
 
20
20
  ## Install and quick start
21
21
 
22
- The simplest way to use `centrifuge-js` client is download it from `dist` folder and include into your web page using `script` tag:
23
-
24
- ```html
25
- <script src="centrifuge.js"></script>
26
- ```
27
-
28
- Or using cdn (replace `X` to concrete version number):
22
+ The simplest way is to include `centrifuge-js` into your web page using `script` tag. For example, from CDN (replace `X` to concrete version number):
29
23
 
30
24
  ```html
31
25
  <script src="https://cdn.jsdelivr.net/gh/centrifugal/centrifuge-js@2.X.X/dist/centrifuge.min.js"></script>
32
26
  ```
33
27
 
28
+ Or check out [centrifuge-js on cdnjs.com](https://cdnjs.com/libraries/centrifuge).
29
+
34
30
  Client is also available via `npm`:
35
31
 
36
32
  ```bash
@@ -139,7 +139,8 @@ declare namespace Centrifuge {
139
139
  }
140
140
 
141
141
  export interface SubscribeErrorContext {
142
- error: string;
142
+ code: number;
143
+ message: string;
143
144
  channel: string;
144
145
  isResubscribe: boolean;
145
146
  }
@@ -568,7 +568,7 @@ var Centrifuge = /*#__PURE__*/function (_EventEmitter) {
568
568
  if (!this._websocketSupported()) {
569
569
  this._debug('No Websocket support and no SockJS configured, can not connect');
570
570
 
571
- return;
571
+ throw new Error('No Websocket support and no SockJS configured, can not connect');
572
572
  }
573
573
 
574
574
  if (this._config.websocket !== null) {