@lambdatest/smartui-cli 4.1.49 → 4.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.cjs +25 -15
  2. package/package.json +5 -5
package/dist/index.cjs CHANGED
@@ -1544,6 +1544,10 @@ function launchBrowsers(ctx) {
1544
1544
  let browsers = {};
1545
1545
  const isHeadless = ((_a = process.env.HEADLESS) == null ? void 0 : _a.toLowerCase()) === "false" ? false : true;
1546
1546
  let launchOptions = { headless: isHeadless };
1547
+ const proxyServer = ctx.env.SMARTUI_HTTPS_PROXY || ctx.env.SMARTUI_HTTP_PROXY || ctx.env.HTTPS_PROXY || ctx.env.HTTP_PROXY;
1548
+ if (proxyServer) {
1549
+ launchOptions.proxy = { server: proxyServer };
1550
+ }
1547
1551
  if (ctx.config.web) {
1548
1552
  for (const browser of ctx.config.web.browsers) {
1549
1553
  switch (browser) {
@@ -2817,7 +2821,7 @@ var authExec_default = (ctx) => {
2817
2821
  };
2818
2822
 
2819
2823
  // package.json
2820
- var version = "4.1.49";
2824
+ var version = "4.1.50";
2821
2825
  var package_default = {
2822
2826
  name: "@lambdatest/smartui-cli",
2823
2827
  version,
@@ -2854,12 +2858,12 @@ var package_default = {
2854
2858
  "@types/which": "^3.0.2",
2855
2859
  ajv: "^8.12.0",
2856
2860
  "ajv-errors": "^3.0.0",
2857
- axios: "^1.6.0",
2861
+ axios: "^1.12.0",
2858
2862
  chalk: "^4.1.2",
2859
2863
  commander: "^11.1.0",
2860
- "cross-spawn": "^7.0.3",
2861
- fastify: "^4.24.3",
2862
- "form-data": "^4.0.0",
2864
+ "cross-spawn": "^7.0.6",
2865
+ fastify: "^4.29.1",
2866
+ "form-data": "^4.0.4",
2863
2867
  "json-stringify-safe": "^5.0.1",
2864
2868
  listr2: "^7.0.1",
2865
2869
  "node-cache": "^5.1.2",
@@ -5987,16 +5991,22 @@ function captureScreenshotsForConfig(ctx, browsers, urlConfig, browserName, rend
5987
5991
  ctx.log.debug(`Failed resolving tunnel/proxy details: ${e}`);
5988
5992
  }
5989
5993
  let page;
5990
- if (browserName == constants_default.CHROME) contextOptions.userAgent = constants_default.CHROME_USER_AGENT;
5991
- else if (browserName == constants_default.FIREFOX) contextOptions.userAgent = constants_default.FIREFOX_USER_AGENT;
5992
- else if (browserName == constants_default.SAFARI) contextOptions.userAgent = constants_default.SAFARI_USER_AGENT;
5993
- else if (browserName == constants_default.EDGE) contextOptions.userAgent = constants_default.EDGE_USER_AGENT;
5994
- if (ctx.config.userAgent || userAgent) {
5995
- if (ctx.config.userAgent !== "") {
5996
- contextOptions.userAgent = ctx.config.userAgent;
5997
- }
5998
- if (userAgent && userAgent !== "") {
5999
- contextOptions.userAgent = userAgent;
5994
+ if (!ctx.env.DO_NOT_USE_USER_AGENT) {
5995
+ if (browserName == constants_default.CHROME)
5996
+ contextOptions.userAgent = constants_default.CHROME_USER_AGENT;
5997
+ else if (browserName == constants_default.FIREFOX)
5998
+ contextOptions.userAgent = constants_default.FIREFOX_USER_AGENT;
5999
+ else if (browserName == constants_default.SAFARI)
6000
+ contextOptions.userAgent = constants_default.SAFARI_USER_AGENT;
6001
+ else if (browserName == constants_default.EDGE)
6002
+ contextOptions.userAgent = constants_default.EDGE_USER_AGENT;
6003
+ if (ctx.config.userAgent || userAgent) {
6004
+ if (ctx.config.userAgent !== "") {
6005
+ contextOptions.userAgent = ctx.config.userAgent;
6006
+ }
6007
+ if (userAgent && userAgent !== "") {
6008
+ contextOptions.userAgent = userAgent;
6009
+ }
6000
6010
  }
6001
6011
  }
6002
6012
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdatest/smartui-cli",
3
- "version": "4.1.49",
3
+ "version": "4.1.50",
4
4
  "description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
5
5
  "files": [
6
6
  "dist/**/*"
@@ -28,12 +28,12 @@
28
28
  "@types/which": "^3.0.2",
29
29
  "ajv": "^8.12.0",
30
30
  "ajv-errors": "^3.0.0",
31
- "axios": "^1.6.0",
31
+ "axios": "^1.12.0",
32
32
  "chalk": "^4.1.2",
33
33
  "commander": "^11.1.0",
34
- "cross-spawn": "^7.0.3",
35
- "fastify": "^4.24.3",
36
- "form-data": "^4.0.0",
34
+ "cross-spawn": "^7.0.6",
35
+ "fastify": "^4.29.1",
36
+ "form-data": "^4.0.4",
37
37
  "json-stringify-safe": "^5.0.1",
38
38
  "listr2": "^7.0.1",
39
39
  "node-cache": "^5.1.2",