mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 21:00:44 +00:00
perf: lazy load support bundle zip
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import JSZip from "jszip";
|
||||
|
||||
export type DiagnosticSupportBundleFile = {
|
||||
path: string;
|
||||
@@ -132,6 +131,7 @@ export async function writeSupportBundleZip(params: {
|
||||
files: readonly DiagnosticSupportBundleFile[];
|
||||
compressionLevel?: number;
|
||||
}): Promise<number> {
|
||||
const { default: JSZip } = await import("jszip");
|
||||
const zip = new JSZip();
|
||||
for (const file of params.files) {
|
||||
zip.file(assertSafeBundleRelativePath(file.path), file.content);
|
||||
|
||||
Reference in New Issue
Block a user