cordis-axios
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -26,3 +26,3 @@ var __create = Object.create; | ||
// packages/axios/src/index.ts | ||
// satori/packages/axios/src/index.ts | ||
var src_exports = {}; | ||
@@ -43,3 +43,3 @@ __export(src_exports, { | ||
return new import_ws.default(url, { | ||
agent: this.config.proxyAgent && Quester.getAgent(this.config.proxyAgent), | ||
agent: Quester.getAgent(this.config.proxyAgent), | ||
handshakeTimeout: this.config.timeout, | ||
@@ -73,2 +73,4 @@ ...options, | ||
function getAgent(url) { | ||
if (!url) | ||
return; | ||
if (agents[url]) | ||
@@ -84,6 +86,4 @@ return agents[url]; | ||
const options = import_shared.default.prepare(config); | ||
if (config.proxyAgent) { | ||
options.httpAgent = getAgent(config.proxyAgent); | ||
options.httpsAgent = getAgent(config.proxyAgent); | ||
} | ||
options.httpAgent = getAgent(config.proxyAgent); | ||
options.httpsAgent = getAgent(config.proxyAgent); | ||
return options; | ||
@@ -90,0 +90,0 @@ } |
@@ -26,3 +26,3 @@ var __create = Object.create; | ||
// packages/axios/src/shared.ts | ||
// satori/packages/axios/src/shared.ts | ||
var shared_exports = {}; | ||
@@ -29,0 +29,0 @@ __export(shared_exports, { |
{ | ||
"name": "cordis-axios", | ||
"description": "Axios service for cordis", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "lib/index.js", | ||
@@ -51,3 +51,3 @@ "typings": "lib/index.d.ts", | ||
"axios": "^0.27.2", | ||
"cosmokit": "^1.2.2", | ||
"cosmokit": "^1.2.3", | ||
"http-proxy-agent": "^5.0.0", | ||
@@ -54,0 +54,0 @@ "https-proxy-agent": "^5.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
32099
Updatedcosmokit@^1.2.3