Use types arguments in the downloadStream event handlers

Issues #603
This commit is contained in:
Jozef Izso 2025-06-07 13:40:06 +02:00
parent be2b975095
commit 6126f49c2c
Failed to extract signature
2 changed files with 8 additions and 7 deletions

6
dist/index.js generated vendored
View file

@ -2439,11 +2439,11 @@ async function downloadArtifact(octokit, artifactId, fileName, token) {
};
const downloadStream = got_1.default.stream(req.url, { headers });
const fileWriterStream = (0, fs_1.createWriteStream)(fileName);
downloadStream.on('redirect', response => {
downloadStream.on('redirect', (response) => {
core.info(`Downloading ${response.headers.location}`);
});
downloadStream.on('downloadProgress', ({ transferred }) => {
core.info(`Progress: ${transferred} B`);
downloadStream.on('downloadProgress', (progress) => {
core.info(`Progress: ${progress.transferred} B`);
});
await asyncStream(downloadStream, fileWriterStream);
}