@pristine-ts/networking 0.0.172 → 0.0.176

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.
Files changed (117) hide show
  1. package/dist/lib/cjs/errors/errors.js +3 -0
  2. package/dist/lib/cjs/errors/errors.js.map +1 -1
  3. package/dist/lib/cjs/errors/request-handling.error.js +20 -0
  4. package/dist/lib/cjs/errors/request-handling.error.js.map +1 -0
  5. package/dist/lib/cjs/errors/request-interception-execution.error.js +21 -0
  6. package/dist/lib/cjs/errors/request-interception-execution.error.js.map +1 -0
  7. package/dist/lib/cjs/errors/response-interception-execution.error.js +23 -0
  8. package/dist/lib/cjs/errors/response-interception-execution.error.js.map +1 -0
  9. package/dist/lib/cjs/{enrichers/enrichers.js → handlers/handlers.js} +2 -2
  10. package/dist/lib/cjs/handlers/handlers.js.map +1 -0
  11. package/dist/lib/cjs/handlers/request.event-handler.js +71 -0
  12. package/dist/lib/cjs/handlers/request.event-handler.js.map +1 -0
  13. package/dist/lib/cjs/interceptors/interceptors.js +15 -0
  14. package/dist/lib/cjs/interceptors/interceptors.js.map +1 -0
  15. package/dist/lib/cjs/interceptors/request-body-converter.interceptor.js +89 -0
  16. package/dist/lib/cjs/interceptors/request-body-converter.interceptor.js.map +1 -0
  17. package/dist/lib/cjs/{enrichers/router-response.enricher.js → interceptors/response-headers.interceptor.js} +14 -12
  18. package/dist/lib/cjs/interceptors/response-headers.interceptor.js.map +1 -0
  19. package/dist/lib/cjs/interfaces/interfaces.js +1 -2
  20. package/dist/lib/cjs/interfaces/interfaces.js.map +1 -1
  21. package/dist/lib/cjs/interfaces/{router-request-enricher.interface.js → request-interceptor.interface.js} +1 -1
  22. package/dist/lib/cjs/interfaces/request-interceptor.interface.js.map +1 -0
  23. package/dist/lib/cjs/mappers/mappers.js +14 -0
  24. package/dist/lib/cjs/mappers/mappers.js.map +1 -0
  25. package/dist/lib/cjs/mappers/request.mapper.js +37 -0
  26. package/dist/lib/cjs/mappers/request.mapper.js.map +1 -0
  27. package/dist/lib/cjs/models/models.js +0 -2
  28. package/dist/lib/cjs/models/models.js.map +1 -1
  29. package/dist/lib/cjs/networking.module.js +14 -2
  30. package/dist/lib/cjs/networking.module.js.map +1 -1
  31. package/dist/lib/cjs/router.js +167 -49
  32. package/dist/lib/cjs/router.js.map +1 -1
  33. package/dist/lib/esm/errors/errors.js +3 -0
  34. package/dist/lib/esm/errors/errors.js.map +1 -1
  35. package/dist/lib/esm/errors/request-handling.error.js +16 -0
  36. package/dist/lib/esm/errors/request-handling.error.js.map +1 -0
  37. package/dist/lib/esm/errors/request-interception-execution.error.js +17 -0
  38. package/dist/lib/esm/errors/request-interception-execution.error.js.map +1 -0
  39. package/dist/lib/esm/errors/response-interception-execution.error.js +19 -0
  40. package/dist/lib/esm/errors/response-interception-execution.error.js.map +1 -0
  41. package/dist/lib/esm/handlers/handlers.js +2 -0
  42. package/dist/lib/esm/handlers/handlers.js.map +1 -0
  43. package/dist/lib/esm/handlers/request.event-handler.js +68 -0
  44. package/dist/lib/esm/handlers/request.event-handler.js.map +1 -0
  45. package/dist/lib/esm/interceptors/interceptors.js +3 -0
  46. package/dist/lib/esm/interceptors/interceptors.js.map +1 -0
  47. package/dist/lib/esm/interceptors/request-body-converter.interceptor.js +86 -0
  48. package/dist/lib/esm/interceptors/request-body-converter.interceptor.js.map +1 -0
  49. package/dist/lib/esm/{enrichers/router-response.enricher.js → interceptors/response-headers.interceptor.js} +13 -11
  50. package/dist/lib/esm/interceptors/response-headers.interceptor.js.map +1 -0
  51. package/dist/lib/esm/interfaces/interfaces.js +1 -2
  52. package/dist/lib/esm/interfaces/interfaces.js.map +1 -1
  53. package/dist/lib/esm/interfaces/request-interceptor.interface.js +2 -0
  54. package/dist/lib/esm/interfaces/request-interceptor.interface.js.map +1 -0
  55. package/dist/lib/esm/mappers/mappers.js +2 -0
  56. package/dist/lib/esm/mappers/mappers.js.map +1 -0
  57. package/dist/lib/esm/mappers/request.mapper.js +34 -0
  58. package/dist/lib/esm/mappers/request.mapper.js.map +1 -0
  59. package/dist/lib/esm/models/models.js +0 -2
  60. package/dist/lib/esm/models/models.js.map +1 -1
  61. package/dist/lib/esm/networking.module.js +14 -2
  62. package/dist/lib/esm/networking.module.js.map +1 -1
  63. package/dist/lib/esm/router.js +166 -48
  64. package/dist/lib/esm/router.js.map +1 -1
  65. package/dist/types/errors/errors.d.ts +3 -0
  66. package/dist/types/errors/request-handling.error.d.ts +7 -0
  67. package/dist/types/errors/request-interception-execution.error.d.ts +7 -0
  68. package/dist/types/errors/response-interception-execution.error.d.ts +7 -0
  69. package/dist/types/handlers/handlers.d.ts +1 -0
  70. package/dist/types/handlers/request.event-handler.d.ts +14 -0
  71. package/dist/types/interceptors/interceptors.d.ts +2 -0
  72. package/dist/types/interceptors/request-body-converter.interceptor.d.ts +9 -0
  73. package/dist/types/interceptors/response-headers.interceptor.d.ts +10 -0
  74. package/dist/types/interfaces/controller-method-parameter-decorator-resolver.interface.d.ts +1 -1
  75. package/dist/types/interfaces/interfaces.d.ts +1 -2
  76. package/dist/types/interfaces/request-interceptor.interface.d.ts +39 -0
  77. package/dist/types/interfaces/router.interface.d.ts +6 -3
  78. package/dist/types/mappers/mappers.d.ts +1 -0
  79. package/dist/types/mappers/request.mapper.d.ts +8 -0
  80. package/dist/types/models/models.d.ts +0 -2
  81. package/dist/types/networking.module.d.ts +3 -1
  82. package/dist/types/resolvers/body-parameter-decorator.resolver.d.ts +1 -1
  83. package/dist/types/resolvers/controller-method-parameter-decorator.resolver.d.ts +1 -1
  84. package/dist/types/resolvers/headers-parameter-decorator.resolver.d.ts +1 -1
  85. package/dist/types/resolvers/identity-parameter-decorator.resolver.d.ts +1 -1
  86. package/dist/types/resolvers/query-parameter-decorator.resolver.d.ts +1 -1
  87. package/dist/types/resolvers/query-parameters-decorator.resolver.d.ts +1 -1
  88. package/dist/types/resolvers/request-parameter-decorator.resolver.d.ts +1 -1
  89. package/dist/types/resolvers/route-parameter-decorator.resolver.d.ts +1 -1
  90. package/dist/types/router.d.ts +17 -7
  91. package/package.json +7 -5
  92. package/dist/lib/cjs/enrichers/enrichers.js.map +0 -1
  93. package/dist/lib/cjs/enrichers/router-response.enricher.js.map +0 -1
  94. package/dist/lib/cjs/interfaces/router-request-enricher.interface.js.map +0 -1
  95. package/dist/lib/cjs/interfaces/router-response-enricher.interface.js +0 -3
  96. package/dist/lib/cjs/interfaces/router-response-enricher.interface.js.map +0 -1
  97. package/dist/lib/cjs/models/request.js +0 -50
  98. package/dist/lib/cjs/models/request.js.map +0 -1
  99. package/dist/lib/cjs/models/response.js +0 -16
  100. package/dist/lib/cjs/models/response.js.map +0 -1
  101. package/dist/lib/esm/enrichers/enrichers.js +0 -2
  102. package/dist/lib/esm/enrichers/enrichers.js.map +0 -1
  103. package/dist/lib/esm/enrichers/router-response.enricher.js.map +0 -1
  104. package/dist/lib/esm/interfaces/router-request-enricher.interface.js +0 -2
  105. package/dist/lib/esm/interfaces/router-request-enricher.interface.js.map +0 -1
  106. package/dist/lib/esm/interfaces/router-response-enricher.interface.js +0 -2
  107. package/dist/lib/esm/interfaces/router-response-enricher.interface.js.map +0 -1
  108. package/dist/lib/esm/models/request.js +0 -46
  109. package/dist/lib/esm/models/request.js.map +0 -1
  110. package/dist/lib/esm/models/response.js +0 -12
  111. package/dist/lib/esm/models/response.js.map +0 -1
  112. package/dist/types/enrichers/enrichers.d.ts +0 -1
  113. package/dist/types/enrichers/router-response.enricher.d.ts +0 -11
  114. package/dist/types/interfaces/router-request-enricher.interface.d.ts +0 -18
  115. package/dist/types/interfaces/router-response-enricher.interface.d.ts +0 -20
  116. package/dist/types/models/request.d.ts +0 -45
  117. package/dist/types/models/response.d.ts +0 -24
