c2-mongoose 2.1.59 → 2.1.60

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.
@@ -13,12 +13,12 @@ declare abstract class SearchFlow {
13
13
  pageable: boolean;
14
14
  projection: {
15
15
  [key: string]: number;
16
- };
16
+ } | undefined;
17
17
  constructor(params: any);
18
18
  buildPopulate(): any;
19
19
  buildProjections(): {
20
20
  [key: string]: number;
21
- };
21
+ } | undefined;
22
22
  buildPath(target: string, nested?: string): any;
23
23
  buildOrdenation(): any;
24
24
  buildRegex(searchText: string): RegExp;
@@ -121,7 +121,7 @@ var SearchFlow = /** @class */ (function () {
121
121
  };
122
122
  SearchFlow.prototype.buildProjections = function () {
123
123
  if (!Array.isArray(this.select)) {
124
- return {};
124
+ return undefined;
125
125
  }
126
126
  var projection = {};
127
127
  for (var _i = 0, _a = this.select; _i < _a.length; _i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.59",
3
+ "version": "2.1.60",
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",
@@ -15,7 +15,7 @@ abstract class SearchFlow {
15
15
  filters: any
16
16
  sort: any
17
17
  pageable: boolean
18
- projection: { [key: string]: number }
18
+ projection: { [key: string]: number } | undefined
19
19
 
20
20
  constructor(params: any) {
21
21
  this.searchText = params.searchText || ""
@@ -49,7 +49,7 @@ abstract class SearchFlow {
49
49
 
50
50
  buildProjections() {
51
51
  if (!Array.isArray(this.select)) {
52
- return {}
52
+ return undefined
53
53
  }
54
54
 
55
55
  let projection: { [key: string]: number } = {}