langaro-api 1.2.4 → 1.2.5
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/lib/generators/crud.js +7 -0
- package/package.json +2 -2
package/lib/generators/crud.js
CHANGED
|
@@ -95,6 +95,11 @@ module.exports = function generateCrudDts(projectRoot, outputDir) {
|
|
|
95
95
|
lines.push(' count(options?: CRUDGetOptions, transaction?: any): Promise<number>;');
|
|
96
96
|
lines.push('');
|
|
97
97
|
|
|
98
|
+
addMethodMapping(lines, 'atomicIncrementWhere');
|
|
99
|
+
lines.push(' atomicIncrementWhere(');
|
|
100
|
+
lines.push(' prop: string, value: any, increments: Record<string, number>,');
|
|
101
|
+
lines.push(' options?: CRUDUpdateOptions, transaction?: any');
|
|
102
|
+
lines.push(' ): Promise<{ success: boolean; data: any }>;');
|
|
98
103
|
addMethodMapping(lines, 'updateWhere');
|
|
99
104
|
lines.push(' updateWhere(');
|
|
100
105
|
lines.push(' prop: string, value: any, data?: Record<string, any>,');
|
|
@@ -171,6 +176,8 @@ module.exports = function generateCrudDts(projectRoot, outputDir) {
|
|
|
171
176
|
' sortBy?: string;',
|
|
172
177
|
" sort?: 'asc' | 'desc';",
|
|
173
178
|
' where?: (query: any) => any;',
|
|
179
|
+
' /** Lock the selected rows for update within a transaction (default: false) */',
|
|
180
|
+
' lockRow?: boolean;',
|
|
174
181
|
' /** Attempt to read from Redis cache (default: false) */',
|
|
175
182
|
' cache?: boolean;',
|
|
176
183
|
' /** Write result to Redis cache with this TTL in hours */',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langaro-api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Auto-generate TypeScript types, JSDoc annotations, and boilerplate loaders for knex-extended-crud projects",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"cron": ">=3.0.0",
|
|
25
|
-
"knex-extended-crud": ">=2.1.
|
|
25
|
+
"knex-extended-crud": ">=2.1.3"
|
|
26
26
|
},
|
|
27
27
|
"peerDependenciesMeta": {
|
|
28
28
|
"cron": {
|