@forinda/kickjs 10.4.0 → 10.6.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.
Files changed (209) hide show
  1. package/dist/{adapter-BZ1WzN1z.d.mts → adapter-9sPr_5xt.d.mts} +123 -35
  2. package/dist/adapter-9sPr_5xt.d.mts.map +1 -0
  3. package/dist/{allowed-hosts-D6qcuK5I.d.mts → allowed-hosts-BpKwviq5.d.mts} +3 -3
  4. package/dist/allowed-hosts-BpKwviq5.d.mts.map +1 -0
  5. package/dist/{application-D5Iiy7rt.d.mts → application-BD9LQ2s4.d.mts} +83 -43
  6. package/dist/application-BD9LQ2s4.d.mts.map +1 -0
  7. package/dist/application-DwYTFctU.mjs +14 -0
  8. package/dist/application-DwYTFctU.mjs.map +1 -0
  9. package/dist/background-DSztbyc4.mjs +12 -0
  10. package/dist/background-DSztbyc4.mjs.map +1 -0
  11. package/dist/bootstrap-DdTHtS8P.mjs +12 -0
  12. package/dist/{bootstrap-B_sGJNSz.mjs.map → bootstrap-DdTHtS8P.mjs.map} +1 -1
  13. package/dist/{bounded-counters-DS-IbDW9.mjs → bounded-counters-Bd7X3eI5.mjs} +2 -2
  14. package/dist/{bounded-counters-DS-IbDW9.mjs.map → bounded-counters-Bd7X3eI5.mjs.map} +1 -1
  15. package/dist/{breach-padding-C-Dnq8CS.d.mts → breach-padding-FBVGmcBb.d.mts} +3 -3
  16. package/dist/breach-padding-FBVGmcBb.d.mts.map +1 -0
  17. package/dist/{client-ip-BLkoQTIR.mjs → client-ip-DxEVqZP-.mjs} +2 -2
  18. package/dist/{client-ip-BLkoQTIR.mjs.map → client-ip-DxEVqZP-.mjs.map} +1 -1
  19. package/dist/config/index.mjs +2 -2
  20. package/dist/{config-B6EeAw4P.mjs → config-_YTqZtnE.mjs} +3 -3
  21. package/dist/{config-B6EeAw4P.mjs.map → config-_YTqZtnE.mjs.map} +1 -1
  22. package/dist/connect-BlIamapT.d.mts +41 -0
  23. package/dist/connect-BlIamapT.d.mts.map +1 -0
  24. package/dist/context-UaQ6cv0K.mjs +12 -0
  25. package/dist/context-UaQ6cv0K.mjs.map +1 -0
  26. package/dist/{context-errors-CR5NCXfl.mjs → context-errors-DcPmDybm.mjs} +2 -2
  27. package/dist/{context-errors-CR5NCXfl.mjs.map → context-errors-DcPmDybm.mjs.map} +1 -1
  28. package/dist/{contributor-runner--ofCRZ0d.mjs → contributor-runner-BHjr6qSE.mjs} +3 -3
  29. package/dist/{contributor-runner--ofCRZ0d.mjs.map → contributor-runner-BHjr6qSE.mjs.map} +1 -1
  30. package/dist/core/adapter.d.mts +1 -1
  31. package/dist/core/adapter.mjs +1 -1
  32. package/dist/core/app-module.mjs +1 -1
  33. package/dist/core/cache.mjs +1 -1
  34. package/dist/core/container.mjs +2 -2
  35. package/dist/core/cron.mjs +2 -2
  36. package/dist/core/decorators.mjs +2 -2
  37. package/dist/core/errors.mjs +1 -1
  38. package/dist/core/interfaces.mjs +1 -1
  39. package/dist/core/logger.mjs +1 -1
  40. package/dist/core/path.mjs +1 -1
  41. package/dist/core/plugin.d.mts +1 -1
  42. package/dist/core/plugin.mjs +1 -1
  43. package/dist/core/reactivity.mjs +1 -1
  44. package/dist/core-Ddq8b9hi.mjs +12 -0
  45. package/dist/{core-CsMDdzNE.mjs.map → core-Ddq8b9hi.mjs.map} +1 -1
  46. package/dist/{cors-2Bwhyhpt.d.mts → cors-BlR_b0Qb.d.mts} +3 -3
  47. package/dist/cors-BlR_b0Qb.d.mts.map +1 -0
  48. package/dist/{csrf-BDAZK2mm.d.mts → csrf-ZFOrJZhJ.d.mts} +3 -3
  49. package/dist/csrf-ZFOrJZhJ.d.mts.map +1 -0
  50. package/dist/decorate-wrAUzCjW.mjs +13 -0
  51. package/dist/{decorate-CLeX6hbL.mjs.map → decorate-wrAUzCjW.mjs.map} +1 -1
  52. package/dist/{define-adapter-RbKRSG3i.mjs → define-adapter-Ce1FDvEo.mjs} +2 -2
  53. package/dist/{define-adapter-RbKRSG3i.mjs.map → define-adapter-Ce1FDvEo.mjs.map} +1 -1
  54. package/dist/{di-hooks-CiNaIu12.mjs → di-hooks-MFthA-Fs.mjs} +9 -4
  55. package/dist/di-hooks-MFthA-Fs.mjs.map +1 -0
  56. package/dist/{disposables-DYTkgNiG.mjs → disposables-BgUIg4s1.mjs} +1 -1
  57. package/dist/{error-handler-CbP7hKdJ.d.mts → error-handler-CH4PPZCK.d.mts} +2 -2
  58. package/dist/{error-handler-CbP7hKdJ.d.mts.map → error-handler-CH4PPZCK.d.mts.map} +1 -1
  59. package/dist/express-BcfJgvBP.mjs +12 -0
  60. package/dist/express-BcfJgvBP.mjs.map +1 -0
  61. package/dist/express-lazy-DCYWtKZx.mjs +12 -0
  62. package/dist/express-lazy-DCYWtKZx.mjs.map +1 -0
  63. package/dist/handler-CS1BhG0C.mjs +12 -0
  64. package/dist/{handler-Cw4mr3ls.mjs.map → handler-CS1BhG0C.mjs.map} +1 -1
  65. package/dist/{helmet-CEOmo516.d.mts → helmet-BVuVBl-D.d.mts} +3 -3
  66. package/dist/helmet-BVuVBl-D.d.mts.map +1 -0
  67. package/dist/{host-H7CIkHNB.mjs → host-lMSIGnh7.mjs} +2 -2
  68. package/dist/{host-H7CIkHNB.mjs.map → host-lMSIGnh7.mjs.map} +1 -1
  69. package/dist/http/application.d.mts +2 -2
  70. package/dist/http/application.mjs +2 -2
  71. package/dist/http/bootstrap.d.mts +1 -1
  72. package/dist/http/bootstrap.mjs +2 -2
  73. package/dist/http/context.d.mts +1 -1
  74. package/dist/http/context.mjs +2 -2
  75. package/dist/http/middleware/allowed-hosts.d.mts +1 -1
  76. package/dist/http/middleware/allowed-hosts.mjs +2 -2
  77. package/dist/http/middleware/allowed-hosts.mjs.map +1 -1
  78. package/dist/http/middleware/breach-padding.d.mts +1 -1
  79. package/dist/http/middleware/breach-padding.mjs +1 -1
  80. package/dist/http/middleware/breach-padding.mjs.map +1 -1
  81. package/dist/http/middleware/cors.d.mts +1 -1
  82. package/dist/http/middleware/cors.mjs +1 -1
  83. package/dist/http/middleware/cors.mjs.map +1 -1
  84. package/dist/http/middleware/csrf.d.mts +1 -1
  85. package/dist/http/middleware/csrf.mjs +2 -2
  86. package/dist/http/middleware/csrf.mjs.map +1 -1
  87. package/dist/http/middleware/error-handler.d.mts +1 -1
  88. package/dist/http/middleware/error-handler.mjs +2 -2
  89. package/dist/http/middleware/helmet.d.mts +1 -1
  90. package/dist/http/middleware/helmet.mjs +1 -1
  91. package/dist/http/middleware/helmet.mjs.map +1 -1
  92. package/dist/http/middleware/rate-limit.d.mts +1 -1
  93. package/dist/http/middleware/rate-limit.mjs +2 -2
  94. package/dist/http/middleware/rate-limit.mjs.map +1 -1
  95. package/dist/http/middleware/request-id.d.mts +1 -1
  96. package/dist/http/middleware/request-id.mjs +1 -1
  97. package/dist/http/middleware/request-id.mjs.map +1 -1
  98. package/dist/http/middleware/request-logger.mjs +2 -2
  99. package/dist/http/middleware/session.d.mts +1 -1
  100. package/dist/http/middleware/session.mjs +2 -2
  101. package/dist/http/middleware/session.mjs.map +1 -1
  102. package/dist/http/middleware/spa.d.mts +1 -1
  103. package/dist/http/middleware/spa.mjs +2 -2
  104. package/dist/http/middleware/upload.d.mts +3 -2
  105. package/dist/http/middleware/upload.mjs +2 -2
  106. package/dist/http/middleware/upload.mjs.map +1 -1
  107. package/dist/http/middleware/validate.d.mts +1 -1
  108. package/dist/http/middleware/validate.mjs +1 -1
  109. package/dist/http/middleware/validate.mjs.map +1 -1
  110. package/dist/http/middleware/views.d.mts +1 -1
  111. package/dist/http/middleware/views.mjs +2 -2
  112. package/dist/http/middleware/views.mjs.map +1 -1
  113. package/dist/http/query/index.mjs +2 -2
  114. package/dist/http/router-builder.d.mts +1 -1
  115. package/dist/http/router-builder.mjs +2 -2
  116. package/dist/http/runtimes/express.d.mts +47 -0
  117. package/dist/http/runtimes/express.d.mts.map +1 -0
  118. package/dist/http/runtimes/express.mjs +11 -0
  119. package/dist/http/runtimes/fastify.d.mts +1 -1
  120. package/dist/http/runtimes/fastify.mjs +2 -2
  121. package/dist/http/runtimes/fastify.mjs.map +1 -1
  122. package/dist/http/runtimes/h3-web.mjs +1 -1
  123. package/dist/http/runtimes/h3.d.mts +1 -1
  124. package/dist/http/runtimes/h3.mjs +2 -2
  125. package/dist/index.d.mts +17 -16
  126. package/dist/index.mjs +3 -3
  127. package/dist/index.mjs.map +1 -1
  128. package/dist/{is-production-BTroGhp5.mjs → is-production-MYGnN2Nv.mjs} +2 -2
  129. package/dist/{is-production-BTroGhp5.mjs.map → is-production-MYGnN2Nv.mjs.map} +1 -1
  130. package/dist/{jobs-xqoMmdr4.mjs → jobs-ANHUk_Ht.mjs} +3 -3
  131. package/dist/{jobs-xqoMmdr4.mjs.map → jobs-ANHUk_Ht.mjs.map} +1 -1
  132. package/dist/{kv-stores-DXFBEYYu.d.mts → kv-stores-C1sQs2Rb.d.mts} +4 -4
  133. package/dist/{kv-stores-DXFBEYYu.d.mts.map → kv-stores-C1sQs2Rb.d.mts.map} +1 -1
  134. package/dist/{kv-stores-0-6blGzh.mjs → kv-stores-Cro8JwAF.mjs} +3 -3
  135. package/dist/{kv-stores-0-6blGzh.mjs.map → kv-stores-Cro8JwAF.mjs.map} +1 -1
  136. package/dist/lazy-serve-static-Zge6_pKo.mjs +12 -0
  137. package/dist/lazy-serve-static-Zge6_pKo.mjs.map +1 -0
  138. package/dist/{metadata-Bm65Y-5O.mjs → metadata-_LqQme8p.mjs} +1 -1
  139. package/dist/{observers-BAXkwMx0.mjs → observers-Oedvuzit.mjs} +2 -2
  140. package/dist/{observers-BAXkwMx0.mjs.map → observers-Oedvuzit.mjs.map} +1 -1
  141. package/dist/precompressed-B6wz_5tz.mjs +12 -0
  142. package/dist/precompressed-B6wz_5tz.mjs.map +1 -0
  143. package/dist/{query-CGyw7vNi.mjs → query-KMR84Kwu.mjs} +2 -2
  144. package/dist/{query-CGyw7vNi.mjs.map → query-KMR84Kwu.mjs.map} +1 -1
  145. package/dist/{rate-limit-BgoeahE5.d.mts → rate-limit-DQDk6bAH.d.mts} +5 -5
  146. package/dist/rate-limit-DQDk6bAH.d.mts.map +1 -0
  147. package/dist/reply-BQTif5Iu.mjs +12 -0
  148. package/dist/reply-BQTif5Iu.mjs.map +1 -0
  149. package/dist/{request-id-CVzJ1uHD.d.mts → request-id-Dn64nEHK.d.mts} +3 -3
  150. package/dist/request-id-Dn64nEHK.d.mts.map +1 -0
  151. package/dist/request-scope-L71-nmRe.mjs +12 -0
  152. package/dist/request-scope-L71-nmRe.mjs.map +1 -0
  153. package/dist/{respond-BOlh-baJ.mjs → respond-DR7zkOUf.mjs} +2 -2
  154. package/dist/{respond-BOlh-baJ.mjs.map → respond-DR7zkOUf.mjs.map} +1 -1
  155. package/dist/rolldown-runtime-DouoOEDq.mjs +11 -0
  156. package/dist/{route-flag-BPSq2JCs.mjs → route-flag-DCOS_F5A.mjs} +3 -3
  157. package/dist/{route-flag-BPSq2JCs.mjs.map → route-flag-DCOS_F5A.mjs.map} +1 -1
  158. package/dist/{route-policy-DDszB6dQ.mjs → route-policy-Cy-oSUro.mjs} +2 -2
  159. package/dist/{route-policy-DDszB6dQ.mjs.map → route-policy-Cy-oSUro.mjs.map} +1 -1
  160. package/dist/{router-builder-BewIsj7V.d.mts → router-builder-BfbEdxew.d.mts} +2 -2
  161. package/dist/{router-builder-BewIsj7V.d.mts.map → router-builder-BfbEdxew.d.mts.map} +1 -1
  162. package/dist/{router-builder-DoaDAmK8.mjs → router-builder-U-kiHlqo.mjs} +3 -3
  163. package/dist/{router-builder-DoaDAmK8.mjs.map → router-builder-U-kiHlqo.mjs.map} +1 -1
  164. package/dist/{session-ChXx7jG5.d.mts → session-8uNRCplB.d.mts} +3 -3
  165. package/dist/session-8uNRCplB.d.mts.map +1 -0
  166. package/dist/{settings-CRkMOwcz.mjs → settings-CrEgdXc0.mjs} +3 -3
  167. package/dist/{settings-CRkMOwcz.mjs.map → settings-CrEgdXc0.mjs.map} +1 -1
  168. package/dist/{token-2CJq89za.mjs → token-B1FRPTVt.mjs} +1 -1
  169. package/dist/upload-Jgs9BFC4.d.mts +55 -0
  170. package/dist/upload-Jgs9BFC4.d.mts.map +1 -0
  171. package/dist/{upload-config-Be7w0Dfx.mjs → upload-config-DEnNEwL4.mjs} +2 -2
  172. package/dist/upload-config-DEnNEwL4.mjs.map +1 -0
  173. package/dist/{url-for-EQsmb3yi.mjs → url-for-CLtZIeYd.mjs} +3 -3
  174. package/dist/{url-for-EQsmb3yi.mjs.map → url-for-CLtZIeYd.mjs.map} +1 -1
  175. package/dist/{validate-CzjCbRUn.d.mts → validate-D4Poe2EE.d.mts} +3 -3
  176. package/dist/validate-D4Poe2EE.d.mts.map +1 -0
  177. package/dist/{web-crypto-G-m6c6w2.mjs → web-crypto-B6iM0yYx.mjs} +2 -2
  178. package/dist/{web-crypto-G-m6c6w2.mjs.map → web-crypto-B6iM0yYx.mjs.map} +1 -1
  179. package/dist/web.d.mts +3 -3
  180. package/dist/web.mjs +2 -2
  181. package/dist/web.mjs.map +1 -1
  182. package/package.json +9 -2
  183. package/dist/adapter-BZ1WzN1z.d.mts.map +0 -1
  184. package/dist/allowed-hosts-D6qcuK5I.d.mts.map +0 -1
  185. package/dist/application-Bs30gJF1.mjs +0 -14
  186. package/dist/application-Bs30gJF1.mjs.map +0 -1
  187. package/dist/application-D5Iiy7rt.d.mts.map +0 -1
  188. package/dist/bootstrap-B_sGJNSz.mjs +0 -12
  189. package/dist/breach-padding-C-Dnq8CS.d.mts.map +0 -1
  190. package/dist/context-CRJzl_Mj.mjs +0 -12
  191. package/dist/context-CRJzl_Mj.mjs.map +0 -1
  192. package/dist/core-CsMDdzNE.mjs +0 -12
  193. package/dist/cors-2Bwhyhpt.d.mts.map +0 -1
  194. package/dist/csrf-BDAZK2mm.d.mts.map +0 -1
  195. package/dist/decorate-CLeX6hbL.mjs +0 -13
  196. package/dist/di-hooks-CiNaIu12.mjs.map +0 -1
  197. package/dist/handler-Cw4mr3ls.mjs +0 -12
  198. package/dist/helmet-CEOmo516.d.mts.map +0 -1
  199. package/dist/lazy-serve-static-D94xvah5.mjs +0 -12
  200. package/dist/lazy-serve-static-D94xvah5.mjs.map +0 -1
  201. package/dist/rate-limit-BgoeahE5.d.mts.map +0 -1
  202. package/dist/reply-tlUaowib.mjs +0 -12
  203. package/dist/reply-tlUaowib.mjs.map +0 -1
  204. package/dist/request-id-CVzJ1uHD.d.mts.map +0 -1
  205. package/dist/session-ChXx7jG5.d.mts.map +0 -1
  206. package/dist/upload-DkT2p1gd.d.mts +0 -104
  207. package/dist/upload-DkT2p1gd.d.mts.map +0 -1
  208. package/dist/upload-config-Be7w0Dfx.mjs.map +0 -1
  209. package/dist/validate-CzjCbRUn.d.mts.map +0 -1
