* Factory helper to create a standardized engine log parser entry point. * Encapsulates the common scaffolding pattern used across all engine parsers. * * @param {Object} options - Parser configuration options * @param {string} options.parserName - Name of the engine (e.g., "Claude", "Copilot",
(options)
| 1345 | * @returns {function(): Promise<void>} Main function that runs the log parser |
| 1346 | */ |
| 1347 | function createEngineLogParser(options) { |
| 1348 | const { runLogParser } = require("./log_parser_bootstrap.cjs"); |
| 1349 | const { parserName, parseFunction, supportsDirectories = false } = options; |
| 1350 | |
| 1351 | return async function main() { |
| 1352 | await runLogParser({ |
| 1353 | parseLog: logContent => wrapLogParser(parseFunction, parserName, logContent), |
| 1354 | parserName, |
| 1355 | supportsDirectories, |
| 1356 | }); |
| 1357 | }; |
| 1358 | } |
| 1359 | |
| 1360 | // Export functions and constants |
| 1361 | module.exports = { |
no test coverage detected