test-entity-library-asm 2.3.3 → 2.3.4

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.
@@ -91,8 +91,8 @@ var CustomRepository = /** @class */ (function (_super) {
91
91
  results = _b.sent();
92
92
  nextCursor = results.length > limit ? (_a = results.pop()) === null || _a === void 0 ? void 0 : _a.created : null;
93
93
  return [2 /*return*/, {
94
- data: results,
95
- nextCursor: nextCursor
94
+ data: results.slice(0, limit), // Return only the requested number of results
95
+ nextCursor: nextCursor && nextCursor instanceof Date
96
96
  ? Buffer.from(nextCursor.toISOString()).toString('base64')
97
97
  : null,
98
98
  }];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -42,10 +42,11 @@ export class CustomRepository<T extends ObjectLiteral> extends Repository<T> {
42
42
  const nextCursor = results.length > limit ? results.pop()?.created : null
43
43
 
44
44
  return {
45
- data: results,
46
- nextCursor: nextCursor
47
- ? Buffer.from(nextCursor.toISOString()).toString('base64')
48
- : null,
45
+ data: results.slice(0, limit), // Return only the requested number of results
46
+ nextCursor:
47
+ nextCursor && nextCursor instanceof Date
48
+ ? Buffer.from(nextCursor.toISOString()).toString('base64')
49
+ : null,
49
50
  }
50
51
  }
51
52