@@ -1,22 +1,22 @@
1
1
 
2
2
  import "./token-D6jfTQLA.mjs";
3
3
  import { i as SettingsDeclaration } from "./settings-BnE75hnr.mjs";
4
- import { g as FileUploadConfig, k as RouteDefinition, x as MiddlewareHandler } from "./decorators-Dvy0JZ5L.mjs";
4
+ import { g as FileUploadConfig, k as RouteDefinition, o as BaseUploadOptions, x as MiddlewareHandler } from "./decorators-Dvy0JZ5L.mjs";
5
+ import { a as ConnectRequest, i as ConnectNext, n as ConnectHandler, o as ConnectResponse, r as ConnectMiddleware, t as ConnectErrorHandler } from "./connect-BlIamapT.mjs";
5
6
  import { t as Container$1 } from "./container-4iJdDkRH.mjs";
6
7
  import { p as RouteFlags } from "./route-flag-B1lQht6v.mjs";
7
8
  import { i as Constructor, s as MaybePromise } from "./interfaces-C6LHcYsg.mjs";
8
9
  import { C as MetaValue, S as ExecutionContext, m as ContributorRegistrations, o as AnyContributorRegistration, r as AppModuleEntry, t as AppModule, x as ContextMetaKey } from "./app-module-Cuu-Ma_E.mjs";
