Fix user projects export script (#258)

This commit is contained in:
Nico Mexis
2026-11-04 18:29:28 +01:00
committed by GitHub
parent 6c4829eea4
commit 5c9fef4d03
@@ -96,7 +96,7 @@ async function exportUserProjectsToZip(userId, output) {
`Exporting ${allIds.length} projects for user ${userId} to ${output}` `Exporting ${allIds.length} projects for user ${userId} to ${output}`
) )
const zipStream = await createZipStreamForMultipleProjectsAsync(allIds) const zipStream = await createZipStreamForMultipleProjectsAsync(allIds, false, null)
zipStream.on('progress', progress => { zipStream.on('progress', progress => {
updateProgress(progress.entries.total, allIds.length) updateProgress(progress.entries.total, allIds.length)
@@ -132,7 +132,7 @@ async function exportSingleProject(projectId, output) {
console.log('Flushing project to MongoDB...') console.log('Flushing project to MongoDB...')
await DocumentUpdaterHandler.promises.flushProjectToMongoAndDelete(projectId) await DocumentUpdaterHandler.promises.flushProjectToMongoAndDelete(projectId)
console.log(`Exporting project ${projectId} to ${output}`) console.log(`Exporting project ${projectId} to ${output}`)
const zipStream = await createZipStreamForProjectAsync(projectId) const zipStream = await createZipStreamForProjectAsync(projectId, false, null)
await writeStreamToFileAtomically(zipStream, output) await writeStreamToFileAtomically(zipStream, output)
console.log('Exported project to', output) console.log('Exported project to', output)
} }