You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cli.ts
+12-11Lines changed: 12 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,13 @@
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
6
6
7
+
importtype{OptionsasYargsOptions}from'yargs';
7
8
importyargsfrom'yargs';
8
9
import{hideBin}from'yargs/helpers';
9
10
10
11
exportconstcliOptions={
11
12
browserUrl: {
12
-
type: 'string'asconst,
13
+
type: 'string',
13
14
description:
14
15
'Connect to a running Chrome instance using port forwarding. For more details see: https://developer.chrome.com/docs/devtools/remote-debugging/local-server.',
15
16
alias: 'u',
@@ -19,43 +20,43 @@ export const cliOptions = {
19
20
},
20
21
},
21
22
headless: {
22
-
type: 'boolean'asconst,
23
+
type: 'boolean',
23
24
description: 'Whether to run in headless (no UI) mode.',
24
25
default: false,
25
26
},
26
27
executablePath: {
27
-
type: 'string'asconst,
28
+
type: 'string',
28
29
description: 'Path to custom Chrome executable.',
29
30
conflicts: 'browserUrl',
30
31
alias: 'e',
31
32
},
32
33
isolated: {
33
-
type: 'boolean'asconst,
34
+
type: 'boolean',
34
35
description:
35
36
'If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed.',
36
37
default: false,
37
38
},
38
39
customDevtools: {
39
-
type: 'string'asconst,
40
+
type: 'string',
40
41
description: 'Path to custom DevTools.',
41
42
hidden: true,
42
43
conflicts: 'browserUrl',
43
44
alias: 'd',
44
45
},
45
46
channel: {
46
-
type: 'string'asconst,
47
+
type: 'string',
47
48
description:
48
49
'Specify a different Chrome channel that should be used. The default is the stable channel version.',
49
50
choices: ['stable','canary','beta','dev']asconst,
50
51
conflicts: ['browserUrl','executablePath'],
51
52
},
52
53
logFile: {
53
-
type: 'string'asconst,
54
+
type: 'string',
54
55
describe:
55
56
'Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports.',
56
57
},
57
58
viewport: {
58
-
type: 'string'asconst,
59
+
type: 'string',
59
60
describe:
60
61
'Initial viewport size for the Chromee instances started by the server. For example, `1280x720`',
61
62
coerce: (arg: string|undefined)=>{
@@ -73,14 +74,14 @@ export const cliOptions = {
73
74
},
74
75
},
75
76
proxyServer: {
76
-
type: 'string'asconst,
77
+
type: 'string',
77
78
description: `Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.`,
78
79
},
79
80
acceptInsecureCerts: {
80
-
type: 'boolean'asconst,
81
+
type: 'boolean',
81
82
description: `If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.`,
0 commit comments