1 | import { HttpServer } from '@nestjs/common';
|
2 | import { RequestMethod } from '@nestjs/common/enums/request-method.enum';
|
3 | import { Controller } from '@nestjs/common/interfaces/controllers/controller.interface';
|
4 | import { Type } from '@nestjs/common/interfaces/type.interface';
|
5 | import { ApplicationConfig } from '../application-config';
|
6 | import { NestContainer } from '../injector/container';
|
7 | import { Injector } from '../injector/injector';
|
8 | import { InstanceWrapper } from '../injector/instance-wrapper';
|
9 | import { Module } from '../injector/module';
|
10 | import { MetadataScanner } from '../metadata-scanner';
|
11 | import { ExceptionsFilter } from './interfaces/exceptions-filter.interface';
|
12 | import { RouterProxy, RouterProxyCallback } from './router-proxy';
|
13 | export interface RoutePathProperties {
|
14 | path: string[];
|
15 | requestMethod: RequestMethod;
|
16 | targetCallback: RouterProxyCallback;
|
17 | methodName: string;
|
18 | }
|
19 | export declare class RouterExplorer {
|
20 | private readonly metadataScanner;
|
21 | private readonly container;
|
22 | private readonly injector?;
|
23 | private readonly routerProxy?;
|
24 | private readonly exceptionsFilter?;
|
25 | private readonly executionContextCreator;
|
26 | private readonly routerMethodFactory;
|
27 | private readonly logger;
|
28 | private readonly exceptionFiltersCache;
|
29 | constructor(metadataScanner: MetadataScanner, container: NestContainer, injector?: Injector, routerProxy?: RouterProxy, exceptionsFilter?: ExceptionsFilter, config?: ApplicationConfig);
|
30 | explore<T extends HttpServer = any>(instanceWrapper: InstanceWrapper, module: string, applicationRef: T, basePath: string, host: string): void;
|
31 | extractRouterPath(metatype: Type<Controller>, prefix?: string): string;
|
32 | validateRoutePath(path: string): string;
|
33 | scanForPaths(instance: Controller, prototype?: any): RoutePathProperties[];
|
34 | exploreMethodMetadata(instance: Controller, instancePrototype: any, methodName: string): RoutePathProperties;
|
35 | applyPathsToRouterProxy<T extends HttpServer>(router: T, routePaths: RoutePathProperties[], instanceWrapper: InstanceWrapper, module: string, basePath: string, host: string): void;
|
36 | private applyCallbackToRouter;
|
37 | private applyHostFilter;
|
38 | private createCallbackProxy;
|
39 | createRequestScopedHandler(instanceWrapper: InstanceWrapper, requestMethod: RequestMethod, module: Module, moduleKey: string, methodName: string): <TRequest, TResponse>(req: TRequest, res: TResponse, next: () => void) => Promise<void>;
|
40 | private getContextId;
|
41 | }
|