import { POST, Query, TaonController } from 'taon/lib-prod';
import { GET } from 'taon/lib-prod';
import { TaonBaseCliWorkerController } from 'tnp-helpers/lib-prod';
import { TaonEnv } from './taon-env.entity';
import { TaonIsomorphicPkgsDetectionRepository } from './taon-isomorphic-pkgs-detection.repository';
//#region ports controller
let TaonProjectsController = class TaonProjectsController extends TaonBaseCliWorkerController {
    taonEnvRepo = this.injectRepo(TaonEnv);
    taonIsomorphicPkgsDetectionRepository = this.injectCustomRepository(TaonIsomorphicPkgsDetectionRepository);
    getEnvironments() {
        //#region @backendFunc
        return async (req, res) => {
            return this.taonEnvRepo.find();
        };
        //#endregion
    }
    detectPackagesForContainer(coreContainerPath) {
        //#region @backendFunc
        return async (req, res) => {
            this.taonIsomorphicPkgsDetectionRepository.detectPackagesForContainer(coreContainerPath);
        };
        //#endregion
    }
};
__decorate([
    GET(),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Object)
], TaonProjectsController.prototype, "getEnvironments", null);
__decorate([
    POST(),
    __param(0, Query('coreContainerPath')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String]),
    __metadata("design:returntype", Object)
], TaonProjectsController.prototype, "detectPackagesForContainer", null);
TaonProjectsController = __decorate([
    TaonController({
        className: 'TaonProjectsController',
    })
], TaonProjectsController);
export { TaonProjectsController };
//#endregion
//# sourceMappingURL=taon.controller.js.map