moost 0.4.21 → 0.4.23
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 +5 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.mjs +1 -0
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ var eventCore = require('@wooksjs/event-core');
|
|
|
5
5
|
var infact$1 = require('@prostojs/infact');
|
|
6
6
|
var logger = require('@prostojs/logger');
|
|
7
7
|
var hookable = require('hookable');
|
|
8
|
+
var wooks = require('wooks');
|
|
8
9
|
|
|
9
10
|
async function runPipes(pipes, initialValue, metas, level) {
|
|
10
11
|
let v = initialValue;
|
|
@@ -899,6 +900,10 @@ Object.defineProperty(exports, "createReplaceRegistry", {
|
|
|
899
900
|
enumerable: true,
|
|
900
901
|
get: function () { return infact$1.createReplaceRegistry; }
|
|
901
902
|
});
|
|
903
|
+
Object.defineProperty(exports, "getGlobalWooks", {
|
|
904
|
+
enumerable: true,
|
|
905
|
+
get: function () { return wooks.getGlobalWooks; }
|
|
906
|
+
});
|
|
902
907
|
exports.Circular = Circular;
|
|
903
908
|
exports.Const = Const;
|
|
904
909
|
exports.ConstFactory = ConstFactory;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Hookable } from 'hookable';
|
|
|
7
7
|
import * as _prostojs_mate from '@prostojs/mate';
|
|
8
8
|
import { TMateParamMeta, Mate } from '@prostojs/mate';
|
|
9
9
|
export { getConstructor, isConstructor } from '@prostojs/mate';
|
|
10
|
+
export { getGlobalWooks } from 'wooks';
|
|
10
11
|
|
|
11
12
|
type TAny = any;
|
|
12
13
|
type TAnyFn = (...a: TAny[]) => unknown;
|
|
@@ -595,6 +596,28 @@ declare function useControllerContext<T extends object>(): {
|
|
|
595
596
|
* @returns
|
|
596
597
|
*/
|
|
597
598
|
declare function defineInterceptorFn(fn: TInterceptorFn, priority?: TInterceptorPriority): TInterceptorFn;
|
|
599
|
+
/**
|
|
600
|
+
* Class based interceptor interface
|
|
601
|
+
*
|
|
602
|
+
* Use it to create class-based interceptors and don't forget to make it **@Injectable()**
|
|
603
|
+
*
|
|
604
|
+
* @example
|
|
605
|
+
* "@Injectable()
|
|
606
|
+
* export class MyInterceptor implements TInterceptorClass {
|
|
607
|
+
* static priority = TInterceptorPriority.INTERCEPTOR
|
|
608
|
+
* handler: TInterceptorClass['handler'] = (before, after, onError) => {
|
|
609
|
+
* before((reply) => {
|
|
610
|
+
* console.log('before')
|
|
611
|
+
* })
|
|
612
|
+
* after((response, reply) => {
|
|
613
|
+
* console.log('after')
|
|
614
|
+
* })
|
|
615
|
+
* onError((error, reply) => {
|
|
616
|
+
* console.log('error')
|
|
617
|
+
* })
|
|
618
|
+
* }
|
|
619
|
+
* }
|
|
620
|
+
*/
|
|
598
621
|
type TInterceptorClass = TClassFunction<TInterceptorFn>;
|
|
599
622
|
/**
|
|
600
623
|
* ### Define Pipe Function
|
package/dist/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { Infact, createProvideRegistry, createReplaceRegistry } from '@prostojs/
|
|
|
6
6
|
export { createProvideRegistry, createReplaceRegistry } from '@prostojs/infact';
|
|
7
7
|
import { ProstoLogger, createConsoleTransort, coloredConsole } from '@prostojs/logger';
|
|
8
8
|
import { Hookable } from 'hookable';
|
|
9
|
+
export { getGlobalWooks } from 'wooks';
|
|
9
10
|
|
|
10
11
|
async function runPipes(pipes, initialValue, metas, level) {
|
|
11
12
|
let v = initialValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moost",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.23",
|
|
4
4
|
"description": "moost",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"prostojs"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@prostojs/infact": "^0.2.
|
|
35
|
-
"@prostojs/mate": "^0.3.
|
|
34
|
+
"@prostojs/infact": "^0.2.4",
|
|
35
|
+
"@prostojs/mate": "^0.3.3",
|
|
36
36
|
"@prostojs/logger": "^0.4.2",
|
|
37
|
-
"@wooksjs/event-core": "^0.5.
|
|
37
|
+
"@wooksjs/event-core": "^0.5.17",
|
|
38
38
|
"hookable": "^5.5.3",
|
|
39
|
-
"wooks": "^0.5.
|
|
39
|
+
"wooks": "^0.5.17"
|
|
40
40
|
},
|
|
41
41
|
"author": "Artem Maltsev",
|
|
42
42
|
"license": "MIT",
|