Comparing version 2.0.0 to 2.0.1
'use strict'; | ||
const url = require('url'); | ||
const getProxy = require('get-proxy'); | ||
const isurl = require('isurl'); | ||
const tunnelAgent = require('tunnel-agent'); | ||
const urlToOptions = require('url-to-options'); | ||
@@ -19,3 +21,3 @@ module.exports = (proxy, opts) => { | ||
proxy = url.parse(proxy); | ||
proxy = isurl.lenient(proxy) ? urlToOptions(proxy) : url.parse(proxy); | ||
@@ -22,0 +24,0 @@ const uriProtocol = opts.protocol === 'https' ? 'https' : 'http'; |
{ | ||
"name": "caw", | ||
"version": "2.0.0", | ||
"description": "Construct HTTP/HTTPS agents for tunneling proxies", | ||
"license": "MIT", | ||
"repository": "kevva/caw", | ||
"author": { | ||
"email": "kevinmartensson@gmail.com", | ||
"name": "Kevin Mårtensson", | ||
"url": "github.com/kevva" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"http", | ||
"https", | ||
"proxy", | ||
"tunnel" | ||
], | ||
"dependencies": { | ||
"get-proxy": "^1.0.1", | ||
"tunnel-agent": "^0.4.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"get-port": "^2.1.0", | ||
"got": "^6.3.0", | ||
"pify": "^2.3.0", | ||
"proxyquire": "^1.7.9", | ||
"sinon": "^1.17.4", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true, | ||
"rules": { | ||
"ava/no-skip-test": 0 | ||
} | ||
} | ||
"name": "caw", | ||
"version": "2.0.1", | ||
"description": "Construct HTTP/HTTPS agents for tunneling proxies", | ||
"license": "MIT", | ||
"repository": "kevva/caw", | ||
"author": { | ||
"email": "kevinmartensson@gmail.com", | ||
"name": "Kevin Mårtensson", | ||
"url": "github.com/kevva" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"http", | ||
"https", | ||
"proxy", | ||
"tunnel" | ||
], | ||
"dependencies": { | ||
"get-proxy": "^2.0.0", | ||
"isurl": "^1.0.0-alpha5", | ||
"tunnel-agent": "^0.6.0", | ||
"url-to-options": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"create-cert": "^1.0.4", | ||
"get-port": "^3.1.0", | ||
"got": "^7.0.0", | ||
"pify": "^3.0.0", | ||
"proxyquire": "^1.7.9", | ||
"sinon": "^2.3.1", | ||
"universal-url": "1.0.0-alpha", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"rules": { | ||
"ava/no-skip-test": 0 | ||
} | ||
} | ||
} |
@@ -9,3 +9,3 @@ # caw [![Build Status](https://travis-ci.org/kevva/caw.svg?branch=master)](https://travis-ci.org/kevva/caw) | ||
``` | ||
$ npm install --save caw | ||
$ npm install caw | ||
``` | ||
@@ -38,4 +38,6 @@ | ||
Besides the options below, you can pass in options allowed in [tunnel-agent](https://github.com/koichik/node-tunnel). | ||
Type: `Object` | ||
Besides the options below, you can pass in options allowed in [tunnel-agent](https://github.com/request/tunnel-agent). | ||
##### protocol | ||
@@ -51,2 +53,2 @@ | ||
MIT © [Kevin Mårtensson](http://github.com/kevva) | ||
MIT © [Kevin Mårtensson](https://github.com/kevva) |
Sorry, the diff of this file is not supported yet
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
3658
30
52
4
9
+ Addedisurl@^1.0.0-alpha5
+ Addedurl-to-options@^1.0.1
+ Addedconfig-chain@1.1.13(transitive)
+ Addedget-proxy@2.1.0(transitive)
+ Addedhas-symbol-support-x@1.4.2(transitive)
+ Addedhas-to-string-tag-x@1.4.1(transitive)
+ Addedis-object@1.0.2(transitive)
+ Addedisurl@1.0.0(transitive)
+ Addednpm-conf@1.1.3(transitive)
+ Addedpify@3.0.0(transitive)
+ Addedproto-list@1.2.4(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedurl-to-options@1.0.1(transitive)
- Removeddeep-extend@0.6.0(transitive)
- Removedget-proxy@1.1.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedrc@1.2.8(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedtunnel-agent@0.4.3(transitive)
Updatedget-proxy@^2.0.0
Updatedtunnel-agent@^0.6.0