@etsoo/appscript 1.3.76 → 1.3.78
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.
|
@@ -11,15 +11,19 @@ class ActionResultError extends Error {
|
|
|
11
11
|
*/
|
|
12
12
|
static format(result) {
|
|
13
13
|
// Additional data
|
|
14
|
-
|
|
14
|
+
const addtions = [];
|
|
15
15
|
if (result.status != null)
|
|
16
16
|
addtions.push(result.status);
|
|
17
17
|
if (result.type)
|
|
18
18
|
addtions.push(result.type);
|
|
19
19
|
if (result.field)
|
|
20
20
|
addtions.push(result.field);
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
|
|
22
|
+
let title = result.title;
|
|
23
|
+
if (title && result.traceId) {
|
|
24
|
+
title += ` [${result.traceId}]`;
|
|
25
|
+
}
|
|
26
|
+
return `${title || 'Error'}${add}`;
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* Constructor
|
|
@@ -8,15 +8,19 @@ export class ActionResultError extends Error {
|
|
|
8
8
|
*/
|
|
9
9
|
static format(result) {
|
|
10
10
|
// Additional data
|
|
11
|
-
|
|
11
|
+
const addtions = [];
|
|
12
12
|
if (result.status != null)
|
|
13
13
|
addtions.push(result.status);
|
|
14
14
|
if (result.type)
|
|
15
15
|
addtions.push(result.type);
|
|
16
16
|
if (result.field)
|
|
17
17
|
addtions.push(result.field);
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
|
|
19
|
+
let title = result.title;
|
|
20
|
+
if (title && result.traceId) {
|
|
21
|
+
title += ` [${result.traceId}]`;
|
|
22
|
+
}
|
|
23
|
+
return `${title || 'Error'}${add}`;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* Constructor
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.78",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@etsoo/notificationbase": "^1.1.24",
|
|
56
56
|
"@etsoo/restclient": "^1.0.87",
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
57
|
+
"@etsoo/shared": "^1.1.92",
|
|
58
58
|
"@types/crypto-js": "^4.1.1",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@babel/plugin-transform-runtime": "^7.21.0",
|
|
65
65
|
"@babel/preset-env": "^7.20.2",
|
|
66
66
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
67
|
-
"@types/jest": "^29.
|
|
67
|
+
"@types/jest": "^29.5.0",
|
|
68
68
|
"jest": "^29.5.0",
|
|
69
69
|
"jest-environment-jsdom": "^29.5.0",
|
|
70
70
|
"ts-jest": "^29.0.5",
|
|
@@ -10,14 +10,18 @@ export class ActionResultError extends Error {
|
|
|
10
10
|
*/
|
|
11
11
|
static format(result: IActionResult) {
|
|
12
12
|
// Additional data
|
|
13
|
-
|
|
13
|
+
const addtions = [];
|
|
14
14
|
if (result.status != null) addtions.push(result.status);
|
|
15
15
|
if (result.type) addtions.push(result.type);
|
|
16
16
|
if (result.field) addtions.push(result.field);
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
|
|
19
|
+
let title = result.title;
|
|
20
|
+
if (title && result.traceId) {
|
|
21
|
+
title += ` [${result.traceId}]`;
|
|
22
|
+
}
|
|
19
23
|
|
|
20
|
-
return `${
|
|
24
|
+
return `${title || 'Error'}${add}`;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
/**
|