@backstroke/worker
Advanced tools
Comparing version 1.0.2 to 1.1.0
{ | ||
"name": "@backstroke/worker", | ||
"version": "1.1.0", | ||
"dependencies": { | ||
@@ -12,3 +13,5 @@ "bluebird": "^3.5.0", | ||
"start": "node src/index.js", | ||
"test": "NODE_ENV=test jest --watch" | ||
"start:once": "node src/index.js --once", | ||
"test": "NODE_ENV=test jest --watch", | ||
"test-ci": "CI=true NODE_ENV=test jest" | ||
}, | ||
@@ -18,4 +21,3 @@ "devDependencies": { | ||
"sinon": "^3.2.1" | ||
}, | ||
"version": "1.0.2" | ||
} | ||
} |
@@ -105,18 +105,26 @@ const args = require('minimist')(process.argv.slice(2)); | ||
// Kick off the batch! | ||
processBatch( | ||
WebhookQueue, | ||
WebhookStatusStore, | ||
logger, | ||
getForksForRepo, | ||
{default: createPullRequest, mock: mockCreatePullRequest}[args.pr || 'default'], | ||
didRepoOptOut, | ||
githubPullRequestsCreate | ||
).then(() => { | ||
console.log('* Success!'); | ||
final(); | ||
}).catch(err => { | ||
console.error('Error:'); | ||
console.error(err.stack); | ||
final(); | ||
}); | ||
function go() { | ||
processBatch( | ||
WebhookQueue, | ||
WebhookStatusStore, | ||
logger, | ||
getForksForRepo, | ||
{default: createPullRequest, mock: mockCreatePullRequest}[args.pr || 'default'], | ||
didRepoOptOut, | ||
githubPullRequestsCreate | ||
).then(() => { | ||
console.log('* Success!'); | ||
final(); | ||
}).catch(err => { | ||
console.error('Error:'); | ||
console.error(err.stack); | ||
final(); | ||
}); | ||
} | ||
if (args.once) { | ||
go(); | ||
} else { | ||
setInterval(go, process.env.WORKER_POLL_INTERVAL || 5000); | ||
} | ||
} |
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
106259
10
889
8