@applitools/eyes-browser 1.6.12 → 1.6.14
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 +68 -0
- package/dist/index.js +154 -23
- package/package.json +2 -2
- package/types/input/Configuration.d.ts +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.14](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.6.13...js/eyes-browser@1.6.14) (2026-04-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* @applitools/ufg-client bumped to 1.22.0
|
|
9
|
+
#### Features
|
|
10
|
+
|
|
11
|
+
* new render target entities | AD 13251 ([#3775](https://github.com/Applitools-Dev/sdk/issues/3775)) ([18b6107](https://github.com/Applitools-Dev/sdk/commit/18b6107937ff0f18ba0a256fec1adc6d423f03dc))
|
|
12
|
+
* @applitools/core bumped to 4.61.0
|
|
13
|
+
#### Features
|
|
14
|
+
|
|
15
|
+
* new render target entities | AD 13251 ([#3775](https://github.com/Applitools-Dev/sdk/issues/3775)) ([18b6107](https://github.com/Applitools-Dev/sdk/commit/18b6107937ff0f18ba0a256fec1adc6d423f03dc))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
* @applitools/eyes bumped to 1.40.0
|
|
20
|
+
#### Features
|
|
21
|
+
|
|
22
|
+
* new render target entities | AD 13251 ([#3775](https://github.com/Applitools-Dev/sdk/issues/3775)) ([18b6107](https://github.com/Applitools-Dev/sdk/commit/18b6107937ff0f18ba0a256fec1adc6d423f03dc))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## [1.6.13](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.6.12...js/eyes-browser@1.6.13) (2026-04-23)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* @applitools/req bumped to 1.10.0
|
|
33
|
+
#### Features
|
|
34
|
+
|
|
35
|
+
* expose httpVersion as SDK configuration flag | AD-13119 ([#3731](https://github.com/Applitools-Dev/sdk/issues/3731)) ([efee143](https://github.com/Applitools-Dev/sdk/commit/efee143729ee9ee31b669ea714c69a0ab57bbb1e))
|
|
36
|
+
* @applitools/ufg-client bumped to 1.21.0
|
|
37
|
+
#### Features
|
|
38
|
+
|
|
39
|
+
* expose httpVersion as SDK configuration flag | AD-13119 ([#3731](https://github.com/Applitools-Dev/sdk/issues/3731)) ([efee143](https://github.com/Applitools-Dev/sdk/commit/efee143729ee9ee31b669ea714c69a0ab57bbb1e))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
* @applitools/core bumped to 4.60.0
|
|
44
|
+
#### Features
|
|
45
|
+
|
|
46
|
+
* expose httpVersion as SDK configuration flag | AD-13119 ([#3731](https://github.com/Applitools-Dev/sdk/issues/3731)) ([efee143](https://github.com/Applitools-Dev/sdk/commit/efee143729ee9ee31b669ea714c69a0ab57bbb1e))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
* @applitools/nml-client bumped to 1.11.25
|
|
51
|
+
|
|
52
|
+
* @applitools/tunnel-client bumped to 1.11.11
|
|
53
|
+
|
|
54
|
+
* @applitools/core-base bumped to 1.33.0
|
|
55
|
+
#### Features
|
|
56
|
+
|
|
57
|
+
* expose httpVersion as SDK configuration flag | AD-13119 ([#3731](https://github.com/Applitools-Dev/sdk/issues/3731)) ([efee143](https://github.com/Applitools-Dev/sdk/commit/efee143729ee9ee31b669ea714c69a0ab57bbb1e))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
* @applitools/ec-client bumped to 1.12.26
|
|
62
|
+
|
|
63
|
+
* @applitools/eyes bumped to 1.39.0
|
|
64
|
+
#### Features
|
|
65
|
+
|
|
66
|
+
* expose httpVersion as SDK configuration flag | AD-13119 ([#3731](https://github.com/Applitools-Dev/sdk/issues/3731)) ([efee143](https://github.com/Applitools-Dev/sdk/commit/efee143729ee9ee31b669ea714c69a0ab57bbb1e))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
3
71
|
## [1.6.12](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.6.11...js/eyes-browser@1.6.12) (2026-04-16)
|
|
4
72
|
|
|
5
73
|
|
package/dist/index.js
CHANGED
|
@@ -15713,6 +15713,23 @@ var require_Configuration = __commonJS({
|
|
|
15713
15713
|
this.hostOSInfo = hostOSInfo;
|
|
15714
15714
|
return this;
|
|
15715
15715
|
}
|
|
15716
|
+
/** @internal */
|
|
15717
|
+
get httpVersion() {
|
|
15718
|
+
return this._config.httpVersion;
|
|
15719
|
+
}
|
|
15720
|
+
/** @internal */
|
|
15721
|
+
set httpVersion(httpVersion) {
|
|
15722
|
+
this._config.httpVersion = httpVersion;
|
|
15723
|
+
}
|
|
15724
|
+
/** @internal */
|
|
15725
|
+
getHttpVersion() {
|
|
15726
|
+
return this.httpVersion;
|
|
15727
|
+
}
|
|
15728
|
+
/** @internal */
|
|
15729
|
+
setHttpVersion(httpVersion) {
|
|
15730
|
+
this.httpVersion = httpVersion;
|
|
15731
|
+
return this;
|
|
15732
|
+
}
|
|
15716
15733
|
get ignoreBaseline() {
|
|
15717
15734
|
return this._config.ignoreBaseline;
|
|
15718
15735
|
}
|
|
@@ -16202,6 +16219,7 @@ var require_Configuration = __commonJS({
|
|
|
16202
16219
|
agentId: this.agentId,
|
|
16203
16220
|
proxy: this.proxy,
|
|
16204
16221
|
connectionTimeout: this.connectionTimeout,
|
|
16222
|
+
httpVersion: this.httpVersion,
|
|
16205
16223
|
removeSession: this.removeSession,
|
|
16206
16224
|
appName: this.appName,
|
|
16207
16225
|
testName: this.testName,
|
|
@@ -19811,7 +19829,7 @@ var init_stop = __esm({
|
|
|
19811
19829
|
});
|
|
19812
19830
|
|
|
19813
19831
|
// ../req/dist/fetch-browser.js
|
|
19814
|
-
var fetch_browser_default, Request, Headers, Response,
|
|
19832
|
+
var fetch_browser_default, Request, Headers, Response, getFetchForVersion, validateOptionsForVersion;
|
|
19815
19833
|
var init_fetch_browser = __esm({
|
|
19816
19834
|
"../req/dist/fetch-browser.js"() {
|
|
19817
19835
|
"use strict";
|
|
@@ -19824,7 +19842,11 @@ var init_fetch_browser = __esm({
|
|
|
19824
19842
|
Request = globalThis.Request;
|
|
19825
19843
|
Headers = globalThis.Headers;
|
|
19826
19844
|
Response = globalThis.Response;
|
|
19827
|
-
|
|
19845
|
+
getFetchForVersion = (_httpVersion) => ({
|
|
19846
|
+
fetch: globalThis.fetch,
|
|
19847
|
+
getBodySize: () => void 0
|
|
19848
|
+
});
|
|
19849
|
+
validateOptionsForVersion = (_httpVersion, _options) => void 0;
|
|
19828
19850
|
}
|
|
19829
19851
|
});
|
|
19830
19852
|
|
|
@@ -19884,6 +19906,7 @@ var init_req_errors = __esm({
|
|
|
19884
19906
|
|
|
19885
19907
|
// ../req/dist/req.js
|
|
19886
19908
|
function makeReq(baseOptions) {
|
|
19909
|
+
validateOptionsForVersion(baseOptions.httpVersion, baseOptions);
|
|
19887
19910
|
return (location2, options) => req(location2, mergeOptions(baseOptions, options !== null && options !== void 0 ? options : {}));
|
|
19888
19911
|
}
|
|
19889
19912
|
async function req(input, ...requestOptions) {
|
|
@@ -19936,7 +19959,7 @@ async function req(input, ...requestOptions) {
|
|
|
19936
19959
|
}
|
|
19937
19960
|
return { requestController, requestTimer, abortHandler };
|
|
19938
19961
|
}
|
|
19939
|
-
async function buildRequest(input2, opts, requestController) {
|
|
19962
|
+
async function buildRequest(input2, opts, requestController, getBodySize) {
|
|
19940
19963
|
var _a, _b, _c, _d, _e;
|
|
19941
19964
|
const url = new URL(String((_a = input2.url) !== null && _a !== void 0 ? _a : input2), opts.baseUrl);
|
|
19942
19965
|
if (opts.query) {
|
|
@@ -19959,11 +19982,11 @@ async function req(input, ...requestOptions) {
|
|
|
19959
19982
|
},
|
|
19960
19983
|
body: (_e = opts.body) !== null && _e !== void 0 ? _e : input2.body,
|
|
19961
19984
|
highWaterMark: 1024 * 1024 * 100 + 1,
|
|
19962
|
-
agent: makeAgent({
|
|
19985
|
+
agent: opts.httpVersion !== 2 ? makeAgent({
|
|
19963
19986
|
proxy: opts.proxy,
|
|
19964
19987
|
useDnsCache: opts.useDnsCache,
|
|
19965
19988
|
keepAliveOptions: opts.keepAliveOptions
|
|
19966
|
-
}),
|
|
19989
|
+
}) : void 0,
|
|
19967
19990
|
signal: requestController.signal
|
|
19968
19991
|
};
|
|
19969
19992
|
const finalSize = await getBodySize(input2, opts);
|
|
@@ -20060,7 +20083,9 @@ async function req(input, ...requestOptions) {
|
|
|
20060
20083
|
}
|
|
20061
20084
|
async function singleReq(input2, options2) {
|
|
20062
20085
|
var _a, _b;
|
|
20063
|
-
|
|
20086
|
+
validateOptionsForVersion(options2.httpVersion, options2);
|
|
20087
|
+
const { fetch: versionedFetch, getBodySize } = getFetchForVersion(options2.httpVersion, options2.useDnsCache);
|
|
20088
|
+
const fetch2 = (_a = options2.fetch) !== null && _a !== void 0 ? _a : versionedFetch;
|
|
20064
20089
|
let optionsFallbacks = [];
|
|
20065
20090
|
if (options2.fallbacks)
|
|
20066
20091
|
optionsFallbacks = utils.types.isArray(options2.fallbacks) ? options2.fallbacks : [options2.fallbacks];
|
|
@@ -20073,7 +20098,7 @@ async function req(input, ...requestOptions) {
|
|
|
20073
20098
|
options2 = await fb.updateOptions({ options: options2 });
|
|
20074
20099
|
while (true) {
|
|
20075
20100
|
const { requestController, requestTimer, abortHandler } = setupRequestController(options2);
|
|
20076
|
-
const request = await buildRequest(input2, options2, requestController);
|
|
20101
|
+
const request = await buildRequest(input2, options2, requestController, getBodySize);
|
|
20077
20102
|
try {
|
|
20078
20103
|
let response = await fetch2(request);
|
|
20079
20104
|
const fallbackResponse = await tryFallback(request, response, options2, optionsFallbacks);
|
|
@@ -20928,6 +20953,7 @@ var require_req_eyes = __commonJS({
|
|
|
20928
20953
|
},
|
|
20929
20954
|
proxy: settings.proxy,
|
|
20930
20955
|
useDnsCache: settings.useDnsCache,
|
|
20956
|
+
httpVersion: settings.httpVersion,
|
|
20931
20957
|
connectionTimeout: (_a = settings.connectionTimeout) !== null && _a !== void 0 ? _a : 3e5,
|
|
20932
20958
|
requestTimeout: (_b = settings.requestTimeout) !== null && _b !== void 0 ? _b : 3e4,
|
|
20933
20959
|
retryTimeout: (_c = settings.retryTimeout) !== null && _c !== void 0 ? _c : retryDuration,
|
|
@@ -28462,6 +28488,7 @@ var require_requests = __commonJS({
|
|
|
28462
28488
|
apiKey: settings.apiKey,
|
|
28463
28489
|
proxy: settings.proxy,
|
|
28464
28490
|
useDnsCache: settings.useDnsCache,
|
|
28491
|
+
httpVersion: settings.httpVersion,
|
|
28465
28492
|
agentId: settings.agentId,
|
|
28466
28493
|
interval: (_a = utils2.general.getEnvValue("HEARTBEAT_INTERVAL", "number")) !== null && _a !== void 0 ? _a : account.processKeepaliveIntervalSec * 1e3
|
|
28467
28494
|
});
|
|
@@ -29010,6 +29037,7 @@ var require_requests = __commonJS({
|
|
|
29010
29037
|
apiKey: settings.apiKey,
|
|
29011
29038
|
proxy: settings.proxy,
|
|
29012
29039
|
useDnsCache: settings.useDnsCache,
|
|
29040
|
+
httpVersion: settings.httpVersion,
|
|
29013
29041
|
agentId: settings.agentId,
|
|
29014
29042
|
interval: (_a = utils2.general.getEnvValue("HEARTBEAT_INTERVAL", "number")) !== null && _a !== void 0 ? _a : account.processKeepaliveIntervalSec * 1e3
|
|
29015
29043
|
});
|
|
@@ -103753,6 +103781,7 @@ var require_req_ufg = __commonJS({
|
|
|
103753
103781
|
},
|
|
103754
103782
|
proxy: settings.proxy,
|
|
103755
103783
|
useDnsCache: settings.useDnsCache,
|
|
103784
|
+
httpVersion: settings.httpVersion,
|
|
103756
103785
|
connectionTimeout: (_a = settings.connectionTimeout) !== null && _a !== void 0 ? _a : 3e5,
|
|
103757
103786
|
requestTimeout: {
|
|
103758
103787
|
base: 3e4,
|
|
@@ -103963,8 +103992,6 @@ var require_requests3 = __commonJS({
|
|
|
103963
103992
|
...toServerEnvironment(settings2.environment)
|
|
103964
103993
|
};
|
|
103965
103994
|
if (utils2.types.has(settings2.environment, "type") && settings2.environment.type === "native") {
|
|
103966
|
-
renderOptions.renderInfo.vhsType = target.vhsType;
|
|
103967
|
-
renderOptions.renderInfo.vhsCompatibilityParams = target.vhsCompatibilityParams;
|
|
103968
103995
|
renderOptions.renderInfo.stitchMode = settings2.stitchMode;
|
|
103969
103996
|
}
|
|
103970
103997
|
if (settings2.region) {
|
|
@@ -104272,7 +104299,7 @@ var require_resource = __commonJS({
|
|
|
104272
104299
|
return result;
|
|
104273
104300
|
};
|
|
104274
104301
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
104275
|
-
exports.makeHashedResource = exports.makeResource = void 0;
|
|
104302
|
+
exports.makeHashedEntry = exports.makeHashedResource = exports.makeResource = void 0;
|
|
104276
104303
|
var buffer_1 = require_buffer();
|
|
104277
104304
|
var crypto_1 = require_crypto_browserify();
|
|
104278
104305
|
var utils2 = __importStar(require_browser3());
|
|
@@ -104320,6 +104347,19 @@ var require_resource = __commonJS({
|
|
|
104320
104347
|
};
|
|
104321
104348
|
}
|
|
104322
104349
|
exports.makeHashedResource = makeHashedResource;
|
|
104350
|
+
function makeHashedEntry({ url, hash, rootDomSnapshot }, resourceDependencies = []) {
|
|
104351
|
+
if ("errorStatusCode" in hash) {
|
|
104352
|
+
return { url, errorStatusCode: hash.errorStatusCode };
|
|
104353
|
+
}
|
|
104354
|
+
return {
|
|
104355
|
+
url,
|
|
104356
|
+
hash: hash.hash,
|
|
104357
|
+
contentType: hash.contentType,
|
|
104358
|
+
...rootDomSnapshot && { rootDomSnapshot },
|
|
104359
|
+
resourceDependencies
|
|
104360
|
+
};
|
|
104361
|
+
}
|
|
104362
|
+
exports.makeHashedEntry = makeHashedEntry;
|
|
104323
104363
|
function isDomOrVHS(resource) {
|
|
104324
104364
|
return [
|
|
104325
104365
|
"x-applitools-html/cdt",
|
|
@@ -104357,10 +104397,11 @@ var require_resource_dom = __commonJS({
|
|
|
104357
104397
|
exports.makeResourceDom = void 0;
|
|
104358
104398
|
var resource_1 = require_resource();
|
|
104359
104399
|
function makeResourceDom({ cdt, resources }) {
|
|
104360
|
-
const
|
|
104400
|
+
const payload = {
|
|
104361
104401
|
resources: Object.fromEntries(Object.entries(resources).sort(([url1], [url2]) => url1 > url2 ? 1 : -1)),
|
|
104362
104402
|
domNodes: cdt
|
|
104363
|
-
}
|
|
104403
|
+
};
|
|
104404
|
+
const value = new TextEncoder().encode(JSON.stringify(payload));
|
|
104364
104405
|
const resource = (0, resource_1.makeResource)({ value, contentType: "x-applitools-html/cdt" });
|
|
104365
104406
|
resource.id = `dom/${resource.hash.hash}`;
|
|
104366
104407
|
return resource;
|
|
@@ -104466,22 +104507,97 @@ var require_create_render_target = __commonJS({
|
|
|
104466
104507
|
return buffer_1.Buffer.from(resourceData, "utf-8");
|
|
104467
104508
|
};
|
|
104468
104509
|
}
|
|
104510
|
+
function computeReplaceUrlSettings(snapshot, replaceResourceUrl) {
|
|
104511
|
+
if (!replaceResourceUrl || !utils2.types.has(snapshot, "url"))
|
|
104512
|
+
return void 0;
|
|
104513
|
+
return { from: getSnapshotOrigin(snapshot.url), to: replaceResourceUrl };
|
|
104514
|
+
}
|
|
104515
|
+
function collectDirectUrls(snapshot, replaceResourceUrlsSettings) {
|
|
104516
|
+
var _a, _b, _c;
|
|
104517
|
+
return [
|
|
104518
|
+
...((_a = snapshot.resourceUrls) !== null && _a !== void 0 ? _a : []).map((url) => replaceResourceUrlIfNeeded(url, replaceResourceUrlsSettings)),
|
|
104519
|
+
...Object.keys((_b = snapshot.resourceContents) !== null && _b !== void 0 ? _b : {}).map((url) => replaceResourceUrlIfNeeded(url, replaceResourceUrlsSettings)),
|
|
104520
|
+
...((_c = snapshot.frames) !== null && _c !== void 0 ? _c : []).map((f) => replaceResourceUrlIfNeeded(f.url, replaceResourceUrlsSettings))
|
|
104521
|
+
];
|
|
104522
|
+
}
|
|
104523
|
+
function buildUrlList(snapshotUrl, finalResources, originalSnapshotResource) {
|
|
104524
|
+
const urls = [snapshotUrl, ...Object.keys(finalResources).filter((url) => url !== snapshotUrl)];
|
|
104525
|
+
if (originalSnapshotResource)
|
|
104526
|
+
urls.push(snapshotUrl);
|
|
104527
|
+
return urls;
|
|
104528
|
+
}
|
|
104529
|
+
function buildHashedEntries({ urls, urlToIndex, directUrls, dependencyMap, finalResources, originalSnapshotResource }) {
|
|
104530
|
+
return urls.map((url, i) => {
|
|
104531
|
+
var _a;
|
|
104532
|
+
let deps;
|
|
104533
|
+
if (i === 0) {
|
|
104534
|
+
deps = directUrls.map((u) => urlToIndex.get(u)).filter((i2) => i2 !== void 0);
|
|
104535
|
+
} else if ((_a = dependencyMap[url]) === null || _a === void 0 ? void 0 : _a.length) {
|
|
104536
|
+
deps = dependencyMap[url].map((u) => urlToIndex.get(u)).filter((i2) => i2 !== void 0);
|
|
104537
|
+
} else {
|
|
104538
|
+
deps = [];
|
|
104539
|
+
}
|
|
104540
|
+
const hash = originalSnapshotResource && i === urls.length - 1 && url === urls[0] ? originalSnapshotResource : finalResources[url];
|
|
104541
|
+
return (0, resource_1.makeHashedEntry)({ url, hash, rootDomSnapshot: i === 0 ? true : void 0 }, deps);
|
|
104542
|
+
});
|
|
104543
|
+
}
|
|
104544
|
+
function buildDomRenderTarget({ snapshot, finalResources, dependencyMap, originalSnapshotResource, replaceResourceUrlsSettings }) {
|
|
104545
|
+
const snapshotUrl = snapshot.url;
|
|
104546
|
+
const directUrls = collectDirectUrls(snapshot, replaceResourceUrlsSettings);
|
|
104547
|
+
const urls = buildUrlList(snapshotUrl, finalResources, originalSnapshotResource);
|
|
104548
|
+
const urlToIndex = new Map(urls.map((url, i) => [url, i]));
|
|
104549
|
+
const entries = buildHashedEntries({
|
|
104550
|
+
urls,
|
|
104551
|
+
urlToIndex,
|
|
104552
|
+
directUrls,
|
|
104553
|
+
dependencyMap,
|
|
104554
|
+
finalResources,
|
|
104555
|
+
originalSnapshotResource
|
|
104556
|
+
});
|
|
104557
|
+
const snapshotResource = finalResources[snapshotUrl];
|
|
104558
|
+
delete finalResources[snapshotUrl];
|
|
104559
|
+
return { snapshot: snapshotResource, resources: { entries }, source: snapshotUrl };
|
|
104560
|
+
}
|
|
104561
|
+
function buildDependencyMap({ snapshot, snapshotResources, processedDomResource, frameResources, replaceResourceUrlsSettings }) {
|
|
104562
|
+
const frameDependencyMapping = frameResources.reduce((deps, resources, index) => {
|
|
104563
|
+
Object.assign(deps, resources.dependencyMap);
|
|
104564
|
+
const frameSnapshot = snapshot.frames[index];
|
|
104565
|
+
if (utils2.types.has(frameSnapshot, "cdt")) {
|
|
104566
|
+
const frameUrl = replaceResourceUrlIfNeeded(frameSnapshot.url, replaceResourceUrlsSettings);
|
|
104567
|
+
const frameDeps = Object.keys(resources.mapping).filter((url) => url !== frameUrl);
|
|
104568
|
+
if (frameDeps.length)
|
|
104569
|
+
deps[frameUrl] = frameDeps;
|
|
104570
|
+
}
|
|
104571
|
+
return deps;
|
|
104572
|
+
}, {});
|
|
104573
|
+
return {
|
|
104574
|
+
...frameDependencyMapping,
|
|
104575
|
+
...snapshotResources.dependencyMap,
|
|
104576
|
+
...processedDomResource.dependencyMap
|
|
104577
|
+
};
|
|
104578
|
+
}
|
|
104469
104579
|
function makeCreateRenderTarget({ processResources, logger: mainLogger, replaceResourceUrl }) {
|
|
104470
104580
|
return async function createRenderTarget({ snapshot, settings, logger = mainLogger }) {
|
|
104471
104581
|
logger = logger.extend(mainLogger, { tags: [`render-target-${utils2.general.shortid()}`] });
|
|
104582
|
+
const replaceResourceUrlsSettings = computeReplaceUrlSettings(snapshot, replaceResourceUrl);
|
|
104472
104583
|
const processedSnapshotResources = await processSnapshotResources({ snapshot, settings, logger });
|
|
104473
104584
|
const resources = await processedSnapshotResources.promise;
|
|
104474
|
-
const
|
|
104585
|
+
const { dependencyMap, originalSnapshotResource } = processedSnapshotResources;
|
|
104586
|
+
const finalResources = replaceResourceUrl ? Object.entries(resources).sort(([url1], [url2]) => url1.localeCompare(url2)).reduce((mapping, [url, resource]) => {
|
|
104475
104587
|
mapping[url] = resource;
|
|
104476
104588
|
return mapping;
|
|
104477
104589
|
}, {}) : resources;
|
|
104478
104590
|
if (utils2.types.has(snapshot, "cdt")) {
|
|
104479
|
-
|
|
104480
|
-
|
|
104481
|
-
|
|
104591
|
+
return buildDomRenderTarget({
|
|
104592
|
+
snapshot,
|
|
104593
|
+
finalResources,
|
|
104594
|
+
dependencyMap,
|
|
104595
|
+
originalSnapshotResource,
|
|
104596
|
+
replaceResourceUrlsSettings
|
|
104597
|
+
});
|
|
104482
104598
|
} else {
|
|
104483
104599
|
const snapshotResource = resources.vhs;
|
|
104484
|
-
return
|
|
104600
|
+
return { snapshot: snapshotResource, resources: { entries: [] } };
|
|
104485
104601
|
}
|
|
104486
104602
|
};
|
|
104487
104603
|
async function processSnapshotResources({ snapshot, settings, logger }) {
|
|
@@ -104534,7 +104650,7 @@ var require_create_render_target = __commonJS({
|
|
|
104534
104650
|
const domResource = utils2.types.has(snapshot, "cdt") ? {
|
|
104535
104651
|
[snapshot.url]: (0, resource_dom_1.makeResourceDom)({
|
|
104536
104652
|
cdt: replaceUrlInContentIfNeeded(snapshot.cdt, replaceResourceUrlsSettings),
|
|
104537
|
-
resources: resourceMappingWithoutDom
|
|
104653
|
+
resources: Object.fromEntries(Object.entries(resourceMappingWithoutDom).filter(([url]) => url !== snapshot.url))
|
|
104538
104654
|
})
|
|
104539
104655
|
} : {
|
|
104540
104656
|
vhs: (0, resource_vhs_1.makeResourceVhs)({
|
|
@@ -104549,13 +104665,23 @@ var require_create_render_target = __commonJS({
|
|
|
104549
104665
|
const frameResourceMapping = frameResources.reduce((mapping, resources) => {
|
|
104550
104666
|
return Object.assign(mapping, resources.mapping);
|
|
104551
104667
|
}, {});
|
|
104668
|
+
const originalSnapshotResource = utils2.types.has(snapshot, "url") ? snapshotResourcesMapping[snapshot.url] : void 0;
|
|
104552
104669
|
const resourceMapping = {
|
|
104553
104670
|
...frameResourceMapping,
|
|
104554
104671
|
...snapshotResources.mapping,
|
|
104555
104672
|
...processedDomResource.mapping
|
|
104556
104673
|
};
|
|
104674
|
+
const dependencyMap = buildDependencyMap({
|
|
104675
|
+
snapshot,
|
|
104676
|
+
snapshotResources,
|
|
104677
|
+
processedDomResource,
|
|
104678
|
+
frameResources,
|
|
104679
|
+
replaceResourceUrlsSettings
|
|
104680
|
+
});
|
|
104557
104681
|
return {
|
|
104558
104682
|
mapping: resourceMapping,
|
|
104683
|
+
dependencyMap,
|
|
104684
|
+
originalSnapshotResource,
|
|
104559
104685
|
promise: Promise.all([
|
|
104560
104686
|
snapshotResources.promise,
|
|
104561
104687
|
processedDomResource.promise,
|
|
@@ -122009,6 +122135,7 @@ var require_process_resources = __commonJS({
|
|
|
122009
122135
|
var utils2 = __importStar(require_browser3());
|
|
122010
122136
|
function makeProcessResources({ fetchResource, uploadResource, cache = /* @__PURE__ */ new Map(), asyncCache, logger: mainLogger }) {
|
|
122011
122137
|
return async function processResources({ resources, settings, logger = mainLogger }) {
|
|
122138
|
+
var _a;
|
|
122012
122139
|
logger = logger.extend(mainLogger, { tags: [`process-resources-${utils2.general.shortid()}`] });
|
|
122013
122140
|
const processedResources = await Object.entries(resources).reduce(async (processedResourcesPromise, [url, resource]) => {
|
|
122014
122141
|
if (utils2.types.has(resource, "value") || utils2.types.has(resource, "errorStatusCode")) {
|
|
@@ -122024,12 +122151,15 @@ var require_process_resources = __commonJS({
|
|
|
122024
122151
|
}
|
|
122025
122152
|
}, Promise.resolve({}));
|
|
122026
122153
|
const mapping = {};
|
|
122154
|
+
const dependencyMap = {};
|
|
122027
122155
|
const ready = [];
|
|
122028
122156
|
for (const [url, processedResource] of Object.entries(processedResources)) {
|
|
122029
122157
|
mapping[url] = processedResource.hash;
|
|
122158
|
+
if ((_a = processedResource.dependencies) === null || _a === void 0 ? void 0 : _a.length)
|
|
122159
|
+
dependencyMap[url] = processedResource.dependencies;
|
|
122030
122160
|
ready.push(processedResource.ready);
|
|
122031
122161
|
}
|
|
122032
|
-
return { mapping, promise: Promise.all(ready).then(() => mapping) };
|
|
122162
|
+
return { mapping, dependencyMap, promise: Promise.all(ready).then(() => mapping) };
|
|
122033
122163
|
};
|
|
122034
122164
|
async function processContentfulResource({ resource, logger = mainLogger }) {
|
|
122035
122165
|
var _a;
|
|
@@ -126126,7 +126256,8 @@ var require_populate_eyes_server_settings = __commonJS({
|
|
|
126126
126256
|
eyesServerUrl: settings.eyesServerUrl,
|
|
126127
126257
|
apiKey: settings.apiKey,
|
|
126128
126258
|
proxy: settings.proxy,
|
|
126129
|
-
useDnsCache: settings.useDnsCache
|
|
126259
|
+
useDnsCache: settings.useDnsCache,
|
|
126260
|
+
httpVersion: settings.httpVersion
|
|
126130
126261
|
};
|
|
126131
126262
|
}
|
|
126132
126263
|
exports.populateEyesServerSettings = populateEyesServerSettings;
|
|
@@ -128280,7 +128411,7 @@ var require_package3 = __commonJS({
|
|
|
128280
128411
|
"../core/package.json"(exports, module) {
|
|
128281
128412
|
module.exports = {
|
|
128282
128413
|
name: "@applitools/core",
|
|
128283
|
-
version: "4.
|
|
128414
|
+
version: "4.61.0",
|
|
128284
128415
|
homepage: "https://applitools.com",
|
|
128285
128416
|
bugs: {
|
|
128286
128417
|
url: "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -129822,7 +129953,7 @@ var require_package4 = __commonJS({
|
|
|
129822
129953
|
"../eyes/package.json"(exports, module) {
|
|
129823
129954
|
module.exports = {
|
|
129824
129955
|
name: "@applitools/eyes",
|
|
129825
|
-
version: "1.
|
|
129956
|
+
version: "1.40.0",
|
|
129826
129957
|
keywords: [
|
|
129827
129958
|
"applitools",
|
|
129828
129959
|
"eyes",
|
|
@@ -131437,7 +131568,7 @@ var require_package5 = __commonJS({
|
|
|
131437
131568
|
"package.json"(exports, module) {
|
|
131438
131569
|
module.exports = {
|
|
131439
131570
|
name: "@applitools/eyes-browser",
|
|
131440
|
-
version: "1.6.
|
|
131571
|
+
version: "1.6.14",
|
|
131441
131572
|
type: "module",
|
|
131442
131573
|
keywords: [
|
|
131443
131574
|
"applitools",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-browser",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"test": "run playwright test"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@applitools/eyes": "1.
|
|
54
|
+
"@applitools/eyes": "1.40.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@applitools/test-server": "1.4.3",
|
|
@@ -63,6 +63,8 @@ export type Configuration<TSpec extends Core.SpecType = Core.SpecType> = {
|
|
|
63
63
|
hostAppInfo?: string;
|
|
64
64
|
hostOS?: string;
|
|
65
65
|
hostOSInfo?: string;
|
|
66
|
+
/** @internal */
|
|
67
|
+
httpVersion?: 1 | 2;
|
|
66
68
|
ignoreBaseline?: boolean;
|
|
67
69
|
ignoreCaret?: boolean;
|
|
68
70
|
ignoreDisplacements?: boolean;
|
|
@@ -70,6 +72,7 @@ export type Configuration<TSpec extends Core.SpecType = Core.SpecType> = {
|
|
|
70
72
|
isDisabled?: boolean;
|
|
71
73
|
layoutBreakpoints?: boolean | number[] | {
|
|
72
74
|
breakpoints: number[] | boolean;
|
|
75
|
+
heightBreakpoints?: boolean;
|
|
73
76
|
reload?: boolean;
|
|
74
77
|
};
|
|
75
78
|
matchLevel?: MatchLevel;
|
|
@@ -312,6 +315,14 @@ export declare class ConfigurationData<TSpec extends Core.SpecType = Core.SpecTy
|
|
|
312
315
|
set hostOSInfo(hostOSInfo: string);
|
|
313
316
|
getHostOSInfo(): string;
|
|
314
317
|
setHostOSInfo(hostOSInfo: string): this;
|
|
318
|
+
/** @internal */
|
|
319
|
+
get httpVersion(): 1 | 2;
|
|
320
|
+
/** @internal */
|
|
321
|
+
set httpVersion(httpVersion: 1 | 2);
|
|
322
|
+
/** @internal */
|
|
323
|
+
getHttpVersion(): 1 | 2;
|
|
324
|
+
/** @internal */
|
|
325
|
+
setHttpVersion(httpVersion: 1 | 2): this;
|
|
315
326
|
get ignoreBaseline(): boolean;
|
|
316
327
|
set ignoreBaseline(ignoreBaseline: boolean);
|
|
317
328
|
getIgnoreBaseline(): boolean;
|
|
@@ -334,18 +345,22 @@ export declare class ConfigurationData<TSpec extends Core.SpecType = Core.SpecTy
|
|
|
334
345
|
setIsDisabled(isDisabled: boolean): this;
|
|
335
346
|
get layoutBreakpoints(): boolean | number[] | {
|
|
336
347
|
breakpoints: number[] | boolean;
|
|
348
|
+
heightBreakpoints?: boolean;
|
|
337
349
|
reload?: boolean;
|
|
338
350
|
};
|
|
339
351
|
set layoutBreakpoints(layoutBreakpoints: boolean | number[] | {
|
|
340
352
|
breakpoints: number[] | boolean;
|
|
353
|
+
heightBreakpoints?: boolean;
|
|
341
354
|
reload?: boolean;
|
|
342
355
|
});
|
|
343
356
|
getLayoutBreakpoints(): boolean | number[] | {
|
|
344
357
|
breakpoints: number[] | boolean;
|
|
358
|
+
heightBreakpoints?: boolean;
|
|
345
359
|
reload?: boolean;
|
|
346
360
|
};
|
|
347
361
|
setLayoutBreakpoints(layoutBreakpoints: boolean | number[] | {
|
|
348
362
|
breakpoints: number[] | boolean;
|
|
363
|
+
heightBreakpoints?: boolean;
|
|
349
364
|
reload?: boolean;
|
|
350
365
|
}): this;
|
|
351
366
|
get matchLevel(): MatchLevel;
|