import { fileTypeFromFile } from 'file-type';
import { GuessLang } from 'guesslang-js';
export async function checkFileTypeUsingMagicBytes(input) {
    return await fileTypeFromFile(input.input.file.path);
}
export async function guessProgrammingLanguage(source) {
    const guessLang = new GuessLang();
    const result = await guessLang.runModel(source.input.file.content);
    return result.map(({ languageId, confidence }) => ({
        language: languageId,
        confidence,
    }));
}
//# sourceMappingURL=shared.js.map