@tsclean/core
Version:
Plugin for API Rest Full development, based on Clean Architecture, IoC and Dependency Injection.
34 lines • 2.44 kB
TypeScript
import { RoutePathFactory } from './route-path-factory';
import { RouterProxy } from './router-proxy';
import { RequestMethod } from '../enums';
import { ExceptionsFilterInterface, HttpServer, RouteDefinitionInterface, RoutePathMetadataInterface, Type } from '../contracts';
import { ApplicationConfig, MetadataScanner } from '../app';
import { Injector, InstanceWrapper, Module, ContainerIoC } from '../core';
import { ControllerType } from '../types';
import { GraphInspector } from '../inspector';
export declare class RouterExplorer {
private readonly metadataScanner;
private readonly container;
private readonly graphInspector;
private readonly injector?;
private readonly routerProxy?;
private readonly exceptionsFilter?;
private readonly routePathFactory?;
private readonly executionContextCreator;
private readonly routerMethodFactory;
private readonly logger;
private readonly exceptionFiltersCache;
constructor(metadataScanner: MetadataScanner, container: ContainerIoC, graphInspector: GraphInspector, injector?: Injector, routerProxy?: RouterProxy, exceptionsFilter?: ExceptionsFilterInterface, config?: ApplicationConfig, routePathFactory?: RoutePathFactory);
explore<T extends HttpServer = any>(instanceWrapper: InstanceWrapper, moduleKey: string, applicationRef: T, host: string | RegExp | Array<string | RegExp> | undefined, routePathMetadata: RoutePathMetadataInterface): void;
extractRouterPath(metaType: Type<ControllerType>): string[];
scanForPaths(instance: ControllerType, prototype?: object): RouteDefinitionInterface[];
exploreMethodMetadata(instance: ControllerType, prototype: object, methodName: string): RouteDefinitionInterface;
applyPathsToRouterProxy<T extends HttpServer>(router: T, routeDefinitions: RouteDefinitionInterface[], instanceWrapper: InstanceWrapper, moduleKey: string, routePathMetadata: RoutePathMetadataInterface, host: string | RegExp | Array<string | RegExp> | undefined): void;
private applyCallbackToRouter;
private applyHostFilter;
private createCallbackProxy;
createRequestScopedHandler(instanceWrapper: InstanceWrapper, requestMethod: RequestMethod, moduleRef: Module, moduleKey: string, methodName: string): <T extends Record<any, any>, R>(req: T, res: R, next: () => void) => Promise<void>;
private getContextId;
private copyMetadataToCallback;
}
//# sourceMappingURL=router-explorer.d.ts.map