@yolo-croket-dev/core 1.7.25-slowquery.30 → 1.7.25-slowquery.32
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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AbortEvent = void 0;
|
|
4
4
|
// src/modules/rpc-testing/decorators/abort-event.decorator.ts
|
|
5
5
|
const abort_1 = require("../functions/abort");
|
|
6
|
+
const abortable_promise_1 = require("@xuchaoqian/abortable-promise");
|
|
6
7
|
/**
|
|
7
8
|
* 이벤트 기반으로 AbortSignal을 감지하는 데코레이터 (Interval 없음)
|
|
8
9
|
*/
|
|
@@ -10,21 +11,15 @@ function AbortEvent() {
|
|
|
10
11
|
return function (target, propertyKey, descriptor) {
|
|
11
12
|
const originalMethod = descriptor.value;
|
|
12
13
|
// eslint-disable-next-line no-param-reassign
|
|
13
|
-
descriptor.value = async function (...args) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
clearInterval(intervalId);
|
|
25
|
-
throw error;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
14
|
+
// descriptor.value = async function (...args: unknown[]) {
|
|
15
|
+
// try {
|
|
16
|
+
// const result = await new AbortablePromise(originalMethod.apply(this, args), getCurrentAbortSignal() || undefined);
|
|
17
|
+
// return result;
|
|
18
|
+
// } catch (error) {
|
|
19
|
+
// throw error;
|
|
20
|
+
// }
|
|
21
|
+
// };
|
|
22
|
+
descriptor.value = new abortable_promise_1.AbortablePromise(originalMethod, (0, abort_1.getCurrentAbortSignal)() || undefined);
|
|
28
23
|
return descriptor;
|
|
29
24
|
};
|
|
30
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/core",
|
|
3
|
-
"version": "1.7.25-slowquery.
|
|
3
|
+
"version": "1.7.25-slowquery.32",
|
|
4
4
|
"author": "Yolo Co., Ltd.",
|
|
5
5
|
"description": "Yolo commonization module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"license": "UNLICENSED",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@nestjs/common": "^8.2.3",
|
|
18
|
+
"@xuchaoqian/abortable-promise": "^1.11.2",
|
|
18
19
|
"@yolo-croket-dev/logger": "^1.0.15",
|
|
19
20
|
"@yolo-croket-dev/msa-logger": "^3.0.4",
|
|
20
21
|
"@yolo-croket-dev/redis": "^1.0.23",
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"uuid": "^8.3.2"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
|
-
"@types/node": "^
|
|
30
|
+
"@types/node": "^24.3.1",
|
|
30
31
|
"@types/randomstring": "^1.1.8",
|
|
31
32
|
"@types/uuid": "^8.3.4"
|
|
32
33
|
}
|