@resolveio/server-lib 20.11.9 → 20.11.11
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.
|
@@ -480,7 +480,7 @@ var MongoManager = /** @class */ (function () {
|
|
|
480
480
|
_b.label = 1;
|
|
481
481
|
case 1:
|
|
482
482
|
_b.trys.push([1, 3, 4, 6]);
|
|
483
|
-
return [4 /*yield*/, collection.findOne(filter, options)];
|
|
483
|
+
return [4 /*yield*/, collection.findOne(filter, options || undefined)];
|
|
484
484
|
case 2:
|
|
485
485
|
result = _b.sent();
|
|
486
486
|
return [3 /*break*/, 6];
|
|
@@ -639,7 +639,7 @@ var MongoManager = /** @class */ (function () {
|
|
|
639
639
|
_b.label = 1;
|
|
640
640
|
case 1:
|
|
641
641
|
_b.trys.push([1, 3, 4, 6]);
|
|
642
|
-
return [4 /*yield*/, collection.countDocuments(filter, options)];
|
|
642
|
+
return [4 /*yield*/, collection.countDocuments(filter, options || undefined)];
|
|
643
643
|
case 2:
|
|
644
644
|
result = _b.sent();
|
|
645
645
|
return [3 /*break*/, 6];
|
|
@@ -1076,7 +1076,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
if (!(!skipCache && !this.skipCache)) return [3 /*break*/, 1];
|
|
1079
|
-
return [2 /*return*/, resolveio_server_app_1.ResolveIOServer.getMongoManager().aggregate(this.collectionName, pipeline, options)];
|
|
1079
|
+
return [2 /*return*/, resolveio_server_app_1.ResolveIOServer.getMongoManager().aggregate(this.collectionName, pipeline, options || undefined)];
|
|
1080
1080
|
case 1:
|
|
1081
1081
|
_a = options || {}, session = _a.session, safeOptions = __rest(_a, ["session"]);
|
|
1082
1082
|
monitor = monitor_manager_1.MonitorMongo.create('aggregate', this.collectionName, JSON.stringify([pipeline, safeOptions]));
|
|
@@ -1171,7 +1171,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1171
1171
|
// eslint-disable-next-line no-unused-vars
|
|
1172
1172
|
var _a = options || {}, session = _a.session, safeOptions = __rest(_a, ["session"]);
|
|
1173
1173
|
var monitor = monitor_manager_1.MonitorMongo.create('aggregateCursor', this.collectionName, JSON.stringify([pipeline, safeOptions]));
|
|
1174
|
-
var cursor = resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).aggregate(pipeline, options);
|
|
1174
|
+
var cursor = resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).aggregate(pipeline, options || undefined);
|
|
1175
1175
|
cursor.on('close', function (ev) { return __awaiter(_this, void 0, void 0, function () {
|
|
1176
1176
|
return __generator(this, function (_a) {
|
|
1177
1177
|
switch (_a.label) {
|
|
@@ -1460,7 +1460,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1460
1460
|
_f.label = 11;
|
|
1461
1461
|
case 11:
|
|
1462
1462
|
_f.trys.push([11, 13, 14, 16]);
|
|
1463
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName).bulkWrite(batchOps, options)];
|
|
1463
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName).bulkWrite(batchOps, options || undefined)];
|
|
1464
1464
|
case 12:
|
|
1465
1465
|
_f.sent();
|
|
1466
1466
|
return [3 /*break*/, 16];
|
|
@@ -1634,7 +1634,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1634
1634
|
if (indexExists) {
|
|
1635
1635
|
return [2 /*return*/, 'Index already exists']; // Skip creation if index exists
|
|
1636
1636
|
}
|
|
1637
|
-
return [2 /*return*/, dbCollection.createIndex(fieldOrSpec, options)];
|
|
1637
|
+
return [2 /*return*/, dbCollection.createIndex(fieldOrSpec, options || undefined)];
|
|
1638
1638
|
case 2:
|
|
1639
1639
|
_a = _b.sent();
|
|
1640
1640
|
return [3 /*break*/, 3];
|
|
@@ -1663,7 +1663,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1663
1663
|
if (indexesToCreate.length === 0) {
|
|
1664
1664
|
return [2 /*return*/, ['All indexes already exist']];
|
|
1665
1665
|
}
|
|
1666
|
-
return [2 /*return*/, dbCollection.createIndexes(indexSpecs, options)];
|
|
1666
|
+
return [2 /*return*/, dbCollection.createIndexes(indexSpecs, options || undefined)];
|
|
1667
1667
|
case 2:
|
|
1668
1668
|
_a = _b.sent();
|
|
1669
1669
|
return [3 /*break*/, 3];
|
|
@@ -1761,7 +1761,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1761
1761
|
_c.label = 12;
|
|
1762
1762
|
case 12:
|
|
1763
1763
|
_c.trys.push([12, 14, 15, 17]);
|
|
1764
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).deleteMany(filter, options)];
|
|
1764
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).deleteMany(filter, options || undefined)];
|
|
1765
1765
|
case 13:
|
|
1766
1766
|
res = _c.sent();
|
|
1767
1767
|
if (!this.skipCache) {
|
|
@@ -1811,10 +1811,10 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1811
1811
|
_c.label = 1;
|
|
1812
1812
|
case 1:
|
|
1813
1813
|
_c.trys.push([1, 13, 14, 16]);
|
|
1814
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).deleteOne(filter, options)];
|
|
1814
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).deleteOne(filter, options || undefined)];
|
|
1815
1815
|
case 2:
|
|
1816
1816
|
res = _c.sent();
|
|
1817
|
-
return [4 /*yield*/, this.findOne(filter, options)];
|
|
1817
|
+
return [4 /*yield*/, this.findOne(filter, options || undefined)];
|
|
1818
1818
|
case 3:
|
|
1819
1819
|
doc = _c.sent();
|
|
1820
1820
|
if (!doc) return [3 /*break*/, 12];
|
|
@@ -1897,7 +1897,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1897
1897
|
_c.label = 18;
|
|
1898
1898
|
case 18:
|
|
1899
1899
|
_c.trys.push([18, 20, 21, 23]);
|
|
1900
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).deleteOne(filter, options)];
|
|
1900
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).deleteOne(filter, options || undefined)];
|
|
1901
1901
|
case 19:
|
|
1902
1902
|
res = _c.sent();
|
|
1903
1903
|
if (!this.skipCache) {
|
|
@@ -1946,7 +1946,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
1946
1946
|
_b.label = 1;
|
|
1947
1947
|
case 1:
|
|
1948
1948
|
_b.trys.push([1, 3, 4, 6]);
|
|
1949
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).distinct(key, filter, options)];
|
|
1949
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).distinct(key, filter, options || undefined)];
|
|
1950
1950
|
case 2:
|
|
1951
1951
|
res = _b.sent();
|
|
1952
1952
|
return [2 /*return*/, res];
|
|
@@ -2038,7 +2038,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2038
2038
|
_b.label = 1;
|
|
2039
2039
|
case 1:
|
|
2040
2040
|
_b.trys.push([1, 3, 4, 6]);
|
|
2041
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).dropIndex(indexName, options)];
|
|
2041
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).dropIndex(indexName, options || undefined)];
|
|
2042
2042
|
case 2:
|
|
2043
2043
|
res = _b.sent();
|
|
2044
2044
|
return [2 /*return*/, res];
|
|
@@ -2129,7 +2129,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
_a = options || {}, session = _a.session, safeOptions = __rest(_a, ["session"]);
|
|
2131
2131
|
if (!(!skipCache && !this.skipCache)) return [3 /*break*/, 1];
|
|
2132
|
-
return [2 /*return*/, resolveio_server_app_1.ResolveIOServer.getMongoManager().find(this.collectionName, filter, options)];
|
|
2132
|
+
return [2 /*return*/, resolveio_server_app_1.ResolveIOServer.getMongoManager().find(this.collectionName, filter, options || undefined)];
|
|
2133
2133
|
case 1:
|
|
2134
2134
|
monitor = monitor_manager_1.MonitorMongo.create('find', this.collectionName, JSON.stringify([filter, safeOptions]));
|
|
2135
2135
|
_b.label = 2;
|
|
@@ -2180,13 +2180,13 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
_a = options || {}, session = _a.session, safeOptions = __rest(_a, ["session"]);
|
|
2182
2182
|
if (!(!skipCache && !this.skipCache)) return [3 /*break*/, 1];
|
|
2183
|
-
return [2 /*return*/, resolveio_server_app_1.ResolveIOServer.getMongoManager().findOne(this.collectionName, { _id: id }, options)];
|
|
2183
|
+
return [2 /*return*/, resolveio_server_app_1.ResolveIOServer.getMongoManager().findOne(this.collectionName, { _id: id }, options || undefined)];
|
|
2184
2184
|
case 1:
|
|
2185
2185
|
monitor = monitor_manager_1.MonitorMongo.create('findById', this.collectionName, JSON.stringify([{ _id: id }, safeOptions]));
|
|
2186
2186
|
_b.label = 2;
|
|
2187
2187
|
case 2:
|
|
2188
2188
|
_b.trys.push([2, 4, 5, 7]);
|
|
2189
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).findOne({ _id: id }, options)];
|
|
2189
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).findOne({ _id: id }, options || undefined)];
|
|
2190
2190
|
case 3:
|
|
2191
2191
|
res = _b.sent();
|
|
2192
2192
|
(0, subscription_dependency_context_1.recordDependencyResult)(this.collectionName, res, { filter: { _id: id }, meta: buildQueryMetaFromFindOptions(safeOptions) });
|
|
@@ -2274,7 +2274,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2274
2274
|
// eslint-disable-next-line no-unused-vars
|
|
2275
2275
|
var _a = options || {}, session = _a.session, safeOptions = __rest(_a, ["session"]);
|
|
2276
2276
|
var monitor = monitor_manager_1.MonitorMongo.create('findCursor', this.collectionName, JSON.stringify([filter, safeOptions]));
|
|
2277
|
-
var cursor = resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).find(filter, options);
|
|
2277
|
+
var cursor = resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).find(filter, options || undefined);
|
|
2278
2278
|
cursor.on('close', function (ev) { return __awaiter(_this, void 0, void 0, function () {
|
|
2279
2279
|
return __generator(this, function (_a) {
|
|
2280
2280
|
switch (_a.label) {
|
|
@@ -2337,14 +2337,14 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
2339
|
if (!(!skipCache && !this.skipCache)) return [3 /*break*/, 1];
|
|
2340
|
-
return [2 /*return*/, resolveio_server_app_1.ResolveIOServer.getMongoManager().findOne(this.collectionName, filter, options)];
|
|
2340
|
+
return [2 /*return*/, resolveio_server_app_1.ResolveIOServer.getMongoManager().findOne(this.collectionName, filter, options || undefined)];
|
|
2341
2341
|
case 1:
|
|
2342
2342
|
_a = options || {}, session = _a.session, safeOptions = __rest(_a, ["session"]);
|
|
2343
2343
|
monitor = monitor_manager_1.MonitorMongo.create('findOne', this.collectionName, JSON.stringify([filter, safeOptions]));
|
|
2344
2344
|
_b.label = 2;
|
|
2345
2345
|
case 2:
|
|
2346
2346
|
_b.trys.push([2, 4, 5, 7]);
|
|
2347
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).findOne(filter, options)];
|
|
2347
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).findOne(filter, options || undefined)];
|
|
2348
2348
|
case 3:
|
|
2349
2349
|
res = _b.sent();
|
|
2350
2350
|
(0, subscription_dependency_context_1.recordDependencyResult)(this.collectionName, res, { filter: filter });
|
|
@@ -2370,7 +2370,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2370
2370
|
};
|
|
2371
2371
|
MongoManagerCollection.prototype.findOneAndDelete = function () {
|
|
2372
2372
|
return __awaiter(this, arguments, void 0, function (filter, options, bypassLogs, bypassSession) {
|
|
2373
|
-
var mongoSession, _a, session, safeOptions, monitor,
|
|
2373
|
+
var mongoSession, _a, session, safeOptions, monitor, doc, versionDoc, _b, err_22;
|
|
2374
2374
|
if (filter === void 0) { filter = {}; }
|
|
2375
2375
|
if (bypassLogs === void 0) { bypassLogs = false; }
|
|
2376
2376
|
if (bypassSession === void 0) { bypassSession = false; }
|
|
@@ -2393,8 +2393,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2393
2393
|
_c.trys.push([1, 12, 13, 15]);
|
|
2394
2394
|
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).findOneAndDelete(filter, options)];
|
|
2395
2395
|
case 2:
|
|
2396
|
-
|
|
2397
|
-
doc = res.value;
|
|
2396
|
+
doc = _c.sent();
|
|
2398
2397
|
if (!doc) return [3 /*break*/, 10];
|
|
2399
2398
|
if (!(this.createLogs && !bypassLogs)) return [3 /*break*/, 5];
|
|
2400
2399
|
if (!(resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'] !== 'https://resolveio.com'
|
|
@@ -2474,7 +2473,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2474
2473
|
};
|
|
2475
2474
|
MongoManagerCollection.prototype.findOneAndReplace = function () {
|
|
2476
2475
|
return __awaiter(this, arguments, void 0, function (filter, replacement, options, bypassLogs, bypassCheckSchema, bypassSession) {
|
|
2477
|
-
var validation, isValid, date, mongoSession, _a, session, safeOptions, monitor,
|
|
2476
|
+
var validation, isValid, date, mongoSession, _a, session, safeOptions, monitor, doc, versionDoc, _b, err_23;
|
|
2478
2477
|
if (filter === void 0) { filter = {}; }
|
|
2479
2478
|
if (bypassLogs === void 0) { bypassLogs = false; }
|
|
2480
2479
|
if (bypassCheckSchema === void 0) { bypassCheckSchema = false; }
|
|
@@ -2523,8 +2522,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2523
2522
|
_c.trys.push([3, 14, 15, 17]);
|
|
2524
2523
|
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).findOneAndReplace(filter, replacement, options)];
|
|
2525
2524
|
case 4:
|
|
2526
|
-
|
|
2527
|
-
doc = res.value;
|
|
2525
|
+
doc = _c.sent();
|
|
2528
2526
|
if (!doc) return [3 /*break*/, 12];
|
|
2529
2527
|
if (!(this.createLogs && !bypassLogs)) return [3 /*break*/, 7];
|
|
2530
2528
|
if (!(resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'] !== 'https://resolveio.com'
|
|
@@ -2604,7 +2602,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2604
2602
|
};
|
|
2605
2603
|
MongoManagerCollection.prototype.findOneAndUpdate = function () {
|
|
2606
2604
|
return __awaiter(this, arguments, void 0, function (filter, update, options, bypassLogs, bypassCheckSchema, bypassSession) {
|
|
2607
|
-
var validation, isValid, date, mongoSession, _a, session, safeOptions, monitor,
|
|
2605
|
+
var validation, isValid, date, mongoSession, _a, session, safeOptions, monitor, doc, versionDoc, _b, err_24;
|
|
2608
2606
|
if (filter === void 0) { filter = {}; }
|
|
2609
2607
|
if (bypassLogs === void 0) { bypassLogs = false; }
|
|
2610
2608
|
if (bypassCheckSchema === void 0) { bypassCheckSchema = false; }
|
|
@@ -2670,8 +2668,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2670
2668
|
_c.trys.push([3, 14, 15, 17]);
|
|
2671
2669
|
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).findOneAndUpdate(filter, update, options)];
|
|
2672
2670
|
case 4:
|
|
2673
|
-
|
|
2674
|
-
doc = res.value;
|
|
2671
|
+
doc = _c.sent();
|
|
2675
2672
|
if (!doc) return [3 /*break*/, 12];
|
|
2676
2673
|
if (!(this.createLogs && !bypassLogs)) return [3 /*break*/, 7];
|
|
2677
2674
|
if (!(resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'] !== 'https://resolveio.com'
|
|
@@ -2794,7 +2791,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2794
2791
|
_b.label = 1;
|
|
2795
2792
|
case 1:
|
|
2796
2793
|
_b.trys.push([1, 3, 4, 6]);
|
|
2797
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).indexExists(indexes, options)];
|
|
2794
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).indexExists(indexes, options || undefined)];
|
|
2798
2795
|
case 2:
|
|
2799
2796
|
res = _b.sent();
|
|
2800
2797
|
return [2 /*return*/, res];
|
|
@@ -2947,7 +2944,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
2947
2944
|
_c.label = 15;
|
|
2948
2945
|
case 15:
|
|
2949
2946
|
_c.trys.push([15, 17, 18, 19]);
|
|
2950
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).insertMany(validDocs, options)];
|
|
2947
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).insertMany(validDocs, options || undefined)];
|
|
2951
2948
|
case 16:
|
|
2952
2949
|
_c.sent();
|
|
2953
2950
|
if (!this.skipCache) {
|
|
@@ -3059,7 +3056,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
3059
3056
|
_b.label = 6;
|
|
3060
3057
|
case 6:
|
|
3061
3058
|
_b.trys.push([6, 8, 9, 11]);
|
|
3062
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).insertOne(doc, options)];
|
|
3059
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).insertOne(doc, options || undefined)];
|
|
3063
3060
|
case 7:
|
|
3064
3061
|
_b.sent();
|
|
3065
3062
|
if (!this.skipCache) {
|
|
@@ -3136,7 +3133,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
3136
3133
|
_b.label = 1;
|
|
3137
3134
|
case 1:
|
|
3138
3135
|
_b.trys.push([1, 3, 4, 6]);
|
|
3139
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).rename(newName, options)];
|
|
3136
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).rename(newName, options || undefined)];
|
|
3140
3137
|
case 2:
|
|
3141
3138
|
res = _b.sent();
|
|
3142
3139
|
return [2 /*return*/, res];
|
|
@@ -3477,7 +3474,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
3477
3474
|
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).replaceOne(filter, replacement, options)];
|
|
3478
3475
|
case 47:
|
|
3479
3476
|
res = _d.sent();
|
|
3480
|
-
return [4 /*yield*/, this.findOne(filter, options)];
|
|
3477
|
+
return [4 /*yield*/, this.findOne(filter, options || undefined)];
|
|
3481
3478
|
case 48:
|
|
3482
3479
|
doc_1 = _d.sent();
|
|
3483
3480
|
if (!doc_1) return [3 /*break*/, 52];
|
|
@@ -3917,7 +3914,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
3917
3914
|
_c.label = 12;
|
|
3918
3915
|
case 12:
|
|
3919
3916
|
_c.trys.push([12, 14, 15, 17]);
|
|
3920
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).updateOne(filter, update, options)];
|
|
3917
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).updateOne(filter, update, options || undefined)];
|
|
3921
3918
|
case 13:
|
|
3922
3919
|
res = _c.sent();
|
|
3923
3920
|
if (!this.skipCache) {
|
|
@@ -4005,7 +4002,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
4005
4002
|
_c.label = 22;
|
|
4006
4003
|
case 22:
|
|
4007
4004
|
_c.trys.push([22, 24, 25, 27]);
|
|
4008
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).updateOne(filter, update, options)];
|
|
4005
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).updateOne(filter, update, options || undefined)];
|
|
4009
4006
|
case 23:
|
|
4010
4007
|
res = _c.sent();
|
|
4011
4008
|
if (!this.skipCache) {
|
|
@@ -4070,10 +4067,10 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
4070
4067
|
_c.label = 31;
|
|
4071
4068
|
case 31:
|
|
4072
4069
|
_c.trys.push([31, 42, 43, 45]);
|
|
4073
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).updateOne(filter, update, options)];
|
|
4070
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).updateOne(filter, update, options || undefined)];
|
|
4074
4071
|
case 32:
|
|
4075
4072
|
res = _c.sent();
|
|
4076
|
-
return [4 /*yield*/, this.findOne(filter, options)];
|
|
4073
|
+
return [4 /*yield*/, this.findOne(filter, options || undefined)];
|
|
4077
4074
|
case 33:
|
|
4078
4075
|
doc = _c.sent();
|
|
4079
4076
|
if (!doc) return [3 /*break*/, 37];
|
|
@@ -4176,7 +4173,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
4176
4173
|
_c.label = 47;
|
|
4177
4174
|
case 47:
|
|
4178
4175
|
_c.trys.push([47, 49, 50, 52]);
|
|
4179
|
-
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).updateOne(filter, update, options)];
|
|
4176
|
+
return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).updateOne(filter, update, options || undefined)];
|
|
4180
4177
|
case 48:
|
|
4181
4178
|
res = _c.sent();
|
|
4182
4179
|
if (!this.skipCache) {
|
|
@@ -4214,7 +4211,7 @@ var MongoManagerCollection = /** @class */ (function () {
|
|
|
4214
4211
|
options.session = session;
|
|
4215
4212
|
}
|
|
4216
4213
|
}
|
|
4217
|
-
var stream = resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).watch(pipeline, options);
|
|
4214
|
+
var stream = resolveio_server_app_1.ResolveIOServer.getMainDB().collection(this.collectionName, this.collectionOptions).watch(pipeline, options || undefined);
|
|
4218
4215
|
return stream;
|
|
4219
4216
|
};
|
|
4220
4217
|
return MongoManagerCollection;
|