diff --git a/services/web/app/src/infrastructure/FileWriter.mjs b/services/web/app/src/infrastructure/FileWriter.mjs index e878f3db94..236e1a87e7 100644 --- a/services/web/app/src/infrastructure/FileWriter.mjs +++ b/services/web/app/src/infrastructure/FileWriter.mjs @@ -51,6 +51,21 @@ export class SizeLimitedStream extends Transform { } } +/** + * @type {{ + * ensureDumpFolderExists: () => void, + * writeLinesToDisk: (identifier: any, lines: any, callback?: any) => void, + * writeContentToDisk: (identifier: any, content: any, callback?: any) => void, + * writeStreamToDisk: (identifier: any, stream: any, options?: any, callback?: any) => void, + * writeUrlToDisk: (identifier: any, url: any, options?: any, callback?: any) => void, + * promises: { + * writeLinesToDisk: (identifier: any, lines: any) => Promise, + * writeContentToDisk: (identifier: any, content: any) => Promise, + * writeStreamToDisk: (identifier: any, stream: any, options?: any) => Promise, + * writeUrlToDisk: (identifier: any, url: any, options?: any) => Promise, + * }, + * }} + */ const FileWriter = { ensureDumpFolderExists() { fs.mkdirSync(Settings.path.dumpFolder, { recursive: true })