keq 5.0.0-alpha.9 → 5.0.0-beta.1

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.
Files changed (213) hide show
  1. package/CHANGELOG.md +276 -0
  2. package/README.md +2 -2
  3. package/dist/index.d.mts +964 -0
  4. package/dist/index.d.mts.map +1 -0
  5. package/dist/index.d.ts +963 -6
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1752 -1413
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +1696 -1362
  10. package/dist/index.mjs.map +1 -1
  11. package/package.json +12 -11
  12. package/tsdown.config.ts +12 -0
  13. package/.turbo/turbo-build.log +0 -18
  14. package/dist/context/execution-context.d.ts +0 -24
  15. package/dist/context/execution-context.d.ts.map +0 -1
  16. package/dist/context/index.d.ts +0 -4
  17. package/dist/context/index.d.ts.map +0 -1
  18. package/dist/context/middleware-context.d.ts +0 -9
  19. package/dist/context/middleware-context.d.ts.map +0 -1
  20. package/dist/context/orchestrator-context.d.ts +0 -10
  21. package/dist/context/orchestrator-context.d.ts.map +0 -1
  22. package/dist/context/shared-context.d.ts +0 -38
  23. package/dist/context/shared-context.d.ts.map +0 -1
  24. package/dist/context/types/index.d.ts +0 -6
  25. package/dist/context/types/index.d.ts.map +0 -1
  26. package/dist/context/types/keq-context-data.d.ts +0 -7
  27. package/dist/context/types/keq-context-data.d.ts.map +0 -1
  28. package/dist/context/types/keq-context-emitter.d.ts +0 -35
  29. package/dist/context/types/keq-context-emitter.d.ts.map +0 -1
  30. package/dist/context/types/keq-context-options/index.d.ts +0 -6
  31. package/dist/context/types/keq-context-options/index.d.ts.map +0 -1
  32. package/dist/context/types/keq-context-options/keq-context-options.d.ts +0 -5
  33. package/dist/context/types/keq-context-options/keq-context-options.d.ts.map +0 -1
  34. package/dist/context/types/keq-context-options/keq-middleware-options.d.ts +0 -33
  35. package/dist/context/types/keq-context-options/keq-middleware-options.d.ts.map +0 -1
  36. package/dist/context/types/keq-context-options/keq-module-options.d.ts +0 -5
  37. package/dist/context/types/keq-context-options/keq-module-options.d.ts.map +0 -1
  38. package/dist/context/types/keq-context-options/keq-resolve-with-mode.d.ts +0 -2
  39. package/dist/context/types/keq-context-options/keq-resolve-with-mode.d.ts.map +0 -1
  40. package/dist/context/types/keq-context-options/keq-retry-options.d.ts +0 -9
  41. package/dist/context/types/keq-context-options/keq-retry-options.d.ts.map +0 -1
  42. package/dist/context/types/keq-context.d.ts +0 -17
  43. package/dist/context/types/keq-context.d.ts.map +0 -1
  44. package/dist/context/types/keq-global.d.ts +0 -7
  45. package/dist/context/types/keq-global.d.ts.map +0 -1
  46. package/dist/context/utils/index.d.ts +0 -2
  47. package/dist/context/utils/index.d.ts.map +0 -1
  48. package/dist/context/utils/watch-object.d.ts +0 -5
  49. package/dist/context/utils/watch-object.d.ts.map +0 -1
  50. package/dist/exception/abort.exception.d.ts +0 -4
  51. package/dist/exception/abort.exception.d.ts.map +0 -1
  52. package/dist/exception/exception.d.ts +0 -5
  53. package/dist/exception/exception.d.ts.map +0 -1
  54. package/dist/exception/index.d.ts +0 -6
  55. package/dist/exception/index.d.ts.map +0 -1
  56. package/dist/exception/request.exception.d.ts +0 -7
  57. package/dist/exception/request.exception.d.ts.map +0 -1
  58. package/dist/exception/timeout.exception.d.ts +0 -5
  59. package/dist/exception/timeout.exception.d.ts.map +0 -1
  60. package/dist/exception/type.exception.d.ts +0 -5
  61. package/dist/exception/type.exception.d.ts.map +0 -1
  62. package/dist/middleware/index.d.ts +0 -3
  63. package/dist/middleware/index.d.ts.map +0 -1
  64. package/dist/middleware/types/index.d.ts +0 -3
  65. package/dist/middleware/types/index.d.ts.map +0 -1
  66. package/dist/middleware/types/keq-middleware.d.ts +0 -7
  67. package/dist/middleware/types/keq-middleware.d.ts.map +0 -1
  68. package/dist/middleware/types/keq-next.d.ts +0 -2
  69. package/dist/middleware/types/keq-next.d.ts.map +0 -1
  70. package/dist/middleware/utils/compose-middleware.d.ts +0 -7
  71. package/dist/middleware/utils/compose-middleware.d.ts.map +0 -1
  72. package/dist/middleware/utils/index.d.ts +0 -2
  73. package/dist/middleware/utils/index.d.ts.map +0 -1
  74. package/dist/middlewares/fetch-middleware/index.d.ts +0 -6
  75. package/dist/middlewares/fetch-middleware/index.d.ts.map +0 -1
  76. package/dist/middlewares/flow-control-middleware/abort-flow-control-middleware.d.ts +0 -3
  77. package/dist/middlewares/flow-control-middleware/abort-flow-control-middleware.d.ts.map +0 -1
  78. package/dist/middlewares/flow-control-middleware/index.d.ts +0 -4
  79. package/dist/middlewares/flow-control-middleware/index.d.ts.map +0 -1
  80. package/dist/middlewares/flow-control-middleware/serial-flow-control-middleware.d.ts +0 -3
  81. package/dist/middlewares/flow-control-middleware/serial-flow-control-middleware.d.ts.map +0 -1
  82. package/dist/middlewares/flow-control-middleware/types/keq-flow-control.d.ts +0 -8
  83. package/dist/middlewares/flow-control-middleware/types/keq-flow-control.d.ts.map +0 -1
  84. package/dist/middlewares/index.d.ts +0 -4
  85. package/dist/middlewares/index.d.ts.map +0 -1
  86. package/dist/middlewares/timeout-middleware/index.d.ts +0 -6
  87. package/dist/middlewares/timeout-middleware/index.d.ts.map +0 -1
  88. package/dist/orchestrator/executor.d.ts +0 -12
  89. package/dist/orchestrator/executor.d.ts.map +0 -1
  90. package/dist/orchestrator/index.d.ts +0 -3
  91. package/dist/orchestrator/index.d.ts.map +0 -1
  92. package/dist/orchestrator/orchestrator.d.ts +0 -13
  93. package/dist/orchestrator/orchestrator.d.ts.map +0 -1
  94. package/dist/orchestrator/types/keq-middleware-context.d.ts +0 -4
  95. package/dist/orchestrator/types/keq-middleware-context.d.ts.map +0 -1
  96. package/dist/request/core.d.ts +0 -49
  97. package/dist/request/core.d.ts.map +0 -1
  98. package/dist/request/create-request.d.ts +0 -7
  99. package/dist/request/create-request.d.ts.map +0 -1
  100. package/dist/request/index.d.ts +0 -6
  101. package/dist/request/index.d.ts.map +0 -1
  102. package/dist/request/keq.d.ts +0 -115
  103. package/dist/request/keq.d.ts.map +0 -1
  104. package/dist/request/request.d.ts +0 -74
  105. package/dist/request/request.d.ts.map +0 -1
  106. package/dist/request/types/api-schema/api-schema-select.d.ts +0 -42
  107. package/dist/request/types/api-schema/api-schema-select.d.ts.map +0 -1
  108. package/dist/request/types/api-schema/api-schema.d.ts +0 -8
  109. package/dist/request/types/api-schema/api-schema.d.ts.map +0 -1
  110. package/dist/request/types/api-schema/default-operation.d.ts +0 -18
  111. package/dist/request/types/api-schema/default-operation.d.ts.map +0 -1
  112. package/dist/request/types/api-schema/extract-method-operations.d.ts +0 -31
  113. package/dist/request/types/api-schema/extract-method-operations.d.ts.map +0 -1
  114. package/dist/request/types/api-schema/index.d.ts +0 -6
  115. package/dist/request/types/api-schema/index.d.ts.map +0 -1
  116. package/dist/request/types/api-schema/operation.d.ts +0 -16
  117. package/dist/request/types/api-schema/operation.d.ts.map +0 -1
  118. package/dist/request/types/content-type.d.ts +0 -3
  119. package/dist/request/types/content-type.d.ts.map +0 -1
  120. package/dist/request/types/index.d.ts +0 -7
  121. package/dist/request/types/index.d.ts.map +0 -1
  122. package/dist/request/types/keq-attachable-file.d.ts +0 -2
  123. package/dist/request/types/keq-attachable-file.d.ts.map +0 -1
  124. package/dist/request/types/keq-param-value.d.ts +0 -3
  125. package/dist/request/types/keq-param-value.d.ts.map +0 -1
  126. package/dist/request/types/keq-query-options.d.ts +0 -7
  127. package/dist/request/types/keq-query-options.d.ts.map +0 -1
  128. package/dist/request/types/keq-query-value.d.ts +0 -7
  129. package/dist/request/types/keq-query-value.d.ts.map +0 -1
  130. package/dist/request/utils/fix-content-type.d.ts +0 -4
  131. package/dist/request/utils/fix-content-type.d.ts.map +0 -1
  132. package/dist/request/utils/get-location-id.d.ts +0 -2
  133. package/dist/request/utils/get-location-id.d.ts.map +0 -1
  134. package/dist/request/utils/index.d.ts +0 -6
  135. package/dist/request/utils/index.d.ts.map +0 -1
  136. package/dist/request/utils/intelligent-parse-response.d.ts +0 -2
  137. package/dist/request/utils/intelligent-parse-response.d.ts.map +0 -1
  138. package/dist/request/utils/merge-keq-request-body.d.ts +0 -3
  139. package/dist/request/utils/merge-keq-request-body.d.ts.map +0 -1
  140. package/dist/request/utils/query-stringify.d.ts +0 -3
  141. package/dist/request/utils/query-stringify.d.ts.map +0 -1
  142. package/dist/request-init/index.d.ts +0 -3
  143. package/dist/request-init/index.d.ts.map +0 -1
  144. package/dist/request-init/request-init.d.ts +0 -42
  145. package/dist/request-init/request-init.d.ts.map +0 -1
  146. package/dist/request-init/types/index.d.ts +0 -3
  147. package/dist/request-init/types/index.d.ts.map +0 -1
  148. package/dist/request-init/types/keq-request-body.d.ts +0 -2
  149. package/dist/request-init/types/keq-request-body.d.ts.map +0 -1
  150. package/dist/request-init/types/keq-request-method.d.ts +0 -2
  151. package/dist/request-init/types/keq-request-method.d.ts.map +0 -1
  152. package/dist/request-init/utils/clone-body.d.ts +0 -2
  153. package/dist/request-init/utils/clone-body.d.ts.map +0 -1
  154. package/dist/request-init/utils/clone-headers.d.ts +0 -2
  155. package/dist/request-init/utils/clone-headers.d.ts.map +0 -1
  156. package/dist/request-init/utils/compile-url.d.ts +0 -3
  157. package/dist/request-init/utils/compile-url.d.ts.map +0 -1
  158. package/dist/request-init/utils/index.d.ts +0 -6
  159. package/dist/request-init/utils/index.d.ts.map +0 -1
  160. package/dist/request-init/utils/to-form-data.d.ts +0 -2
  161. package/dist/request-init/utils/to-form-data.d.ts.map +0 -1
  162. package/dist/request-init/utils/to-url-search-params.d.ts +0 -2
  163. package/dist/request-init/utils/to-url-search-params.d.ts.map +0 -1
  164. package/dist/router/index.d.ts +0 -9
  165. package/dist/router/index.d.ts.map +0 -1
  166. package/dist/router/keq-host-route.d.ts +0 -3
  167. package/dist/router/keq-host-route.d.ts.map +0 -1
  168. package/dist/router/keq-location-route.d.ts +0 -3
  169. package/dist/router/keq-location-route.d.ts.map +0 -1
  170. package/dist/router/keq-method-route.d.ts +0 -3
  171. package/dist/router/keq-method-route.d.ts.map +0 -1
  172. package/dist/router/keq-module-route.d.ts +0 -3
  173. package/dist/router/keq-module-route.d.ts.map +0 -1
  174. package/dist/router/keq-pathname-route.d.ts +0 -3
  175. package/dist/router/keq-pathname-route.d.ts.map +0 -1
  176. package/dist/router/keq-router.d.ts +0 -13
  177. package/dist/router/keq-router.d.ts.map +0 -1
  178. package/dist/router/types/index.d.ts +0 -2
  179. package/dist/router/types/index.d.ts.map +0 -1
  180. package/dist/router/types/keq-route.d.ts +0 -3
  181. package/dist/router/types/keq-route.d.ts.map +0 -1
  182. package/dist/router/utils/compose-route.d.ts +0 -3
  183. package/dist/router/utils/compose-route.d.ts.map +0 -1
  184. package/dist/router/utils/index.d.ts +0 -2
  185. package/dist/router/utils/index.d.ts.map +0 -1
  186. package/dist/types/enabled-if-string-index.d.ts +0 -24
  187. package/dist/types/enabled-if-string-index.d.ts.map +0 -1
  188. package/dist/types/exclude-unknown-properties.d.ts +0 -19
  189. package/dist/types/exclude-unknown-properties.d.ts.map +0 -1
  190. package/dist/types/index-keys.d.ts +0 -18
  191. package/dist/types/index-keys.d.ts.map +0 -1
  192. package/dist/types/index.d.ts +0 -7
  193. package/dist/types/index.d.ts.map +0 -1
  194. package/dist/types/literal-keys.d.ts +0 -18
  195. package/dist/types/literal-keys.d.ts.map +0 -1
  196. package/dist/types/loose-nested-like.d.ts +0 -11
  197. package/dist/types/loose-nested-like.d.ts.map +0 -1
  198. package/dist/types/string-index-value-of.d.ts +0 -18
  199. package/dist/types/string-index-value-of.d.ts.map +0 -1
  200. package/dist/utils/base64.d.ts +0 -3
  201. package/dist/utils/base64.d.ts.map +0 -1
  202. package/dist/utils/index.d.ts +0 -4
  203. package/dist/utils/index.d.ts.map +0 -1
  204. package/dist/utils/shallow-clone.d.ts +0 -5
  205. package/dist/utils/shallow-clone.d.ts.map +0 -1
  206. package/dist/utils/sleep.d.ts +0 -2
  207. package/dist/utils/sleep.d.ts.map +0 -1
  208. package/dist/validator/index.d.ts +0 -2
  209. package/dist/validator/index.d.ts.map +0 -1
  210. package/dist/validator/validator.d.ts +0 -65
  211. package/dist/validator/validator.d.ts.map +0 -1
  212. package/jest.browser.config.ts +0 -22
  213. package/jest.config.cts +0 -22
