@shuvi/shared 1.0.32 → 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.
@@ -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,71 @@ 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
+ };
53
+ };
54
+ SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
55
+ name: string;
56
+ duration: boolean;
57
+ attrs: {
58
+ requestId: string;
59
+ error: {
60
+ name: string;
61
+ type: string;
62
+ };
63
+ statusCode: {
64
+ name: string;
65
+ type: string;
66
+ };
67
+ };
68
+ };
69
+ SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES: {
70
+ name: string;
71
+ duration: boolean;
72
+ attrs: {
73
+ requestId: string;
74
+ error: {
75
+ name: string;
76
+ type: string;
77
+ };
78
+ statusCode: {
79
+ name: string;
80
+ type: string;
81
+ };
82
+ headersSent: {
83
+ name: string;
84
+ type: string;
85
+ };
86
+ };
87
+ };
88
+ SHUVI_SERVER_RUN_API_MIDDLEWARE: {
89
+ name: string;
90
+ duration: boolean;
91
+ attrs: {
92
+ requestId: string;
93
+ error: {
94
+ name: string;
95
+ type: string;
96
+ };
97
+ statusCode: {
98
+ name: string;
99
+ type: string;
100
+ };
101
+ };
37
102
  };
38
103
  SHUVI_SERVER_RUN_PAGE_MIDDLEWARE: {
39
104
  name: string;
40
105
  duration: boolean;
41
106
  attrs: {
107
+ requestId: string;
42
108
  error: {
43
109
  name: string;
44
110
  type: string;
@@ -53,6 +119,7 @@ export declare const SERVER_REQUEST: {
53
119
  name: string;
54
120
  duration: boolean;
55
121
  attrs: {
122
+ requestId: string;
56
123
  error: {
57
124
  name: string;
58
125
  type: string;
@@ -62,14 +129,23 @@ export declare const SERVER_REQUEST: {
62
129
  SHUVI_SERVER_RENDER_TO_HTML: {
63
130
  name: string;
64
131
  duration: boolean;
132
+ attrs: {
133
+ requestId: string;
134
+ };
65
135
  };
66
136
  SHUVI_SERVER_SEND_HTML_HOOK: {
67
137
  name: string;
68
138
  duration: boolean;
139
+ attrs: {
140
+ requestId: string;
141
+ };
69
142
  };
70
143
  SHUVI_SERVER_SEND_HTML_ORIGINAL: {
71
144
  name: string;
72
145
  duration: boolean;
146
+ attrs: {
147
+ requestId: string;
148
+ };
73
149
  };
74
150
  };
75
151
  };
@@ -151,6 +227,7 @@ export declare const CLIENT_RENDER: {
151
227
  name: string;
152
228
  duration: boolean;
153
229
  attrs: {
230
+ requestId: string;
154
231
  error: {
155
232
  name: string;
156
233
  type: string;
@@ -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,71 @@ 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
+ }
55
+ },
56
+ SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
57
+ name: 'SHUVI_SERVER_RUN_ASSET_MIDDLEWARE',
58
+ duration: true,
59
+ attrs: {
60
+ [requestId]: 'string',
61
+ error: {
62
+ name: 'error',
63
+ type: 'boolean'
64
+ },
65
+ statusCode: {
66
+ name: 'statusCode',
67
+ type: 'number'
68
+ }
69
+ }
70
+ },
71
+ SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES: {
72
+ name: 'SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES',
73
+ duration: true,
74
+ attrs: {
75
+ [requestId]: 'string',
76
+ error: {
77
+ name: 'error',
78
+ type: 'boolean'
79
+ },
80
+ statusCode: {
81
+ name: 'statusCode',
82
+ type: 'number'
83
+ },
84
+ headersSent: {
85
+ name: 'headersSent',
86
+ type: 'boolean'
87
+ }
88
+ }
89
+ },
90
+ SHUVI_SERVER_RUN_API_MIDDLEWARE: {
91
+ name: 'SHUVI_SERVER_RUN_API_MIDDLEWARE',
92
+ duration: true,
93
+ attrs: {
94
+ [requestId]: 'string',
95
+ error: {
96
+ name: 'error',
97
+ type: 'boolean'
98
+ },
99
+ statusCode: {
100
+ name: 'statusCode',
101
+ type: 'number'
102
+ }
103
+ }
38
104
  },
39
105
  SHUVI_SERVER_RUN_PAGE_MIDDLEWARE: {
40
106
  name: 'SHUVI_SERVER_RUN_PAGE_MIDDLEWARE',
41
107
  duration: true,
42
108
  attrs: {
109
+ [requestId]: 'string',
43
110
  error: {
44
111
  name: 'error',
45
112
  type: 'boolean'
@@ -54,6 +121,7 @@ export const SERVER_REQUEST = {
54
121
  name: 'SHUVI_SERVER_RENDER_TO_STRING',
55
122
  duration: true,
56
123
  attrs: {
124
+ [requestId]: 'string',
57
125
  error: {
58
126
  name: 'error',
59
127
  type: 'boolean'
@@ -62,15 +130,24 @@ export const SERVER_REQUEST = {
62
130
  },
63
131
  SHUVI_SERVER_RENDER_TO_HTML: {
64
132
  name: 'SHUVI_SERVER_RENDER_TO_HTML',
65
- duration: true
133
+ duration: true,
134
+ attrs: {
135
+ [requestId]: 'string'
136
+ }
66
137
  },
67
138
  SHUVI_SERVER_SEND_HTML_HOOK: {
68
139
  name: 'SHUVI_SERVER_SEND_HTML_HOOK',
69
- duration: true
140
+ duration: true,
141
+ attrs: {
142
+ [requestId]: 'string'
143
+ }
70
144
  },
71
145
  SHUVI_SERVER_SEND_HTML_ORIGINAL: {
72
146
  name: 'SHUVI_SERVER_SEND_HTML_ORIGINAL',
73
- duration: true
147
+ duration: true,
148
+ attrs: {
149
+ [requestId]: 'string'
150
+ }
74
151
  }
75
152
  }
76
153
  };
@@ -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,71 @@ 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
+ };
53
+ };
54
+ SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
55
+ name: string;
56
+ duration: boolean;
57
+ attrs: {
58
+ requestId: string;
59
+ error: {
60
+ name: string;
61
+ type: string;
62
+ };
63
+ statusCode: {
64
+ name: string;
65
+ type: string;
66
+ };
67
+ };
68
+ };
69
+ SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES: {
70
+ name: string;
71
+ duration: boolean;
72
+ attrs: {
73
+ requestId: string;
74
+ error: {
75
+ name: string;
76
+ type: string;
77
+ };
78
+ statusCode: {
79
+ name: string;
80
+ type: string;
81
+ };
82
+ headersSent: {
83
+ name: string;
84
+ type: string;
85
+ };
86
+ };
87
+ };
88
+ SHUVI_SERVER_RUN_API_MIDDLEWARE: {
89
+ name: string;
90
+ duration: boolean;
91
+ attrs: {
92
+ requestId: string;
93
+ error: {
94
+ name: string;
95
+ type: string;
96
+ };
97
+ statusCode: {
98
+ name: string;
99
+ type: string;
100
+ };
101
+ };
37
102
  };
38
103
  SHUVI_SERVER_RUN_PAGE_MIDDLEWARE: {
39
104
  name: string;
40
105
  duration: boolean;
41
106
  attrs: {
107
+ requestId: string;
42
108
  error: {
43
109
  name: string;
44
110
  type: string;
@@ -53,6 +119,7 @@ export declare const SERVER_REQUEST: {
53
119
  name: string;
54
120
  duration: boolean;
55
121
  attrs: {
122
+ requestId: string;
56
123
  error: {
57
124
  name: string;
58
125
  type: string;
@@ -62,14 +129,23 @@ export declare const SERVER_REQUEST: {
62
129
  SHUVI_SERVER_RENDER_TO_HTML: {
63
130
  name: string;
64
131
  duration: boolean;
132
+ attrs: {
133
+ requestId: string;
134
+ };
65
135
  };
66
136
  SHUVI_SERVER_SEND_HTML_HOOK: {
67
137
  name: string;
68
138
  duration: boolean;
139
+ attrs: {
140
+ requestId: string;
141
+ };
69
142
  };
70
143
  SHUVI_SERVER_SEND_HTML_ORIGINAL: {
71
144
  name: string;
72
145
  duration: boolean;
146
+ attrs: {
147
+ requestId: string;
148
+ };
73
149
  };
74
150
  };
75
151
  };
@@ -151,6 +227,7 @@ export declare const CLIENT_RENDER: {
151
227
  name: string;
152
228
  duration: boolean;
153
229
  attrs: {
230
+ requestId: string;
154
231
  error: {
155
232
  name: string;
156
233
  type: string;
@@ -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,71 @@ 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
+ }
58
+ },
59
+ SHUVI_SERVER_RUN_ASSET_MIDDLEWARE: {
60
+ name: 'SHUVI_SERVER_RUN_ASSET_MIDDLEWARE',
61
+ duration: true,
62
+ attrs: {
63
+ [requestId]: 'string',
64
+ error: {
65
+ name: 'error',
66
+ type: 'boolean'
67
+ },
68
+ statusCode: {
69
+ name: 'statusCode',
70
+ type: 'number'
71
+ }
72
+ }
73
+ },
74
+ SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES: {
75
+ name: 'SHUVI_SERVER_RUN_MIDDLEWARE_ROUTES',
76
+ duration: true,
77
+ attrs: {
78
+ [requestId]: 'string',
79
+ error: {
80
+ name: 'error',
81
+ type: 'boolean'
82
+ },
83
+ statusCode: {
84
+ name: 'statusCode',
85
+ type: 'number'
86
+ },
87
+ headersSent: {
88
+ name: 'headersSent',
89
+ type: 'boolean'
90
+ }
91
+ }
92
+ },
93
+ SHUVI_SERVER_RUN_API_MIDDLEWARE: {
94
+ name: 'SHUVI_SERVER_RUN_API_MIDDLEWARE',
95
+ duration: true,
96
+ attrs: {
97
+ [requestId]: 'string',
98
+ error: {
99
+ name: 'error',
100
+ type: 'boolean'
101
+ },
102
+ statusCode: {
103
+ name: 'statusCode',
104
+ type: 'number'
105
+ }
106
+ }
41
107
  },
42
108
  SHUVI_SERVER_RUN_PAGE_MIDDLEWARE: {
43
109
  name: 'SHUVI_SERVER_RUN_PAGE_MIDDLEWARE',
44
110
  duration: true,
45
111
  attrs: {
112
+ [requestId]: 'string',
46
113
  error: {
47
114
  name: 'error',
48
115
  type: 'boolean'
@@ -57,6 +124,7 @@ exports.SERVER_REQUEST = {
57
124
  name: 'SHUVI_SERVER_RENDER_TO_STRING',
58
125
  duration: true,
59
126
  attrs: {
127
+ [requestId]: 'string',
60
128
  error: {
61
129
  name: 'error',
62
130
  type: 'boolean'
@@ -65,15 +133,24 @@ exports.SERVER_REQUEST = {
65
133
  },
66
134
  SHUVI_SERVER_RENDER_TO_HTML: {
67
135
  name: 'SHUVI_SERVER_RENDER_TO_HTML',
68
- duration: true
136
+ duration: true,
137
+ attrs: {
138
+ [requestId]: 'string'
139
+ }
69
140
  },
70
141
  SHUVI_SERVER_SEND_HTML_HOOK: {
71
142
  name: 'SHUVI_SERVER_SEND_HTML_HOOK',
72
- duration: true
143
+ duration: true,
144
+ attrs: {
145
+ [requestId]: 'string'
146
+ }
73
147
  },
74
148
  SHUVI_SERVER_SEND_HTML_ORIGINAL: {
75
149
  name: 'SHUVI_SERVER_SEND_HTML_ORIGINAL',
76
- duration: true
150
+ duration: true,
151
+ attrs: {
152
+ [requestId]: 'string'
153
+ }
77
154
  }
78
155
  }
79
156
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/shared",
3
- "version": "1.0.32",
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.32"
40
+ "@shuvi/hook": "1.0.34"
41
41
  }
42
42
  }