@applitools/core 4.50.4 → 4.52.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 +98 -0
- package/dist/classic/utils/take-dom-capture.js +5 -5
- package/dist/ufg/take-snapshots.js +19 -0
- package/dist/ufg/utils/take-dom-snapshot.js +6 -5
- package/package.json +18 -18
- package/types/get-ec-client.d.ts +1 -0
- package/types/ufg/get-ufg-client.d.ts +1 -0
- package/types/ufg/utils/take-dom-snapshot.d.ts +1 -0
- package/types/utils/extract-git-info.d.ts +4 -0
- package/types/utils/validate-sdk-version.d.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,103 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.52.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.51.0...js/core@4.52.0) (2025-11-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Performance Improvements
|
|
12
|
+
|
|
13
|
+
* remove dynamic loading of Dom capture and Dom snapshot ([#3322](https://github.com/Applitools-Dev/sdk/issues/3322)) ([7d15ee9](https://github.com/Applitools-Dev/sdk/commit/7d15ee98d5d39c7e478b6bfe3e14b8eea93937e5))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* @applitools/utils bumped to 1.13.0
|
|
19
|
+
#### Features
|
|
20
|
+
|
|
21
|
+
* restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75))
|
|
22
|
+
* @applitools/dom-snapshot bumped to 4.15.0
|
|
23
|
+
#### Features
|
|
24
|
+
|
|
25
|
+
* add support for adopted stylesheets with nesting | FLD-3212 ([#3325](https://github.com/Applitools-Dev/sdk/issues/3325)) ([8587926](https://github.com/Applitools-Dev/sdk/commit/8587926b0d6ef820cfbd8f89ddb062a3d77f65ab))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
* @applitools/dom-capture bumped to 11.6.6
|
|
30
|
+
#### Performance Improvements
|
|
31
|
+
|
|
32
|
+
* remove dynamic loading of Dom capture and Dom snapshot ([#3322](https://github.com/Applitools-Dev/sdk/issues/3322)) ([7d15ee9](https://github.com/Applitools-Dev/sdk/commit/7d15ee98d5d39c7e478b6bfe3e14b8eea93937e5))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
* @applitools/logger bumped to 2.2.5
|
|
37
|
+
|
|
38
|
+
* @applitools/socket bumped to 1.3.6
|
|
39
|
+
|
|
40
|
+
* @applitools/req bumped to 1.8.5
|
|
41
|
+
|
|
42
|
+
* @applitools/image bumped to 1.2.4
|
|
43
|
+
|
|
44
|
+
* @applitools/driver bumped to 1.24.1
|
|
45
|
+
|
|
46
|
+
* @applitools/spec-driver-webdriver bumped to 1.5.1
|
|
47
|
+
|
|
48
|
+
* @applitools/spec-driver-selenium bumped to 1.7.7
|
|
49
|
+
|
|
50
|
+
* @applitools/spec-driver-puppeteer bumped to 1.6.7
|
|
51
|
+
|
|
52
|
+
* @applitools/screenshoter bumped to 3.12.8
|
|
53
|
+
|
|
54
|
+
* @applitools/nml-client bumped to 1.11.10
|
|
55
|
+
|
|
56
|
+
* @applitools/tunnel-client bumped to 1.11.3
|
|
57
|
+
|
|
58
|
+
* @applitools/ufg-client bumped to 1.18.1
|
|
59
|
+
|
|
60
|
+
* @applitools/core-base bumped to 1.29.0
|
|
61
|
+
#### Features
|
|
62
|
+
|
|
63
|
+
* restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
* @applitools/ec-client bumped to 1.12.12
|
|
68
|
+
|
|
69
|
+
* @applitools/test-server bumped to 1.3.4
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## [4.51.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.50.4...js/core@4.51.0) (2025-11-03)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Features
|
|
76
|
+
|
|
77
|
+
* logging errors from dom snapshot to the backend | AD-11641 ([#3291](https://github.com/Applitools-Dev/sdk/issues/3291)) ([7f5b487](https://github.com/Applitools-Dev/sdk/commit/7f5b48701ff93bf980924c9346a8241ed87f5a56))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Dependencies
|
|
81
|
+
|
|
82
|
+
* @applitools/dom-snapshot bumped to 4.14.0
|
|
83
|
+
#### Features
|
|
84
|
+
|
|
85
|
+
* logging errors from dom snapshot to the backend | AD-11641 ([#3291](https://github.com/Applitools-Dev/sdk/issues/3291)) ([7f5b487](https://github.com/Applitools-Dev/sdk/commit/7f5b48701ff93bf980924c9346a8241ed87f5a56))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
#### Bug Fixes
|
|
89
|
+
|
|
90
|
+
* sandbox prototype pollution | FLD-3738 ([#3310](https://github.com/Applitools-Dev/sdk/issues/3310)) ([3185558](https://github.com/Applitools-Dev/sdk/commit/31855586851d5372169aae7bf0268cec139abc59))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
#### Code Refactoring
|
|
94
|
+
|
|
95
|
+
* blob generation error handling ([#2501](https://github.com/Applitools-Dev/sdk/issues/2501)) ([94bc14f](https://github.com/Applitools-Dev/sdk/commit/94bc14faf3de0fd9a8ca24af4870f839756a8aad))
|
|
96
|
+
* @applitools/ufg-client bumped to 1.18.0
|
|
97
|
+
#### Features
|
|
98
|
+
|
|
99
|
+
* logging errors from dom snapshot to the backend | AD-11641 ([#3291](https://github.com/Applitools-Dev/sdk/issues/3291)) ([7f5b487](https://github.com/Applitools-Dev/sdk/commit/7f5b48701ff93bf980924c9346a8241ed87f5a56))
|
|
100
|
+
|
|
3
101
|
## [4.50.4](https://github.com/Applitools-Dev/sdk/compare/js/core@4.50.3...js/core@4.50.4) (2025-10-22)
|
|
4
102
|
|
|
5
103
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.takeDomCapture = void 0;
|
|
4
4
|
const req_1 = require("@applitools/req");
|
|
5
|
-
const {
|
|
5
|
+
const { captureDomPoll, pollResult, captureDomPollForIE, pollResultForIE } = require('@applitools/dom-capture');
|
|
6
6
|
async function takeDomCapture({ driver, settings, logger, }) {
|
|
7
7
|
var _a;
|
|
8
8
|
const environment = await driver.getEnvironment();
|
|
@@ -15,11 +15,11 @@ async function takeDomCapture({ driver, settings, logger, }) {
|
|
|
15
15
|
};
|
|
16
16
|
const scripts = {
|
|
17
17
|
main: features.canExecuteOnlyFunctionScripts
|
|
18
|
-
?
|
|
19
|
-
:
|
|
18
|
+
? captureDomPoll
|
|
19
|
+
: `/* @applitools/dom-capture */return (${isLegacyBrowser ? captureDomPollForIE : captureDomPoll}).apply(null, arguments);`,
|
|
20
20
|
poll: features.canExecuteOnlyFunctionScripts
|
|
21
|
-
?
|
|
22
|
-
:
|
|
21
|
+
? pollResult
|
|
22
|
+
: `/* @applitools/dom-capture */return (${isLegacyBrowser ? pollResultForIE : pollResult}).apply(null, arguments);`,
|
|
23
23
|
};
|
|
24
24
|
const url = await driver.getUrl();
|
|
25
25
|
const dom = await captureContextDom(driver.mainContext);
|
|
@@ -8,6 +8,7 @@ const to_generated_selectors_1 = require("./utils/to-generated-selectors");
|
|
|
8
8
|
const abort_error_1 = require("../errors/abort-error");
|
|
9
9
|
const filterStaleElements_1 = require("./utils/filterStaleElements");
|
|
10
10
|
function makeTakeSnapshots({ core, spec, signal, logger: mainLogger }) {
|
|
11
|
+
const MAX_LOGGED_ERRORS_PER_SNAPSHOT = 10;
|
|
11
12
|
return async function takeSnapshots({ driver, settings = {}, account, logger = mainLogger, }) {
|
|
12
13
|
var _a, _b;
|
|
13
14
|
logger = logger.extend(mainLogger);
|
|
@@ -95,6 +96,24 @@ function makeTakeSnapshots({ core, spec, signal, logger: mainLogger }) {
|
|
|
95
96
|
const url = await driver.getUrl();
|
|
96
97
|
const title = await driver.getTitle();
|
|
97
98
|
const userAgent = environment.isWeb ? await driver.getUserAgentLegacy() : undefined;
|
|
99
|
+
// Log DomSnapshot errors via logEvent
|
|
100
|
+
for (const snapshot of snapshots) {
|
|
101
|
+
if (snapshot.errors && snapshot.errors.length > 0) {
|
|
102
|
+
for (const error of snapshot.errors.slice(0, MAX_LOGGED_ERRORS_PER_SNAPSHOT)) {
|
|
103
|
+
void core.logEvent({
|
|
104
|
+
settings: {
|
|
105
|
+
level: 'Error',
|
|
106
|
+
event: {
|
|
107
|
+
type: 'DomSnapshotError',
|
|
108
|
+
message: error,
|
|
109
|
+
url: snapshot.url,
|
|
110
|
+
},
|
|
111
|
+
...account.eyesServer,
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
98
117
|
return snapshots.map((snapshot, index) => ({
|
|
99
118
|
target: snapshot,
|
|
100
119
|
settings: getSafeCheckSettings({
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.takeDomSnapshot = void 0;
|
|
27
27
|
const utils = __importStar(require("@applitools/utils"));
|
|
28
|
-
const {
|
|
28
|
+
const { processPagePoll, pollResult } = require('@applitools/dom-snapshot');
|
|
29
29
|
async function takeDomSnapshot({ context, settings, logger, }) {
|
|
30
30
|
var _a, _b;
|
|
31
31
|
const driver = context.driver;
|
|
@@ -57,11 +57,11 @@ async function takeDomSnapshot({ context, settings, logger, }) {
|
|
|
57
57
|
};
|
|
58
58
|
const scripts = {
|
|
59
59
|
main: features.canExecuteOnlyFunctionScripts
|
|
60
|
-
?
|
|
61
|
-
:
|
|
60
|
+
? processPagePoll
|
|
61
|
+
: `/* @applitools/dom-snapshot@1 */ return (${processPagePoll}).apply(null, arguments);`,
|
|
62
62
|
poll: features.canExecuteOnlyFunctionScripts
|
|
63
|
-
?
|
|
64
|
-
:
|
|
63
|
+
? pollResult
|
|
64
|
+
: `/* @applitools/dom-snapshot@1 */ return (${pollResult}).apply(null, arguments);`,
|
|
65
65
|
};
|
|
66
66
|
const snapshot = await context.executePoll(scripts, {
|
|
67
67
|
main: arg,
|
|
@@ -168,6 +168,7 @@ function logSnapshot(logger, snapshot) {
|
|
|
168
168
|
logger.log(`dom snapshot - cdt nodes with data-applitools-selector: ${JSON.stringify(snapshot.cdt.filter(node => { var _a; return (_a = node.attributes) === null || _a === void 0 ? void 0 : _a.some(attr => attr.name === 'data-applitools-selector'); }))}`);
|
|
169
169
|
logger.log('dom snapshot - safeSelectors:', snapshot.safeSelectors);
|
|
170
170
|
logger.log('dom snapshot - warnings:', snapshot.warnings);
|
|
171
|
+
snapshot.errors && logger.log('dom snapshot - errors:', snapshot.errors);
|
|
171
172
|
}
|
|
172
173
|
catch (err) {
|
|
173
174
|
logger.error(`error while logging dom snapshot`, err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.52.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@applitools/core-base": "1.
|
|
83
|
-
"@applitools/dom-capture": "11.6.
|
|
84
|
-
"@applitools/dom-snapshot": "4.
|
|
85
|
-
"@applitools/driver": "1.24.
|
|
86
|
-
"@applitools/ec-client": "1.12.
|
|
87
|
-
"@applitools/logger": "2.2.
|
|
88
|
-
"@applitools/nml-client": "1.11.
|
|
89
|
-
"@applitools/req": "1.8.
|
|
90
|
-
"@applitools/screenshoter": "3.12.
|
|
82
|
+
"@applitools/core-base": "1.29.0",
|
|
83
|
+
"@applitools/dom-capture": "11.6.6",
|
|
84
|
+
"@applitools/dom-snapshot": "4.15.0",
|
|
85
|
+
"@applitools/driver": "1.24.1",
|
|
86
|
+
"@applitools/ec-client": "1.12.12",
|
|
87
|
+
"@applitools/logger": "2.2.5",
|
|
88
|
+
"@applitools/nml-client": "1.11.10",
|
|
89
|
+
"@applitools/req": "1.8.5",
|
|
90
|
+
"@applitools/screenshoter": "3.12.8",
|
|
91
91
|
"@applitools/snippets": "2.7.0",
|
|
92
|
-
"@applitools/socket": "1.3.
|
|
93
|
-
"@applitools/spec-driver-webdriver": "1.5.
|
|
94
|
-
"@applitools/ufg-client": "1.
|
|
95
|
-
"@applitools/utils": "1.
|
|
92
|
+
"@applitools/socket": "1.3.6",
|
|
93
|
+
"@applitools/spec-driver-webdriver": "1.5.1",
|
|
94
|
+
"@applitools/ufg-client": "1.18.1",
|
|
95
|
+
"@applitools/utils": "1.13.0",
|
|
96
96
|
"@types/ws": "8.5.5",
|
|
97
97
|
"abort-controller": "3.0.0",
|
|
98
98
|
"chalk": "4.1.2",
|
|
@@ -106,11 +106,11 @@
|
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@applitools/bongo": "^5.10.0",
|
|
108
108
|
"@applitools/sea": "^1.0.0",
|
|
109
|
-
"@applitools/spec-driver-puppeteer": "^1.6.
|
|
110
|
-
"@applitools/spec-driver-selenium": "^1.7.
|
|
111
|
-
"@applitools/test-server": "^1.3.
|
|
109
|
+
"@applitools/spec-driver-puppeteer": "^1.6.7",
|
|
110
|
+
"@applitools/spec-driver-selenium": "^1.7.7",
|
|
111
|
+
"@applitools/test-server": "^1.3.4",
|
|
112
112
|
"@applitools/test-utils": "^1.5.17",
|
|
113
|
-
"@applitools/tunnel-client": "^1.11.
|
|
113
|
+
"@applitools/tunnel-client": "^1.11.3",
|
|
114
114
|
"@types/mocha": "^10.0.7",
|
|
115
115
|
"@types/node": "^12.20.55",
|
|
116
116
|
"@types/selenium-webdriver": "^4.1.2",
|
package/types/get-ec-client.d.ts
CHANGED
|
@@ -29,11 +29,13 @@ export declare const extractLatestCommitInfo: (({ execOptions, logger, }: Extrac
|
|
|
29
29
|
sha: string;
|
|
30
30
|
} | undefined>): void;
|
|
31
31
|
clearCache(): void;
|
|
32
|
+
TTL?: number | undefined;
|
|
32
33
|
};
|
|
33
34
|
export declare const extractGitBranch: (({ execOptions, logger }: Options) => Promise<string | undefined>) & {
|
|
34
35
|
getCachedValues(): Promise<string | undefined>[];
|
|
35
36
|
setCachedValue(key: any, value: Promise<string | undefined>): void;
|
|
36
37
|
clearCache(): void;
|
|
38
|
+
TTL?: number | undefined;
|
|
37
39
|
};
|
|
38
40
|
export declare const extractGitRepo: (({ execOptions, logger }: Options) => Promise<{
|
|
39
41
|
name?: string;
|
|
@@ -48,12 +50,14 @@ export declare const extractGitRepo: (({ execOptions, logger }: Options) => Prom
|
|
|
48
50
|
owner?: string | undefined;
|
|
49
51
|
}>): void;
|
|
50
52
|
clearCache(): void;
|
|
53
|
+
TTL?: number | undefined;
|
|
51
54
|
};
|
|
52
55
|
export declare function extractBuildIdFromCI(): Promise<string | undefined>;
|
|
53
56
|
export declare const extractBranchingTimestamp: (({ branchName, parentBranchName, execOptions, logger, }: ExtractGitBranchingTimestampOptions) => Promise<string | undefined>) & {
|
|
54
57
|
getCachedValues(): Promise<string | undefined>[];
|
|
55
58
|
setCachedValue(key: any, value: Promise<string | undefined>): void;
|
|
56
59
|
clearCache(): void;
|
|
60
|
+
TTL?: number | undefined;
|
|
57
61
|
};
|
|
58
62
|
export declare function isISODate(str: string): boolean;
|
|
59
63
|
export {};
|
|
@@ -4,26 +4,31 @@ declare const extractors: {
|
|
|
4
4
|
getCachedValues(): Promise<string>[];
|
|
5
5
|
setCachedValue(key: any, value: Promise<string>): void;
|
|
6
6
|
clearCache(): void;
|
|
7
|
+
TTL?: number | undefined;
|
|
7
8
|
};
|
|
8
9
|
java: typeof extractLatestJavaPackageVersion & {
|
|
9
10
|
getCachedValues(): Promise<string>[];
|
|
10
11
|
setCachedValue(key: any, value: Promise<string>): void;
|
|
11
12
|
clearCache(): void;
|
|
13
|
+
TTL?: number | undefined;
|
|
12
14
|
};
|
|
13
15
|
dotnet: typeof extractLatestDotNetPackageVersion & {
|
|
14
16
|
getCachedValues(): Promise<string>[];
|
|
15
17
|
setCachedValue(key: any, value: Promise<string>): void;
|
|
16
18
|
clearCache(): void;
|
|
19
|
+
TTL?: number | undefined;
|
|
17
20
|
};
|
|
18
21
|
python: typeof extractLatestPythonPackageVersion & {
|
|
19
22
|
getCachedValues(): Promise<string>[];
|
|
20
23
|
setCachedValue(key: any, value: Promise<string>): void;
|
|
21
24
|
clearCache(): void;
|
|
25
|
+
TTL?: number | undefined;
|
|
22
26
|
};
|
|
23
27
|
ruby: typeof extractLatestRubyPackageVersion & {
|
|
24
28
|
getCachedValues(): Promise<string>[];
|
|
25
29
|
setCachedValue(key: any, value: Promise<string>): void;
|
|
26
30
|
clearCache(): void;
|
|
31
|
+
TTL?: number | undefined;
|
|
27
32
|
};
|
|
28
33
|
};
|
|
29
34
|
export declare function validateSdkVersion(sdk: {
|