Skip to content

Commit 95a90c3

Browse files
Merge pull request #171 from LambdaTest/stage
add support of SMARTUI_HTTP_PROXY keys
2 parents 27e0bd1 + 7bbcbc2 commit 95a90c3

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/smartui-cli",
3-
"version": "4.0.9",
3+
"version": "4.0.10",
44
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
55
"files": [
66
"dist/**/*"

src/lib/env.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export default (): Env => {
88
SMARTUI_DO_NOT_USE_CAPTURED_COOKIES,
99
HTTP_PROXY,
1010
HTTPS_PROXY,
11+
SMARTUI_HTTP_PROXY,
12+
SMARTUI_HTTPS_PROXY,
1113
GITHUB_ACTIONS,
1214
FIGMA_TOKEN,
1315
LT_USERNAME,
@@ -23,6 +25,8 @@ export default (): Env => {
2325
SMARTUI_GIT_INFO_FILEPATH,
2426
HTTP_PROXY,
2527
HTTPS_PROXY,
28+
SMARTUI_HTTP_PROXY,
29+
SMARTUI_HTTPS_PROXY,
2630
GITHUB_ACTIONS,
2731
FIGMA_TOKEN,
2832
LT_USERNAME,

src/lib/processSnapshot.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
2525
}
2626
if (!ctx.browser?.isConnected()) {
2727
if (ctx.env.HTTP_PROXY || ctx.env.HTTPS_PROXY) launchOptions.proxy = { server: ctx.env.HTTP_PROXY || ctx.env.HTTPS_PROXY };
28+
if (ctx.env.SMARTUI_HTTP_PROXY || ctx.env.SMARTUI_HTTPS_PROXY) launchOptions.proxy = { server: ctx.env.SMARTUI_HTTP_PROXY || ctx.env.SMARTUI_HTTPS_PROXY };
2829
ctx.browser = await chromium.launch(launchOptions);
2930
ctx.log.debug(`Chromium launched with options ${JSON.stringify(launchOptions)}`);
3031
}

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ export interface Env {
6060
SMARTUI_GIT_INFO_FILEPATH: string | undefined;
6161
HTTP_PROXY: string | undefined;
6262
HTTPS_PROXY: string | undefined;
63+
SMARTUI_HTTP_PROXY: string | undefined;
64+
SMARTUI_HTTPS_PROXY: string | undefined;
6365
GITHUB_ACTIONS: string | undefined;
6466
FIGMA_TOKEN: string | undefined;
6567
LT_USERNAME : string | undefined;

0 commit comments

Comments
 (0)