c2-mongoose 2.1.323 → 2.1.325
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.
|
@@ -80,14 +80,11 @@ var SearcherV2Flow = /** @class */ (function () {
|
|
|
80
80
|
facet.paging = pipelineFacetPaging;
|
|
81
81
|
}
|
|
82
82
|
facet.items = pipelineFacetItems;
|
|
83
|
-
return [4 /*yield*/, model.aggregate([
|
|
84
|
-
{
|
|
85
|
-
$match: MatchFlowItem_1.default.exec(params.mainFilter, model)
|
|
86
|
-
},
|
|
83
|
+
return [4 /*yield*/, model.aggregate(__spreadArray(__spreadArray([], MatchFlowItem_1.default.exec(params.mainFilter, model), true), [
|
|
87
84
|
{
|
|
88
85
|
$facet: facet
|
|
89
86
|
}
|
|
90
|
-
])];
|
|
87
|
+
], false))];
|
|
91
88
|
case 1:
|
|
92
89
|
result = _a.sent();
|
|
93
90
|
ret = {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
declare class MatchFlowItem {
|
|
3
|
-
exec(filters: any, model: mongoose.Model<any>):
|
|
3
|
+
exec(filters: any, model: mongoose.Model<any>): {
|
|
4
|
+
$match: any;
|
|
5
|
+
}[];
|
|
4
6
|
}
|
|
5
7
|
declare const _default: MatchFlowItem;
|
|
6
8
|
export default _default;
|
|
@@ -125,7 +125,7 @@ var MatchFlowItem = /** @class */ (function () {
|
|
|
125
125
|
filtersFinal.$or = [];
|
|
126
126
|
filtersFinal.$or = __spreadArray(__spreadArray([], filtersFinal.$or, true), orPayload, true);
|
|
127
127
|
}
|
|
128
|
-
return filtersFinal;
|
|
128
|
+
return [{ $match: filtersFinal }];
|
|
129
129
|
};
|
|
130
130
|
return MatchFlowItem;
|
|
131
131
|
}());
|
package/package.json
CHANGED