fix: harden backend stability and test production utilities
This commit is contained in:
9
backend/utils/archive.js
Normal file
9
backend/utils/archive.js
Normal file
@@ -0,0 +1,9 @@
|
||||
let archiverModulePromise = null;
|
||||
|
||||
async function createZipArchive(options = {}) {
|
||||
archiverModulePromise ||= import('archiver');
|
||||
const { ZipArchive } = await archiverModulePromise;
|
||||
return new ZipArchive(options);
|
||||
}
|
||||
|
||||
module.exports = { createZipArchive };
|
||||
Reference in New Issue
Block a user