UNPKG

dce-dev-wizard

Version:

Wizard for managing development apps at Harvard DCE.

30 lines 1.08 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var exec_1 = __importDefault(require("../helpers/exec")); /** * Get the deployment configuration of an app * @author Gabe Abrams * @param deployment the deployment entry to check * @returns parsed JSON of the deployment config */ var getDeploymentConfig = function (deployment) { var output; var text; try { text = (0, exec_1.default)("./node_modules/.bin/caccl-deploy show --app ".concat(deployment.app, " --profile ").concat(deployment.profile)); output = JSON.parse(text); } catch (err) { console.log('An error occurred while trying to get the current deployment configuration:'); console.log(err); console.log('\nText returned:'); console.log(text); process.exit(0); } return output; }; exports.default = getDeploymentConfig; //# sourceMappingURL=getDeploymentConfig.js.map