@shuvi/shared 1.0.33 → 1.0.35

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.
@@ -1,19 +1,41 @@
1
1
  /** category SERVER_CREATE_APP */
2
2
  export declare const SERVER_CREATE_APP: {
3
3
  name: string;
4
+ attrs: {
5
+ requestId: {
6
+ name: string;
7
+ type: string;
8
+ };
9
+ };
4
10
  events: {
5
11
  SHUVI_SERVER_CREATE_APP: {
6
12
  name: string;
7
13
  duration: boolean;
14
+ attrs: {
15
+ requestId: {
16
+ name: string;
17
+ type: string;
18
+ };
19
+ };
8
20
  };
9
21
  SHUVI_SERVER_APP_INIT: {
10
22
  name: string;
11
23
  duration: boolean;
24
+ attrs: {
25
+ requestId: {
26
+ name: string;
27
+ type: string;
28
+ };
29
+ };
12
30
  };
13
31
  SHUVI_SERVER_RUN_LOADERS: {
14
32
  name: string;
15
33
  duration: boolean;
16
34
  attrs: {
35
+ requestId: {
36
+ name: string;
37
+ type: string;
38
+ };
17
39
  error: {
18
40
  name: string;
19
41
  type: string;
@@ -30,15 +52,31 @@ export declare const SERVER_CREATE_APP: {
30
52
  /** category SERVER_REQUEST */
31
53
  export declare const SERVER_REQUEST: {
32
54
  name: string;
55
+ attrs: {
56
+ requestId: {
57
+ name: string;
58
+ type: string;
59
+ };
60
+ };
33
61
  events: {
34
62
  SHUVI_SERVER_HANDLE_REQUEST_START: {
35
63
  name: string;
36
64
  duration: boolean;
65
+ attrs: {
66
+ requestId: {
67
+ name: string;
68
+ type: string;
69
+ };
70
+ };
37
71
  };
38
72
  SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
39
73
  name: string;
40
74
  duration: boolean;
41
75
  attrs: {
76
+ requestId: {
77
+ name: string;
78
+ type: string;
79
+ };
42
80
  error: {
43
81
  name: string;
44
82
  type: string;
@@ -53,6 +91,10 @@ export declare const SERVER_REQUEST: {
53
91
  name: string;
54
92
  duration: boolean;
55
93
  attrs: {
94
+ requestId: {
95
+ name: string;
96
+ type: string;
97
+ };
56
98
  error: {
57
99
  name: string;
58
100
  type: string;
@@ -71,6 +113,10 @@ export declare const SERVER_REQUEST: {
71
113
  name: string;
72
114
  duration: boolean;
73
115
  attrs: {
116
+ requestId: {
117
+ name: string;
118
+ type: string;
119
+ };
74
120
  error: {
75
121
  name: string;
76
122
  type: string;
@@ -85,6 +131,10 @@ export declare const SERVER_REQUEST: {
85
131
  name: string;
86
132
  duration: boolean;
87
133
  attrs: {
134
+ requestId: {
135
+ name: string;
136
+ type: string;
137
+ };
88
138
  error: {
89
139
  name: string;
90
140
  type: string;
@@ -99,6 +149,10 @@ export declare const SERVER_REQUEST: {
99
149
  name: string;
100
150
  duration: boolean;
101
151
  attrs: {
152
+ requestId: {
153
+ name: string;
154
+ type: string;
155
+ };
102
156
  error: {
103
157
  name: string;
104
158
  type: string;
@@ -108,14 +162,32 @@ export declare const SERVER_REQUEST: {
108
162
  SHUVI_SERVER_RENDER_TO_HTML: {
109
163
  name: string;
110
164
  duration: boolean;
165
+ attrs: {
166
+ requestId: {
167
+ name: string;
168
+ type: string;
169
+ };
170
+ };
111
171
  };
112
172
  SHUVI_SERVER_SEND_HTML_HOOK: {
113
173
  name: string;
114
174
  duration: boolean;
175
+ attrs: {
176
+ requestId: {
177
+ name: string;
178
+ type: string;
179
+ };
180
+ };
115
181
  };
116
182
  SHUVI_SERVER_SEND_HTML_ORIGINAL: {
117
183
  name: string;
118
184
  duration: boolean;
185
+ attrs: {
186
+ requestId: {
187
+ name: string;
188
+ type: string;
189
+ };
190
+ };
119
191
  };
120
192
  };
121
193
  };
@@ -197,6 +269,10 @@ export declare const CLIENT_RENDER: {
197
269
  name: string;
198
270
  duration: boolean;
199
271
  attrs: {
272
+ requestId: {
273
+ name: string;
274
+ type: string;
275
+ };
200
276
  error: {
201
277
  name: string;
202
278
  type: string;
@@ -1,4 +1,9 @@
1
+ const requestId = 'requestId';
1
2
  const runLoadersAttrs = {
3
+ requestId: {
4
+ name: requestId,
5
+ type: 'string'
6
+ },
2
7
  error: {
3
8
  name: 'error',
4
9
  type: 'boolean'
@@ -12,14 +17,32 @@ const runLoadersAttrs = {
12
17
  /** category SERVER_CREATE_APP */
13
18
  export const SERVER_CREATE_APP = {
14
19
  name: 'SERVER_CREATE_APP',
20
+ attrs: {
21
+ requestId: {
22
+ name: requestId,
23
+ type: 'string'
24
+ }
25
+ },
15
26
  events: {
16
27
  SHUVI_SERVER_CREATE_APP: {
17
28
  name: 'SHUVI_SERVER_CREATE_APP',
18
- duration: true
29
+ duration: true,
30
+ attrs: {
31
+ requestId: {
32
+ name: requestId,
33
+ type: 'string'
34
+ }
35
+ }
19
36
  },
20
37
  SHUVI_SERVER_APP_INIT: {
21
38
  name: 'SHUVI_SERVER_APP_INIT',
22
- duration: true
39
+ duration: true,
40
+ attrs: {
41
+ requestId: {
42
+ name: requestId,
43
+ type: 'string'
44
+ }
45
+ }
23
46
  },
24
47
  SHUVI_SERVER_RUN_LOADERS: {
25
48
  name: 'SHUVI_SERVER_RUN_LOADERS',
@@ -31,15 +54,31 @@ export const SERVER_CREATE_APP = {
31
54
  /** category SERVER_REQUEST */
32
55
  export const SERVER_REQUEST = {
33
56
  name: 'SERVER_REQUEST',
57
+ attrs: {
58
+ requestId: {
59
+ name: requestId,
60
+ type: 'string'
61
+ }
62
+ },
34
63
  events: {
35
64
  SHUVI_SERVER_HANDLE_REQUEST_START: {
36
65
  name: 'SHUVI_SERVER_HANDLE_REQUEST_START',
37
- duration: false
66
+ duration: false,
67
+ attrs: {
68
+ requestId: {
69
+ name: requestId,
70
+ type: 'string'
71
+ }
72
+ }
38
73
  },
39
74
  SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
40
75
  name: 'SHUVI_SERVER_RUN_ASSET_MIDDLEWARE',
41
76
  duration: true,
42
77
  attrs: {
78
+ requestId: {
79
+ name: requestId,
80
+ type: 'string'
81
+ },
43
82
  error: {
44
83
  name: 'error',
45
84
  type: 'boolean'
@@ -54,6 +93,10 @@ export const SERVER_REQUEST = {
54
93
  name: 'SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES',
55
94
  duration: true,
56
95
  attrs: {
96
+ requestId: {
97
+ name: requestId,
98
+ type: 'string'
99
+ },
57
100
  error: {
58
101
  name: 'error',
59
102
  type: 'boolean'
@@ -72,6 +115,10 @@ export const SERVER_REQUEST = {
72
115
  name: 'SHUVI_SERVER_RUN_API_MIDDLEWARE',
73
116
  duration: true,
74
117
  attrs: {
118
+ requestId: {
119
+ name: requestId,
120
+ type: 'string'
121
+ },
75
122
  error: {
76
123
  name: 'error',
77
124
  type: 'boolean'
@@ -86,6 +133,10 @@ export const SERVER_REQUEST = {
86
133
  name: 'SHUVI_SERVER_RUN_PAGE_MIDDLEWARE',
87
134
  duration: true,
88
135
  attrs: {
136
+ requestId: {
137
+ name: requestId,
138
+ type: 'string'
139
+ },
89
140
  error: {
90
141
  name: 'error',
91
142
  type: 'boolean'
@@ -100,6 +151,10 @@ export const SERVER_REQUEST = {
100
151
  name: 'SHUVI_SERVER_RENDER_TO_STRING',
101
152
  duration: true,
102
153
  attrs: {
154
+ requestId: {
155
+ name: requestId,
156
+ type: 'string'
157
+ },
103
158
  error: {
104
159
  name: 'error',
105
160
  type: 'boolean'
@@ -108,15 +163,33 @@ export const SERVER_REQUEST = {
108
163
  },
109
164
  SHUVI_SERVER_RENDER_TO_HTML: {
110
165
  name: 'SHUVI_SERVER_RENDER_TO_HTML',
111
- duration: true
166
+ duration: true,
167
+ attrs: {
168
+ requestId: {
169
+ name: requestId,
170
+ type: 'string'
171
+ }
172
+ }
112
173
  },
113
174
  SHUVI_SERVER_SEND_HTML_HOOK: {
114
175
  name: 'SHUVI_SERVER_SEND_HTML_HOOK',
115
- duration: true
176
+ duration: true,
177
+ attrs: {
178
+ requestId: {
179
+ name: requestId,
180
+ type: 'string'
181
+ }
182
+ }
116
183
  },
117
184
  SHUVI_SERVER_SEND_HTML_ORIGINAL: {
118
185
  name: 'SHUVI_SERVER_SEND_HTML_ORIGINAL',
119
- duration: true
186
+ duration: true,
187
+ attrs: {
188
+ requestId: {
189
+ name: requestId,
190
+ type: 'string'
191
+ }
192
+ }
120
193
  }
121
194
  }
122
195
  };
@@ -1,19 +1,41 @@
1
1
  /** category SERVER_CREATE_APP */
2
2
  export declare const SERVER_CREATE_APP: {
3
3
  name: string;
4
+ attrs: {
5
+ requestId: {
6
+ name: string;
7
+ type: string;
8
+ };
9
+ };
4
10
  events: {
5
11
  SHUVI_SERVER_CREATE_APP: {
6
12
  name: string;
7
13
  duration: boolean;
14
+ attrs: {
15
+ requestId: {
16
+ name: string;
17
+ type: string;
18
+ };
19
+ };
8
20
  };
9
21
  SHUVI_SERVER_APP_INIT: {
10
22
  name: string;
11
23
  duration: boolean;
24
+ attrs: {
25
+ requestId: {
26
+ name: string;
27
+ type: string;
28
+ };
29
+ };
12
30
  };
13
31
  SHUVI_SERVER_RUN_LOADERS: {
14
32
  name: string;
15
33
  duration: boolean;
16
34
  attrs: {
35
+ requestId: {
36
+ name: string;
37
+ type: string;
38
+ };
17
39
  error: {
18
40
  name: string;
19
41
  type: string;
@@ -30,15 +52,31 @@ export declare const SERVER_CREATE_APP: {
30
52
  /** category SERVER_REQUEST */
31
53
  export declare const SERVER_REQUEST: {
32
54
  name: string;
55
+ attrs: {
56
+ requestId: {
57
+ name: string;
58
+ type: string;
59
+ };
60
+ };
33
61
  events: {
34
62
  SHUVI_SERVER_HANDLE_REQUEST_START: {
35
63
  name: string;
36
64
  duration: boolean;
65
+ attrs: {
66
+ requestId: {
67
+ name: string;
68
+ type: string;
69
+ };
70
+ };
37
71
  };
38
72
  SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
39
73
  name: string;
40
74
  duration: boolean;
41
75
  attrs: {
76
+ requestId: {
77
+ name: string;
78
+ type: string;
79
+ };
42
80
  error: {
43
81
  name: string;
44
82
  type: string;
@@ -53,6 +91,10 @@ export declare const SERVER_REQUEST: {
53
91
  name: string;
54
92
  duration: boolean;
55
93
  attrs: {
94
+ requestId: {
95
+ name: string;
96
+ type: string;
97
+ };
56
98
  error: {
57
99
  name: string;
58
100
  type: string;
@@ -71,6 +113,10 @@ export declare const SERVER_REQUEST: {
71
113
  name: string;
72
114
  duration: boolean;
73
115
  attrs: {
116
+ requestId: {
117
+ name: string;
118
+ type: string;
119
+ };
74
120
  error: {
75
121
  name: string;
76
122
  type: string;
@@ -85,6 +131,10 @@ export declare const SERVER_REQUEST: {
85
131
  name: string;
86
132
  duration: boolean;
87
133
  attrs: {
134
+ requestId: {
135
+ name: string;
136
+ type: string;
137
+ };
88
138
  error: {
89
139
  name: string;
90
140
  type: string;
@@ -99,6 +149,10 @@ export declare const SERVER_REQUEST: {
99
149
  name: string;
100
150
  duration: boolean;
101
151
  attrs: {
152
+ requestId: {
153
+ name: string;
154
+ type: string;
155
+ };
102
156
  error: {
103
157
  name: string;
104
158
  type: string;
@@ -108,14 +162,32 @@ export declare const SERVER_REQUEST: {
108
162
  SHUVI_SERVER_RENDER_TO_HTML: {
109
163
  name: string;
110
164
  duration: boolean;
165
+ attrs: {
166
+ requestId: {
167
+ name: string;
168
+ type: string;
169
+ };
170
+ };
111
171
  };
112
172
  SHUVI_SERVER_SEND_HTML_HOOK: {
113
173
  name: string;
114
174
  duration: boolean;
175
+ attrs: {
176
+ requestId: {
177
+ name: string;
178
+ type: string;
179
+ };
180
+ };
115
181
  };
116
182
  SHUVI_SERVER_SEND_HTML_ORIGINAL: {
117
183
  name: string;
118
184
  duration: boolean;
185
+ attrs: {
186
+ requestId: {
187
+ name: string;
188
+ type: string;
189
+ };
190
+ };
119
191
  };
120
192
  };
121
193
  };
@@ -197,6 +269,10 @@ export declare const CLIENT_RENDER: {
197
269
  name: string;
198
270
  duration: boolean;
199
271
  attrs: {
272
+ requestId: {
273
+ name: string;
274
+ type: string;
275
+ };
200
276
  error: {
201
277
  name: string;
202
278
  type: string;
@@ -1,7 +1,12 @@
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: {
7
+ name: requestId,
8
+ type: 'string'
9
+ },
5
10
  error: {
6
11
  name: 'error',
7
12
  type: 'boolean'
@@ -15,14 +20,32 @@ const runLoadersAttrs = {
15
20
  /** category SERVER_CREATE_APP */
16
21
  exports.SERVER_CREATE_APP = {
17
22
  name: 'SERVER_CREATE_APP',
23
+ attrs: {
24
+ requestId: {
25
+ name: requestId,
26
+ type: 'string'
27
+ }
28
+ },
18
29
  events: {
19
30
  SHUVI_SERVER_CREATE_APP: {
20
31
  name: 'SHUVI_SERVER_CREATE_APP',
21
- duration: true
32
+ duration: true,
33
+ attrs: {
34
+ requestId: {
35
+ name: requestId,
36
+ type: 'string'
37
+ }
38
+ }
22
39
  },
23
40
  SHUVI_SERVER_APP_INIT: {
24
41
  name: 'SHUVI_SERVER_APP_INIT',
25
- duration: true
42
+ duration: true,
43
+ attrs: {
44
+ requestId: {
45
+ name: requestId,
46
+ type: 'string'
47
+ }
48
+ }
26
49
  },
27
50
  SHUVI_SERVER_RUN_LOADERS: {
28
51
  name: 'SHUVI_SERVER_RUN_LOADERS',
@@ -34,15 +57,31 @@ exports.SERVER_CREATE_APP = {
34
57
  /** category SERVER_REQUEST */
35
58
  exports.SERVER_REQUEST = {
36
59
  name: 'SERVER_REQUEST',
60
+ attrs: {
61
+ requestId: {
62
+ name: requestId,
63
+ type: 'string'
64
+ }
65
+ },
37
66
  events: {
38
67
  SHUVI_SERVER_HANDLE_REQUEST_START: {
39
68
  name: 'SHUVI_SERVER_HANDLE_REQUEST_START',
40
- duration: false
69
+ duration: false,
70
+ attrs: {
71
+ requestId: {
72
+ name: requestId,
73
+ type: 'string'
74
+ }
75
+ }
41
76
  },
42
77
  SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
43
78
  name: 'SHUVI_SERVER_RUN_ASSET_MIDDLEWARE',
44
79
  duration: true,
45
80
  attrs: {
81
+ requestId: {
82
+ name: requestId,
83
+ type: 'string'
84
+ },
46
85
  error: {
47
86
  name: 'error',
48
87
  type: 'boolean'
@@ -57,6 +96,10 @@ exports.SERVER_REQUEST = {
57
96
  name: 'SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES',
58
97
  duration: true,
59
98
  attrs: {
99
+ requestId: {
100
+ name: requestId,
101
+ type: 'string'
102
+ },
60
103
  error: {
61
104
  name: 'error',
62
105
  type: 'boolean'
@@ -75,6 +118,10 @@ exports.SERVER_REQUEST = {
75
118
  name: 'SHUVI_SERVER_RUN_API_MIDDLEWARE',
76
119
  duration: true,
77
120
  attrs: {
121
+ requestId: {
122
+ name: requestId,
123
+ type: 'string'
124
+ },
78
125
  error: {
79
126
  name: 'error',
80
127
  type: 'boolean'
@@ -89,6 +136,10 @@ exports.SERVER_REQUEST = {
89
136
  name: 'SHUVI_SERVER_RUN_PAGE_MIDDLEWARE',
90
137
  duration: true,
91
138
  attrs: {
139
+ requestId: {
140
+ name: requestId,
141
+ type: 'string'
142
+ },
92
143
  error: {
93
144
  name: 'error',
94
145
  type: 'boolean'
@@ -103,6 +154,10 @@ exports.SERVER_REQUEST = {
103
154
  name: 'SHUVI_SERVER_RENDER_TO_STRING',
104
155
  duration: true,
105
156
  attrs: {
157
+ requestId: {
158
+ name: requestId,
159
+ type: 'string'
160
+ },
106
161
  error: {
107
162
  name: 'error',
108
163
  type: 'boolean'
@@ -111,15 +166,33 @@ exports.SERVER_REQUEST = {
111
166
  },
112
167
  SHUVI_SERVER_RENDER_TO_HTML: {
113
168
  name: 'SHUVI_SERVER_RENDER_TO_HTML',
114
- duration: true
169
+ duration: true,
170
+ attrs: {
171
+ requestId: {
172
+ name: requestId,
173
+ type: 'string'
174
+ }
175
+ }
115
176
  },
116
177
  SHUVI_SERVER_SEND_HTML_HOOK: {
117
178
  name: 'SHUVI_SERVER_SEND_HTML_HOOK',
118
- duration: true
179
+ duration: true,
180
+ attrs: {
181
+ requestId: {
182
+ name: requestId,
183
+ type: 'string'
184
+ }
185
+ }
119
186
  },
120
187
  SHUVI_SERVER_SEND_HTML_ORIGINAL: {
121
188
  name: 'SHUVI_SERVER_SEND_HTML_ORIGINAL',
122
- duration: true
189
+ duration: true,
190
+ attrs: {
191
+ requestId: {
192
+ name: requestId,
193
+ type: 'string'
194
+ }
195
+ }
123
196
  }
124
197
  }
125
198
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/shared",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
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.33"
40
+ "@shuvi/hook": "1.0.35"
41
41
  }
42
42
  }