-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlist.js
28 lines (23 loc) · 1.07 KB
/
list.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
const chalk = require('chalk')
const config = require('../lib/config')()
module.exports = async () => {
const currentConfig = config.get()
if (Object.keys(currentConfig).length > 0 && currentConfig.constructor === Object) {
console.log('')
for (let client in currentConfig) {
console.log(chalk.green(' client: ') + chalk.green.bold(client))
for (let instance in currentConfig[client]) {
console.log(chalk.cyan('instance: ') + chalk.cyan.bold(instance))
console.log(' path: ' + chalk.bold(currentConfig[client][instance].d))
console.log(' host: ' + chalk.bold(currentConfig[client][instance].h))
console.log(' code: ' + chalk.bold(currentConfig[client][instance].v))
console.log(' user: ' + chalk.bold(currentConfig[client][instance].u))
console.log(' pass: ' + chalk.bold(currentConfig[client][instance].p.replace(/./g, '*')))
}
console.log('')
}
} else {
console.log(chalk.red.bold('\n✖ No Clients'))
console.log('Use ' + chalk.cyan('sfcc setup') + ' to started.\n')
}
}