@resolveio/server-lib 12.5.34 → 12.5.36

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.
Files changed (47) hide show
  1. package/cron/cron.js +15 -15
  2. package/cron/cron.js.map +1 -1
  3. package/fixtures/cron-jobs.js +1 -1
  4. package/fixtures/cron-jobs.js.map +1 -1
  5. package/http/auth.js +6 -6
  6. package/http/auth.js.map +1 -1
  7. package/index.js +5 -1
  8. package/index.js.map +1 -1
  9. package/managers/cron.manager.js +4 -0
  10. package/managers/cron.manager.js.map +1 -1
  11. package/managers/method.manager.d.ts +1 -1
  12. package/managers/method.manager.js +34 -32
  13. package/managers/method.manager.js.map +1 -1
  14. package/managers/mongo.manager.js +45 -41
  15. package/managers/mongo.manager.js.map +1 -1
  16. package/managers/monitor.manager.js +3 -3
  17. package/managers/monitor.manager.js.map +1 -1
  18. package/managers/subscription.manager.js +26 -24
  19. package/managers/subscription.manager.js.map +1 -1
  20. package/methods/accounts.js +5 -5
  21. package/methods/accounts.js.map +1 -1
  22. package/methods/aws.js +11 -11
  23. package/methods/aws.js.map +1 -1
  24. package/methods/collections.js +7 -7
  25. package/methods/collections.js.map +1 -1
  26. package/methods/counters.js +1 -1
  27. package/methods/counters.js.map +1 -1
  28. package/methods/cron-jobs.js +10 -10
  29. package/methods/cron-jobs.js.map +1 -1
  30. package/methods/logs.js +3 -3
  31. package/methods/logs.js.map +1 -1
  32. package/methods/monitor.js +1 -1
  33. package/methods/monitor.js.map +1 -1
  34. package/methods/report-builder.js +7 -7
  35. package/methods/report-builder.js.map +1 -1
  36. package/package.json +15 -16
  37. package/public_api.js +5 -1
  38. package/public_api.js.map +1 -1
  39. package/publications/logs.js +74 -0
  40. package/publications/logs.js.map +1 -1
  41. package/server-app.d.ts +1 -1
  42. package/server-app.js +22 -20
  43. package/server-app.js.map +1 -1
  44. package/util/common.js +9 -7
  45. package/util/common.js.map +1 -1
  46. package/util/schema-report-builder.js +12 -12
  47. package/util/schema-report-builder.js.map +1 -1
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -48,12 +50,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
48
50
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
49
51
  }
50
52
  };
51
- var __spreadArrays = (this && this.__spreadArrays) || function () {
52
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
53
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
54
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
55
- r[k] = a[j];
56
- return r;
53
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
54
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
55
+ if (ar || !(i in from)) {
56
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
57
+ ar[i] = from[i];
58
+ }
59
+ }
60
+ return to.concat(ar || Array.prototype.slice.call(from));
57
61
  };
58
62
  Object.defineProperty(exports, "__esModule", { value: true });
59
63
  exports.objectIdHexString = exports.MongoManagerUserCollection = exports.MongoManagerCollection = exports.MongoManagerModel = exports.MongoManager = void 0;
@@ -68,7 +72,7 @@ var crypto = require('crypto');
68
72
  var scmp = require('scmp');
69
73
  var monitor_manager_1 = require("./monitor.manager");
70
74
  var os_1 = require("os");
71
- var numCPUs = os_1.cpus().length;
75
+ var numCPUs = (0, os_1.cpus)().length;
72
76
  var v8 = require('v8');
