koatty_router 2.1.10 → 2.2.0

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,10 +1,10 @@
1
1
 
2
2
  
3
- > koatty_router@2.1.10 build /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
3
+ > koatty_router@2.2.0 build /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
4
4
  > pnpm run build:js && pnpm run build:dts && pnpm run build:doc && pnpm run build:cp
5
5
 
6
6
 
7
- > koatty_router@2.1.10 build:js /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
7
+ > koatty_router@2.2.0 build:js /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
8
8
  > tsup
9
9
 
10
10
  CLI Building entry: src/index.ts
@@ -15,14 +15,14 @@
15
15
  CLI Cleaning output folder
16
16
  CJS Build start
17
17
  ESM Build start
18
- ESM dist/index.mjs 136.77 KB
19
- ESM dist/index.mjs.map 363.60 KB
20
- ESM ⚡️ Build success in 498ms
21
- CJS dist/index.js 142.64 KB
22
- CJS dist/index.js.map 363.90 KB
23
- CJS ⚡️ Build success in 498ms
24
-
25
- > koatty_router@2.1.10 build:dts /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
18
+ CJS dist/index.js 141.41 KB
19
+ CJS dist/index.js.map 361.31 KB
20
+ CJS ⚡️ Build success in 534ms
21
+ ESM dist/index.mjs 135.65 KB
22
+ ESM dist/index.mjs.map 361.02 KB
23
+ ESM ⚡️ Build success in 533ms
24
+
25
+ > koatty_router@2.2.0 build:dts /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
26
26
  > bash ../../scripts/build-dts.sh
27
27
 
28
28
  🔨 Building type declarations for koatty-router...
@@ -40,8 +40,170 @@
40
40
 
41
41
  ✅ All dependencies ready (waited 1ms)
42
42
  📝 Running TypeScript compiler...
