c2-mongoose 2.1.41 → 2.1.42

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.
@@ -46,15 +46,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
47
  }
48
48
  };
49
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
50
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
51
- if (ar || !(i in from)) {
52
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
53
- ar[i] = from[i];
54
- }
55
- }
56
- return to.concat(ar || Array.prototype.slice.call(from));
57
- };
58
49
  var __importDefault = (this && this.__importDefault) || function (mod) {
59
50
  return (mod && mod.__esModule) ? mod : { "default": mod };
60
51
  };
@@ -157,12 +148,13 @@ var SearchFlow = /** @class */ (function () {
157
148
  case 0: return [4 /*yield*/, model.aggregate([
158
149
  {
159
150
  $facet: {
160
- items: __spreadArray([
151
+ items: [
161
152
  { $match: this.filters },
162
153
  { $sort: this.sort },
163
154
  { $skip: (this.page - 1) * this.limit },
164
- { $limit: this.limit }
165
- ], pipeline, true),
155
+ { $limit: this.limit },
156
+ pipeline
157
+ ],
166
158
  paging: [
167
159
  { $match: this.filters },
168
160
  { $count: "total" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.41",
3
+ "version": "2.1.42",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -84,7 +84,7 @@ abstract class SearchFlow {
84
84
  { $sort: this.sort },
85
85
  { $skip: (this.page - 1) * this.limit },
86
86
  { $limit: this.limit },
87
- ...pipeline
87
+ pipeline
88
88
  ],
89
89
  paging: [
90
90
  { $match: this.filters },