@applitools/core 4.56.0 → 4.56.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,79 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.56.2](https://github.com/Applitools-Dev/sdk/compare/js/core@4.56.1...js/core@4.56.2) (2026-02-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* closing eyes without open | FLD-2814 ([#2916](https://github.com/Applitools-Dev/sdk/issues/2916)) ([d5425df](https://github.com/Applitools-Dev/sdk/commit/d5425dfedcc98bebd547d0d1ce5bcd10fa675c0d))
|
|
9
|
+
* tunnel client binary ([#3535](https://github.com/Applitools-Dev/sdk/issues/3535)) ([5c4752e](https://github.com/Applitools-Dev/sdk/commit/5c4752e3dd9cc42052d23793284dc6a0cd8e3b72))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Performance Improvements
|
|
13
|
+
|
|
14
|
+
* add timing logs to classic | FLD-4137 ([#3543](https://github.com/Applitools-Dev/sdk/issues/3543)) ([de2b0aa](https://github.com/Applitools-Dev/sdk/commit/de2b0aaf08d813f2c59e9552947c2f4fbc12da48))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* @applitools/logger bumped to 2.2.8
|
|
20
|
+
#### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* use utils for environment variable retrieval in logger handlers ([#3551](https://github.com/Applitools-Dev/sdk/issues/3551)) ([caf97f3](https://github.com/Applitools-Dev/sdk/commit/caf97f34207bc3b8ee6ccda2855c27a99a262f8c))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
#### Performance Improvements
|
|
26
|
+
|
|
27
|
+
* add timing logs to classic | FLD-4137 ([#3543](https://github.com/Applitools-Dev/sdk/issues/3543)) ([de2b0aa](https://github.com/Applitools-Dev/sdk/commit/de2b0aaf08d813f2c59e9552947c2f4fbc12da48))
|
|
28
|
+
* @applitools/tunnel-client bumped to 1.11.6
|
|
29
|
+
#### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* tunnel client binary ([#3535](https://github.com/Applitools-Dev/sdk/issues/3535)) ([5c4752e](https://github.com/Applitools-Dev/sdk/commit/5c4752e3dd9cc42052d23793284dc6a0cd8e3b72))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
* @applitools/dom-snapshot bumped to 4.15.8
|
|
36
|
+
|
|
37
|
+
* @applitools/socket bumped to 1.3.9
|
|
38
|
+
|
|
39
|
+
* @applitools/req bumped to 1.8.8
|
|
40
|
+
|
|
41
|
+
* @applitools/dom-capture bumped to 11.6.9
|
|
42
|
+
|
|
43
|
+
* @applitools/driver bumped to 1.25.1
|
|
44
|
+
|
|
45
|
+
* @applitools/spec-driver-webdriver bumped to 1.5.6
|
|
46
|
+
|
|
47
|
+
* @applitools/spec-driver-selenium bumped to 1.7.12
|
|
48
|
+
|
|
49
|
+
* @applitools/spec-driver-puppeteer bumped to 1.7.1
|
|
50
|
+
|
|
51
|
+
* @applitools/screenshoter bumped to 3.12.13
|
|
52
|
+
|
|
53
|
+
* @applitools/nml-client bumped to 1.11.16
|
|
54
|
+
|
|
55
|
+
* @applitools/ufg-client bumped to 1.19.1
|
|
56
|
+
|
|
57
|
+
* @applitools/ec-client bumped to 1.12.18
|
|
58
|
+
|
|
59
|
+
* @applitools/test-server bumped to 1.4.0
|
|
60
|
+
#### Features
|
|
61
|
+
|
|
62
|
+
* make eyes-browser truly browser-importable ([#3512](https://github.com/Applitools-Dev/sdk/issues/3512)) ([9574a2f](https://github.com/Applitools-Dev/sdk/commit/9574a2fa45ec80466dfe93744c8a736f40fb51c3))
|
|
63
|
+
* mcp server test results support and improvements to initial setup ([#3518](https://github.com/Applitools-Dev/sdk/issues/3518)) ([ef6c27b](https://github.com/Applitools-Dev/sdk/commit/ef6c27b9e35dc54fd588e19a4811631433e15dbb))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
* @applitools/core-base bumped to 1.31.2
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [4.56.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.56.0...js/core@4.56.1) (2026-01-27)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Bug Fixes
|
|
74
|
+
|
|
75
|
+
* take branch and parent from scm integration and populate in field- fld-4074 ([#3492](https://github.com/Applitools-Dev/sdk/issues/3492)) ([0af3128](https://github.com/Applitools-Dev/sdk/commit/0af31283888c2896604656251df2455d39c93cbf))
|
|
76
|
+
|
|
3
77
|
## [4.56.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.55.0...js/core@4.56.0) (2026-01-21)
|
|
4
78
|
|
|
5
79
|
|
|
@@ -5,8 +5,8 @@ const req_1 = require("@applitools/req");
|
|
|
5
5
|
const { captureDomPoll, pollResult, captureDomPollForIE, pollResultForIE } = require('@applitools/dom-capture');
|
|
6
6
|
async function takeDomCapture({ driver, settings, logger, }) {
|
|
7
7
|
var _a;
|
|
8
|
-
const environment = await driver.getEnvironment();
|
|
9
|
-
const features = await driver.getFeatures();
|
|
8
|
+
const environment = await logger.withTime(driver.getEnvironment(), 'takeDomCapture.getEnvironment');
|
|
9
|
+
const features = await logger.withTime(driver.getFeatures(), 'takeDomCapture.getFeatures');
|
|
10
10
|
const isLegacyBrowser = environment.isIE || environment.isEdgeLegacy;
|
|
11
11
|
const arg = {
|
|
12
12
|
chunkByteLength: (_a = settings === null || settings === void 0 ? void 0 : settings.chunkByteLength) !== null && _a !== void 0 ? _a : (Number(process.env.APPLITOOLS_SCRIPT_RESULT_MAX_BYTE_LENGTH) ||
|
|
@@ -21,8 +21,8 @@ async function takeDomCapture({ driver, settings, logger, }) {
|
|
|
21
21
|
? pollResult
|
|
22
22
|
: `/* @applitools/dom-capture */return (${isLegacyBrowser ? pollResultForIE : pollResult}).apply(null, arguments);`,
|
|
23
23
|
};
|
|
24
|
-
const url = await driver.getUrl();
|
|
25
|
-
const dom = await captureContextDom(driver.mainContext);
|
|
24
|
+
const url = await logger.withTime(driver.getUrl(), 'takeDomCapture.getUrl');
|
|
25
|
+
const dom = await logger.withTime(captureContextDom(driver.mainContext), 'takeDomCapture.captureContextDom');
|
|
26
26
|
// TODO save debug DOM like we have for debug screenshots
|
|
27
27
|
return dom;
|
|
28
28
|
async function captureContextDom(context) {
|
|
@@ -29,25 +29,28 @@ const take_screenshot_1 = require("../../automation/utils/take-screenshot");
|
|
|
29
29
|
const utils = __importStar(require("@applitools/utils"));
|
|
30
30
|
async function takeScreenshots({ driver, settings, logger, }) {
|
|
31
31
|
var _a, _b;
|
|
32
|
-
const screenshot = await (0, take_screenshot_1.takeScreenshot)({ driver, settings, logger });
|
|
32
|
+
const screenshot = await logger.withTime((0, take_screenshot_1.takeScreenshot)({ driver, settings, logger }), 'takeScreenshot');
|
|
33
|
+
const name = await logger.withTime(driver.getTitle(), 'getTitle');
|
|
34
|
+
const source = await logger.withTime(driver.getUrl(), 'getUrl');
|
|
35
|
+
const image = await logger.withTime(screenshot.image.toPng(), 'toPng');
|
|
33
36
|
const baseTarget = {
|
|
34
|
-
name
|
|
35
|
-
source
|
|
36
|
-
image
|
|
37
|
+
name,
|
|
38
|
+
source,
|
|
39
|
+
image,
|
|
37
40
|
locationInViewport: utils.geometry.location(screenshot.region),
|
|
38
41
|
calculatedRegions: screenshot.calculatedRegions,
|
|
39
42
|
isTransformed: true,
|
|
40
43
|
};
|
|
41
|
-
const environment = await driver.getEnvironment();
|
|
44
|
+
const environment = await logger.withTime(driver.getEnvironment(), 'getEnvironment');
|
|
42
45
|
if (environment.isWeb && settings.domSettings) {
|
|
43
46
|
if (settings.fully)
|
|
44
|
-
await ((_a = screenshot.scrollingElement) === null || _a === void 0 ? void 0 : _a.setAttribute('data-applitools-scroll', 'true'));
|
|
47
|
+
await logger.withTime((_a = screenshot.scrollingElement) === null || _a === void 0 ? void 0 : _a.setAttribute('data-applitools-scroll', 'true'), 'setAttribute');
|
|
45
48
|
else
|
|
46
|
-
await ((_b = screenshot.element) === null || _b === void 0 ? void 0 : _b.setAttribute('data-applitools-scroll', 'true'));
|
|
47
|
-
baseTarget.dom = await (0, take_dom_capture_1.takeDomCapture)({ driver, settings: settings.domSettings, logger }).catch(error => {
|
|
49
|
+
await logger.withTime((_b = screenshot.element) === null || _b === void 0 ? void 0 : _b.setAttribute('data-applitools-scroll', 'true'), 'setAttribute');
|
|
50
|
+
baseTarget.dom = await logger.withTime((0, take_dom_capture_1.takeDomCapture)({ driver, settings: settings.domSettings, logger }).catch(error => {
|
|
48
51
|
logger.error('failed to capture DOM', error);
|
|
49
52
|
return undefined;
|
|
50
|
-
});
|
|
53
|
+
}), 'takeDomCapture');
|
|
51
54
|
}
|
|
52
55
|
if (settings.calculateView) {
|
|
53
56
|
const scrollingElement = await driver.mainContext.getScrollingElement();
|
package/dist/open-eyes.js
CHANGED
|
@@ -168,8 +168,8 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
|
|
|
168
168
|
}); // TODO solve the types issue
|
|
169
169
|
/////// END FUNCTION BODY ///////////////////
|
|
170
170
|
async function populateAutoScmInfo(batchId) {
|
|
171
|
-
var _a, _b;
|
|
172
|
-
var
|
|
171
|
+
var _a, _b, _c, _d;
|
|
172
|
+
var _e;
|
|
173
173
|
const branchName = await (0, extract_git_info_1.extractGitBranch)({ execOptions: { cwd }, logger });
|
|
174
174
|
const { owner: repoOwner, name: repoName } = await (0, extract_git_info_1.extractGitRepo)({ execOptions: { cwd }, logger });
|
|
175
175
|
const buildId = await (0, extract_git_info_1.extractBuildIdFromCI)();
|
|
@@ -185,8 +185,10 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
|
|
|
185
185
|
if (scmInfo) {
|
|
186
186
|
(_a = settings.batch) !== null && _a !== void 0 ? _a : (settings.batch = {});
|
|
187
187
|
settings.batch.id = isRealBatchId(settings.batch.id) ? settings.batch.id : batchId;
|
|
188
|
-
(_b = (
|
|
189
|
-
//
|
|
188
|
+
(_b = (_e = settings.batch).buildId) !== null && _b !== void 0 ? _b : (_e.buildId = buildId);
|
|
189
|
+
// Takes data if it was not set by env. This is the priority according to yotam from BE
|
|
190
|
+
(_c = settings.branchName) !== null && _c !== void 0 ? _c : (settings.branchName = scmInfo.scmSourceBranch || undefined);
|
|
191
|
+
(_d = settings.parentBranchName) !== null && _d !== void 0 ? _d : (settings.parentBranchName = scmInfo.scmTargetBranch || undefined);
|
|
190
192
|
}
|
|
191
193
|
}
|
|
192
194
|
else {
|
|
@@ -150,6 +150,15 @@ exports.extractBranchingTimestamp = utils.general.cachify(async function ({ bran
|
|
|
150
150
|
logger = logger.extend({ tags: [`extract-branching-timestamp-${utils.general.shortid()}`] });
|
|
151
151
|
// Get the primary remote name (cached)
|
|
152
152
|
const remoteName = await (0, exports.getPrimaryRemoteName)({ execOptions, logger });
|
|
153
|
+
const shallowCheckResult = await executeWithLog('git rev-parse --is-shallow-repository', {
|
|
154
|
+
execOptions,
|
|
155
|
+
logger,
|
|
156
|
+
});
|
|
157
|
+
const isShallow = shallowCheckResult.stdout.trim() === 'true';
|
|
158
|
+
if (isShallow) {
|
|
159
|
+
logger.log('extractBranchingTimestamp - Repository is a shallow clone, attempting to unshallow');
|
|
160
|
+
await executeFetchStrategy(isShallow, execOptions, logger);
|
|
161
|
+
}
|
|
153
162
|
// Step 1: Try with remote refs first (fast path - uses already-fetched remote data)
|
|
154
163
|
const command = `HASH=$(git merge-base ${branchName} ${parentBranchName}) && git show -q --format=%aI $HASH`;
|
|
155
164
|
let result = await executeWithLog(command, { execOptions, logger });
|
|
@@ -190,14 +199,6 @@ exports.extractBranchingTimestamp = utils.general.cachify(async function ({ bran
|
|
|
190
199
|
}
|
|
191
200
|
}
|
|
192
201
|
}
|
|
193
|
-
// Step 4: Fallback to unshallow if still no result
|
|
194
|
-
if (!result.stdout) {
|
|
195
|
-
const command = `HASH=$(git merge-base ${branchName} ${parentBranchName}) && git show -q --format=%aI $HASH`;
|
|
196
|
-
result = await executeWithLog(`git fetch ${remoteName} --unshallow --filter=tree:0 && ${command}`, {
|
|
197
|
-
execOptions,
|
|
198
|
-
logger,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
202
|
const timestamp = result.stdout.replace(/\s/g, '');
|
|
202
203
|
if (isISODate(timestamp)) {
|
|
203
204
|
logger.log('git branching timestamp successfully extracted', timestamp);
|
|
@@ -323,7 +324,7 @@ async function executeFetchStrategy(isShallow, execOptions, logger) {
|
|
|
323
324
|
if (isShallow) {
|
|
324
325
|
// Shallow clone needs full unshallow for initial topology discovery
|
|
325
326
|
logger.log(`Shallow repository detected, unshallowing to enable topology discovery...`);
|
|
326
|
-
await executeWithLog(`git fetch ${remoteName} --unshallow --filter=
|
|
327
|
+
await executeWithLog(`git fetch ${remoteName} --unshallow --filter=blob:none`, {
|
|
327
328
|
execOptions,
|
|
328
329
|
logger,
|
|
329
330
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.56.
|
|
3
|
+
"version": "4.56.2",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -48,9 +48,7 @@
|
|
|
48
48
|
"lint": "run --top-level eslint '**/*.ts'",
|
|
49
49
|
"build": "yarn build:dist",
|
|
50
50
|
"build:dist": "run --top-level tsc --project ./tsconfig.build.json",
|
|
51
|
-
"build:bin": "
|
|
52
|
-
"build:bin:zip": "zip -j ./bin/core.zip $(find ./bin -type f -not -name '*.zip' -not -name '*.tar.gz' | xargs)",
|
|
53
|
-
"build:bin:tgz": "tar -czf ./bin/core.tar.gz $(find ./bin -type f -not -name '*.zip' -not -name '*.tar.gz' | xargs)",
|
|
51
|
+
"build:bin": "bash ../../../scripts/build-binary-local.sh core",
|
|
54
52
|
"test": "run --top-level mocha './test/**/*.spec.ts' --exclude './test/bin/**' --exclude './test/e2e/mocha-sync/**' --parallel --jobs ${MOCHA_JOBS:-15} --exit --require ./test/mocha-global-setup.js",
|
|
55
53
|
"test:local": "MOCHA_OMIT_TAGS=sauce,browserstack run test",
|
|
56
54
|
"test:sauce": "MOCHA_ONLY_TAGS=sauce,browserstack run test",
|
|
@@ -62,37 +60,20 @@
|
|
|
62
60
|
"setup": "run --top-level browsers:setup && run --top-level xvfb:setup",
|
|
63
61
|
"setup:standalone": "sh -c 'yarn chromedriver --port=4444 --verbose &'"
|
|
64
62
|
},
|
|
65
|
-
"sea": {
|
|
66
|
-
"bin": "eyes-core",
|
|
67
|
-
"certs": {
|
|
68
|
-
"win": {
|
|
69
|
-
"cert": "env.CODE_SIGNING_CERT_WIN",
|
|
70
|
-
"pass": "env.CODE_SIGNING_PASS_WIN"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"targets": {
|
|
74
|
-
"node20.11-linux-x64-glibc-217": "./bin/core-linux",
|
|
75
|
-
"node20-linux-x64-musl": "./bin/core-alpine",
|
|
76
|
-
"node20-linux-arm64": "./bin/core-linux-arm64",
|
|
77
|
-
"node20-darwin-x64": "./bin/core-macos",
|
|
78
|
-
"node20-win-x64": "./bin/core-win.exe",
|
|
79
|
-
"node20-darwin-arm64": "./bin/core-macos-arm64"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
63
|
"dependencies": {
|
|
83
|
-
"@applitools/core-base": "1.31.
|
|
84
|
-
"@applitools/dom-capture": "11.6.
|
|
85
|
-
"@applitools/dom-snapshot": "4.15.
|
|
86
|
-
"@applitools/driver": "1.25.
|
|
87
|
-
"@applitools/ec-client": "1.12.
|
|
88
|
-
"@applitools/logger": "2.2.
|
|
89
|
-
"@applitools/nml-client": "1.11.
|
|
90
|
-
"@applitools/req": "1.8.
|
|
91
|
-
"@applitools/screenshoter": "3.12.
|
|
64
|
+
"@applitools/core-base": "1.31.2",
|
|
65
|
+
"@applitools/dom-capture": "11.6.9",
|
|
66
|
+
"@applitools/dom-snapshot": "4.15.8",
|
|
67
|
+
"@applitools/driver": "1.25.1",
|
|
68
|
+
"@applitools/ec-client": "1.12.18",
|
|
69
|
+
"@applitools/logger": "2.2.8",
|
|
70
|
+
"@applitools/nml-client": "1.11.16",
|
|
71
|
+
"@applitools/req": "1.8.8",
|
|
72
|
+
"@applitools/screenshoter": "3.12.13",
|
|
92
73
|
"@applitools/snippets": "2.7.0",
|
|
93
|
-
"@applitools/socket": "1.3.
|
|
94
|
-
"@applitools/spec-driver-webdriver": "1.5.
|
|
95
|
-
"@applitools/ufg-client": "1.19.
|
|
74
|
+
"@applitools/socket": "1.3.9",
|
|
75
|
+
"@applitools/spec-driver-webdriver": "1.5.6",
|
|
76
|
+
"@applitools/ufg-client": "1.19.1",
|
|
96
77
|
"@applitools/utils": "1.14.1",
|
|
97
78
|
"@types/ws": "8.5.5",
|
|
98
79
|
"abort-controller": "3.0.0",
|
|
@@ -106,12 +87,11 @@
|
|
|
106
87
|
},
|
|
107
88
|
"devDependencies": {
|
|
108
89
|
"@applitools/bongo": "^5.10.0",
|
|
109
|
-
"@applitools/
|
|
110
|
-
"@applitools/spec-driver-
|
|
111
|
-
"@applitools/
|
|
112
|
-
"@applitools/test-server": "^1.3.5",
|
|
90
|
+
"@applitools/spec-driver-puppeteer": "^1.7.1",
|
|
91
|
+
"@applitools/spec-driver-selenium": "^1.7.12",
|
|
92
|
+
"@applitools/test-server": "^1.4.0",
|
|
113
93
|
"@applitools/test-utils": "^1.5.17",
|
|
114
|
-
"@applitools/tunnel-client": "^1.11.
|
|
94
|
+
"@applitools/tunnel-client": "^1.11.6",
|
|
115
95
|
"@types/mocha": "^10.0.7",
|
|
116
96
|
"@types/node": "^12.20.55",
|
|
117
97
|
"@types/selenium-webdriver": "^4.1.2",
|
|
@@ -129,5 +109,13 @@
|
|
|
129
109
|
},
|
|
130
110
|
"publishConfig": {
|
|
131
111
|
"access": "public"
|
|
112
|
+
},
|
|
113
|
+
"lavamoat": {
|
|
114
|
+
"allowScripts": {
|
|
115
|
+
"chromedriver": true,
|
|
116
|
+
"puppeteer": true,
|
|
117
|
+
"ws>bufferutil": false,
|
|
118
|
+
"ws>utf-8-validate": false
|
|
119
|
+
}
|
|
132
120
|
}
|
|
133
121
|
}
|
|
@@ -2,8 +2,9 @@ import type { Region } from '@applitools/utils';
|
|
|
2
2
|
import type { ScreenshotSettings } from '../../classic/types';
|
|
3
3
|
import { type Logger } from '@applitools/logger';
|
|
4
4
|
import { type Driver, type Element, type ElementReference, type Selector, type SpecType } from '@applitools/driver';
|
|
5
|
+
import type { Image } from '@applitools/image';
|
|
5
6
|
export type Screenshot<TSpec extends SpecType> = {
|
|
6
|
-
image:
|
|
7
|
+
image: Image;
|
|
7
8
|
region: Region;
|
|
8
9
|
element: Element<TSpec>;
|
|
9
10
|
scrollingElement: Element<TSpec>;
|