@barecheck/cli
Advanced tools
Comparing version 0.3.1-canary.6 to 0.3.1-canary.7
@@ -1,2 +0,6 @@ | ||
export declare function cli(): Promise<number>; | ||
/** | ||
* Testing script to send metrics and receive them | ||
* TODO: Should be changed with actual commands to send metrics | ||
*/ | ||
export declare function cli(): Promise<void>; | ||
//# sourceMappingURL=main.d.ts.map |
@@ -14,9 +14,39 @@ "use strict"; | ||
const core_1 = require("@barecheck/core"); | ||
/** | ||
* Testing script to send metrics and receive them | ||
* TODO: Should be changed with actual commands to send metrics | ||
*/ | ||
function cli() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const { percentage } = yield (0, core_1.parseLcovFile)('./'); | ||
return percentage; | ||
const { project, accessToken } = yield core_1.barecheckApi.authProject({ | ||
apiKey: process.env.BARECHECK_API_KEY | ||
}); | ||
console.log(project, accessToken); | ||
const coverageMetrics = yield core_1.barecheckApi.createCoverageMetric(accessToken, { | ||
projectId: project.id, | ||
totalCoverage: 90.4, | ||
ref: 'main', | ||
sha: '321' | ||
}); | ||
const clonesMetric = yield core_1.barecheckApi.createClonesMetric(accessToken, { | ||
projectId: project.id, | ||
totalLinesPercentage: 50.2, | ||
totalBranchesPercentage: 50, | ||
ref: 'main', | ||
sha: '321' | ||
}); | ||
const clones = yield core_1.barecheckApi.clonesMetrics(accessToken, { | ||
projectId: project.id | ||
}); | ||
const coverage = yield core_1.barecheckApi.coverageMetrics(accessToken, { | ||
projectId: project.id | ||
}); | ||
console.log('coverageMetrics', coverageMetrics); | ||
console.log('clonesMetric', clonesMetric); | ||
console.log('clones', clones); | ||
console.log('coverage', coverage); | ||
}); | ||
} | ||
exports.cli = cli; | ||
cli(); | ||
//# sourceMappingURL=main.js.map |
{ | ||
"name": "@barecheck/cli", | ||
"version": "0.3.1-canary.6+12b8967", | ||
"version": "0.3.1-canary.7+7b6d97c", | ||
"description": "", | ||
@@ -15,3 +15,3 @@ "main": "out/main.js", | ||
"dependencies": { | ||
"@barecheck/core": "^0.3.1-canary.6+12b8967", | ||
"@barecheck/core": "^0.3.1-canary.7+7b6d97c", | ||
"@types/node": "^16.11.0", | ||
@@ -29,3 +29,3 @@ "minimist": "^1.2.0" | ||
}, | ||
"gitHead": "12b8967b1f9c2ca1e46d1a3662a735fa07dc038b" | ||
"gitHead": "7b6d97c65bbc020fad68d2c3eb348b544a4c227d" | ||
} |
@@ -1,7 +0,44 @@ | ||
import { parseLcovFile } from '@barecheck/core'; | ||
import { barecheckApi } from '@barecheck/core'; | ||
/** | ||
* Testing script to send metrics and receive them | ||
* TODO: Should be changed with actual commands to send metrics | ||
*/ | ||
export async function cli() { | ||
const { percentage } = await parseLcovFile('./'); | ||
const { project, accessToken } = await barecheckApi.authProject({ | ||
apiKey: process.env.BARECHECK_API_KEY | ||
}); | ||
return percentage; | ||
console.log(project, accessToken); | ||
const coverageMetrics = await barecheckApi.createCoverageMetric(accessToken, { | ||
projectId: project.id, | ||
totalCoverage: 90.4, | ||
ref: 'main', | ||
sha: '321' | ||
}); | ||
const clonesMetric = await barecheckApi.createClonesMetric(accessToken, { | ||
projectId: project.id, | ||
totalLinesPercentage: 50.2, | ||
totalBranchesPercentage: 50, | ||
ref: 'main', | ||
sha: '321' | ||
}); | ||
const clones = await barecheckApi.clonesMetrics(accessToken, { | ||
projectId: project.id | ||
}); | ||
const coverage = await barecheckApi.coverageMetrics(accessToken, { | ||
projectId: project.id | ||
}); | ||
console.log('coverageMetrics', coverageMetrics); | ||
console.log('clonesMetric', clonesMetric); | ||
console.log('clones', clones); | ||
console.log('coverage', coverage); | ||
} | ||
cli(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
35334
125
2