npmci/dist/npmci.monitor.js

28 lines
2.1 KiB
JavaScript
Raw Normal View History

2017-05-18 20:40:09 +00:00
"use strict";
2017-09-08 21:16:09 +00:00
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
2017-05-18 20:40:09 +00:00
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./npmci.plugins");
2017-09-08 21:16:09 +00:00
const env = require("./npmci.env");
2017-09-08 12:58:44 +00:00
const smartanalytics_1 = require("smartanalytics");
exports.npmciAnalytics = new smartanalytics_1.Analytics({
2017-09-08 16:24:34 +00:00
apiEndPoint: 'https://pubapi.lossless.one/analytics',
2017-09-08 12:58:44 +00:00
projectId: 'gitzone',
appName: 'npmci'
});
2017-09-08 21:16:09 +00:00
exports.run = () => __awaiter(this, void 0, void 0, function* () {
exports.npmciAnalytics.recordEvent('npmToolExecution', {
host: env.repo.host,
user: env.repo.user,
repo: env.repo.repo
}).catch(err => {
plugins.beautylog.warn('Lossless Analytics API not available...');
});
2017-09-08 12:58:44 +00:00
});
2017-09-08 21:16:09 +00:00
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kubW9uaXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLm1vbml0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDJDQUEwQztBQUMxQyxtQ0FBa0M7QUFFbEMsbURBQTBDO0FBRS9CLFFBQUEsY0FBYyxHQUFHLElBQUksMEJBQVMsQ0FBQztJQUN4QyxXQUFXLEVBQUUsdUNBQXVDO0lBQ3BELFNBQVMsRUFBRSxTQUFTO0lBQ3BCLE9BQU8sRUFBRSxPQUFPO0NBQ2pCLENBQUMsQ0FBQTtBQUVTLFFBQUEsR0FBRyxHQUFHO0lBQ2Ysc0JBQWMsQ0FBQyxXQUFXLENBQUMsa0JBQWtCLEVBQUU7UUFDN0MsSUFBSSxFQUFFLEdBQUcsQ0FBQyxJQUFJLENBQUMsSUFBSTtRQUNuQixJQUFJLEVBQUUsR0FBRyxDQUFDLElBQUksQ0FBQyxJQUFJO1FBQ25CLElBQUksRUFBRSxHQUFHLENBQUMsSUFBSSxDQUFDLElBQUk7S0FDcEIsQ0FBQyxDQUFDLEtBQUssQ0FBQyxHQUFHO1FBQ1YsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMseUNBQXlDLENBQUMsQ0FBQTtJQUNuRSxDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FBQSxDQUFBIn0=