9
10
  import "./cache-C0qL0NSD.mjs";
10
11
  import { i as ProblemDetails } from "./errors-By6UueCm.mjs";
11
- import { n as Session } from "./session-ChXx7jG5.mjs";
12
+ import { n as Session } from "./session-8uNRCplB.mjs";
12
13
  import { A as TypedParsedQuery, C as PaginatedResponse, D as QueryFieldConfig, _ as CursorQuery, h as CursorPaginatedResponse, m as CursorPaginateOptions, t as ParseQueryOptions } from "./index-Blgka75E.mjs";
13
- import { t as ValidationErrorFactory } from "./validate-CzjCbRUn.mjs";
14
+ import { t as ValidationErrorFactory } from "./validate-D4Poe2EE.mjs";
14
15
  import "reflect-metadata";
15
16
  import { Disposable, disposeAll, getClassMeta, getClassMetaOrUndefined, getMetaMap, getMetaRecord, getMethodMeta, getMethodMetaOrUndefined, hasClassMeta, pushClassMeta, pushMethodMeta, registerDisposable, setClassMeta, setInMetaMap, setInMetaRecord, setMethodMeta } from "@forinda/kickjs-di";
16
17
  import http, { IncomingMessage, ServerResponse } from "node:http";
17
18
  import https from "node:https";
18
19
  import http2 from "node:http2";
19
- import { ErrorRequestHandler, Express as Express$1, NextFunction, Request as Request$1, RequestHandler, Response as Response$1 } from "express";
20
20
  //#region src/core/adapter-conditions.d.ts
21
21
  /**
22
22
  * `true` keeps the adapter; `false` or a string (the reason) leaves it out.
@@ -1006,6 +1006,73 @@ type Headers = Record<string, string | string[] | undefined>;
1006
1006
  */
1007
1007
  declare function evaluatePreconditions(method: string, headers: Headers, validators: Validators): ConditionalOutcome;
1008
1008
  //#endregion
1009
+ //#region src/http/middleware/upload-config.d.ts
1010
+ /**
1011
+ * Resolves a list of file type identifiers to MIME type strings.
1012
+ * Accepts short extensions (`'jpg'`, `'pdf'`) or full MIME types (`'image/jpeg'`).
1013
+ *
1014
+ * @example
1015
+ * ```ts
1016
+ * resolveMimeTypes(['jpg', 'png', 'application/pdf'])
1017
+ * // → ['image/jpeg', 'image/png', 'application/pdf']
1018
+ * ```
1019
+ */
1020
+ declare function resolveMimeTypes(types: string[]): string[];
1021
+ /**
1022
+ * Build a runtime-agnostic `(mimetype, filename) => boolean` file-type filter
1023
+ * from `allowedTypes` (a predicate, or a list of extensions / MIME types /
1024
+ * wildcards). Returned by both the multer middleware (Express) and the
1025
+ * Fastify / h3 / web multipart paths so the accept/reject rule stays
1026
+ * identical across engines. No `allowedTypes` → accept everything.
1027
+ */
1028
+ declare function buildFileTypeFilter(allowedTypes: BaseUploadOptions['allowedTypes'], customMimeMap?: Record<string, string>): (mimetype: string, filename: string) => boolean;
1029
+ /** A multer-shaped uploaded file — what `ctx.file` / `ctx.files` expose. */
1030
+ interface UploadedFileLike {
1031
+ fieldname: string;
1032
+ originalname: string;
1033
+ encoding: string;
1034
+ mimetype: string;
1035
+ size: number;
1036
+ buffer: Buffer;
1037
+ }
1038
+ /**
1039
+ * An uploaded file as `ctx.file` / `ctx.files` hold it, on every runtime —
1040
+ * multer's shape, declared here so the typings need no `@types/multer`. The
1041
+ * disk fields are set only by `upload({ dest })` / a multer `diskStorage`
1042
+ * (Express), which leaves `buffer` unset, as multer does.
1043
+ */
1044
+ interface UploadedFile extends UploadedFileLike {
1045
+ destination?: string;
1046
+ filename?: string;
1047
+ path?: string;
1048
+ }
1049
+ /**
1050
+ * A multer storage engine — `multer.diskStorage()`, `multer.memoryStorage()` or
1051
+ * your own — declared here so the typings need no `@types/multer`.
1052
+ */
1053
+ interface UploadStorageEngine {
1054
+ _handleFile(req: any, file: any, callback: (error?: any, info?: any) => void): void;
1055
+ _removeFile(req: any, file: any, callback: (error: Error | null) => void): void;
1056
+ }
1057
+ /** A buffered multipart file part, as the runtime hands it to {@link applyUploadConfig}. */
1058
+ interface RawUploadPart {
1059
+ fieldname: string;
1060
+ filename: string;
1061
+ mimetype: string;
1062
+ buffer: Buffer;
1063
+ }
1064
+ /**
1065
+ * Apply a `@FileUpload` config to already-buffered multipart parts and return
1066
+ * the multer-shaped `file` / `files` for `ctx`. Enforces the field name, type
1067
+ * filter, per-file size limit, and (array mode) max count — throwing
1068
+ * `HttpException` on a violation, mirroring the Express/multer error path.
1069
+ * Used by the Fastify, h3 and web runtimes; Express keeps using multer directly.
1070
+ */
1071
+ declare function applyUploadConfig(parts: RawUploadPart[], config: FileUploadConfig): {
1072
+ file?: UploadedFileLike;
1073
+ files?: UploadedFileLike[];
1074
+ };
1075
+ //#endregion
1009
1076
  //#region src/http/context.d.ts
