Fixed stacktraces and source maps on the built exe (!153)
This PR fixes a long standing issue where stacktraces in the built executable didn't have line and column numbers, so you were left wondering where exactly in a given function an error occurred. This also fixes source maps being generated but not actually included in the executable, this fix results in `source-map-support` actually doing it's job, so now stacktrace paths point to the typescript files, line and column number, instead of the transpiled javascript line and column number. Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/153 Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com> Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
e327f8101a
commit
1ab7c5946e
@ -25,6 +25,6 @@
|
||||
"lazy": false,
|
||||
"noInterop": false
|
||||
},
|
||||
"sourceMaps":true,
|
||||
"sourceMaps": true,
|
||||
"minify": false
|
||||
}
|
||||
|
@ -272,11 +272,9 @@ const build = (packagingType) =>
|
||||
const packaging = async (entry) =>
|
||||
{
|
||||
const target = `${nodeVersion}-${process.platform}-${process.arch}`;
|
||||
console.log("target", target);
|
||||
const args = [entry, "--compress", "GZip", "--target", target, "--output", serverExe, "--config", pkgConfig];
|
||||
try
|
||||
{
|
||||
await pkg.exec(args);
|
||||
await pkg.exec([entry, "--compress", "GZip", "--target", target, "--output", serverExe, "--config", pkgConfig, "--public"]);
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
|
@ -4,8 +4,8 @@
|
||||
"obj/**/*.js"
|
||||
],
|
||||
"assets": [
|
||||
"obj/**/*.d.ts",
|
||||
"obj/**/*.js.map",
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "reflect-metadata";
|
||||
import "source-map-support/register";
|
||||
import { Program } from "../Program";
|
||||
|
||||
globalThis.G_DEBUG_CONFIGURATION = true;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "reflect-metadata";
|
||||
import "source-map-support/register";
|
||||
import { Program } from "../Program";
|
||||
|
||||
globalThis.G_DEBUG_CONFIGURATION = true;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "reflect-metadata";
|
||||
import "source-map-support/register";
|
||||
import { Program } from "../Program";
|
||||
|
||||
globalThis.G_DEBUG_CONFIGURATION = false;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import "reflect-metadata";
|
||||
import "source-map-support/register";
|
||||
import { Program } from "../Program";
|
||||
|
||||
globalThis.G_DEBUG_CONFIGURATION = true;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import sourcemapSupport from "source-map-support";
|
||||
import { inject, injectable, injectAll } from "tsyringe";
|
||||
|
||||
import os from "node:os";
|
||||
@ -26,9 +25,6 @@ export class App
|
||||
|
||||
public async load(): Promise<void>
|
||||
{
|
||||
// bind callbacks
|
||||
sourcemapSupport.install();
|
||||
|
||||
// execute onLoad callbacks
|
||||
this.logger.info(this.localisationService.getText("executing_startup_callbacks"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user