Skip to content

Commit

Permalink
fix the import for HttpsProxyAgent and HttpProxyAgent. Bump version t…
Browse files Browse the repository at this point in the history
…o 8.3.9 (#858)
  • Loading branch information
anandbagmar authored Oct 31, 2023
1 parent 097f725 commit 453bdcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appium-device-farm",
"version": "8.3.8",
"version": "8.3.9",
"description": "An appium 2.0 plugin that manages and create driver session on available devices",
"main": "./lib/index.js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import { Container } from 'typedi';
import logger from './logger';
import { v4 as uuidv4 } from 'uuid';
import axios from 'axios';
import HttpsProxyAgent from 'https-proxy-agent';
import HttpProxyAgent from 'http-proxy-agent';
import { HttpsProxyAgent } from 'https-proxy-agent';
import { HttpProxyAgent } from 'http-proxy-agent';
import { hubUrl, isHub, spinWith, stripAppiumPrefixes } from './helpers';
import { addProxyHandler, registerProxyMiddlware } from './wd-command-proxy';
import ChromeDriverManager from './device-managers/ChromeDriverManager';
Expand Down Expand Up @@ -228,11 +228,11 @@ class DevicePlugin extends BasePlugin {
},
data: capabilitiesToCreateSession,
};
logger.info(`Add proxy to axios config only if it is set: ${proxy}`);
logger.info(`Add proxy to axios config only if it is set: ${JSON.stringify(proxy)}`);
if (proxy) {
logger.info(`Added proxy to axios config: ${JSON.stringify(proxy)}`);
config.httpsAgent = new HttpsProxyAgent.HttpsProxyAgent(proxy);
config.httpAgent = new HttpProxyAgent.HttpProxyAgent(proxy);
config.httpsAgent = new HttpsProxyAgent(proxy);
config.httpAgent = new HttpProxyAgent(proxy);
config.proxy = false;
}

Expand Down

0 comments on commit 453bdcb

Please sign in to comment.