/
prompts.js
36 lines (35 loc) 路 979 Bytes
/
prompts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// @flow
import configurationVault from '@utils/configurationVault'
import { CONFIG, EMOJI_COMMIT_FORMATS } from '@constants/configuration'
import guard from './guard'
export default (): Array<Object> => [
{
name: CONFIG.AUTO_ADD,
message: 'Enable automatic "git add ."',
type: 'confirm',
default: configurationVault.getAutoAdd()
},
{
name: CONFIG.EMOJI_FORMAT,
message: 'Select how emojis should be used in commits',
type: 'list',
choices: [
{ name: ':smile:', value: EMOJI_COMMIT_FORMATS.CODE },
{ name: '馃槃', value: EMOJI_COMMIT_FORMATS.EMOJI }
],
default: configurationVault.getEmojiFormat()
},
{
name: CONFIG.SCOPE_PROMPT,
message: 'Enable scope prompt',
type: 'confirm',
default: configurationVault.getScopePrompt()
},
{
name: CONFIG.GITMOJIS_URL,
message: 'Set gitmojis api url',
type: 'input',
default: configurationVault.getGitmojisUrl(),
validate: guard.url
}
]