Adding concurrency and upload response logs

This commit is contained in:
Vallie Joseph
2024-03-28 18:59:41 +00:00
parent d2d69999e3
commit 31a6086649
2 changed files with 16 additions and 12 deletions

View File

@@ -47,18 +47,22 @@ export async function createZipUploadStream(
createReadStream(file.sourcePath),
{name: file.destinationPath},
function (err, entry) {
core.debug(`Entry is: ${entry}`)
core.info(`Entry is: ${entry}`)
if (err) reject(err)
else resolve(entry)
}
)
} else {
// add directory to zip
zip.entry(null, {name: file.destinationPath}, function (err, entry) {
core.debug(`Entry is: ${entry}`)
if (err) reject(err)
else resolve(entry)
})
zip.entry(
null,
{name: `${file.destinationPath}/`},
function (err, entry) {
core.info(`Entry is: ${entry}`)
if (err) reject(err)
else resolve(entry)
}
)
}
})
}