@@ -1 +1 @@
1
- {"version":3,"file":"router.js","sourceRoot":"","sources":["../../../src/router.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAsB,MAAM,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAEhE,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C,cAAc,KAAK,WAAW,EAAE;wBACnD,oGAAoG;wBACpG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,sEAAsE,EAAE,EAAC,IAAI,EAAE,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,EAAC,CAAC,CAAC;wBAChJ,SAAS;qBACZ;oBAED,IAAI;wBACA,mBAAmB,GAAG,MAAA,MAAM,CAAA,MAAA,MAAC,WAA2C,EAAC,cAAc,mDAAG,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA,mCAAI,mBAAmB,CAAC;qBACrK;oBAAC,OAAO,CAAC,EAAE;wBACR,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,8GAA8G,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,EAAE,EAAC,CAAC,EAAC,EAAE,uBAAuB,CAAC,CAAC;wBAC1M,MAAM,CAAC,CAAC;qBACX;iBACJ;aACJ;YAED,mBAAmB,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;YAElH,OAAO,mBAAmB,CAAC;;KAC9B;CACJ,CAAA;AAzZY,MAAM;IAFlB,GAAG,CAAC,iBAAiB,CAAC;IACtB,SAAS,EAAE;IAea,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAE7B,WAAA,MAAM,CAAC,4BAA4B,CAAC,CAAA;IACpC,WAAA,MAAM,CAAC,gCAAgC,CAAC,CAAA;6CAFoB,0CAA0C;GAflH,MAAM,CAyZlB;SAzZY,MAAM"}
@@ -6,3 +6,6 @@ export * from "./method-router-adding.error";
6
6
  export * from "./not-found.http-error";
7
7
  export * from "./path-router-adding.error";
8
8
  export * from "./path-router-instantiation.error";
9
+ export * from "./request-handling.error";
10
+ export * from "./request-interception-execution.error";
11
+ export * from "./response-interception-execution.error";
@@ -0,0 +1,7 @@
1
+ import { LoggableError, Request } from "@pristine-ts/common";
2
+ /**
3
+ * This Error is thrown when there's an error that happens while handling a request.
4
+ */
5
+ export declare class RequestHandlingError extends LoggableError {
6
+ constructor(message: string, request: Request);
7
+ }
@@ -0,0 +1,7 @@
1
+ import { LoggableError, Request } from "@pristine-ts/common";
2
+ /**
3
+ * This Error is thrown when there's an error in the execution of a request interceptor.
4
+ */
5
+ export declare class RequestInterceptionExecutionError extends LoggableError {
6
+ constructor(message: string, request: Request, error?: Error);
7
+ }
@@ -0,0 +1,7 @@
1
+ import { LoggableError, Request, Response } from "@pristine-ts/common";
2
+ /**
3
+ * This Error is thrown when an error happens in the execution of a response interceptor.
4
+ */
5
+ export declare class ResponseInterceptionExecutionError extends LoggableError {
6
+ constructor(message: string, request: Request, response: Response, interceptor: any, previousError?: Error);
7
+ }
@@ -0,0 +1 @@
1
+ export * from "./request.event-handler";
@@ -0,0 +1,14 @@
1
+ import { Event, EventHandlerInterface, EventResponse } from "@pristine-ts/core";
2
+ import { DependencyContainer } from "tsyringe";
3
+ import { RouterInterface } from "../interfaces/router.interface";
4
+ import { Request, Response } from "@pristine-ts/common";
5
+ import { TracingManagerInterface } from "@pristine-ts/telemetry";
6
+ export declare class RequestEventHandler implements EventHandlerInterface<Request, Response> {
7
+ private readonly router;
8
+ private readonly tracingManager;
9
+ private readonly dependencyContainer;
10
+ priority: number;
11
+ constructor(router: RouterInterface, tracingManager: TracingManagerInterface, dependencyContainer: DependencyContainer);
12
+ supports<T>(event: Event<T>): boolean;
13
+ handle(event: Event<Request>): Promise<EventResponse<Request, Response>>;
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./request-body-converter.interceptor";
2
+ export * from "./response-headers.interceptor";
@@ -0,0 +1,9 @@
1
+ import { LogHandlerInterface } from "@pristine-ts/logging";
2
+ import { Request } from "@pristine-ts/common";
3
+ import { RequestInterceptorInterface } from "../interfaces/request-interceptor.interface";
4
+ export declare class RequestBodyConverterInterceptor implements RequestInterceptorInterface {
5
+ private readonly isActive;
6
+ private readonly logHandler;
7
+ constructor(isActive: boolean, logHandler: LogHandlerInterface);
8
+ interceptRequest(request: Request): Promise<Request>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { Request, Response } from "@pristine-ts/common";
2
+ import { MethodRouterNode } from "../nodes/method-router.node";
3
+ import { RequestInterceptorInterface } from "../interfaces/request-interceptor.interface";
4
+ /**
5
+ * The Response Interceptor intercepts the response of the router by adding the response headers specified by the response header decorator.
6
+ * It is tagged as a RequestInterceptor so it can be automatically injected with the all the other RequestInterceptor.
7
+ */
8
+ export declare class ResponseHeadersInterceptor implements RequestInterceptorInterface {
9
+ interceptResponse(response: Response, request: Request, methodNode?: MethodRouterNode): Promise<Response>;
10
+ }
@@ -1,4 +1,4 @@
1
- import { Request } from "../models/request";
1
+ import { Request } from "@pristine-ts/common";
2
2
  import { IdentityInterface } from "@pristine-ts/common";
3
3
  import { ParameterDecoratorInterface } from "./parameter-decorator.interface";
4
4
  /**
@@ -5,9 +5,8 @@ export * from "./identity-parameteter-decorator.interface";
5
5
  export * from "./parameter-decorator.interface";
6
6
  export * from "./query-parameter-decorator.interface";
7
7
  export * from "./query-parameters-decorator.interface";
8
+ export * from "./request-interceptor.interface";
8
9
  export * from "./request-parameter-decorator.interface";
9
10
  export * from "./route-method-decorator.interface";
10
11
  export * from "./route-parameter-decorator.interface";
11
12
  export * from "./router.interface";
12
- export * from "./router-request-enricher.interface";
13
- export * from "./router-response-enricher.interface";
@@ -0,0 +1,39 @@
1
+ import { Request, Response } from "@pristine-ts/common";
2
+ import { MethodRouterNode } from "../nodes/method-router.node";
3
+ export interface RequestInterceptorInterface {
4
+ /**
5
+ * This method receives a request object and must return a transformed request object. If you don't want to
6
+ * manipulate the request object (when logging for example), juste resolve a promise with the request passed to this method.
7
+ *
8
+ * If you force to never resolve the promise, the execution will stall. Be careful.
9
+ *
10
+ * @param request
11
+ * @param methodeNode
12
+ */
13
+ interceptRequest?(request: Request, methodeNode: MethodRouterNode): Promise<Request>;
14
+ /**
15
+ * This method receives a response object and the associated request and must return a transformed response object.
16
+ * If you don't want to manipulate the response object (when logging for example), juste resolve a promise with the response passed to this method.
17
+ *
18
+ * If you force to never resolve the promise, the execution will stall. Be careful.
19
+ *
20
+ * @param response
21
+ * @param request
22
+ * @param methodNode
23
+ */
24
+ interceptResponse?(response: Response, request: Request, methodNode?: MethodRouterNode): Promise<Response>;
25
+ /**
26
+ * Receives an error with the associated request and maybe a response (if you have multiple error response interceptors
27
+ * and they are chained, response will not be empty as it will contain the returned response of the previous error response interceptor).
28
+ *
29
+ * This method must transform the error into a Response object.
30
+ *
31
+ * If you force to never resolve the promise, the execution will stall. Be careful.
32
+ *
33
+ * @param error
34
+ * @param request
35
+ * @param response
36
+ * @param methodNode
37
+ */
38
+ interceptError?(error: Error, response: Response, request: Request, methodNode?: MethodRouterNode): Promise<Response>;
39
+ }
@@ -1,7 +1,6 @@
1
- import { HttpMethod } from "@pristine-ts/common";
1
+ import { HttpMethod, Response } from "@pristine-ts/common";
2
2
  import { DependencyContainer } from "tsyringe";
3
- import { Response } from "../models/response";
4
- import { Request } from "../models/request";
3
+ import { Request } from "@pristine-ts/common";
5
4
  import { Route } from "../models/route";
6
5
  /**
7
6
  * This interface defines the methods that the router must implement.
@@ -24,4 +23,8 @@ export interface RouterInterface {
24
23
  * @param container
25
24
  */
26
25
  execute(request: Request, container: DependencyContainer): Promise<Response>;
26
+ /**
27
+ * This method is used to setup and initialize the router.
28
+ */
29
+ setup(): void;
27
30
  }
@@ -0,0 +1 @@
1
+ export * from "./request.mapper";
@@ -0,0 +1,8 @@
1
+ import { Request, Response } from "@pristine-ts/common";
2
+ import { EventMapperInterface, EventResponse, EventsExecutionOptionsInterface, ExecutionContextInterface } from "@pristine-ts/core";
3
+ export declare class RequestMapper implements EventMapperInterface<Request, Response> {
4
+ supportsMapping(rawEvent: any, executionContext: ExecutionContextInterface<any>): boolean;
5
+ map(rawEvent: any, executionContext: ExecutionContextInterface<any>): EventsExecutionOptionsInterface<Request>;
6
+ supportsReverseMapping(eventResponse: EventResponse<Request, Response>, response: any, executionContext: ExecutionContextInterface<any>): boolean;
7
+ reverseMap(eventResponse: EventResponse<Request, Response>, response: any, executionContext: ExecutionContextInterface<any>): any;
8
+ }
@@ -1,3 +1 @@
1
- export * from "./request";
2
- export * from "./response";
3
1
  export * from "./route";
@@ -1,8 +1,10 @@
1
1
  import { ModuleInterface } from "@pristine-ts/common";
2
2
  export * from "./decorators/decorators";
3
- export * from "./enrichers/enrichers";
4
3
  export * from "./errors/errors";
4
+ export * from "./handlers/handlers";
5
+ export * from "./interceptors/interceptors";
5
6
  export * from "./interfaces/interfaces";
7
+ export * from "./mappers/mappers";
6
8
  export * from "./models/models";
7
9
  export * from "./nodes/nodes";
8
10
  export * from "./resolvers/resolvers";
@@ -1,6 +1,6 @@
1
1
  import "reflect-metadata";
2
2
  import { ControllerMethodParameterDecoratorResolverInterface } from "../interfaces/controller-method-parameter-decorator-resolver.interface";
3
- import { Request } from "../models/request";
3
+ import { Request } from "@pristine-ts/common";
4
4
  import { IdentityInterface } from "@pristine-ts/common";
5
5
  import { ParameterDecoratorInterface } from "../interfaces/parameter-decorator.interface";
6
6
  import { BodyParameterDecoratorInterface } from "../interfaces/body-parameter-decorator.interface";
@@ -1,6 +1,6 @@
1
1
  import { IdentityInterface } from "@pristine-ts/common";
2
2
  import { ControllerMethodParameterDecoratorResolverInterface } from "../interfaces/controller-method-parameter-decorator-resolver.interface";
3
- import { Request } from "../models/request";
3
+ import { Request } from "@pristine-ts/common";
4
4
  import { ParameterDecoratorInterface } from "../interfaces/parameter-decorator.interface";
5
5
  /**
6
6
  * This service calls the resolvers to resolve the value to be injected in the parameter of a method.
@@ -1,6 +1,6 @@
1
1
  import "reflect-metadata";
2
2
  import { ControllerMethodParameterDecoratorResolverInterface } from "../interfaces/controller-method-parameter-decorator-resolver.interface";
3
- import { Request } from "../models/request";
3
+ import { Request } from "@pristine-ts/common";
4
4
  import { IdentityInterface } from "@pristine-ts/common";
5
5
  import { ParameterDecoratorInterface } from "../interfaces/parameter-decorator.interface";
6
6
  import { HeadersParameterDecoratorInterface } from "../interfaces/headers-parameter-decorator.interface";
@@ -1,6 +1,6 @@
1
1
  import "reflect-metadata";
2
2
  import { ControllerMethodParameterDecoratorResolverInterface } from "../interfaces/controller-method-parameter-decorator-resolver.interface";
3
- import { Request } from "../models/request";
3
+ import { Request } from "@pristine-ts/common";
4
4
  import { IdentityInterface } from "@pristine-ts/common";
5
5
  import { ParameterDecoratorInterface } from "../interfaces/parameter-decorator.interface";
6
6
  import { IdentityParameterDecoratorInterface } from "../interfaces/identity-parameteter-decorator.interface";
@@ -1,5 +1,5 @@
1
1
  import { ControllerMethodParameterDecoratorResolverInterface } from "../interfaces/controller-method-parameter-decorator-resolver.interface";
2
- import { Request } from "../models/request";
2
+ import { Request } from "@pristine-ts/common";
3
3
  import { IdentityInterface } from "@pristine-ts/common";
4
4
  import { ParameterDecoratorInterface } from "../interfaces/parameter-decorator.interface";
5
5
  import { QueryParameterDecoratorInterface } from "../interfaces/query-parameter-decorator.interface";
@@ -1,5 +1,5 @@
1
1
  import { ControllerMethodParameterDecoratorResolverInterface } from "../interfaces/controller-method-parameter-decorator-resolver.interface";
2
- import { Request } from "../models/request";
2
+ import { Request } from "@pristine-ts/common";
3
3
  import { IdentityInterface } from "@pristine-ts/common";
4
4
  import { ParameterDecoratorInterface } from "../interfaces/parameter-decorator.interface";
5
5
  import { QueryParametersDecoratorInterface } from "../interfaces/query-parameters-decorator.interface";
@@ -1,6 +1,6 @@
1
1
  import "reflect-metadata";
2
2
  import { ControllerMethodParameterDecoratorResolverInterface } from "../interfaces/controller-method-parameter-decorator-resolver.interface";
3
- import { Request } from "../models/request";
3
+ import { Request } from "@pristine-ts/common";
4
4
  import { IdentityInterface } from "@pristine-ts/common";
5
5
  import { RequestParameterDecoratorInterface } from "../interfaces/request-parameter-decorator.interface";
6
6
  import { ParameterDecoratorInterface } from "../interfaces/parameter-decorator.interface";
@@ -1,5 +1,5 @@
1
1
  import { ControllerMethodParameterDecoratorResolverInterface } from "../interfaces/controller-method-parameter-decorator-resolver.interface";
2
- import { Request } from "../models/request";
2
+ import { Request } from "@pristine-ts/common";
3
3
  import { IdentityInterface } from "@pristine-ts/common";
4
4
  import { RouteParameterDecoratorInterface } from "../interfaces/route-parameter-decorator.interface";
5
5
  import { ParameterDecoratorInterface } from "../interfaces/parameter-decorator.interface";
@@ -1,10 +1,8 @@
1
1
  import { DependencyContainer } from "tsyringe";
2
- import { Request } from "./models/request";
3
- import { Response } from "./models/response";
4
2
  import { RouterInterface } from "./interfaces/router.interface";
5
3
  import { Route } from "./models/route";
6
4
  import { ControllerMethodParameterDecoratorResolver } from "./resolvers/controller-method-parameter-decorator.resolver";
7
- import { HttpMethod } from "@pristine-ts/common";
5
+ import { HttpMethod, Request, Response } from "@pristine-ts/common";
8
6
  import { AuthenticationManagerInterface, AuthorizerManagerInterface } from "@pristine-ts/security";
9
7
  import { LogHandlerInterface } from "@pristine-ts/logging";
10
8
  /**
@@ -17,6 +15,7 @@ export declare class Router implements RouterInterface {
17
15
  private readonly authorizerManager;
18
16
  private readonly authenticationManager;
19
17
  private root;
18
+ private setupCompleted;
20
19
  /**
21
20
  * The router service is the service that creates the routing tree from the controllers.
22
21
  * It also executes a request properly by routing it to the intended controller and returns the response.
@@ -34,6 +33,7 @@ export declare class Router implements RouterInterface {
34
33
  * @param route
35
34
  */
36
35
  register(path: string, method: HttpMethod | string, route: Route): void;
36
+ setup(): void;
37
37
  /**
38
38
  * This method receives a Request object, identifies the "path" its trying to hit, navigates the internally
39
39
  * maintained Route Tree, identifies the method in the controller that represents this "path", and calls the
@@ -44,7 +44,16 @@ export declare class Router implements RouterInterface {
44
44
  */
45
45
  execute(request: Request, container: DependencyContainer): Promise<Response>;
46
46
  /**
47
- * This method executes all the Router response enrichers and returns the response updated by the enrichers.
47
+ * This method executes all the Request Interceptors and returns the request updated by the interceptors.
48
+ *
49
+ * @param request
50
+ * @param container
51
+ * @param methodNode
52
+ * @private
53
+ */
54
+ private executeRequestInterceptors;
55
+ /**
56
+ * This method executes all the Request Interceptors and returns the response updated by the interceptors.
48
57
  *
49
58
  * @param response
50
59
  * @param request
@@ -52,14 +61,15 @@ export declare class Router implements RouterInterface {
52
61
  * @param methodNode
53
62
  * @private
54
63
  */
55
- private executeResponseEnrichers;
64
+ private executeResponseInterceptors;
56
65
  /**
57
- * This method executes all the Router request enrichers and returns the request updated by the enrichers.
66
+ * This method executes all the Request Interceptors and returns the response updated by the error interceptors.
58
67
  *
68
+ * @param error
59
69
  * @param request
60
70
  * @param container
61
71
  * @param methodNode
62
72
  * @private
63
73
  */
64
- private executeRequestEnrichers;
74
+ private executeErrorResponseInterceptors;
65
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pristine-ts/networking",
3
- "version": "0.0.172",
3
+ "version": "0.0.176",
4
4
  "description": "",
5
5
  "module": "dist/lib/esm/networking.module.js",
6
6
  "main": "dist/lib/cjs/networking.module.js",
@@ -19,9 +19,11 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@pristine-ts/common": "^0.0.172",
23
- "@pristine-ts/security": "^0.0.172",
24
- "@pristine-ts/telemetry": "^0.0.172",
22
+ "@pristine-ts/common": "^0.0.176",
23
+ "@pristine-ts/core": "^0.0.176",
24
+ "@pristine-ts/security": "^0.0.176",
25
+ "@pristine-ts/telemetry": "^0.0.176",
26
+ "lodash": "^4.17.21",
25
27
  "url-parse": "^1.4.7"
26
28
  },
