File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
arduino-ide-extension/src/node Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -370,8 +370,8 @@ export class CoreClientProvider {
370370 ) ;
371371 progressHandler ?. reportProgress ( message ) ;
372372 } ,
373- reportResult : ( result ) => progressHandler ?. reportResult ( result ) ,
374373 } ,
374+ reportResult : ( result ) => progressHandler ?. reportResult ( result ) ,
375375 progressId,
376376 } )
377377 )
Original file line number Diff line number Diff line change @@ -163,14 +163,17 @@ export namespace ExecuteWithProgress {
163163 * _unknown_ progress if falsy.
164164 */
165165 readonly progressId ?: string ;
166- readonly responseService : Partial <
167- ResponseService & { reportResult : ( result : DownloadResult ) => void }
168- > ;
166+ readonly responseService : Partial < ResponseService > ;
167+ /**
168+ * It's only relevant for index updates to build a summary of possible client (4xx) and server (5xx) errors when downloading the files during the index update. It's missing for lib/platform installations.
169+ */
170+ readonly reportResult ?: ( result : DownloadResult ) => void ;
169171 }
170172
171173 export function createDataCallback < R extends ProgressResponse > ( {
172174 responseService,
173175 progressId,
176+ reportResult,
174177 } : ExecuteWithProgress . Options ) : ( response : R ) => void {
175178 const uuid = v4 ( ) ;
176179 let message = '' ;
@@ -252,8 +255,8 @@ export namespace ExecuteWithProgress {
252255 } ) ;
253256 }
254257 } else if ( phase instanceof DownloadProgressEnd ) {
255- if ( url ) {
256- responseService . reportResult ?. ( {
258+ if ( url && reportResult ) {
259+ reportResult ( {
257260 url,
258261 message : phase . getMessage ( ) ,
259262 success : phase . getSuccess ( ) ,
You can’t perform that action at this time.
0 commit comments