Refactor routing and proxy components for improved structure and compatibility

- Removed deprecated route utility functions in favor of direct matcher usage.
- Updated imports to reflect new module structure for routing utilities.
- Consolidated route manager functionality into SharedRouteManager for better consistency.
- Eliminated legacy routing methods and interfaces, streamlining the HttpProxy and associated components.
- Enhanced WebSocket and HTTP request handling to utilize the new unified HttpRouter.
- Updated route matching logic to leverage matcher classes for domain, path, and header checks.
- Cleaned up legacy compatibility code across various modules, ensuring a more maintainable codebase.
This commit is contained in:
Juergen Kunz
2025-06-03 16:21:09 +00:00
parent cf70b6ace5
commit 2a75e7c490
21 changed files with 148 additions and 881 deletions

View File

@ -1,19 +1,7 @@
/**
* HTTP routing - Unified HttpRouter with backward compatibility
* HTTP routing
*/
// Export the unified HttpRouter with backward compatibility aliases
export { HttpRouter, ProxyRouter, RouteRouter } from './http-router.js';
export type { RouterResult, LegacyRouterResult, ILogger } from './http-router.js';
// Legacy type exports for backward compatibility
export type { RouterResult as ProxyRouterResult } from './http-router.js';
export type { RouterResult as RouteRouterResult } from './http-router.js';
// Path pattern config is no longer needed as it's part of IRouteConfig.match.path
export interface IPathPatternConfig {
pathPattern?: string;
}
export type { IPathPatternConfig as PathPatternConfig };
export type { IPathPatternConfig as ProxyPathPatternConfig };
export type { IPathPatternConfig as RoutePathPatternConfig };
// Export the unified HttpRouter
export { HttpRouter } from './http-router.js';
export type { RouterResult, ILogger } from './http-router.js';