koatty_router 2.0.2 → 2.0.6

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.
@@ -0,0 +1,169 @@
1
+
2
+ 
3
+ > koatty_router@2.0.6 build /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
4
+ > npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp
5
+
6
+
7
+ > koatty_router@2.0.6 build:js
8
+ > npx rollup --bundleConfigAsCjs -c .rollup.config.js
9
+
10
+ 
11
+ ./src/index.ts → ./dist/index.js, ./dist/index.mjs...
12
+ created ./dist/index.js, ./dist/index.mjs in 17.6s
13
+ ⠙⠙
14
+ > koatty_router@2.0.6 build:dts
15
+ > npx tsc && npx api-extractor run --local --verbose
16
+
17
+ ⠙⠙⠙
18
+ api-extractor 7.55.2  - https://api-extractor.com/
19
+ 
20
+ Using configuration from ./api-extractor.json
21
+ Analysis will use the bundled TypeScript version 5.8.2
22
+ *** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
23
+ Writing: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/temp/koatty_router.api.json
24
+ Writing package typings: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/dist/index.d.ts
25
+ Warning: src/params/mapping.ts:33:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
26
+ Warning: src/params/mapping.ts:34:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration
27
+ Warning: src/params/mapping.ts:47:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
28
+ Warning: src/params/mapping.ts:48:4 - (tsdoc-undefined-tag) The TSDoc tag "@var" is not defined in this configuration
29
+ Warning: src/params/mapping.ts:64: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.
30
+ Warning: src/params/mapping.ts:64:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
31
+ Warning: src/params/mapping.ts:65:27 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
32
+ Warning: src/params/mapping.ts:65:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
33
+ Warning: src/params/mapping.ts:66:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
34
+ Warning: src/params/mapping.ts:69:11 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.
35
+ Warning: src/params/mapping.ts:70:15 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
36
+ Warning: src/params/mapping.ts:70:34 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
37
+ Warning: src/params/mapping.ts:70:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
38
+ Warning: src/params/mapping.ts:70:18 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
39
+ Warning: src/params/params.ts:19:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
40
+ Warning: src/params/params.ts:20: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.
41
+ Warning: src/params/params.ts:20:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
42
+ Warning: src/params/params.ts:21: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.
43
+ Warning: src/params/params.ts:21:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
44
+ Warning: src/params/params.ts:37:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
45
+ Warning: src/params/params.ts:38: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.
46
+ Warning: src/params/params.ts:38:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
47
+ Warning: src/params/params.ts:39: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.
48
+ Warning: src/params/params.ts:39:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
49
+ Warning: src/params/params.ts:58:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
50
+ Warning: src/params/params.ts:59: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.
51
+ Warning: src/params/params.ts:59:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
52
+ Warning: src/params/params.ts:60: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.
53
+ Warning: src/params/params.ts:60:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
54
+ Warning: src/params/params.ts:79:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
55
+ Warning: src/params/params.ts:80: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.
56
+ Warning: src/params/params.ts:80:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
57
+ 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.
58
+ Warning: src/params/params.ts:81:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
59
+ Warning: src/params/params.ts:101:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
60
+ 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.
61
+ Warning: src/params/params.ts:102:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
62
+ 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.
63
+ Warning: src/params/params.ts:103:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
64
+ Warning: src/params/params.ts:124:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
65
+ 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
66
+ 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
67
+ 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
68
+ Warning: src/params/params.ts:125:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
69
+ Warning: src/params/params.ts:125:24 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
70
+ Warning: src/params/params.ts:125:37 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
71
+ Warning: src/params/params.ts:136:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestBody" is not defined in this configuration
72
+ 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
73
+ Warning: src/params/params.ts:137:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
74
+ Warning: src/params/params.ts:137:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name
75
+ Warning: src/params/params.ts:137:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
76
+ 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
77
+ Warning: src/params/params.ts:138:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
78
+ Warning: src/params/params.ts:138:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration
79
+ Warning: src/params/params.ts:146:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
80
+ 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
81
+ Warning: src/params/params.ts:147:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
82
+ Warning: src/params/params.ts:158:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestParam" is not defined in this configuration
83
+ 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
84
+ Warning: src/params/params.ts:159:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
85
+ Warning: src/params/params.ts:159:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name
86
+ Warning: src/params/params.ts:159:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
87
+ 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
88
+ Warning: src/params/params.ts:160:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
89
+ Warning: src/params/params.ts:160:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration
90
+ Warning: src/router/router.ts:20:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
91
+ Warning: src/router/router.ts:21:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration
92
+ Warning: src/router/router.ts:48:3 - (ae-forgotten-export) The symbol "PayloadOptions" needs to be exported by the entry point index.d.ts
93
+ Warning: src/router/router.ts:53:74 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
94
+ Warning: src/router/router.ts:53:19 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
95
+ 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
96
+ Warning: src/router/router.ts:54:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
97
+ 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
98
+ Warning: src/router/router.ts:55:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
99
+ Warning: src/router/router.ts:87:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
100
+ Warning: src/router/router.ts:88:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
101
+ Warning: src/router/router.ts:89:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
102
+ Warning: src/router/router.ts:90:15 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
103
+ Warning: src/router/router.ts:90:31 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
104
+ Warning: src/router/router.ts:90:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
105
+ Warning: src/router/router.ts:90:18 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
106
+
107
+ API Extractor completed successfully
108
+ ⠙⠙
109
+ > koatty_router@2.0.6 build:doc
110
+ > npx api-documenter markdown --input temp --output docs/api
111
+
112
+ 
113
+ api-documenter 7.28.2  - https://api-extractor.com/
114
+ 
115
+ Reading koatty_router.api.json
116
+
117
+ Deleting old output from docs/api
118
+ Writing koatty_router package
119
+ Unsupported block tag: @RequestBody
120
+ Unsupported block tag: @export
121
+ Unsupported block tag: @export
122
+ Unsupported block tag: @export
123
+ Unsupported block tag: @export
124
+ Unsupported block tag: @RequestParam
125
+ Unsupported block tag: @export
126
+ Unsupported block tag: @export
127
+ Unsupported block tag: @export
128
+ Unsupported block tag: @export
129
+ Unsupported block tag: @var
130
+ Unsupported block tag: @export
131
+ Unsupported block tag: @export
132
+ Unsupported block tag: @interface
133
+ Unsupported block tag: @export
134
+ Unsupported block tag: @interface
135
+ Unsupported block tag: @export
136
+ Unsupported block tag: @var
137
+ Unsupported block tag: @export
138
+ Unsupported block tag: @export
139
+ Unsupported block tag: @export
140
+ Unsupported block tag: @export
141
+ Unsupported block tag: @export
142
+ Unsupported block tag: @export
143
+ Unsupported block tag: @export
144
+ Unsupported block tag: @export
145
+ Unsupported block tag: @export
146
+ Unsupported block tag: @interface
147
+ Unsupported block tag: @export
148
+ Unsupported block tag: @interface
149
+ Unsupported block tag: @RequestBody
150
+ Unsupported block tag: @RequestParam
151
+ ⠙⠙
152
+ > koatty_router@2.0.6 build:cp
153
+ > copyfiles package.json LICENSE README.md dist/ && node scripts/postBuild
154
+
155
+ ✓ Fixed dependencies.koatty_container: workspace:* → ^1.17.1
156
+ ✓ Fixed dependencies.koatty_core: workspace:* → ^2.0.11
157
+ ✓ Fixed dependencies.koatty_exception: workspace:* → ^2.0.7
158
+ ✓ Fixed dependencies.koatty_graphql: workspace:* → ^1.1.1
159
+ ✓ Fixed dependencies.koatty_lib: workspace:* → ^1.4.2
160
+ ✓ Fixed dependencies.koatty_logger: workspace:* → ^2.3.1
161
+ ✓ Fixed dependencies.koatty_proto: workspace:* → ^1.3.2
162
+ ✓ Fixed dependencies.koatty_validation: workspace:* → ^1.6.3
163
+ ✓ Fixed main: ./dist/... → ./index.js
164
+ ✓ Fixed types: ./dist/... → ./index.d.ts
165
+ ✓ Fixed exports.require: ./dist/index.js → ./index.js
166
+ ✓ Fixed exports.import: ./dist/index.mjs → ./index.mjs
167
+ ✓ Fixed exports.types: ./dist/index.d.ts → ./index.d.ts
168
+ ✅ Fixed workspace:* dependencies and paths in dist/package.json
169
+ ⠙
package/CHANGELOG.md CHANGED
@@ -1,46 +1,84 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - koatty_proto@1.3.2
9
+
10
+ ## 2.0.5
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - koatty_lib@1.4.2
16
+ - koatty_container@1.17.1
17
+ - koatty_core@2.0.11
18
+ - koatty_exception@2.0.7
19
+ - koatty_graphql@1.1.1
20
+ - koatty_logger@2.3.1
21
+ - koatty_proto@1.3.1
22
+ - koatty_validation@1.6.3
23
+
24
+ ## 2.0.4
25
+
26
+ ### Patch Changes
27
+
28
+ - build
29
+ - build
30
+ - Updated dependencies
31
+ - Updated dependencies
32
+ - koatty_core@2.0.10
33
+ - koatty_exception@2.0.6
34
+ - koatty_validation@1.6.2
35
+
36
+ ## 2.0.3
37
+
38
+ ### Patch Changes
39
+
40
+ - init
41
+ - Updated dependencies
42
+ - koatty_core@2.0.9
43
+ - koatty_exception@2.0.5
44
+
3
45
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
46
 
