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.
- package/.opencode/.evolution_mode_active +0 -0
- package/.opencode/.knowledge-context.md +0 -0
- package/.opencode/feature_list.json +59 -0
- package/.opencode/progress.txt +45 -0
- package/.turbo/turbo-build.log +202 -46
- package/.turbo/turbo-clean.log +4 -0
- package/.turbo/turbo-test.log +77 -0
- package/CHANGELOG.md +46 -2
- package/dist/index.d.ts +8 -12
- package/dist/index.js +207 -476
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +210 -479
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +9 -9
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -0
|
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
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> koatty_router@2.
|
|
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.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
[34mCLI[39m Cleaning output folder
|
|
16
16
|
[34mCJS[39m Build start
|
|
17
17
|
[34mESM[39m Build start
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
|
|
25
|
-
> koatty_router@2.
|
|
18
|
+
[32mCJS[39m [1mdist/index.js [22m[32m141.41 KB[39m
|
|
19
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m361.31 KB[39m
|
|
20
|
+
[32mCJS[39m ⚡️ Build success in 534ms
|
|
21
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m135.65 KB[39m
|
|
22
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m361.02 KB[39m
|
|
23
|
+
[32mESM[39m ⚡️ 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
|
|
41
|
+
✅ All dependencies ready (waited 1ms)
|
|
42
42
|
📝 Running TypeScript compiler...
|
|
43
|
-
[1G[0K⠙[1G[0K[
|
|
43
|
+
[1G[0K⠙[1G[0K[96msrc/router/factory.ts[0m:[93m61[0m:[93m37[0m - [91merror[0m[90m TS2345: [0mArgument 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
|
+
[7m61[0m this.routerRegistry.set('http', HttpRouter);
|
|
52
|
+
[7m [0m [91m ~~~~~~~~~~[0m
|
|
53
|
+
|
|
54
|
+
[96msrc/router/factory.ts[0m:[93m62[0m:[93m38[0m - [91merror[0m[90m TS2345: [0mArgument 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
|
+
[7m62[0m this.routerRegistry.set('https', HttpRouter);
|
|
63
|
+
[7m [0m [91m ~~~~~~~~~~[0m
|
|
64
|
+
|
|
65
|
+
[96msrc/router/factory.ts[0m:[93m63[0m:[93m38[0m - [91merror[0m[90m TS2345: [0mArgument 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
|
+
[7m63[0m this.routerRegistry.set('http2', HttpRouter);
|
|
74
|
+
[7m [0m [91m ~~~~~~~~~~[0m
|
|
75
|
+
|
|
76
|
+
[96msrc/router/factory.ts[0m:[93m64[0m:[93m38[0m - [91merror[0m[90m TS2345: [0mArgument 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
|
+
[7m64[0m this.routerRegistry.set('http3', HttpRouter);
|
|
85
|
+
[7m [0m [91m ~~~~~~~~~~[0m
|
|
86
|
+
|
|
87
|
+
[96msrc/router/factory.ts[0m:[93m65[0m:[93m35[0m - [91merror[0m[90m TS2345: [0mArgument 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
|
+
[7m65[0m this.routerRegistry.set('ws', WebsocketRouter);
|
|
96
|
+
[7m [0m [91m ~~~~~~~~~~~~~~~[0m
|
|
97
|
+
|
|
98
|
+
[96msrc/router/factory.ts[0m:[93m66[0m:[93m36[0m - [91merror[0m[90m TS2345: [0mArgument 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
|
+
[7m66[0m this.routerRegistry.set('wss', WebsocketRouter);
|
|
107
|
+
[7m [0m [91m ~~~~~~~~~~~~~~~[0m
|
|
108
|
+
|
|
109
|
+
[96msrc/router/factory.ts[0m:[93m67[0m:[93m37[0m - [91merror[0m[90m TS2345: [0mArgument 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
|
+
[7m67[0m this.routerRegistry.set('grpc', GrpcRouter);
|
|
118
|
+
[7m [0m [91m ~~~~~~~~~~[0m
|
|
119
|
+
|
|
120
|
+
[96msrc/router/factory.ts[0m:[93m68[0m:[93m40[0m - [91merror[0m[90m TS2345: [0mArgument 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
|
+
[7m68[0m this.routerRegistry.set('graphql', GraphQLRouter);
|
|
129
|
+
[7m [0m [91m ~~~~~~~~~~~~~[0m
|
|
130
|
+
|
|
131
|
+
[96msrc/router/graphql.ts[0m:[93m39[0m:[93m3[0m - [91merror[0m[90m TS2416: [0mProperty '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
|
+
[7m39[0m options: GraphQLRouterOptions;
|
|
136
|
+
[7m [0m [91m ~~~~~~~[0m
|
|
137
|
+
|
|
138
|
+
[96msrc/router/graphql.ts[0m:[93m129[0m:[93m19[0m - [91merror[0m[90m TS2339: [0mProperty 'extensions' does not exist on type 'Readonly<Error | GraphQLError>'.
|
|
139
|
+
Property 'extensions' does not exist on type 'Readonly<Error>'.
|
|
140
|
+
|
|
141
|
+
[7m129[0m if (error.extensions) {
|
|
142
|
+
[7m [0m [91m ~~~~~~~~~~[0m
|
|
143
|
+
|
|
144
|
+
[96msrc/router/graphql.ts[0m:[93m130[0m:[93m40[0m - [91merror[0m[90m TS2339: [0mProperty 'extensions' does not exist on type 'Readonly<Error | GraphQLError>'.
|
|
145
|
+
Property 'extensions' does not exist on type 'Readonly<Error>'.
|
|
146
|
+
|
|
147
|
+
[7m130[0m formatted.extensions = error.extensions;
|
|
148
|
+
[7m [0m [91m ~~~~~~~~~~[0m
|
|
149
|
+
|
|
150
|
+
[96msrc/router/graphql.ts[0m:[93m132[0m:[93m19[0m - [91merror[0m[90m TS2339: [0mProperty 'locations' does not exist on type 'Readonly<Error | GraphQLError>'.
|
|
151
|
+
Property 'locations' does not exist on type 'Readonly<Error>'.
|
|
152
|
+
|
|
153
|
+
[7m132[0m if (error.locations) {
|
|
154
|
+
[7m [0m [91m ~~~~~~~~~[0m
|
|
155
|
+
|
|
156
|
+
[96msrc/router/graphql.ts[0m:[93m133[0m:[93m39[0m - [91merror[0m[90m TS2339: [0mProperty 'locations' does not exist on type 'Readonly<Error | GraphQLError>'.
|
|
157
|
+
Property 'locations' does not exist on type 'Readonly<Error>'.
|
|
158
|
+
|
|
159
|
+
[7m133[0m formatted.locations = error.locations;
|
|
160
|
+
[7m [0m [91m ~~~~~~~~~[0m
|
|
161
|
+
|
|
162
|
+
[96msrc/router/graphql.ts[0m:[93m135[0m:[93m19[0m - [91merror[0m[90m TS2339: [0mProperty 'path' does not exist on type 'Readonly<Error | GraphQLError>'.
|
|
163
|
+
Property 'path' does not exist on type 'Readonly<Error>'.
|
|
164
|
+
|
|
165
|
+
[7m135[0m if (error.path) {
|
|
166
|
+
[7m [0m [91m ~~~~[0m
|
|
167
|
+
|
|
168
|
+
[96msrc/router/graphql.ts[0m:[93m136[0m:[93m34[0m - [91merror[0m[90m TS2339: [0mProperty 'path' does not exist on type 'Readonly<Error | GraphQLError>'.
|
|
169
|
+
Property 'path' does not exist on type 'Readonly<Error>'.
|
|
170
|
+
|
|
171
|
+
[7m136[0m formatted.path = error.path;
|
|
172
|
+
[7m [0m [91m ~~~~[0m
|
|
173
|
+
|
|
174
|
+
[96msrc/router/grpc.ts[0m:[93m184[0m:[93m3[0m - [91merror[0m[90m TS2416: [0mProperty '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
|
+
[7m184[0m options: GrpcRouterOptions;
|
|
179
|
+
[7m [0m [91m ~~~~~~~[0m
|
|
180
|
+
|
|
181
|
+
[96msrc/router/http.ts[0m:[93m28[0m:[93m3[0m - [91merror[0m[90m TS2416: [0mProperty '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
|
+
[7m28[0m options: RouterOptions;
|
|
186
|
+
[7m [0m [91m ~~~~~~~[0m
|
|
187
|
+
|
|
188
|
+
[96msrc/router/ws.ts[0m:[93m55[0m:[93m3[0m - [91merror[0m[90m TS2416: [0mProperty '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
|
+
[7m55[0m options: WebsocketRouterOptions;
|
|
193
|
+
[7m [0m [91m ~~~~~~~[0m
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
Found 18 errors in 5 files.
|
|
197
|
+
|
|
198
|
+
Errors Files
|
|
199
|
+
8 src/router/factory.ts[90m:61[0m
|
|
200
|
+
7 src/router/graphql.ts[90m:39[0m
|
|
201
|
+
1 src/router/grpc.ts[90m:184[0m
|
|
202
|
+
1 src/router/http.ts[90m:28[0m
|
|
203
|
+
1 src/router/ws.ts[90m:55[0m
|
|
204
|
+
[1G[0K⠙[1G[0K⚠️ TypeScript compilation had errors, but continuing...
|
|
205
|
+
📦 Running API Extractor...
|
|
44
206
|
[1G[0K⠙[1G[0K
|
|
45
207
|
[1mapi-extractor 7.55.2 [36m - https://api-extractor.com/[39m
|
|
46
208
|
[22m
|
|
@@ -84,37 +246,31 @@ Analysis will use the bundled TypeScript version 5.8.2
|
|
|
84
246
|
[33mWarning: src/params/params.ts:80:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
85
247
|
[33mWarning: 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.[39m
|
|
86
248
|
[33mWarning: src/params/params.ts:81:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
87
|
-
[33mWarning: src/params/params.ts:
|
|
88
|
-
[33mWarning: src/params/params.ts:
|
|
89
|
-
[33mWarning: src/params/params.ts:
|
|
90
|
-
[33mWarning: src/params/params.ts:
|
|
91
|
-
[33mWarning: src/params/params.ts:
|
|
92
|
-
[33mWarning: src/params/params.ts:
|
|
93
|
-
[33mWarning: src/params/params.ts:
|
|
94
|
-
[33mWarning: src/params/params.ts:
|
|
95
|
-
[33mWarning: src/params/params.ts:
|
|
96
|
-
[33mWarning: src/params/params.ts:
|
|
97
|
-
[33mWarning: src/params/params.ts:
|
|
98
|
-
[33mWarning: src/params/params.ts:
|
|
99
|
-
[33mWarning: src/params/params.ts:
|
|
100
|
-
[33mWarning: src/params/params.ts:
|
|
101
|
-
[33mWarning: src/params/params.ts:
|
|
102
|
-
[33mWarning: src/params/params.ts:
|
|
103
|
-
[33mWarning: src/params/params.ts:
|
|
104
|
-
[33mWarning: src/params/params.ts:
|
|
105
|
-
[33mWarning: src/params/params.ts:
|
|
106
|
-
[33mWarning: src/params/params.ts:
|
|
107
|
-
[33mWarning: src/params/params.ts:
|
|
108
|
-
[33mWarning: src/params/params.ts:
|
|
109
|
-
[33mWarning: src/params/params.ts:
|
|
110
|
-
[33mWarning: src/params/params.ts:
|
|
111
|
-
[33mWarning: src/params/params.ts:
|
|
112
|
-
[33mWarning: src/params/params.ts:159:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
113
|
-
[33mWarning: src/params/params.ts:159:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name[39m
|
|
114
|
-
[33mWarning: src/params/params.ts:159:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
115
|
-
[33mWarning: 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[39m
|
|
116
|
-
[33mWarning: src/params/params.ts:160:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
117
|
-
[33mWarning: src/params/params.ts:160:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration[39m
|
|
249
|
+
[33mWarning: src/params/params.ts:107:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
250
|
+
[33mWarning: 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.[39m
|
|
251
|
+
[33mWarning: src/params/params.ts:108:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
252
|
+
[33mWarning: 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.[39m
|
|
253
|
+
[33mWarning: src/params/params.ts:109:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
254
|
+
[33mWarning: src/params/params.ts:131:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
255
|
+
[33mWarning: src/params/params.ts:143:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestBody" is not defined in this configuration[39m
|
|
256
|
+
[33mWarning: 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[39m
|
|
257
|
+
[33mWarning: src/params/params.ts:144:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
258
|
+
[33mWarning: src/params/params.ts:144:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name[39m
|
|
259
|
+
[33mWarning: src/params/params.ts:144:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
260
|
+
[33mWarning: 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[39m
|
|
261
|
+
[33mWarning: src/params/params.ts:145:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
262
|
+
[33mWarning: src/params/params.ts:145:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration[39m
|
|
263
|
+
[33mWarning: src/params/params.ts:153:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
264
|
+
[33mWarning: 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[39m
|
|
265
|
+
[33mWarning: src/params/params.ts:154:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
266
|
+
[33mWarning: src/params/params.ts:165:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestParam" is not defined in this configuration[39m
|
|
267
|
+
[33mWarning: 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[39m
|
|
268
|
+
[33mWarning: src/params/params.ts:166:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
269
|
+
[33mWarning: src/params/params.ts:166:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name[39m
|
|
270
|
+
[33mWarning: src/params/params.ts:166:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
271
|
+
[33mWarning: 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[39m
|
|
272
|
+
[33mWarning: src/params/params.ts:167:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
273
|
+
[33mWarning: src/params/params.ts:167:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration[39m
|
|
118
274
|
[33mWarning: src/router/router.ts:20:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
119
275
|
[33mWarning: src/router/router.ts:21:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration[39m
|
|
120
276
|
[33mWarning: src/router/router.ts:48:3 - (ae-forgotten-export) The symbol "PayloadOptions" needs to be exported by the entry point index.d.ts[39m
|
|
@@ -123,7 +279,7 @@ Analysis will use the bundled TypeScript version 5.8.2
|
|
|
123
279
|
[33mWarning: 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[39m
|
|
124
280
|
[33mWarning: src/router/router.ts:54:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
125
281
|
[33mWarning: 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[39m
|
|
126
|
-
[33mWarning: src/router/router.ts:55:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
282
|
+
[33mWarning: src/router/router.ts:55:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
127
283
|
[33mWarning: src/router/router.ts:89:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
128
284
|
[33mWarning: src/router/router.ts:90:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
129
285
|
[33mWarning: src/router/router.ts:91:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
@@ -137,7 +293,7 @@ Analysis will use the bundled TypeScript version 5.8.2
|
|
|
137
293
|
API Extractor completed successfully
|
|
138
294
|
[1G[0K⠙[1G[0K✅ Type declarations built successfully
|
|
139
295
|
|
|
140
|
-
> koatty_router@2.
|
|
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.
|
|
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,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
|
|