import 'babel-polyfill'
import Listr from 'listr'
import updateNotifier from 'update-notifier'
import { downloadTasks, writeTask, cleanupTask } from './tasks'
import { paths } from './index'

const pkg = require('../package.json') // eslint-disable-line import/newline-after-import
updateNotifier({ pkg }).notify()

const { sourceFile } = paths

const tasks = new Listr([
  {
    title: 'Downloading plugins…',
    task() {
      return new Listr(downloadTasks, {
        concurrent: true,
      })
    },
  },
  {
    title: `Writing to ${sourceFile}…`,
    task: writeTask,
  },
  {
    title: 'Cleaning up old plugins…',
    task: cleanupTask,
  },
])

tasks.run()

@@ -309,16 +309,56 @@
 tify()%0A%0A
+process.umask(process.umask() %7C 0o022)%0A%0A
 const %7B 

Update cli.js