package/CHANGELOG.md CHANGED
@@ -1,5 +1,281 @@
1
+ ## 5.0.0-beta.1
2
+
3
+ ### Major Changes
4
+
5
+ - 153244f: **BREAKING CHANGE:** Add an options to control query serialization.
6
+
7
+ - `.query({ a: [1, 2]})` => `?a[0]=1&a[1]=2`
8
+ - `.query({ a: [1, 2]}, { arrayFormat: 'brackets' })` => `?a[]=1&a[]=2`(default in keq@2)
9
+ - `.query({ a: [1, 2]}, { arrayFormat: 'repeat' })` => `?a=1&a=2`
10
+ - `.query({ a: [1, 2]}, { arrayFormat: 'comma' })` => `?a=1,2`
11
+
12
+ - 153244f: **BREAKING CHANGE:** Prevent modification of the immutable properties of the context.
13
+ - 153244f: **BREAKING CHANGE:** `.params(key, value)` will not encode value automatically, please replace it with `.params(key, encodeURIComponent(value)`, if necessary.
14
+ - 214ae66: **BREAKING CHANGE:** RequestException third parameter changed from retry: boolean to options: { fatal: boolean, response: Response }
15
+
16
+ ```javascript
17
+ // Before
18
+ new RequestException(400, "Error message", true);
19
+
20
+ // After
21
+ new RequestException(400, "Error message", {
22
+ fatal: false,
23
+ response: someResponseObject,
24
+ });
25
+ ```
26
+
27
+ - 0c7db81: **BREAKING CHANGE:** remove appendMiddlewares and prependMiddlewares from Keq.
28
+ - 153244f: **BREAKING CHANGE:** refactor event emitter. `fetch` event has been removed, please use `fetch:before`/`fetch:after` instead.
29
+
30
+ - add new function `.on(eventName, callback)` listen keq events
31
+ - add new event `fetch:before`
32
+ - add new event `fetch:after`
33
+ - add new event `middleware:before`
34
+ - add new event `middleware:after`
35
+ - add new event `timeout`
36
+ - add new event `abort`
37
+ - add new event `error`
38
+ - add new event `retry`
39
+
40
+ - 7ff2162: **BREAKING CHANGE:** Strictly adhere to URI template implementation (RFC 6570 compliant). Therefore, ':id' is no longer supported.
41
+ - 153244f: **BREAKING CHANGE:** change KeqRequest from interface to class.
42
+
43
+ - `request` cannot be invoke directly, please use `request.fetch()` instead.
44
+ - `KeqOptions` renamed to `KeqMiddlewareOptions`.
45
+ - `KeqOperations` renamed to `KeqApiSchema`.
46
+ - `KeqBaseOperation` renamed to `KeqDefaultOperation`.
47
+
48
+ - 153244f: **BREAKING CHANGE:** Refactoring keq middlewares
49
+
50
+ - `retryMiddleware`, `proxyResponseMiddleware`, `fetchArgumentMiddleware` be removed.
51
+ - `abortFlowControlMiddleware` and `serialFlowControlMiddleware` merged into `flowControlMiddleware`.
52
+ - `ctx.metadata` has been removed, please use `ctx.orchestrator` instead.
53
+ - `.retry()` will rerun all middlewares now, assert `ctx.data.retry.attempt` if middleware is not expect to be run.
54
+ - `ctx.options.retryOn`, `ctx.options.retryTimes` and `ctx.options.retryDelay` are replaced by `ctx.options.retry.on`, `ctx.options.retry.times` and `ctx.options.retry.delay`.
55
+ - `.option("resolveWithResponse")` had be removed, please use `.resolveWith('response')` instead.
56
+ - `next` cannot be run multi-times now.
57
+ - Some typescript type names have changed.
58
+ - `ctx.request.routeParams` is renamed to `ctx.request.pathParameters`
59
+
60
+ - 153244f: **BREAKING CHANGE:** Drop support node@18.
61
+ - f8abc63: **BREAKING CHANGE:** Remove `end()`, add `derive()` for reusing request configuration and `fire()` for fire-and-forget invocation.
62
+ - 0a04864: **Fix:** fix: update browser targets to chrome91/firefox90/safari15/edge91 to resolve esbuild 0.27 destructuring build errors.
63
+
64
+ ### Minor Changes
65
+
66
+ - 0a2eb2f: **Feat:** server-sent event support.
67
+ - c7ffd1f: **Feat:** synchronous middleware can be written
68
+ - 9290139: **Feat:** add event listener support to KeqRequest.
69
+ - a7a83da: **Perf:** Core now extends Promise, making keq instances true Promises instead of thenables.
70
+ - 153244f: **Feat:** add `.headers` as an alias for `.set`
71
+ - ca6c879: The forked orchestrator can be merged into original orchestrator.
72
+ - 63161c4: **Feat:** the .flowControl() support concurrency.
73
+ - d472648: context.orhestration.middleware can get current middleware status
74
+ - b8d02ca: **Perf:** allow `undefined` as query value in string index signature overloads.
75
+ - 153244f: **Feat:** `.attach` can take multiple files.
76
+ - eed26f9: **Feat:** add build-in http exceptions.
77
+
78
+ - `BadRequestException`
79
+ - `UnauthorizedException`
80
+ - `ForbiddenException`
81
+ - `NotFoundedException`
82
+ - `NotAcceptableException`
83
+ - `ConflictException`
84
+ - `GatewayTimeoutException`
85
+ - `InternalServerErrorException`
86
+ - `BadGatewayException`
87
+ - `ServiceUnavailableException`
88
+ - `PreconditionFailedException`
89
+
90
+ ### Patch Changes
91
+
92
+ - cbc5d17: ensure the monotonicity of middleware execution
93
+ - 153244f: optimize code suggestions
94
+ - 90311b3: Fix the error in recording the execution sequence number of orc caused by a middleware error.
95
+ - 1f367c0: more internal http exception
96
+ - df114d1: Fixed the issue of missing res after merging forked orchestrator.
97
+ - 2686b8d: build with turbo
98
+ - 842e555: **Perf:** avoid unnecessary deserialization.
99
+ - 2686b8d: remove private dependencies
100
+ - 7873a0a: Optimize middleware name generation
101
+ - e7eb9dc: Don't publish .turbo and jest.config.cts to npm
102
+ - 22ce01a: **Fix:** JSON.stringify ctx.response always get empty object.
103
+ - 0873c7e: Incorrect build before release.
104
+ - f194c41: **Fix:** types being unrecognized due to type-fest version upgrades.
105
+ - d076b76: **Fix:** resolve pnpm singleton trap by deduplicating instances.
106
+ - 581815a: ensure compatibility
107
+ - 7343445: Incorrect build before release
108
+
109
+ ## 5.0.0-alpha.36
110
+
111
+ ## 5.0.0-alpha.35
112
+
113
+ ### Major Changes
114
+
115
+ - 0a04864: **Fix:** fix: update browser targets to chrome91/firefox90/safari15/edge91 to resolve esbuild 0.27 destructuring build errors.
116
+
117
+ ## 5.0.0-alpha.34
118
+
119
+ ### Major Changes
120
+
121
+ - f8abc63: **BREAKING CHANGE:** Remove `end()`, add `derive()` for reusing request configuration and `fire()` for fire-and-forget invocation.
122
+
123
+ ### Minor Changes
124
+
125
+ - a7a83da: **Perf:** Core now extends Promise, making keq instances true Promises instead of thenables.
126
+
127
+ ## 5.0.0-alpha.33
128
+
129
+ ## 5.0.0-alpha.32
130
+
131
+ ### Minor Changes
132
+
133
+ - b8d02ca: **Perf:** allow `undefined` as query value in string index signature overloads.
134
+
135
+ ### Patch Changes
136
+
137
+ - f194c41: **Fix:** types being unrecognized due to type-fest version upgrades.
138
+
1
139
  ## 5.0.0-alpha.6 (2025-09-17)
