Go modular
This commit is contained in:
committed by
Phil Kunz
parent
6edd51c6e6
commit
b6a85319b0
17
ts/npmci.monitor.ts
Normal file
17
ts/npmci.monitor.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as plugins from './npmci.plugins'
|
||||
import * as env from './npmci.env'
|
||||
|
||||
import { Smartmonitor } from 'smartmonitor'
|
||||
|
||||
export let npmciMonitor = new Smartmonitor()
|
||||
|
||||
if(process.env.SMARTMONITOR) {
|
||||
npmciMonitor.addInstrumental({
|
||||
apiKey: process.env.SMARTMONITOR
|
||||
})
|
||||
plugins.beautylog.info('Monitoring activated')
|
||||
} else {
|
||||
plugins.beautylog.warn('Monitoring could not be enabled due to missing API-KEY')
|
||||
}
|
||||
|
||||
npmciMonitor.increment('lossless-ci.builds', 1)
|
||||
Reference in New Issue
Block a user