Comparing version 5.1.0 to 5.2.0
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34043
406
+ Addedjoi@^17.1.1
+ Added@sideway/address@4.1.5(transitive)
+ Added@sideway/formula@3.0.1(transitive)
+ Added@sideway/pinpoint@2.0.0(transitive)
+ Addedjoi@17.13.3(transitive)
- Removed@hapi/joi@^17.1.1
- Removed@hapi/address@4.1.0(transitive)
- Removed@hapi/formula@2.0.0(transitive)
- Removed@hapi/joi@17.1.1(transitive)
- Removed@hapi/pinpoint@2.0.1(transitive)