UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

41 lines 1.71 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sendUsageRequests = sendUsageRequests; exports.updateUsageRequests = updateUsageRequests; const createUsage_1 = require("./createUsage"); const getConfigurationInformation_1 = require("./getConfigurationInformation"); const getEnvironment_1 = require("./getEnvironment"); const getOperatingSystem_1 = require("./getOperatingSystem"); const getRepositoryInformation_1 = require("./getRepositoryInformation"); const getUserId_1 = require("./getUserId"); const getVersion_1 = require("./getVersion"); const updateUsage_1 = require("./updateUsage"); async function sendUsageRequests(specCounter) { const user = await (0, getUserId_1.getUserId)(); if (user === null) { return null; } const usageData = { userId: user, version: (0, getVersion_1.getVersion)(), osType: (0, getOperatingSystem_1.getOperatingSystemType)(), osRelease: (0, getOperatingSystem_1.getOperatingSystemRelease)(), osVersion: (0, getOperatingSystem_1.getOperatingSystemVersion)(), environment: (0, getEnvironment_1.getEnvironmentVariables)(), configHash: (0, getConfigurationInformation_1.getConfigurationHash)(), repoHash: (0, getRepositoryInformation_1.getCwdGitRemoteUrlHash)(), specCounter: specCounter }; const usageId = await (0, createUsage_1.createUsage)(usageData); if (usageId === null) { return null; } return usageId; } async function updateUsageRequests(usageId, result) { const usageData = { result }; void (0, updateUsage_1.updateQmateUsage)(usageId, usageData); } //# sourceMappingURL=stats.js.map