update purge

This commit is contained in:
2017-06-07 15:16:33 +02:00
parent bdce1dbded
commit ddf7ca0466
14 changed files with 175 additions and 85 deletions

View File

@@ -1 +1,11 @@
import * as plugins from '../npmci.plugins'
import * as plugins from './mod.plugins'
let npmciCflare = new plugins.cflare.CflareAccount()
export let purge = async (argvArg) => {
npmciCflare.auth({
email: '',
key: ''
})
npmciCflare.purgeZone(argvArg._[1])
}

View File

@@ -1 +1,7 @@
export * from '../npmci.plugins'
import * as cflare from 'cflare'
export {
cflare
}

View File

@@ -43,6 +43,15 @@ smartcli.addCommand('command')
process.exit(1)
})
// purge
smartcli.addCommand('purge')
.then(async (argvArg) => {
let modPurge = await npmciMods.modPurge.load()
await modPurge.purge(argvArg)
}).catch(err => {
console.log(err)
})
// install
smartcli.addCommand('install')
.then(async (argv) => {

View File

@@ -5,9 +5,12 @@ import { Smartmonitor } from 'smartmonitor'
export let npmciMonitor = new Smartmonitor()
if(process.env.SMARTMONITOR) {
let monitorEnvString: string = process.env.NPMCI_MONITOR
if (monitorEnvString) {
let npmciMonitorKeys: string[] = monitorEnvString.split('|')
npmciMonitor.addInstrumental({
apiKey: process.env.SMARTMONITOR
apiKey: process.env.NPMCI_MONITOR
})
plugins.beautylog.info('Monitoring activated')
} else {