"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractPackageFile = void 0;
const logger_1 = require("../../../logger");
const schema_1 = require("./schema");
async function extractPackageFile(content, fileName) {
    const res = await schema_1.ComposerExtract.safeParseAsync({ content, fileName });
    if (!res.success) {
        logger_1.logger.debug({ fileName, err: res.error }, 'Composer: extract failed');
        return null;
    }
    return res.data;
}
exports.extractPackageFile = extractPackageFile;
//# sourceMappingURL=extract.js.map