"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AzurePipelinesTasksDatasource = void 0;
const tslib_1 = require("tslib");
const data_files_generated_1 = tslib_1.__importDefault(require("../../../data-files.generated"));
const loose_1 = require("../../versioning/loose");
const datasource_1 = require("../datasource");
class AzurePipelinesTasksDatasource extends datasource_1.Datasource {
    constructor() {
        super(AzurePipelinesTasksDatasource.id);
        this.customRegistrySupport = false;
        this.defaultVersioning = loose_1.id;
        this.builtInTasks = JSON.parse(data_files_generated_1.default.get('data/azure-pipelines-tasks.json'));
    }
    getReleases({ packageName, }) {
        const versions = this.builtInTasks[packageName.toLowerCase()];
        if (versions) {
            const releases = versions.map((version) => ({ version }));
            return Promise.resolve({ releases });
        }
        return Promise.resolve(null);
    }
}
exports.AzurePipelinesTasksDatasource = AzurePipelinesTasksDatasource;
AzurePipelinesTasksDatasource.id = 'azure-pipelines-tasks';
//# sourceMappingURL=index.js.map