mirror of https://github.com/actions/toolkit
updating resolves
parent
66343faec4
commit
c7de68f215
|
@ -1,5 +1,4 @@
|
||||||
import * as stream from 'stream'
|
import * as stream from 'stream'
|
||||||
import * as async from 'async'
|
|
||||||
import * as ZipStream from 'zip-stream'
|
import * as ZipStream from 'zip-stream'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {createReadStream} from 'fs'
|
import {createReadStream} from 'fs'
|
||||||
|
@ -60,18 +59,21 @@ export async function createZipUploadStream(
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const bufferSize = getUploadChunkSize()
|
await Promise.all(uploadFilePromises).then(result => {
|
||||||
const zipUploadStream = new ZipUploadStream(bufferSize)
|
core.debug(`Zip result is ${result}`)
|
||||||
core.debug(
|
zip.finalize()
|
||||||
`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`
|
const bufferSize = getUploadChunkSize()
|
||||||
)
|
const zipUploadStream = new ZipUploadStream(bufferSize)
|
||||||
core.debug(
|
core.debug(
|
||||||
`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`
|
`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`
|
||||||
)
|
)
|
||||||
await Promise.all(uploadFilePromises)
|
core.debug(
|
||||||
|
`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`
|
||||||
|
)
|
||||||
|
return zipUploadStream
|
||||||
|
})
|
||||||
|
throw new Error('An error has occurred during zip creation for the artifact')
|
||||||
// zip.pipe(zipUploadStream)
|
// zip.pipe(zipUploadStream)
|
||||||
zip.finalize()
|
|
||||||
return zipUploadStream
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
@ -81,6 +83,7 @@ const zipErrorCallback = (error: any): void => {
|
||||||
|
|
||||||
throw new Error('An error has occurred during zip creation for the artifact')
|
throw new Error('An error has occurred during zip creation for the artifact')
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const zipWarningCallback = (err: any): void => {
|
const zipWarningCallback = (err: any): void => {
|
||||||
if (err.code === 'ENOENT') {
|
if (err.code === 'ENOENT') {
|
||||||
core.warning(
|
core.warning(
|
||||||
|
|
Loading…
Reference in New Issue