wgt-node-utils 0.0.44 → 0.0.45
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 +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wgt-node-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.45",
|
|
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,7 +356,7 @@ class wgtNodeUtils {
|
|
|
356
356
|
* @components 项目名称
|
|
357
357
|
*/
|
|
358
358
|
appendLog = (title, ENV, components = '', err) => {
|
|
359
|
-
console.
|
|
359
|
+
console.log('------------------err----------------', err)
|
|
360
360
|
console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
|
|
361
361
|
try {
|
|
362
362
|
if (!err) {
|
|
@@ -368,17 +368,17 @@ class wgtNodeUtils {
|
|
|
368
368
|
console.error(`${title} [${err.config.method}]: ${err.config.url}`);
|
|
369
369
|
console.error(`request: {params: ${JSON.stringify(err.config.params)}, data: ${JSON.stringify(err.config.data)}}`);
|
|
370
370
|
console.error(`response: ${JSON.stringify(err.response)}`);
|
|
371
|
-
|
|
371
|
+
this.sendFeiShu(`${title} [${err.config.method}]: ${err.config.url}`, ENV, components);
|
|
372
372
|
} else {
|
|
373
373
|
console.error(`============${new Date().toLocaleString()}===========`);
|
|
374
374
|
console.error(`${title} ${err}`);
|
|
375
375
|
|
|
376
376
|
console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
|
|
377
377
|
|
|
378
|
-
|
|
378
|
+
this.sendFeiShu(`${title} ${err}`, ENV, components);
|
|
379
379
|
}
|
|
380
380
|
} catch (e) {
|
|
381
|
-
|
|
381
|
+
console.log(e, 'e')
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
/**
|