electron-proxy-agent
Advanced tools
Comparing version 1.0.2 to 1.2.0
10
index.js
@@ -41,3 +41,3 @@ | ||
* } | ||
* | ||
* | ||
* See https://github.com/atom/electron/blob/master/docs/api/session.md#sesresolveproxyurl-callback | ||
@@ -103,6 +103,12 @@ * | ||
debug('url: %o', url); | ||
self.session.resolveProxy(url, onproxy); | ||
var handled = false; | ||
var promise = self.session.resolveProxy(url, onproxy); | ||
if(promise && promise.then) { | ||
promise.then(onproxy); | ||
} | ||
// `resolveProxy()` callback function | ||
function onproxy (proxy) { | ||
if(handled) return; | ||
handled = true | ||
@@ -109,0 +115,0 @@ // default to "DIRECT" if a falsey value was returned (or nothing) |
{ | ||
"name": "electron-proxy-agent", | ||
"version": "1.0.2", | ||
"version": "1.2.0", | ||
"description": "NodeJS http(s).Agent implementation for electron shell", | ||
@@ -35,6 +35,6 @@ "main": "index.js", | ||
"get-uri": "1", | ||
"http-proxy-agent": "1", | ||
"https-proxy-agent": "1", | ||
"http-proxy-agent": "^4.0.1", | ||
"https-proxy-agent": "^5.0.0", | ||
"socks-proxy-agent": "2" | ||
} | ||
} |
8767
129
5
+ Added@tootallnate/once@1.1.2(transitive)
+ Addedagent-base@6.0.2(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedhttp-proxy-agent@4.0.1(transitive)
+ Addedhttps-proxy-agent@5.0.1(transitive)
+ Addedms@2.1.3(transitive)
- Removedhttp-proxy-agent@1.0.0(transitive)
- Removedhttps-proxy-agent@1.0.0(transitive)
Updatedhttp-proxy-agent@^4.0.1
Updatedhttps-proxy-agent@^5.0.0