File tree 5 files changed +4
-5
lines changed
5 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 12
12
node-version :
13
13
- 18
14
14
- 16
15
- - 14
16
15
steps :
17
16
- uses : actions/checkout@v3
18
17
- uses : actions/setup-node@v3
Original file line number Diff line number Diff line change 2
2
import process from 'node:process' ;
3
3
import meow from 'meow' ;
4
4
import captureWebsite from 'capture-website' ;
5
- import arrify from 'arrify' ;
6
5
import splitOnFirst from 'split-on-first' ;
7
6
import getStdin from 'get-stdin' ;
8
7
@@ -166,6 +165,7 @@ const cli = meow(`
166
165
} ,
167
166
header : {
168
167
type : 'string' ,
168
+ isMultiple : true ,
169
169
} ,
170
170
userAgent : {
171
171
type : 'string' ,
@@ -222,11 +222,13 @@ if (options.clip) {
222
222
}
223
223
224
224
options . headers = { } ;
225
- for ( const header of arrify ( options . header ) ) {
225
+ for ( const header of options . header ) {
226
226
const [ key , value ] = header . split ( ':' ) ;
227
227
options . headers [ key . trim ( ) ] = value . trim ( ) ;
228
228
}
229
229
230
+ delete options . header ;
231
+
230
232
if ( options . authentication ) {
231
233
const [ username , password ] = splitOnFirst ( options . authentication , ':' ) ;
232
234
options . authentication = { username, password} ;
Original file line number Diff line number Diff line change 41
41
" jpg"
42
42
],
43
43
"dependencies" : {
44
- "arrify" : " ^3.0.0" ,
45
44
"capture-website" : " ^3.0.0" ,
46
45
"get-stdin" : " ^9.0.0" ,
47
46
"meow" : " ^10.1.3" ,
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ Generated by [AVA](https://avajs.dev).
32
32
element: '.main-content',
33
33
emulateDevice: 'iPhone X',
34
34
fullPage: false,
35
- header: 'x-powered-by: capture-website-cli',
36
35
headers: {
37
36
'x-powered-by': 'capture-website-cli',
38
37
},
You can’t perform that action at this time.
0 commit comments