Socket
Socket
Sign inDemoInstall

wait-on

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wait-on - npm Package Compare versions

Comparing version 5.1.0 to 5.2.0

14

lib/wait-on.js

@@ -5,3 +5,3 @@ 'use strict';

const { promisify } = require('util');
const Joi = require('@hapi/joi');
const Joi = require('joi');
const https = require('https');

@@ -26,3 +26,3 @@ const net = require('net');

const HTTP_UNIX_RE = /^http:\/\/unix:([^:]+):([^:]+)$/;
const TIMEOUT_ERR_MSG = 'Timeout';
const TIMEOUT_ERR_MSG = 'Timed out waiting for';

@@ -130,9 +130,11 @@ const WAIT_ON_SCHEMA = Joi.object({

const timeoutError$ =
timeout !== Infinity ? timer(timeout).pipe(mergeMap(() => throwError(Error('Timeout')))) : NEVER;
timeout !== Infinity ? timer(timeout).pipe(mergeMap(() => {
const resourcesWaitingFor = determineRemainingResources(resources, lastResourcesState).join(', ')
return throwError(Error(`${TIMEOUT_ERR_MSG}: ${resourcesWaitingFor}`))
})) : NEVER;
function cleanup(err) {
if (err) {
if (err.message === TIMEOUT_ERR_MSG) {
const resourcesWaitingFor = determineRemainingResources(resources, lastResourcesState).join(', ');
log('wait-on(%s) timed out waiting for: %s; exiting with error', process.pid, resourcesWaitingFor);
if (err.message.startsWith(TIMEOUT_ERR_MSG)) {
log('wait-on(%s) %s; exiting with error', process.pid, err.message);
} else {

@@ -139,0 +141,0 @@ log('wait-on(%s) exiting with error', process.pid, err);

{
"name": "wait-on",
"description": "wait-on is a cross platform command line utility and Node.js API which will wait for files, ports, sockets, and http(s) resources to become available",
"version": "5.1.0",
"version": "5.2.0",
"main": "lib/wait-on",

@@ -41,4 +41,4 @@ "bin": {

"dependencies": {
"@hapi/joi": "^17.1.1",
"axios": "^0.19.2",
"joi": "^17.1.1",
"lodash": "^4.17.19",

@@ -45,0 +45,0 @@ "minimist": "^1.2.5",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc