@applitools/ec-client 1.7.32 → 1.8.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.8.1](https://github.com/Applitools-Dev/sdk/compare/js/ec-client@1.8.0...js/ec-client@1.8.1) (2024-04-15)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * change tunnel idle timeout to 20 seconds ([#2318](https://github.com/Applitools-Dev/sdk/issues/2318)) ([9b3873c](https://github.com/Applitools-Dev/sdk/commit/9b3873c180a130a01212d857b084efe51d6d30a4))
9
+ * create tunnels in australia when passed region in create ([#2322](https://github.com/Applitools-Dev/sdk/issues/2322)) ([f679989](https://github.com/Applitools-Dev/sdk/commit/f6799894b9630d2c56cd85a34d377f488ed75b9c))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * @applitools/utils bumped to 1.7.1
15
+ #### Bug Fixes
16
+
17
+ * region intersection algorithm ([#2290](https://github.com/Applitools-Dev/sdk/issues/2290)) ([aaa8d0c](https://github.com/Applitools-Dev/sdk/commit/aaa8d0cbcb0e39d23d652c2caf9d27bfaed0d2eb))
18
+ * @applitools/tunnel-client bumped to 1.5.1
19
+ #### Bug Fixes
20
+
21
+ * create tunnels in australia when passed region in create ([#2322](https://github.com/Applitools-Dev/sdk/issues/2322)) ([f679989](https://github.com/Applitools-Dev/sdk/commit/f6799894b9630d2c56cd85a34d377f488ed75b9c))
22
+
23
+
24
+
25
+ * @applitools/logger bumped to 2.0.15
26
+
27
+ * @applitools/socket bumped to 1.1.15
28
+
29
+ * @applitools/req bumped to 1.6.6
30
+
31
+ * @applitools/image bumped to 1.1.10
32
+
33
+ * @applitools/spec-driver-webdriver bumped to 1.1.4
34
+
35
+ * @applitools/driver bumped to 1.16.6
36
+
37
+ * @applitools/core-base bumped to 1.11.1
38
+
39
+
40
+ ## [1.8.0](https://github.com/Applitools-Dev/sdk/compare/js/ec-client@1.7.32...js/ec-client@1.8.0) (2024-04-10)
41
+
42
+
43
+ ### Features
44
+
45
+ * upgrade execution-grid-tunnel to 3 ([#2301](https://github.com/Applitools-Dev/sdk/issues/2301)) ([4f0426d](https://github.com/Applitools-Dev/sdk/commit/4f0426d5495142386d54121fde8bc1fb647728a7))
46
+
47
+
48
+ ### Dependencies
49
+
50
+ * @applitools/tunnel-client bumped to 1.5.0
51
+ #### Features
52
+
53
+ * upgrade execution-grid-tunnel to 3 ([#2301](https://github.com/Applitools-Dev/sdk/issues/2301)) ([4f0426d](https://github.com/Applitools-Dev/sdk/commit/4f0426d5495142386d54121fde8bc1fb647728a7))
54
+ * @applitools/core-base bumped to 1.11.0
55
+ #### Features
56
+
57
+ * refactor check to have a modular structure ([#2307](https://github.com/Applitools-Dev/sdk/issues/2307)) ([b9818f4](https://github.com/Applitools-Dev/sdk/commit/b9818f46e0a579ad0a4a6beaf142171aea7ce0fd))
58
+ * report timestamp to backend ([#2278](https://github.com/Applitools-Dev/sdk/issues/2278)) ([3ff74c6](https://github.com/Applitools-Dev/sdk/commit/3ff74c66a33174025e5fab3979b748dfeb53e7b8))
59
+
3
60
  ## [1.7.32](https://github.com/Applitools-Dev/sdk/compare/js/ec-client@1.7.31...js/ec-client@1.7.32) (2024-04-01)
4
61
 
5
62
 
package/dist/client.js CHANGED
@@ -41,7 +41,7 @@ async function makeECClient({ settings, logger: defaultLogger, } = {}) {
41
41
  (_k = (_12 = settings.tunnel).pool) !== null && _k !== void 0 ? _k : (_12.pool = {});
42
42
  (_l = (_13 = settings.tunnel.pool).maxInuse) !== null && _l !== void 0 ? _l : (_13.maxInuse = (_m = utils.general.getEnvValue('TUNNEL_POOL_MAX_INUSE', 'number')) !== null && _m !== void 0 ? _m : 4);
43
43
  (_o = (_14 = settings.tunnel.pool).timeout) !== null && _o !== void 0 ? _o : (_14.timeout = {});
44
- (_p = (_15 = settings.tunnel.pool.timeout).idle) !== null && _p !== void 0 ? _p : (_15.idle = (_q = utils.general.getEnvValue('TUNNEL_POOL_TIMEOUT_IDLE', 'number')) !== null && _q !== void 0 ? _q : 20 * 60000);
44
+ (_p = (_15 = settings.tunnel.pool.timeout).idle) !== null && _p !== void 0 ? _p : (_15.idle = (_q = utils.general.getEnvValue('TUNNEL_POOL_TIMEOUT_IDLE', 'number')) !== null && _q !== void 0 ? _q : 20000);
45
45
  (_r = (_16 = settings.tunnel.pool.timeout).expiration) !== null && _r !== void 0 ? _r : (_16.expiration = (_s = utils.general.getEnvValue('TUNNEL_POOL_TIMEOUT_EXPIRATION', 'number')) !== null && _s !== void 0 ? _s : 20 * 60000);
46
46
  (_t = settings.options) !== null && _t !== void 0 ? _t : (settings.options = {});
47
47
  (_u = (_17 = settings.options).eyesServerUrl) !== null && _u !== void 0 ? _u : (_17.eyesServerUrl = (_w = (_v = utils.general.getEnvValue('EYES_SERVER_URL')) !== null && _v !== void 0 ? _v : utils.general.getEnvValue('SERVER_URL')) !== null && _w !== void 0 ? _w : 'https://eyesapi.applitools.com');
@@ -28,9 +28,9 @@ const abort_controller_1 = require("abort-controller");
28
28
  const buffer_1 = require("buffer");
29
29
  const tunnel_client_1 = require("@applitools/tunnel-client");
30
30
  const utils = __importStar(require("@applitools/utils"));
31
- const SERVER_URLS = {
32
- 'us-west': 'https://exec-wus.applitools.com',
33
- australia: 'https://exec-au.applitools.com',
31
+ const SERVERS = {
32
+ 'us-west': { url: 'https://exec-wus.applitools.com', regionName: 'us-west' },
33
+ australia: { url: 'https://exec-au.applitools.com', regionName: 'australia-southeast' },
34
34
  };
35
35
  const RETRY_BACKOFF = [
36
36
  ...Array(5).fill(2000),
@@ -66,15 +66,17 @@ function makeStartSession({ settings, req, tunnels }) {
66
66
  options,
67
67
  };
68
68
  if (options.region) {
69
- if (SERVER_URLS[options.region])
70
- session.ecServerUrl = SERVER_URLS[options.region];
69
+ if (SERVERS[options.region])
70
+ session.ecServerUrl = SERVERS[options.region].url;
71
71
  else
72
72
  throw new Error(`Failed to create session in unknown region ${options.region}`);
73
73
  }
74
74
  if (options.tunnel && tunnels) {
75
- // TODO should be removed once tunnel spawning issue is solved
76
- await (0, tunnel_client_1.prepareTunnelEnvironment)({ settings: { tunnelServerUrl: session.ecServerUrl }, logger });
77
- session.tunnels = await tunnels.acquire({ ...session.credentials, tunnelServerUrl: session.ecServerUrl });
75
+ if (utils.general.getEnvValue('EC_TUNNEL_USE_FRP', 'boolean')) {
76
+ await (0, tunnel_client_1.prepareTunnelEnvironment)({ settings: { tunnelServerUrl: session.ecServerUrl }, logger });
77
+ }
78
+ const region = options.region ? SERVERS[options.region].regionName : undefined;
79
+ session.tunnels = await tunnels.acquire({ ...session.credentials, region });
78
80
  }
79
81
  const applitoolsCapabilities = Object.fromEntries([
80
82
  ...Object.entries(options).map(([key, value]) => [`applitools:${key}`, value]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/ec-client",
3
- "version": "1.7.32",
3
+ "version": "1.8.1",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -52,14 +52,14 @@
52
52
  "test:it": "MOCHA_GROUP=it run --top-level mocha './test/it/*.spec.ts'"
53
53
  },
54
54
  "dependencies": {
55
- "@applitools/core-base": "1.10.1",
56
- "@applitools/driver": "1.16.5",
57
- "@applitools/logger": "2.0.14",
58
- "@applitools/req": "1.6.5",
59
- "@applitools/socket": "1.1.14",
60
- "@applitools/spec-driver-webdriver": "1.1.3",
61
- "@applitools/tunnel-client": "1.4.1",
62
- "@applitools/utils": "1.7.0",
55
+ "@applitools/core-base": "1.11.1",
56
+ "@applitools/driver": "1.16.6",
57
+ "@applitools/logger": "2.0.15",
58
+ "@applitools/req": "1.6.6",
59
+ "@applitools/socket": "1.1.15",
60
+ "@applitools/spec-driver-webdriver": "1.1.4",
61
+ "@applitools/tunnel-client": "1.5.1",
62
+ "@applitools/utils": "1.7.1",
63
63
  "abort-controller": "3.0.0",
64
64
  "webdriver": "7.31.1",
65
65
  "yargs": "^17.7.2"