@shuvi/shared 1.0.33 → 1.0.34
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/esm/constants/trace.d.ts +31 -0
- package/esm/constants/trace.js +37 -6
- package/lib/constants/trace.d.ts +31 -0
- package/lib/constants/trace.js +37 -6
- package/package.json +2 -2
package/esm/constants/trace.d.ts
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
/** category SERVER_CREATE_APP */
|
|
2
2
|
export declare const SERVER_CREATE_APP: {
|
|
3
3
|
name: string;
|
|
4
|
+
attrs: {
|
|
5
|
+
requestId: string;
|
|
6
|
+
};
|
|
4
7
|
events: {
|
|
5
8
|
SHUVI_SERVER_CREATE_APP: {
|
|
6
9
|
name: string;
|
|
7
10
|
duration: boolean;
|
|
11
|
+
attrs: {
|
|
12
|
+
requestId: string;
|
|
13
|
+
};
|
|
8
14
|
};
|
|
9
15
|
SHUVI_SERVER_APP_INIT: {
|
|
10
16
|
name: string;
|
|
11
17
|
duration: boolean;
|
|
18
|
+
attrs: {
|
|
19
|
+
requestId: string;
|
|
20
|
+
};
|
|
12
21
|
};
|
|
13
22
|
SHUVI_SERVER_RUN_LOADERS: {
|
|
14
23
|
name: string;
|
|
15
24
|
duration: boolean;
|
|
16
25
|
attrs: {
|
|
26
|
+
requestId: string;
|
|
17
27
|
error: {
|
|
18
28
|
name: string;
|
|
19
29
|
type: string;
|
|
@@ -30,15 +40,22 @@ export declare const SERVER_CREATE_APP: {
|
|
|
30
40
|
/** category SERVER_REQUEST */
|
|
31
41
|
export declare const SERVER_REQUEST: {
|
|
32
42
|
name: string;
|
|
43
|
+
attrs: {
|
|
44
|
+
requestId: string;
|
|
45
|
+
};
|
|
33
46
|
events: {
|
|
34
47
|
SHUVI_SERVER_HANDLE_REQUEST_START: {
|
|
35
48
|
name: string;
|
|
36
49
|
duration: boolean;
|
|
50
|
+
attrs: {
|
|
51
|
+
requestId: string;
|
|
52
|
+
};
|
|
37
53
|
};
|
|
38
54
|
SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
|
|
39
55
|
name: string;
|
|
40
56
|
duration: boolean;
|
|
41
57
|
attrs: {
|
|
58
|
+
requestId: string;
|
|
42
59
|
error: {
|
|
43
60
|
name: string;
|
|
44
61
|
type: string;
|
|
@@ -53,6 +70,7 @@ export declare const SERVER_REQUEST: {
|
|
|
53
70
|
name: string;
|
|
54
71
|
duration: boolean;
|
|
55
72
|
attrs: {
|
|
73
|
+
requestId: string;
|
|
56
74
|
error: {
|
|
57
75
|
name: string;
|
|
58
76
|
type: string;
|
|
@@ -71,6 +89,7 @@ export declare const SERVER_REQUEST: {
|
|
|
71
89
|
name: string;
|
|
72
90
|
duration: boolean;
|
|
73
91
|
attrs: {
|
|
92
|
+
requestId: string;
|
|
74
93
|
error: {
|
|
75
94
|
name: string;
|
|
76
95
|
type: string;
|
|
@@ -85,6 +104,7 @@ export declare const SERVER_REQUEST: {
|
|
|
85
104
|
name: string;
|
|
86
105
|
duration: boolean;
|
|
87
106
|
attrs: {
|
|
107
|
+
requestId: string;
|
|
88
108
|
error: {
|
|
89
109
|
name: string;
|
|
90
110
|
type: string;
|
|
@@ -99,6 +119,7 @@ export declare const SERVER_REQUEST: {
|
|
|
99
119
|
name: string;
|
|
100
120
|
duration: boolean;
|
|
101
121
|
attrs: {
|
|
122
|
+
requestId: string;
|
|
102
123
|
error: {
|
|
103
124
|
name: string;
|
|
104
125
|
type: string;
|
|
@@ -108,14 +129,23 @@ export declare const SERVER_REQUEST: {
|
|
|
108
129
|
SHUVI_SERVER_RENDER_TO_HTML: {
|
|
109
130
|
name: string;
|
|
110
131
|
duration: boolean;
|
|
132
|
+
attrs: {
|
|
133
|
+
requestId: string;
|
|
134
|
+
};
|
|
111
135
|
};
|
|
112
136
|
SHUVI_SERVER_SEND_HTML_HOOK: {
|
|
113
137
|
name: string;
|
|
114
138
|
duration: boolean;
|
|
139
|
+
attrs: {
|
|
140
|
+
requestId: string;
|
|
141
|
+
};
|
|
115
142
|
};
|
|
116
143
|
SHUVI_SERVER_SEND_HTML_ORIGINAL: {
|
|
117
144
|
name: string;
|
|
118
145
|
duration: boolean;
|
|
146
|
+
attrs: {
|
|
147
|
+
requestId: string;
|
|
148
|
+
};
|
|
119
149
|
};
|
|
120
150
|
};
|
|
121
151
|
};
|
|
@@ -197,6 +227,7 @@ export declare const CLIENT_RENDER: {
|
|
|
197
227
|
name: string;
|
|
198
228
|
duration: boolean;
|
|
199
229
|
attrs: {
|
|
230
|
+
requestId: string;
|
|
200
231
|
error: {
|
|
201
232
|
name: string;
|
|
202
233
|
type: string;
|
package/esm/constants/trace.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
const requestId = 'requestId';
|
|
1
2
|
const runLoadersAttrs = {
|
|
3
|
+
[requestId]: 'string',
|
|
2
4
|
error: {
|
|
3
5
|
name: 'error',
|
|
4
6
|
type: 'boolean'
|
|
@@ -12,14 +14,23 @@ const runLoadersAttrs = {
|
|
|
12
14
|
/** category SERVER_CREATE_APP */
|
|
13
15
|
export const SERVER_CREATE_APP = {
|
|
14
16
|
name: 'SERVER_CREATE_APP',
|
|
17
|
+
attrs: {
|
|
18
|
+
[requestId]: 'string'
|
|
19
|
+
},
|
|
15
20
|
events: {
|
|
16
21
|
SHUVI_SERVER_CREATE_APP: {
|
|
17
22
|
name: 'SHUVI_SERVER_CREATE_APP',
|
|
18
|
-
duration: true
|
|
23
|
+
duration: true,
|
|
24
|
+
attrs: {
|
|
25
|
+
[requestId]: 'string'
|
|
26
|
+
}
|
|
19
27
|
},
|
|
20
28
|
SHUVI_SERVER_APP_INIT: {
|
|
21
29
|
name: 'SHUVI_SERVER_APP_INIT',
|
|
22
|
-
duration: true
|
|
30
|
+
duration: true,
|
|
31
|
+
attrs: {
|
|
32
|
+
[requestId]: 'string'
|
|
33
|
+
}
|
|
23
34
|
},
|
|
24
35
|
SHUVI_SERVER_RUN_LOADERS: {
|
|
25
36
|
name: 'SHUVI_SERVER_RUN_LOADERS',
|
|
@@ -31,15 +42,22 @@ export const SERVER_CREATE_APP = {
|
|
|
31
42
|
/** category SERVER_REQUEST */
|
|
32
43
|
export const SERVER_REQUEST = {
|
|
33
44
|
name: 'SERVER_REQUEST',
|
|
45
|
+
attrs: {
|
|
46
|
+
[requestId]: 'string'
|
|
47
|
+
},
|
|
34
48
|
events: {
|
|
35
49
|
SHUVI_SERVER_HANDLE_REQUEST_START: {
|
|
36
50
|
name: 'SHUVI_SERVER_HANDLE_REQUEST_START',
|
|
37
|
-
duration: false
|
|
51
|
+
duration: false,
|
|
52
|
+
attrs: {
|
|
53
|
+
[requestId]: 'string'
|
|
54
|
+
}
|
|
38
55
|
},
|
|
39
56
|
SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
|
|
40
57
|
name: 'SHUVI_SERVER_RUN_ASSET_MIDDLEWARE',
|
|
41
58
|
duration: true,
|
|
42
59
|
attrs: {
|
|
60
|
+
[requestId]: 'string',
|
|
43
61
|
error: {
|
|
44
62
|
name: 'error',
|
|
45
63
|
type: 'boolean'
|
|
@@ -54,6 +72,7 @@ export const SERVER_REQUEST = {
|
|
|
54
72
|
name: 'SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES',
|
|
55
73
|
duration: true,
|
|
56
74
|
attrs: {
|
|
75
|
+
[requestId]: 'string',
|
|
57
76
|
error: {
|
|
58
77
|
name: 'error',
|
|
59
78
|
type: 'boolean'
|
|
@@ -72,6 +91,7 @@ export const SERVER_REQUEST = {
|
|
|
72
91
|
name: 'SHUVI_SERVER_RUN_API_MIDDLEWARE',
|
|
73
92
|
duration: true,
|
|
74
93
|
attrs: {
|
|
94
|
+
[requestId]: 'string',
|
|
75
95
|
error: {
|
|
76
96
|
name: 'error',
|
|
77
97
|
type: 'boolean'
|
|
@@ -86,6 +106,7 @@ export const SERVER_REQUEST = {
|
|
|
86
106
|
name: 'SHUVI_SERVER_RUN_PAGE_MIDDLEWARE',
|
|
87
107
|
duration: true,
|
|
88
108
|
attrs: {
|
|
109
|
+
[requestId]: 'string',
|
|
89
110
|
error: {
|
|
90
111
|
name: 'error',
|
|
91
112
|
type: 'boolean'
|
|
@@ -100,6 +121,7 @@ export const SERVER_REQUEST = {
|
|
|
100
121
|
name: 'SHUVI_SERVER_RENDER_TO_STRING',
|
|
101
122
|
duration: true,
|
|
102
123
|
attrs: {
|
|
124
|
+
[requestId]: 'string',
|
|
103
125
|
error: {
|
|
104
126
|
name: 'error',
|
|
105
127
|
type: 'boolean'
|
|
@@ -108,15 +130,24 @@ export const SERVER_REQUEST = {
|
|
|
108
130
|
},
|
|
109
131
|
SHUVI_SERVER_RENDER_TO_HTML: {
|
|
110
132
|
name: 'SHUVI_SERVER_RENDER_TO_HTML',
|
|
111
|
-
duration: true
|
|
133
|
+
duration: true,
|
|
134
|
+
attrs: {
|
|
135
|
+
[requestId]: 'string'
|
|
136
|
+
}
|
|
112
137
|
},
|
|
113
138
|
SHUVI_SERVER_SEND_HTML_HOOK: {
|
|
114
139
|
name: 'SHUVI_SERVER_SEND_HTML_HOOK',
|
|
115
|
-
duration: true
|
|
140
|
+
duration: true,
|
|
141
|
+
attrs: {
|
|
142
|
+
[requestId]: 'string'
|
|
143
|
+
}
|
|
116
144
|
},
|
|
117
145
|
SHUVI_SERVER_SEND_HTML_ORIGINAL: {
|
|
118
146
|
name: 'SHUVI_SERVER_SEND_HTML_ORIGINAL',
|
|
119
|
-
duration: true
|
|
147
|
+
duration: true,
|
|
148
|
+
attrs: {
|
|
149
|
+
[requestId]: 'string'
|
|
150
|
+
}
|
|
120
151
|
}
|
|
121
152
|
}
|
|
122
153
|
};
|
package/lib/constants/trace.d.ts
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
/** category SERVER_CREATE_APP */
|
|
2
2
|
export declare const SERVER_CREATE_APP: {
|
|
3
3
|
name: string;
|
|
4
|
+
attrs: {
|
|
5
|
+
requestId: string;
|
|
6
|
+
};
|
|
4
7
|
events: {
|
|
5
8
|
SHUVI_SERVER_CREATE_APP: {
|
|
6
9
|
name: string;
|
|
7
10
|
duration: boolean;
|
|
11
|
+
attrs: {
|
|
12
|
+
requestId: string;
|
|
13
|
+
};
|
|
8
14
|
};
|
|
9
15
|
SHUVI_SERVER_APP_INIT: {
|
|
10
16
|
name: string;
|
|
11
17
|
duration: boolean;
|
|
18
|
+
attrs: {
|
|
19
|
+
requestId: string;
|
|
20
|
+
};
|
|
12
21
|
};
|
|
13
22
|
SHUVI_SERVER_RUN_LOADERS: {
|
|
14
23
|
name: string;
|
|
15
24
|
duration: boolean;
|
|
16
25
|
attrs: {
|
|
26
|
+
requestId: string;
|
|
17
27
|
error: {
|
|
18
28
|
name: string;
|
|
19
29
|
type: string;
|
|
@@ -30,15 +40,22 @@ export declare const SERVER_CREATE_APP: {
|
|
|
30
40
|
/** category SERVER_REQUEST */
|
|
31
41
|
export declare const SERVER_REQUEST: {
|
|
32
42
|
name: string;
|
|
43
|
+
attrs: {
|
|
44
|
+
requestId: string;
|
|
45
|
+
};
|
|
33
46
|
events: {
|
|
34
47
|
SHUVI_SERVER_HANDLE_REQUEST_START: {
|
|
35
48
|
name: string;
|
|
36
49
|
duration: boolean;
|
|
50
|
+
attrs: {
|
|
51
|
+
requestId: string;
|
|
52
|
+
};
|
|
37
53
|
};
|
|
38
54
|
SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
|
|
39
55
|
name: string;
|
|
40
56
|
duration: boolean;
|
|
41
57
|
attrs: {
|
|
58
|
+
requestId: string;
|
|
42
59
|
error: {
|
|
43
60
|
name: string;
|
|
44
61
|
type: string;
|
|
@@ -53,6 +70,7 @@ export declare const SERVER_REQUEST: {
|
|
|
53
70
|
name: string;
|
|
54
71
|
duration: boolean;
|
|
55
72
|
attrs: {
|
|
73
|
+
requestId: string;
|
|
56
74
|
error: {
|
|
57
75
|
name: string;
|
|
58
76
|
type: string;
|
|
@@ -71,6 +89,7 @@ export declare const SERVER_REQUEST: {
|
|
|
71
89
|
name: string;
|
|
72
90
|
duration: boolean;
|
|
73
91
|
attrs: {
|
|
92
|
+
requestId: string;
|
|
74
93
|
error: {
|
|
75
94
|
name: string;
|
|
76
95
|
type: string;
|
|
@@ -85,6 +104,7 @@ export declare const SERVER_REQUEST: {
|
|
|
85
104
|
name: string;
|
|
86
105
|
duration: boolean;
|
|
87
106
|
attrs: {
|
|
107
|
+
requestId: string;
|
|
88
108
|
error: {
|
|
89
109
|
name: string;
|
|
90
110
|
type: string;
|
|
@@ -99,6 +119,7 @@ export declare const SERVER_REQUEST: {
|
|
|
99
119
|
name: string;
|
|
100
120
|
duration: boolean;
|
|
101
121
|
attrs: {
|
|
122
|
+
requestId: string;
|
|
102
123
|
error: {
|
|
103
124
|
name: string;
|
|
104
125
|
type: string;
|
|
@@ -108,14 +129,23 @@ export declare const SERVER_REQUEST: {
|
|
|
108
129
|
SHUVI_SERVER_RENDER_TO_HTML: {
|
|
109
130
|
name: string;
|
|
110
131
|
duration: boolean;
|
|
132
|
+
attrs: {
|
|
133
|
+
requestId: string;
|
|
134
|
+
};
|
|
111
135
|
};
|
|
112
136
|
SHUVI_SERVER_SEND_HTML_HOOK: {
|
|
113
137
|
name: string;
|
|
114
138
|
duration: boolean;
|
|
139
|
+
attrs: {
|
|
140
|
+
requestId: string;
|
|
141
|
+
};
|
|
115
142
|
};
|
|
116
143
|
SHUVI_SERVER_SEND_HTML_ORIGINAL: {
|
|
117
144
|
name: string;
|
|
118
145
|
duration: boolean;
|
|
146
|
+
attrs: {
|
|
147
|
+
requestId: string;
|
|
148
|
+
};
|
|
119
149
|
};
|
|
120
150
|
};
|
|
121
151
|
};
|
|
@@ -197,6 +227,7 @@ export declare const CLIENT_RENDER: {
|
|
|
197
227
|
name: string;
|
|
198
228
|
duration: boolean;
|
|
199
229
|
attrs: {
|
|
230
|
+
requestId: string;
|
|
200
231
|
error: {
|
|
201
232
|
name: string;
|
|
202
233
|
type: string;
|
package/lib/constants/trace.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CLIENT_RENDER = exports.CLIENT_ENTRY = exports.SERVER_REQUEST = exports.SERVER_CREATE_APP = void 0;
|
|
4
|
+
const requestId = 'requestId';
|
|
4
5
|
const runLoadersAttrs = {
|
|
6
|
+
[requestId]: 'string',
|
|
5
7
|
error: {
|
|
6
8
|
name: 'error',
|
|
7
9
|
type: 'boolean'
|
|
@@ -15,14 +17,23 @@ const runLoadersAttrs = {
|
|
|
15
17
|
/** category SERVER_CREATE_APP */
|
|
16
18
|
exports.SERVER_CREATE_APP = {
|
|
17
19
|
name: 'SERVER_CREATE_APP',
|
|
20
|
+
attrs: {
|
|
21
|
+
[requestId]: 'string'
|
|
22
|
+
},
|
|
18
23
|
events: {
|
|
19
24
|
SHUVI_SERVER_CREATE_APP: {
|
|
20
25
|
name: 'SHUVI_SERVER_CREATE_APP',
|
|
21
|
-
duration: true
|
|
26
|
+
duration: true,
|
|
27
|
+
attrs: {
|
|
28
|
+
[requestId]: 'string'
|
|
29
|
+
}
|
|
22
30
|
},
|
|
23
31
|
SHUVI_SERVER_APP_INIT: {
|
|
24
32
|
name: 'SHUVI_SERVER_APP_INIT',
|
|
25
|
-
duration: true
|
|
33
|
+
duration: true,
|
|
34
|
+
attrs: {
|
|
35
|
+
[requestId]: 'string'
|
|
36
|
+
}
|
|
26
37
|
},
|
|
27
38
|
SHUVI_SERVER_RUN_LOADERS: {
|
|
28
39
|
name: 'SHUVI_SERVER_RUN_LOADERS',
|
|
@@ -34,15 +45,22 @@ exports.SERVER_CREATE_APP = {
|
|
|
34
45
|
/** category SERVER_REQUEST */
|
|
35
46
|
exports.SERVER_REQUEST = {
|
|
36
47
|
name: 'SERVER_REQUEST',
|
|
48
|
+
attrs: {
|
|
49
|
+
[requestId]: 'string'
|
|
50
|
+
},
|
|
37
51
|
events: {
|
|
38
52
|
SHUVI_SERVER_HANDLE_REQUEST_START: {
|
|
39
53
|
name: 'SHUVI_SERVER_HANDLE_REQUEST_START',
|
|
40
|
-
duration: false
|
|
54
|
+
duration: false,
|
|
55
|
+
attrs: {
|
|
56
|
+
[requestId]: 'string'
|
|
57
|
+
}
|
|
41
58
|
},
|
|
42
59
|
SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
|
|
43
60
|
name: 'SHUVI_SERVER_RUN_ASSET_MIDDLEWARE',
|
|
44
61
|
duration: true,
|
|
45
62
|
attrs: {
|
|
63
|
+
[requestId]: 'string',
|
|
46
64
|
error: {
|
|
47
65
|
name: 'error',
|
|
48
66
|
type: 'boolean'
|
|
@@ -57,6 +75,7 @@ exports.SERVER_REQUEST = {
|
|
|
57
75
|
name: 'SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES',
|
|
58
76
|
duration: true,
|
|
59
77
|
attrs: {
|
|
78
|
+
[requestId]: 'string',
|
|
60
79
|
error: {
|
|
61
80
|
name: 'error',
|
|
62
81
|
type: 'boolean'
|
|
@@ -75,6 +94,7 @@ exports.SERVER_REQUEST = {
|
|
|
75
94
|
name: 'SHUVI_SERVER_RUN_API_MIDDLEWARE',
|
|
76
95
|
duration: true,
|
|
77
96
|
attrs: {
|
|
97
|
+
[requestId]: 'string',
|
|
78
98
|
error: {
|
|
79
99
|
name: 'error',
|
|
80
100
|
type: 'boolean'
|
|
@@ -89,6 +109,7 @@ exports.SERVER_REQUEST = {
|
|
|
89
109
|
name: 'SHUVI_SERVER_RUN_PAGE_MIDDLEWARE',
|
|
90
110
|
duration: true,
|
|
91
111
|
attrs: {
|
|
112
|
+
[requestId]: 'string',
|
|
92
113
|
error: {
|
|
93
114
|
name: 'error',
|
|
94
115
|
type: 'boolean'
|
|
@@ -103,6 +124,7 @@ exports.SERVER_REQUEST = {
|
|
|
103
124
|
name: 'SHUVI_SERVER_RENDER_TO_STRING',
|
|
104
125
|
duration: true,
|
|
105
126
|
attrs: {
|
|
127
|
+
[requestId]: 'string',
|
|
106
128
|
error: {
|
|
107
129
|
name: 'error',
|
|
108
130
|
type: 'boolean'
|
|
@@ -111,15 +133,24 @@ exports.SERVER_REQUEST = {
|
|
|
111
133
|
},
|
|
112
134
|
SHUVI_SERVER_RENDER_TO_HTML: {
|
|
113
135
|
name: 'SHUVI_SERVER_RENDER_TO_HTML',
|
|
114
|
-
duration: true
|
|
136
|
+
duration: true,
|
|
137
|
+
attrs: {
|
|
138
|
+
[requestId]: 'string'
|
|
139
|
+
}
|
|
115
140
|
},
|
|
116
141
|
SHUVI_SERVER_SEND_HTML_HOOK: {
|
|
117
142
|
name: 'SHUVI_SERVER_SEND_HTML_HOOK',
|
|
118
|
-
duration: true
|
|
143
|
+
duration: true,
|
|
144
|
+
attrs: {
|
|
145
|
+
[requestId]: 'string'
|
|
146
|
+
}
|
|
119
147
|
},
|
|
120
148
|
SHUVI_SERVER_SEND_HTML_ORIGINAL: {
|
|
121
149
|
name: 'SHUVI_SERVER_SEND_HTML_ORIGINAL',
|
|
122
|
-
duration: true
|
|
150
|
+
duration: true,
|
|
151
|
+
attrs: {
|
|
152
|
+
[requestId]: 'string'
|
|
153
|
+
}
|
|
123
154
|
}
|
|
124
155
|
}
|
|
125
156
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"node": ">= 16.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@shuvi/hook": "1.0.
|
|
40
|
+
"@shuvi/hook": "1.0.34"
|
|
41
41
|
}
|
|
42
42
|
}
|