43
- ⠙⠙📦 Running API Extractor...
44
- 
43
+ ⠙src/router/factory.ts:61:37 - error TS2345: Argument of type 'typeof HttpRouter' is not assignable to parameter of type 'RouterConstructor'.
44
+ Types of construct signatures are incompatible.
45
+ Type 'new (app: Koatty, options?: RouterOptions) => HttpRouter' is not assignable to type 'new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter'.
46
+ Construct signature return types 'HttpRouter' and 'KoattyRouter' are incompatible.
47
+ The types of 'options' are incompatible between these types.
48
+ Type 'RouterOptions' is not assignable to type 'Record<string, unknown>'.
49
+ Index signature for type 'string' is missing in type 'RouterOptions'.
50
+
51
+ 61 this.routerRegistry.set('http', HttpRouter);
52
+    ~~~~~~~~~~
53
+
54
+ src/router/factory.ts:62:38 - error TS2345: Argument of type 'typeof HttpRouter' is not assignable to parameter of type 'RouterConstructor'.
55
+ Types of construct signatures are incompatible.
56
+ Type 'new (app: Koatty, options?: RouterOptions) => HttpRouter' is not assignable to type 'new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter'.
57
+ Construct signature return types 'HttpRouter' and 'KoattyRouter' are incompatible.
58
+ The types of 'options' are incompatible between these types.
59
+ Type 'RouterOptions' is not assignable to type 'Record<string, unknown>'.
60
+ Index signature for type 'string' is missing in type 'RouterOptions'.
61
+
62
+ 62 this.routerRegistry.set('https', HttpRouter);
63
+    ~~~~~~~~~~
64
+
65
+ src/router/factory.ts:63:38 - error TS2345: Argument of type 'typeof HttpRouter' is not assignable to parameter of type 'RouterConstructor'.
66
+ Types of construct signatures are incompatible.
67
+ Type 'new (app: Koatty, options?: RouterOptions) => HttpRouter' is not assignable to type 'new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter'.
68
+ Construct signature return types 'HttpRouter' and 'KoattyRouter' are incompatible.
69
+ The types of 'options' are incompatible between these types.
70
+ Type 'RouterOptions' is not assignable to type 'Record<string, unknown>'.
71
+ Index signature for type 'string' is missing in type 'RouterOptions'.
72
+
73
+ 63 this.routerRegistry.set('http2', HttpRouter);
74
+    ~~~~~~~~~~
75
+
76
+ src/router/factory.ts:64:38 - error TS2345: Argument of type 'typeof HttpRouter' is not assignable to parameter of type 'RouterConstructor'.
77
+ Types of construct signatures are incompatible.
78
+ Type 'new (app: Koatty, options?: RouterOptions) => HttpRouter' is not assignable to type 'new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter'.
79
+ Construct signature return types 'HttpRouter' and 'KoattyRouter' are incompatible.
80
+ The types of 'options' are incompatible between these types.
81
+ Type 'RouterOptions' is not assignable to type 'Record<string, unknown>'.
82
+ Index signature for type 'string' is missing in type 'RouterOptions'.
83
+
84
+ 64 this.routerRegistry.set('http3', HttpRouter);
85
+    ~~~~~~~~~~
86
+
87
+ src/router/factory.ts:65:35 - error TS2345: Argument of type 'typeof WebsocketRouter' is not assignable to parameter of type 'RouterConstructor'.
88
+ Types of construct signatures are incompatible.
89
+ Type 'new (app: Koatty, options?: RouterOptions) => WebsocketRouter' is not assignable to type 'new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter'.
90
+ Construct signature return types 'WebsocketRouter' and 'KoattyRouter' are incompatible.
91
+ The types of 'options' are incompatible between these types.
92
+ Type 'WebsocketRouterOptions' is not assignable to type 'Record<string, unknown>'.
93
+ Index signature for type 'string' is missing in type 'WebsocketRouterOptions'.
94
+
95
+ 65 this.routerRegistry.set('ws', WebsocketRouter);
96
+    ~~~~~~~~~~~~~~~
97
+
98
+ src/router/factory.ts:66:36 - error TS2345: Argument of type 'typeof WebsocketRouter' is not assignable to parameter of type 'RouterConstructor'.
99
+ Types of construct signatures are incompatible.
100
+ Type 'new (app: Koatty, options?: RouterOptions) => WebsocketRouter' is not assignable to type 'new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter'.
101
+ Construct signature return types 'WebsocketRouter' and 'KoattyRouter' are incompatible.
102
+ The types of 'options' are incompatible between these types.
103
+ Type 'WebsocketRouterOptions' is not assignable to type 'Record<string, unknown>'.
104
+ Index signature for type 'string' is missing in type 'WebsocketRouterOptions'.
105
+
106
+ 66 this.routerRegistry.set('wss', WebsocketRouter);
107
+    ~~~~~~~~~~~~~~~
108
+
109
+ src/router/factory.ts:67:37 - error TS2345: Argument of type 'typeof GrpcRouter' is not assignable to parameter of type 'RouterConstructor'.
110
+ Types of construct signatures are incompatible.
111
+ Type 'new (app: Koatty, options?: RouterOptions) => GrpcRouter' is not assignable to type 'new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter'.
112
+ Construct signature return types 'GrpcRouter' and 'KoattyRouter' are incompatible.
113
+ The types of 'options' are incompatible between these types.
114
+ Type 'GrpcRouterOptions' is not assignable to type 'Record<string, unknown>'.
115
+ Index signature for type 'string' is missing in type 'GrpcRouterOptions'.
116
+
117
+ 67 this.routerRegistry.set('grpc', GrpcRouter);
118
+    ~~~~~~~~~~
119
+
120
+ src/router/factory.ts:68:40 - error TS2345: Argument of type 'typeof GraphQLRouter' is not assignable to parameter of type 'RouterConstructor'.
121
+ Types of construct signatures are incompatible.
122
+ Type 'new (app: Koatty, options?: RouterOptions) => GraphQLRouter' is not assignable to type 'new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter'.
123
+ Construct signature return types 'GraphQLRouter' and 'KoattyRouter' are incompatible.
124
+ The types of 'options' are incompatible between these types.
125
+ Type 'GraphQLRouterOptions' is not assignable to type 'Record<string, unknown>'.
126
+ Index signature for type 'string' is missing in type 'GraphQLRouterOptions'.
127
+
128
+ 68 this.routerRegistry.set('graphql', GraphQLRouter);
129
+    ~~~~~~~~~~~~~
130
+
131
+ src/router/graphql.ts:39:3 - error TS2416: Property 'options' in type 'GraphQLRouter' is not assignable to the same property in base type 'KoattyRouter'.
132
+ Type 'GraphQLRouterOptions' is not assignable to type 'Record<string, unknown>'.
133
+ Index signature for type 'string' is missing in type 'GraphQLRouterOptions'.
134
+
135
+ 39 options: GraphQLRouterOptions;
136
+    ~~~~~~~
137
+
138
+ src/router/graphql.ts:129:19 - error TS2339: Property 'extensions' does not exist on type 'Readonly<Error | GraphQLError>'.
139
+ Property 'extensions' does not exist on type 'Readonly<Error>'.
140
+
141
+ 129 if (error.extensions) {
142
+    ~~~~~~~~~~
143
+
144
+ src/router/graphql.ts:130:40 - error TS2339: Property 'extensions' does not exist on type 'Readonly<Error | GraphQLError>'.
145
+ Property 'extensions' does not exist on type 'Readonly<Error>'.
146
+
147
+ 130 formatted.extensions = error.extensions;
148
+    ~~~~~~~~~~
149
+
150
+ src/router/graphql.ts:132:19 - error TS2339: Property 'locations' does not exist on type 'Readonly<Error | GraphQLError>'.
151
+ Property 'locations' does not exist on type 'Readonly<Error>'.
152
+
153
+ 132 if (error.locations) {
154
+    ~~~~~~~~~
155
+
156
+ src/router/graphql.ts:133:39 - error TS2339: Property 'locations' does not exist on type 'Readonly<Error | GraphQLError>'.
157
+ Property 'locations' does not exist on type 'Readonly<Error>'.
158
+
159
+ 133 formatted.locations = error.locations;
160
+    ~~~~~~~~~
161
+
162
+ src/router/graphql.ts:135:19 - error TS2339: Property 'path' does not exist on type 'Readonly<Error | GraphQLError>'.
163
+ Property 'path' does not exist on type 'Readonly<Error>'.
164
+
165
+ 135 if (error.path) {
166
+    ~~~~
167
+
168
+ src/router/graphql.ts:136:34 - error TS2339: Property 'path' does not exist on type 'Readonly<Error | GraphQLError>'.
169
+ Property 'path' does not exist on type 'Readonly<Error>'.
170
+
171
+ 136 formatted.path = error.path;
172
+    ~~~~
173
+
174
+ src/router/grpc.ts:184:3 - error TS2416: Property 'options' in type 'GrpcRouter' is not assignable to the same property in base type 'KoattyRouter'.
175
+ Type 'GrpcRouterOptions' is not assignable to type 'Record<string, unknown>'.
176
+ Index signature for type 'string' is missing in type 'GrpcRouterOptions'.
177
+
178
+ 184 options: GrpcRouterOptions;
179
+    ~~~~~~~
180
+
181
+ src/router/http.ts:28:3 - error TS2416: Property 'options' in type 'HttpRouter' is not assignable to the same property in base type 'KoattyRouter'.
182
+ Type 'RouterOptions' is not assignable to type 'Record<string, unknown>'.
183
+ Index signature for type 'string' is missing in type 'RouterOptions'.
184
+
185
+ 28 options: RouterOptions;
186
+    ~~~~~~~
187
+
188
+ src/router/ws.ts:55:3 - error TS2416: Property 'options' in type 'WebsocketRouter' is not assignable to the same property in base type 'KoattyRouter'.
189
+ Type 'WebsocketRouterOptions' is not assignable to type 'Record<string, unknown>'.
190
+ Index signature for type 'string' is missing in type 'WebsocketRouterOptions'.
191
+
192
+ 55 options: WebsocketRouterOptions;
193
+    ~~~~~~~
194
+
195
+
196
+ Found 18 errors in 5 files.
197
+
198
+ Errors Files
199
+ 8 src/router/factory.ts:61
200
+ 7 src/router/graphql.ts:39
201
+ 1 src/router/grpc.ts:184
202
+ 1 src/router/http.ts:28
203
+ 1 src/router/ws.ts:55
204
+ ⠙⚠️ TypeScript compilation had errors, but continuing...
205
+ 📦 Running API Extractor...
206
+ ⠙
45
207
  api-extractor 7.55.2  - https://api-extractor.com/
46
208
  
47
209
  Using configuration from ./api-extractor.json
@@ -84,37 +246,31 @@ Analysis will use the bundled TypeScript version 5.8.2
84
246
  Warning: src/params/params.ts:80:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
85
247
  Warning: src/params/params.ts:81:17 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
86
248
  Warning: src/params/params.ts:81:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
87
- Warning: src/params/params.ts:101:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
88
- Warning: src/params/params.ts:102:20 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
89
- Warning: src/params/params.ts:102:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
90
- Warning: src/params/params.ts:103:17 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
91
- Warning: src/params/params.ts:103:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
92
- Warning: src/params/params.ts:124:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
93
- Warning: src/params/params.ts:125:28 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
94
- Warning: src/params/params.ts:125:41 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
95
- Warning: src/params/params.ts:125:42 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
96
- Warning: src/params/params.ts:125:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
97
- Warning: src/params/params.ts:125:24 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
98
- Warning: src/params/params.ts:125:37 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
99
- Warning: src/params/params.ts:136:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestBody" is not defined in this configuration
100
- Warning: src/params/params.ts:137:13 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
101
- Warning: src/params/params.ts:137:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
102
- Warning: src/params/params.ts:137:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name
103
- Warning: src/params/params.ts:137:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
104
- Warning: src/params/params.ts:138:14 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
105
- Warning: src/params/params.ts:138:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
106
- Warning: src/params/params.ts:138:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration
107
- Warning: src/params/params.ts:146:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
108
- Warning: src/params/params.ts:147:32 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
109
- Warning: src/params/params.ts:147:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
110
- Warning: src/params/params.ts:158:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestParam" is not defined in this configuration
111
- Warning: src/params/params.ts:159:13 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
112
- Warning: src/params/params.ts:159:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
113
- Warning: src/params/params.ts:159:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name
114
- Warning: src/params/params.ts:159:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
115
- Warning: src/params/params.ts:160:14 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
116
- Warning: src/params/params.ts:160:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
117
- Warning: src/params/params.ts:160:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration
249
+ Warning: src/params/params.ts:107:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
250
+ Warning: src/params/params.ts:108:20 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
251
+ Warning: src/params/params.ts:108:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
252
+ Warning: src/params/params.ts:109:17 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
253
+ Warning: src/params/params.ts:109:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
254
+ Warning: src/params/params.ts:131:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
255
+ Warning: src/params/params.ts:143:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestBody" is not defined in this configuration
256
+ Warning: src/params/params.ts:144:13 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
257
+ Warning: src/params/params.ts:144:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
258
+ Warning: src/params/params.ts:144:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name
259
+ Warning: src/params/params.ts:144:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
260
+ Warning: src/params/params.ts:145:14 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
261
+ Warning: src/params/params.ts:145:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
262
+ Warning: src/params/params.ts:145:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration
263
+ Warning: src/params/params.ts:153:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
264
+ Warning: src/params/params.ts:154:32 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
265
+ Warning: src/params/params.ts:154:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
266
+ Warning: src/params/params.ts:165:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestParam" is not defined in this configuration
267
+ Warning: src/params/params.ts:166:13 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
268
+ Warning: src/params/params.ts:166:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
269
+ Warning: src/params/params.ts:166:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name
270
+ Warning: src/params/params.ts:166:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
271
+ Warning: src/params/params.ts:167:14 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
272
+ Warning: src/params/params.ts:167:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
273
+ Warning: src/params/params.ts:167:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration
118
274
  Warning: src/router/router.ts:20:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
119
275
  Warning: src/router/router.ts:21:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration
120
276
  Warning: src/router/router.ts:48:3 - (ae-forgotten-export) The symbol "PayloadOptions" needs to be exported by the entry point index.d.ts
@@ -137,7 +293,7 @@ Analysis will use the bundled TypeScript version 5.8.2
137
293
  API Extractor completed successfully
138
294
  ⠙✅ Type declarations built successfully
139
295
 
140
- > koatty_router@2.1.10 build:doc /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
296
+ > koatty_router@2.2.0 build:doc /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
141
297
  > api-documenter markdown --input temp --output docs/api
142
298
 
143
299
 
@@ -180,7 +336,7 @@ Unsupported block tag: @interface
180
336
  Unsupported block tag: @RequestBody
181
337
  Unsupported block tag: @RequestParam
182
338
 
183
- > koatty_router@2.1.10 build:cp /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
339
+ > koatty_router@2.2.0 build:cp /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
184
340
  > node ../../scripts/postBuild.js
185
341
 
186
342
  📦 postBuild: koatty-router
@@ -0,0 +1,4 @@
1
+
2
+ > koatty_router@2.1.11 clean /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
3
+ > rimraf dist temp docs/api
4
+
@@ -0,0 +1,77 @@
1
+
2
+ > koatty_router@2.1.10 test /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
3
+ > pnpm run lint && jest --passWithNoTests
4
+
5
+
6
+ > koatty_router@2.1.10 lint /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
7
+ > eslint --ext .ts,.js ./src
8
+
9
+
10
+ /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/src/middleware/manager.ts
11
+ 28:36 warning The `Function` type accepts any function-like value.
12
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
13
+ 264:41 warning The `Function` type accepts any function-like value.
14
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
15
+
16
+ /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/src/params/mapping.ts
17
+ 23:15 warning The `Function` type accepts any function-like value.
18
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
19
+ 41:16 warning The `Function` type accepts any function-like value.
20
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
21
+ 77:18 warning The `Function` type accepts any function-like value.
22
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
23
+ 205:15 warning The `Function` type accepts any function-like value.
24
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
25
+
26
+ /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/src/router/grpc.ts
27
+ 175:10 warning The `Function` type accepts any function-like value.
28
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
29
+ 178:26 warning The `Function` type accepts any function-like value.
30
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
31
+
32
+ /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/src/router/ws.ts
33
+ 290:66 warning The `Function` type accepts any function-like value.
34
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
35
+ 290:149 warning The `Function` type accepts any function-like value.
36
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
37
+
38
+ /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/src/utils/handler.ts
39
+ 39:91 warning The `Function` type accepts any function-like value.
40
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
41
+
42
+ /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/src/utils/inject.ts
43
+ 140:24 warning The `Function` type accepts any function-like value.
44
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
45
+ 227:47 warning The `Function` type accepts any function-like value.
46
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
47
+ 235:49 warning The `Function` type accepts any function-like value.
48
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
49
+ 280:37 warning The `Function` type accepts any function-like value.
50
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
51
+ 356:31 warning The `Function` type accepts any function-like value.
52
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
53
+ 390:9 warning The `Function` type accepts any function-like value.
54
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
55
+ 396:16 warning The `Function` type accepts any function-like value.
56
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
57
+ 613:7 warning The `Function` type accepts any function-like value.
58
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
59
+ 873:9 warning The `Function` type accepts any function-like value.
60
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
61
+ 883:18 warning The `Function` type accepts any function-like value.
62
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
63
+
64
+ /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/src/utils/param-extractors.ts
65
+ 89:34 warning The `Function` type accepts any function-like value.
66
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
67
+
68
+ /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/src/utils/strategy-extractor.ts
69
+ 161:14 warning The `Function` type accepts any function-like value.
70
+ Prefer explicitly defining any function parameters and return type @typescript-eslint/no-unsafe-function-type
71
+ 767:13 error 'rawValue' is never reassigned. Use 'const' instead prefer-const
72
+
73
+ ✖ 24 problems (1 error, 23 warnings)
74
+ 1 error and 0 warnings potentially fixable with the `--fix` option.
75
+
76
+  ELIFECYCLE  Command failed with exit code 1.
77
+  ELIFECYCLE  Test failed. See above for more details.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - build
8
+ - build
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+ - Updated dependencies
14
+ - koatty_exception@2.2.0
15
+ - koatty_core@2.2.0
16
+ - koatty_container@3.0.0
17
+ - koatty_graphql@2.0.0
18
+ - koatty_lib@1.5.0
19
+ - koatty_logger@3.0.0
20
+ - koatty_proto@2.0.0
21
+ - koatty_validation@3.0.0
22
+
23
+ ## 2.1.11
24
+
25
+ ### Patch Changes
26
+
27
+ - build
28
+ - Updated dependencies
29
+ - koatty_exception@2.1.10
30
+ - koatty_core@2.1.10
31
+ - koatty_container@2.0.10
32
+ - koatty_graphql@1.1.10
33
+ - koatty_lib@1.4.10
34
+ - koatty_logger@2.8.6
35
+ - koatty_proto@1.3.10
36
+ - koatty_validation@2.0.8
37
+
3
38
  ## 2.1.10
4
39
 
5
40
  ### Patch Changes
@@ -289,12 +324,10 @@ This is a major release focusing on **performance**, **memory efficiency**, and
289
324
  **If upgrading from v1.20.0-8 or earlier:**
290
325
 
291
326
  1. **Validator Compilation**: Ensure all validation rules are compatible with pre-compilation
292
-
293
327
  - Custom validation functions must be pure functions
294
328
  - All `ValidRules` references must exist in `FunctionValidator`
295
329
 
296
330
  2. **Error Handling**: Applications will now fail at startup (not runtime) if validators cannot compile
297
-
298
331
  - Check application startup logs for compilation errors
299
332
  - Fix any custom validators that throw during compilation
300
333
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2026-03-08 12:45:14
3
+ * @Date: 2026-04-24 16:20:40
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -315,10 +315,11 @@ export declare function RegisterMiddleware(app: Application, config: Omit<Middle
315
315
  export declare function RegisterRouter(protocol: string): <T extends RouterConstructor>(target: T) => T;
316
316
 
317
317
  /**
318
- * Get parsed body(form variable and file object).
318
+ * Get parsed request body as a flat object.
319
+ * For multipart requests, use FILE_KEY symbol from payload/interface to access uploaded files.
319
320
  *
320
321
  * @export
321
- * @returns ex: {body: {...}, file: {...}}
322
+ * @returns Flat body object. Files (if any) accessible via body[FILE_KEY].
322
323
  */
323
324
  export declare function RequestBody(): ParameterDecorator;
324
325