homegames-common 1.0.6 → 1.0.8
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/index.js +5 -5
- package/package.json +1 -2
package/index.js
CHANGED
|
@@ -4,7 +4,6 @@ const WebSocket = require('ws');
|
|
|
4
4
|
const http = require('http');
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const path = require('path');
|
|
7
|
-
const AWS = require('aws-sdk');
|
|
8
7
|
const unzipper = require('unzipper');
|
|
9
8
|
const crypto = require('crypto');
|
|
10
9
|
const { Readable } = require('stream');
|
|
@@ -700,15 +699,16 @@ const log = {
|
|
|
700
699
|
error: (msg, explanation) => {
|
|
701
700
|
if (electronLogger) {
|
|
702
701
|
electronLogger.error(msgToString(msg));
|
|
703
|
-
} else {
|
|
702
|
+
}// else {
|
|
704
703
|
const logLevel = getLogLevel();
|
|
705
704
|
const required = getLogLevel('INFO');
|
|
706
705
|
|
|
707
706
|
if (logLevel < required) {
|
|
708
|
-
|
|
707
|
+
// return;
|
|
709
708
|
}
|
|
710
709
|
|
|
711
|
-
const logPath = getConfigValue('LOG_PATH', 'hg_log.txt');
|
|
710
|
+
//const logPath = getConfigValue('LOG_PATH', 'hg_log.txt');
|
|
711
|
+
const logPath = path.join(getAppDataPath(), 'hg-log.txt');//getConfigValue('LOG_PATH', 'hg_log.txt');
|
|
712
712
|
|
|
713
713
|
const msgString = `[HOMEGAMES-ERROR][${new Date().toTimeString()}] ${msgToString(msg)}${explanation ? ':' + os.EOL + msgToString(explanation) : ''}${os.EOL}${os.EOL}`;
|
|
714
714
|
fs.appendFile(logPath, msgString, (err) => {
|
|
@@ -717,7 +717,7 @@ const log = {
|
|
|
717
717
|
console.log(err);
|
|
718
718
|
}
|
|
719
719
|
});
|
|
720
|
-
}
|
|
720
|
+
//}
|
|
721
721
|
},
|
|
722
722
|
debug: (msg, explanation) => {
|
|
723
723
|
const logLevel = getLogLevel();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homegames-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Homegames common tools",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/homegamesio/homegames-common#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"aws-sdk": "^2.1151.0",
|
|
21
20
|
"unzipper": "^0.10.11",
|
|
22
21
|
"ws": "^7.5.4"
|
|
23
22
|
}
|