"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetch = void 0;
const regex_1 = require("../../../../util/regex");
async function fetch(http, url) {
    const response = await http.getPlain(url);
    const contentType = response.headers['content-type'];
    if (!contentType?.startsWith('text/')) {
        return null;
    }
    const lines = response.body.split(regex_1.newlineRegex).map((line) => line.trim());
    const versions = lines.map((value) => {
        return { version: value };
    });
    return {
        releases: versions,
    };
}
exports.fetch = fetch;
//# sourceMappingURL=plain.js.map