5
47
  ### [2.0.2](https://github.com/koatty/koatty_router/compare/koatty-router@2.0.1...koatty-router@2.0.2) (2025-10-25)
6
48
 
7
-
8
49
  ### Features
9
50
 
10
- * **trace:** enhance tracing with timeout handling and status checks ([caa6a10](https://github.com/koatty/koatty_router/commit/caa6a10d0d82064567f1a3f8f3146f28a7b7398d))
11
-
51
+ - **trace:** enhance tracing with timeout handling and status checks ([caa6a10](https://github.com/koatty/koatty_router/commit/caa6a10d0d82064567f1a3f8f3146f28a7b7398d))
12
52
 
13
53
  ### Bug Fixes
14
54
 
15
- * **koatty-serve:** 修复不稳定的时间相关测试 ([cf2d6b5](https://github.com/koatty/koatty_router/commit/cf2d6b5754a56217df1b912faf7cd40b01dbcbdc))
16
- * **koatty-trace:** 修复ESLint错误和测试mock问题 ([b24e1f9](https://github.com/koatty/koatty_router/commit/b24e1f9dcc55c64f5d97f3ca01bc53161e7bdb7c))
55
+ - **koatty-serve:** 修复不稳定的时间相关测试 ([cf2d6b5](https://github.com/koatty/koatty_router/commit/cf2d6b5754a56217df1b912faf7cd40b01dbcbdc))
56
+ - **koatty-trace:** 修复 ESLint 错误和测试 mock 问题 ([b24e1f9](https://github.com/koatty/koatty_router/commit/b24e1f9dcc55c64f5d97f3ca01bc53161e7bdb7c))
17
57
 
18
58
  ### 2.0.1 (2025-10-25)
19
59
 
20
-
21
60
  ### ⚠ BREAKING CHANGES
22
61
 
23
- * **scripts:** - Tag格式从 v{version} 改为 {package-name}@{version}
62
+ - **scripts:** - Tag 格式从 v{version} 改为 {package-name}@{version}
24
63
 
25
64
  ### Features
26
65
 
27
- * add examples directory with basic-app example ([ef49c6f](https://github.com/koatty/koatty_router/commit/ef49c6f932b88ba947fc4c7f448d91b016e3e020))
28
- * improve type safety in compress middleware ([61beb1d](https://github.com/koatty/koatty_router/commit/61beb1d206bebfd5f6fec9a2d1297f420be217a2))
29
- * **koatty_core:** upgrade to Koa 3.0 ([fe246ad](https://github.com/koatty/koatty_router/commit/fe246ad773521b6117d212378b07faa30abd17e0))
30
- * **koatty_router:** migrate from koa-graphql to graphql-http ([847821a](https://github.com/koatty/koatty_router/commit/847821ac80109c6f4fd953e0701ad695e4fb771f))
31
- * make exception context fields optional and improve trace handling ([e0ec4db](https://github.com/koatty/koatty_router/commit/e0ec4db1ba7299b1d22018558f61288cb2564dc6))
32
- * **release:** add release guide and automation script ([c5f01b1](https://github.com/koatty/koatty_router/commit/c5f01b17765a9b1eeb07c448b27be5ade9278569))
33
- * update sync script to use HTTPS instead of SSH for package repos ([91c9fd7](https://github.com/koatty/koatty_router/commit/91c9fd74f080685cb2e8fab66e4765cbf86be57c))
34
- * upgrade to Koa 3.0 (WIP) ([d14114c](https://github.com/koatty/koatty_router/commit/d14114c63d0f62fcd3a64296cbb6648ec1ee1e83))
35
-
66
+ - add examples directory with basic-app example ([ef49c6f](https://github.com/koatty/koatty_router/commit/ef49c6f932b88ba947fc4c7f448d91b016e3e020))
67
+ - improve type safety in compress middleware ([61beb1d](https://github.com/koatty/koatty_router/commit/61beb1d206bebfd5f6fec9a2d1297f420be217a2))
68
+ - **koatty_core:** upgrade to Koa 3.0 ([fe246ad](https://github.com/koatty/koatty_router/commit/fe246ad773521b6117d212378b07faa30abd17e0))
69
+ - **koatty_router:** migrate from koa-graphql to graphql-http ([847821a](https://github.com/koatty/koatty_router/commit/847821ac80109c6f4fd953e0701ad695e4fb771f))
70
+ - make exception context fields optional and improve trace handling ([e0ec4db](https://github.com/koatty/koatty_router/commit/e0ec4db1ba7299b1d22018558f61288cb2564dc6))
71
+ - **release:** add release guide and automation script ([c5f01b1](https://github.com/koatty/koatty_router/commit/c5f01b17765a9b1eeb07c448b27be5ade9278569))
72
+ - update sync script to use HTTPS instead of SSH for package repos ([91c9fd7](https://github.com/koatty/koatty_router/commit/91c9fd74f080685cb2e8fab66e4765cbf86be57c))
73
+ - upgrade to Koa 3.0 (WIP) ([d14114c](https://github.com/koatty/koatty_router/commit/d14114c63d0f62fcd3a64296cbb6648ec1ee1e83))
36
74
 
37
75
  ### Bug Fixes
38
76
 
39
- * **koatty_core:** attempt to fix test timeouts ([fb197ea](https://github.com/koatty/koatty_router/commit/fb197eab7d193616ed4255753c22df0b400c1bc6))
40
- * resolve workspace dependencies in build process ([d8a2661](https://github.com/koatty/koatty_router/commit/d8a266123fee1dea8ea7be6a39401bf0c052688b))
41
- * **scripts:** 修复monorepo中tag冲突问题 ([d2602bc](https://github.com/koatty/koatty_router/commit/d2602bcc8c245e6f2137a678ec0e5e2fd6ef673a))
42
- * **scripts:** 增强release脚本的验证和调试信息 ([2e0db49](https://github.com/koatty/koatty_router/commit/2e0db499234bd4f132bbfc65559105fd9f98f926))
43
- * 解决依赖问题以支持Koa 3.0升级 ([30cf0b5](https://github.com/koatty/koatty_router/commit/30cf0b53ed032c7de5ea24b4c2ed965e8d4948df))
77
+ - **koatty_core:** attempt to fix test timeouts ([fb197ea](https://github.com/koatty/koatty_router/commit/fb197eab7d193616ed4255753c22df0b400c1bc6))
78
+ - resolve workspace dependencies in build process ([d8a2661](https://github.com/koatty/koatty_router/commit/d8a266123fee1dea8ea7be6a39401bf0c052688b))
79
+ - **scripts:** 修复 monorepo tag 冲突问题 ([d2602bc](https://github.com/koatty/koatty_router/commit/d2602bcc8c245e6f2137a678ec0e5e2fd6ef673a))
80
+ - **scripts:** 增强 release 脚本的验证和调试信息 ([2e0db49](https://github.com/koatty/koatty_router/commit/2e0db499234bd4f132bbfc65559105fd9f98f926))
81
+ - 解决依赖问题以支持 Koa 3.0 升级 ([30cf0b5](https://github.com/koatty/koatty_router/commit/30cf0b53ed032c7de5ea24b4c2ed965e8d4948df))
44
82
 
45
83
  ## [2.0.0] (2025-03-16)
46
84
 
package/dist/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2025-10-25 10:05:03
3
+ * @Date: 2026-01-28 16:08:27
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
7
7
  */
8
8
  import { Application } from 'koatty_container';
9
- import { Koatty } from 'koatty_core';
9
+ import { IPlugin } from 'koatty_core';
10
+ import { IPluginCapability } from 'koatty_core';
11
+ import { KoattyApplication } from 'koatty_core';
10
12
  import { KoattyContext } from 'koatty_core';
11
13
  import { KoattyNext } from 'koatty_core';
12
14
  import { KoattyRouter } from 'koatty_core';
@@ -121,7 +123,7 @@ export declare interface HttpExtConfig {
121
123
  * Router factory interface
122
124
  */
123
125
  export declare interface IRouterFactory {
124
- create(protocol: string, app: Koatty, options: RouterOptions): KoattyRouter;
126
+ create(protocol: string, app: KoattyApplication, options: RouterOptions): KoattyRouter;
125
127
  register(protocol: string, routerClass: RouterConstructor): void;
126
128
  getSupportedProtocols(): string[];
127
129
  }
@@ -150,7 +152,7 @@ export declare class MiddlewareBuilder {
150
152
  enabled(enabled: boolean): this;
151
153
  middleware(middleware: MiddlewareFunction): this;
152
154
  condition(condition: MiddlewareCondition): this;
153
- metadata(key: string, value: any): this;
155
+ metadata(key: string, value: unknown): this;
154
156
  build(): MiddlewareConfig;
155
157
  register(app: Application): void;
156
158
  }
@@ -174,9 +176,9 @@ export declare interface MiddlewareConfig {
174
176
  priority?: number;
175
177
  enabled?: boolean;
176
178
  conditions?: MiddlewareCondition[];
177
- metadata?: Record<string, any>;
179
+ metadata?: Record<string, unknown>;
178
180
  middlewareConfig?: {
179
- [key: string]: any;
181
+ [key: string]: unknown;
180
182
  };
181
183
  }
182
184
 
@@ -204,17 +206,17 @@ export declare interface MiddlewareExecutionContext {
204
206
  /**
205
207
  * Middleware function type
206
208
  */
207
- export declare type MiddlewareFunction = (ctx: KoattyContext, next: KoattyNext) => Promise<any> | any;
209
+ export declare type MiddlewareFunction = <T = unknown>(ctx: KoattyContext, next: KoattyNext) => Promise<T> | T;
208
210
 
209
211
  /**
210
212
  * get instance of Router using Factory Pattern
211
213
  *
212
214
  * @export
213
- * @param {Koatty} app
215
+ * @param {KoattyApplication} app
214
216
  * @param {RouterOptions} options
215
217
  * @returns {*} {KoattyRouter}
216
218
  */
217
- export declare function NewRouter(app: Koatty, opt?: RouterOptions): KoattyRouter;
219
+ export declare function NewRouter(app: KoattyApplication, opt?: RouterOptions): KoattyRouter;
218
220
 
219
221
  /**
220
222
  * Routes HTTP OPTIONS requests to the specified path.
@@ -300,7 +302,7 @@ export declare const PutMapping: (path?: string, routerOptions?: RouterOption) =
300
302
  /**
301
303
  * Decorator for auto-registering middlewares
302
304
  */
303
- export declare function RegisterMiddleware(app: Application, config: Omit<MiddlewareConfig, 'middleware'>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
305
+ export declare function RegisterMiddleware(app: Application, config: Omit<MiddlewareConfig, 'middleware'>): (target: object, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
304
306
 
305
307
  /**
306
308
  * Decorator for auto-registering custom routers
@@ -360,7 +362,7 @@ export declare function RequestParam(): ParameterDecorator;
360
362
  /**
361
363
  * Router constructor type
362
364
  */
363
- export declare type RouterConstructor = new (app: Koatty, options?: RouterOptions) => KoattyRouter;
365
+ export declare type RouterConstructor = new (app: KoattyApplication, options?: RouterOptions) => KoattyRouter;
364
366
 
365
367
  /**
366
368
  * Router factory implementation
@@ -376,7 +378,7 @@ export declare class RouterFactory implements IRouterFactory {
376
378
  /**
377
379
  * Create router instance
378
380
  */
379
- create(protocol: string, app: Koatty, options: RouterOptions): KoattyRouter;
381
+ create(protocol: string, app: KoattyApplication, options: RouterOptions): KoattyRouter;
380
382
  /**
381
383
  * Register custom router
382
384
  */
@@ -636,6 +638,14 @@ export declare interface RouterOptions {
636
638
  ext?: Record<string, any>;
637
639
  }
638
640
 
641
+ export declare class RouterPlugin implements IPlugin {
642
+ readonly provides: IPluginCapability[];
643
+ readonly events: {
644
+ beforeRouterLoad: (app: KoattyApplication) => Promise<void>;
645
+ };
646
+ uninstall(_app: KoattyApplication): Promise<void>;
647
+ }
648
+
639
649
  /**
640
650
  * gRPC 流配置
641
651
  */