Kind: Class
Source: atloria-monorepo/libs/parser-core/src/orchestrator/parser-orchestrator.ts
ParserOrchestrator - Coordinates multiple parsers for project-wide parsing
Methods
| Method | Signature | Returns |
|---|---|---|
initialize | initialize(parserConfig: ParserConfig) | Promise<void> |
registerParser | registerParser(parser: IParser, priority: undefined) | void |
unregisterParser | unregisterParser(name: string) | boolean |
getParser | getParser(name: string) | `IParser |
getRegisteredParsers | getRegisteredParsers() | string[] |
findParserForFile | findParserForFile(filePath: string) | `string |
findAllParsersForFile | findAllParsersForFile(filePath: string) | string[] |
parseFile | parseFile(filePath: string, content: string) | Promise<ParseResult> |
parseFileWithParser | parseFileWithParser(parserName: string, filePath: string, content: string) | Promise<ParseResult> |
parseFiles | parseFiles(files: string[], onProgress: ProgressCallback) | Promise<ParseResult[]> |
parseProject | parseProject(config: ParseProjectConfig, onProgress: ProgressCallback) | Promise<ProjectParseResult> |
clearCache | clearCache() | void |
getCacheStats | getCacheStats() | { entries: number; size: number } |
destroy | destroy() | Promise<void> |
Where it refuses work
ParserOrchestratorstops the work with an early return whenthis.initialized.ParserOrchestratorstops the work with an early return whenregistration.parser.canParse(filePath).ParserOrchestratorstops the work with an early return whenfirst.entities?.length.ParserOrchestratorstops the work with an early return whennext.entities?.length.ParserOrchestratorstops the work with an early return when!parserName.ParserOrchestratorstops the work with an early return whencached.
When something fails
ParserOrchestratorhandles failure in 4 places: it turns it into a return value in 3, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.
Was this page helpful?