@resolveio/server-lib 4.3.4 → 4.3.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.
@@ -30,6 +30,13 @@ var schema = {
30
30
  },
31
31
  collection_name: {
32
32
  type: String
33
+ },
34
+ subData: {
35
+ type: Array
36
+ },
37
+ 'subData.$': {
38
+ type: Object,
39
+ blackbox: true
33
40
  }
34
41
  };
35
42
  var DefaultSchema = new mongoose_1.Schema(schema, {
@@ -409,7 +409,7 @@ var SubscriptionManager = /** @class */ (function () {
409
409
  else if (collection === 'support-tickets') {
410
410
  _this._mainServer.getMethodManager().callMethodInternal('sendSupportTicketEmail', doc.o._id);
411
411
  }
412
- if (!collection.endsWith('.versions')) {
412
+ if (!collection.endsWith('.versions') && !collection.startsWith('system.')) {
413
413
  _this._oplogQueue.push({
414
414
  type: 'insert',
415
415
  collection: collection,
@@ -427,7 +427,7 @@ var SubscriptionManager = /** @class */ (function () {
427
427
  if (collection === 'cron-jobs') {
428
428
  _this._mainServer.getCronManager().checkCronJobsForUpdates();
429
429
  }
430
- if (!collection.endsWith('.versions')) {
430
+ if (!collection.endsWith('.versions') && !collection.startsWith('system.')) {
431
431
  _this._oplogQueue.push({
432
432
  type: 'update',
433
433
  collection: collection,
@@ -761,7 +761,7 @@ var SubscriptionManager = /** @class */ (function () {
761
761
  return __generator(this, function (_c) {
762
762
  that = this;
763
763
  if (subscription.publication !== 'superadminAPM') {
764
- that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection);
764
+ that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, subscription.subscriptionData);
765
765
  }
766
766
  if (!that._publications[subscription.publication].ws_specific) { // Same pub for all users
767
767
  (_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
@@ -814,7 +814,7 @@ var SubscriptionManager = /** @class */ (function () {
814
814
  return __generator(this, function (_b) {
815
815
  that = this;
816
816
  if (subscription.publication !== 'superadminAPM') {
817
- that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection);
817
+ that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, subscription.subscriptionData);
818
818
  }
819
819
  (_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
820
820
  subscription.clients.forEach(function (client) {
package/methods/logs.js CHANGED
@@ -28,14 +28,15 @@ function loadLogMethods(methodManager) {
28
28
  },
29
29
  insertSubscriptionLog: {
30
30
  skipQueue: true,
31
- function: function (type, subscription, collection_name) {
31
+ function: function (type, subscription, collection_name, subData) {
32
32
  return log_subscription_collection_1.LogSubscriptions.create({
33
33
  _id: mongoose_1.Types.ObjectId().toHexString(),
34
34
  __v: 0,
35
35
  date: new Date(),
36
36
  type: type,
37
37
  subscription: subscription,
38
- collection_name: collection_name
38
+ collection_name: collection_name,
39
+ subData: subData
39
40
  });
40
41
  },
41
42
  skipValidation: true
@@ -4,5 +4,6 @@ export interface LogSubscriptionModel extends CollectionDocument {
4
4
  type: LogSubscriptionType;
5
5
  subscription: string;
6
6
  collection_name: string;
7
+ subData: any[];
7
8
  }
8
9
  export declare type LogSubscriptionType = 'insert' | 'update' | 'delete';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "4.3.4",
3
+ "version": "4.3.5",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {