const ERROR_LINE_RE = /(?:error|Error|ERROR)[\s:]+(.+)/;
export const genericParser = {
    name: 'generic',
    priority: 0,
    canParse(_input) {
        return true;
    },
    parse(input) {
        const match = ERROR_LINE_RE.exec(input);
        const firstLine = input.trim().split('\n')[0] ?? input;
        const message = match ? match[1] : firstLine;
        return {
            errorType: 'UnknownError',
            message: message.trim(),
            stackTrace: null,
            frames: [],
            sourceFile: null,
            sourceLine: null,
            language: null,
        };
    },
};
//# sourceMappingURL=generic.js.map