drapcode-utility 2.3.9 → 2.4.0
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.
- package/build/utils/util.js +3 -1
- package/package.json +3 -3
package/build/utils/util.js
CHANGED
|
@@ -1273,8 +1273,10 @@ exports.buildOrderByClause = buildOrderByClause;
|
|
|
1273
1273
|
*/
|
|
1274
1274
|
const buildLimitOffsetClause = (sqlPagination, values) => {
|
|
1275
1275
|
if (sqlPagination?.limit && sqlPagination?.offset !== undefined) {
|
|
1276
|
+
const limit = Math.max(Number(sqlPagination.limit) || 10, 1);
|
|
1277
|
+
const offset = Math.max(Number(sqlPagination.offset) || 0, 0);
|
|
1276
1278
|
values.push(parseInt(sqlPagination.limit), parseInt(sqlPagination.offset));
|
|
1277
|
-
return
|
|
1279
|
+
return ` LIMIT ${limit} OFFSET ${offset}`;
|
|
1278
1280
|
}
|
|
1279
1281
|
return "";
|
|
1280
1282
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drapcode-utility",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "DrapCode Utility",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"axios": "^1.1.2",
|
|
43
43
|
"date-fns": "^4.1.0",
|
|
44
44
|
"dompurify": "^3.1.7",
|
|
45
|
-
"drapcode-constant": "^1.9.
|
|
45
|
+
"drapcode-constant": "^1.9.8",
|
|
46
46
|
"drapcode-logger": "^1.3.5",
|
|
47
|
-
"drapcode-redis": "^1.4.
|
|
47
|
+
"drapcode-redis": "^1.4.4",
|
|
48
48
|
"exiftool-vendored": "^28.2.1",
|
|
49
49
|
"express": "^4.17.1",
|
|
50
50
|
"gm": "^1.25.0",
|