koatty_router 2.1.9 → 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.
File without changes
Binary file
@@ -0,0 +1,59 @@
1
+ {
2
+ "project": "koatty-router",
3
+ "created_at": "2026-03-08T00:00:00Z",
4
+ "updated_at": "2026-03-08T11:00:00Z",
5
+ "tasks": [
6
+ {
7
+ "id": "task-011",
8
+ "name": "修复测试文件 P1 严重问题",
9
+ "description": "修复 test/grpc-simple-test.test.ts 中的 P1 严重问题:\n1. 删除整个 \"Batch Processor\" describe 块(263-337行)\n2. 修复 config.bufferSize → config.streamBufferSize(399行)\n3. 删除 options.batchSize 断言(445行)\n4. 清理 afterEach 中 batchProcessor 残留清理代码(88-98行)",
10
+ "status": "completed",
11
+ "review_status": "pass",
12
+ "reviewer_notes": [],
13
+ "priority": "high",
14
+ "depends_on": [],
15
+ "assignee": null,
16
+ "created_at": "2026-03-08T00:00:00Z",
17
+ "updated_at": "2026-03-08T10:46:00Z",
18
+ "completed_at": "2026-03-08T10:46:00Z"
19
+ },
20
+ {
21
+ "id": "task-012",
22
+ "name": "修复 P2 中等问题",
23
+ "description": "修复 P2 中等问题:\n1. src/middleware/manager.ts:816 - createGroup() 调用 this.register() 未 await,异步错误被静默丢弃\n2. src/router/grpc.ts:71 - StreamManager 中 streamBufferSize 存入 this.config 但背压逻辑从未读取,字段完全孤立无作用",
24
+ "status": "completed",
25
+ "review_status": null,
26
+ "reviewer_notes": "[P2] src/middleware/manager.ts:80-87 — IRouterMiddlewareManager 接口未声明 createGroup() 方法,但实现类已将其改为 async createGroup(): Promise<void>;接口未同步更新导致通过接口类型调用时无法访问该方法,TypeScript 类型契约不一致;建议在接口中添加 createGroup(groupName: string, middlewareNames: string[]): Promise<void> 声明",
27
+ "priority": "medium",
28
+ "depends_on": [
29
+ "task-011"
30
+ ],
31
+ "assignee": null,
32
+ "created_at": "2026-03-08T00:00:00Z",
33
+ "updated_at": "2026-03-08T10:46:09.075968",
34
+ "completed_at": "2026-03-08T10:46:09.075973",
35
+ "audit_log": [
36
+ {
37
+ "from": "review_pending",
38
+ "to": "completed",
39
+ "actor": "reviewer",
40
+ "timestamp": "2026-03-08T10:46:09.075974"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "id": "task-013",
46
+ "name": "修复接口签名不一致问题",
47
+ "description": "在 IRouterMiddlewareManager 接口中添加 createGroup() 方法声明,使其与实现类签名一致:createGroup(groupName: string, middlewareNames: string[]): Promise<void>",
48
+ "status": "completed",
49
+ "review_status": "pass",
50
+ "reviewer_notes": [],
51
+ "priority": "medium",
52
+ "depends_on": ["task-012"],
53
+ "assignee": null,
54
+ "created_at": "2026-03-08T11:00:00Z",
55
+ "updated_at": "2026-03-08T11:05:00Z",
56
+ "completed_at": "2026-03-08T11:05:00Z"
57
+ }
58
+ ]
59
+ }
@@ -0,0 +1,45 @@
1
+ # Task Progress
2
+
3
+ ## task-012: 修复 P2 中等问题
4
+ Status: review_pending
5
+ Date: 2026-03-08
6
+
7
+ ### Changes Made:
8
+ 1. 修复 src/middleware/manager.ts:816 - 将 createGroup() 改为 async 方法,await register() 调用以正确处理异步错误
9
+ 2. 修复 src/router/grpc.ts:71 - 移除未使用的 streamBufferSize 配置项(从 StreamConfig 接口和 StreamManager 构造函数中删除)
10
+ 3. 修复 src/router/grpc.ts:314,384,469 - 移除未使用的 streamState 变量赋值(P3 问题)
11
+ 4. 更新测试文件 test/grpc_stream.test.ts 和 test/grpc-simple-test.test.ts - 移除对已删除 streamBufferSize 的检查
12
+
13
+ ### Issues Resolved:
14
+ - [P2] createGroup() 未 await register(),异步错误被静默丢弃
15
+ - [P2] streamBufferSize 配置项存入 this.config 但从未在背压逻辑中使用,字段完全孤立
16
+ - [P3] streamState 变量在三处被赋值但从未使用
17
+
18
+ ### Test Result:
19
+ - All 36 gRPC tests passed
20
+ - Lint passed with 0 errors (23 warnings only)
21
+
22
+ ### Files Modified:
23
+ - src/middleware/manager.ts
24
+ - src/router/grpc.ts
25
+ - src/router/types.ts
26
+ - test/grpc_stream.test.ts
27
+ - test/grpc-simple-test.test.ts
28
+
29
+ ## task-011: 修复测试文件 P1 严重问题
30
+ Status: review_pending
31
+ Date: 2026-03-08
32
+
33
+ ### Changes Made:
34
+ 1. 删除 "Batch Processor" describe 块(原263-337行)
35
+ 2. 修复 config.bufferSize → config.streamBufferSize(原322行和328行)
36
+ 3. 删除 options.batchSize 断言(原369行)
37
+ 4. 清理 afterEach 中 batchProcessor 残留清理代码(原88-98行)
38
+ 5. 删除 "should handle batch processor edge cases" 测试(因 batchProcessor 已不存在)
39
+
40
+ ### Test Result:
41
+ - All 20 tests passed
42
+ - Test file: test/grpc-simple-test.test.ts
43
+
44
+ ### Files Modified:
45
+ - test/grpc-simple-test.test.ts
@@ -1,10 +1,10 @@
1
1
 
2
2
  
3
- > koatty_router@2.1.9 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.9 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 141.83 KB
19
- ESM dist/index.mjs.map 376.26 KB
20
- ESM ⚡️ Build success in 656ms
21
- CJS dist/index.js 147.84 KB
22
- CJS dist/index.js.map 376.58 KB
23
- CJS ⚡️ Build success in 657ms
24
-
25
- > koatty_router@2.1.9 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...
@@ -38,9 +38,171 @@
38
38
  ✓ koatty_proto type declarations ready
39
39
  ✓ koatty_validation type declarations ready
40
40
 
41
- ✅ All dependencies ready (waited 2ms)
41
+ ✅ All dependencies ready (waited 1ms)
42
42
  📝 Running TypeScript compiler...
43
- ⠙⠙📦 Running API Extractor...
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...
44
206
  ⠙
45
207
  api-extractor 7.55.2  - https://api-extractor.com/
46
208
  
@@ -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
@@ -123,7 +279,7 @@ Analysis will use the bundled TypeScript version 5.8.2
123
279
  Warning: src/router/router.ts:54:66 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
124
280
  Warning: src/router/router.ts:54:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
125
281
  Warning: src/router/router.ts:55:62 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
126
- Warning: src/router/router.ts:55:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
282
+ Warning: src/router/router.ts:55:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
127
283
  Warning: src/router/router.ts:89:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
128
284
  Warning: src/router/router.ts:90:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
129
285
  Warning: src/router/router.ts:91:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
@@ -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.9 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.9 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,51 @@
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
+
38
+ ## 2.1.10
39
+
40
+ ### Patch Changes
41
+
42
+ - build
43
+ - Updated dependencies
44
+ - koatty_container@2.0.8
45
+ - koatty_core@2.1.9
46
+ - koatty_exception@2.1.9
47
+ - koatty_validation@2.0.8
48
+
3
49
  ## 2.1.9
4
50
 
5
51
  ### Patch Changes
@@ -278,12 +324,10 @@ This is a major release focusing on **performance**, **memory efficiency**, and
278
324
  **If upgrading from v1.20.0-8 or earlier:**
279
325
 
280
326
  1. **Validator Compilation**: Ensure all validation rules are compatible with pre-compilation
281
-
282
327
  - Custom validation functions must be pure functions
283
328
  - All `ValidRules` references must exist in `FunctionValidator`
284
329
 
285
330
  2. **Error Handling**: Applications will now fail at startup (not runtime) if validators cannot compile
286
-
287
331
  - Check application startup logs for compilation errors
288
332
  - Fix any custom validators that throw during compilation
289
333