mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-18 01:54:23 +01:00
fix: handle production source failures and reduce ZIP work
This commit is contained in:
1 parent
bd7d6f0bef
commit
705f7c428a
16 files changed
+612
-86
No files matched your search
@@ -13,6 +13,7 @@ import {
|
||||
} from "./anonymize-utils";
|
||||
import { createLogger, serializeError } from "./logger";
|
||||
import { startStage } from "./request-monitoring";
|
||||
import { zipEntryOptions } from "./archive-entry";
|
||||
|
||||
const logger = createLogger("zip-stream");
|
||||
|
||||
@@ -222,7 +223,7 @@ export async function streamAnonymizedZip(
|
||||
activeStreams.add(anonymizer);
|
||||
anonymizer.once("close", () => activeStreams.delete(anonymizer));
|
||||
const st = entry.pipe(anonymizer);
|
||||
archive.append(st, { name: fileName });
|
||||
archive.append(st, zipEntryOptions(fileName, entry.path));
|
||||
} catch (error) {
|
||||
fail(error as Error);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user