autorestic/src/info.ts

26 lines
641 B
TypeScript
Raw Normal View History

import { config } from './autorestic'
import { fill, treeToString } from './utils'
const showAll = () => {
console.log('\n\n' + fill(32, '_') + 'LOCATIONS:'.underline)
for (const [key, data] of Object.entries(config.locations)) {
console.log(`\n${key.blue.underline}:`)
console.log(treeToString(
data,
2020-05-17 14:48:45 +02:00
['to:', 'from:', 'hooks:', 'options:', 'cron:'],
))
}
console.log('\n\n' + fill(32, '_') + 'BACKENDS:'.underline)
for (const [key, data] of Object.entries(config.backends)) {
console.log(`\n${key.blue.underline}:`)
console.log(treeToString(
data,
['type:', 'path:', 'key:'],
))
}
}
export default showAll