wapi-client 0.8.12 → 0.8.13

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.
@@ -192,7 +192,9 @@ var BaseClient = class {
192
192
  return;
193
193
  }
194
194
  stream.push(message);
195
- stream.push(null);
195
+ if (!stream.destroyed) {
196
+ stream.push(null);
197
+ }
196
198
  this._requests.delete(message.id);
197
199
  if (this.connectionType === import__.WapiClientType.ws) {
198
200
  this._send({
@@ -184,7 +184,9 @@ var BaseClient = class {
184
184
  return;
185
185
  }
186
186
  stream.push(message);
187
- stream.push(null);
187
+ if (!stream.destroyed) {
188
+ stream.push(null);
189
+ }
188
190
  this._requests.delete(message.id);
189
191
  if (this.connectionType === WapiClientType.ws) {
190
192
  this._send({
@@ -192,7 +192,9 @@ var BaseClient = class {
192
192
  return;
193
193
  }
194
194
  stream.push(message);
195
- stream.push(null);
195
+ if (!stream.destroyed) {
196
+ stream.push(null);
197
+ }
196
198
  this._requests.delete(message.id);
197
199
  if (this.connectionType === import__.WapiClientType.ws) {
198
200
  this._send({
@@ -184,7 +184,9 @@ var BaseClient = class {
184
184
  return;
185
185
  }
186
186
  stream.push(message);
187
- stream.push(null);
187
+ if (!stream.destroyed) {
188
+ stream.push(null);
189
+ }
188
190
  this._requests.delete(message.id);
189
191
  if (this.connectionType === WapiClientType.ws) {
190
192
  this._send({
@@ -61,7 +61,7 @@ var import_base_client = require('./base-client.cjs');
61
61
  var import_connection = require('./connection/connection.enums.cjs');
62
62
  var import__ = require('../index.cjs');
63
63
  var _a;
64
- var CLIENT_VERSION = (_a = '0.8.12') != null ? _a : "";
64
+ var CLIENT_VERSION = (_a = '0.8.13') != null ? _a : "";
65
65
  function createWsClient(opts) {
66
66
  const initialConnection = createConnection(opts);
67
67
  return new WsClient(initialConnection, opts);
@@ -35,7 +35,7 @@ import {
35
35
  } from "./connection/connection.enums";
36
36
  import { WapiClientType } from "../index";
37
37
  var _a;
38
- var CLIENT_VERSION = (_a = '0.8.12') != null ? _a : "";
38
+ var CLIENT_VERSION = (_a = '0.8.13') != null ? _a : "";
39
39
  function createWsClient(opts) {
40
40
  const initialConnection = createConnection(opts);
41
41
  return new WsClient(initialConnection, opts);
package/dist/client.cjs CHANGED
@@ -66,7 +66,7 @@ var import_errors = require('./lib/errors.cjs');
66
66
  var import_fns = require('./fns/index.cjs');
67
67
  var import_import_data = require('./fns/import-data/import-data.guards.cjs');
68
68
  var _a;
69
- var CLIENT_VERSION = (_a = '0.8.12') != null ? _a : "";
69
+ var CLIENT_VERSION = (_a = '0.8.13') != null ? _a : "";
70
70
  var Client = class {
71
71
  /**
72
72
  * @internal
package/dist/client.js CHANGED
@@ -50,7 +50,7 @@ import {
50
50
  isImportDataFnInput
51
51
  } from "./fns/import-data/import-data.guards";
52
52
  var _a;
53
- var CLIENT_VERSION = (_a = '0.8.12') != null ? _a : "";
53
+ var CLIENT_VERSION = (_a = '0.8.13') != null ? _a : "";
54
54
  var Client = class {
55
55
  /**
56
56
  * @internal
@@ -95,6 +95,9 @@ var ReadStream = class {
95
95
  this.end();
96
96
  return this;
97
97
  }
98
+ get destroyed() {
99
+ return this._finished;
100
+ }
98
101
  };
99
102
  var ReadWriteStream = class {
100
103
  constructor() {
@@ -71,6 +71,9 @@ var ReadStream = class {
71
71
  this.end();
72
72
  return this;
73
73
  }
74
+ get destroyed() {
75
+ return this._finished;
76
+ }
74
77
  };
75
78
  var ReadWriteStream = class {
76
79
  constructor() {