@mimik/sumologic-winston-logger 2.0.3 → 2.0.4
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/configuration/config.js +1 -2
- package/lib/stackLib.js +1 -2
- package/package.json +8 -10
package/configuration/config.js
CHANGED
|
@@ -25,7 +25,6 @@ import isNil from 'lodash.isnil';
|
|
|
25
25
|
import isUndefined from 'lodash.isundefined';
|
|
26
26
|
import process from 'process';
|
|
27
27
|
import split from 'lodash.split';
|
|
28
|
-
import trim from 'lodash.trim';
|
|
29
28
|
|
|
30
29
|
const DECIMAL = 10;
|
|
31
30
|
const EXISTING_ERRORS = 1;
|
|
@@ -116,7 +115,7 @@ const checkMode = (mode) => {
|
|
|
116
115
|
let logMode = null;
|
|
117
116
|
|
|
118
117
|
if (mode) {
|
|
119
|
-
logMode = split(trim(
|
|
118
|
+
logMode = split(mode.trim(), /\s*,\s*/u);
|
|
120
119
|
if (logMode.length === NO_MODE) throw new Error('Invalid LOG_MODE: cannot be an empty array');
|
|
121
120
|
if (difference(logMode, ALL_MODES).length !== KNOWN_MODE) throw new Error(`Invalid items in LOG_MODE: ${mode}`);
|
|
122
121
|
if (logMode.includes(NONE_MODE) && logMode.length !== SINGLE_MODE) throw new Error(`Cannot have multiple modes when ${NONE_MODE} is selected`);
|
package/lib/stackLib.js
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
} from 'url';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import reject from 'lodash.reject';
|
|
7
|
-
import trimStart from 'lodash.trimstart';
|
|
8
7
|
|
|
9
8
|
// Stack trace format :
|
|
10
9
|
// https://github.com/v8/v8/wiki/Stack%20Trace%20API
|
|
@@ -45,7 +44,7 @@ const parseStack = (newError) => {
|
|
|
45
44
|
line: stackParts[LINE],
|
|
46
45
|
pos: stackParts[POSITION],
|
|
47
46
|
file: path.basename(stackParts[PATH]),
|
|
48
|
-
stack: `${SHIFT}${
|
|
47
|
+
stack: `${SHIFT}${truncatedList.join('\n').trimStart()}`,
|
|
49
48
|
};
|
|
50
49
|
stackInfo.hash = crypto.createHash('sha256', SECRET)
|
|
51
50
|
.update(stackInfo.stack)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimik/sumologic-winston-logger",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Log wrapper for sumo, s3, kinesis and winston",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@mimik/lib-filters": "^2.0.4",
|
|
37
|
-
"@aws-sdk/client-s3": "3.
|
|
38
|
-
"@aws-sdk/client-kinesis": "3.
|
|
39
|
-
"axios": "1.
|
|
37
|
+
"@aws-sdk/client-s3": "3.864.0",
|
|
38
|
+
"@aws-sdk/client-kinesis": "3.864.0",
|
|
39
|
+
"axios": "1.11.0",
|
|
40
40
|
"bluebird": "3.7.2",
|
|
41
41
|
"lodash.difference": "4.5.0",
|
|
42
42
|
"lodash.foreach": "4.5.0",
|
|
@@ -46,20 +46,18 @@
|
|
|
46
46
|
"lodash.isundefined": "3.0.1",
|
|
47
47
|
"lodash.reject": "4.6.0",
|
|
48
48
|
"lodash.split": "4.4.2",
|
|
49
|
-
"lodash.trim": "4.5.1",
|
|
50
|
-
"lodash.trimstart": "4.5.1",
|
|
51
49
|
"winston": "3.17.0",
|
|
52
50
|
"winston-transport": "4.9.0"
|
|
53
51
|
},
|
|
54
52
|
"devDependencies": {
|
|
55
|
-
"@eslint/js": "9.
|
|
53
|
+
"@eslint/js": "9.33.0",
|
|
56
54
|
"@mimik/eslint-plugin-document-env": "^2.0.8",
|
|
57
55
|
"@mimik/request-helper": "^2.0.2",
|
|
58
|
-
"@stylistic/eslint-plugin": "5.2.
|
|
56
|
+
"@stylistic/eslint-plugin": "5.2.3",
|
|
59
57
|
"body-parser": "2.2.0",
|
|
60
58
|
"c8": "10.1.3",
|
|
61
59
|
"chai": "5.2.1",
|
|
62
|
-
"eslint": "9.
|
|
60
|
+
"eslint": "9.33.0",
|
|
63
61
|
"eslint-plugin-import": "2.32.0",
|
|
64
62
|
"express": "5.1.0",
|
|
65
63
|
"husky": "9.1.7",
|
|
@@ -68,6 +66,6 @@
|
|
|
68
66
|
"mocha": "11.7.1",
|
|
69
67
|
"mochawesome": "7.1.3",
|
|
70
68
|
"sinon": "21.0.0",
|
|
71
|
-
"supertest": "7.1.
|
|
69
|
+
"supertest": "7.1.4"
|
|
72
70
|
}
|
|
73
71
|
}
|