@applitools/core 4.55.0 → 4.56.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 +31 -0
- package/dist/autonomous/core.js +2 -2
- package/dist/open-eyes.js +6 -4
- package/dist/ufg/core.js +1 -1
- package/dist/ufg/take-snapshots.js +2 -1
- package/dist/ufg/utils/take-dom-snapshot.js +1 -0
- package/dist/utils/extract-git-info.js +10 -9
- package/package.json +11 -3
- package/types/autonomous/core.d.ts +2 -1
- package/types/ufg/take-snapshots.d.ts +2 -1
- package/types/ufg/utils/take-dom-snapshot.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.56.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.56.0...js/core@4.56.1) (2026-01-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* 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))
|
|
9
|
+
|
|
10
|
+
## [4.56.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.55.0...js/core@4.56.0) (2026-01-21)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add `fetchConcurrency` parameter to `makeAutonomousCore` FLD-4063 ([#3480](https://github.com/Applitools-Dev/sdk/issues/3480)) ([df0c60d](https://github.com/Applitools-Dev/sdk/commit/df0c60d5e74703550dba036299db7360065524f6))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add fetchConcurrency to dom-snapshot | FLD-4062 ([#3486](https://github.com/Applitools-Dev/sdk/issues/3486)) ([f523791](https://github.com/Applitools-Dev/sdk/commit/f523791b9bc60029ec0b4b6914bc54e0110bd4a2))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Dependencies
|
|
24
|
+
|
|
25
|
+
* @applitools/dom-snapshot bumped to 4.15.7
|
|
26
|
+
#### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* add fetchConcurrency to dom-snapshot | FLD-4062 ([#3486](https://github.com/Applitools-Dev/sdk/issues/3486)) ([f523791](https://github.com/Applitools-Dev/sdk/commit/f523791b9bc60029ec0b4b6914bc54e0110bd4a2))
|
|
29
|
+
* @applitools/ufg-client bumped to 1.19.0
|
|
30
|
+
#### Features
|
|
31
|
+
|
|
32
|
+
* add `fetchConcurrency` parameter to `makeAutonomousCore` FLD-4063 ([#3480](https://github.com/Applitools-Dev/sdk/issues/3480)) ([df0c60d](https://github.com/Applitools-Dev/sdk/commit/df0c60d5e74703550dba036299db7360065524f6))
|
|
33
|
+
|
|
3
34
|
## [4.55.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.54.4...js/core@4.55.0) (2026-01-19)
|
|
4
35
|
|
|
5
36
|
|
package/dist/autonomous/core.js
CHANGED
|
@@ -12,9 +12,9 @@ const open_eyes_1 = require("./open-eyes");
|
|
|
12
12
|
const open_check_and_close_1 = require("./open-check-and-close");
|
|
13
13
|
const register_default_scripts_1 = require("../ufg/utils/register-default-scripts");
|
|
14
14
|
const calculate_estimated_time_1 = require("./calculate-estimated-time");
|
|
15
|
-
function makeAutonomousCore({ spec, clients, base: defaultBase, asyncCache, agentId = 'core-autonomous', logger: defaultLogger, } = {}) {
|
|
15
|
+
function makeAutonomousCore({ spec, clients, base: defaultBase, asyncCache, fetchConcurrency, agentId = 'core-autonomous', logger: defaultLogger, } = {}) {
|
|
16
16
|
const logger = (0, logger_1.makeLogger)({ logger: defaultLogger, format: { label: 'core-autonomous' } });
|
|
17
|
-
const core = (0, core_1.makeCore)({ spec, clients, base: defaultBase, asyncCache, agentId, logger });
|
|
17
|
+
const core = (0, core_1.makeCore)({ spec, clients, base: defaultBase, asyncCache, fetchConcurrency, agentId, logger });
|
|
18
18
|
return {
|
|
19
19
|
type: 'autonomous',
|
|
20
20
|
takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ core, spec, logger }),
|
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 {
|
package/dist/ufg/core.js
CHANGED
|
@@ -47,7 +47,7 @@ function makeCore({ spec, clients, base: defaultBase, asyncCache, offlineLocatio
|
|
|
47
47
|
base: base,
|
|
48
48
|
getViewportSize: spec && (0, get_viewport_size_1.makeGetViewportSize)({ spec, logger }),
|
|
49
49
|
setViewportSize: spec && (0, set_viewport_size_1.makeSetViewportSize)({ spec, logger }),
|
|
50
|
-
takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ spec, core, logger }),
|
|
50
|
+
takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ spec, core, fetchConcurrency, logger }),
|
|
51
51
|
locate: (0, locate_1.makeLocate)({ spec, core, logger }),
|
|
52
52
|
locateText: (0, locate_text_1.makeLocateText)({ spec, core, logger }),
|
|
53
53
|
extractText: (0, extract_text_1.makeExtractText)({ spec, core, logger }),
|
|
@@ -7,7 +7,7 @@ const to_safe_check_settings_1 = require("./utils/to-safe-check-settings");
|
|
|
7
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
|
-
function makeTakeSnapshots({ core, spec, signal, logger: mainLogger }) {
|
|
10
|
+
function makeTakeSnapshots({ core, spec, fetchConcurrency, signal, logger: mainLogger, }) {
|
|
11
11
|
const MAX_LOGGED_ERRORS_PER_SNAPSHOT = 10;
|
|
12
12
|
return async function takeSnapshots({ driver, settings = {}, account, logger = mainLogger, }) {
|
|
13
13
|
var _a, _b;
|
|
@@ -46,6 +46,7 @@ function makeTakeSnapshots({ core, spec, signal, logger: mainLogger }) {
|
|
|
46
46
|
settings: {
|
|
47
47
|
waitBeforeCapture: settings.waitBeforeCapture,
|
|
48
48
|
disableBrowserFetching: settings.disableBrowserFetching,
|
|
49
|
+
fetchConcurrency,
|
|
49
50
|
layoutBreakpoints: settings.layoutBreakpoints,
|
|
50
51
|
environments: uniqueEnvironments,
|
|
51
52
|
skipResources: ufgClient.getCachedResourceUrls(),
|
|
@@ -47,6 +47,7 @@ async function takeDomSnapshot({ context, settings, logger, }) {
|
|
|
47
47
|
const arg = {
|
|
48
48
|
dontFetchResources: settings === null || settings === void 0 ? void 0 : settings.disableBrowserFetching,
|
|
49
49
|
skipResources: settings === null || settings === void 0 ? void 0 : settings.skipResources,
|
|
50
|
+
fetchConcurrency: settings === null || settings === void 0 ? void 0 : settings.fetchConcurrency,
|
|
50
51
|
removeReverseProxyURLPrefixes: Boolean(process.env.APPLITOOLS_SCRIPT_REMOVE_REVERSE_PROXY_URL_PREFIXES),
|
|
51
52
|
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) ||
|
|
52
53
|
(environment.isIOS ? 100000 : 250 * 1024 * 1024)),
|
|
@@ -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.
|
|
3
|
+
"version": "4.56.1",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@applitools/core-base": "1.31.1",
|
|
84
84
|
"@applitools/dom-capture": "11.6.8",
|
|
85
|
-
"@applitools/dom-snapshot": "4.15.
|
|
85
|
+
"@applitools/dom-snapshot": "4.15.7",
|
|
86
86
|
"@applitools/driver": "1.25.0",
|
|
87
87
|
"@applitools/ec-client": "1.12.17",
|
|
88
88
|
"@applitools/logger": "2.2.7",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@applitools/snippets": "2.7.0",
|
|
93
93
|
"@applitools/socket": "1.3.8",
|
|
94
94
|
"@applitools/spec-driver-webdriver": "1.5.5",
|
|
95
|
-
"@applitools/ufg-client": "1.
|
|
95
|
+
"@applitools/ufg-client": "1.19.0",
|
|
96
96
|
"@applitools/utils": "1.14.1",
|
|
97
97
|
"@types/ws": "8.5.5",
|
|
98
98
|
"abort-controller": "3.0.0",
|
|
@@ -129,5 +129,13 @@
|
|
|
129
129
|
},
|
|
130
130
|
"publishConfig": {
|
|
131
131
|
"access": "public"
|
|
132
|
+
},
|
|
133
|
+
"lavamoat": {
|
|
134
|
+
"allowScripts": {
|
|
135
|
+
"chromedriver": true,
|
|
136
|
+
"puppeteer": true,
|
|
137
|
+
"ws>bufferutil": false,
|
|
138
|
+
"ws>utf-8-validate": false
|
|
139
|
+
}
|
|
132
140
|
}
|
|
133
141
|
}
|
|
@@ -12,8 +12,9 @@ type Options<TSpec extends SpecType> = {
|
|
|
12
12
|
};
|
|
13
13
|
base?: BaseCore;
|
|
14
14
|
asyncCache?: AsyncCache;
|
|
15
|
+
fetchConcurrency?: number;
|
|
15
16
|
agentId?: string;
|
|
16
17
|
logger?: Logger;
|
|
17
18
|
};
|
|
18
|
-
export declare function makeAutonomousCore<TSpec extends SpecType>({ spec, clients, base: defaultBase, asyncCache, agentId, logger: defaultLogger, }?: Options<TSpec>): AutonomousCore<TSpec>;
|
|
19
|
+
export declare function makeAutonomousCore<TSpec extends SpecType>({ spec, clients, base: defaultBase, asyncCache, fetchConcurrency, agentId, logger: defaultLogger, }?: Options<TSpec>): AutonomousCore<TSpec>;
|
|
19
20
|
export {};
|
|
@@ -5,10 +5,11 @@ import { type SpecType, type SpecDriver, type Driver } from '@applitools/driver'
|
|
|
5
5
|
type Options<TSpec extends SpecType> = {
|
|
6
6
|
core: Core<TSpec>;
|
|
7
7
|
spec: SpecDriver<TSpec>;
|
|
8
|
+
fetchConcurrency?: number;
|
|
8
9
|
signal?: AbortSignal;
|
|
9
10
|
logger: Logger;
|
|
10
11
|
};
|
|
11
|
-
export declare function makeTakeSnapshots<TSpec extends SpecType>({ core, spec, signal, logger: mainLogger }: Options<TSpec>): ({ driver, settings, account, logger, }: {
|
|
12
|
+
export declare function makeTakeSnapshots<TSpec extends SpecType>({ core, spec, fetchConcurrency, signal, logger: mainLogger, }: Options<TSpec>): ({ driver, settings, account, logger, }: {
|
|
12
13
|
driver: Driver<TSpec>;
|
|
13
14
|
settings?: SnapshotSettings<TSpec> | undefined;
|
|
14
15
|
account: Account;
|
|
@@ -31,6 +31,7 @@ export type RawDomSnapshot = {
|
|
|
31
31
|
export type DomSnapshotSettings<TSpec extends SpecType> = {
|
|
32
32
|
disableBrowserFetching?: boolean;
|
|
33
33
|
skipResources?: string[];
|
|
34
|
+
fetchConcurrency?: number;
|
|
34
35
|
chunkByteLength?: number;
|
|
35
36
|
executionTimeout?: number;
|
|
36
37
|
pollTimeout?: number;
|