@lerianstudio/sindarian-server 1.0.0-beta.1 → 1.0.0-beta.12
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 +367 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/keys.d.ts +5 -0
- package/dist/constants/keys.d.ts.map +1 -1
- package/dist/constants/keys.js +6 -1
- package/dist/constants/keys.js.map +1 -1
- package/dist/constants/scopes.d.ts +6 -0
- package/dist/constants/scopes.d.ts.map +1 -0
- package/dist/constants/scopes.js +10 -0
- package/dist/constants/scopes.js.map +1 -0
- package/dist/context/arguments-host.d.ts +14 -0
- package/dist/context/arguments-host.d.ts.map +1 -0
- package/dist/context/arguments-host.js +28 -0
- package/dist/context/arguments-host.js.map +1 -0
- package/dist/context/execution-context.d.ts +10 -0
- package/dist/context/execution-context.d.ts.map +1 -0
- package/dist/context/execution-context.js +19 -0
- package/dist/context/execution-context.js.map +1 -0
- package/dist/context/http-arguments-host.d.ts +8 -0
- package/dist/context/http-arguments-host.d.ts.map +1 -0
- package/dist/context/http-arguments-host.js +17 -0
- package/dist/context/http-arguments-host.js.map +1 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +20 -0
- package/dist/context/index.js.map +1 -0
- package/dist/controllers/base-controller.d.ts +0 -2
- package/dist/controllers/base-controller.d.ts.map +1 -1
- package/dist/controllers/base-controller.js +0 -15
- package/dist/controllers/base-controller.js.map +1 -1
- package/dist/controllers/decorators/body-decorator.d.ts +12 -17
- package/dist/controllers/decorators/body-decorator.d.ts.map +1 -1
- package/dist/controllers/decorators/body-decorator.js +55 -43
- package/dist/controllers/decorators/body-decorator.js.map +1 -1
- package/dist/controllers/decorators/controller-decorator.d.ts +5 -8
- package/dist/controllers/decorators/controller-decorator.d.ts.map +1 -1
- package/dist/controllers/decorators/controller-decorator.js +30 -66
- package/dist/controllers/decorators/controller-decorator.js.map +1 -1
- package/dist/controllers/decorators/param-decorator.d.ts +4 -9
- package/dist/controllers/decorators/param-decorator.d.ts.map +1 -1
- package/dist/controllers/decorators/param-decorator.js +33 -29
- package/dist/controllers/decorators/param-decorator.js.map +1 -1
- package/dist/controllers/decorators/query-decorator.d.ts +11 -15
- package/dist/controllers/decorators/query-decorator.d.ts.map +1 -1
- package/dist/controllers/decorators/query-decorator.js +24 -38
- package/dist/controllers/decorators/query-decorator.js.map +1 -1
- package/dist/controllers/decorators/request-decorator.d.ts +8 -12
- package/dist/controllers/decorators/request-decorator.d.ts.map +1 -1
- package/dist/controllers/decorators/request-decorator.js +21 -17
- package/dist/controllers/decorators/request-decorator.js.map +1 -1
- package/dist/controllers/decorators/route-decorator.d.ts +12 -1
- package/dist/controllers/decorators/route-decorator.d.ts.map +1 -1
- package/dist/controllers/decorators/route-decorator.js +24 -16
- package/dist/controllers/decorators/route-decorator.js.map +1 -1
- package/dist/dependency-injection/container.js +1 -1
- package/dist/dependency-injection/container.js.map +1 -1
- package/dist/dependency-injection/index.d.ts +2 -1
- package/dist/dependency-injection/index.d.ts.map +1 -1
- package/dist/dependency-injection/index.js +3 -2
- package/dist/dependency-injection/index.js.map +1 -1
- package/dist/dependency-injection/injectable-decorator.d.ts +7 -0
- package/dist/dependency-injection/injectable-decorator.d.ts.map +1 -0
- package/dist/dependency-injection/injectable-decorator.js +21 -0
- package/dist/dependency-injection/injectable-decorator.js.map +1 -0
- package/dist/exceptions/api-exception.d.ts +4 -7
- package/dist/exceptions/api-exception.d.ts.map +1 -1
- package/dist/exceptions/api-exception.js +8 -4
- package/dist/exceptions/api-exception.js.map +1 -1
- package/dist/exceptions/base-exception-filter.d.ts +8 -0
- package/dist/exceptions/base-exception-filter.d.ts.map +1 -0
- package/dist/exceptions/base-exception-filter.js +21 -0
- package/dist/exceptions/base-exception-filter.js.map +1 -0
- package/dist/exceptions/decorators/catch-decorator.d.ts +8 -0
- package/dist/exceptions/decorators/catch-decorator.d.ts.map +1 -0
- package/dist/exceptions/decorators/catch-decorator.js +14 -0
- package/dist/exceptions/decorators/catch-decorator.js.map +1 -0
- package/dist/exceptions/decorators/index.d.ts +3 -0
- package/dist/exceptions/decorators/index.d.ts.map +1 -0
- package/dist/exceptions/decorators/index.js +8 -0
- package/dist/exceptions/decorators/index.js.map +1 -0
- package/dist/exceptions/decorators/use-filters-decorator.d.ts +15 -0
- package/dist/exceptions/decorators/use-filters-decorator.d.ts.map +1 -0
- package/dist/exceptions/decorators/use-filters-decorator.js +47 -0
- package/dist/exceptions/decorators/use-filters-decorator.js.map +1 -0
- package/dist/exceptions/exception-filter.d.ts +6 -0
- package/dist/exceptions/exception-filter.d.ts.map +1 -0
- package/dist/exceptions/exception-filter.js +7 -0
- package/dist/exceptions/exception-filter.js.map +1 -0
- package/dist/exceptions/index.d.ts +3 -0
- package/dist/exceptions/index.d.ts.map +1 -1
- package/dist/exceptions/index.js +3 -0
- package/dist/exceptions/index.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/interceptor/call-handler.d.ts +4 -0
- package/dist/interceptor/call-handler.d.ts.map +1 -0
- package/dist/interceptor/call-handler.js +3 -0
- package/dist/interceptor/call-handler.js.map +1 -0
- package/dist/interceptor/decorators/index.d.ts +2 -0
- package/dist/interceptor/decorators/index.d.ts.map +1 -0
- package/dist/interceptor/decorators/index.js +6 -0
- package/dist/interceptor/decorators/index.js.map +1 -0
- package/dist/interceptor/decorators/use-interceptor-decorator.d.ts +15 -0
- package/dist/interceptor/decorators/use-interceptor-decorator.d.ts.map +1 -0
- package/dist/interceptor/decorators/use-interceptor-decorator.js +76 -0
- package/dist/interceptor/decorators/use-interceptor-decorator.js.map +1 -0
- package/dist/interceptor/index.d.ts +4 -0
- package/dist/interceptor/index.d.ts.map +1 -0
- package/dist/interceptor/index.js +20 -0
- package/dist/interceptor/index.js.map +1 -0
- package/dist/interceptor/interceptor.d.ts +3 -5
- package/dist/interceptor/interceptor.d.ts.map +1 -1
- package/dist/interceptor/interceptor.js.map +1 -1
- package/dist/logger/console-logger.d.ts +24 -0
- package/dist/logger/console-logger.d.ts.map +1 -0
- package/dist/logger/console-logger.js +78 -0
- package/dist/logger/console-logger.js.map +1 -0
- package/dist/logger/index.d.ts +4 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +8 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logger/logger-service.d.ts +34 -0
- package/dist/logger/logger-service.d.ts.map +1 -0
- package/dist/logger/logger-service.js +12 -0
- package/dist/logger/logger-service.js.map +1 -0
- package/dist/logger/logger.d.ts +21 -0
- package/dist/logger/logger.d.ts.map +1 -0
- package/dist/logger/logger.js +86 -0
- package/dist/logger/logger.js.map +1 -0
- package/dist/modules/module-decorator.d.ts +5 -3
- package/dist/modules/module-decorator.d.ts.map +1 -1
- package/dist/modules/module-decorator.js +78 -24
- package/dist/modules/module-decorator.js.map +1 -1
- package/dist/pipes/decorators/index.d.ts +2 -0
- package/dist/pipes/decorators/index.d.ts.map +1 -0
- package/dist/pipes/decorators/index.js +6 -0
- package/dist/pipes/decorators/index.js.map +1 -0
- package/dist/pipes/decorators/use-pipes.d.ts +19 -0
- package/dist/pipes/decorators/use-pipes.d.ts.map +1 -0
- package/dist/pipes/decorators/use-pipes.js +118 -0
- package/dist/pipes/decorators/use-pipes.js.map +1 -0
- package/dist/pipes/index.d.ts +3 -0
- package/dist/pipes/index.d.ts.map +1 -0
- package/dist/pipes/index.js +18 -0
- package/dist/pipes/index.js.map +1 -0
- package/dist/pipes/pipe-transform.d.ts +46 -0
- package/dist/pipes/pipe-transform.d.ts.map +1 -0
- package/dist/pipes/pipe-transform.js +3 -0
- package/dist/pipes/pipe-transform.js.map +1 -0
- package/dist/server/server-factory.d.ts +23 -6
- package/dist/server/server-factory.d.ts.map +1 -1
- package/dist/server/server-factory.js +114 -48
- package/dist/server/server-factory.js.map +1 -1
- package/dist/services/filters.d.ts +2 -0
- package/dist/services/filters.d.ts.map +1 -0
- package/dist/services/filters.js +5 -0
- package/dist/services/filters.js.map +1 -0
- package/dist/services/http-service.d.ts +68 -0
- package/dist/services/http-service.d.ts.map +1 -0
- package/dist/services/http-service.js +233 -0
- package/dist/services/http-service.js.map +1 -0
- package/dist/services/interceptor.d.ts +2 -0
- package/dist/services/interceptor.d.ts.map +1 -0
- package/dist/services/interceptor.js +5 -0
- package/dist/services/interceptor.js.map +1 -0
- package/dist/services/pipes.d.ts +2 -0
- package/dist/services/pipes.d.ts.map +1 -0
- package/dist/services/pipes.js +5 -0
- package/dist/services/pipes.js.map +1 -0
- package/dist/utils/form-data/get-form-data.d.ts +2 -0
- package/dist/utils/form-data/get-form-data.d.ts.map +1 -0
- package/dist/utils/form-data/get-form-data.js +11 -0
- package/dist/utils/form-data/get-form-data.js.map +1 -0
- package/dist/utils/search/create-query-string.d.ts +9 -0
- package/dist/utils/search/create-query-string.d.ts.map +1 -0
- package/dist/utils/search/create-query-string.js +26 -0
- package/dist/utils/search/create-query-string.js.map +1 -0
- package/dist/zod/create-zod-dto.d.ts +16 -0
- package/dist/zod/create-zod-dto.d.ts.map +1 -0
- package/dist/zod/create-zod-dto.js +14 -0
- package/dist/zod/create-zod-dto.js.map +1 -0
- package/dist/zod/index.d.ts +3 -0
- package/dist/zod/index.d.ts.map +1 -0
- package/dist/zod/index.js +8 -0
- package/dist/zod/index.js.map +1 -0
- package/dist/zod/zod-validation-pipe.d.ts +5 -0
- package/dist/zod/zod-validation-pipe.d.ts.map +1 -0
- package/dist/zod/zod-validation-pipe.js +35 -0
- package/dist/zod/zod-validation-pipe.js.map +1 -0
- package/package.json +7 -6
- package/dist/interceptor/decorators/use-interceptor.d.ts +0 -3
- package/dist/interceptor/decorators/use-interceptor.d.ts.map +0 -1
- package/dist/interceptor/decorators/use-interceptor.js +0 -9
- package/dist/interceptor/decorators/use-interceptor.js.map +0 -1
|
@@ -2,18 +2,14 @@ export type RequestMetadata = {
|
|
|
2
2
|
propertyKey: string | symbol;
|
|
3
3
|
parameterIndex: number;
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare function requestDecoratorHandler(target: object, propertyKey: string | symbol, args: any[]): {
|
|
14
|
-
parameter: any;
|
|
15
|
-
parameterIndex: number;
|
|
16
|
-
} | null;
|
|
5
|
+
export declare class RequestHandler {
|
|
6
|
+
static getMetadata(target: object, propertyKey: string | symbol): RequestMetadata | undefined;
|
|
7
|
+
static handle(target: object, propertyKey: string | symbol, args: any[]): {
|
|
8
|
+
type: string;
|
|
9
|
+
parameter: any;
|
|
10
|
+
parameterIndex: number;
|
|
11
|
+
} | null;
|
|
12
|
+
}
|
|
17
13
|
/**
|
|
18
14
|
* Decorator to fetch the request object.
|
|
19
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-decorator.d.ts","sourceRoot":"","sources":["../../../src/controllers/decorators/request-decorator.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"request-decorator.d.ts","sourceRoot":"","sources":["../../../src/controllers/decorators/request-decorator.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,qBAAa,cAAc;IACzB,MAAM,CAAC,WAAW,CAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAAG,MAAM,GAC3B,eAAe,GAAG,SAAS;IAmB9B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE;;;;;CAYxE;AAED;;;;GAIG;AACH,wBAAgB,OAAO,KAEnB,QAAQ,MAAM,EACd,aAAa,MAAM,GAAG,MAAM,EAC5B,gBAAgB,MAAM,UAYzB;AAED,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,CAAA"}
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RequestHandler = void 0;
|
|
4
4
|
exports.Request = Request;
|
|
5
5
|
exports.Req = Request;
|
|
6
6
|
const keys_1 = require("../../constants/keys");
|
|
7
7
|
const get_next_arguments_1 = require("../../utils/nextjs/get-next-arguments");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
class RequestHandler {
|
|
9
|
+
static getMetadata(target, propertyKey) {
|
|
10
|
+
let metadata = Reflect.getOwnMetadata(keys_1.REQUEST_KEY, target, propertyKey);
|
|
11
|
+
// If not found on instance, try constructor prototype
|
|
12
|
+
if (!metadata && target.constructor) {
|
|
13
|
+
metadata = Reflect.getOwnMetadata(keys_1.REQUEST_KEY, target.constructor.prototype, propertyKey);
|
|
14
|
+
}
|
|
15
|
+
return metadata;
|
|
16
|
+
}
|
|
17
|
+
static handle(target, propertyKey, args) {
|
|
18
|
+
const metadata = this.getMetadata(target, propertyKey);
|
|
19
|
+
if (metadata) {
|
|
20
|
+
return {
|
|
21
|
+
type: 'custom',
|
|
22
|
+
parameter: (0, get_next_arguments_1.getNextRequestArgument)(args),
|
|
23
|
+
parameterIndex: metadata.parameterIndex
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
23
27
|
}
|
|
24
|
-
return null;
|
|
25
28
|
}
|
|
29
|
+
exports.RequestHandler = RequestHandler;
|
|
26
30
|
/**
|
|
27
31
|
* Decorator to fetch the request object.
|
|
28
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-decorator.js","sourceRoot":"","sources":["../../../src/controllers/decorators/request-decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request-decorator.js","sourceRoot":"","sources":["../../../src/controllers/decorators/request-decorator.ts"],"names":[],"mappings":";;;AAkDA,0BAgBC;AAEmB,sBAAG;AApEvB,2CAA8C;AAC9C,0EAA0E;AAO1E,MAAa,cAAc;IACzB,MAAM,CAAC,WAAW,CAChB,MAAc,EACd,WAA4B;QAE5B,IAAI,QAAQ,GAAoB,OAAO,CAAC,cAAc,CACpD,kBAAW,EACX,MAAM,EACN,WAAW,CACZ,CAAA;QAED,sDAAsD;QACtD,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACpC,QAAQ,GAAG,OAAO,CAAC,cAAc,CAC/B,kBAAW,EACX,MAAM,CAAC,WAAW,CAAC,SAAS,EAC5B,WAAW,CACZ,CAAA;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAc,EAAE,WAA4B,EAAE,IAAW;QACrE,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;QAEtD,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAA,2CAAsB,EAAC,IAAI,CAAC;gBACvC,cAAc,EAAE,QAAQ,CAAC,cAAc;aACxC,CAAA;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAnCD,wCAmCC;AAED;;;;GAIG;AACH,SAAgB,OAAO;IACrB,OAAO,UACL,MAAc,EACd,WAA4B,EAC5B,cAAsB;QAEtB,OAAO,CAAC,cAAc,CACpB,kBAAW,EACX;YACE,WAAW;YACX,cAAc;SACf,EACD,MAAM,EACN,WAAW,CACZ,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { HttpMethods } from '../../constants/http-methods';
|
|
2
2
|
export type RouteMetadata = {
|
|
3
|
+
methodName: string;
|
|
3
4
|
method: HttpMethods;
|
|
4
5
|
path: string;
|
|
6
|
+
paramTypes: any[];
|
|
5
7
|
};
|
|
6
|
-
export
|
|
8
|
+
export type RouteContext = {
|
|
9
|
+
type?: 'body' | 'param' | 'query' | 'custom';
|
|
10
|
+
parameter: any;
|
|
11
|
+
parameterIndex: number;
|
|
12
|
+
paramType?: any;
|
|
13
|
+
};
|
|
14
|
+
export declare class RouteHandler {
|
|
15
|
+
static getMetadata(target: object, propertyKey: string | symbol): RouteMetadata;
|
|
16
|
+
static getArgs(target: object, propertyKey: string | symbol, originalArgs: any[]): Promise<RouteContext[]>;
|
|
17
|
+
}
|
|
7
18
|
export declare function Route(method: HttpMethods, path: string): MethodDecorator;
|
|
8
19
|
/**
|
|
9
20
|
* Decorator to define a GET route.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-decorator.d.ts","sourceRoot":"","sources":["../../../src/controllers/decorators/route-decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAMtD,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,WAAW,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"route-decorator.d.ts","sourceRoot":"","sources":["../../../src/controllers/decorators/route-decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAMtD,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,WAAW,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,GAAG,EAAE,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;IAC5C,SAAS,EAAE,GAAG,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,GAAG,CAAA;CAChB,CAAA;AAED,qBAAa,YAAY;IACvB,MAAM,CAAC,WAAW,CAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAAG,MAAM,GAC3B,aAAa;WAIH,OAAO,CAClB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAAG,MAAM,EAC5B,YAAY,EAAE,GAAG,EAAE,GAClB,OAAO,CAAC,YAAY,EAAE,CAAC;CAa3B;AAED,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAgCxE;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAW,mBAEpC;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,IAAI,GAAE,MAAW,mBAErC;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAW,mBAEpC;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,IAAI,GAAE,MAAW,mBAEtC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,GAAE,MAAW,mBAEvC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RouteHandler = void 0;
|
|
4
4
|
exports.Route = Route;
|
|
5
5
|
exports.Get = Get;
|
|
6
6
|
exports.Post = Post;
|
|
@@ -10,31 +10,39 @@ exports.Delete = Delete;
|
|
|
10
10
|
const server_1 = require("next/server");
|
|
11
11
|
const keys_1 = require("../../constants/keys");
|
|
12
12
|
const http_methods_1 = require("../../constants/http-methods");
|
|
13
|
+
const request_decorator_1 = require("./request-decorator");
|
|
13
14
|
const body_decorator_1 = require("./body-decorator");
|
|
14
15
|
const param_decorator_1 = require("./param-decorator");
|
|
15
16
|
const query_decorator_1 = require("./query-decorator");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
class RouteHandler {
|
|
18
|
+
static getMetadata(target, propertyKey) {
|
|
19
|
+
return Reflect.getOwnMetadata(keys_1.ROUTE_KEY, target, propertyKey);
|
|
20
|
+
}
|
|
21
|
+
static async getArgs(target, propertyKey, originalArgs) {
|
|
22
|
+
const args = [
|
|
23
|
+
await request_decorator_1.RequestHandler.handle(target, propertyKey, originalArgs),
|
|
24
|
+
await query_decorator_1.QueryHandler.handle(target, propertyKey, originalArgs),
|
|
25
|
+
await param_decorator_1.ParamHandler.handle(target, propertyKey, originalArgs),
|
|
26
|
+
await body_decorator_1.BodyHandler.handle(target, propertyKey, originalArgs)
|
|
27
|
+
]
|
|
28
|
+
.flat()
|
|
29
|
+
.filter((a) => a !== null && a !== undefined)
|
|
30
|
+
.sort((a, b) => a.parameterIndex - b.parameterIndex);
|
|
31
|
+
return args;
|
|
32
|
+
}
|
|
19
33
|
}
|
|
34
|
+
exports.RouteHandler = RouteHandler;
|
|
20
35
|
function Route(method, path) {
|
|
21
36
|
return function (target, propertyKey, descriptor) {
|
|
37
|
+
const paramTypes = Reflect.getMetadata('design:paramtypes', target, propertyKey) || [];
|
|
22
38
|
Reflect.defineMetadata(keys_1.ROUTE_KEY, {
|
|
39
|
+
methodName: propertyKey,
|
|
23
40
|
method: method,
|
|
24
|
-
path
|
|
41
|
+
path,
|
|
42
|
+
paramTypes
|
|
25
43
|
}, target, propertyKey);
|
|
26
44
|
const originalMethod = descriptor.value;
|
|
27
|
-
descriptor.value = async function (...
|
|
28
|
-
const args = [
|
|
29
|
-
await (0, request_decorator_1.requestDecoratorHandler)(target, propertyKey, originalArgs),
|
|
30
|
-
await (0, query_decorator_1.queryDecoratorHandler)(target, propertyKey, originalArgs),
|
|
31
|
-
await (0, param_decorator_1.paramDecoratorHandler)(target, propertyKey, originalArgs),
|
|
32
|
-
await (0, body_decorator_1.bodyDecoratorHandler)(target, propertyKey, originalArgs)
|
|
33
|
-
]
|
|
34
|
-
.flat()
|
|
35
|
-
.filter((a) => a !== null && a !== undefined)
|
|
36
|
-
.sort((a, b) => a.parameterIndex - b.parameterIndex)
|
|
37
|
-
.map((a) => a.parameter);
|
|
45
|
+
descriptor.value = async function (...args) {
|
|
38
46
|
const response = await originalMethod.apply(this, args);
|
|
39
47
|
if (response instanceof server_1.NextResponse) {
|
|
40
48
|
return response;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-decorator.js","sourceRoot":"","sources":["../../../src/controllers/decorators/route-decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"route-decorator.js","sourceRoot":"","sources":["../../../src/controllers/decorators/route-decorator.ts"],"names":[],"mappings":";;;AAiDA,sBAgCC;AAQD,kBAEC;AAQD,oBAEC;AAQD,kBAEC;AAQD,sBAEC;AAQD,wBAEC;AAnID,wCAA0C;AAC1C,2CAA4C;AAC5C,2DAAsD;AACtD,2DAAoD;AACpD,qDAA8C;AAC9C,uDAAgD;AAChD,uDAAgD;AAgBhD,MAAa,YAAY;IACvB,MAAM,CAAC,WAAW,CAChB,MAAc,EACd,WAA4B;QAE5B,OAAO,OAAO,CAAC,cAAc,CAAC,gBAAS,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA;IAC/D,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO,CAClB,MAAc,EACd,WAA4B,EAC5B,YAAmB;QAEnB,MAAM,IAAI,GAAG;YACX,MAAM,kCAAc,CAAC,MAAM,CAAC,M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CAAC,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,GAAG,CAAC,OAAe,EAAE;IACnC,OAAO,KAAK,CAAC,0BAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;AACrC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,IAAI,CAAC,OAAe,EAAE;IACpC,OAAO,KAAK,CAAC,0BAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACtC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,GAAG,CAAC,OAAe,EAAE;IACnC,OAAO,KAAK,CAAC,0BAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;AACrC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,OAAe,EAAE;IACrC,OAAO,KAAK,CAAC,0BAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;AACvC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,MAAM,CAAC,OAAe,EAAE;IACtC,OAAO,KAAK,CAAC,0BAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -18,7 +18,7 @@ class Container {
|
|
|
18
18
|
* @param module ContainerModule
|
|
19
19
|
*/
|
|
20
20
|
load(module) {
|
|
21
|
-
if (!
|
|
21
|
+
if (!Object.prototype.hasOwnProperty.call(module, 'registry')) {
|
|
22
22
|
throw new Error(`Container: module ${module} does not have a registry method`);
|
|
23
23
|
}
|
|
24
24
|
// Prevent infinite recursion by tracking loaded modules
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../src/dependency-injection/container.ts"],"names":[],"mappings":";;;AAAA,yCAIkB;AAElB;;;GAGG;AACH,MAAa,SAAS;IAIpB;QAFQ,kBAAa,GAAyB,IAAI,GAAG,EAAE,CAAA;QAGrD,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAkB,EAAE,CAAA;IAC3C,CAAC;IAED;;;;;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ED,MAAM,CAAI,iBAAuC;QAC/C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAA;IAC1C,CAAC;CACF;AAjDD,8BAiDC;AAID;;;;GAIG;AACH,MAAa,eAAe;IAG1B,YAAY,QAAiC;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;CACF;AAND,0CAMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dependency-injection/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dependency-injection/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,QAAQ,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -14,9 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.Optional = exports.Inject = void 0;
|
|
18
18
|
__exportStar(require("./container"), exports);
|
|
19
|
+
__exportStar(require("./injectable-decorator"), exports);
|
|
19
20
|
var inversify_1 = require("inversify");
|
|
20
21
|
Object.defineProperty(exports, "Inject", { enumerable: true, get: function () { return inversify_1.inject; } });
|
|
21
|
-
Object.defineProperty(exports, "
|
|
22
|
+
Object.defineProperty(exports, "Optional", { enumerable: true, get: function () { return inversify_1.optional; } });
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dependency-injection/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dependency-injection/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,yDAAsC;AACtC,uCAAkE;AAAzD,mGAAA,MAAM,OAAU;AAAE,qGAAA,QAAQ,OAAY"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Scope } from '../constants/scopes';
|
|
2
|
+
export declare function injectableHandler(target: Function): any;
|
|
3
|
+
export type InjectableOptions = {
|
|
4
|
+
scope?: Scope;
|
|
5
|
+
};
|
|
6
|
+
export declare function Injectable(options?: InjectableOptions): ClassDecorator;
|
|
7
|
+
//# sourceMappingURL=injectable-decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectable-decorator.d.ts","sourceRoot":"","sources":["../../src/dependency-injection/injectable-decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE1C,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,OAEjD;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,cAAc,CAW1E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.injectableHandler = injectableHandler;
|
|
4
|
+
exports.Injectable = Injectable;
|
|
5
|
+
const inversify_1 = require("inversify");
|
|
6
|
+
const keys_1 = require("../constants/keys");
|
|
7
|
+
const scopes_1 = require("../constants/scopes");
|
|
8
|
+
function injectableHandler(target) {
|
|
9
|
+
return Reflect.getOwnMetadata(keys_1.INJECTABLE_KEY, target);
|
|
10
|
+
}
|
|
11
|
+
function Injectable(options = {}) {
|
|
12
|
+
const { scope = scopes_1.Scope.DEFAULT } = options;
|
|
13
|
+
return (target) => {
|
|
14
|
+
Reflect.defineMetadata(keys_1.INJECTABLE_KEY, { scope }, target);
|
|
15
|
+
if (options?.scope) {
|
|
16
|
+
console.warn('Injectable: Scope option is not implemented.');
|
|
17
|
+
}
|
|
18
|
+
(0, inversify_1.injectable)()(target);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=injectable-decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectable-decorator.js","sourceRoot":"","sources":["../../src/dependency-injection/injectable-decorator.ts"],"names":[],"mappings":";;AAIA,8CAEC;AAMD,gCAWC;AAvBD,yCAAsC;AACtC,2CAAiD;AACjD,+CAA0C;AAE1C,SAAgB,iBAAiB,CAAC,MAAgB;IAChD,OAAO,OAAO,CAAC,cAAc,CAAC,qBAAc,EAAE,MAAM,CAAC,CAAA;AACvD,CAAC;AAMD,SAAgB,UAAU,CAAC,UAA6B,EAAE;IACxD,MAAM,EAAE,KAAK,GAAG,cAAK,CAAC,OAAO,EAAE,GAAG,OAAO,CAAA;IACzC,OAAO,CAAC,MAAgB,EAAE,EAAE;QAC1B,OAAO,CAAC,cAAc,CAAC,qBAAc,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAA;QAEzD,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAA;QAC9D,CAAC;QAED,IAAA,sBAAU,GAAE,CAAC,MAAM,CAAC,CAAA;IACtB,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -4,18 +4,15 @@ export declare class ApiException extends HttpException {
|
|
|
4
4
|
readonly code: string;
|
|
5
5
|
readonly title: string;
|
|
6
6
|
readonly message: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
title: string;
|
|
11
|
-
message: string;
|
|
12
|
-
};
|
|
7
|
+
private readonly metadata;
|
|
8
|
+
constructor(code: string, title: string, message: string, status?: HttpStatus, metadata?: any);
|
|
9
|
+
getResponse(): any;
|
|
13
10
|
}
|
|
14
11
|
export declare class BadRequestApiException extends ApiException {
|
|
15
12
|
constructor(message: string);
|
|
16
13
|
}
|
|
17
14
|
export declare class ValidationApiException extends ApiException {
|
|
18
|
-
constructor(message: string);
|
|
15
|
+
constructor(message: string, errors?: any);
|
|
19
16
|
}
|
|
20
17
|
export declare class UnauthorizedApiException extends ApiException {
|
|
21
18
|
constructor(message?: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/api-exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,YAAa,SAAQ,aAAa;
|
|
1
|
+
{"version":3,"file":"api-exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/api-exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,YAAa,SAAQ,aAAa;aAI3B,IAAI,EAAE,MAAM;aACZ,KAAK,EAAE,MAAM;aACb,OAAO,EAAE,MAAM;IALjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAK;gBAGZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EAC/B,MAAM,GAAE,UAA6C,EACrD,QAAQ,GAAE,GAAQ;IAMpB,WAAW;CAQZ;AAED,qBAAa,sBAAuB,SAAQ,YAAY;gBAC1C,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,sBAAuB,SAAQ,YAAY;gBAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG;CAK1C;AAED,qBAAa,wBAAyB,SAAQ,YAAY;gBAC5C,OAAO,GAAE,MAAuB;CAG7C;AAED,qBAAa,qBAAsB,SAAQ,YAAY;gBACzC,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,oBAAqB,SAAQ,YAAY;gBACxC,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,+BAAgC,SAAQ,YAAY;gBACnD,OAAO,EAAE,MAAM;CAQ5B;AAED,qBAAa,+BAAgC,SAAQ,YAAY;gBACnD,OAAO,EAAE,MAAM;CAQ5B;AAED,qBAAa,8BAA+B,SAAQ,YAAY;gBAClD,OAAO,EAAE,MAAM;CAQ5B"}
|
|
@@ -4,17 +4,19 @@ exports.ServiceUnavailableApiException = exports.InternalServerErrorApiException
|
|
|
4
4
|
const http_status_1 = require("../constants/http-status");
|
|
5
5
|
const http_exception_1 = require("./http-exception");
|
|
6
6
|
class ApiException extends http_exception_1.HttpException {
|
|
7
|
-
constructor(code, title, message, status = http_status_1.HttpStatus.INTERNAL_SERVER_ERROR) {
|
|
7
|
+
constructor(code, title, message, status = http_status_1.HttpStatus.INTERNAL_SERVER_ERROR, metadata = {}) {
|
|
8
8
|
super(message, status);
|
|
9
9
|
this.code = code;
|
|
10
10
|
this.title = title;
|
|
11
11
|
this.message = message;
|
|
12
|
+
this.metadata = metadata;
|
|
12
13
|
}
|
|
13
14
|
getResponse() {
|
|
14
15
|
return {
|
|
15
16
|
code: this.code,
|
|
16
17
|
title: this.title,
|
|
17
|
-
message: this.message
|
|
18
|
+
message: this.message,
|
|
19
|
+
...this.metadata
|
|
18
20
|
};
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -26,8 +28,10 @@ class BadRequestApiException extends ApiException {
|
|
|
26
28
|
}
|
|
27
29
|
exports.BadRequestApiException = BadRequestApiException;
|
|
28
30
|
class ValidationApiException extends ApiException {
|
|
29
|
-
constructor(message) {
|
|
30
|
-
super('0007', 'Validation Error', message, http_status_1.HttpStatus.BAD_REQUEST
|
|
31
|
+
constructor(message, errors) {
|
|
32
|
+
super('0007', 'Validation Error', message, http_status_1.HttpStatus.BAD_REQUEST, {
|
|
33
|
+
errors
|
|
34
|
+
});
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
exports.ValidationApiException = ValidationApiException;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-exception.js","sourceRoot":"","sources":["../../src/exceptions/api-exception.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,qDAAgD;AAEhD,MAAa,YAAa,SAAQ,8BAAa;
|
|
1
|
+
{"version":3,"file":"api-exception.js","sourceRoot":"","sources":["../../src/exceptions/api-exception.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,qDAAgD;AAEhD,MAAa,YAAa,SAAQ,8BAAa;IAG7C,YACkB,IAAY,EACZ,KAAa,EACb,OAAe,EAC/B,SAAqB,wBAAU,CAAC,qBAAqB,EACrD,WAAgB,EAAE;QAElB,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QANN,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;QACb,YAAO,GAAP,OAAO,CAAQ;QAK/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,WAAW;QACT,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,GAAG,IAAI,CAAC,QAAQ;SACjB,CAAA;IACH,CAAC;CACF;AAtBD,oCAsBC;AAED,MAAa,sBAAuB,SAAQ,YAAY;IACtD,YAAY,OAAe;QACzB,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAU,CAAC,WAAW,CAAC,CAAA;IAC/D,CAAC;CACF;AAJD,wDAIC;AAED,MAAa,sBAAuB,SAAQ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Filter } from './exception-filter';
|
|
2
|
+
import { NextResponse } from 'next/server';
|
|
3
|
+
export declare class BaseExceptionFilter implements ExceptionFilter {
|
|
4
|
+
catch(exception: any): Promise<NextResponse<{
|
|
5
|
+
message: any;
|
|
6
|
+
}>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=base-exception-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-exception-filter.d.ts","sourceRoot":"","sources":["../../src/exceptions/base-exception-filter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,qBAAa,mBAAoB,YAAW,eAAe;IACnD,KAAK,CAAC,SAAS,EAAE,GAAG;;;CAmB3B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseExceptionFilter = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
const api_exception_1 = require("./api-exception");
|
|
6
|
+
const server_1 = require("next/server");
|
|
7
|
+
class BaseExceptionFilter {
|
|
8
|
+
async catch(exception) {
|
|
9
|
+
if (exception instanceof api_exception_1.ApiException) {
|
|
10
|
+
const status = exception.getStatus ? exception.getStatus() : 500;
|
|
11
|
+
return server_1.NextResponse.json({
|
|
12
|
+
message: exception.message || 'Internal server error'
|
|
13
|
+
}, { status });
|
|
14
|
+
}
|
|
15
|
+
return server_1.NextResponse.json({
|
|
16
|
+
message: exception.message
|
|
17
|
+
}, { status: constants_1.HttpStatus.INTERNAL_SERVER_ERROR });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.BaseExceptionFilter = BaseExceptionFilter;
|
|
21
|
+
//# sourceMappingURL=base-exception-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-exception-filter.js","sourceRoot":"","sources":["../../src/exceptions/base-exception-filter.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,mDAA8C;AAE9C,wCAA0C;AAE1C,MAAa,mBAAmB;IAC9B,KAAK,CAAC,KAAK,CAAC,SAAc;QACxB,IAAI,SAAS,YAAY,4BAAY,EAAE,CAAC;YACtC,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;YAEhE,OAAO,qBAAY,CAAC,IAAI,CACtB;gBACE,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,uBAAuB;aACtD,EACD,EAAE,MAAM,EAAE,CACX,CAAA;QACH,CAAC;QAED,OAAO,qBAAY,CAAC,IAAI,CACtB;YACE,OAAO,EAAE,SAAS,CAAC,OAAO;SAC3B,EACD,EAAE,MAAM,EAAE,sBAAU,CAAC,qBAAqB,EAAE,CAC7C,CAAA;IACH,CAAC;CACF;AApBD,kDAoBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Class } from '../../types/class';
|
|
2
|
+
type CatchMetadata = {
|
|
3
|
+
type: Class;
|
|
4
|
+
};
|
|
5
|
+
export declare function catchHandler(target: object): CatchMetadata;
|
|
6
|
+
export declare function Catch(errorType?: Class): ClassDecorator;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=catch-decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catch-decorator.d.ts","sourceRoot":"","sources":["../../../src/exceptions/decorators/catch-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,KAAK,CAAA;CACZ,CAAA;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAE1D;AAED,wBAAgB,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,GAAG,cAAc,CAIvD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.catchHandler = catchHandler;
|
|
4
|
+
exports.Catch = Catch;
|
|
5
|
+
const keys_1 = require("../../constants/keys");
|
|
6
|
+
function catchHandler(target) {
|
|
7
|
+
return Reflect.getOwnMetadata(keys_1.CATCH_KEY, target);
|
|
8
|
+
}
|
|
9
|
+
function Catch(errorType) {
|
|
10
|
+
return (target) => {
|
|
11
|
+
Reflect.defineMetadata(keys_1.CATCH_KEY, { type: errorType }, target);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=catch-decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catch-decorator.js","sourceRoot":"","sources":["../../../src/exceptions/decorators/catch-decorator.ts"],"names":[],"mappings":";;AAOA,oCAEC;AAED,sBAIC;AAfD,2CAA4C;AAO5C,SAAgB,YAAY,CAAC,MAAc;IACzC,OAAO,OAAO,CAAC,cAAc,CAAC,gBAAS,EAAE,MAAM,CAAC,CAAA;AAClD,CAAC;AAED,SAAgB,KAAK,CAAC,SAAiB;IACrC,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,OAAO,CAAC,cAAc,CAAC,gBAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,CAAA;IAChE,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exceptions/decorators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UseFilters = exports.Catch = void 0;
|
|
4
|
+
var catch_decorator_1 = require("./catch-decorator");
|
|
5
|
+
Object.defineProperty(exports, "Catch", { enumerable: true, get: function () { return catch_decorator_1.Catch; } });
|
|
6
|
+
var use_filters_decorator_1 = require("./use-filters-decorator");
|
|
7
|
+
Object.defineProperty(exports, "UseFilters", { enumerable: true, get: function () { return use_filters_decorator_1.UseFilters; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exceptions/decorators/index.ts"],"names":[],"mappings":";;;AAAA,qDAAyC;AAAhC,wGAAA,KAAK,OAAA;AACd,iEAAoD;AAA3C,mHAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Container } from '../../dependency-injection';
|
|
2
|
+
import { Class } from '../../types/class';
|
|
3
|
+
import { ExceptionFilter } from '../exception-filter';
|
|
4
|
+
export type FilterMetadata = {
|
|
5
|
+
filters: Class[];
|
|
6
|
+
};
|
|
7
|
+
export declare class FilterHandler {
|
|
8
|
+
static getMetadata(target: object): FilterMetadata;
|
|
9
|
+
static register(container: Container, target: object): Promise<void>;
|
|
10
|
+
static fetch(container: Container, target: object): Promise<ExceptionFilter[]>;
|
|
11
|
+
static _fetch(container: Container, filter: ExceptionFilter | Class<ExceptionFilter>): Promise<ExceptionFilter>;
|
|
12
|
+
static _register(container: Container, filter: ExceptionFilter | Class<ExceptionFilter>): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare function UseFilters(filters: Class[]): ClassDecorator;
|
|
15
|
+
//# sourceMappingURL=use-filters-decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-filters-decorator.d.ts","sourceRoot":"","sources":["../../../src/exceptions/decorators/use-filters-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,KAAK,EAAE,CAAA;CACjB,CAAA;AAED,qBAAa,aAAa;IACxB,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc;WAQrC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM;WAQ7C,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM;WAQ1C,MAAM,CACjB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;WAUrC,SAAS,CACpB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;CAQnD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,cAAc,CAS3D"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FilterHandler = void 0;
|
|
4
|
+
exports.UseFilters = UseFilters;
|
|
5
|
+
const keys_1 = require("../../constants/keys");
|
|
6
|
+
class FilterHandler {
|
|
7
|
+
static getMetadata(target) {
|
|
8
|
+
const metadata = Reflect.getOwnMetadata(keys_1.FILTER_KEY, target);
|
|
9
|
+
if (metadata) {
|
|
10
|
+
return { filters: metadata };
|
|
11
|
+
}
|
|
12
|
+
return { filters: [] };
|
|
13
|
+
}
|
|
14
|
+
static async register(container, target) {
|
|
15
|
+
const { filters } = this.getMetadata(target);
|
|
16
|
+
await Promise.all(filters.map((filter) => FilterHandler._register(container, filter)));
|
|
17
|
+
}
|
|
18
|
+
static async fetch(container, target) {
|
|
19
|
+
const { filters } = this.getMetadata(target);
|
|
20
|
+
return Promise.all(filters.map((filter) => this._fetch(container, filter)));
|
|
21
|
+
}
|
|
22
|
+
static async _fetch(container, filter) {
|
|
23
|
+
// If it's a class constructor (function), resolve from container
|
|
24
|
+
if (typeof filter === 'function') {
|
|
25
|
+
return container.getAsync(filter);
|
|
26
|
+
}
|
|
27
|
+
// If it's an instance, resolve from container using its constructor
|
|
28
|
+
return container.getAsync(filter.constructor);
|
|
29
|
+
}
|
|
30
|
+
static async _register(container, filter) {
|
|
31
|
+
if (typeof filter === 'function') {
|
|
32
|
+
container.bind(filter).to(filter).inSingletonScope();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
container.bind(filter.constructor).toConstantValue(filter);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.FilterHandler = FilterHandler;
|
|
40
|
+
function UseFilters(filters) {
|
|
41
|
+
return (target) => {
|
|
42
|
+
const existingFilters = Reflect.getOwnMetadata(keys_1.FILTER_KEY, target) || [];
|
|
43
|
+
const updatedFilters = [...existingFilters, ...filters];
|
|
44
|
+
Reflect.defineMetadata(keys_1.FILTER_KEY, updatedFilters, target);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=use-filters-decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-filters-decorator.js","sourceRoot":"","sources":["../../../src/exceptions/decorators/use-filters-decorator.ts"],"names":[],"mappings":";;;AA0DA,gCASC;AAnED,2CAA6C;AAS7C,MAAa,aAAa;IACxB,MAAM,CAAC,WAAW,CAAC,MAAc;QAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,iBAAU,EAAE,MAAM,CAAC,CAAA;QAC3D,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAA;QAC9B,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;IACxB,CAAC;IAED,MAAM,CAAC,KAAK,CA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A/CD,sCA+CC;AAED,SAAgB,UAAU,CAAC,OAAgB;IACzC,OAAO,CAAC,MAAgB,EAAE,EAAE;QAC1B,MAAM,eAAe,GACnB,OAAO,CAAC,cAAc,CAAC,iBAAU,EAAE,MAAM,CAAC,IAAI,EAAE,CAAA;QAElD,MAAM,cAAc,GAAG,CAAC,GAAG,eAAe,EAAE,GAAG,OAAO,CAAC,CAAA;QAEvD,OAAO,CAAC,cAAc,CAAC,iBAAU,EAAE,cAAc,EAAE,MAAM,CAAC,CAAA;IAC5D,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ArgumentsHost } from '../context/arguments-host';
|
|
2
|
+
import { HttpException } from './http-exception';
|
|
3
|
+
export declare abstract class ExceptionFilter {
|
|
4
|
+
abstract catch(exception: HttpException, host: ArgumentsHost): Promise<any>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=exception-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exception-filter.d.ts","sourceRoot":"","sources":["../../src/exceptions/exception-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,8BAAsB,eAAe;IACnC,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC;CAC5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exception-filter.js","sourceRoot":"","sources":["../../src/exceptions/exception-filter.ts"],"names":[],"mappings":";;;AAGA,MAAsB,eAAe;CAEpC;AAFD,0CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA"}
|
package/dist/exceptions/index.js
CHANGED
|
@@ -16,4 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./http-exception"), exports);
|
|
18
18
|
__exportStar(require("./api-exception"), exports);
|
|
19
|
+
__exportStar(require("./exception-filter"), exports);
|
|
20
|
+
__exportStar(require("./base-exception-filter"), exports);
|
|
21
|
+
__exportStar(require("./decorators"), exports);
|
|
19
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,kDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,kDAA+B;AAC/B,qDAAkC;AAClC,0DAAuC;AACvC,+CAA4B"}
|