"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KubernetesApiDatasource = void 0;
const tslib_1 = require("tslib");
const json5_1 = tslib_1.__importDefault(require("json5"));
const data_files_generated_1 = tslib_1.__importDefault(require("../../../data-files.generated"));
const kubernetesApiVersioning = tslib_1.__importStar(require("../../versioning/kubernetes-api"));
const datasource_1 = require("../datasource");
class KubernetesApiDatasource extends datasource_1.Datasource {
    constructor() {
        super(KubernetesApiDatasource.id);
        this.defaultVersioning = kubernetesApiVersioning.id;
        this.kubernetesApiVersions = json5_1.default.parse(data_files_generated_1.default.get('data/kubernetes-api.json5'));
    }
    getReleases({ packageName, }) {
        const versions = this.kubernetesApiVersions[packageName];
        if (versions) {
            const releases = versions.map((version) => ({ version }));
            return Promise.resolve({ releases });
        }
        return Promise.resolve(null);
    }
}
exports.KubernetesApiDatasource = KubernetesApiDatasource;
KubernetesApiDatasource.id = 'kubernetes-api';
//# sourceMappingURL=index.js.map