xernerx 4.8.1 → 4.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/XernerxLog.js +9 -3
- package/package.json +1 -1
- package/image.png +0 -0
package/dist/tools/XernerxLog.js
CHANGED
|
@@ -18,10 +18,16 @@ export default class XernerxLog {
|
|
|
18
18
|
this.time = () => String(new Date()).split(/ +/)[4];
|
|
19
19
|
}
|
|
20
20
|
info(message, force = false) {
|
|
21
|
-
return this.infoLog || force
|
|
21
|
+
return this.infoLog || force
|
|
22
|
+
? console.info(`✔️ | ${Style.log('Xernerx', { color: Style.TextColor.Purple })} | ${Style.log(this.time(), {
|
|
23
|
+
color: Style.TextColor.Cyan,
|
|
24
|
+
})} | ${Math.round(process.memoryUsage().rss / 1000000)}mb | ${message}`)
|
|
25
|
+
: null;
|
|
22
26
|
}
|
|
23
27
|
warn(message) {
|
|
24
|
-
return this.warnLog
|
|
28
|
+
return this.warnLog
|
|
29
|
+
? console.warn(`⚠️ | ${Style.log('Xernerx', { color: Style.TextColor.Yellow })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${Math.round(process.memoryUsage().rss / 1000000)}mb | ${message}`)
|
|
30
|
+
: null;
|
|
25
31
|
}
|
|
26
32
|
async update(version, url) {
|
|
27
33
|
const pkg = await fetch(url)
|
|
@@ -34,7 +40,7 @@ export default class XernerxLog {
|
|
|
34
40
|
}
|
|
35
41
|
error(message, error) {
|
|
36
42
|
return this.errorLog
|
|
37
|
-
? console.error(`❗ | ${Style.log('Xernerx', { color: Style.TextColor.Red })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${message}${error ? ` | ${error.stack}` : ''}`)
|
|
43
|
+
? console.error(`❗ | ${Style.log('Xernerx', { color: Style.TextColor.Red })} | ${Style.log(this.time(), { color: Style.TextColor.Cyan })} | ${Math.round(process.memoryUsage().rss / 1000000)}mb | ${message}${error ? ` | ${error.stack}` : ''}`)
|
|
38
44
|
: null;
|
|
39
45
|
}
|
|
40
46
|
ready() {
|
package/package.json
CHANGED
package/image.png
DELETED
|
Binary file
|