UNPKG

alm

Version:

The best IDE for TypeScript

28 lines (27 loc) 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var commands = require("../commands"); var ui = require("../../ui"); var inputDialog_1 = require("../../dialogs/inputDialog"); var socketClient_1 = require("../../../socket/socketClient"); commands.gitAddAllCommitAndPush.on(function () { inputDialog_1.inputDialog.open({ header: 'Git: Add all the files, commit with the following message, and push', onOk: function (message) { ui.notifyInfoNormalDisappear("Git: Sending commands. Will notify when complete."); socketClient_1.server .gitAddAllCommitAndPush({ message: message }) .then(function (res) { if (res.type === 'error') { ui.notifyWarningNormalDisappear("Git Failed:" + res.error); } else { ui.notifySuccessNormalDisappear(res.log); ui.notifySuccessNormalDisappear("Git: Commands ran to completion successfully."); } commands.gitStatusNeedsRefresh.emit({}); }); }, onEsc: function () { return null; }, }); });