ogit
Version:
A lazy developer's Git CLI made simple. Makes using git on cloud IDEs (i.e. C9) a walk in the park.
32 lines (31 loc) • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const AbstractBranchCommand_1 = require("../abstracts/AbstractBranchCommand");
const columnify = require('columnify');
class DisplayBranchesCommand extends AbstractBranchCommand_1.default {
run() {
const _super = name => super[name];
return tslib_1.__awaiter(this, void 0, void 0, function* () {
yield _super("runHelper").call(this);
const datatable = [];
for (let branch of this.branchesList) {
datatable.push({
type: this.getType(branch),
name: this.getName(branch)
});
}
console.log(columnify(datatable, {}));
});
}
preformBranchOperation(_branchInfo) {
return tslib_1.__awaiter(this, void 0, void 0, function* () { });
}
getSelectedBranch() {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return null;
});
}
}
DisplayBranchesCommand.description = 'Lists the branches within the current repo';
exports.default = DisplayBranchesCommand;