👷 Fix sourcemaps to include ts code

This commit is contained in:
C-3PO 2018-07-05 15:32:05 +02:00
parent 7dfe0176ab
commit d03355c61a
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
2 changed files with 7 additions and 0 deletions

View file

@ -14,6 +14,12 @@ export default function saveResponse(
//Remember file size //Remember file size
const headerLength = Number(response.headers['content-length']); 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`; const tempFileName = `/tmp/swtor-patcher-download-${Math.random()}.tmp`;
//If we receive a part of the response, write it to disk //If we receive a part of the response, write it to disk

View file

@ -2,6 +2,7 @@
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"inlineSourceMap": true, "inlineSourceMap": true,
"inlineSources": true,
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"newLine": "lf", "newLine": "lf",