@percy/core 1.31.15-beta.0 → 1.32.0-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/api.js +690 -16
- package/dist/browser.js +17 -5
- package/dist/install.js +7 -6
- package/dist/maestro-hierarchy.js +1769 -0
- package/dist/network.js +261 -33
- package/dist/percy.js +18 -0
- package/dist/proto/README.md +47 -0
- package/dist/proto/maestro_android.proto +116 -0
- package/package.json +13 -9
- package/test/helpers/server.js +7 -1
package/dist/browser.js
CHANGED
|
@@ -10,6 +10,20 @@ import logger from '@percy/logger';
|
|
|
10
10
|
import install from './install.js';
|
|
11
11
|
import Session from './session.js';
|
|
12
12
|
import Page from './page.js';
|
|
13
|
+
|
|
14
|
+
// Chrome features Percy disables for v143 new-headless asset discovery.
|
|
15
|
+
const DISABLED_FEATURES = ['Translate',
|
|
16
|
+
// suppress translate prompt overlay
|
|
17
|
+
'OptimizationGuideModelDownloading',
|
|
18
|
+
// suppress background model fetches
|
|
19
|
+
'IsolateOrigins',
|
|
20
|
+
// [headless-only] keep cross-origin sub-resources on the page session for CDP capture
|
|
21
|
+
'site-per-process',
|
|
22
|
+
// companion to IsolateOrigins
|
|
23
|
+
'HttpsFirstBalancedModeAutoEnable',
|
|
24
|
+
// allow HTTP customer URLs (CI / local dev / staging)
|
|
25
|
+
'LocalNetworkAccessChecks' // allow loopback/RFC1918 sub-resources (Chrome 143 LNA gating)
|
|
26
|
+
];
|
|
13
27
|
export class Browser extends EventEmitter {
|
|
14
28
|
log = logger('core:browser');
|
|
15
29
|
sessions = new Map();
|
|
@@ -17,9 +31,7 @@ export class Browser extends EventEmitter {
|
|
|
17
31
|
closed = false;
|
|
18
32
|
#callbacks = new Map();
|
|
19
33
|
#lastid = 0;
|
|
20
|
-
args = [
|
|
21
|
-
// disable the translate popup and optimization downloads
|
|
22
|
-
'--disable-features=Translate,OptimizationGuideModelDownloading',
|
|
34
|
+
args = [`--disable-features=${DISABLED_FEATURES.join(',')}`,
|
|
23
35
|
// disable several subsystems which run network requests in the background
|
|
24
36
|
'--disable-background-networking',
|
|
25
37
|
// disable task throttling of timer tasks from background pages
|
|
@@ -318,8 +330,8 @@ export class Browser extends EventEmitter {
|
|
|
318
330
|
let match = chunk.match(/^DevTools listening on (ws:\/\/.*)$/m);
|
|
319
331
|
if (match) cleanup(() => resolve(match[1]));
|
|
320
332
|
};
|
|
321
|
-
let handleExitClose = () => handleError();
|
|
322
|
-
let handleError = error => cleanup(() => reject(new Error(`Failed to launch browser. ${
|
|
333
|
+
let handleExitClose = () => handleError(new Error('Browser exited before devtools address'));
|
|
334
|
+
let handleError = error => cleanup(() => reject(new Error(`Failed to launch browser. ${error.message}\n${stderr}'\n\n`)));
|
|
323
335
|
let cleanup = callback => {
|
|
324
336
|
clearTimeout(timeoutId);
|
|
325
337
|
this.process.stderr.off('data', handleData);
|
package/dist/install.js
CHANGED
|
@@ -162,13 +162,14 @@ export function chromium({
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
//
|
|
165
|
+
// Chrome 143.0.7499.169 (base position 1536371) — closest per-platform
|
|
166
|
+
// revision from https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html
|
|
166
167
|
chromium.revisions = {
|
|
167
|
-
linux: '
|
|
168
|
-
win64: '
|
|
169
|
-
win32: '
|
|
170
|
-
darwin: '
|
|
171
|
-
darwinArm: '
|
|
168
|
+
linux: '1536366',
|
|
169
|
+
win64: '1536376',
|
|
170
|
+
win32: '1536377',
|
|
171
|
+
darwin: '1536380',
|
|
172
|
+
darwinArm: '1536376'
|
|
172
173
|
};
|
|
173
174
|
|
|
174
175
|
// export the namespace by default
|