27
29
  "jest": {
@@ -58,5 +60,5 @@
58
60
  "src/*.{js,ts}"
59
61
  ]
60
62
  },
61
- "gitHead": "c7475ccd142196d0c2871a48944fddcc0bd6b21a"
63
+ "gitHead": "546be5013265d8a70d6a68d61f19b96fd3c1c423"
62
64
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"enrichers.js","sourceRoot":"","sources":["../../../../src/enrichers/enrichers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA2C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"router-response.enricher.js","sourceRoot":"","sources":["../../../../src/enrichers/router-response.enricher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,gDAAgF;AAChF,4EAAqE;AAIrE;;;GAGG;AAGH,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IACzB,cAAc,CAAC,QAAkB,EAAE,OAAgB,EAAE,UAA4B;;YACnF,IAAG,UAAU,CAAC,KAAK,CAAC,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAC;gBACtF,QAAQ,CAAC,OAAO,mCAAO,QAAQ,CAAC,OAAO,GAAK,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;aACxF;YACD,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ,CAAA;AAPY,sBAAsB;IAFlC,YAAG,CAAC,iCAAwB,CAAC,sBAAsB,CAAC;IACpD,qBAAY,CAAC,mDAAuB,CAAC;GACzB,sBAAsB,CAOlC;AAPY,wDAAsB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"router-request-enricher.interface.js","sourceRoot":"","sources":["../../../../src/interfaces/router-request-enricher.interface.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=router-response-enricher.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"router-response-enricher.interface.js","sourceRoot":"","sources":["../../../../src/interfaces/router-response-enricher.interface.ts"],"names":[],"mappings":""}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Request = void 0;
4
- /**
5
- * This Request object represents the class used internally that represents a Request.
6
- */
7
- class Request {
8
- constructor(requestInterface) {
9
- var _a, _b;
10
- /**
11
- * The headers of the request.
12
- */
13
- this.headers = {};
14
- /**
15
- * The body of the request.
16
- */
17
- this.body = {};
18
- this.httpMethod = requestInterface.httpMethod;
19
- this.url = requestInterface.url;
20
- this.headers = (_a = requestInterface.headers) !== null && _a !== void 0 ? _a : {};
21
- this.body = (_b = requestInterface.body) !== null && _b !== void 0 ? _b : {};
22
- }
23
- /**
24
- * This method sets a header parameter in the Request.
25
- *
26
- * @param name The name of the header.
27
- * @param value The value of the header.
28
- */
29
- setHeader(name, value) {
30
- this.headers[name] = value;
31
- }
32
- /**
33
- * This method returns whether or not the header exists in the Request.
34
- *
35
- * @param name The name of the header.
36
- */
37
- hasHeader(name) {
38
- return this.headers.hasOwnProperty(name);
39
- }
40
- /**
41
- * This method returns the header corresponding to the name or undefined if it doesn't exist.
42
- *
43
- * @param name The name of the header.
44
- */
45
- getHeader(name) {
46
- return this.headers[name];
47
- }
48
- }
49
- exports.Request = Request;
50
- //# sourceMappingURL=request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/models/request.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAa,OAAO;IAqBhB,YAAY,gBAAkC;;QAV9C;;WAEG;QACH,YAAO,GAA8B,EAAE,CAAC;QAExC;;WAEG;QACH,SAAI,GAAQ,EAAE,CAAC;QAGX,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAC,UAAU,CAAC;QAC9C,IAAI,CAAC,GAAG,GAAG,gBAAgB,CAAC,GAAG,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,MAAA,gBAAgB,CAAC,OAAO,mCAAI,EAAE,CAAC;QAC9C,IAAI,CAAC,IAAI,GAAG,MAAA,gBAAgB,CAAC,IAAI,mCAAI,EAAE,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,IAAY,EAAE,KAAa;QACjC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,IAAY;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,IAAY;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACJ;AAvDD,0BAuDC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Response = void 0;
4
- /**
5
- * This Response object represents the class used internally that represents a Response.
6
- */
7
- class Response {
8
- constructor() {
9
- /**
10
- * The status code of the response. By default we return a 200.
11
- */
12
- this.status = 200;
13
- }
14
- }
15
- exports.Response = Response;
16
- //# sourceMappingURL=response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/models/response.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,QAAQ;IAArB;QACI;;WAEG;QACH,WAAM,GAAW,GAAG,CAAC;IAgBzB,CAAC;CAAA;AApBD,4BAoBC"}
@@ -1,2 +0,0 @@
1
- export * from "./router-response.enricher";
2
- //# sourceMappingURL=enrichers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enrichers.js","sourceRoot":"","sources":["../../../../src/enrichers/enrichers.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"router-response.enricher.js","sourceRoot":"","sources":["../../../../src/enrichers/router-response.enricher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAIrE;;;GAGG;AAGH,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IACzB,cAAc,CAAC,QAAkB,EAAE,OAAgB,EAAE,UAA4B;;YACnF,IAAG,UAAU,CAAC,KAAK,CAAC,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAC;gBACtF,QAAQ,CAAC,OAAO,mCAAO,QAAQ,CAAC,OAAO,GAAK,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;aACxF;YACD,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ,CAAA;AAPY,sBAAsB;IAFlC,GAAG,CAAC,wBAAwB,CAAC,sBAAsB,CAAC;IACpD,YAAY,CAAC,uBAAuB,CAAC;GACzB,sBAAsB,CAOlC;SAPY,sBAAsB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=router-request-enricher.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"router-request-enricher.interface.js","sourceRoot":"","sources":["../../../../src/interfaces/router-request-enricher.interface.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=router-response-enricher.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"router-response-enricher.interface.js","sourceRoot":"","sources":["../../../../src/interfaces/router-response-enricher.interface.ts"],"names":[],"mappings":""}
@@ -1,46 +0,0 @@
1
- /**
2
- * This Request object represents the class used internally that represents a Request.
3
- */
4
- export class Request {
5
- constructor(requestInterface) {
6
- var _a, _b;
7
- /**
8
- * The headers of the request.
9
- */
10
- this.headers = {};
11
- /**
12
- * The body of the request.
13
- */
14
- this.body = {};
15
- this.httpMethod = requestInterface.httpMethod;
16
- this.url = requestInterface.url;
17
- this.headers = (_a = requestInterface.headers) !== null && _a !== void 0 ? _a : {};
18
- this.body = (_b = requestInterface.body) !== null && _b !== void 0 ? _b : {};
19
- }
20
- /**
21
- * This method sets a header parameter in the Request.
22
- *
23
- * @param name The name of the header.
24
- * @param value The value of the header.
25
- */
26
- setHeader(name, value) {
27
- this.headers[name] = value;
28
- }
29
- /**
30
- * This method returns whether or not the header exists in the Request.
31
- *
32
- * @param name The name of the header.
33
- */
34
- hasHeader(name) {
35
- return this.headers.hasOwnProperty(name);
36
- }
37
- /**
38
- * This method returns the header corresponding to the name or undefined if it doesn't exist.
39
- *
40
- * @param name The name of the header.
41
- */
42
- getHeader(name) {
43
- return this.headers[name];
44
- }
45
- }
46
- //# sourceMappingURL=request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/models/request.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,OAAO,OAAO;IAqBhB,YAAY,gBAAkC;;QAV9C;;WAEG;QACH,YAAO,GAA8B,EAAE,CAAC;QAExC;;WAEG;QACH,SAAI,GAAQ,EAAE,CAAC;QAGX,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAC,UAAU,CAAC;QAC9C,IAAI,CAAC,GAAG,GAAG,gBAAgB,CAAC,GAAG,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,MAAA,gBAAgB,CAAC,OAAO,mCAAI,EAAE,CAAC;QAC9C,IAAI,CAAC,IAAI,GAAG,MAAA,gBAAgB,CAAC,IAAI,mCAAI,EAAE,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,IAAY,EAAE,KAAa;QACjC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,IAAY;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,IAAY;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACJ"}
@@ -1,12 +0,0 @@
1
- /**
2
- * This Response object represents the class used internally that represents a Response.
3
- */
4
- export class Response {
5
- constructor() {
6
- /**
7
- * The status code of the response. By default we return a 200.
8
- */
9
- this.status = 200;
10
- }
11
- }
12
- //# sourceMappingURL=response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/models/response.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,QAAQ;IAArB;QACI;;WAEG;QACH,WAAM,GAAW,GAAG,CAAC;IAgBzB,CAAC;CAAA"}
@@ -1 +0,0 @@
1
- export * from "./router-response.enricher";
@@ -1,11 +0,0 @@
1
- import { Response } from "../models/response";
2
- import { Request } from "../models/request";
3
- import { RouterResponseEnricherInterface } from "../interfaces/router-response-enricher.interface";
4
- import { MethodRouterNode } from "../nodes/method-router.node";
5
- /**
6
- * The RouterResponseEnricher enriches the response of the router by adding the response headers specified by the response header decorator.
7
- * It is tagged as an RouterResponseEnricher so it can be automatically injected with the all the other RouterResponseEnrichers.
8
- */
9
- export declare class RouterResponseEnricher implements RouterResponseEnricherInterface {
10
- enrichResponse(response: Response, request: Request, methodNode: MethodRouterNode): Promise<Response>;
11
- }