73
77
  var MongoManager = /** @class */ (function () {
74
78
  function MongoManager() {
@@ -238,7 +242,7 @@ var MongoManager = /** @class */ (function () {
238
242
  mongoQueue.running = false;
239
243
  }, function (err) {
240
244
  monitor_1.finish();
241
- console.log.apply(console, __spreadArrays([new Date(), 'Error ' + mongoQueue.name_function, mongoQueue.name_collection], mongoQueue.data_function, [err]));
245
+ console.log.apply(console, __spreadArray(__spreadArray([new Date(), 'Error ' + mongoQueue.name_function, mongoQueue.name_collection], mongoQueue.data_function, false), [err], false));
242
246
  mongoQueue.cbs.forEach(function (cb) {
243
247
  cb(err, null, false);
244
248
  });
@@ -251,7 +255,7 @@ var MongoManager = /** @class */ (function () {
251
255
  });
252
256
  }
253
257
  else {
254
- var monitor_2 = new monitor_manager_1.MonitorMongo(mongoQueue.name_function, mongoQueue.name_collection, JSON.stringify(__spreadArrays(mongoQueue.data_function, [mongoQueue.name_function_addt], mongoQueue.data_function_addt)));
258
+ var monitor_2 = new monitor_manager_1.MonitorMongo(mongoQueue.name_function, mongoQueue.name_collection, JSON.stringify(__spreadArray(__spreadArray(__spreadArray([], mongoQueue.data_function, true), [mongoQueue.name_function_addt], false), mongoQueue.data_function_addt, true)));
255
259
  (_b = (_c = index_1.ResolveIOServer.getMainDB().collection(mongoQueue.name_collection))[mongoQueue.name_function].apply(_c, mongoQueue.data_function))[mongoQueue.name_function_addt].apply(_b, mongoQueue.data_function_addt).then(function (res) {
256
260
  monitor_2.finish();
257
261
  if (!mongoQueue.invalidateFlag) {
@@ -378,7 +382,7 @@ var MongoManagerModel = /** @class */ (function () {
378
382
  }
379
383
  if (options.useVersionCollection) {
380
384
  this.collection_main.useVersions = true;
381
- var versionSchema = common_1.deepCopy(options.schema);
385
+ var versionSchema = (0, common_1.deepCopy)(options.schema);
382
386
  versionSchema._id.type = 'Object';
383
387
  versionSchema._id.blackbox = true;
384
388
  var versionOptions = {
@@ -425,9 +429,9 @@ var MongoManagerCollection = /** @class */ (function () {
425
429
  this.collectionOptions = options.collectionOptions;
426
430
  if (options.useReportBuilder) {
427
431
  this.useRB = true;
428
- var schemaCopy = common_1.deepCopy(options.schema);
429
- var rbSchema = common_1.buildRbLookups(options.reportBuilderLookupTables, schemaCopy, []);
430
- this.rbSchema = common_1.buildRbSchema(rbSchema);
432
+ var schemaCopy = (0, common_1.deepCopy)(options.schema);
433
+ var rbSchema = (0, common_1.buildRbLookups)(options.reportBuilderLookupTables, schemaCopy, []);
434
+ this.rbSchema = (0, common_1.buildRbSchema)(rbSchema);
431
435
  }
432
436
  var interval = setInterval(function () {
433
437
  if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainServer() && index_1.ResolveIOServer.getMongoManager() && index_1.ResolveIOServer.getMongoManager().getServerCollections().length) {
@@ -613,7 +617,7 @@ var MongoManagerCollection = /** @class */ (function () {
613
617
  type: 'document',
614
618
  collection: this.collectionName,
615
619
  id_document: doc._id,
616
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, options])) < 200000 ? JSON.stringify([doc, filter, options], null, 2) : 'Too Big',
620
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, options])) < 200000 ? JSON.stringify([doc, filter, options], null, 2) : 'Too Big',
617
621
  method: 'deleteMany',
618
622
  id_user: '',
619
623
  user: '',
@@ -621,7 +625,7 @@ var MongoManagerCollection = /** @class */ (function () {
621
625
  route: ''
622
626
  });
623
627
  if (this.useVersions) {
624
- versionDoc = common_1.deepCopy(doc);
628
+ versionDoc = (0, common_1.deepCopy)(doc);
625
629
  versionDoc._id = { _id: doc._id, __v: doc.__v };
626
630
  index_1.ResolveIOServer.getMongoManager().collection(this.versionCollection).replaceOne({ _id: { _id: doc._id, __v: doc.__v } }, versionDoc, { upsert: true });
627
631
  index_1.ResolveIOServer.getMongoManager().collection(this.versionCollection).deleteMany({ $and: [{ '_id._id': doc._id }, { '_id.__v': { $lt: doc.__v - 1 } }] });
@@ -671,7 +675,7 @@ var MongoManagerCollection = /** @class */ (function () {
671
675
  type: 'document',
672
676
  collection: this.collectionName,
673
677
  id_document: doc._id,
674
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, options])) < 200000 ? JSON.stringify([doc, filter, options], null, 2) : 'Too Big',
678
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, options])) < 200000 ? JSON.stringify([doc, filter, options], null, 2) : 'Too Big',
675
679
  method: 'deleteOne',
676
680
  id_user: '',
677
681
  user: '',
@@ -680,7 +684,7 @@ var MongoManagerCollection = /** @class */ (function () {
680
684
  });
681
685
  }
682
686
  if (this.useVersions) {
683
- versionDoc = common_1.deepCopy(doc);
687
+ versionDoc = (0, common_1.deepCopy)(doc);
684
688
  versionDoc._id = { _id: doc._id, __v: doc.__v };
685
689
  index_1.ResolveIOServer.getMongoManager().collection(this.versionCollection).replaceOne({ _id: { _id: doc._id, __v: doc.__v } }, versionDoc, { upsert: true });
686
690
  index_1.ResolveIOServer.getMongoManager().collection(this.versionCollection).deleteMany({ $and: [{ '_id._id': doc._id }, { '_id.__v': { $lt: doc.__v - 1 } }] });
@@ -933,7 +937,7 @@ var MongoManagerCollection = /** @class */ (function () {
933
937
  type: 'document',
934
938
  collection: _this.collectionName,
935
939
  id_document: doc._id,
936
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, options])) < 200000 ? JSON.stringify([doc, filter, options], null, 2) : 'Too Big',
940
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, options])) < 200000 ? JSON.stringify([doc, filter, options], null, 2) : 'Too Big',
937
941
  method: 'findOneAndDelete',
938
942
  id_user: '',
939
943
  user: '',
@@ -942,7 +946,7 @@ var MongoManagerCollection = /** @class */ (function () {
942
946
  });
943
947
  }
944
948
  if (_this.useVersions) {
945
- var versionDoc = common_1.deepCopy(doc);
949
+ var versionDoc = (0, common_1.deepCopy)(doc);
946
950
  versionDoc._id = { _id: doc._id, __v: doc.__v };
947
951
  index_1.ResolveIOServer.getMongoManager().collection(_this.versionCollection).replaceOne({ _id: { _id: doc._id, __v: doc.__v } }, versionDoc, { upsert: true });
948
952
  }
@@ -1006,7 +1010,7 @@ var MongoManagerCollection = /** @class */ (function () {
1006
1010
  type: 'document',
1007
1011
  collection: _this.collectionName,
1008
1012
  id_document: doc._id,
1009
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, replacement, options])) < 200000 ? JSON.stringify([doc, filter, replacement, options], null, 2) : 'Too Big',
1013
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, replacement, options])) < 200000 ? JSON.stringify([doc, filter, replacement, options], null, 2) : 'Too Big',
1010
1014
  method: 'findOneAndReplace',
