Skip to content

Commit 6ad54f5

Browse files
roshan04Karan Nagpal
authored andcommitted
handling flow for sync mode
1 parent ff3727d commit 6ad54f5

File tree

3 files changed

+56
-9
lines changed

3 files changed

+56
-9
lines changed

bin/commands/runs.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,7 @@ module.exports = function run(args, rawArgs) {
177177

178178
// download build artifacts
179179
if (utils.nonEmptyArray(bsConfig.run_settings.downloads)) {
180-
try {
181-
await downloadBuildArtifacts(bsConfig, data.build_id, args, rawArgs);
182-
} catch (err) {
183-
logger.error(err);
184-
}
180+
await downloadBuildArtifacts(bsConfig, data.build_id, args, rawArgs);
185181
}
186182

187183
// Generate custom report!

bin/helpers/a.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// with proxy
2+
let a = {
3+
path: 'https://api.browserstack.com/automate/cypress/v1/builds/8a4ec797f6565b72d84345bb507acd0f3a84f194/build_artifacts',
4+
method: 'GET',
5+
headers: {
6+
Accept: 'application/json, text/plain, */*',
7+
'User-Agent': 'BStack-Cypress-CLI/1.10.0 (x64/darwin/20.6.0)',
8+
host: 'api.browserstack.com'
9+
},
10+
agent: undefined,
11+
agents: { http: undefined, https: undefined },
12+
auth: 'roshanni_70sPLl:qN7mJW7aZ8P5Gnu1XtwX',
13+
hostname: 'localhost',
14+
port: '8889',
15+
host: 'localhost',
16+
beforeRedirect: [Function: beforeRedirect]
17+
}
18+
let c = {
19+
path: '/automate/cypress/v1/builds/8a4ec797f6565b72d84345bb507acd0f3a84f194/build_artifacts',
20+
method: 'GET',
21+
headers: {
22+
Accept: 'application/json, text/plain, */*',
23+
'User-Agent': 'BStack-Cypress-CLI/1.10.0 (x64/darwin/20.6.0)',
24+
host: 'api.browserstack.com'
25+
},
26+
agent: undefined,
27+
agents: { http: undefined, https: undefined },
28+
auth: 'roshanni_70sPLl:qN7mJW7aZ8P5Gnu1XtwX',
29+
hostname: 'localhost',
30+
port: '8889',
31+
host: 'localhost',
32+
beforeRedirect: [Function: beforeRedirect]
33+
}
34+
35+
// without proxy
36+
let b = {
37+
path: '/automate/cypress/v1/builds/8a4ec797f6565b72d84345bb507acd0f3a84f194/build_artifacts',
38+
method: 'GET',
39+
headers: {
40+
Accept: 'application/json, text/plain, */*',
41+
'User-Agent': 'BStack-Cypress-CLI/1.10.0 (x64/darwin/20.6.0)'
42+
},
43+
agent: undefined,
44+
agents: { http: undefined, https: undefined },
45+
auth: 'roshanni_70sPLl:qN7mJW7aZ8P5Gnu1XtwX',
46+
hostname: 'api.browserstack.com',
47+
port: null
48+
}

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,24 @@
1414
"dependencies": {
1515
"archiver": "^5.2.0",
1616
"async": "^3.2.0",
17+
"axios": "^0.20.0",
18+
"axios-curlirize": "^1.3.7",
1719
"browserstack-local": "^1.4.8",
1820
"chalk": "^4.1.0",
1921
"fs-extra": "^8.1.0",
2022
"getmac": "^5.17.0",
2123
"glob": "^7.1.6",
2224
"mkdirp": "^1.0.3",
25+
"node-fetch-with-proxy": "^0.1.6",
2326
"request": "^2.88.0",
2427
"requestretry": "^4.1.0",
28+
"socks-proxy-agent": "^6.1.1",
2529
"table": "^5.4.6",
30+
"unzipper": "^0.10.11",
31+
"update-notifier": "^5.1.0",
2632
"uuid": "^8.3.2",
2733
"winston": "^2.3.1",
28-
"yargs": "^14.2.3",
29-
"axios": "^0.21.1",
30-
"unzipper": "^0.10.11",
31-
"update-notifier": "^5.1.0"
34+
"yargs": "^14.2.3"
3235
},
3336
"repository": {
3437
"type": "git",

0 commit comments

Comments
 (0)