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 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();
});