@applitools/ec-client 1.7.32 → 1.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [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)
4
+
5
+
6
+ ### Features
7
+
8
+ * upgrade execution-grid-tunnel to 3 ([#2301](https://github.com/Applitools-Dev/sdk/issues/2301)) ([4f0426d](https://github.com/Applitools-Dev/sdk/commit/4f0426d5495142386d54121fde8bc1fb647728a7))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/tunnel-client bumped to 1.5.0
14
+ #### Features
15
+
16
+ * upgrade execution-grid-tunnel to 3 ([#2301](https://github.com/Applitools-Dev/sdk/issues/2301)) ([4f0426d](https://github.com/Applitools-Dev/sdk/commit/4f0426d5495142386d54121fde8bc1fb647728a7))
17
+ * @applitools/core-base bumped to 1.11.0
18
+ #### Features
19
+
20
+ * 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))
21
+ * report timestamp to backend ([#2278](https://github.com/Applitools-Dev/sdk/issues/2278)) ([3ff74c6](https://github.com/Applitools-Dev/sdk/commit/3ff74c66a33174025e5fab3979b748dfeb53e7b8))
22
+
3
23
  ## [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
24
 
5
25
 
@@ -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.0",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -52,13 +52,13 @@
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",
55
+ "@applitools/core-base": "1.11.0",
56
56
  "@applitools/driver": "1.16.5",
57
57
  "@applitools/logger": "2.0.14",
58
58
  "@applitools/req": "1.6.5",
59
59
  "@applitools/socket": "1.1.14",
60
60
  "@applitools/spec-driver-webdriver": "1.1.3",
61
- "@applitools/tunnel-client": "1.4.1",
61
+ "@applitools/tunnel-client": "1.5.0",
62
62
  "@applitools/utils": "1.7.0",
63
63
  "abort-controller": "3.0.0",
64
64
  "webdriver": "7.31.1",