sda
Version:
Software development assistant
26 lines • 1.08 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const easy_table_1 = __importDefault(require("easy-table"));
const Log_1 = __importDefault(require("../Log"));
function listEnvironments(ec) {
Log_1.default.verbose('List environments');
Log_1.default.verbose('');
const config = ec.config;
const table = new easy_table_1.default();
Object.keys(config.environments).forEach((envId) => {
const templateId = config.environments[envId].templateId;
table.cell('Environment id', envId);
table.cell('Template id', templateId);
table.cell('Path', config.environments[envId].path);
if (ec.isVerbose) {
table.cell('Description', config.templates[templateId].description);
}
table.newRow();
});
console.log(table.toString());
}
exports.default = listEnvironments;
//# sourceMappingURL=listEnvironments.js.map