@swarthy/wait-for
Advanced tools
Comparing version 1.0.0 to 1.0.1
const { Client } = require('pg') | ||
const debug = require('debug')('wait-for-postgres') | ||
const DEFAULTS = { | ||
connectionString: 'postgres://postgres@localhost', | ||
maxAttempts: 30, | ||
delay: 1000 | ||
} | ||
function delayPromise(ms) { | ||
@@ -22,4 +16,3 @@ return new Promise(resolve => setTimeout(resolve, ms)) | ||
module.exports = async function waitForPostgres(customOptions = {}) { | ||
const options = Object.assign({}, DEFAULTS, customOptions) | ||
module.exports = async function waitForPostgres(options) { | ||
const { connectionString, delay, maxAttempts } = options | ||
@@ -26,0 +19,0 @@ |
{ | ||
"name": "@swarthy/wait-for", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Wait for (PostgresSQL|RabbitMQ|Redis) server is available", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "eslint ." | ||
"test": "eslint . && mocha" | ||
}, | ||
@@ -30,2 +30,3 @@ "bin": { | ||
"amqplib": "^0.5.2", | ||
"bluebird": "^3.5.1", | ||
"debug": "^3.1.0", | ||
@@ -32,0 +33,0 @@ "pg": "^7.4.1", |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
94224
18
240
5
6
+ Addedbluebird@^3.5.1