1011
1015
  id_user: '',
1012
1016
  user: '',
@@ -1015,7 +1019,7 @@ var MongoManagerCollection = /** @class */ (function () {
1015
1019
  });
1016
1020
  }
1017
1021
  if (_this.useVersions) {
1018
- var versionDoc = common_1.deepCopy(doc);
1022
+ var versionDoc = (0, common_1.deepCopy)(doc);
1019
1023
  versionDoc._id = { _id: doc._id, __v: doc.__v };
1020
1024
  index_1.ResolveIOServer.getMongoManager().collection(_this.versionCollection).replaceOne({ _id: { _id: doc._id, __v: doc.__v } }, versionDoc, { upsert: true });
1021
1025
  }
@@ -1096,7 +1100,7 @@ var MongoManagerCollection = /** @class */ (function () {
1096
1100
  type: 'document',
1097
1101
  collection: _this.collectionName,
1098
1102
  id_document: doc._id,
1099
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, update, options])) < 200000 ? JSON.stringify([doc, filter, update, options], null, 2) : 'Too Big',
1103
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, update, options])) < 200000 ? JSON.stringify([doc, filter, update, options], null, 2) : 'Too Big',
1100
1104
  method: 'findOneAndUpdate',
1101
1105
  id_user: '',
1102
1106
  user: '',
@@ -1105,7 +1109,7 @@ var MongoManagerCollection = /** @class */ (function () {
1105
1109
  });
1106
1110
  }
