Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const glob = require('glob-gitignore')
const {Command, flags} = require('@oclif/command')
const Configstore = require('configstore')
const fs = require('fs')
const request = require('request')
const conf = new Configstore('1mb-cli')
const parse = require('parse-gitignore')
const {cli} = require('cli-ux')
const path = require('path')
const imgur = require('imgur')
// imgur.setClientId('aCs53GSs4tga0ikp');
imgur.setAPIUrl('https://api.imgur.com/3/')
class DeployCommand extends Command {
async run() {
const {flags} = this.parse(DeployCommand)
const self = this
if (flags.clearcreds === true) {
conf.clear()
}
let username = conf.get('username')
if (typeof username === 'undefined') {
username = await cli.prompt('What is your 1mbsite username?')
}
let key = conf.get('key')