@wdio/sauce-service 9.9.3 → 9.10.0

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.
package/build/index.js CHANGED
@@ -6,7 +6,6 @@ import {
6
6
  import logger from "@wdio/logger";
7
7
 
8
8
  // src/utils.ts
9
- import os from "node:os";
10
9
  function isRDC(caps) {
11
10
  const { "appium:deviceName": appiumDeviceName = "", deviceName = "", platformName = "" } = caps;
12
11
  const name = appiumDeviceName || deviceName;
@@ -27,14 +26,6 @@ function ansiRegex() {
27
26
  ].join("|");
28
27
  return new RegExp(pattern, "g");
29
28
  }
30
- function getLocalIpAddress() {
31
- const interfaces = os.networkInterfaces();
32
- const internalAddresses = Object.keys(interfaces).map((nic) => {
33
- const addresses = interfaces[nic]?.filter((details) => details.internal) || [];
34
- return addresses.length ? addresses[0].address : void 0;
35
- }).filter(Boolean);
36
- return internalAddresses.length ? internalAddresses[0] : "127.0.0.1";
37
- }
38
29
 
39
30
  // src/constants.ts
40
31
  var DEFAULT_OPTIONS = {
@@ -65,10 +56,6 @@ var SauceLauncher = class {
65
56
  * generate random identifier if not provided
66
57
  */
67
58
  `SC-tunnel-${Math.random().toString().slice(2)}`;
68
- const tlsPassthroughDomains = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", getLocalIpAddress()]);
69
- if (this._options.sauceConnectOpts?.tlsPassthroughDomains) {
70
- this._options.sauceConnectOpts.tlsPassthroughDomains.split(",").forEach((domain) => tlsPassthroughDomains.add(domain));
71
- }
72
59
  let metadata = this._options.sauceConnectOpts?.metadata || "";
73
60
  if (!metadata.includes("runner=")) {
74
61
  metadata += `runner=${DEFAULT_RUNNER_NAME}`;
@@ -76,10 +63,9 @@ var SauceLauncher = class {
76
63
  const sauceConnectOpts = {
77
64
  tunnelName: sauceConnectTunnelName,
78
65
  ...this._options.sauceConnectOpts,
79
- tlsPassthroughDomains: Array.from(tlsPassthroughDomains).join(","),
80
66
  metadata,
81
67
  logger: this._options.sauceConnectOpts?.logger || ((output) => log.debug(`Sauce Connect Log: ${output}`)),
82
- ...!this._options.sauceConnectOpts?.logFile && this._config.outputDir ? { logfile: path.join(this._config.outputDir, "wdio-sauce-connect-tunnel.log") } : {}
68
+ ...!this._options.sauceConnectOpts?.logFile && this._config.outputDir ? { logFile: path.join(this._config.outputDir, "wdio-sauce-connect-tunnel.log") } : {}
83
69
  };
84
70
  const prepareCapability = makeCapabilityFactory(sauceConnectTunnelName);
85
71
  if (Array.isArray(capabilities)) {
@@ -1 +1 @@
1
- {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC5B,MAAM,WAAW,CAAA;AAElB,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAOpD,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,QAAQ,CAAC,eAAe;IAK9D,OAAO,CAAC,QAAQ;IAEhB,OAAO,CAAC,OAAO;IANnB,OAAO,CAAC,IAAI,CAAmB;IAC/B,OAAO,CAAC,oBAAoB,CAAC,CAAsB;gBAGvC,QAAQ,EAAE,kBAAkB,EACpC,CAAC,EAAE,KAAK,EACA,OAAO,EAAE,OAAO,CAAC,UAAU;IAKvC;;OAEG;IACG,SAAS,CACX,CAAC,EAAE,OAAO,CAAC,UAAU,EACrB,YAAY,EAAE,YAAY,CAAC,sBAAsB;IAyE/C,WAAW,CAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,SAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA6BxG;;OAEG;IACH,UAAU;CAOb"}
1
+ {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC5B,MAAM,WAAW,CAAA;AAElB,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAOpD,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,QAAQ,CAAC,eAAe;IAK9D,OAAO,CAAC,QAAQ;IAEhB,OAAO,CAAC,OAAO;IANnB,OAAO,CAAC,IAAI,CAAmB;IAC/B,OAAO,CAAC,oBAAoB,CAAC,CAAsB;gBAGvC,QAAQ,EAAE,kBAAkB,EACpC,CAAC,EAAE,KAAK,EACA,OAAO,EAAE,OAAO,CAAC,UAAU;IAKvC;;OAEG;IACG,SAAS,CACX,CAAC,EAAE,OAAO,CAAC,UAAU,EACrB,YAAY,EAAE,YAAY,CAAC,sBAAsB;IAmE/C,WAAW,CAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,SAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA6BxG;;OAEG;IACH,UAAU;CAOb"}
package/build/utils.d.ts CHANGED
@@ -54,5 +54,4 @@ export declare function isEmuSim(caps: WebdriverIO.Capabilities): boolean;
54
54
  */
55
55
  export declare function makeCapabilityFactory(tunnelName: string): (capability: WebdriverIO.Capabilities) => void;
56
56
  export declare function ansiRegex(): RegExp;
57
- export declare function getLocalIpAddress(): string;
58
57
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,WAMnD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,WAMtD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,gBAChC,WAAW,CAAC,YAAY,UAQ/C;AAED,wBAAgB,SAAS,WAOxB;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAS1C"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,WAMnD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,WAMtD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,gBAChC,WAAW,CAAC,YAAY,UAQ/C;AAED,wBAAgB,SAAS,WAOxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/sauce-service",
3
- "version": "9.9.3",
3
+ "version": "9.10.0",
4
4
  "description": "WebdriverIO service that provides a better integration into Sauce Labs",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-sauce-service",
@@ -36,14 +36,14 @@
36
36
  "@wdio/types": "9.9.0",
37
37
  "@wdio/utils": "9.9.0",
38
38
  "saucelabs": "^9.0.1",
39
- "webdriverio": "9.9.3"
39
+ "webdriverio": "9.10.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/ip": "^1.1.0",
43
- "@wdio/globals": "9.9.3"
43
+ "@wdio/globals": "9.10.0"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "8908cc4e3cd75e85bf47692477fc5c0ab58f9168"
48
+ "gitHead": "11ca2d175dd33b49639197c2a4ac4e26c9d852d1"
49
49
  }
@@ -1,145 +0,0 @@
1
- declare module WebdriverIO {
2
- interface ServiceOption extends SauceServiceConfig {}
3
- }
4
-
5
- interface SauceConnectOpts {
6
- /**
7
- * Sauce Labs username. You can also pass this through the
8
- * SAUCE_USERNAME environment variable
9
- */
10
- username?: string;
11
-
12
- /**
13
- * Sauce Labs access key. You can also pass this through the
14
- * SAUCE_ACCESS_KEY environment variable
15
- */
16
- accessKey?: string;
17
-
18
- /**
19
- * Log output from the `sc` process to stdout
20
- */
21
- verbose?: boolean;
22
-
23
- /**
24
- * Enable verbose debugging (optional)
25
- */
26
- verboseDebugging?: boolean;
27
-
28
- /**
29
- * Together with verbose debugging will output HTTP headers as well (optional)
30
- */
31
- vv?: boolean;
32
-
33
- /**
34
- * Port on which Sauce Connect's Selenium relay will listen for requests. Default 4445. (optional)
35
- */
36
- port?: number;
37
-
38
- /**
39
- * Proxy host and port that Sauce Connect should use to connect to the Sauce Labs cloud.
40
- * e.g. "localhost?:1234" (optional)
41
- */
42
- proxy?: string;
43
-
44
- /**
45
- * Change sauce connect logfile location (optional)
46
- */
47
- logfile?: string;
48
-
49
- /**
50
- * Period to log statistics about HTTP traffic in seconds (optional)
51
- */
52
- logStats?: number;
53
-
54
- /**
55
- * Maximum size before which the logfile is rotated (optional)
56
- */
57
- maxLogsize?: number;
58
-
59
- /**
60
- * Set to true to perform checks to detect possible misconfiguration or problems (optional)
61
- */
62
- doctor?: boolean;
63
-
64
- /**
65
- * Identity the tunnel for concurrent tunnels (optional)
66
- */
67
- tunnelIdentifier?: string;
68
-
69
- /**
70
- * An array or comma-separated list of regexes whose matches will not go through the tunnel. (optional)
71
- */
72
- fastFailRegexps?: string[];
73
-
74
- /**
75
- * An array or comma-separated list of domains that will not go through the tunnel. (optional)
76
- */
77
- directDomains?: string[];
78
-
79
- /**
80
- * A function to optionally write sauce-connect-launcher log messages. e.g. `console.log`. (optional)
81
- */
82
- logger?(): any;
83
-
84
- /**
85
- * An optional suffix to be appended to the `readyFile` name. useful when running multiple tunnels on the same
86
- * machine such as in a continuous integration environment. (optional)
87
- */
88
- readyFileId?: string;
89
-
90
- /**
91
- * Retry to establish a tunnel multiple times. (optional)
92
- */
93
- connectRetries?: number;
94
-
95
- /**
96
- * Time to wait between connection retries in ms. (optional)
97
- */
98
- connectRetryTimeout?: number;
99
-
100
- /**
101
- * Retry to download the sauce connect archive multiple times. (optional)
102
- */
103
- downloadRetries?: number;
104
-
105
- /**
106
- * Time to wait between download retries in ms. (optional)
107
- */
108
- downloadRetryTimeout?: number;
109
-
110
- /**
111
- * Path to a sauce connect executable (optional) by default the latest sauce connect version is downloaded
112
- */
113
- exe?: string;
114
-
115
- /**
116
- * Keep sc running after the node process exited this means you need to close the process manually once you are
117
- * done using the pidfile
118
- * Attention?: This only works with sc versions <= 4.3.16 and only on macOS and linux at the moment
119
- */
120
- detached?: boolean;
121
-
122
- /**
123
- * Specify a connect version instead of fetching the latest version, this currently does not support
124
- * checksum verification
125
- */
126
- connectVersion?: string;
127
- }
128
-
129
- interface SauceServiceConfig {
130
- /**
131
- * If true it runs Sauce Connect and opens a secure connection between a Sauce Labs virtual
132
- * machine running your browser tests.
133
- */
134
- sauceConnect?: boolean;
135
- /**
136
- * Apply Sauce Connect options (e.g. to change port number or logFile settings). See this
137
- * list for more information: https://github.com/bermi/sauce-connect-launcher#advanced-usage
138
- */
139
- sauceConnectOpts?: SauceConnectOpts;
140
- /**
141
- * Use Sauce Connect as a Selenium Relay. See more [here](https://wiki.saucelabs.com/display/DOCS/Using+the+Selenium+Relay+with+Sauce+Connect+Proxy).
142
- * @deprecated
143
- */
144
- scRelay?: boolean;
145
- }