TGUI Update

This commit is contained in:
Heroman3003
2023-06-01 09:37:52 +10:00
committed by CHOMPStation2
parent 94f7414bca
commit 7144410a11
365 changed files with 12773 additions and 4100 deletions

View File

@@ -29,7 +29,9 @@ export const loadSourceMaps = async (bundleDir) => {
for (let path of paths) {
try {
const file = basename(path).replace('.map', '');
const consumer = await new SourceMapConsumer(JSON.parse(fs.readFileSync(path, 'utf8')));
const consumer = await new SourceMapConsumer(
JSON.parse(fs.readFileSync(path, 'utf8'))
);
sourceMaps.push({ file, consumer });
} catch (err) {
logger.error(err);
@@ -76,7 +78,9 @@ export const retrace = (stack) => {
if (!file) {
return ` at ${methodName}`;
}
const compactPath = file.replace(/^webpack:\/\/\/?/, './').replace(/.*node_modules\//, '');
const compactPath = file
.replace(/^webpack:\/\/\/?/, './')
.replace(/.*node_modules\//, '');
return ` at ${methodName} (${compactPath}:${lineNumber})`;
})
.join('\n');