@resolveio/server-lib 20.14.35 → 20.14.37

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.
@@ -75,6 +75,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
75
75
  exports.SubscriptionManager = void 0;
76
76
  var NodeCache = require("node-cache");
77
77
  var msgpackr_1 = require("msgpackr");
78
+ var WebSocket = require("ws");
78
79
  var flag_collection_1 = require("../collections/flag.collection");
79
80
  var logged_in_users_collection_1 = require("../collections/logged-in-users.collection");
80
81
  var app_status_1 = require("../publications/app-status");
@@ -530,7 +531,7 @@ var SubscriptionManager = /** @class */ (function () {
530
531
  if (!!_b.done) return [3 /*break*/, 10];
531
532
  client = _b.value;
532
533
  ws = this._websocketManager.getWebSocket(client.id_socket);
533
- if (!((ws === null || ws === void 0 ? void 0 : ws.readyState) === ws.OPEN)) return [3 /*break*/, 9];
534
+ if (!((ws === null || ws === void 0 ? void 0 : ws.readyState) === WebSocket.OPEN)) return [3 /*break*/, 9];
534
535
  _f.label = 6;
535
536
  case 6:
536
537
  _f.trys.push([6, 8, , 9]);
@@ -1663,7 +1664,7 @@ var SubscriptionManager = /** @class */ (function () {
1663
1664
  if (!!_b.done) return [3 /*break*/, 9];
1664
1665
  client = _b.value;
1665
1666
  ws = this._websocketManager.getWebSocket(client.id_socket);
1666
- if (!((ws === null || ws === void 0 ? void 0 : ws.readyState) === ws.OPEN)) return [3 /*break*/, 8];
1667
+ if (!((ws === null || ws === void 0 ? void 0 : ws.readyState) === WebSocket.OPEN)) return [3 /*break*/, 8];
1667
1668
  _l.label = 5;
1668
1669
  case 5:
1669
1670
  _l.trys.push([5, 7, , 8]);
@@ -2275,7 +2276,7 @@ var SubscriptionManager = /** @class */ (function () {
2275
2276
  for (_a = __values(sub.clients), _b = _a.next(); !_b.done; _b = _a.next()) {
2276
2277
  client = _b.value;
2277
2278
  ws = this._websocketManager.getWebSocket(client.id_socket);
2278
- if (ws && ws.readyState === ws.OPEN) {
2279
+ if (ws && ws.readyState === WebSocket.OPEN) {
2279
2280
  if (packedRes) {
2280
2281
  this._websocketManager.sendPackedBuffer(ws, client.messageId, false, packedRes, execution.encoding || 'msgpack');
2281
2282
  }
@@ -2318,7 +2319,7 @@ var SubscriptionManager = /** @class */ (function () {
2318
2319
  for (_c = __values(sub.clients), _d = _c.next(); !_d.done; _d = _c.next()) {
2319
2320
  client = _d.value;
2320
2321
  ws = this._websocketManager.getWebSocket(client.id_socket);
2321
- if (ws && ws.readyState === ws.OPEN) {
2322
+ if (ws && ws.readyState === WebSocket.OPEN) {
2322
2323
  if (packedRes) {
2323
2324
  this._websocketManager.sendPackedBuffer(ws, client.messageId, false, packedRes, execution.encoding || 'msgpack');
2324
2325
  }
@@ -2379,7 +2380,7 @@ var SubscriptionManager = /** @class */ (function () {
2379
2380
  for (_f = __values(sub.clients), _g = _f.next(); !_g.done; _g = _f.next()) {
2380
2381
  client = _g.value;
2381
2382
  ws = this._websocketManager.getWebSocket(client.id_socket);
2382
- if (ws && ws.readyState === ws.OPEN) {
2383
+ if (ws && ws.readyState === WebSocket.OPEN) {
2383
2384
  serverRes = {
2384
2385
  messageId: client.messageId,
2385
2386
  hasError: true,