1107
1111
  if (_this.useVersions) {
1108
- var versionDoc = common_1.deepCopy(doc);
1112
+ var versionDoc = (0, common_1.deepCopy)(doc);
1109
1113
  versionDoc._id = { _id: doc._id, __v: doc.__v };
1110
1114
  index_1.ResolveIOServer.getMongoManager().collection(_this.versionCollection).replaceOne({ _id: { _id: doc._id, __v: doc.__v } }, versionDoc, { upsert: true });
1111
1115
  }
@@ -1196,7 +1200,7 @@ var MongoManagerCollection = /** @class */ (function () {
1196
1200
  type: 'document',
1197
1201
  collection: this.collectionName,
1198
1202
  id_document: doc._id,
1199
- payload: common_1.getBinarySize(JSON.stringify([doc, options])) < 200000 ? JSON.stringify([doc, options], null, 2) : 'Too Big',
1203
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, options])) < 200000 ? JSON.stringify([doc, options], null, 2) : 'Too Big',
1200
1204
  method: 'insertMany',
1201
1205
  id_user: '',
1202
1206
  user: '',
@@ -1258,7 +1262,7 @@ var MongoManagerCollection = /** @class */ (function () {
1258
1262
  type: 'document',
1259
1263
  collection: this.collectionName,
1260
1264
  id_document: doc._id,
1261
- payload: common_1.getBinarySize(JSON.stringify([doc, options])) < 200000 ? JSON.stringify([doc, options], null, 2) : 'Too Big',
1265
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, options])) < 200000 ? JSON.stringify([doc, options], null, 2) : 'Too Big',
1262
1266
  method: 'insertOne',
1263
1267
  id_user: '',
1264
1268
  user: '',
@@ -1349,7 +1353,7 @@ var MongoManagerCollection = /** @class */ (function () {
1349
1353
  }
1350
1354
  if (!(doc.__v === replacement.__v)) return [3 /*break*/, 3];
1351
1355
  replacement.__v += 1;
1352
- versionDoc = common_1.deepCopy(doc);
1356
+ versionDoc = (0, common_1.deepCopy)(doc);
1353
1357
  versionDoc._id = { _id: doc._id, __v: doc.__v };
1354
1358
  index_1.ResolveIOServer.getMongoManager().collection(this.versionCollection).replaceOne({ _id: { _id: doc._id, __v: doc.__v } }, versionDoc, { upsert: true });
1355
1359
  if (doc.__v >= 4) {
@@ -1361,7 +1365,7 @@ var MongoManagerCollection = /** @class */ (function () {
1361
1365
  type: 'document',
1362
1366
  collection: this.collectionName,
1363
1367
  id_document: doc._id,
1364
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, replacement, options])) < 200000 ? JSON.stringify([doc, filter, replacement, options], null, 2) : 'Too Big',
1368
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, replacement, options])) < 200000 ? JSON.stringify([doc, filter, replacement, options], null, 2) : 'Too Big',
1365
1369
  method: 'replaceOne',
1366
1370
  id_user: '',
1367
1371
  user: '',