2
140
 
141
+ ## 5.0.0-alpha.31
142
+
143
+ ## 5.0.0-alpha.30
144
+
145
+ ## 5.0.0-alpha.29
146
+
147
+ ## 5.0.0-alpha.28
148
+
149
+ ### Patch Changes
150
+
151
+ - d076b76: **Fix:** resolve pnpm singleton trap by deduplicating instances.
152
+
153
+ ## 5.0.0-alpha.27
154
+
155
+ ### Major Changes
156
+
157
+ - 0c7db81: **BREAKING CHANGE:** remove appendMiddlewares and prependMiddlewares from Keq.
158
+
159
+ ## 5.0.0-alpha.26
160
+
161
+ ### Minor Changes
162
+
163
+ - 63161c4: **Feat:** the .flowControl() support concurrency.
164
+
165
+ ### Patch Changes
166
+
167
+ - 22ce01a: **Fix:** JSON.stringify ctx.response always get empty object.
168
+
169
+ ## 5.0.0-alpha.25
170
+
171
+ ### Major Changes
172
+
173
+ - 214ae66: **BREAKING CHANGE:** RequestException third parameter changed from retry: boolean to options: { fatal: boolean, response: Response }
174
+
175
+ ```javascript
176
+ // Before
177
+ new RequestException(400, "Error message", true);
178
+
179
+ // After
180
+ new RequestException(400, "Error message", {
181
+ fatal: false,
182
+ response: someResponseObject,
183
+ });
184
+ ```
185
+
186
+ ### Minor Changes
187
+
188
+ - 9290139: **Feat:** add event listener support to KeqRequest.
189
+
190
+ ## 5.0.0-alpha.24
191
+
192
+ ### Minor Changes
193
+
194
+ - 0a2eb2f: **Feat:** server-sent event support.
195
+
196
+ ## 5.0.0-alpha.23
197
+
198
+ ### Patch Changes
199
+
200
+ - 842e555: **Perf:** avoid unnecessary deserialization.
201
+ - 7873a0a: Optimize middleware name generation
202
+
203
+ ## 5.0.0-alpha.22
204
+
205
+ ### Patch Changes
206
+
207
+ - df114d1: Fixed the issue of missing res after merging forked orchestrator.
208
+
209
+ ## 5.0.0-alpha.21
210
+
211
+ ### Patch Changes
212
+
213
+ - 90311b3: Fix the error in recording the execution sequence number of orc caused by a middleware error.
214
+
215
+ ## 5.0.0-alpha.20
216
+
217
+ ### Patch Changes
218
+
219
+ - 1f367c0: more internal http exception
220
+
221
+ ## 5.0.0-alpha.19
222
+
223
+ ## 5.0.0-alpha.18
224
+
225
+ ### Patch Changes
226
+
227
+ - cbc5d17: ensure the monotonicity of middleware execution
228
+
229
+ ## 5.0.0-alpha.17
230
+
231
+ ### Minor Changes
232
+
233
+ - d472648: context.orhestration.middleware can get current middleware status
234
+ - eed26f9: **Feat:** add build-in http exceptions.
235
+
236
+ - `BadRequestException`
237
+ - `UnauthorizedException`
238
+ - `ForbiddenException`
239
+ - `NotFoundedException`
240
+ - `NotAcceptableException`
241
+ - `ConflictException`
242
+ - `GatewayTimeoutException`
243
+ - `InternalServerErrorException`
244
+ - `BadGatewayException`
245
+ - `ServiceUnavailableException`
246
+ - `PreconditionFailedException`
247
+
248
+ ## 5.0.0-alpha.16
249
+
250
+ ### Minor Changes
251
+
252
+ - ca6c879: The forked orchestrator can be merged into original orchestrator.
253
+
254
+ ## 5.0.0-alpha.15
255
+
256
+ ## 5.0.0-alpha.14
257
+
258
+ ## 5.0.0-alpha.13
259
+
260
+ ## 5.0.0-alpha.12
261
+
262
+ ### Patch Changes
263
+
264
+ - 581815a: ensure compatibility
265
+
266
+ ## 5.0.0-alpha.11
267
+
268
+ ### Minor Changes
269
+
270
+ - c7ffd1f: **Feat:** synchronous middleware can be written
271
+
272
+ ## 5.0.0-alpha.10
273
+
274
+ ### Patch Changes
275
+
276
+ - e7eb9dc: Don't publish .turbo and jest.config.cts to npm
277
+ - 7343445: Incorrect build before release
278
+
3
279
  ## 5.0.0-alpha.9
4
280
 
5
281
  ### Patch Changes
package/README.md CHANGED
@@ -36,7 +36,7 @@ Keq wraps the Fetch APIs, adding chain calls and middleware functions.
36
36
  ### Send Request
37
37
 
38
38
  A request can be initiated by invoking the appropriate method on the request object,
39
- then calling `.then()` (or `.end()` or `await`) to send the request.
39
+ then calling `.then()` (or `await`) to send the request.
40
40
  For example a simple GET request:
41
41
 
42
42
  ```javascript
@@ -92,7 +92,7 @@ import { request } from "keq";
92
92
 
93
93
  const response = await request
94
94
  .get("http://test.com")
95
- .resolve('response')
95
+ .resolveWith('response')
96
96
 
97
97
  const body = await response.json();
98
98
  ```