update to new cli scheme

This commit is contained in:
2017-08-27 15:24:17 +02:00
parent e6bc38c7e5
commit 6e816f35f6
62 changed files with 1372 additions and 1596 deletions

View File

@ -0,0 +1,27 @@
import * as plugins from './mod.plugins'
let npmciCflare = new plugins.cflare.CflareAccount()
/**
* handle cli input
* @param argvArg
*/
export let handleCli = async (argvArg) => {
if (argvArg._.length >= 2) {
let action: string = argvArg._[1]
switch (action) {
default:
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`)
}
} else {
plugins.beautylog.log(`>>npmci node ...<< cli arguments invalid... Please read the documentation.`)
}
}
export let purge = async (argvArg) => {
npmciCflare.auth({
email: '',
key: ''
})
npmciCflare.purgeZone(argvArg._[1])
}

View File

@ -4,4 +4,4 @@ import * as cflare from 'cflare'
export {
cflare
}
}