wgt-node-utils 0.0.44 → 0.0.46
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/bundle.js +1 -1
- package/package.json +4 -2
- package/src/index.js +3 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wgt-node-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"description": "WGT工具类包",
|
|
5
5
|
"main": "dist/bundle.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
"author": "rookie",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "^0.19.2"
|
|
17
|
+
"axios": "^0.19.2",
|
|
18
|
+
"bufferutil": "^4.0.8",
|
|
19
|
+
"utf-8-validate": "^6.0.5"
|
|
18
20
|
},
|
|
19
21
|
"devDependencies": {
|
|
20
22
|
"@babel/core": "^7.25.8",
|
package/src/index.js
CHANGED
|
@@ -356,8 +356,6 @@ class wgtNodeUtils {
|
|
|
356
356
|
* @components 项目名称
|
|
357
357
|
*/
|
|
358
358
|
appendLog = (title, ENV, components = '', err) => {
|
|
359
|
-
console.error('=============err============', err)
|
|
360
|
-
console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
|
|
361
359
|
try {
|
|
362
360
|
if (!err) {
|
|
363
361
|
console.warn(`============${new Date().toLocaleString()}===========`);
|
|
@@ -368,17 +366,14 @@ class wgtNodeUtils {
|
|
|
368
366
|
console.error(`${title} [${err.config.method}]: ${err.config.url}`);
|
|
369
367
|
console.error(`request: {params: ${JSON.stringify(err.config.params)}, data: ${JSON.stringify(err.config.data)}}`);
|
|
370
368
|
console.error(`response: ${JSON.stringify(err.response)}`);
|
|
371
|
-
|
|
369
|
+
this.sendFeiShu(`${title} [${err.config.method}]: ${err.config.url}`, ENV, components);
|
|
372
370
|
} else {
|
|
373
371
|
console.error(`============${new Date().toLocaleString()}===========`);
|
|
374
372
|
console.error(`${title} ${err}`);
|
|
375
|
-
|
|
376
|
-
console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
|
|
377
|
-
|
|
378
|
-
// this.sendFeiShu(`${title} ${err}`, ENV, components);
|
|
373
|
+
this.sendFeiShu(`${title} ${err}`, ENV, components);
|
|
379
374
|
}
|
|
380
375
|
} catch (e) {
|
|
381
|
-
|
|
376
|
+
console.log(e, '=============catch==============')
|
|
382
377
|
}
|
|
383
378
|
};
|
|
384
379
|
/**
|