@flowcore/sdk 1.11.3 → 1.11.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.11.4](https://github.com/flowcore-io/flowcore-sdk/compare/v1.11.3...v1.11.4) (2025-02-12)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * do not reconnect on 1005 ([4949d97](https://github.com/flowcore-io/flowcore-sdk/commit/4949d978c98412a5019a0cd6614d418cad10dc59))
9
+ * use code 1000 when manually disconnecting ([c83202d](https://github.com/flowcore-io/flowcore-sdk/commit/c83202d42e23aeb3d41cfc93ee131b21b2ba11f6))
10
+
3
11
  ## [1.11.3](https://github.com/flowcore-io/flowcore-sdk/compare/v1.11.2...v1.11.3) (2025-02-12)
4
12
 
5
13
 
@@ -200,7 +200,7 @@ export class NotificationClient {
200
200
  this.webSocket.onclose = (event) => {
201
201
  this._isOpen = false;
202
202
  this.logger.info(`Connection closed: Code [${event.code}], Reason: ${event.reason}`);
203
- if (event.code !== 1000) {
203
+ if (![1000].includes(event.code)) {
204
204
  this.attemptReconnect();
205
205
  return;
206
206
  }
@@ -234,7 +234,7 @@ export class NotificationClient {
234
234
  */
235
235
  disconnect() {
236
236
  if (this.webSocket) {
237
- this.webSocket.close();
237
+ this.webSocket.close(1000, "Disconnected by user");
238
238
  }
239
239
  }
240
240
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowcore/sdk",
3
- "version": "1.11.3",
3
+ "version": "1.11.4",
4
4
  "description": "Flowcore SDK",
5
5
  "homepage": "https://github.com/flowcore-io/flowcore-sdk#readme",
6
6
  "repository": {
@@ -226,7 +226,7 @@ class NotificationClient {
226
226
  this.webSocket.onclose = (event) => {
227
227
  this._isOpen = false;
228
228
  this.logger.info(`Connection closed: Code [${event.code}], Reason: ${event.reason}`);
229
- if (event.code !== 1000) {
229
+ if (![1000].includes(event.code)) {
230
230
  this.attemptReconnect();
231
231
  return;
232
232
  }
@@ -260,7 +260,7 @@ class NotificationClient {
260
260
  */
261
261
  disconnect() {
262
262
  if (this.webSocket) {
263
- this.webSocket.close();
263
+ this.webSocket.close(1000, "Disconnected by user");
264
264
  }
265
265
  }
266
266
  /**