@applitools/core 4.18.1 → 4.18.2

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,53 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.18.2](https://github.com/Applitools-Dev/sdk/compare/js/core@4.18.1...js/core@4.18.2) (2024-09-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * don't call check-network when executing binary and cli ([#2491](https://github.com/Applitools-Dev/sdk/issues/2491)) ([ef00d20](https://github.com/Applitools-Dev/sdk/commit/ef00d205450b7bbe7abc1bc9bce8d6970f769091))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/dom-capture bumped to 11.4.0
14
+ #### Features
15
+
16
+ * ability to capture all css props in computed style ([#2484](https://github.com/Applitools-Dev/sdk/issues/2484)) ([8769ee5](https://github.com/Applitools-Dev/sdk/commit/8769ee566f2d9e163437c7bcd385ec993f05f370))
17
+ * @applitools/driver bumped to 1.19.0
18
+ #### Features
19
+
20
+ * add support for env var APPLITOOLS_IS_IC ([#2469](https://github.com/Applitools-Dev/sdk/issues/2469)) ([87d7b5c](https://github.com/Applitools-Dev/sdk/commit/87d7b5cc1f7ea774c6b90504e85296f0681d0b1e))
21
+
22
+
23
+ #### Bug Fixes
24
+
25
+ * handle userAgent.brands returned as string ([#2453](https://github.com/Applitools-Dev/sdk/issues/2453)) ([dd6328b](https://github.com/Applitools-Dev/sdk/commit/dd6328be3e7d885714124a8e43aabaae3abecde9))
26
+ * searching for scrollable element multiple times ([#2493](https://github.com/Applitools-Dev/sdk/issues/2493)) ([d98db80](https://github.com/Applitools-Dev/sdk/commit/d98db8016c6312f467f244444c6f1a87bc09b7da))
27
+ * @applitools/spec-driver-webdriver bumped to 1.1.12
28
+
29
+ * @applitools/spec-driver-selenium bumped to 1.5.83
30
+
31
+ * @applitools/spec-driver-puppeteer bumped to 1.4.12
32
+
33
+ * @applitools/screenshoter bumped to 3.8.36
34
+
35
+ * @applitools/nml-client bumped to 1.8.10
36
+
37
+ * @applitools/tunnel-client bumped to 1.5.8
38
+ #### Bug Fixes
39
+
40
+ * upgrade execution-grid-tunnel ([#2475](https://github.com/Applitools-Dev/sdk/issues/2475)) ([e5952b4](https://github.com/Applitools-Dev/sdk/commit/e5952b4ca1bd0c065111ce1109b218f1fd68f6fc))
41
+
42
+
43
+
44
+ * @applitools/core-base bumped to 1.16.1
45
+ #### Bug Fixes
46
+
47
+ * infinity concurrency ([#2477](https://github.com/Applitools-Dev/sdk/issues/2477)) ([f488e16](https://github.com/Applitools-Dev/sdk/commit/f488e162f124acc249ed7b43b714f13c18306dc8))
48
+ * @applitools/ec-client bumped to 1.9.4
49
+
50
+
3
51
  ## [4.18.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.18.0...js/core@4.18.1) (2024-08-12)
4
52
 
5
53
 
package/dist/cli/cli.js CHANGED
@@ -34,6 +34,7 @@ const logs_1 = require("../troubleshoot/logs");
34
34
  const check_network_1 = require("../troubleshoot/check-network");
35
35
  const yargs_1 = __importDefault(require("yargs"));
36
36
  const utils = __importStar(require("@applitools/utils"));
37
+ const fs_1 = __importDefault(require("fs"));
37
38
  yargs_1.default
38
39
  .example([
39
40
  ['eyes universal', 'Run Eyes Universal server on default port (21077)'],
@@ -43,6 +44,7 @@ yargs_1.default
43
44
  ['eyes universal --shutdown-mode stdin', 'Run Eyes Universal server which will close once stdin stream will end'],
44
45
  ['eyes check-network', ''],
45
46
  ])
47
+ .version(JSON.parse(fs_1.default.readFileSync(require.resolve('../../package.json'), 'utf-8')).version)
46
48
  .command({
47
49
  command: 'universal',
48
50
  builder: yargs => yargs.options({
@@ -48,16 +48,21 @@ const resource = {
48
48
  contentType,
49
49
  };
50
50
  const UFG_PUT_RESOURCE_URL = `https://render-wus.applitools.com/sha256/${resource.hash.hash}?render-id=fake`;
51
- const accessTokenPromise = new Promise(async (resolve) => {
52
- const { stdout } = await utils.process.execute(`curl -s ${eyes_1.RENDER_INFO_URL} ${(0, utils_1.getProxyCurlArg)()}`, {
53
- maxBuffer: 10000000,
54
- });
55
- const accessToken = JSON.parse(stdout).accessToken;
56
- if (!accessToken)
57
- throw new Error('could not receive auth token since cURL command to get it failed.');
58
- resolve(accessToken);
59
- });
60
- const getCmd = async () => `curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: ${await accessTokenPromise}" -d '${resource.rawValue}' ${UFG_PUT_RESOURCE_URL} ${(0, utils_1.getProxyCurlArg)()}`;
51
+ const getAccessToken = (() => {
52
+ let accessToken;
53
+ return async () => {
54
+ if (!accessToken) {
55
+ const { stdout } = await utils.process.execute(`curl -s ${eyes_1.RENDER_INFO_URL} ${(0, utils_1.getProxyCurlArg)()}`, {
56
+ maxBuffer: 10000000,
57
+ });
58
+ accessToken = JSON.parse(stdout).accessToken;
59
+ if (!accessToken)
60
+ throw new Error('could not receive auth token since cURL command to get it failed.');
61
+ }
62
+ return accessToken;
63
+ };
64
+ })();
65
+ const getCmd = async () => `curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: ${await getAccessToken()}" -d '${resource.rawValue}' ${UFG_PUT_RESOURCE_URL} ${(0, utils_1.getProxyCurlArg)()}`;
61
66
  exports.getCmd = getCmd;
62
67
  const validateVgResult = (res, sha) => {
63
68
  if (!res || res.hash !== sha) {
@@ -70,7 +75,7 @@ exports.default = {
70
75
  method: 'PUT',
71
76
  headers: {
72
77
  'Content-Type': 'x-applitools-html/cdt',
73
- 'X-Auth-Token': await accessTokenPromise,
78
+ 'X-Auth-Token': await getAccessToken(),
74
79
  },
75
80
  body: resource.value,
76
81
  });
@@ -93,7 +98,7 @@ exports.default = {
93
98
  testServer: async () => {
94
99
  const url = new URL(UFG_PUT_RESOURCE_URL);
95
100
  const requests = (0, ufg_client_1.makeUFGRequests)({
96
- settings: { ufgServerUrl: url.origin, accessToken: await accessTokenPromise },
101
+ settings: { ufgServerUrl: url.origin, accessToken: await getAccessToken() },
97
102
  logger: (0, logger_1.makeLogger)(),
98
103
  });
99
104
  await requests.uploadResource({ resource });
@@ -107,7 +112,7 @@ exports.default = {
107
112
  method: 'PUT',
108
113
  headers: {
109
114
  'Content-Type': 'x-applitools-html/cdt',
110
- 'X-Auth-Token': await accessTokenPromise,
115
+ 'X-Auth-Token': await getAccessToken(),
111
116
  },
112
117
  });
113
118
  request.on('response', response => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/core",
3
- "version": "4.18.1",
3
+ "version": "4.18.2",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -74,18 +74,18 @@
74
74
  }
75
75
  },
76
76
  "dependencies": {
77
- "@applitools/core-base": "1.16.0",
78
- "@applitools/dom-capture": "11.3.1",
77
+ "@applitools/core-base": "1.16.1",
78
+ "@applitools/dom-capture": "11.4.0",
79
79
  "@applitools/dom-snapshot": "4.11.3",
80
- "@applitools/driver": "1.18.0",
81
- "@applitools/ec-client": "1.9.3",
80
+ "@applitools/driver": "1.19.0",
81
+ "@applitools/ec-client": "1.9.4",
82
82
  "@applitools/logger": "2.0.18",
83
- "@applitools/nml-client": "1.8.9",
83
+ "@applitools/nml-client": "1.8.10",
84
84
  "@applitools/req": "1.7.2",
85
- "@applitools/screenshoter": "3.8.35",
85
+ "@applitools/screenshoter": "3.8.36",
86
86
  "@applitools/snippets": "2.4.27",
87
87
  "@applitools/socket": "1.1.18",
88
- "@applitools/spec-driver-webdriver": "1.1.11",
88
+ "@applitools/spec-driver-webdriver": "1.1.12",
89
89
  "@applitools/ufg-client": "1.12.3",
90
90
  "@applitools/utils": "1.7.4",
91
91
  "@types/ws": "8.5.5",
@@ -100,11 +100,11 @@
100
100
  "devDependencies": {
101
101
  "@applitools/bongo": "^5.10.0",
102
102
  "@applitools/sea": "^1.0.0",
103
- "@applitools/spec-driver-puppeteer": "^1.4.11",
104
- "@applitools/spec-driver-selenium": "^1.5.82",
103
+ "@applitools/spec-driver-puppeteer": "^1.4.12",
104
+ "@applitools/spec-driver-selenium": "^1.5.83",
105
105
  "@applitools/test-server": "^1.2.2",
106
106
  "@applitools/test-utils": "^1.5.17",
107
- "@applitools/tunnel-client": "^1.5.7",
107
+ "@applitools/tunnel-client": "^1.5.8",
108
108
  "@types/node": "^12.20.55",
109
109
  "@types/selenium-webdriver": "^4.1.2",
110
110
  "@types/semver": "^7.5.8",