mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* use build options for smaller build
* update to puppeteer@18.1.0
* increase timeouts
- reporting.queue.timeout: 4m
- screenshotting.timeouts.openUrl: 1m
- screenshotting.timeouts.waitForElements: 1m
- screenshotting.timeouts.renderComplete: 2m
* update docs and refs for timeouts
* add arm64 info
* fix binaryChecksum for linux_x64
* restore comment?
* Build script changes from #143022
(cherry picked from commit 53d07a2283
)
This commit is contained in:
parent
8a9a635d73
commit
8ab7e717a8
18 changed files with 157 additions and 148 deletions
|
@ -83,7 +83,9 @@ security is enabled, <<xpack-security-encryptionKey, `xpack.security.encryptionK
|
|||
Specifies the {time-units}[time] that the reporting poller waits between polling the index for any pending Reporting jobs. Can be specified as number of milliseconds. Defaults to `3s`.
|
||||
|
||||
[[xpack-reporting-q-timeout]] `xpack.reporting.queue.timeout` {ess-icon}::
|
||||
{time-units}[How long] each worker has to produce a report. If your machine is slow or under heavy load, you might need to increase this timeout. If a Reporting job execution goes over this time limit, the job is marked as a failure and no download will be available. Can be specified as number of milliseconds. Defaults to `2m`.
|
||||
{time-units}[How long] each worker has to produce a report. If your machine is slow or under heavy load, you
|
||||
might need to increase this timeout. If a Reporting job execution goes over this time limit, the job is marked
|
||||
as a failure and no download will be available. Can be specified as number of milliseconds. Defaults to `4m`.
|
||||
|
||||
[float]
|
||||
[[reporting-capture-settings]]
|
||||
|
@ -92,13 +94,19 @@ Specifies the {time-units}[time] that the reporting poller waits between polling
|
|||
Reporting uses an internal "screenshotting" plugin to capture screenshots from {kib}. The following settings control the capturing process.
|
||||
|
||||
`xpack.screenshotting.capture.timeouts.openUrl` {ess-icon}::
|
||||
Specify the {time-units}[time] to allow the Reporting browser to wait for the "Loading..." screen to dismiss and find the initial data for the page. If the time is exceeded, a screenshot is captured showing the current page, and the download link shows a warning message. Can be specified as number of milliseconds. Defaults to `1m`.
|
||||
Specify the {time-units}[time] to allow the Reporting browser to wait for the "Loading..." screen to dismiss
|
||||
and find the initial data for the page. If the time is exceeded, a screenshot is captured showing the current
|
||||
page, and the download link shows a warning message. Can be specified as number of milliseconds. Defaults to `1m`.
|
||||
|
||||
`xpack.screenshotting.capture.timeouts.waitForElements` {ess-icon}::
|
||||
Specify the {time-units}[time] to allow the Reporting browser to wait for all visualization panels to load on the page. If the time is exceeded, a screenshot is captured showing the current page, and the download link shows a warning message. Can be specified as number of milliseconds. Defaults to `30s`.
|
||||
Specify the {time-units}[time] to allow the Reporting browser to wait for all visualization panels to load on
|
||||
the page. If the time is exceeded, a screenshot is captured showing the current page, and the download link
|
||||
shows a warning message. Can be specified as number of milliseconds. Defaults to `1m`.
|
||||
|
||||
`xpack.screenshotting.capture.timeouts.renderComplete` {ess-icon}::
|
||||
Specify the {time-units}[time] to allow the Reporting browser to wait for all visualizations to fetch and render the data. If the time is exceeded, a screenshot is captured showing the current page, and the download link shows a warning message. Can be specified as number of milliseconds. Defaults to `30s`.
|
||||
Specify the {time-units}[time] to allow the Reporting browser to wait for all visualizations to fetch and
|
||||
render the data. If the time is exceeded, a screenshot is captured showing the current page, and the download
|
||||
link shows a warning message. Can be specified as number of milliseconds. Defaults to `2m`.
|
||||
|
||||
NOTE: If any timeouts from `xpack.screenshotting.capture.timeouts.*` settings occur when
|
||||
running a report job, Reporting will log the error and try to continue
|
||||
|
|
|
@ -553,7 +553,7 @@
|
|||
"prop-types": "^15.8.1",
|
||||
"proxy-from-env": "1.0.0",
|
||||
"puid": "1.0.7",
|
||||
"puppeteer": "^10.2.0",
|
||||
"puppeteer": "18.1.0",
|
||||
"query-string": "^6.13.2",
|
||||
"rbush": "^3.0.1",
|
||||
"re-resizable": "^6.1.1",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ef768c94bcb42dca4c27048615d07efadbb1c1c2
|
|
@ -24,6 +24,11 @@ location](https://commondatastorage.googleapis.com/chromium-browser-snapshots/in
|
|||
|
||||
## Build Script Usage
|
||||
|
||||
The system OS requires a few setup steps:
|
||||
1. Required packages: `bzip2`, `git`, `lsb_release`, `python3`
|
||||
2. The `python` command needs to launch Python 3.
|
||||
3. Recommended: `tmux`, as your ssh session may get interrupted
|
||||
|
||||
These commands show how to set up an environment to build:
|
||||
```sh
|
||||
# Allow our scripts to use depot_tools commands
|
||||
|
@ -36,7 +41,7 @@ mkdir ~/chromium && cd ~/chromium
|
|||
gsutil cp -r gs://headless_shell_staging/build_chromium .
|
||||
|
||||
# Install the OS packages, configure the environment, download the chromium source (25GB)
|
||||
python ./build_chromium/init.py [arch_name]
|
||||
python ./build_chromium/init.py
|
||||
|
||||
# Run the build script with the path to the chromium src directory, the git commit hash
|
||||
python ./build_chromium/build.py 70f5d88ea95298a18a85c33c98ea00e02358ad75 x64
|
||||
|
@ -67,7 +72,7 @@ A good how-to on building Chromium from source is
|
|||
We have an `linux/args.gn` file that is automatically copied to the build target directory.
|
||||
|
||||
To get a list of the build arguments that are enabled, install `depot_tools` and run
|
||||
`gn args out/headless --list`. It prints out all of the flags and their
|
||||
`gn args out/headless --list` from the `chromium/src` directory. It prints out all of the flags and their
|
||||
settings, including the defaults. Some build flags are documented
|
||||
[here](https://www.chromium.org/developers/gn-build-configuration).
|
||||
|
||||
|
@ -86,10 +91,6 @@ are created in x64 using cross-compiling. CentOS is not supported for building C
|
|||
- 8 CPU
|
||||
- 30GB memory
|
||||
- 80GB free space on disk (Try `ncdu /home` to see where space is used.)
|
||||
- git
|
||||
- python2 (`python` must link to `python2`)
|
||||
- lsb_release
|
||||
- tmux is recommended in case your ssh session is interrupted
|
||||
- "Cloud API access scopes": must have **read / write** scope for the Storage API
|
||||
4. Install [Google Cloud SDK](https://cloud.google.com/sdk) locally to ssh into the GCP instance
|
||||
|
||||
|
|
|
@ -66,12 +66,8 @@ print('Updating PATH for depot_tools: ' + full_path)
|
|||
os.environ['PATH'] = full_path
|
||||
|
||||
# configure environment: build dependencies
|
||||
if platform.system() == 'Linux':
|
||||
if arch_name:
|
||||
print('Running sysroot install script...')
|
||||
runcmd(src_path + '/build/linux/sysroot_scripts/install-sysroot.py --arch=' + arch_name)
|
||||
print('Running install-build-deps...')
|
||||
runcmd(src_path + '/build/install-build-deps.sh')
|
||||
print('Running sysroot install script...')
|
||||
runcmd(src_path + '/build/linux/sysroot_scripts/install-sysroot.py --arch=' + arch_name)
|
||||
|
||||
print('Updating all modules')
|
||||
runcmd('gclient sync -D')
|
||||
|
@ -95,14 +91,14 @@ runcmd('autoninja -C out/headless headless_shell')
|
|||
|
||||
# Optimize the output on Linux x64 by stripping inessentials from the binary
|
||||
# ARM must be cross-compiled from Linux and can not read the ARM binary in order to strip
|
||||
if platform.system() != 'Windows' and arch_name != 'arm64':
|
||||
if arch_name != 'arm64':
|
||||
print('Optimizing headless_shell')
|
||||
shutil.move('out/headless/headless_shell', 'out/headless/headless_shell_raw')
|
||||
runcmd('strip -o out/headless/headless_shell out/headless/headless_shell_raw')
|
||||
|
||||
# Create the zip and generate the md5 hash using filenames like:
|
||||
# chromium-4747cc2-linux_x64.zip
|
||||
base_filename = 'out/headless/chromium-' + base_version + '-' + platform.system().lower() + '_' + arch_name
|
||||
base_filename = 'out/headless/chromium-' + base_version + '-locales-' + platform.system().lower() + '_' + arch_name
|
||||
zip_filename = base_filename + '.zip'
|
||||
md5_filename = base_filename + '.md5'
|
||||
|
||||
|
@ -115,6 +111,9 @@ path_prefix = 'headless_shell-' + platform.system().lower() + '_' + arch_name
|
|||
archive.write('out/headless/headless_shell', path.join(path_prefix, 'headless_shell'))
|
||||
archive.write('out/headless/libEGL.so', path.join(path_prefix, 'libEGL.so'))
|
||||
archive.write('out/headless/libGLESv2.so', path.join(path_prefix, 'libGLESv2.so'))
|
||||
archive.write('out/headless/libvk_swiftshader.so', path.join(path_prefix, 'libvk_swiftshader.so'))
|
||||
archive.write('out/headless/libvulkan.so.1', path.join(path_prefix, 'libvulkan.so.1'))
|
||||
archive.write('out/headless/vk_swiftshader_icd.json', path.join(path_prefix, 'vk_swiftshader_icd.json'))
|
||||
archive.write(en_us_locale_file_path, path.join(path_prefix, 'locales', en_us_locale_pak_file_name))
|
||||
|
||||
archive.close()
|
||||
|
|
|
@ -6,13 +6,9 @@ from build_util import runcmd, mkdir
|
|||
# once per environment.
|
||||
|
||||
# Set to "arm" to build for ARM
|
||||
arch_name = sys.argv[1] if len(sys.argv) >= 2 else 'undefined'
|
||||
build_path = path.abspath(os.curdir)
|
||||
src_path = path.abspath(path.join(build_path, 'chromium', 'src'))
|
||||
|
||||
if arch_name != 'x64' and arch_name != 'arm64':
|
||||
raise Exception('Unexpected architecture: ' + arch_name + '. `x64` and `arm64` are supported.')
|
||||
|
||||
# Configure git
|
||||
print('Configuring git globals...')
|
||||
runcmd('git config --global core.autocrlf false')
|
||||
|
@ -29,8 +25,8 @@ else:
|
|||
print('Updating depot_tools...')
|
||||
original_dir = os.curdir
|
||||
os.chdir(path.join(build_path, 'depot_tools'))
|
||||
runcmd('git checkout master')
|
||||
runcmd('git pull origin master')
|
||||
runcmd('git checkout main')
|
||||
runcmd('git pull origin main')
|
||||
os.chdir(original_dir)
|
||||
|
||||
# Fetch the Chromium source code
|
||||
|
|
|
@ -1,9 +1,27 @@
|
|||
# Build args reference: https://www.chromium.org/developers/gn-build-configuration/
|
||||
import("//build/args/headless.gn")
|
||||
is_debug = false
|
||||
symbol_level = 0
|
||||
|
||||
is_official_build = true
|
||||
is_component_build = false
|
||||
is_debug = false
|
||||
|
||||
enable_nacl = false
|
||||
enable_stripping = true
|
||||
|
||||
chrome_pgo_phase = 0
|
||||
dcheck_always_on = false
|
||||
blink_symbol_level = 0
|
||||
symbol_level = 0
|
||||
v8_symbol_level = 0
|
||||
|
||||
enable_ink = false
|
||||
rtc_build_examples = false
|
||||
angle_build_tests = false
|
||||
enable_screen_ai_service = false
|
||||
enable_vr = false
|
||||
|
||||
# Please, consult @elastic/kibana-security before changing/removing this option.
|
||||
use_kerberos = false
|
||||
|
||||
# target_cpu is appended before build: "x64" or "arm64"
|
||||
target_os = "linux"
|
||||
# target_cpu is added at build timeure a minimal build
|
||||
|
|
|
@ -36,7 +36,7 @@ Object {
|
|||
"pollEnabled": true,
|
||||
"pollInterval": "PT3S",
|
||||
"pollIntervalErrorMultiplier": 10,
|
||||
"timeout": "PT2M",
|
||||
"timeout": "PT4M",
|
||||
},
|
||||
"roles": Object {
|
||||
"allow": Array [
|
||||
|
@ -82,7 +82,7 @@ Object {
|
|||
"pollEnabled": true,
|
||||
"pollInterval": "PT3S",
|
||||
"pollIntervalErrorMultiplier": 10,
|
||||
"timeout": "PT2M",
|
||||
"timeout": "PT4M",
|
||||
},
|
||||
"roles": Object {
|
||||
"allow": Array [
|
||||
|
|
|
@ -42,7 +42,7 @@ const QueueSchema = schema.object({
|
|||
}),
|
||||
pollIntervalErrorMultiplier: schema.number({ defaultValue: 10 }),
|
||||
timeout: schema.oneOf([schema.number(), schema.duration()], {
|
||||
defaultValue: moment.duration({ minutes: 2 }),
|
||||
defaultValue: moment.duration({ minutes: 4 }),
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
@ -89,9 +89,9 @@ Option | Required | Default | Description
|
|||
`layout` | no | `{}` | Page layout parameters describing characteristics of the capturing screenshot (e.g., dimensions, zoom, etc.).
|
||||
`request` | no | _none_ | Kibana Request reference to extract headers from.
|
||||
`timeouts` | no | _none_ | Timeouts for each phase of the screenshot.
|
||||
`timeouts.openUrl` | no | `60000` | The timeout in milliseconds to allow the Chromium browser to wait for the "Loading…" screen to dismiss and find the initial data for the page. If the time is exceeded, a screenshot is captured showing the current page, and the result structure contains an error message.
|
||||
`timeouts.renderComplete` | no | `30000` | The timeout in milliseconds to allow the Chromium browser to wait for all visualizations to fetch and render the data. If the time is exceeded, a screenshot is captured showing the current page, and the result structure contains an error message.
|
||||
`timeouts.waitForElements` | no | `30000` | The timeout in milliseconds to allow the Chromium browser to wait for all visualization panels to load on the page. If the time is exceeded, a screenshot is captured showing the current page, and the result structure contains an error message.
|
||||
`timeouts.openUrl` | no | (kibana.yml setting) | The timeout in milliseconds to allow the Chromium browser to wait for the "Loading…" screen to dismiss and find the initial data for the page. If the time is exceeded, a screenshot is captured showing the current page, and the result structure contains an error message.
|
||||
`timeouts.renderComplete` | no | (kibana.yml setting) | The timeout in milliseconds to allow the Chromium browser to wait for all visualizations to fetch and render the data. If the time is exceeded, a screenshot is captured showing the current page, and the result structure contains an error message.
|
||||
`timeouts.waitForElements` | no | (kibana.yml setting) | The timeout in milliseconds to allow the Chromium browser to wait for all visualization panels to load on the page. If the time is exceeded, a screenshot is captured showing the current page, and the result structure contains an error message.
|
||||
`urls` | no | `[]` | The list or URL to take screenshots of. Every item can either be a string or a tuple containing a URL and a context. The contextual data can be gathered using the screenshot mode plugin. Mutually exclusive with the `expression` parameter.
|
||||
|
||||
#### `diagnose(flags?: string[]): Observable`
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
} from '@kbn/screenshot-mode-plugin/server';
|
||||
import { truncate } from 'lodash';
|
||||
import open from 'opn';
|
||||
import puppeteer, { ElementHandle, EvaluateFn, Page, SerializableOrJSHandle } from 'puppeteer';
|
||||
import puppeteer, { ElementHandle, Page, EvaluateFunc } from 'puppeteer';
|
||||
import { Subject } from 'rxjs';
|
||||
import { parse as parseUrl } from 'url';
|
||||
import { getDisallowedOutgoingUrlError } from '.';
|
||||
|
@ -23,6 +23,16 @@ import { allowRequest } from '../network_policy';
|
|||
import { stripUnsafeHeaders } from './strip_unsafe_headers';
|
||||
import { getFooterTemplate, getHeaderTemplate } from './templates';
|
||||
|
||||
declare module 'puppeteer' {
|
||||
interface Page {
|
||||
_client(): CDPSession;
|
||||
}
|
||||
|
||||
interface Target {
|
||||
_targetId: string;
|
||||
}
|
||||
}
|
||||
|
||||
export type Context = Record<string, unknown>;
|
||||
|
||||
export interface ElementPosition {
|
||||
|
@ -51,8 +61,8 @@ interface WaitForSelectorOpts {
|
|||
}
|
||||
|
||||
interface EvaluateOpts {
|
||||
fn: EvaluateFn;
|
||||
args: SerializableOrJSHandle[];
|
||||
fn: EvaluateFunc<any>;
|
||||
args: unknown[];
|
||||
}
|
||||
|
||||
interface EvaluateMetaOpts {
|
||||
|
@ -312,8 +322,8 @@ export class HeadlessChromiumDriver {
|
|||
args,
|
||||
timeout,
|
||||
}: {
|
||||
fn: EvaluateFn;
|
||||
args: SerializableOrJSHandle[];
|
||||
fn: EvaluateFunc<any>;
|
||||
args: unknown[];
|
||||
timeout: number;
|
||||
}): Promise<void> {
|
||||
await this.page.waitForFunction(fn, { timeout, polling: WAIT_FOR_DELAY_MS }, ...args);
|
||||
|
@ -345,8 +355,8 @@ export class HeadlessChromiumDriver {
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: retrieve the client in open() and pass in the client
|
||||
const client = this.page.client();
|
||||
// FIXME: retrieve the client in open() and pass in the client?
|
||||
const client = this.page._client();
|
||||
|
||||
// We have to reach into the Chrome Devtools Protocol to apply headers as using
|
||||
// puppeteer's API will cause map tile requests to hang indefinitely:
|
||||
|
@ -437,12 +447,12 @@ export class HeadlessChromiumDriver {
|
|||
// In order to get the inspector running, we have to know the page's internal ID (again, private)
|
||||
// in order to construct the final debugging URL.
|
||||
|
||||
const client = this.page._client();
|
||||
const target = this.page.target();
|
||||
const client = await target.createCDPSession();
|
||||
const targetId = target._targetId;
|
||||
|
||||
await client.send('Debugger.enable');
|
||||
await client.send('Debugger.pause');
|
||||
const targetId = target._targetId;
|
||||
const wsEndpoint = this.page.browser().wsEndpoint();
|
||||
const { port } = parseUrl(wsEndpoint);
|
||||
|
||||
|
|
|
@ -293,16 +293,14 @@ export class HeadlessChromiumDriverFactory {
|
|||
*/
|
||||
private async getErrorMessage(message: ConsoleMessage): Promise<undefined | string> {
|
||||
for (const arg of message.args()) {
|
||||
const errorMessage = await arg
|
||||
.executionContext()
|
||||
.evaluate<undefined | string>((_arg: unknown) => {
|
||||
/* !! We are now in the browser context !! */
|
||||
if (_arg instanceof Error) {
|
||||
return _arg.message;
|
||||
}
|
||||
return undefined;
|
||||
/* !! End of browser context !! */
|
||||
}, arg);
|
||||
const errorMessage = await arg.evaluate((_arg: unknown) => {
|
||||
/* !! We are now in the browser context !! */
|
||||
if (_arg instanceof Error) {
|
||||
return _arg.message;
|
||||
}
|
||||
return undefined;
|
||||
/* !! End of browser context !! */
|
||||
}, arg);
|
||||
if (errorMessage) {
|
||||
return errorMessage;
|
||||
}
|
||||
|
|
|
@ -14,11 +14,12 @@ export interface PackageInfo {
|
|||
archiveChecksum: string;
|
||||
binaryChecksum: string;
|
||||
binaryRelativePath: string;
|
||||
revision: 901912 | 901913;
|
||||
isPreInstalled: boolean;
|
||||
location: 'custom' | 'common';
|
||||
}
|
||||
|
||||
const REVISION = 1036745;
|
||||
|
||||
enum BaseUrl {
|
||||
// see https://www.chromium.org/getting-involved/download-chromium
|
||||
common = 'https://commondatastorage.googleapis.com/chromium-browser-snapshots',
|
||||
|
@ -44,58 +45,53 @@ export class ChromiumArchivePaths {
|
|||
platform: 'darwin',
|
||||
architecture: 'x64',
|
||||
archiveFilename: 'chrome-mac.zip',
|
||||
archiveChecksum: '229fd88c73c5878940821875f77578e4',
|
||||
binaryChecksum: 'b0e5ca009306b14e41527000139852e5',
|
||||
archiveChecksum: '5afc0d49865d55b69ea1ff65b9cc5794',
|
||||
binaryChecksum: '4a7a663b2656d66ce975b00a30df3ab4',
|
||||
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
|
||||
location: 'common',
|
||||
archivePath: 'Mac',
|
||||
revision: 901912,
|
||||
isPreInstalled: false,
|
||||
},
|
||||
{
|
||||
platform: 'darwin',
|
||||
architecture: 'arm64',
|
||||
archiveFilename: 'chrome-mac.zip',
|
||||
archiveChecksum: 'ecf7aa509c8e2545989ebb9711e35384',
|
||||
binaryChecksum: 'b5072b06ffd2d2af4fea7012914da09f',
|
||||
archiveChecksum: '5afc0d49865d55b69ea1ff65b9cc5794',
|
||||
binaryChecksum: '4a7a663b2656d66ce975b00a30df3ab4',
|
||||
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
|
||||
location: 'common',
|
||||
archivePath: 'Mac_Arm',
|
||||
revision: 901913, // NOTE: 901912 is not available
|
||||
isPreInstalled: false,
|
||||
},
|
||||
{
|
||||
platform: 'linux',
|
||||
architecture: 'x64',
|
||||
archiveFilename: 'chromium-70f5d88-locales-linux_x64.zip',
|
||||
archiveChecksum: '759bda5e5d32533cb136a85e37c0d102',
|
||||
binaryChecksum: '82e80f9727a88ba3836ce230134bd126',
|
||||
archiveFilename: 'chromium-749e738-locales-linux_x64.zip',
|
||||
archiveChecksum: '09ba194e6c720397728fbec3d3895b0b',
|
||||
binaryChecksum: 'df1c957f41dcca8e33369b1d255406c2',
|
||||
binaryRelativePath: 'headless_shell-linux_x64/headless_shell',
|
||||
location: 'custom',
|
||||
revision: 901912,
|
||||
isPreInstalled: true,
|
||||
},
|
||||
{
|
||||
platform: 'linux',
|
||||
architecture: 'arm64',
|
||||
archiveFilename: 'chromium-70f5d88-locales-linux_arm64.zip',
|
||||
archiveChecksum: '33613b8dc5212c0457210d5a37ea4b43',
|
||||
binaryChecksum: '29e943fbee6d87a217abd6cb6747058e',
|
||||
archiveFilename: 'chromium-749e738-locales-linux_arm64.zip',
|
||||
archiveChecksum: '1f535b1c2875d471829c6ff128a13262',
|
||||
binaryChecksum: 'ca6b91d0ba8a65712554572dabc66968',
|
||||
binaryRelativePath: 'headless_shell-linux_arm64/headless_shell',
|
||||
location: 'custom',
|
||||
revision: 901912,
|
||||
isPreInstalled: true,
|
||||
},
|
||||
{
|
||||
platform: 'win32',
|
||||
architecture: 'x64',
|
||||
archiveFilename: 'chrome-win.zip',
|
||||
archiveChecksum: '861bb8b7b8406a6934a87d3cbbce61d9',
|
||||
binaryChecksum: 'ffa0949471e1b9a57bc8f8633fca9c7b',
|
||||
archiveChecksum: '42db052673414b89d8cb45657c1a6aeb',
|
||||
binaryChecksum: '1b6eef775198ffd48fb9669ac0c818f7',
|
||||
binaryRelativePath: path.join('chrome-win', 'chrome.exe'),
|
||||
location: 'common',
|
||||
archivePath: 'Win',
|
||||
revision: 901912,
|
||||
isPreInstalled: true,
|
||||
},
|
||||
];
|
||||
|
@ -118,7 +114,7 @@ export class ChromiumArchivePaths {
|
|||
|
||||
public getDownloadUrl(p: PackageInfo) {
|
||||
if (isCommonPackage(p)) {
|
||||
return `${BaseUrl.common}/${p.archivePath}/${p.revision}/${p.archiveFilename}`;
|
||||
return `${BaseUrl.common}/${p.archivePath}/${REVISION}/${p.archiveFilename}`;
|
||||
}
|
||||
return BaseUrl.custom + '/' + p.archiveFilename; // revision is not used for URL if package is a custom build
|
||||
}
|
||||
|
|
|
@ -88,11 +88,11 @@ describe('ensureDownloaded', () => {
|
|||
expect.arrayContaining([
|
||||
'chrome-mac.zip',
|
||||
'chrome-win.zip',
|
||||
'chromium-70f5d88-locales-linux_x64.zip',
|
||||
'chromium-749e738-locales-linux_x64.zip',
|
||||
])
|
||||
);
|
||||
expect(readdirSync(path.resolve(`${paths.archivesPath}/arm64`))).toEqual(
|
||||
expect.arrayContaining(['chrome-mac.zip', 'chromium-70f5d88-locales-linux_arm64.zip'])
|
||||
expect.arrayContaining(['chrome-mac.zip', 'chromium-749e738-locales-linux_arm64.zip'])
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ describe('ConfigSchema', () => {
|
|||
"capture": Object {
|
||||
"timeouts": Object {
|
||||
"openUrl": "PT1M",
|
||||
"renderComplete": "PT30S",
|
||||
"waitForElements": "PT30S",
|
||||
"renderComplete": "PT2M",
|
||||
"waitForElements": "PT1M",
|
||||
},
|
||||
"zoom": 2,
|
||||
},
|
||||
|
@ -82,8 +82,8 @@ describe('ConfigSchema', () => {
|
|||
"capture": Object {
|
||||
"timeouts": Object {
|
||||
"openUrl": "PT1M",
|
||||
"renderComplete": "PT30S",
|
||||
"waitForElements": "PT30S",
|
||||
"renderComplete": "PT2M",
|
||||
"waitForElements": "PT1M",
|
||||
},
|
||||
"zoom": 2,
|
||||
},
|
||||
|
|
|
@ -50,7 +50,7 @@ export const ConfigSchema = schema.object({
|
|||
schema.boolean({ defaultValue: false }),
|
||||
schema.maybe(schema.never())
|
||||
),
|
||||
disableSandbox: schema.maybe(schema.boolean()), // default value is dynamic in createConfig$
|
||||
disableSandbox: schema.maybe(schema.boolean()), // default value is dynamic in createConfig
|
||||
proxy: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: false }),
|
||||
server: schema.conditional(
|
||||
|
@ -74,10 +74,10 @@ export const ConfigSchema = schema.object({
|
|||
defaultValue: moment.duration({ minutes: 1 }),
|
||||
}),
|
||||
waitForElements: schema.oneOf([schema.number(), schema.duration()], {
|
||||
defaultValue: moment.duration({ seconds: 30 }),
|
||||
defaultValue: moment.duration({ minutes: 1 }),
|
||||
}),
|
||||
renderComplete: schema.oneOf([schema.number(), schema.duration()], {
|
||||
defaultValue: moment.duration({ seconds: 30 }),
|
||||
defaultValue: moment.duration({ minutes: 2 }),
|
||||
}),
|
||||
}),
|
||||
zoom: schema.number({ defaultValue: 2 }),
|
||||
|
|
|
@ -201,8 +201,8 @@ export class Screenshots {
|
|||
{
|
||||
timeouts: {
|
||||
openUrl: 60000,
|
||||
waitForElements: 30000,
|
||||
renderComplete: 30000,
|
||||
waitForElements: 60000,
|
||||
renderComplete: 120000,
|
||||
},
|
||||
urls: [],
|
||||
}
|
||||
|
|
112
yarn.lock
112
yarn.lock
|
@ -12097,6 +12097,13 @@ cross-env@^6.0.3:
|
|||
dependencies:
|
||||
cross-spawn "^7.0.0"
|
||||
|
||||
cross-fetch@3.1.5:
|
||||
version "3.1.5"
|
||||
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
|
||||
integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
|
||||
dependencies:
|
||||
node-fetch "2.6.7"
|
||||
|
||||
cross-spawn@^6.0.0:
|
||||
version "6.0.5"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
|
||||
|
@ -12958,13 +12965,6 @@ debug@4.1.1:
|
|||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debug@4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
|
||||
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
debuglog@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
|
||||
|
@ -13299,10 +13299,10 @@ detective@^5.0.2:
|
|||
defined "^1.0.0"
|
||||
minimist "^1.1.1"
|
||||
|
||||
devtools-protocol@0.0.901419:
|
||||
version "0.0.901419"
|
||||
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.901419.tgz#79b5459c48fe7e1c5563c02bd72f8fec3e0cebcd"
|
||||
integrity sha512-4INMPwNm9XRpBukhNbF7OB6fNTTCaI8pzy/fXg0xQzAy5h3zL1P8xT3QazgKqBrb/hAYwIBizqDBZ7GtJE74QQ==
|
||||
devtools-protocol@0.0.1045489:
|
||||
version "0.0.1045489"
|
||||
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz#f959ad560b05acd72d55644bc3fb8168a83abf28"
|
||||
integrity sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==
|
||||
|
||||
dezalgo@^1.0.0:
|
||||
version "1.0.3"
|
||||
|
@ -16744,9 +16744,9 @@ https-proxy-agent@5.0.0, https-proxy-agent@^5.0.0:
|
|||
agent-base "6"
|
||||
debug "4"
|
||||
|
||||
https-proxy-agent@^5.0.1:
|
||||
https-proxy-agent@5.0.1, https-proxy-agent@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
|
||||
resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz"
|
||||
integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==
|
||||
dependencies:
|
||||
agent-base "6"
|
||||
|
@ -20642,7 +20642,7 @@ node-emoji@^1.10.0:
|
|||
dependencies:
|
||||
lodash.toarray "^4.4.0"
|
||||
|
||||
node-fetch@2.6.1, node-fetch@^1.0.1, node-fetch@^2.3.0, node-fetch@^2.6.1, node-fetch@^2.6.7:
|
||||
node-fetch@2.6.7, node-fetch@^1.0.1, node-fetch@^2.3.0, node-fetch@^2.6.1, node-fetch@^2.6.7:
|
||||
version "2.6.7"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
|
||||
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
|
||||
|
@ -21878,13 +21878,6 @@ pixelmatch@^5.3.0:
|
|||
dependencies:
|
||||
pngjs "^6.0.0"
|
||||
|
||||
pkg-dir@4.2.0, pkg-dir@^4.1.0, pkg-dir@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
|
||||
integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
|
||||
dependencies:
|
||||
find-up "^4.0.0"
|
||||
|
||||
pkg-dir@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
|
||||
|
@ -21899,6 +21892,13 @@ pkg-dir@^3.0.0:
|
|||
dependencies:
|
||||
find-up "^3.0.0"
|
||||
|
||||
pkg-dir@^4.1.0, pkg-dir@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
|
||||
integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
|
||||
dependencies:
|
||||
find-up "^4.0.0"
|
||||
|
||||
pkg-dir@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760"
|
||||
|
@ -22523,21 +22523,16 @@ process@^0.11.10:
|
|||
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
|
||||
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
|
||||
|
||||
progress@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.1.tgz#c9242169342b1c29d275889c95734621b1952e31"
|
||||
integrity sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==
|
||||
progress@2.0.3, progress@^2.0.0, progress@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz"
|
||||
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
||||
|
||||
progress@^1.1.8:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be"
|
||||
integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=
|
||||
|
||||
progress@^2.0.0, progress@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
|
||||
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
||||
|
||||
proj4@2.6.2:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/proj4/-/proj4-2.6.2.tgz#4665d7cbc30fd356375007c2fed53b07dbda1d67"
|
||||
|
@ -22787,23 +22782,22 @@ pupa@^2.1.1:
|
|||
dependencies:
|
||||
escape-goat "^2.0.0"
|
||||
|
||||
puppeteer@^10.2.0:
|
||||
version "10.4.0"
|
||||
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-10.4.0.tgz#a6465ff97fda0576c4ac29601406f67e6fea3dc7"
|
||||
integrity sha512-2cP8mBoqnu5gzAVpbZ0fRaobBWZM8GEUF4I1F6WbgHrKV/rz7SX8PG2wMymZgD0wo0UBlg2FBPNxlF/xlqW6+w==
|
||||
puppeteer@18.1.0:
|
||||
version "18.1.0"
|
||||
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-18.1.0.tgz#7fa53b29f87dfb3192d415f38a46e35b107ec907"
|
||||
integrity sha512-2RCVWIF+pZOSfksWlQU0Hh6CeUT5NYt66CDDgRyuReu6EvBAk1y+/Q7DuzYNvGChSecGMb7QPN0hkxAa3guAog==
|
||||
dependencies:
|
||||
debug "4.3.1"
|
||||
devtools-protocol "0.0.901419"
|
||||
cross-fetch "3.1.5"
|
||||
debug "4.3.4"
|
||||
devtools-protocol "0.0.1045489"
|
||||
extract-zip "2.0.1"
|
||||
https-proxy-agent "5.0.0"
|
||||
node-fetch "2.6.1"
|
||||
pkg-dir "4.2.0"
|
||||
progress "2.0.1"
|
||||
https-proxy-agent "5.0.1"
|
||||
progress "2.0.3"
|
||||
proxy-from-env "1.1.0"
|
||||
rimraf "3.0.2"
|
||||
tar-fs "2.0.0"
|
||||
unbzip2-stream "1.3.3"
|
||||
ws "7.4.6"
|
||||
tar-fs "2.1.1"
|
||||
unbzip2-stream "1.4.3"
|
||||
ws "8.9.0"
|
||||
|
||||
q@^1.5.1:
|
||||
version "1.5.1"
|
||||
|
@ -26208,19 +26202,9 @@ tape@^5.0.1:
|
|||
string.prototype.trim "^1.2.1"
|
||||
through "^2.3.8"
|
||||
|
||||
tar-fs@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.0.tgz#677700fc0c8b337a78bee3623fdc235f21d7afad"
|
||||
integrity sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==
|
||||
dependencies:
|
||||
chownr "^1.1.1"
|
||||
mkdirp "^0.5.1"
|
||||
pump "^3.0.0"
|
||||
tar-stream "^2.0.0"
|
||||
|
||||
tar-fs@^2.0.0, tar-fs@^2.1.1:
|
||||
tar-fs@2.1.1, tar-fs@^2.0.0, tar-fs@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784"
|
||||
resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz"
|
||||
integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==
|
||||
dependencies:
|
||||
chownr "^1.1.1"
|
||||
|
@ -26228,7 +26212,7 @@ tar-fs@^2.0.0, tar-fs@^2.1.1:
|
|||
pump "^3.0.0"
|
||||
tar-stream "^2.1.4"
|
||||
|
||||
tar-stream@^2.0.0, tar-stream@^2.1.4, tar-stream@^2.2.0:
|
||||
tar-stream@^2.1.4, tar-stream@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287"
|
||||
integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==
|
||||
|
@ -27002,10 +26986,10 @@ unbox-primitive@^1.0.1:
|
|||
has-symbols "^1.0.2"
|
||||
which-boxed-primitive "^1.0.2"
|
||||
|
||||
unbzip2-stream@1.3.3:
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz#d156d205e670d8d8c393e1c02ebd506422873f6a"
|
||||
integrity sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==
|
||||
unbzip2-stream@1.4.3:
|
||||
version "1.4.3"
|
||||
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7"
|
||||
integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==
|
||||
dependencies:
|
||||
buffer "^5.2.1"
|
||||
through "^2.3.8"
|
||||
|
@ -28645,10 +28629,10 @@ write-file-atomic@^4.0.1:
|
|||
imurmurhash "^0.1.4"
|
||||
signal-exit "^3.0.7"
|
||||
|
||||
ws@7.4.6:
|
||||
version "7.4.6"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
|
||||
integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==
|
||||
ws@8.9.0:
|
||||
version "8.9.0"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-8.9.0.tgz#2a994bb67144be1b53fe2d23c53c028adeb7f45e"
|
||||
integrity sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==
|
||||
|
||||
ws@>=8.7.0, ws@^8.2.3, ws@^8.4.2:
|
||||
version "8.8.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue