core: remove deprecation

This commit is contained in:
undefined committed 2022-10-05 18:54:49 +08:00
1 parent 833b960a48
commit 9971967fd1
11 files changed
+47 -20

No files matched your search

+17 -4
View File
@@ -161,10 +161,23 @@ export namespace Time {
export function errorMessage(err: Error | string) {
const t = typeof err === 'string' ? err : err.stack;
const parsed = t
.split('\n')
.filter((i) => !i.includes(' (node:'))
.join('\n')
const lines = t.split('\n')
.filter((i) => !i.includes(' (node:') && !i.includes('(internal'));
let cursor = 1;
let count = 0;
while (cursor < lines.length) {
if (lines[cursor] !== lines[cursor - 1]) {
if (count) {
lines[cursor - 1] += ` [+${count}]`;
count = 0;
}
cursor++;
} else {
count++;
lines.splice(cursor, 1);
}
}
const parsed = lines.join('\n')
.replace(/[A-Z]:\\.+\\@hydrooj\\/g, '@hydrooj\\')
.replace(/\/.+\/@hydrooj\//g, '\\')
.replace(/[A-Z]:\\.+\\hydrooj\\/g, 'hydrooj\\')
+1 -1
View File
@@ -14,7 +14,7 @@
"js-yaml": "^4.1.0",
"moment-timezone": "^0.5.37",
"mongodb": "^3.7.3",
"reggol": "^1.2.1",
"reggol": "^1.3.0",
"source-map-support": "^0.5.21",
"systeminformation": "^5.12.6"
},