Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function init() {
inquirer
.prompt([{
type: 'list',
name: 'tag',
message: configParser.getCommitPromptText('tag'),
choices: configParser.getTagsFormat()
}])
.then(function (answers) {
var tagTitle = answers.tag;
showPrompts(tagTitle);
});
}
(function () {
'use strict';
var childProcess = require('child_process'),
inquirer = require('inquirer'),
configParser = require('turbo-git-config').parser,
utils = require('turbo-git-config').utils,
Promise = require('promise');
require('colors');
init();
function init() {
inquirer
.prompt([{
type: 'list',
name: 'tag',
message: configParser.getCommitPromptText('tag'),
choices: configParser.getTagsFormat()
}])
.then(function (answers) {
var tagTitle = answers.tag;
(function () {
'use strict';
var childProcess = require('child_process'),
inquirer = require('inquirer'),
configParser = require('turbo-git-config').parser,
utils = require('turbo-git-config').utils,
Promise = require('promise');
require('colors');
init();
function init() {
inquirer
.prompt([{
type: 'list',
name: 'tag',
message: configParser.getCommitPromptText('tag'),
choices: configParser.getTagsFormat()
}])
.then(function (answers) {
(function() {
'use strict';
var Add = require('turbo-git-add'),
addCommand = new Add();
require('turbo-git-config').parse;
addCommand.init();
})();
function init() {
inquirer
.prompt([{
type: 'list',
name: 'tag',
message: configParser.getCommitPromptText('tag'),
choices: configParser.getTagsFormat()
}])
.then(function (answers) {
var tagTitle = answers.tag;
showPrompts(tagTitle);
});
}
function showPrompts(tagTitle) {
var commitText = '',
tagTitleLength = tagTitle.length,
fieldTexts = {
'title': configParser.getCommitPromptText('title'),
'component': configParser.getCommitPromptText('component'),
'desc': configParser.getCommitPromptText('desc')
};
commitText += tagTitle;
onComponentPrompt('component', fieldTexts.component).then(function (componentInput) {
if (componentInput){
commitText += '('+componentInput+'): ';
}
nextStepTitle();
});
function nextStepTitle() {
onTitlePrompt('title', fieldTexts.title).then(function (titleInput) {
commitText += titleInput;
function showPrompts(tagTitle) {
var commitText = '',
tagTitleLength = tagTitle.length,
fieldTexts = {
'title': configParser.getCommitPromptText('title'),
'component': configParser.getCommitPromptText('component'),
'desc': configParser.getCommitPromptText('desc')
};
commitText += tagTitle;
onComponentPrompt('component', fieldTexts.component).then(function (componentInput) {
if (componentInput){
commitText += '('+componentInput+'): ';
}
nextStepTitle();
});
function nextStepTitle() {
onTitlePrompt('title', fieldTexts.title).then(function (titleInput) {
commitText += titleInput;
nextStepDesc();
function showPrompts(tagTitle) {
var commitText = '',
tagTitleLength = tagTitle.length,
fieldTexts = {
'title': configParser.getCommitPromptText('title'),
'component': configParser.getCommitPromptText('component'),
'desc': configParser.getCommitPromptText('desc')
};
commitText += tagTitle;
onComponentPrompt('component', fieldTexts.component).then(function (componentInput) {
if (componentInput){
commitText += '('+componentInput+'): ';
}
nextStepTitle();
});
function nextStepTitle() {
onTitlePrompt('title', fieldTexts.title).then(function (titleInput) {
commitText += titleInput;
nextStepDesc();
});
gitStatusPorcelain.stdout.on('data', function(data) {
var files = this.getNoStagedFiles(data);
if (files.length === 0) {
utils.showError('No files to add');
return;
}
files.unshift(addAll);
this.promptFileSelection(files);
}.bind(this));
};
function executeGitPreLogCallback(err, gitTitles) {
var gitLogUserCommand;
if (err) { utils.showError(err); return; }
gitLogTitles = gitTitles;
gitLogUserCommand = configParser.getLogCommand();
childProcess.exec(gitLogUserCommand, executeGitLogCallback);
}