browsertime 17.0.0-beta.4 → 17.0.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 +22 -13
- package/bin/browsertime.js +4 -4
- package/bin/browsertimeWebPageReplay.js +2 -2
- package/index.js +2 -2
- package/lib/android/gnirehtet.js +1 -2
- package/lib/android/root.js +57 -16
- package/lib/chrome/chromeDevtoolsProtocol.js +2 -3
- package/lib/chrome/har.js +1 -1
- package/lib/chrome/longTaskMetrics.js +1 -1
- package/lib/chrome/parseCpuTrace.js +2 -2
- package/lib/chrome/settings/chromeAndroidOptions.js +1 -1
- package/lib/chrome/settings/chromeDesktopOptions.js +1 -1
- package/lib/chrome/settings/traceCategories.js +1 -1
- package/lib/chrome/traceCategoriesParser.js +3 -3
- package/lib/chrome/webdriver/builder.js +1 -1
- package/lib/chrome/webdriver/chromium.js +13 -17
- package/lib/chrome/webdriver/setupChromiumOptions.js +18 -13
- package/lib/connectivity/humble.js +10 -12
- package/lib/connectivity/index.js +1 -1
- package/lib/core/engine/collector.js +2 -4
- package/lib/core/engine/command/addText.js +1 -2
- package/lib/core/engine/command/android.js +1 -1
- package/lib/core/engine/command/cache.js +1 -2
- package/lib/core/engine/command/chromeDevToolsProtocol.js +1 -2
- package/lib/core/engine/command/click.js +1 -2
- package/lib/core/engine/command/debug.js +1 -3
- package/lib/core/engine/command/javaScript.js +1 -2
- package/lib/core/engine/command/measure.js +13 -15
- package/lib/core/engine/command/meta.js +1 -1
- package/lib/core/engine/command/navigation.js +1 -1
- package/lib/core/engine/command/screenshot.js +1 -1
- package/lib/core/engine/command/scroll.js +1 -1
- package/lib/core/engine/command/select.js +1 -1
- package/lib/core/engine/command/set.js +1 -1
- package/lib/core/engine/command/stopWatch.js +1 -1
- package/lib/core/engine/command/switch.js +44 -1
- package/lib/core/engine/command/util/lcpHighlightScript.js +1 -1
- package/lib/core/engine/command/util/lsHighlightScript.js +1 -1
- package/lib/core/engine/command/wait.js +1 -1
- package/lib/core/engine/index.js +12 -12
- package/lib/core/engine/iteration.js +27 -27
- package/lib/core/engine/run.js +1 -1
- package/lib/core/pageCompleteChecks/defaultPageCompleteCheck.js +1 -1
- package/lib/core/pageCompleteChecks/pageCompleteCheckByInactivity.js +1 -1
- package/lib/core/pageCompleteChecks/spaInactivity.js +1 -1
- package/lib/core/seleniumRunner.js +9 -11
- package/lib/edge/webdriver/builder.js +1 -1
- package/lib/extensionserver/index.js +2 -4
- package/lib/extensionserver/setup.js +1 -1
- package/lib/firefox/geckoProfiler.js +46 -16
- package/lib/firefox/getHAR.js +1 -1
- package/lib/firefox/memoryReport.js +1 -1
- package/lib/firefox/settings/disableSafeBrowsingPreferences.js +1 -1
- package/lib/firefox/settings/disableTrackingProtectionPreferences.js +1 -1
- package/lib/firefox/settings/firefoxPreferences.js +1 -1
- package/lib/firefox/webdriver/builder.js +9 -9
- package/lib/firefox/webdriver/firefox.js +24 -6
- package/lib/safari/webdriver/safari.js +1 -1
- package/lib/screenshot/defaults.js +1 -1
- package/lib/screenshot/index.js +3 -5
- package/lib/support/cli.js +5 -5
- package/lib/support/dns.js +1 -1
- package/lib/support/engineUtils.js +5 -13
- package/lib/support/getViewPort.js +1 -1
- package/lib/support/har/index.js +6 -8
- package/lib/support/images/index.js +1 -1
- package/lib/support/logging.js +1 -1
- package/lib/support/pathToFolder.js +4 -4
- package/lib/support/preURL.js +1 -1
- package/lib/support/processes.js +1 -1
- package/lib/support/setResourceTimingBufferSize.js +1 -1
- package/lib/support/stop.js +1 -1
- package/lib/support/storageManager.js +1 -3
- package/lib/support/tcpdump.js +2 -2
- package/lib/support/xvfb.js +2 -4
- package/lib/video/postprocessing/finetune/addTextToVideo.js +3 -3
- package/lib/video/postprocessing/finetune/convertFps.js +1 -1
- package/lib/video/postprocessing/finetune/getFont.js +1 -1
- package/lib/video/postprocessing/finetune/getTimingMetrics.js +2 -2
- package/lib/video/postprocessing/finetune/index.js +4 -4
- package/lib/video/postprocessing/finetune/removeOrange.js +1 -1
- package/lib/video/postprocessing/visualmetrics/extraMetrics.js +1 -1
- package/lib/video/postprocessing/visualmetrics/getVideoMetrics.js +2 -2
- package/lib/video/screenRecording/android/recorder.js +1 -1
- package/lib/video/screenRecording/desktop/convert.js +1 -1
- package/lib/video/screenRecording/desktop/desktopRecorder.js +3 -3
- package/lib/video/screenRecording/desktop/ffmpegRecorder.js +6 -6
- package/lib/video/screenRecording/desktop/osx/getSPDisplaysDataType.js +1 -1
- package/lib/video/screenRecording/desktop/osx/getScreen.js +1 -1
- package/lib/video/screenRecording/firefox/firefoxWindowRecorder.js +1 -1
- package/lib/video/screenRecording/ios/convertToMp4.js +1 -1
- package/lib/video/screenRecording/ios/iosRecorder.js +2 -2
- package/lib/video/screenRecording/iosSimulator/convertToMp4.js +1 -1
- package/lib/video/screenRecording/iosSimulator/recorder.js +2 -2
- package/lib/video/screenRecording/recorder.js +6 -6
- package/lib/video/screenRecording/setOrangeBackground.js +1 -1
- package/lib/video/video.js +9 -11
- package/package.json +17 -17
|
@@ -4,7 +4,7 @@ import { resolve, join } from 'node:path';
|
|
|
4
4
|
import { execaCommand as command } from 'execa';
|
|
5
5
|
import { promisify } from 'node:util';
|
|
6
6
|
import { unlink as _unlink } from 'node:fs';
|
|
7
|
-
import convert from './convertToMp4.js';
|
|
7
|
+
import { convert } from './convertToMp4.js';
|
|
8
8
|
import intel from 'intel';
|
|
9
9
|
const log = intel.getLogger('browsertime.video');
|
|
10
10
|
const unlink = promisify(_unlink);
|
|
@@ -13,7 +13,7 @@ const moduleRootPath = resolve(__dirname, '..', '..', '..', '..');
|
|
|
13
13
|
const QVH = resolve(moduleRootPath, 'vendor', 'mac', 'x86', 'qvh');
|
|
14
14
|
const delay = ms => new Promise(res => setTimeout(res, ms));
|
|
15
15
|
|
|
16
|
-
export
|
|
16
|
+
export class IOSRecorder {
|
|
17
17
|
constructor(options, baseDir) {
|
|
18
18
|
this.options = options;
|
|
19
19
|
this.uuid = options.safari.deviceUDID;
|
|
@@ -2,7 +2,7 @@ import { execa } from 'execa';
|
|
|
2
2
|
import intel from 'intel';
|
|
3
3
|
const log = intel.getLogger('browsertime.video');
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export async function convert(source, destination) {
|
|
6
6
|
const scriptArguments = [
|
|
7
7
|
// '-framerate',
|
|
8
8
|
// 60,
|
|
@@ -3,12 +3,12 @@ import util from 'node:util';
|
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
import { execa } from 'execa';
|
|
5
5
|
import intel from 'intel';
|
|
6
|
-
import {
|
|
6
|
+
import { convert } from './convertToMp4.js';
|
|
7
7
|
const unlink = util.promisify(fs.unlink);
|
|
8
8
|
const delay = ms => new Promise(res => setTimeout(res, ms));
|
|
9
9
|
const log = intel.getLogger('browsertime.video');
|
|
10
10
|
|
|
11
|
-
export
|
|
11
|
+
export class IOSSimulatorRecorder {
|
|
12
12
|
constructor(options, baseDir) {
|
|
13
13
|
this.options = options;
|
|
14
14
|
this.tmpVideo = path.join(baseDir, 'tmp.mov');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isAndroidConfigured } from '../../android/index.js';
|
|
2
|
-
import AndroidRecorder from './android/recorder.js';
|
|
3
|
-
import DesktopRecorder from './desktop/desktopRecorder.js';
|
|
4
|
-
import FirefoxWindowRecorder from './firefox/firefoxWindowRecorder.js';
|
|
5
|
-
import IOSSimulatorRecorder from './iosSimulator/recorder.js';
|
|
6
|
-
import IOSRecorder from './ios/iosRecorder.js';
|
|
2
|
+
import { AndroidRecorder } from './android/recorder.js';
|
|
3
|
+
import { DesktopRecorder } from './desktop/desktopRecorder.js';
|
|
4
|
+
import { FirefoxWindowRecorder } from './firefox/firefoxWindowRecorder.js';
|
|
5
|
+
import { IOSSimulatorRecorder } from './iosSimulator/recorder.js';
|
|
6
|
+
import { IOSRecorder } from './ios/iosRecorder.js';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export function getRecorder(options, browser, baseDir) {
|
|
9
9
|
if (
|
|
10
10
|
options.browser === 'firefox' &&
|
|
11
11
|
options.firefox &&
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import intel from 'intel';
|
|
2
2
|
import { until, By } from 'selenium-webdriver';
|
|
3
3
|
const log = intel.getLogger('browsertime.video');
|
|
4
|
-
export
|
|
4
|
+
export async function setOrangeBackground(driver) {
|
|
5
5
|
log.debug('Add orange color');
|
|
6
6
|
// We tried other ways for Android (access an orange page)
|
|
7
7
|
// That works fine ... but break scripts
|
package/lib/video/video.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import get from 'lodash.get';
|
|
3
|
-
import getRecorder from './screenRecording/recorder.js';
|
|
4
|
-
import getVideoMetrics from './postprocessing/visualmetrics/getVideoMetrics.js';
|
|
5
|
-
import finetuneVideo from './postprocessing/finetune/index.js';
|
|
3
|
+
import { getRecorder } from './screenRecording/recorder.js';
|
|
4
|
+
import { getVideoMetrics } from './postprocessing/visualmetrics/getVideoMetrics.js';
|
|
5
|
+
import { finetuneVideo } from './postprocessing/finetune/index.js';
|
|
6
6
|
import { rename, removeFile, removeDirAndFiles } from '../support/fileUtil.js';
|
|
7
|
-
import
|
|
7
|
+
import { pathToFolder } from '../support/pathToFolder.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Create a new Video that handles everything with the video
|
|
11
11
|
* @class
|
|
12
12
|
*/
|
|
13
|
-
class Video {
|
|
13
|
+
export class Video {
|
|
14
14
|
constructor(storageManager, options, browser) {
|
|
15
15
|
this.options = options;
|
|
16
16
|
this.storageManager = storageManager;
|
|
@@ -24,15 +24,15 @@ class Video {
|
|
|
24
24
|
this.index = index;
|
|
25
25
|
|
|
26
26
|
this.videoDir = await storageManager.createSubDataDir(
|
|
27
|
-
join(
|
|
27
|
+
join(pathToFolder(url, this.options), 'video')
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
await storageManager.createSubDataDir(
|
|
31
|
-
join(
|
|
31
|
+
join(pathToFolder(url, this.options), 'video', 'images', '' + index)
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
this.filmstripDir = await storageManager.createSubDataDir(
|
|
35
|
-
join(
|
|
35
|
+
join(pathToFolder(url, this.options), 'filmstrip', '' + index)
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -60,7 +60,7 @@ class Video {
|
|
|
60
60
|
this.isRecording = false;
|
|
61
61
|
this.videoPath = join(
|
|
62
62
|
this.storageManager.directory,
|
|
63
|
-
|
|
63
|
+
pathToFolder(url, this.options),
|
|
64
64
|
'video',
|
|
65
65
|
this.index + '.mp4'
|
|
66
66
|
);
|
|
@@ -120,5 +120,3 @@ class Video {
|
|
|
120
120
|
return this.recorder.timeToFirstFrame;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
export default Video;
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Browsertime",
|
|
3
|
-
"version": "17.0.0
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"bin": "./bin/browsertime.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@cypress/xvfb": "1.2.4",
|
|
8
8
|
"@devicefarmer/adbkit": "2.11.3",
|
|
9
|
-
"@sitespeed.io/chromedriver": "
|
|
10
|
-
"@sitespeed.io/edgedriver": "
|
|
11
|
-
"@sitespeed.io/geckodriver": "0.
|
|
9
|
+
"@sitespeed.io/chromedriver": "110.0.5481-77",
|
|
10
|
+
"@sitespeed.io/edgedriver": "109.0.1518-70",
|
|
11
|
+
"@sitespeed.io/geckodriver": "0.32.0",
|
|
12
12
|
"@sitespeed.io/throttle": "5.0.0",
|
|
13
13
|
"@sitespeed.io/tracium": "0.3.3",
|
|
14
14
|
"btoa": "1.2.1",
|
|
15
15
|
"chrome-har": "0.13.0",
|
|
16
|
-
"chrome-remote-interface": "0.
|
|
17
|
-
"dayjs": "1.11.
|
|
16
|
+
"chrome-remote-interface": "0.32.0",
|
|
17
|
+
"dayjs": "1.11.7",
|
|
18
18
|
"execa": "6.1.0",
|
|
19
19
|
"fast-stats": "0.0.6",
|
|
20
20
|
"find-up": "6.3.0",
|
|
@@ -27,21 +27,21 @@
|
|
|
27
27
|
"lodash.merge": "4.6.2",
|
|
28
28
|
"lodash.pick": "4.4.0",
|
|
29
29
|
"lodash.set": "4.3.2",
|
|
30
|
-
"selenium-webdriver": "4.
|
|
31
|
-
"yargs": "17.6.
|
|
30
|
+
"selenium-webdriver": "4.8.0",
|
|
31
|
+
"yargs": "17.6.2"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"jimp": "0.
|
|
34
|
+
"jimp": "0.22.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"ava": "5.0
|
|
38
|
-
"eslint": "8.
|
|
39
|
-
"eslint-config-prettier": "8.
|
|
37
|
+
"ava": "5.1.0",
|
|
38
|
+
"eslint": "8.31.0",
|
|
39
|
+
"eslint-config-prettier": "8.6.0",
|
|
40
40
|
"eslint-plugin-prettier": "4.2.1",
|
|
41
|
-
"eslint-plugin-unicorn": "
|
|
42
|
-
"prettier": "2.
|
|
43
|
-
"serve-handler": "6.1.
|
|
44
|
-
"serve": "14.
|
|
41
|
+
"eslint-plugin-unicorn": "45.0.2",
|
|
42
|
+
"prettier": "2.8.2",
|
|
43
|
+
"serve-handler": "6.1.5",
|
|
44
|
+
"serve": "14.1.2"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=14.19.1"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"!test/data"
|
|
94
94
|
],
|
|
95
95
|
"concurrency": 1,
|
|
96
|
-
"failFast":
|
|
96
|
+
"failFast": true,
|
|
97
97
|
"require": [
|
|
98
98
|
"./test/util/setup.js"
|
|
99
99
|
],
|