File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -107,14 +107,18 @@ export async function grabProject(context) {
107
107
} ) ;
108
108
}
109
109
110
+ const downloadAgent = new undici . Agent ( ) . compose (
111
+ undici . interceptors . redirect ( { maxRedirections : 5 } )
112
+ ) ;
113
+
110
114
async function downloadPackage ( packageUrl , context , timeout ) {
111
115
const filename = path . basename ( packageUrl ) ;
112
116
const out = path . join ( context . path , filename ) ;
113
117
114
118
const request = await undici . request ( packageUrl , {
115
119
headersTimeout : timeout ,
116
120
bodyTimeout : timeout ,
117
- maxRedirections : 5
121
+ dispatcher : downloadAgent
118
122
} ) ;
119
123
120
124
await pipeline ( request . body , createWriteStream ( out ) ) ;
Original file line number Diff line number Diff line change 51
51
"supports-color" : " ^10.2.2" ,
52
52
"tar" : " ^7.4.3" ,
53
53
"uid-number" : " 0.0.6" ,
54
- "undici" : " ^6.21.3 " ,
54
+ "undici" : " ^7.16.0 " ,
55
55
"which" : " ^5.0.0" ,
56
56
"winston" : " ^3.17.0" ,
57
57
"xml-sanitizer" : " ^2.0.2" ,
You can’t perform that action at this time.
0 commit comments