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.
- package/.turbo/turbo-build.log +169 -0
- package/CHANGELOG.md +59 -21
- package/dist/index.d.ts +22 -12
- package/dist/index.js +2054 -1682
- package/dist/index.mjs +2438 -2066
- package/dist/package.json +25 -41
- package/package.json +20 -36
|
@@ -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
|
+
[1G[0K[1G[0K[36m
|
|
11
|
+
[1m./src/index.ts[22m → [1m./dist/index.js, ./dist/index.mjs[22m...[39m
|
|
12
|
+
[32mcreated [1m./dist/index.js, ./dist/index.mjs[22m in [1m17.6s[22m[39m
|
|
13
|
+
[1G[0K⠙[1G[0K[1G[0K⠙[1G[0K
|
|
14
|
+
> koatty_router@2.0.6 build:dts
|
|
15
|
+
> npx tsc && npx api-extractor run --local --verbose
|
|
16
|
+
|
|
17
|
+
[1G[0K[1G[0K⠙[1G[0K[1G[0K⠙[1G[0K[1G[0K⠙[1G[0K
|
|
18
|
+
[1mapi-extractor 7.55.2 [36m - https://api-extractor.com/[39m
|
|
19
|
+
[22m
|
|
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
|
+
[36mWriting: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/temp/koatty_router.api.json[39m
|
|
24
|
+
[36mWriting package typings: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/dist/index.d.ts[39m
|
|
25
|
+
[33mWarning: src/params/mapping.ts:33:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
26
|
+
[33mWarning: src/params/mapping.ts:34:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration[39m
|
|
27
|
+
[33mWarning: src/params/mapping.ts:47:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
28
|
+
[33mWarning: src/params/mapping.ts:48:4 - (tsdoc-undefined-tag) The TSDoc tag "@var" is not defined in this configuration[39m
|
|
29
|
+
[33mWarning: 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.[39m
|
|
30
|
+
[33mWarning: src/params/mapping.ts:64:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
31
|
+
[33mWarning: 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.[39m
|
|
32
|
+
[33mWarning: src/params/mapping.ts:65:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
33
|
+
[33mWarning: src/params/mapping.ts:66:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
34
|
+
[33mWarning: 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.[39m
|
|
35
|
+
[33mWarning: 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[39m
|
|
36
|
+
[33mWarning: 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[39m
|
|
37
|
+
[33mWarning: src/params/mapping.ts:70:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
38
|
+
[33mWarning: src/params/mapping.ts:70:18 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
39
|
+
[33mWarning: src/params/params.ts:19:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
40
|
+
[33mWarning: 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.[39m
|
|
41
|
+
[33mWarning: src/params/params.ts:20:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
42
|
+
[33mWarning: 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.[39m
|
|
43
|
+
[33mWarning: src/params/params.ts:21:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
44
|
+
[33mWarning: src/params/params.ts:37:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
45
|
+
[33mWarning: 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.[39m
|
|
46
|
+
[33mWarning: src/params/params.ts:38:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
47
|
+
[33mWarning: 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.[39m
|
|
48
|
+
[33mWarning: src/params/params.ts:39:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
49
|
+
[33mWarning: src/params/params.ts:58:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
50
|
+
[33mWarning: 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.[39m
|
|
51
|
+
[33mWarning: src/params/params.ts:59:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
52
|
+
[33mWarning: 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.[39m
|
|
53
|
+
[33mWarning: src/params/params.ts:60:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
54
|
+
[33mWarning: src/params/params.ts:79:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
55
|
+
[33mWarning: 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.[39m
|
|
56
|
+
[33mWarning: src/params/params.ts:80:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
57
|
+
[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
|
|
58
|
+
[33mWarning: src/params/params.ts:81:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
59
|
+
[33mWarning: src/params/params.ts:101:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
60
|
+
[33mWarning: 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.[39m
|
|
61
|
+
[33mWarning: src/params/params.ts:102:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
62
|
+
[33mWarning: 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.[39m
|
|
63
|
+
[33mWarning: src/params/params.ts:103:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
64
|
+
[33mWarning: src/params/params.ts:124:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
65
|
+
[33mWarning: 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[39m
|
|
66
|
+
[33mWarning: 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[39m
|
|
67
|
+
[33mWarning: 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[39m
|
|
68
|
+
[33mWarning: src/params/params.ts:125:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
69
|
+
[33mWarning: src/params/params.ts:125:24 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
70
|
+
[33mWarning: src/params/params.ts:125:37 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
71
|
+
[33mWarning: src/params/params.ts:136:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestBody" is not defined in this configuration[39m
|
|
72
|
+
[33mWarning: 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[39m
|
|
73
|
+
[33mWarning: src/params/params.ts:137:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
74
|
+
[33mWarning: src/params/params.ts:137:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name[39m
|
|
75
|
+
[33mWarning: src/params/params.ts:137:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
76
|
+
[33mWarning: 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[39m
|
|
77
|
+
[33mWarning: src/params/params.ts:138:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
78
|
+
[33mWarning: src/params/params.ts:138:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration[39m
|
|
79
|
+
[33mWarning: src/params/params.ts:146:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
80
|
+
[33mWarning: 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[39m
|
|
81
|
+
[33mWarning: src/params/params.ts:147:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
82
|
+
[33mWarning: src/params/params.ts:158:13 - (tsdoc-undefined-tag) The TSDoc tag "@RequestParam" is not defined in this configuration[39m
|
|
83
|
+
[33mWarning: 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[39m
|
|
84
|
+
[33mWarning: src/params/params.ts:159:11 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
85
|
+
[33mWarning: src/params/params.ts:159:4 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a parameter name[39m
|
|
86
|
+
[33mWarning: src/params/params.ts:159:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
87
|
+
[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
|
|
88
|
+
[33mWarning: src/params/params.ts:160:12 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
89
|
+
[33mWarning: src/params/params.ts:160:4 - (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration[39m
|
|
90
|
+
[33mWarning: src/router/router.ts:20:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
91
|
+
[33mWarning: src/router/router.ts:21:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration[39m
|
|
92
|
+
[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
|
|
93
|
+
[33mWarning: 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[39m
|
|
94
|
+
[33mWarning: src/router/router.ts:53:19 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
95
|
+
[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
|
|
96
|
+
[33mWarning: src/router/router.ts:54:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
97
|
+
[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
|
|
98
|
+
[33mWarning: src/router/router.ts:55:17 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
99
|
+
[33mWarning: src/router/router.ts:87:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
100
|
+
[33mWarning: src/router/router.ts:88:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
101
|
+
[33mWarning: src/router/router.ts:89:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
102
|
+
[33mWarning: 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[39m
|
|
103
|
+
[33mWarning: 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[39m
|
|
104
|
+
[33mWarning: src/router/router.ts:90:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
105
|
+
[33mWarning: src/router/router.ts:90:18 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
106
|
+
|
|
107
|
+
API Extractor completed successfully
|
|
108
|
+
[1G[0K⠙[1G[0K[1G[0K⠙[1G[0K
|
|
109
|
+
> koatty_router@2.0.6 build:doc
|
|
110
|
+
> npx api-documenter markdown --input temp --output docs/api
|
|
111
|
+
|
|
112
|
+
[1G[0K[1G[0K
|
|
113
|
+
[1mapi-documenter 7.28.2 [36m - https://api-extractor.com/[39m
|
|
114
|
+
[22m
|
|
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
|
+
[1G[0K⠙[1G[0K[1G[0K⠙[1G[0K
|
|
152
|
+
> koatty_router@2.0.6 build:cp
|
|
153
|
+
> copyfiles package.json LICENSE README.md dist/ && node scripts/postBuild
|
|
154
|
+
|
|
155
|
+
[1G[0K✓ 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
|
+
[1G[0K⠙[1G[0K
|
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
|
-
|
|
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
|
-
|
|
16
|
-
|
|
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
|
-
|
|
62
|
+
- **scripts:** - Tag 格式从 v{version} 改为 {package-name}@{version}
|
|
24
63
|
|
|
25
64
|
### Features
|
|
26
65
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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:
|
|
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 {
|
|
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:
|
|
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:
|
|
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,
|
|
179
|
+
metadata?: Record<string, unknown>;
|
|
178
180
|
middlewareConfig?: {
|
|
179
|
-
[key: string]:
|
|
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<
|
|
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 {
|
|
215
|
+
* @param {KoattyApplication} app
|
|
214
216
|
* @param {RouterOptions} options
|
|
215
217
|
* @returns {*} {KoattyRouter}
|
|
216
218
|
*/
|
|
217
|
-
export declare function NewRouter(app:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
*/
|