diff --git a/src/cdn/funcs/saveResponse.ts b/src/cdn/funcs/saveResponse.ts index 24b0432..31da4ab 100644 --- a/src/cdn/funcs/saveResponse.ts +++ b/src/cdn/funcs/saveResponse.ts @@ -14,6 +14,12 @@ export default function saveResponse( //Remember file size const headerLength = Number(response.headers['content-length']); + //TODO: replace by fs.mkdtemp. Also, file name should be decided in downloadUrlContents(), not here, and we must return a ReadableStream instead of the file name, and automatically delete the file + /*fs.mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, folder) => { + if (err) throw err; + console.log(folder); + // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 + });*/ const tempFileName = `/tmp/swtor-patcher-download-${Math.random()}.tmp`; //If we receive a part of the response, write it to disk diff --git a/tsconfig.json b/tsconfig.json index 3ab5f06..cc1e4c4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "baseUrl": ".", "inlineSourceMap": true, + "inlineSources": true, "module": "commonjs", "moduleResolution": "node", "newLine": "lf",