adding updated lints and fixes

This commit is contained in:
Vallie Joseph
2023-07-28 14:12:15 +00:00
parent ba96334e72
commit 20e1b242c8
6 changed files with 48 additions and 50 deletions

View File

@@ -14,16 +14,16 @@ import {
rmFile,
sleep
} from './utils'
import {URL} from 'url'
import {StatusReporter} from './status-reporter'
import {performance} from 'perf_hooks'
import {ListArtifactsResponse, QueryArtifactResponse} from './contracts'
import {HttpClientResponse} from '@actions/http-client'
import {HttpManager} from './http-manager'
import {DownloadItem} from './download-specification'
import {getDownloadFileConcurrency, getRetryLimit} from './config-variables'
import {IncomingHttpHeaders} from 'http'
import {retryHttpClientRequest} from './requestUtils'
import { URL } from 'url'
import { StatusReporter } from './status-reporter'
import { performance } from 'perf_hooks'
import { ListArtifactsResponse, QueryArtifactResponse } from './contracts'
import { HttpClientResponse } from '@actions/http-client'
import { HttpManager } from './http-manager'
import { DownloadItem } from './download-specification'
import { getDownloadFileConcurrency, getRetryLimit } from './config-variables'
import { IncomingHttpHeaders } from 'http'
import { retryHttpClientRequest } from './requestUtils'
export class DownloadHttpClient {
// http manager is used for concurrent connections when downloading multiple files at once
@@ -113,8 +113,7 @@ export class DownloadHttpClient {
if (core.isDebug()) {
core.debug(
`File: ${++downloadedFiles}/${downloadItems.length}. ${
currentFileToDownload.targetPath
`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath
} took ${(performance.now() - startTime).toFixed(
3
)} milliseconds to finish downloading`
@@ -280,8 +279,8 @@ export class DownloadHttpClient {
// if a throttled status code is received, try to get the retryAfter header value, else differ to standard exponential backoff
isThrottledStatusCode(response.message.statusCode)
? await backOff(
tryGetRetryAfterValueTimeInMilliseconds(response.message.headers)
)
tryGetRetryAfterValueTimeInMilliseconds(response.message.headers)
)
: await backOff()
} else {
// Some unexpected response code, fail immediately and stop the download
@@ -328,7 +327,7 @@ export class DownloadHttpClient {
})
.pipe(destinationStream)
.on('close', () => {
resolve()
resolve('closed')
})
.on('error', error => {
core.info(
@@ -347,7 +346,7 @@ export class DownloadHttpClient {
})
.pipe(destinationStream)
.on('close', () => {
resolve()
resolve('closed')
})
.on('error', error => {
core.info(