@@ -1398,7 +1402,7 @@ var MongoManagerCollection = /** @class */ (function () {
1398
1402
  if (prevDoc) {
1399
1403
  docId = doc._id;
1400
1404
  docVersion = doc.__v;
1401
- updatedDoc_1 = common_1.getMongoMergeUpdatedDoc(replacement, doc, prevDoc);
1405
+ updatedDoc_1 = (0, common_1.getMongoMergeUpdatedDoc)(replacement, doc, prevDoc);
1402
1406
  updatedDoc_1._id = docId;
1403
1407
  updatedDoc_1.__v = docVersion + 1;
1404
1408
  if (this.createLogs && !bypassLogs) {
@@ -1407,7 +1411,7 @@ var MongoManagerCollection = /** @class */ (function () {
1407
1411
  type: 'document',
1408
1412
  collection: this.collectionName,
1409
1413
  id_document: docId,
1410
- payload: common_1.getBinarySize(JSON.stringify(['invalidVersion - merge', doc, filter, updatedDoc_1, options])) < 200000 ? JSON.stringify(['invalidVersion - merge', doc, filter, updatedDoc_1, options], null, 2) : 'Too Big',
1414
+ payload: (0, common_1.getBinarySize)(JSON.stringify(['invalidVersion - merge', doc, filter, updatedDoc_1, options])) < 200000 ? JSON.stringify(['invalidVersion - merge', doc, filter, updatedDoc_1, options], null, 2) : 'Too Big',
1411
1415
  method: 'replaceOne',
1412
1416
  id_user: '',
1413
1417
  user: '',
@@ -1451,7 +1455,7 @@ var MongoManagerCollection = /** @class */ (function () {
1451
1455
  type: 'document',
1452
1456
  collection: this.collectionName,
1453
1457
  id_document: replacement._id,
1454
- payload: common_1.getBinarySize(JSON.stringify(['upsert', filter, replacement, options])) < 200000 ? JSON.stringify(['upsert', filter, replacement, options], null, 2) : 'Too Big',
1458
+ payload: (0, common_1.getBinarySize)(JSON.stringify(['upsert', filter, replacement, options])) < 200000 ? JSON.stringify(['upsert', filter, replacement, options], null, 2) : 'Too Big',
1455
1459
  method: 'replaceOne',
1456
1460
  id_user: '',
1457
1461
  user: '',
@@ -1507,7 +1511,7 @@ var MongoManagerCollection = /** @class */ (function () {
1507
1511
  type: 'document',
1508
1512
  collection: _this.collectionName,
1509
1513
  id_document: doc._id,
1510
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, replacement, options])) < 200000 ? JSON.stringify([doc, filter, replacement, options], null, 2) : 'Too Big',
1514
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, replacement, options])) < 200000 ? JSON.stringify([doc, filter, replacement, options], null, 2) : 'Too Big',
1511
1515
  method: 'replaceOne',
1512
1516
  id_user: '',
1513
1517
  user: '',
@@ -1521,7 +1525,7 @@ var MongoManagerCollection = /** @class */ (function () {
1521
1525
  type: 'document',
1522
1526
  collection: _this.collectionName,
1523
1527
  id_document: replacement._id,
1524
- payload: common_1.getBinarySize(JSON.stringify(['upsert', filter, replacement, options])) < 200000 ? JSON.stringify(['upsert', filter, replacement, options], null, 2) : 'Too Big',
1528
+ payload: (0, common_1.getBinarySize)(JSON.stringify(['upsert', filter, replacement, options])) < 200000 ? JSON.stringify(['upsert', filter, replacement, options], null, 2) : 'Too Big',
1525
1529
  method: 'replaceOne',
1526
1530
  id_user: '',
1527
1531
  user: '',
@@ -1585,7 +1589,7 @@ var MongoManagerCollection = /** @class */ (function () {
1585
1589
  return __generator(this, function (_a) {
1586
1590
  switch (_a.label) {
1587
1591
  case 0:
1588
- if ((!update.$inc || update.$inc === {}) && (!update.$set || update.$set === {}) && (!update.$setOnInsert || update.$setOnInsert === {}) && (!update.$unset || update.$unset === {})) {
1592
+ if ((!update.$inc || JSON.stringify(update.$inc) === '{}') && (!update.$set || JSON.stringify(update.$set) === '{}') && (!update.$setOnInsert || JSON.stringify(update.$setOnInsert) === '{}') && (!update.$unset || JSON.stringify(update.$unset) === '{}')) {
1589
1593
  resolve(1);
1590
1594
  return [2 /*return*/];
1591
1595
  }
@@ -1620,7 +1624,7 @@ var MongoManagerCollection = /** @class */ (function () {
1620
1624
  type: 'document',
1621
1625
  collection: this.collectionName,
1622
1626
  id_document: doc._id,
1623
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, update, options])) < 200000 ? JSON.stringify([doc, filter, update, options], null, 2) : 'Too Big',
1627
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, update, options])) < 200000 ? JSON.stringify([doc, filter, update, options], null, 2) : 'Too Big',
1624
1628
  method: 'updateMany',
1625
1629
  id_user: '',
1626
1630
  user: '',
@@ -1629,7 +1633,7 @@ var MongoManagerCollection = /** @class */ (function () {
1629
1633
  });
1630
1634
  }
1631
1635
  if (this.useVersions) {
1632
- versionDoc = common_1.deepCopy(doc);
1636
+ versionDoc = (0, common_1.deepCopy)(doc);
1633
1637
  versionDoc._id = { _id: doc._id, __v: doc.__v };
1634
1638
  index_1.ResolveIOServer.getMongoManager().collection(this.versionCollection).replaceOne({ _id: { _id: doc._id, __v: doc.__v } }, versionDoc, { upsert: true });
1635
1639
  if (doc.__v >= 4) {
@@ -1687,7 +1691,7 @@ var MongoManagerCollection = /** @class */ (function () {
1687
1691
  return [2 /*return*/];
1688
1692
  }
1689
1693
  }
1690
- if ((!update.$inc || update.$inc === {}) && (!update.$set || update.$set === {}) && (!update.$setOnInsert || update.$setOnInsert === {}) && (!update.$unset || update.$unset === {})) {
1694
+ if ((!update.$inc || JSON.stringify(update.$inc) === '{}') && (!update.$set || JSON.stringify(update.$set) === '{}') && (!update.$setOnInsert || JSON.stringify(update.$setOnInsert) === '{}') && (!update.$unset || JSON.stringify(update.$unset) === '{}')) {
1691
1695
  resolve(1);
1692
1696
  return [2 /*return*/];
1693
1697
  }
@@ -1711,7 +1715,7 @@ var MongoManagerCollection = /** @class */ (function () {
1711
1715
  type: 'document',
1712
1716
  collection: this.collectionName,
1713
1717
  id_document: doc._id,
1714
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, update, options])) < 200000 ? JSON.stringify([doc, filter, update, options], null, 2) : 'Too Big',
1718
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, update, options])) < 200000 ? JSON.stringify([doc, filter, update, options], null, 2) : 'Too Big',
1715
1719
  method: 'updateOne',
1716
1720
  id_user: '',
1717
1721
  user: '',
@@ -1719,7 +1723,7 @@ var MongoManagerCollection = /** @class */ (function () {
1719
1723
  route: ''
1720
1724
  });
1721
1725
  }
1722
- versionDoc = common_1.deepCopy(doc);
1726
+ versionDoc = (0, common_1.deepCopy)(doc);
1723
1727
  versionDoc._id = { _id: doc._id, __v: doc.__v };
1724
1728
  index_1.ResolveIOServer.getMongoManager().collection(this.versionCollection).replaceOne({ _id: { _id: doc._id, __v: doc.__v } }, versionDoc, { upsert: true });
1725
1729
  if (doc.__v >= 4) {
@@ -1779,7 +1783,7 @@ var MongoManagerCollection = /** @class */ (function () {
1779
1783
  type: 'document',
1780
1784
  collection: this.collectionName,
1781
1785
  id_document: update.$setOnInsert._id,
1782
- payload: common_1.getBinarySize(JSON.stringify(['upsert', filter, update, options])) < 200000 ? JSON.stringify(['upsert', filter, update, options], null, 2) : 'Too Big',
1786
+ payload: (0, common_1.getBinarySize)(JSON.stringify(['upsert', filter, update, options])) < 200000 ? JSON.stringify(['upsert', filter, update, options], null, 2) : 'Too Big',
1783
1787
  method: 'updateOne',
1784
1788
  id_user: '',
1785
1789
  user: '',
@@ -1848,7 +1852,7 @@ var MongoManagerCollection = /** @class */ (function () {
1848
1852
  type: 'document',
1849
1853
  collection: _this.collectionName,
1850
1854
  id_document: doc._id,
1851
- payload: common_1.getBinarySize(JSON.stringify([doc, filter, update, options])) < 200000 ? JSON.stringify([doc, filter, update, options], null, 2) : 'Too Big',
1855
+ payload: (0, common_1.getBinarySize)(JSON.stringify([doc, filter, update, options])) < 200000 ? JSON.stringify([doc, filter, update, options], null, 2) : 'Too Big',
1852
1856
  method: 'updateOne',
1853
1857
  id_user: '',
1854
1858
  user: '',
@@ -1863,7 +1867,7 @@ var MongoManagerCollection = /** @class */ (function () {
1863
1867
  type: 'document',
1864
1868
  collection: _this.collectionName,
1865
1869
  id_document: update.$setOnInsert._id,
1866
- payload: common_1.getBinarySize(JSON.stringify(['upsert', filter, update, options])) < 200000 ? JSON.stringify(['upsert', filter, update, options], null, 2) : 'Too Big',
1870
+ payload: (0, common_1.getBinarySize)(JSON.stringify(['upsert', filter, update, options])) < 200000 ? JSON.stringify(['upsert', filter, update, options], null, 2) : 'Too Big',
1867
1871
  method: 'updateOne',
1868
1872
  id_user: '',
1869
1873
  user: '',