@percy/core 1.30.7 → 1.30.8-beta.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/dist/network.js +7 -2
- package/package.json +9 -9
package/dist/network.js
CHANGED
|
@@ -504,6 +504,13 @@ async function saveResponseResource(network, request, session) {
|
|
|
504
504
|
url,
|
|
505
505
|
responseStatus: response === null || response === void 0 ? void 0 : response.status
|
|
506
506
|
};
|
|
507
|
+
// Checing for content length more than 100MB, to prevent websocket error which is governed by
|
|
508
|
+
// maxPayload option of websocket defaulted to 100MB.
|
|
509
|
+
// If content-length is more than our allowed 25MB, no need to process that resouce we can return log.
|
|
510
|
+
let contentLength = parseInt(response.headers['Content-Length']);
|
|
511
|
+
if (contentLength > MAX_RESOURCE_SIZE) {
|
|
512
|
+
return log.debug('- Skipping resource larger than 25MB', meta);
|
|
513
|
+
}
|
|
507
514
|
let resource = network.intercept.getResource(url);
|
|
508
515
|
if (!resource || !resource.root && !resource.provided && disableCache) {
|
|
509
516
|
try {
|
|
@@ -520,8 +527,6 @@ async function saveResponseResource(network, request, session) {
|
|
|
520
527
|
return log.debug('- Skipping remote resource', meta);
|
|
521
528
|
} else if (!body.length) {
|
|
522
529
|
return log.debug('- Skipping empty response', meta);
|
|
523
|
-
} else if (body.length > MAX_RESOURCE_SIZE) {
|
|
524
|
-
return log.debug('- Skipping resource larger than 25MB', meta);
|
|
525
530
|
} else if (!ALLOWED_STATUSES.includes(response.status)) {
|
|
526
531
|
return log.debug(`- Skipping disallowed status [${response.status}]`, meta);
|
|
527
532
|
} else if (!enableJavaScript && !ALLOWED_RESOURCES.includes(request.type)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/core",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.8-beta.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "beta"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=14"
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"test:types": "tsd"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@percy/client": "1.30.
|
|
47
|
-
"@percy/config": "1.30.
|
|
48
|
-
"@percy/dom": "1.30.
|
|
49
|
-
"@percy/logger": "1.30.
|
|
50
|
-
"@percy/monitoring": "1.30.
|
|
51
|
-
"@percy/webdriver-utils": "1.30.
|
|
46
|
+
"@percy/client": "1.30.8-beta.1",
|
|
47
|
+
"@percy/config": "1.30.8-beta.1",
|
|
48
|
+
"@percy/dom": "1.30.8-beta.1",
|
|
49
|
+
"@percy/logger": "1.30.8-beta.1",
|
|
50
|
+
"@percy/monitoring": "1.30.8-beta.1",
|
|
51
|
+
"@percy/webdriver-utils": "1.30.8-beta.1",
|
|
52
52
|
"content-disposition": "^0.5.4",
|
|
53
53
|
"cross-spawn": "^7.0.3",
|
|
54
54
|
"extract-zip": "^2.0.1",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"ws": "^8.17.1",
|
|
62
62
|
"yaml": "^2.4.1"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "db04f87e6074b48cc3940ccffbefe59407016cf6"
|
|
65
65
|
}
|