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.
- package/.turbo/turbo-build.log +201 -45
- package/.turbo/turbo-clean.log +4 -0
- package/.turbo/turbo-test.log +77 -0
- package/CHANGELOG.md +35 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +145 -235
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +148 -238
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +9 -9
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -0
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...
|
|
@@ -40,8 +40,170 @@
|
|
|
40
40
|
|
|
41
41
|
✅ All dependencies ready (waited 1ms)
|
|
42
42
|
📝 Running TypeScript compiler...
|
|
43
|
-
[1G[0K⠙[1G[0K[
|
|
44
|
-
|
|
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...
|
|
206
|
+
[1G[0K⠙[1G[0K
|
|
45
207
|
[1mapi-extractor 7.55.2 [36m - https://api-extractor.com/[39m
|
|
46
208
|
[22m
|
|
47
209
|
Using configuration from ./api-extractor.json
|
|
@@ -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
|
|
@@ -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,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-
|
|
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
|
|
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
|
|
322
|
+
* @returns Flat body object. Files (if any) accessible via body[FILE_KEY].
|
|
322
323
|
*/
|
|
323
324
|
export declare function RequestBody(): ParameterDecorator;
|
|
324
325
|
|