Socket
Socket
Sign inDemoInstall

@swarthy/wait-for

Package Overview
Dependencies
54
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

.travis.yml

9

lib/postgres.js
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc