"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.YamlFetcher = void 0;
const tslib_1 = require("tslib");
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
const fs_1 = require("../../../../util/fs");
class YamlFetcher {
    async fetch(http, registryURL) {
        const response = await http.get(registryURL);
        return js_yaml_1.default.load(response.body);
    }
    async readFile(registryURL) {
        const fileContent = await (0, fs_1.readLocalFile)(registryURL, 'utf8');
        return js_yaml_1.default.load(fileContent);
    }
}
exports.YamlFetcher = YamlFetcher;
//# sourceMappingURL=yaml.js.map