postman-collection
Advanced tools
Comparing version 3.5.3 to 3.5.4-beta.1
var _ = require('../util').lodash, | ||
Property = require('./property').Property, | ||
PropertyList = require('./property-list').PropertyList, | ||
Url = require('./url').Url, | ||
UrlMatchPattern = require('../url-pattern/url-match-pattern').UrlMatchPattern, | ||
UrlMatchPatternList = require('../url-pattern/url-match-pattern-list').UrlMatchPatternList, | ||
ProxyConfig, | ||
@@ -94,2 +96,8 @@ PROTOCOL_DELIMITER = UrlMatchPattern.PROTOCOL_DELIMITER, | ||
/** | ||
* Proxy bypass list | ||
* @type {UrlMatchPatternList} | ||
*/ | ||
bypass: undefined, | ||
/** | ||
* Enable proxy authentication | ||
@@ -153,2 +161,11 @@ * @type {Boolean} | ||
_.isString(options.password) && (this.password = options.password); | ||
// init bypass list from the given array | ||
if (Array.isArray(options.bypass)) { | ||
this.bypass = new UrlMatchPatternList(null, options.bypass); | ||
} | ||
// or, convert existing PropertyList or UrlMatchPatternList | ||
else if (PropertyList.isPropertyList(options.bypass)) { | ||
this.bypass = new UrlMatchPatternList(null, options.bypass.all()); | ||
} | ||
}, | ||
@@ -201,2 +218,7 @@ | ||
// don't proceed if the given URL should skip use of a proxy all together | ||
if (this.bypass && this.bypass.test(urlStr)) { | ||
return false; | ||
} | ||
return this.match.test(urlStr); | ||
@@ -203,0 +225,0 @@ }, |
@@ -5,3 +5,3 @@ { | ||
"author": "Postman Labs <help@getpostman.com>", | ||
"version": "3.5.3", | ||
"version": "3.5.4-beta.1", | ||
"keywords": [ | ||
@@ -62,3 +62,3 @@ "postman" | ||
"eslint-plugin-lodash": "5.1.0", | ||
"eslint-plugin-mocha": "6.1.0", | ||
"eslint-plugin-mocha": "6.1.1", | ||
"eslint-plugin-security": "1.4.0", | ||
@@ -75,7 +75,7 @@ "istanbul": "0.4.5", | ||
"mocha": "6.2.0", | ||
"mustache": "3.0.3", | ||
"mustache": "3.1.0", | ||
"parse-gitignore": "1.0.1", | ||
"postman-jsdoc-theme": "0.0.3", | ||
"postman-request": "2.88.1-postman.15", | ||
"puppeteer": "1.19.0", | ||
"puppeteer": "1.20.0", | ||
"require-all": "3.0.0", | ||
@@ -82,0 +82,0 @@ "schema-compiler": "0.0.3", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
526892
11367
1