moost 0.4.12 → 0.4.13
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/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -142,7 +142,7 @@ function defineMoostEventHandler(options) {
|
|
|
142
142
|
const instance = await options.getControllerInstance();
|
|
143
143
|
if (instance) {
|
|
144
144
|
setControllerContext(instance, options.controllerMethod || '', options.targetPath);
|
|
145
|
-
ci.hook('Controller:registered');
|
|
145
|
+
ci.hook(options.handlerType, 'Controller:registered');
|
|
146
146
|
}
|
|
147
147
|
const interceptorHandler = await options.getIterceptorHandler();
|
|
148
148
|
if (interceptorHandler?.count) {
|
|
@@ -186,7 +186,7 @@ function defineMoostEventHandler(options) {
|
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
try {
|
|
189
|
-
response = await ci.with(
|
|
189
|
+
response = await ci.with(`Handler:${options.targetPath}`, {
|
|
190
190
|
'moost.handler': options.controllerMethod || '',
|
|
191
191
|
'moost.controller': mate$1.getConstructor(instance).name,
|
|
192
192
|
}, () => callControllerMethod());
|
package/dist/index.d.ts
CHANGED
|
@@ -377,6 +377,7 @@ interface TMoostEventHandlerOptions<T> {
|
|
|
377
377
|
end?: (opts: TMoostEventHandlerHookOptions<T>) => unknown;
|
|
378
378
|
};
|
|
379
379
|
targetPath: string;
|
|
380
|
+
handlerType: string;
|
|
380
381
|
}
|
|
381
382
|
declare function registerEventScope(scopeId: string): () => void;
|
|
382
383
|
declare function defineMoostEventHandler<T>(options: TMoostEventHandlerOptions<T>): () => Promise<unknown>;
|
package/dist/index.mjs
CHANGED
|
@@ -143,7 +143,7 @@ function defineMoostEventHandler(options) {
|
|
|
143
143
|
const instance = await options.getControllerInstance();
|
|
144
144
|
if (instance) {
|
|
145
145
|
setControllerContext(instance, options.controllerMethod || '', options.targetPath);
|
|
146
|
-
ci.hook('Controller:registered');
|
|
146
|
+
ci.hook(options.handlerType, 'Controller:registered');
|
|
147
147
|
}
|
|
148
148
|
const interceptorHandler = await options.getIterceptorHandler();
|
|
149
149
|
if (interceptorHandler?.count) {
|
|
@@ -187,7 +187,7 @@ function defineMoostEventHandler(options) {
|
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
try {
|
|
190
|
-
response = await ci.with(
|
|
190
|
+
response = await ci.with(`Handler:${options.targetPath}`, {
|
|
191
191
|
'moost.handler': options.controllerMethod || '',
|
|
192
192
|
'moost.controller': getConstructor(instance).name,
|
|
193
193
|
}, () => callControllerMethod());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moost",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.13",
|
|
4
4
|
"description": "moost",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"@prostojs/infact": "^0.2.3",
|
|
35
35
|
"@prostojs/mate": "^0.3.2",
|
|
36
36
|
"@prostojs/logger": "^0.4.0",
|
|
37
|
-
"@wooksjs/event-core": "^0.5.
|
|
37
|
+
"@wooksjs/event-core": "^0.5.11",
|
|
38
38
|
"hookable": "^5.5.3",
|
|
39
|
-
"wooks": "^0.5.
|
|
39
|
+
"wooks": "^0.5.11"
|
|
40
40
|
},
|
|
41
41
|
"author": "Artem Maltsev",
|
|
42
42
|
"license": "MIT",
|