UNPKG

liveperson-functions-cli

Version:
28 lines 1.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeploymentController = void 0; const faasFactory_service_1 = require("../../service/faasFactory.service"); class DeploymentController { constructor(fileService) { this.fileService = fileService; } /** * Gather information for passed lambda functions and enhance it with the current accountId * @param {string[]} lambdaFunctions - Passed lambda function * @returns {Promise<ILambda[]>} - Lambdas from the platform enhanced with the current accountId * @memberof DeploymentController */ async collectLambdaInformationForAllLambdas(lambdaFunctions) { if (lambdaFunctions.length === 0) { lambdaFunctions = [this.fileService.getFunctionFolderName()]; } const faasService = await faasFactory_service_1.factory.get(); const allLambdas = (await faasService.getLambdasByNames(lambdaFunctions)); return allLambdas.map((lambda) => ({ accountId: faasService.accountId, ...lambda, })); } } exports.DeploymentController = DeploymentController; //# sourceMappingURL=deployment.controller.js.map