@resolveio/server-lib 2.1.1 → 2.1.2

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.
@@ -532,7 +532,8 @@ var SubscriptionManager = /** @class */ (function () {
532
532
  document = _c.sent();
533
533
  _c.label = 2;
534
534
  case 2:
535
- if (!(that._publications[sub.publication].preFunction && !noFetchFunction)) return [3 /*break*/, 4];
535
+ if (!that._publications[sub.publication].preFunction) return [3 /*break*/, 5];
536
+ if (!!noFetchFunction) return [3 /*break*/, 4];
536
537
  _b = sub;
537
538
  return [4 /*yield*/, that._publications[sub.publication].preFunction(sub.subscriptionData)];
538
539
  case 3:
@@ -540,18 +541,21 @@ var SubscriptionManager = /** @class */ (function () {
540
541
  if (that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) {
541
542
  that.sendPubData(sub);
542
543
  }
543
- return [3 /*break*/, 5];
544
- case 4:
544
+ _c.label = 4;
545
+ case 4: return [3 /*break*/, 6];
546
+ case 5:
545
547
  if (that._publications[sub.publication].ws_specific) {
546
548
  sub.clients.forEach(function (client) {
547
549
  var _a;
548
- if (that._publications[sub.publication].fetchFunction && !noFetchFunction) {
549
- if ((_a = that._publications[sub.publication]).fetchFunction.apply(_a, [document, client.id_user].concat(sub.subscriptionData))) {
550
- that._wss.clients.forEach(function (ws) {
551
- if (ws['id_socket'] === client.id_socket) {
552
- that.sendPubDataOnce(ws, client.messageId, sub);
553
- }
554
- });
550
+ if (that._publications[sub.publication].fetchFunction) {
551
+ if (!noFetchFunction) {
552
+ if ((_a = that._publications[sub.publication]).fetchFunction.apply(_a, [document, client.id_user].concat(sub.subscriptionData))) {
553
+ that._wss.clients.forEach(function (ws) {
554
+ if (ws['id_socket'] === client.id_socket) {
555
+ that.sendPubDataOnce(ws, client.messageId, sub);
556
+ }
557
+ });
558
+ }
555
559
  }
556
560
  }
557
561
  else if (!fetchFunctionOnly) {
@@ -564,17 +568,19 @@ var SubscriptionManager = /** @class */ (function () {
564
568
  });
565
569
  }
566
570
  else {
567
- if (that._publications[sub.publication].fetchFunction && !noFetchFunction) {
568
- if ((_a = that._publications[sub.publication]).fetchFunction.apply(_a, [document].concat(sub.subscriptionData))) {
569
- that.sendPubData(sub);
571
+ if (that._publications[sub.publication].fetchFunction) {
572
+ if (!noFetchFunction) {
573
+ if ((_a = that._publications[sub.publication]).fetchFunction.apply(_a, [document].concat(sub.subscriptionData))) {
574
+ that.sendPubData(sub);
575
+ }
570
576
  }
571
577
  }
572
578
  else if (!fetchFunctionOnly) {
573
579
  that.sendPubData(sub);
574
580
  }
575
581
  }
576
- _c.label = 5;
577
- case 5: return [2 /*return*/];
582
+ _c.label = 6;
583
+ case 6: return [2 /*return*/];
578
584
  }
579
585
  });
580
586
  }); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {
package/server-app.js CHANGED
@@ -658,45 +658,3 @@ var ResolveIOMainServer = /** @class */ (function () {
658
658
  return ResolveIOMainServer;
659
659
  }());
660
660
  exports.default = ResolveIOMainServer;
661
- // export * from './collections/active-subscription.collection';
662
- // export * from './collections/app-status.collection';
663
- // export * from './collections/app-version.collection';
664
- // export * from './collections/counter.collection';
665
- // export * from './collections/cron-job-history.collection';
666
- // export * from './collections/cron-job.collection';
667
- // export * from './collections/file.collection';
668
- // export * from './collections/flag.collection';
669
- // export * from './collections/log.collection';
670
- // export * from './collections/logged-in-users.collection';
671
- // export * from './collections/method-call.collection';
672
- // export * from './collections/method-response.collection';
673
- // export * from './collections/queue-flag.collection';
674
- // export * from './collections/queue-method.collection';
675
- // export * from './collections/queue-response.collection';
676
- // export * from './collections/support-ticket.collection';
677
- // export * from './collections/user.collection';
678
- // export * from './managers/cron.manager';
679
- // export * from './managers/method.manager';
680
- // export * from './managers/queue-method.manager';
681
- // export * from './managers/subscription.manager';
682
- // export * from './managers/support.manager';
683
- // export * from './models/active-subscription.model';
684
- // export * from './models/app-status.model';
685
- // export * from './models/app-version.model';
686
- // export * from './models/collection-document.model';
687
- // export * from './models/counter.model';
688
- // // export * from './models/cron-job-history.model';
689
- // export * from './models/cron-job.model';
690
- // export * from './models/dialog.model';
691
- // export * from './models/file.model';
692
- // export * from './models/flag.model';
693
- // export * from './models/log.model';
694
- // export * from './models/method.model';
695
- // export * from './models/pagination.model';
696
- // export * from './models/permission.model';
697
- // export * from './models/select-data-label.model';
698
- // export * from './models/server-response.model';
699
- // export * from './models/support-method.model';
700
- // export * from './models/support-ticket.model';
701
- // export * from './models/user.model';
702
- // export * from './util/common';