1010
1077
  /**
1011
1078
  * Input shape for the typed problem-detail convenience methods on
@@ -1129,7 +1196,7 @@ declare class RequestContext<TBody = any, TParams = any, TQuery = any,
1129
1196
  TKeys extends ContextMetaKey = ContextMetaKey> implements ExecutionContext<TKeys> {
1130
1197
  readonly req: ActiveRuntime['request'];
1131
1198
  readonly res: ActiveRuntime['response'];
1132
- readonly next: NextFunction;
1199
+ readonly next: ConnectNext;
1133
1200
  /**
1134
1201
  * Engine-agnostic response driver the response helpers write through. Under
1135
1202
  * the Express runtime it IS `res` (Express's Response satisfies
@@ -1150,7 +1217,7 @@ TKeys extends ContextMetaKey = ContextMetaKey> implements ExecutionContext<TKeys
1150
1217
  * ```
1151
1218
  */
1152
1219
  get route(): MatchedRoute | undefined;
1153
- constructor(req: ActiveRuntime['request'], res: ActiveRuntime['response'], next: NextFunction, responseDriver?: RuntimeResponse);
1220
+ constructor(req: ActiveRuntime['request'], res: ActiveRuntime['response'], next: ConnectNext, responseDriver?: RuntimeResponse);
1154
1221
  /**
1155
1222
  * Memo of the most recent {@link qs} call this request. The query
1156
1223
  * object is immutable for a request's lifetime, so a repeat call with
@@ -1201,7 +1268,7 @@ TKeys extends ContextMetaKey = ContextMetaKey> implements ExecutionContext<TKeys
1201
1268
  /** Parsed query string — read-only, see {@link body}. */
1202
1269
  get query(): TQuery;
1203
1270
  /** Inbound HTTP headers — read-only, see {@link body}. */
1204
- get headers(): Request$1['headers'];
1271
+ get headers(): ConnectRequest['headers'];
1205
1272
  get requestId(): string | undefined;
1206
1273
  /**
1207
1274
  * `AbortSignal` that fires when the underlying HTTP request is
@@ -1321,14 +1388,14 @@ TKeys extends ContextMetaKey = ContextMetaKey> implements ExecutionContext<TKeys
1321
1388
  * File metadata is set by the upload middleware and shouldn't be
1322
1389
  * mutated downstream.
1323
1390
  */
1324
- get file(): Express.Multer.File | undefined;
1391
+ get file(): UploadedFile | undefined;
1325
1392
  /**
1326
1393
  * Array of uploaded files (requires `@FileUpload({ mode: 'array' })`).
1327
1394
  * The array (and each entry in dev) is wrapped in a read-only Proxy
1328
1395
  * that warns on `push`/`pop` and per-file mutation. Use
1329
1396
  * `ctx.req.files` if you genuinely need the mutable Express handle.
1330
1397
  */
1331
- get files(): Express.Multer.File[] | undefined;
1398
+ get files(): UploadedFile[] | undefined;
1332
1399
  /**
1333
1400
  * Read a value from the per-request metadata store.
1334
1401
  *
@@ -1754,17 +1821,6 @@ type RouteMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
1754
1821
  * next)`; Fastify in its own handler).
1755
1822
  */
1756
1823
  type CtxHandler = (ctx: RequestContext) => unknown | Promise<unknown>;
1757
- /**
1758
- * Connect-style middleware — the portable middleware format. Built-in
1759
- * middleware and adopter-supplied Express middleware are this shape. The
1760
- * Express runtime hands them straight to `app.use`; later runtimes bridge
1761
- * them (Fastify via `@fastify/middie`, h3 via its node adapter).
1762
- *
1763
- * Typed as the Express handler union for M1 (Express is the only runtime);
1764
- * a future milestone narrows this to bare node `(req, res, next)` primitives
1765
- * once the driver layer lands.
1766
- */
1767
- type ConnectMiddleware = RequestHandler | ErrorRequestHandler;
1768
1824
  /**
1769
1825
  * One materialized route, as plain data. Produced by {@link buildRouteTable}
1770
1826
  * from decorator metadata; consumed by {@link HttpRuntime.mountRoutes}.
@@ -1900,12 +1956,6 @@ interface RuntimeTypeMap {
1900
1956
  response: unknown;
1901
1957
  app: unknown;
1902
1958
  }
1903
- /** The Express runtime's native types — the default when nothing is augmented. */
1904
- interface ExpressRuntimeTypes {
1905
- request: Request$1;
1906
- response: Response$1;
1907
- app: Express$1;
1908
- }
1909
1959
  /**
1910
1960
  * Augmentable runtime registry. Empty by default; the `kick/runtime` typegen
1911
1961
  * plugin emits a `{ runtime: <RuntimeTypeMap> }` augmentation from the configured
@@ -1925,10 +1975,24 @@ interface ExpressRuntimeTypes {
1925
1975
  * ```
1926
1976
  */
1927
1977
  interface KickRuntimeRegister {}
1928
- /** The active runtime's type map — the augmented one, or Express by default. */
1978
+ /**
1979
+ * The active runtime's type map — the augmented one, or the connect-style
1980
+ * {@link ConnectRuntimeTypes} when nothing is augmented. `kick typegen` augments it from kick.config's
1981
+ * `runtime`, Express included.
1982
+ */
1929
1983
  type ActiveRuntime = KickRuntimeRegister extends {
1930
1984
  runtime: infer R extends RuntimeTypeMap;
1931
- } ? R : ExpressRuntimeTypes;
1985
+ } ? R : ConnectRuntimeTypes;
1986
+ /**
1987
+ * What the escape hatches are typed as with no augmentation: the connect-style
1988
+ * request and response every runtime's middleware sees, and an app of unknown
1989
+ * engine.
1990
+ */
1991
+ interface ConnectRuntimeTypes {
1992
+ request: ConnectRequest;
1993
+ response: ConnectResponse;
1994
+ app: unknown;
1995
+ }
1932
1996
  /** Options passed to {@link HttpRuntime.createApp}. */
