File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { Octokit } from '@octokit/rest'
22import { writeFile } from 'fs/promises'
33import { getProxyForUrl } from 'proxy-from-env'
44import { fetch , ProxyAgent } from 'undici'
5+ import type { RequestInit } from 'undici'
56import os from 'os'
67import { extract } from 'tar'
78import tmp from 'tmp-promise'
@@ -29,8 +30,7 @@ export async function downloadBinary(url: string) {
2930 await tmpfile . cleanup ( )
3031}
3132
32- // eslint-disable-next-line @typescript-eslint/no-explicit-any
33- export async function proxiedFetch ( url : string , opts : any = { } ) {
33+ export async function proxiedFetch ( url : string , opts : RequestInit = { } ) {
3434 const proxy = getProxyForUrl ( url )
3535 if ( ! proxy ) {
3636 return fetch ( url , { ...opts } )
@@ -40,10 +40,10 @@ export async function proxiedFetch(url: string, opts: any = {}) {
4040 uri : getProxyForUrl ( url ) ,
4141 keepAliveTimeout : 10 ,
4242 keepAliveMaxTimeout : 10 ,
43- } ) ;
43+ } )
4444
4545 return fetch ( url , { ...opts , dispatcher : proxyAgent } )
46- } ;
46+ }
4747
4848function getRelease ( version : string ) {
4949 const { getLatestRelease, getReleaseByTag } = octokit . rest . repos
You can’t perform that action at this time.
0 commit comments