typed-rest-client
Advanced tools
Comparing version 1.8.4 to 1.8.5
{ | ||
"name": "typed-rest-client", | ||
"version": "1.8.4", | ||
"version": "1.8.5", | ||
"description": "Node Rest and Http Clients for use with TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./RestClient.js", |
17
Util.js
@@ -17,2 +17,3 @@ "use strict"; | ||
const zlib = require("zlib"); | ||
const Constants_1 = require("./Constants"); | ||
/** | ||
@@ -109,13 +110,9 @@ * creates an url from a request url and optional base url (http://server:8080) | ||
function buildProxyBypassRegexFromEnv(bypass) { | ||
try { | ||
// We need to keep this around for back-compat purposes | ||
return new RegExp(bypass, 'i'); | ||
// check if expression starts with asterisk and replace it with .* | ||
if (bypass && bypass.startsWith("*")) { | ||
bypass = bypass.replace("*", ".*"); | ||
} | ||
catch (err) { | ||
if (err instanceof SyntaxError && (bypass || "").startsWith("*")) { | ||
let wildcardEscaped = bypass.replace('*', '(.*)'); | ||
return new RegExp(wildcardEscaped, 'i'); | ||
} | ||
throw err; | ||
} | ||
// replace all . symbols in string by \. because point is a special character | ||
const safeRegex = (bypass || "").replace(Constants_1.searchRegExpToReplaceSpecialChars, '\\$1'); | ||
return new RegExp(safeRegex, 'i'); | ||
} | ||
@@ -122,0 +119,0 @@ exports.buildProxyBypassRegexFromEnv = buildProxyBypassRegexFromEnv; |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
157648
30
1729
1
5