1933
1997
  interface RuntimeAppOptions {
1934
1998
  /**
@@ -2006,6 +2070,20 @@ interface HttpRuntime<TApp = unknown> {
2006
2070
  setNotFound(app: TApp, mw: ConnectMiddleware): void;
2007
2071
  /** Terminal error handler. */
2008
2072
  setErrorHandler(app: TApp, mw: ConnectMiddleware): void;
2073
+ /**
2074
+ * Load the engine before the first `createApp()` — for a runtime that
2075
+ * imports it lazily, as the root `expressRuntime()` does so that
2076
+ * `@forinda/kickjs` doesn't need `express` installed. Awaited at setup.
2077
+ */
2078
+ load?(): Promise<void>;
2079
+ /**
2080
+ * Body parsers to mount among the default middleware, for an engine that
2081
+ * doesn't parse request bodies itself (`capabilities.nativeBodyParsing:
2082
+ * false`). `limit` is `bootstrap({ jsonLimit })`.
2083
+ */
2084
+ bodyParsers?(options: {
2085
+ limit: string | number;
2086
+ }): ConnectMiddleware[];
2009
2087
  /** Release the engine app on shutdown (Fastify runs its `onClose` hooks). */
2010
2088
  close?(app: TApp): void | Promise<void>;
2011
2089
  readonly capabilities: RuntimeCapabilities;
@@ -2068,12 +2146,11 @@ type MiddlewarePath = string | RegExp | ReadonlyArray<string | RegExp>;
2068
2146
  /** A middleware entry contributed by an adapter */
2069
2147
  interface AdapterMiddleware {
2070
2148
  /**
2071
- * Express handler: either a `RequestHandler` (`(req, res, next) => …`)
2072
- * or an `ErrorRequestHandler` (`(err, req, res, next) => …`).
2073
- * Express dispatches based on arity, so the same field accepts both
2074
- * without a discriminant.
2149
+ * Connect-style middleware: `(req, res, next) => …` or, for errors,
2150
+ * `(err, req, res, next) => …` — told apart by arity, so the one field takes
2151
+ * both. Express middleware fits as is; it runs on every runtime.
2075
2152
  */
2076
- handler: RequestHandler | ErrorRequestHandler;
2153
+ handler: ConnectHandler | ConnectErrorHandler;
2077
2154
  /** Which phase to insert into (default: 'afterGlobal') */
2078
2155
  phase?: MiddlewarePhase;
2079
2156
  /**
@@ -2138,6 +2215,17 @@ interface AdapterContext {
2138
2215
  * for HTTP/1.1 clients, which is what WebSocket libraries attach to.
2139
2216
  */
2140
2217
  server?: KickServer;
2218
+ /**
2219
+ * The management listener, when `bootstrap({ management })` runs one: the
2220
+ * same app and container on a second port, serving `/health` — and whatever
2221
+ * an adapter registers on `management.http` (DevTools' `/_debug`), kept off
2222
+ * the public port. `server` is set from `afterStart` on. Absent without the
2223
+ * option, and in dev mode, where Vite owns the only server.
2224
+ */
2225
+ management?: {
2226
+ http: AdapterHttp;
2227
+ server?: http.Server | https.Server;
2228
+ };
2141
2229
  /** Current NODE_ENV value (default: 'production' — unset fails closed) */
2142
2230
  env: string;
2143
2231
  /** true unless NODE_ENV is exactly 'development' or 'test' */
@@ -2350,5 +2438,5 @@ interface AppAdapter {
2350
2438
  /** Constructor type for AppAdapter classes */
2351
2439
  type AppAdapterClass = new () => AppAdapter;
2352
2440
  //#endregion
2353
- export { getMetaMap as $, SseHandler as A, IntrospectionSnapshot as At, AdapterAsyncOptions as B, onEnv as Bt, RuntimeResponse as C, KickPlugin as Ct, DeepReadonly as D, KickJsPluginRegistry as Dt, Ctx as E, KickJsPluginName as Et, ROUTE_URLS as F, reportResponse as Ft, runContributors as G, DefineAdapterOptions as H, RouteName as I, FailureAdvice as It, ContributorSource as J, BuildPipelineOptions as K, UrlBuilder as L, AdapterCondition as Lt, ConditionalOutcome as M, ErrorSource as Mt, Validators as N, ResponseInfo as Nt, RequestContext as O, IntrospectFn as Ot, evaluatePreconditions as P, reportError as Pt, getClassMetaOrUndefined as Q, UrlForArgs as R, ConditionOutcome as Rt, RuntimeCapabilities as S, definePlugin as St, UseConnectOptions as T, MutableModuleRegistry as Tt, defineAdapter as U, AdapterFactory as V, onPackage as Vt, RunContributorsOptions as W, buildPipeline as X, SourcedRegistration as Y, getClassMeta as Z, RouteEntry as _, defineModule as _t, KickServer as a, pushMethodMeta as at, RouteTable as b, PluginAsyncOptions as bt, ActiveRuntime as c, setInMetaRecord as ct, CtxHandler as d, disposeAll as dt, getMetaRecord as et, ExpressRuntimeTypes as f, registerDisposable as ft, RouteContributor as g, ModuleFactory as gt, MatchedRoute as h, DefineModuleOptions as ht, AppAdapterClass as i, pushClassMeta as it, contentDisposition as j, ErrorInfo as jt, RouteShape as k, IntrospectionKind as kt, AdapterHttp as l, setMethodMeta as lt, KickRuntimeRegister as m, defineModules as mt, AdapterMiddleware as n, getMethodMetaOrUndefined as nt, MiddlewarePath as o, setClassMeta as ot, HttpRuntime as p, ModuleList as pt, ContributorPipeline as q, AppAdapter as r, hasClassMeta as rt, MiddlewarePhase as s, setInMetaMap as st, AdapterContext as t, getMethodMeta as tt, ConnectMiddleware as u, Disposable as ut, RouteMeta as v, BuildContext as vt, RuntimeTypeMap as w, ModuleRegistry as wt, RuntimeAppOptions as x, PluginFactory as xt, RouteMethod as y, DefinePluginOptions as yt, UrlQuery as z, allOf as zt };
2354
- //# sourceMappingURL=adapter-BZ1WzN1z.d.mts.map
2441
+ export { ContributorSource as $, RawUploadPart as A, MutableModuleRegistry as At, ROUTE_URLS as B, reportResponse as Bt, UseConnectOptions as C, BuildContext as Ct, RouteShape as D, definePlugin as Dt, RequestContext as E, PluginFactory as Et, buildFileTypeFilter as F, IntrospectionSnapshot as Ft, AdapterAsyncOptions as G, onEnv as Gt, UrlBuilder as H, AdapterCondition as Ht, resolveMimeTypes as I, ErrorInfo as It, defineAdapter as J, AdapterFactory as K, onPackage as Kt, ConditionalOutcome as L, ErrorSource as Lt, UploadedFile as M, KickJsPluginRegistry as Mt, UploadedFileLike as N, IntrospectFn as Nt, SseHandler as O, KickPlugin as Ot, applyUploadConfig as P, IntrospectionKind as Pt, ContributorPipeline as Q, Validators as R, ResponseInfo as Rt, RuntimeTypeMap as S, defineModule as St, DeepReadonly as T, PluginAsyncOptions as Tt, UrlForArgs as U, ConditionOutcome as Ut, RouteName as V, FailureAdvice as Vt, UrlQuery as W, allOf as Wt, runContributors as X, RunContributorsOptions as Y, BuildPipelineOptions as Z, RouteMethod as _, registerDisposable as _t, KickServer as a, getMetaRecord as at, RuntimeCapabilities as b, DefineModuleOptions as bt, ActiveRuntime as c, hasClassMeta as ct, HttpRuntime as d, setClassMeta as dt, SourcedRegistration as et, KickRuntimeRegister as f, setInMetaMap as ft, RouteMeta as g, disposeAll as gt, RouteEntry as h, Disposable as ht, AppAdapterClass as i, getMetaMap as it, UploadStorageEngine as j, KickJsPluginName as jt, contentDisposition as k, ModuleRegistry as kt, AdapterHttp as l, pushClassMeta as lt, RouteContributor as m, setMethodMeta as mt, AdapterMiddleware as n, getClassMeta as nt, MiddlewarePath as o, getMethodMeta as ot, MatchedRoute as p, setInMetaRecord as pt, DefineAdapterOptions as q, AppAdapter as r, getClassMetaOrUndefined as rt, MiddlewarePhase as s, getMethodMetaOrUndefined as st, AdapterContext as t, buildPipeline as tt, CtxHandler as u, pushMethodMeta as ut, RouteTable as v, ModuleList as vt, Ctx as w, DefinePluginOptions as wt, RuntimeResponse as x, ModuleFactory as xt, RuntimeAppOptions as y, defineModules as yt, evaluatePreconditions as z, reportError as zt };
2442
+ //# sourceMappingURL=adapter-9sPr_5xt.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter-9sPr_5xt.d.mts","names":["Container","Container","_0","NextFunction","Request","RequestHandler","ErrorRequestHandler","Container"],"sources":["../src/core/adapter-conditions.ts","../src/core/failure-analysis.ts","../src/core/observers.ts","../src/core/introspect.ts","../src/core/augmentation.ts","../src/core/module-registry.ts","../src/core/plugin.ts","../src/core/define-plugin.ts","../src/core/define-module.ts","../src/core/define-modules.ts","../src/core/contributor-pipeline.ts","../src/core/contributor-runner.ts","../src/core/define-adapter.ts","../src/http/url-for.ts","../src/http/conditional.ts","../src/http/middleware/upload-config.ts","../src/http/context.ts","../src/http/runtime.ts","../src/core/adapter.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;KAcY;;UAGK;EACf;EACA;;EAEA;;;;;;;;iBASc,MAAM,cAAc,iBAAiB;;;;;;;iBAiBrC,UAAU,eAAe;;iBAqBzB,SAAS,YAAY,qBAAqB;;;;;;;;;;UC5DzC;EACf;EACA;EACA;;;;;KCSU;UAQK;EACf,QAAQ;EACR;EACA;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;UAGK;EACf;EACA;;EAEA;EACA;EACA;EACA;;;;;;;;iBAiFc,YAAY,gBAAgB,MAAM;;iBAKlC,eAAe,MAAM;;;;;;;;;;;;;;;;;;;;;UCrHpB;;;;;;;;;;EAUf;;EAEA;;EAEA,MAAM;;EAEN;;;;;EAKA,QAAQ;;EAER;IAAW;IAA6B;;;;;;EAKxC,UAAU;;EAEV;;;;;;;;KASU;;;;;;KAOA,qBAAqB,wBAAwB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UC3ChD;;;;;;;;;KAUL,yBAAyB,oDAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UCAO;;;;;;;;;;;EAWf,MAAM,QAAQ;;;;;;;;;;;cAYH,iCAAiC;WACnC,SAAS;EAElB,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UC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lD,YAAY,MAAM,sBAAsB;;;;;;;;;;;;;;;;EAiBxC,aAAa;;;;;;;;;;;;;EAcb,eAAe,wBAAwB,QAAQ;;;;;;;;;;;EAY/C;;;KAIU,4BAA4B"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { NextFunction, Request, Response } from "express";
2
+ import { a as ConnectRequest, i as ConnectNext, o as ConnectResponse } from "./connect-BlIamapT.mjs";
3
3
  //#region src/http/middleware/allowed-hosts.d.ts
4
4
  interface AllowedHostsOptions {
5
5
  /**
@@ -40,7 +40,7 @@ interface AllowedHostsOptions {
40
40
  * bootstrap({ security: { allowedHosts: ['example.com', '.example.com'] } })
41
41
  * ```
42
42
  */
43
- declare function allowedHosts(options: string[] | AllowedHostsOptions): (req: Request, res: Response, next: NextFunction) => void;
43
+ declare function allowedHosts(options: string[] | AllowedHostsOptions): (req: ConnectRequest, res: ConnectResponse, next: ConnectNext) => void;
44
44
  //#endregion
45
45
  export { allowedHosts as n, AllowedHostsOptions as t };
46
- //# sourceMappingURL=allowed-hosts-D6qcuK5I.d.mts.map
46
+ //# sourceMappingURL=allowed-hosts-BpKwviq5.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allowed-hosts-BpKwviq5.d.mts","names":["Request","Response","NextFunction"],"sources":["../src/http/middleware/allowed-hosts.ts"],"mappings":";;;UASiB;;;;;;;EAOf;;;;;;;;;;;EAWA;;;;;;;EAOA;;;;;;;;;;;;;;iBAsDc,aAAa,oBAAoB,uBAAmB,KASrDA,gBAAO,KAAOC,iBAAQ,MAAQC"}
@@ -1,26 +1,20 @@
1
1
 
2
2
  import { i as SettingsDeclaration, s as VarOrigin, t as ConfigVar } from "./settings-BnE75hnr.mjs";
3
3
  import "./index-B4aOLoId.mjs";
4
- import { C as RuntimeResponse, Ct as KickPlugin, I as RouteName, Nt as ResponseInfo, O as RequestContext, R as UrlForArgs, Rt as ConditionOutcome, S as RuntimeCapabilities, V as AdapterFactory, _ as RouteEntry, a as KickServer, c as ActiveRuntime, g as RouteContributor, gt as ModuleFactory, p as HttpRuntime, r as AppAdapter, wt as ModuleRegistry } from "./adapter-BZ1WzN1z.mjs";
4
+ import { E as RequestContext, K as AdapterFactory, Ot as KickPlugin, Rt as ResponseInfo, U as UrlForArgs, Ut as ConditionOutcome, V as RouteName, a as KickServer, b as RuntimeCapabilities, c as ActiveRuntime, d as HttpRuntime, h as RouteEntry, kt as ModuleRegistry, m as RouteContributor, r as AppAdapter, x as RuntimeResponse, xt as ModuleFactory } from "./adapter-9sPr_5xt.mjs";
5
+ import { a as ConnectRequest, i as ConnectNext, n as ConnectHandler, o as ConnectResponse } from "./connect-BlIamapT.mjs";
5
6
  import { t as Container } from "./container-4iJdDkRH.mjs";
6
7
  import { p as RouteFlags, s as RouteFlagDeclarations } from "./route-flag-B1lQht6v.mjs";
7
8
  import { C as MetaValue, c as ContextDecorator, h as DepValue, m as ContributorRegistrations, r as AppModuleEntry, u as ContextDecoratorSpec, x as ContextMetaKey } from "./app-module-Cuu-Ma_E.mjs";
8
- import { l as PlatformContext, m as Reply } from "./kv-stores-DXFBEYYu.mjs";
9
- import "./session-ChXx7jG5.mjs";
10
- import { t as ValidationErrorFactory } from "./validate-CzjCbRUn.mjs";
11
- import { t as AllowedHostsOptions } from "./allowed-hosts-D6qcuK5I.mjs";
12
- import { t as BuildRoutesOptions } from "./router-builder-BewIsj7V.mjs";
13
- import "./request-id-CVzJ1uHD.mjs";
14
- import "./error-handler-CbP7hKdJ.mjs";
15
- import "./csrf-BDAZK2mm.mjs";
16
- import "./helmet-CEOmo516.mjs";
17
- import "./breach-padding-C-Dnq8CS.mjs";
18
- import "./cors-2Bwhyhpt.mjs";
19
- import "./rate-limit-BgoeahE5.mjs";
20
- import "./upload-DkT2p1gd.mjs";
9
+ import { l as PlatformContext, m as Reply } from "./kv-stores-C1sQs2Rb.mjs";
10
+ import { t as ValidationErrorFactory } from "./validate-D4Poe2EE.mjs";
11
+ import { t as AllowedHostsOptions } from "./allowed-hosts-BpKwviq5.mjs";
12
+ import { t as BuildRoutesOptions } from "./router-builder-BfbEdxew.mjs";
13
+ import "./error-handler-CH4PPZCK.mjs";
14
+ import "./csrf-ZFOrJZhJ.mjs";
15
+ import "./upload-Jgs9BFC4.mjs";
21
16
  import http, { IncomingMessage, ServerResponse } from "node:http";
22
17
  import tls from "node:tls";
23
- import { Express, NextFunction, Request as Request$1, RequestHandler, Response as Response$1, Router } from "express";
24
18
  import { AsyncLocalStorage } from "node:async_hooks";
25
19
  //#region src/core/kick-error.d.ts
26
20
  /**
@@ -465,6 +459,12 @@ interface MetricsOptions {
465
459
  token?: string;
466
460
  /** Histogram buckets, in seconds. Default: Prometheus' defaults, 5ms to 10s. */
467
461
  buckets?: number[];
462
+ /**
463
+ * Serve the metrics on the management port (`bootstrap({ management: { port } })`)
464
+ * instead of the app's — reachable by the scraper, not the public. Without a
465
+ * management port it stays on the app's.
466
+ */
467
+ management?: boolean;
468
468
  }
469
469
  /** The request histogram, keyed by its label set. */
470
470
  declare class RequestHistogram {
@@ -767,31 +767,20 @@ interface Signer {
767
767
  /** Create a signer for one purpose. */
768
768
  declare function createSigner(options: SignerOptions): Signer;
769
769
  //#endregion
770
- //#region src/http/runtimes/express.d.ts
770
+ //#region src/http/runtimes/express-lazy.d.ts
771
+ /** The default HTTP runtime; Express loads on the Application's first setup. */
772
+ declare function expressRuntime(): HttpRuntime;
771
773
  /**
772
- * Materialize a controller's {@link RouteEntry}[] onto a fresh `express.Router`.
773
- * Reproduces the legacy handler ordering precisely: validation → upload →
774
- * `(ctx, next)` middleware → contributor runner → terminal handler, with
775
- * `beforeValidation` contributors ahead of validation. Each step
776
- * constructs its own `RequestContext` over the same `req`/`res` — request-scoped
777
- * state lives in the AsyncLocalStorage store, not on the ctx instance, so the
778
- * per-step instances share state exactly as before.
779
- */
780
- declare function materializeRouter(entries: RouteEntry[]): Router;
781
- /**
782
- * Build an Express Router from a controller class decorated with @Get, @Post,
783
- * etc. The public, back-compatible entry point: a thin shim over
784
- * {@link buildRouteTable} + {@link materializeRouter}. Returns an
785
- * `express.Router` exactly as before — modules pass it to `app.use(path, router)`.
786
- *
787
- * @see buildRouteTable for the engine-neutral route-table form.
774
+ * Materialize route entries onto an Express `Router`, built on the first
775
+ * request (Express has loaded by then in an app running it).
788
776
  */
789
- declare function buildRoutes(controllerClass: any, options?: BuildRoutesOptions): Router;
777
+ declare function materializeRouter(entries: RouteEntry[]): ConnectHandler;
790
778
  /**
791
- * The default HTTP runtime. Express stays a peer dependency of `@forinda/kickjs`;
792
- * apps that pass no `runtime` get this and behave exactly as before.
779
+ * A controller's routes as an Express `Router`. The route table is built now,
780
+ * so a contributor cycle or a missing dependency still fails at boot; the
781
+ * router on the first request.
793
782
  */
794
- declare function expressRuntime(): HttpRuntime<Express>;
783
+ declare function buildRoutes(controllerClass: any, options?: BuildRoutesOptions): ConnectHandler;
795
784
  //#endregion
796
785
  //#region src/http/request-store.d.ts
797
786
  /** Per-request storage for REQUEST-scoped DI and request context propagation */
@@ -872,7 +861,7 @@ declare function getRequestValue<K extends ContextMetaKey>(key: K): MetaValue<K>
872
861
  * `Application` mounts this automatically unless `contextStore: 'manual'` is set
873
862
  * or the user already includes one in their middleware list.
874
863
  */
875
- declare function requestScopeMiddleware(): (req: Request$1, res: Response$1, next: NextFunction) => void;
864
+ declare function requestScopeMiddleware(): (req: ConnectRequest, res: ConnectResponse, next: ConnectNext) => void;
876
865
  //#endregion
877
866
  //#region src/http/middleware/trace-context.d.ts
878
867
  /**
@@ -926,7 +915,7 @@ declare function parseTraceparent(header: string): TraceContext | null;
926
915
  * })
927
916
  * ```
928
917
  */
929
- declare function traceContext(options?: TraceContextOptions): (req: Request$1, res: Response$1, next: NextFunction) => void;
918
+ declare function traceContext(options?: TraceContextOptions): (req: ConnectRequest, res: ConnectResponse, next: ConnectNext) => void;
930
919
  //#endregion
931
920
  //#region src/http/middleware/views.d.ts
932
921
  interface ViewAdapterOptions {
@@ -1141,6 +1130,8 @@ interface HealthCheckResult {
1141
1130
  interface HealthProbe {
1142
1131
  /** True once shutdown has begun and traffic should drain away. */
1143
1132
  isDraining(): boolean;
1133
+ /** True while the app is still starting — before it serves. */
1134
+ isStarting?(): boolean;
1144
1135
  /** Aggregated `onHealthCheck()` results from every adapter that has one. */
1145
1136
  checks(): Promise<HealthCheckResult[]>;
1146
1137
  }
@@ -1207,9 +1198,9 @@ declare const healthModule: ModuleFactory<HealthModuleConfig, unknown>;
1207
1198
  * A middleware entry in the declarative pipeline.
1208
1199
  * Can be a bare handler or an object with path scoping.
1209
1200
  */
1210
- type MiddlewareEntry = RequestHandler | {
1201
+ type MiddlewareEntry = ConnectHandler | {
1211
1202
  path: string;
1212
- handler: RequestHandler;
1203
+ handler: ConnectHandler;
1213
1204
  };
1214
1205
  /** Options for {@link Application.shutdown}. */
1215
1206
  interface ShutdownOptions {
@@ -1330,6 +1321,22 @@ interface ApplicationOptions {
1330
1321
  * ```
1331
1322
  */
1332
1323
  server?: ServerOptions;
1324
+ /**
1325
+ * Serve operational endpoints on a second port — the same app and container,
1326
+ * a second listener, like Spring Boot's `management.server.port`. `/health/live`
1327
+ * and `/health/ready` move there, off the public port, along with whatever
1328
+ * adapters register on `AdapterContext.management` (DevTools with
1329
+ * `DevToolsAdapter({ management: true })`). The management port skips the
1330
+ * app's middleware, and keeps answering while the public port drains.
1331
+ *
1332
+ * Off by default. Ignored in dev mode (Vite owns the only server) and in
1333
+ * handler mode (serverless), where everything stays on the one entry.
1334
+ *
1335
+ * ```ts
1336
+ * bootstrap({ modules, management: { port: 9090 } })
1337
+ * ```
1338
+ */
1339
+ management?: ManagementOptions;
1333
1340
  /** Global API prefix (default: '/api'). Pass `''` to mount at the root. */
1334
1341
  apiPrefix?: string;
1335
1342
  /**
@@ -1685,6 +1692,24 @@ interface ApplicationOptions {
1685
1692
  * ```
1686
1693
  */
1687
1694
  declare const APPLICATION: import("@forinda/kickjs-di").InjectionToken<Application>;
1695
+ /** {@link ApplicationOptions.management}. */
1696
+ interface ManagementOptions {
1697
+ /** Port for the management listener. */
1698
+ port: number;
1699
+ /**
1700
+ * Interface to bind. Default: every interface, like the public port — an
1701
+ * orchestrator probes the pod's address, so `127.0.0.1` would fail its
1702
+ * probes. Narrow it with a network policy, or bind an internal address.
1703
+ */
1704
+ host?: string;
1705
+ /**
1706
+ * Serve the management port over HTTPS — same shape as `server.tls`. Off by
1707
+ * default: the port is meant for an internal network. Set it when anything
1708
+ * that crosses that network carries a credential (a DevTools token, an
1709
+ * admin route's bearer token).
1710
+ */
1711
+ tls?: tls.SecureContextOptions & tls.TlsOptions;
1712
+ }
1688
1713
  declare class Application {
1689
1714
  private readonly options;
1690
1715
  private app;
@@ -1692,6 +1717,14 @@ declare class Application {
1692
1717
  private readonly runtime;
1693
1718
  private container;
1694
1719
  private httpServer;
1720
+ /**
1721
+ * `bootstrap({ management })`: its engine app, created by start() outside dev
1722
+ * mode — whatever `runtime` builds (Express, Fastify, h3), so not typed as one.
1723
+ */
1724
+ private managementApp;
1725
+ private managementServer;
1726
+ /** Set by start() when `management` applies; setup() then creates the management app. */
1727
+ private wantsManagement;
1695
1728
  /** Set by startWithoutServer() — the serverless path, where cron runs over HTTP. */
1696
1729
  private handlerMode;
1697
1730
  /** The observer set this app installed — released on shutdown only if still current. */
@@ -1738,6 +1771,8 @@ declare class Application {
1738
1771
  private _inFlightRequests;
1739
1772
  /** Whether the application is draining (shutting down gracefully) */
1740
1773
  private _draining;
1774
+ /** True while start() runs — readiness answers 503 until the app serves. */
1775
+ private _starting;
1741
1776
  /** Whether shutdown has already been initiated (prevents double-shutdown) */
1742
1777
  private _shutdownInitiated;
1743
1778
  /** Resolvers waiting for in-flight requests to reach zero */
@@ -1888,6 +1923,11 @@ declare class Application {
1888
1923
  * In **production**: creates its own `http.Server` and binds to the port.
1889
1924
  */
1890
1925
  start(): Promise<void>;
1926
+ /** Listen on the public port, then run afterStart and onReady. */
1927
+ private listenAndFinishStartup;
1928
+ private closeManagementServer;
1929
+ /** The management listener: on its own port, before the public one; HTTPS with `tls`. */
1930
+ private listenManagement;
1891
1931
  /** The production server for {@link ApplicationOptions.server}. */
1892
1932
  private createNodeServer;
1893
1933
  private createBareServer;
@@ -1923,7 +1963,7 @@ declare class Application {
1923
1963
  capabilities: RuntimeCapabilities;
1924
1964
  };
1925
1965
  /** @deprecated Use {@link getRuntimeApp}. Returns the engine-native app. */
1926
- getExpressApp(): Express;
1966
+ getExpressApp(): ActiveRuntime['app'];
1927
1967
  /** Get registered adapters — used by DevToolsAdapter for peer discovery */
1928
1968
  getAdapters(): AppAdapter[];
1929
1969
  /**
@@ -1992,5 +2032,5 @@ declare class Application {
1992
2032
  private requestTrackingMiddleware;
1993
2033
  }
1994
2034
  //#endregion
1995
- export { HANDLER_CHANNEL as $, getRequestValue as A, mountSort as At, LegacyHasher as B, FormatKickErrorOptions as Bt, TraceContext as C, groupAssetKeys as Ct, requestScopeMiddleware as D, MountCycleError as Dt, traceContext as E, MissingMountDepError as Et, SignedCheck as F, CircuitBreaker as Ft, verifyPassword as G, PasswordHashOptions as H, KickErrorInit as Ht, Signer as I, CircuitBreakerOptions as It, isClusterPrimary as J, defineHttpContextDecorator as K, SignerOptions as L, CircuitBreakerState as Lt, buildRoutes as M, DuplicateContributorError as Mt, expressRuntime as N, MissingContextValueError as Nt, RequestStore as O, MountKind as Ot, materializeRouter as P, MissingContributorError as Pt, ERROR_CHANNEL as Q, VerifyOptions as R, CircuitBreakerStats as Rt, TRACEPARENT_HEADER as S, GroupAssetKeysResult as St, parseTraceparent as T, DuplicateMountNameError as Tt, VerifyPasswordOptions as U, formatKickError as Ut, PasswordCheck as V, KickError as Vt, hashPassword as W, createHandler as X, KickHandler as Y, bootstrap as Z, SpaAdapterOptions as _, bindRoutePolicy as _t, ConfigOrigins as a, RAW_BODY as at, ViewAdapterOptions as b, AssetKeyStrategy as bt, ServerOptions as c, metricsAdapter as ct, HealthCheckResult as d, StartupCheck as dt, HandlerTraceContext as et, HealthController as f, StartupCheckError as ft, SpaAdapter as g, RoutePolicyTable as gt, healthModule as h, StartupTimelineSnapshot as ht, ConfigDescription as i, KickCronAdapter as it, requestStore as j, ContributorCycleError as jt, getRequestStore as k, MountSortItem as kt, ShutdownOptions as l, CheckContext as lt, HealthProbe as m, StartupStep as mt, Application as n, CRON_WORKER_ENV as nt, MiddlewareEntry as o, MetricsOptions as ot, HealthModuleConfig as p, defineCheck as pt, ClusterOptions as q, ApplicationOptions as r, CronAdapterOptions as rt, MountedRouteInfo as s, RequestHistogram as st, APPLICATION as t, RESPONSE_CHANNEL as tt, HEALTH_PROBE as u, CheckMessage as ut, resolveClientDir as v, offerRoutePolicy as vt, TraceContextOptions as w, stripExt as wt, viewDirs as x, GroupAssetKeysOptions as xt, ViewAdapter as y, AssetKeyPair as yt, createSigner as z, CircuitOpenError as zt };
1996
- //# sourceMappingURL=application-D5Iiy7rt.d.mts.map
2035
+ export { ERROR_CHANNEL as $, getRequestStore as A, MountSortItem as At, createSigner as B, CircuitOpenError as Bt, TRACEPARENT_HEADER as C, GroupAssetKeysResult as Ct, traceContext as D, MissingMountDepError as Dt, parseTraceparent as E, DuplicateMountNameError as Et, materializeRouter as F, MissingContributorError as Ft, hashPassword as G, PasswordCheck as H, KickError as Ht, SignedCheck as I, CircuitBreaker as It, ClusterOptions as J, verifyPassword as K, Signer as L, CircuitBreakerOptions as Lt, requestStore as M, ContributorCycleError as Mt, buildRoutes as N, DuplicateContributorError as Nt, requestScopeMiddleware as O, MountCycleError as Ot, expressRuntime as P, MissingContextValueError as Pt, bootstrap as Q, SignerOptions as R, CircuitBreakerState as Rt, viewDirs as S, GroupAssetKeysOptions as St, TraceContextOptions as T, stripExt as Tt, PasswordHashOptions as U, KickErrorInit as Ut, LegacyHasher as V, FormatKickErrorOptions as Vt, VerifyPasswordOptions as W, formatKickError as Wt, KickHandler as X, isClusterPrimary as Y, createHandler as Z, SpaAdapter as _, RoutePolicyTable as _t, ConfigOrigins as a, KickCronAdapter as at, ViewAdapter as b, AssetKeyPair as bt, MountedRouteInfo as c, RequestHistogram as ct, HEALTH_PROBE as d, CheckMessage as dt, HANDLER_CHANNEL as et, HealthCheckResult as f, StartupCheck as ft, healthModule as g, StartupTimelineSnapshot as gt, HealthProbe as h, StartupStep as ht, ConfigDescription as i, CronAdapterOptions as it, getRequestValue as j, mountSort as jt, RequestStore as k, MountKind as kt, ServerOptions as l, metricsAdapter as lt, HealthModuleConfig as m, defineCheck as mt, Application as n, RESPONSE_CHANNEL as nt, ManagementOptions as o, RAW_BODY as ot, HealthController as p, StartupCheckError as pt, defineHttpContextDecorator as q, ApplicationOptions as r, CRON_WORKER_ENV as rt, MiddlewareEntry as s, MetricsOptions as st, APPLICATION as t, HandlerTraceContext as tt, ShutdownOptions as u, CheckContext as ut, SpaAdapterOptions as v, bindRoutePolicy as vt, TraceContext as w, groupAssetKeys as wt, ViewAdapterOptions as x, AssetKeyStrategy as xt, resolveClientDir as y, offerRoutePolicy as yt, VerifyOptions as z, CircuitBreakerStats as zt };
2036
+ //# sourceMappingURL=application-BD9LQ2s4.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-BD9LQ2s4.d.mts","names":["_$__0.AdapterFactory","Request","Response","NextFunction","Request","Response","NextFunction","_$_____0.AdapterFactory","_$_____0.AdapterFactory","_$__reply0.Reply","_$__0.ModuleFactory"],"sources":["../src/core/kick-error.ts","../src/core/circuit-breaker.ts","../src/core/context-errors.ts","../src/core/mount-sort.ts","../src/core/asset-keys.ts","../src/core/route-policy.ts","../src/http/startup-timeline.ts","../src/http/startup-checks.ts","../src/http/metrics.ts","../src/http/body-policy.ts","../src/http/cron-adapter.ts","../src/http/tracing.ts","../src/http/bootstrap.ts","../src/http/handler.ts","../src/http/cluster.ts","../src/http/define-http-context-decorator.ts","../src/core/password.ts","../src/core/signing.ts","../src/http/runtimes/express-lazy.ts","../src/http/request-store.ts","../src/http/middleware/request-scope.ts","../src/http/middleware/trace-context.ts","../src/http/middleware/views.ts","../src/http/middleware/spa.ts","../src/http/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