Skip to content

Commit

Permalink
Merge branch 'kspramod-master'
Browse files Browse the repository at this point in the history
adds proxy option, will bump version to 5.1.0
  • Loading branch information
jeffbski committed Jul 10, 2020
2 parents 53cd5fd + a5c0709 commit f9a1bca
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@ var opts = {
/* strings or binaries */
],
passphrase: 'yourpassphrase',
proxy: false /* OR proxy config as defined in axios.
If not set axios detects proxy from env vars http_proxy and https_proxy
https://github.com/axios/axios#config-defaults
{
host: '127.0.0.1',
port: 9000,
auth: {
username: 'mikeymike',
password: 'rapunz3l'
}
} */,
auth: {
user: 'theuser', // or username
pass: 'thepassword', // or password
Expand Down
3 changes: 3 additions & 0 deletions lib/wait-on.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const WAIT_ON_SCHEMA = Joi.object({
cert: [Joi.string(), Joi.binary()],
key: [Joi.string(), Joi.binary(), Joi.object()],
passphrase: Joi.string(),
proxy: [Joi.boolean(), Joi.object()],
auth: Joi.object({
username: Joi.string(),
password: Joi.string(),
Expand Down Expand Up @@ -264,6 +265,7 @@ function createHTTP$({ validatedOpts, output }, resource) {
followRedirect,
httpTimeout: timeout,
interval,
proxy,
reverse,
simultaneous,
strictSSL: rejectUnauthorized,
Expand All @@ -282,6 +284,7 @@ function createHTTP$({ validatedOpts, output }, resource) {
...pick(['ca', 'cert', 'key', 'passphrase'], validatedOpts),
}),
...(followRedirect ? {} : { maxRedirects: 0 }), // defaults to 5 (enabled)
proxy, // can be undefined, false, or object
...(timeout && { timeout }),
...urlSocketOptions,
method,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"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.0.3",
"version": "5.1.0-rc.1",
"main": "lib/wait-on",
"bin": {
"wait-on": "bin/wait-on"
Expand Down

0 comments on commit f9a1bca

Please sign in to comment.