murlock 4.3.2 → 4.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/README.md
CHANGED
|
@@ -181,21 +181,68 @@ async process(userData: { id: string }, options: string[] = []): Promise<any> {
|
|
|
181
181
|
|
|
182
182
|
### Solution: Using SetParamNames
|
|
183
183
|
|
|
184
|
-
Use the `SetParamNames` decorator to explicitly specify parameter names. **Important**: `SetParamNames` must be placed **below** `@MurLock` in the code (it will execute before `@MurLock` due to TypeScript's bottom-up decorator execution order)
|
|
184
|
+
Use the `SetParamNames` decorator to explicitly specify parameter names. **Important**: `SetParamNames` must be placed **below** `@MurLock` in the code (it will execute before `@MurLock` due to TypeScript's bottom-up decorator execution order).
|
|
185
|
+
|
|
186
|
+
#### Option 1: Object Format (Recommended)
|
|
187
|
+
|
|
188
|
+
The object format allows you to specify only the parameters you need, with explicit index mapping. This provides O(1) lookup performance and doesn't require specifying all parameters:
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
import { MurLock, SetParamNames } from 'murlock';
|
|
192
|
+
|
|
193
|
+
class MyService {
|
|
194
|
+
@MurLock(5000, 'userData.id')
|
|
195
|
+
@SetParamNames({ userData: 0 }) // Only specify needed params with their indices
|
|
196
|
+
@Transactional()
|
|
197
|
+
async process(
|
|
198
|
+
userData: { id: string },
|
|
199
|
+
options: string[],
|
|
200
|
+
context: any
|
|
201
|
+
): Promise<any> {
|
|
202
|
+
// This will work correctly - only userData is needed for the lock key
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Benefits of Object Format:**
|
|
208
|
+
|
|
209
|
+
- **Partial specification**: Only specify the parameters you actually use in the lock key
|
|
210
|
+
- **Order independent**: Parameter indices are explicit, so declaration order doesn't matter
|
|
211
|
+
- **O(1) lookup**: Direct property access instead of array indexOf search
|
|
212
|
+
- **Self-documenting**: The index mapping clearly shows which argument position each name refers to
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
// Example: Only need the third parameter for the lock key
|
|
216
|
+
@MurLock(5000, 'context.tenantId')
|
|
217
|
+
@SetParamNames({ context: 2 }) // context is at index 2
|
|
218
|
+
@Transactional()
|
|
219
|
+
async process(userData: any, options: any, context: { tenantId: string }): Promise<any> {
|
|
220
|
+
// ...
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
#### Option 2: Array Format (Legacy)
|
|
225
|
+
|
|
226
|
+
The array format requires specifying ALL parameters in order:
|
|
185
227
|
|
|
186
228
|
```typescript
|
|
187
229
|
import { MurLock, SetParamNames } from 'murlock';
|
|
188
230
|
|
|
189
231
|
class MyService {
|
|
190
232
|
@MurLock(5000, 'userData.id')
|
|
191
|
-
@SetParamNames('userData', 'options') // Must
|
|
233
|
+
@SetParamNames('userData', 'options') // Must specify ALL params in order
|
|
192
234
|
@Transactional()
|
|
193
|
-
async process(
|
|
235
|
+
async process(
|
|
236
|
+
userData: { id: string },
|
|
237
|
+
options: string[] = []
|
|
238
|
+
): Promise<any> {
|
|
194
239
|
// This will work correctly
|
|
195
240
|
}
|
|
196
241
|
}
|
|
197
242
|
```
|
|
198
243
|
|
|
244
|
+
> **Note**: The array format uses `indexOf` to find parameters, so all parameters must be specified in the correct order. If you only need one parameter, the object format is recommended.
|
|
245
|
+
|
|
199
246
|
**Decorator Execution Order** (bottom-up):
|
|
200
247
|
|
|
201
248
|
1. `@Transactional()` executes first and wraps the method
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
export declare const PARAM_NAMES_KEY: unique symbol;
|
|
3
|
-
export declare
|
|
3
|
+
export declare const PARAM_INDEX_MAP_KEY: unique symbol;
|
|
4
|
+
export type ParamIndexMap = Record<string, number>;
|
|
5
|
+
export declare function SetParamNames(mappingOrFirstParam: ParamIndexMap | string, ...restParamNames: string[]): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
4
6
|
export declare function MurLock(releaseTime: number, wait: number | ((retries: number) => number), ...keyParams: string[]): any;
|
|
5
7
|
export declare function MurLock(releaseTime: number, ...keyParams: string[]): any;
|
|
@@ -9,15 +9,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MurLock = exports.SetParamNames = exports.PARAM_NAMES_KEY = void 0;
|
|
12
|
+
exports.MurLock = exports.SetParamNames = exports.PARAM_INDEX_MAP_KEY = exports.PARAM_NAMES_KEY = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
require("reflect-metadata");
|
|
15
15
|
const exceptions_1 = require("../exceptions");
|
|
16
16
|
const murlock_service_1 = require("../murlock.service");
|
|
17
17
|
exports.PARAM_NAMES_KEY = Symbol('murlock:param-names');
|
|
18
|
-
|
|
18
|
+
exports.PARAM_INDEX_MAP_KEY = Symbol('murlock:param-index-map');
|
|
19
|
+
function SetParamNames(mappingOrFirstParam, ...restParamNames) {
|
|
19
20
|
return function (target, propertyKey, descriptor) {
|
|
20
|
-
|
|
21
|
+
if (typeof mappingOrFirstParam === 'object') {
|
|
22
|
+
Reflect.defineMetadata(exports.PARAM_INDEX_MAP_KEY, mappingOrFirstParam, target, propertyKey);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
const paramNames = [mappingOrFirstParam, ...restParamNames];
|
|
26
|
+
Reflect.defineMetadata(exports.PARAM_NAMES_KEY, paramNames, target, propertyKey);
|
|
27
|
+
}
|
|
21
28
|
return descriptor;
|
|
22
29
|
};
|
|
23
30
|
}
|
|
@@ -97,6 +104,7 @@ function MurLock(releaseTime, waitOrKeyParam, ...keyParams) {
|
|
|
97
104
|
injectMurlockService(target, 'murlockServiceDecorator');
|
|
98
105
|
const originalMethod = descriptor.value;
|
|
99
106
|
const methodParameterNames = getParameterNamesWithFallback(originalMethod, target, propertyKey);
|
|
107
|
+
const paramIndexMap = Reflect.getMetadata(exports.PARAM_INDEX_MAP_KEY, target, propertyKey);
|
|
100
108
|
if (methodParameterNames.length > 0 &&
|
|
101
109
|
!methodParameterNames.includes('...args')) {
|
|
102
110
|
const existingMetadata = Reflect.getMetadata(exports.PARAM_NAMES_KEY, target, propertyKey);
|
|
@@ -104,17 +112,24 @@ function MurLock(releaseTime, waitOrKeyParam, ...keyParams) {
|
|
|
104
112
|
Reflect.defineMetadata(exports.PARAM_NAMES_KEY, methodParameterNames, target, propertyKey);
|
|
105
113
|
}
|
|
106
114
|
}
|
|
115
|
+
function resolveParameterIndex(source) {
|
|
116
|
+
if (isNumber(source)) {
|
|
117
|
+
return Number(source);
|
|
118
|
+
}
|
|
119
|
+
if (paramIndexMap && source in paramIndexMap) {
|
|
120
|
+
return paramIndexMap[source];
|
|
121
|
+
}
|
|
122
|
+
return methodParameterNames.indexOf(source);
|
|
123
|
+
}
|
|
107
124
|
function constructLockKey(args, lockKeyPrefix = 'default') {
|
|
108
|
-
|
|
125
|
+
const lockKeyElements = [];
|
|
109
126
|
if (lockKeyPrefix != 'custom') {
|
|
110
127
|
lockKeyElements.push(target.constructor.name);
|
|
111
128
|
lockKeyElements.push(propertyKey);
|
|
112
129
|
}
|
|
113
130
|
lockKeyElements.push(...keyParams.map((keyParam) => {
|
|
114
131
|
const [source, path] = keyParam.split('.');
|
|
115
|
-
const parameterIndex =
|
|
116
|
-
? Number(source)
|
|
117
|
-
: methodParameterNames.indexOf(source);
|
|
132
|
+
const parameterIndex = resolveParameterIndex(source);
|
|
118
133
|
if (parameterIndex >= 0) {
|
|
119
134
|
const parameterValue = findParameterValue({
|
|
120
135
|
args,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"murlock.decorator.js","sourceRoot":"","sources":["../../lib/decorators/murlock.decorator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwC;AACxC,4BAA0B;AAC1B,8CAAiD;AACj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