/** * ModuleMapper - responsible for mapping controllers to router modules and building module hierarchy */ export interface RouterConfig { path: string; module: string; children?: RouterConfig[]; } export interface ControllerInfo { name: string; path?: string; filePath: string; moduleName?: string; } export interface ModuleMapping { routerPrefix: string; moduleName: string; controllers: ControllerInfo[]; children: ModuleMapping[]; } export declare class ModuleMapper { private moduleMappings; private controllerRegistry; /** * Registers a router configuration (from RouterModule.register) */ registerRouter(config: RouterConfig, basePath?: string): void; /** * Registers a controller and maps it to the appropriate router */ registerController(controller: ControllerInfo): void; /** * Gets the full router path for a controller */ getControllerRouterPath(controllerName: string): string; /** * Gets all module mappings */ getModuleMappings(): ModuleMapping[]; /** * Finds a controller by name */ getController(name: string): ControllerInfo | undefined; /** * Gets all controllers for a specific module */ getControllersForModule(moduleName: string): ControllerInfo[]; /** * Gets the total number of registered routers */ getRouterCount(): number; /** * Gets the total number of registered controllers */ getControllerCount(): number; /** * Creates a child module mapping recursively */ private createChildMapping; /** * Finds the appropriate module mapping for a controller * This is a simplified implementation - in real scenario you'd need to parse imports */ private findModuleForController; /** * Finds a module by name recursively */ private findModuleByName; /** * Recursively searches children for a module */ private findInChildren; /** * Finds a module by path segment (e.g., "items" in file path) */ private findModuleByPathSegment; /** * Finds the parent of a child that contains a specific segment */ private findParentByChildSegment; /** * Finds a child module by path segment */ private findChildByPathSegment; /** * Finds a module by controller path (e.g., "consoles" in @Controller('consoles')) */ private findModuleByControllerPath; /** * Recursively finds a child module with a specific path */ private findChildWithPath; } //# sourceMappingURL=module-mapper.d.ts.map