is-report-tests
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -27,2 +27,3 @@ #!/usr/bin/env node | ||
.requiredOption('-c, --category <category>', 'Test suite category, e.g.: detox, server, client...') | ||
.requiredOption('-b, --branch <branch>', 'Current branch name') | ||
.requiredOption('-r, --runId <runId>', 'Unique identifier for a run, use CircleCI env variables, should be the same for a parallelized run'); | ||
@@ -51,11 +52,19 @@ program.parse(process.argv); | ||
}); | ||
console.log('Reporting stats:', JSON.stringify(overallStats)); | ||
const payload = { | ||
type: options.type, | ||
category: options.category, | ||
project: options.project, | ||
runId: options.runId, | ||
stats: overallStats, | ||
branchName: options.branch, | ||
env: Object.keys(process.env).reduce((result, key) => { | ||
if (!key.match(/^CIRCLE/)) { | ||
return result; | ||
} | ||
return Object.assign(Object.assign({}, result), { [key]: process.env[key] }); | ||
}, {}), | ||
}; | ||
console.log('Reporting:', JSON.stringify(payload)); | ||
yield got_1.default.post(options.api, { | ||
json: { | ||
type: options.type, | ||
category: options.category, | ||
project: options.project, | ||
runId: options.runId, | ||
stats: overallStats, | ||
}, | ||
json: payload, | ||
}); | ||
@@ -62,0 +71,0 @@ console.log(chalk.green('🏁 Done!')); |
{ | ||
"name": "is-report-tests", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Test results reported", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
4041
75
3