@geekmidas/constructs 10.0.0-alpha.1 → 10.0.0-alpha.100

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 (422) hide show
  1. package/README.md +223 -158
  2. package/dist/{Construct-CdhThxDI.mjs → Construct-B1vGBPme.mjs} +45 -33
  3. package/dist/Construct-B1vGBPme.mjs.map +1 -0
  4. package/dist/Construct-BQALFCh2.d.cts +230 -0
  5. package/dist/Construct-BQALFCh2.d.cts.map +1 -0
  6. package/dist/{Construct-roId57cU.cjs → Construct-DUSXuTHP.cjs} +65 -47
  7. package/dist/Construct-DUSXuTHP.cjs.map +1 -0
  8. package/dist/Construct-QXnl3VqT.d.mts +230 -0
  9. package/dist/Construct-QXnl3VqT.d.mts.map +1 -0
  10. package/dist/Cron-DI3nKoic.d.cts +45 -0
  11. package/dist/Cron-DI3nKoic.d.cts.map +1 -0
  12. package/dist/Cron-uYAHPnp7.d.mts +45 -0
  13. package/dist/Cron-uYAHPnp7.d.mts.map +1 -0
  14. package/dist/CronBuilder-C0Ek1-RA.cjs +121 -0
  15. package/dist/CronBuilder-C0Ek1-RA.cjs.map +1 -0
  16. package/dist/CronBuilder-DaSUm2Na.d.mts +47 -0
  17. package/dist/CronBuilder-DaSUm2Na.d.mts.map +1 -0
  18. package/dist/CronBuilder-Dmix_Pen.mjs +109 -0
  19. package/dist/CronBuilder-Dmix_Pen.mjs.map +1 -0
  20. package/dist/CronBuilder-g1lZLWyG.d.cts +47 -0
  21. package/dist/CronBuilder-g1lZLWyG.d.cts.map +1 -0
  22. package/dist/{Endpoint-BTj58Gob.mjs → Endpoint-BG4UJ9oA.mjs} +146 -109
  23. package/dist/Endpoint-BG4UJ9oA.mjs.map +1 -0
  24. package/dist/{Endpoint-BBkV6l0k.cjs → Endpoint-BoUg8ocM.cjs} +174 -131
  25. package/dist/Endpoint-BoUg8ocM.cjs.map +1 -0
  26. package/dist/{Endpoint-BKR5QH6O.d.mts → Endpoint-Du-NwPX2.d.mts} +83 -91
  27. package/dist/Endpoint-Du-NwPX2.d.mts.map +1 -0
  28. package/dist/{Endpoint-BQ9O0P1w.d.cts → Endpoint-aCvBMPoH.d.cts} +82 -90
  29. package/dist/Endpoint-aCvBMPoH.d.cts.map +1 -0
  30. package/dist/{EndpointFactory-BejSTzbB.mjs → EndpointFactory-BDtsrEvJ.mjs} +60 -77
  31. package/dist/EndpointFactory-BDtsrEvJ.mjs.map +1 -0
  32. package/dist/{EndpointFactory-DYoGLaIT.cjs → EndpointFactory-DJ7gXLpR.cjs} +96 -113
  33. package/dist/EndpointFactory-DJ7gXLpR.cjs.map +1 -0
  34. package/dist/{index-D5zqAJ2e.d.cts → EndpointFactory-DMYdJCOj.d.mts} +78 -134
  35. package/dist/EndpointFactory-DMYdJCOj.d.mts.map +1 -0
  36. package/dist/{index-Cvz551AO.d.mts → EndpointFactory-I7s1co3Y.d.cts} +79 -135
  37. package/dist/EndpointFactory-I7s1co3Y.d.cts.map +1 -0
  38. package/dist/Function-DuqGcbOI.d.mts +76 -0
  39. package/dist/Function-DuqGcbOI.d.mts.map +1 -0
  40. package/dist/Function-Pu-1kKZz.d.cts +76 -0
  41. package/dist/Function-Pu-1kKZz.d.cts.map +1 -0
  42. package/dist/{HonoEndpointAdaptor-7aYNdqJq.mjs → HonoEndpointAdaptor-PtPlbeKY.mjs} +75 -57
  43. package/dist/HonoEndpointAdaptor-PtPlbeKY.mjs.map +1 -0
  44. package/dist/{HonoEndpointAdaptor-wMsCyMgt.cjs → HonoEndpointAdaptor-zVzVLJEO.cjs} +83 -62
  45. package/dist/HonoEndpointAdaptor-zVzVLJEO.cjs.map +1 -0
  46. package/dist/Queue-A3wfD0it.cjs +109 -0
  47. package/dist/Queue-A3wfD0it.cjs.map +1 -0
  48. package/dist/Queue-D6USGS4q.mjs +104 -0
  49. package/dist/Queue-D6USGS4q.mjs.map +1 -0
  50. package/dist/{Queue-D6WeziRD.d.cts → Queue-DlsHRzUp.d.mts} +48 -48
  51. package/dist/Queue-DlsHRzUp.d.mts.map +1 -0
  52. package/dist/{Queue-DpUeqdC8.d.mts → Queue-HPyi0e1i.d.cts} +49 -49
  53. package/dist/Queue-HPyi0e1i.d.cts.map +1 -0
  54. package/dist/QueueBuilder-BjuF0UBl.cjs +135 -0
  55. package/dist/QueueBuilder-BjuF0UBl.cjs.map +1 -0
  56. package/dist/QueueBuilder-Cue73M4t.mjs +118 -0
  57. package/dist/QueueBuilder-Cue73M4t.mjs.map +1 -0
  58. package/dist/QueueBuilder-OSi6LkV9.d.cts +75 -0
  59. package/dist/QueueBuilder-OSi6LkV9.d.cts.map +1 -0
  60. package/dist/QueueBuilder-QHsnVt1P.d.mts +75 -0
  61. package/dist/QueueBuilder-QHsnVt1P.d.mts.map +1 -0
  62. package/dist/{Subscriber-4rBJgDKI.d.mts → Subscriber-Bpp02cGr.d.cts} +30 -21
  63. package/dist/Subscriber-Bpp02cGr.d.cts.map +1 -0
  64. package/dist/{Subscriber-DVQowdyj.d.cts → Subscriber-CtN9R48-.d.mts} +29 -20
  65. package/dist/Subscriber-CtN9R48-.d.mts.map +1 -0
  66. package/dist/SubscriberBuilder-CDy4nHCz.mjs +134 -0
  67. package/dist/SubscriberBuilder-CDy4nHCz.mjs.map +1 -0
  68. package/dist/SubscriberBuilder-CuCMFpYW.d.mts +67 -0
  69. package/dist/SubscriberBuilder-CuCMFpYW.d.mts.map +1 -0
  70. package/dist/SubscriberBuilder-D_owVoHo.cjs +145 -0
  71. package/dist/SubscriberBuilder-D_owVoHo.cjs.map +1 -0
  72. package/dist/SubscriberBuilder-g3fAVWgs.d.cts +67 -0
  73. package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +1 -0
  74. package/dist/Topic-D74b5cgs.mjs +99 -0
  75. package/dist/Topic-D74b5cgs.mjs.map +1 -0
  76. package/dist/Topic-GHxcU8AG.cjs +104 -0
  77. package/dist/Topic-GHxcU8AG.cjs.map +1 -0
  78. package/dist/adaptors/aws.cjs +332 -188
  79. package/dist/adaptors/aws.cjs.map +1 -1
  80. package/dist/adaptors/aws.d.cts +114 -44
  81. package/dist/adaptors/aws.d.cts.map +1 -1
  82. package/dist/adaptors/aws.d.mts +114 -44
  83. package/dist/adaptors/aws.d.mts.map +1 -1
  84. package/dist/adaptors/aws.mjs +308 -166
  85. package/dist/adaptors/aws.mjs.map +1 -1
  86. package/dist/adaptors/hono.cjs +3 -11
  87. package/dist/adaptors/hono.d.cts +7 -16
  88. package/dist/adaptors/hono.d.cts.map +1 -1
  89. package/dist/adaptors/hono.d.mts +8 -17
  90. package/dist/adaptors/hono.d.mts.map +1 -1
  91. package/dist/adaptors/hono.mjs +2 -11
  92. package/dist/adaptors/testing.cjs +743 -90
  93. package/dist/adaptors/testing.cjs.map +1 -1
  94. package/dist/adaptors/testing.d.cts +351 -54
  95. package/dist/adaptors/testing.d.cts.map +1 -1
  96. package/dist/adaptors/testing.d.mts +351 -54
  97. package/dist/adaptors/testing.d.mts.map +1 -1
  98. package/dist/adaptors/testing.mjs +706 -71
  99. package/dist/adaptors/testing.mjs.map +1 -1
  100. package/dist/auth-BMCJN30Y.d.cts +268 -0
  101. package/dist/auth-BMCJN30Y.d.cts.map +1 -0
  102. package/dist/auth-CcuceLYo.d.mts +268 -0
  103. package/dist/auth-CcuceLYo.d.mts.map +1 -0
  104. package/dist/auth.cjs +302 -34
  105. package/dist/auth.cjs.map +1 -1
  106. package/dist/auth.d.cts +2 -108
  107. package/dist/auth.d.mts +2 -108
  108. package/dist/auth.mjs +290 -28
  109. package/dist/auth.mjs.map +1 -1
  110. package/dist/{cache-CdQ7OLpR.d.cts → cache-CXh6GIgb.d.mts} +4 -7
  111. package/dist/cache-CXh6GIgb.d.mts.map +1 -0
  112. package/dist/{cache-DYoJFcfd.d.mts → cache-DnGDGly3.d.cts} +4 -7
  113. package/dist/cache-DnGDGly3.d.cts.map +1 -0
  114. package/dist/cache.cjs +68 -2
  115. package/dist/cache.cjs.map +1 -0
  116. package/dist/cache.d.cts +1 -2
  117. package/dist/cache.d.mts +1 -2
  118. package/dist/cache.mjs +67 -2
  119. package/dist/cache.mjs.map +1 -0
  120. package/dist/cipher-C1lEFX63.mjs +225 -0
  121. package/dist/cipher-C1lEFX63.mjs.map +1 -0
  122. package/dist/cipher-CVxfwLjk.cjs +332 -0
  123. package/dist/cipher-CVxfwLjk.cjs.map +1 -0
  124. package/dist/{clone-DblgEZZa.mjs → clone-EKNovYHu.mjs} +3 -3
  125. package/dist/clone-EKNovYHu.mjs.map +1 -0
  126. package/dist/{clone-Dy0cR2SZ.cjs → clone-UGJpvQnL.cjs} +7 -8
  127. package/dist/clone-UGJpvQnL.cjs.map +1 -0
  128. package/dist/{construct-interface-BqwRNYA2.d.mts → construct-interface-B1AfqRl4.d.cts} +43 -12
  129. package/dist/construct-interface-B1AfqRl4.d.cts.map +1 -0
  130. package/dist/{construct-interface-D2nNkHUN.d.cts → construct-interface-DluK3_da.d.mts} +43 -12
  131. package/dist/construct-interface-DluK3_da.d.mts.map +1 -0
  132. package/dist/construct-interface.cjs +113 -7
  133. package/dist/construct-interface.cjs.map +1 -0
  134. package/dist/construct-interface.d.cts +2 -2
  135. package/dist/construct-interface.d.mts +2 -2
  136. package/dist/construct-interface.mjs +106 -2
  137. package/dist/construct-interface.mjs.map +1 -0
  138. package/dist/credential.cjs +77 -17
  139. package/dist/credential.cjs.map +1 -1
  140. package/dist/credential.d.cts +34 -9
  141. package/dist/credential.d.cts.map +1 -1
  142. package/dist/credential.d.mts +34 -9
  143. package/dist/credential.d.mts.map +1 -1
  144. package/dist/credential.mjs +71 -13
  145. package/dist/credential.mjs.map +1 -1
  146. package/dist/crons/index.cjs +189 -85
  147. package/dist/crons/index.cjs.map +1 -1
  148. package/dist/crons/index.d.cts +70 -48
  149. package/dist/crons/index.d.cts.map +1 -1
  150. package/dist/crons/index.d.mts +70 -48
  151. package/dist/crons/index.d.mts.map +1 -1
  152. package/dist/crons/index.mjs +183 -81
  153. package/dist/crons/index.mjs.map +1 -1
  154. package/dist/database/kysely.cjs +4 -181
  155. package/dist/database/kysely.d.cts +2 -152
  156. package/dist/database/kysely.d.mts +2 -152
  157. package/dist/database/kysely.mjs +2 -180
  158. package/dist/email.cjs +25 -12
  159. package/dist/email.cjs.map +1 -1
  160. package/dist/email.d.cts +3 -7
  161. package/dist/email.d.cts.map +1 -1
  162. package/dist/email.d.mts +3 -7
  163. package/dist/email.d.mts.map +1 -1
  164. package/dist/email.mjs +16 -3
  165. package/dist/email.mjs.map +1 -1
  166. package/dist/encryption.cjs +96 -0
  167. package/dist/encryption.cjs.map +1 -0
  168. package/dist/encryption.d.cts +117 -0
  169. package/dist/encryption.d.cts.map +1 -0
  170. package/dist/encryption.d.mts +117 -0
  171. package/dist/encryption.d.mts.map +1 -0
  172. package/dist/encryption.mjs +83 -0
  173. package/dist/encryption.mjs.map +1 -0
  174. package/dist/endpoints/index.cjs +8 -11
  175. package/dist/endpoints/index.d.cts +51 -7
  176. package/dist/endpoints/index.d.cts.map +1 -0
  177. package/dist/endpoints/index.d.mts +51 -7
  178. package/dist/endpoints/index.d.mts.map +1 -0
  179. package/dist/endpoints/index.mjs +6 -11
  180. package/dist/external-api-MJ8id87V.d.mts +105 -0
  181. package/dist/external-api-MJ8id87V.d.mts.map +1 -0
  182. package/dist/external-api-O107yzZJ.d.cts +105 -0
  183. package/dist/external-api-O107yzZJ.d.cts.map +1 -0
  184. package/dist/external-api.cjs +142 -0
  185. package/dist/external-api.cjs.map +1 -0
  186. package/dist/external-api.d.cts +2 -0
  187. package/dist/external-api.d.mts +2 -0
  188. package/dist/external-api.mjs +139 -0
  189. package/dist/external-api.mjs.map +1 -0
  190. package/dist/file-server.cjs +42 -10
  191. package/dist/file-server.cjs.map +1 -1
  192. package/dist/file-server.d.cts +6 -10
  193. package/dist/file-server.d.cts.map +1 -1
  194. package/dist/file-server.d.mts +6 -10
  195. package/dist/file-server.d.mts.map +1 -1
  196. package/dist/file-server.mjs +34 -2
  197. package/dist/file-server.mjs.map +1 -1
  198. package/dist/functions/index.cjs +2 -6
  199. package/dist/functions/index.d.cts +3 -4
  200. package/dist/functions/index.d.mts +3 -4
  201. package/dist/functions/index.mjs +2 -6
  202. package/dist/{functions-Cpff1uZH.mjs → functions-BFizikJU.mjs} +394 -243
  203. package/dist/functions-BFizikJU.mjs.map +1 -0
  204. package/dist/{functions-DukjG8ov.cjs → functions-CfzJG9hK.cjs} +432 -275
  205. package/dist/functions-CfzJG9hK.cjs.map +1 -0
  206. package/dist/index-BuzRvKOQ.d.cts +115 -0
  207. package/dist/index-BuzRvKOQ.d.cts.map +1 -0
  208. package/dist/index-CTkKOer4.d.mts +115 -0
  209. package/dist/index-CTkKOer4.d.mts.map +1 -0
  210. package/dist/index-CeEtxDmK.d.cts +79 -0
  211. package/dist/index-CeEtxDmK.d.cts.map +1 -0
  212. package/dist/index-CeEtxDmK.d.mts +79 -0
  213. package/dist/index-CeEtxDmK.d.mts.map +1 -0
  214. package/dist/index.cjs +6 -3
  215. package/dist/index.d.cts +27 -4
  216. package/dist/index.d.cts.map +1 -0
  217. package/dist/index.d.mts +27 -4
  218. package/dist/index.d.mts.map +1 -0
  219. package/dist/index.mjs +3 -3
  220. package/dist/kms-B-Hm3d5r.cjs +85 -0
  221. package/dist/kms-B-Hm3d5r.cjs.map +1 -0
  222. package/dist/kms-BdUlMJEZ.mjs +85 -0
  223. package/dist/kms-BdUlMJEZ.mjs.map +1 -0
  224. package/dist/kysely-Bii4l6eP.mjs +370 -0
  225. package/dist/kysely-Bii4l6eP.mjs.map +1 -0
  226. package/dist/kysely-CO_Dk43W.cjs +383 -0
  227. package/dist/kysely-CO_Dk43W.cjs.map +1 -0
  228. package/dist/kysely-D0bpzgPs.d.cts +175 -0
  229. package/dist/kysely-D0bpzgPs.d.cts.map +1 -0
  230. package/dist/kysely-DUqC3Ie0.d.mts +175 -0
  231. package/dist/kysely-DUqC3Ie0.d.mts.map +1 -0
  232. package/dist/{telemetry-C3L0iS28.d.cts → lambdaTelemetry-8vnmVZQ5.d.cts} +3 -6
  233. package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +1 -0
  234. package/dist/{telemetry-D7bVFLGi.d.mts → lambdaTelemetry-8vnmVZQ5.d.mts} +3 -6
  235. package/dist/lambdaTelemetry-8vnmVZQ5.d.mts.map +1 -0
  236. package/dist/{lazyAccessors-DM6HcXQk.mjs → lazyAccessors-CFanua0O.mjs} +20 -21
  237. package/dist/lazyAccessors-CFanua0O.mjs.map +1 -0
  238. package/dist/{lazyAccessors-DrJj8NpA.cjs → lazyAccessors-hJKGv8Ay.cjs} +60 -62
  239. package/dist/lazyAccessors-hJKGv8Ay.cjs.map +1 -0
  240. package/dist/mobile-app.cjs +73 -0
  241. package/dist/mobile-app.cjs.map +1 -0
  242. package/dist/mobile-app.d.cts +61 -0
  243. package/dist/mobile-app.d.cts.map +1 -0
  244. package/dist/mobile-app.d.mts +61 -0
  245. package/dist/mobile-app.d.mts.map +1 -0
  246. package/dist/mobile-app.mjs +72 -0
  247. package/dist/mobile-app.mjs.map +1 -0
  248. package/dist/object-storage.cjs +18 -10
  249. package/dist/object-storage.cjs.map +1 -1
  250. package/dist/object-storage.d.cts +3 -7
  251. package/dist/object-storage.d.cts.map +1 -1
  252. package/dist/object-storage.d.mts +3 -7
  253. package/dist/object-storage.d.mts.map +1 -1
  254. package/dist/object-storage.mjs +11 -3
  255. package/dist/object-storage.mjs.map +1 -1
  256. package/dist/processAudits-BRRVVHUB.mjs +131 -0
  257. package/dist/processAudits-BRRVVHUB.mjs.map +1 -0
  258. package/dist/processAudits-DasOZjPl.cjs +154 -0
  259. package/dist/processAudits-DasOZjPl.cjs.map +1 -0
  260. package/dist/queue/index.cjs +6 -189
  261. package/dist/queue/index.d.cts +3 -60
  262. package/dist/queue/index.d.mts +3 -60
  263. package/dist/queue/index.mjs +3 -186
  264. package/dist/rest-api.cjs +92 -63
  265. package/dist/rest-api.cjs.map +1 -1
  266. package/dist/rest-api.d.cts +81 -61
  267. package/dist/rest-api.d.cts.map +1 -1
  268. package/dist/rest-api.d.mts +81 -61
  269. package/dist/rest-api.d.mts.map +1 -1
  270. package/dist/rest-api.mjs +84 -55
  271. package/dist/rest-api.mjs.map +1 -1
  272. package/dist/{chunk-DWy1uDak.cjs → rolldown-runtime-y5ARvAq5.cjs} +14 -18
  273. package/dist/runSubscriber-BHvJ8POr.mjs +109 -0
  274. package/dist/runSubscriber-BHvJ8POr.mjs.map +1 -0
  275. package/dist/runSubscriber-D8nLXIv1.cjs +126 -0
  276. package/dist/runSubscriber-D8nLXIv1.cjs.map +1 -0
  277. package/dist/shutdown-BMJmAhSt.cjs +38 -0
  278. package/dist/shutdown-BMJmAhSt.cjs.map +1 -0
  279. package/dist/shutdown-C7xa8x9S.mjs +27 -0
  280. package/dist/shutdown-C7xa8x9S.mjs.map +1 -0
  281. package/dist/site.cjs +35 -9
  282. package/dist/site.cjs.map +1 -1
  283. package/dist/site.d.cts +25 -22
  284. package/dist/site.d.cts.map +1 -1
  285. package/dist/site.d.mts +25 -22
  286. package/dist/site.d.mts.map +1 -1
  287. package/dist/site.mjs +31 -5
  288. package/dist/site.mjs.map +1 -1
  289. package/dist/stages-BSCF19o2.d.cts +56 -0
  290. package/dist/stages-BSCF19o2.d.cts.map +1 -0
  291. package/dist/stages-BSCF19o2.d.mts +56 -0
  292. package/dist/stages-BSCF19o2.d.mts.map +1 -0
  293. package/dist/subscribers/index.cjs +111 -101
  294. package/dist/subscribers/index.cjs.map +1 -1
  295. package/dist/subscribers/index.d.cts +44 -56
  296. package/dist/subscribers/index.d.cts.map +1 -1
  297. package/dist/subscribers/index.d.mts +44 -56
  298. package/dist/subscribers/index.d.mts.map +1 -1
  299. package/dist/subscribers/index.mjs +108 -98
  300. package/dist/subscribers/index.mjs.map +1 -1
  301. package/dist/surfaceEnv-CNimK76p.cjs +56 -0
  302. package/dist/surfaceEnv-CNimK76p.cjs.map +1 -0
  303. package/dist/surfaceEnv-wMT5QzgZ.mjs +45 -0
  304. package/dist/surfaceEnv-wMT5QzgZ.mjs.map +1 -0
  305. package/dist/telemetry-B48RLjyk.d.cts +40 -0
  306. package/dist/telemetry-B48RLjyk.d.cts.map +1 -0
  307. package/dist/telemetry-DRtT1_0A.d.mts +40 -0
  308. package/dist/telemetry-DRtT1_0A.d.mts.map +1 -0
  309. package/dist/telemetry.cjs +56 -0
  310. package/dist/telemetry.cjs.map +1 -0
  311. package/dist/telemetry.d.cts +2 -0
  312. package/dist/telemetry.d.mts +2 -0
  313. package/dist/telemetry.mjs +55 -0
  314. package/dist/telemetry.mjs.map +1 -0
  315. package/dist/topic/index.cjs +3 -137
  316. package/dist/topic/index.d.cts +2 -32
  317. package/dist/topic/index.d.mts +2 -32
  318. package/dist/topic/index.mjs +2 -134
  319. package/dist/tracing-CxaZ98IB.mjs +110 -0
  320. package/dist/tracing-CxaZ98IB.mjs.map +1 -0
  321. package/dist/tracing-DPMidF_r.cjs +127 -0
  322. package/dist/tracing-DPMidF_r.cjs.map +1 -0
  323. package/dist/{types-BlAkSuGI.d.cts → types-DMuSQeLL.d.cts} +3 -5
  324. package/dist/types-DMuSQeLL.d.cts.map +1 -0
  325. package/dist/{types-aKksMEWL.d.mts → types-DMuSQeLL.d.mts} +3 -5
  326. package/dist/types-DMuSQeLL.d.mts.map +1 -0
  327. package/dist/types.d.cts +1 -1
  328. package/dist/types.d.mts +1 -1
  329. package/dist/types.mjs +1 -0
  330. package/dist/worker.cjs +191 -0
  331. package/dist/worker.cjs.map +1 -0
  332. package/dist/worker.d.cts +171 -0
  333. package/dist/worker.d.cts.map +1 -0
  334. package/dist/worker.d.mts +171 -0
  335. package/dist/worker.d.mts.map +1 -0
  336. package/dist/worker.mjs +190 -0
  337. package/dist/worker.mjs.map +1 -0
  338. package/package.json +116 -70
  339. package/dist/AWSScheduledFunction-9bJS4WdJ.d.cts +0 -122
  340. package/dist/AWSScheduledFunction-9bJS4WdJ.d.cts.map +0 -1
  341. package/dist/AWSScheduledFunction-BJjj8B5V.mjs +0 -243
  342. package/dist/AWSScheduledFunction-BJjj8B5V.mjs.map +0 -1
  343. package/dist/AWSScheduledFunction-BO5iEMSh.d.mts +0 -122
  344. package/dist/AWSScheduledFunction-BO5iEMSh.d.mts.map +0 -1
  345. package/dist/AWSScheduledFunction-qu4ieRZR.cjs +0 -255
  346. package/dist/AWSScheduledFunction-qu4ieRZR.cjs.map +0 -1
  347. package/dist/Construct-B-xc0SE9.d.mts +0 -104
  348. package/dist/Construct-B-xc0SE9.d.mts.map +0 -1
  349. package/dist/Construct-CdhThxDI.mjs.map +0 -1
  350. package/dist/Construct-WhCXIOPV.d.cts +0 -104
  351. package/dist/Construct-WhCXIOPV.d.cts.map +0 -1
  352. package/dist/Construct-roId57cU.cjs.map +0 -1
  353. package/dist/Endpoint-BBkV6l0k.cjs.map +0 -1
  354. package/dist/Endpoint-BKR5QH6O.d.mts.map +0 -1
  355. package/dist/Endpoint-BQ9O0P1w.d.cts.map +0 -1
  356. package/dist/Endpoint-BTj58Gob.mjs.map +0 -1
  357. package/dist/EndpointFactory-BejSTzbB.mjs.map +0 -1
  358. package/dist/EndpointFactory-DYoGLaIT.cjs.map +0 -1
  359. package/dist/HonoEndpointAdaptor-7aYNdqJq.mjs.map +0 -1
  360. package/dist/HonoEndpointAdaptor-wMsCyMgt.cjs.map +0 -1
  361. package/dist/Queue-D6WeziRD.d.cts.map +0 -1
  362. package/dist/Queue-DpUeqdC8.d.mts.map +0 -1
  363. package/dist/Subscriber-4rBJgDKI.d.mts.map +0 -1
  364. package/dist/Subscriber-DVQowdyj.d.cts.map +0 -1
  365. package/dist/Topic-Ohx9dvWr.d.cts +0 -91
  366. package/dist/Topic-Ohx9dvWr.d.cts.map +0 -1
  367. package/dist/Topic-cmy2jOUy.d.mts +0 -91
  368. package/dist/Topic-cmy2jOUy.d.mts.map +0 -1
  369. package/dist/auth.d.cts.map +0 -1
  370. package/dist/auth.d.mts.map +0 -1
  371. package/dist/cache-0ANvRQnD.mjs +0 -51
  372. package/dist/cache-0ANvRQnD.mjs.map +0 -1
  373. package/dist/cache-3WSvAulx.cjs +0 -57
  374. package/dist/cache-3WSvAulx.cjs.map +0 -1
  375. package/dist/cache-CdQ7OLpR.d.cts.map +0 -1
  376. package/dist/cache-DYoJFcfd.d.mts.map +0 -1
  377. package/dist/clone-DblgEZZa.mjs.map +0 -1
  378. package/dist/clone-Dy0cR2SZ.cjs.map +0 -1
  379. package/dist/construct-interface-BfjcOD_E.cjs +0 -117
  380. package/dist/construct-interface-BfjcOD_E.cjs.map +0 -1
  381. package/dist/construct-interface-BqwRNYA2.d.mts.map +0 -1
  382. package/dist/construct-interface-D2nNkHUN.d.cts.map +0 -1
  383. package/dist/construct-interface-Z4CpS8tK.mjs +0 -81
  384. package/dist/construct-interface-Z4CpS8tK.mjs.map +0 -1
  385. package/dist/database/kysely.cjs.map +0 -1
  386. package/dist/database/kysely.d.cts.map +0 -1
  387. package/dist/database/kysely.d.mts.map +0 -1
  388. package/dist/database/kysely.mjs.map +0 -1
  389. package/dist/functions-Cpff1uZH.mjs.map +0 -1
  390. package/dist/functions-DukjG8ov.cjs.map +0 -1
  391. package/dist/index-BTvozlUD.d.cts +0 -163
  392. package/dist/index-BTvozlUD.d.cts.map +0 -1
  393. package/dist/index-Cvz551AO.d.mts.map +0 -1
  394. package/dist/index-D5zqAJ2e.d.cts.map +0 -1
  395. package/dist/index-L7pz0R0T.d.mts +0 -162
  396. package/dist/index-L7pz0R0T.d.mts.map +0 -1
  397. package/dist/lazyAccessors-DM6HcXQk.mjs.map +0 -1
  398. package/dist/lazyAccessors-DrJj8NpA.cjs.map +0 -1
  399. package/dist/processAudits-Bc8rz6Ev.cjs +0 -92
  400. package/dist/processAudits-Bc8rz6Ev.cjs.map +0 -1
  401. package/dist/processAudits-D89tICM4.mjs +0 -80
  402. package/dist/processAudits-D89tICM4.mjs.map +0 -1
  403. package/dist/publisher-CGEo8UKD.mjs +0 -41
  404. package/dist/publisher-CGEo8UKD.mjs.map +0 -1
  405. package/dist/publisher-CqGsXB2X.cjs +0 -53
  406. package/dist/publisher-CqGsXB2X.cjs.map +0 -1
  407. package/dist/queue/index.cjs.map +0 -1
  408. package/dist/queue/index.d.cts.map +0 -1
  409. package/dist/queue/index.d.mts.map +0 -1
  410. package/dist/queue/index.mjs.map +0 -1
  411. package/dist/surfaceEnv-BFXEms2f.cjs +0 -39
  412. package/dist/surfaceEnv-BFXEms2f.cjs.map +0 -1
  413. package/dist/surfaceEnv-C3Ktahea.mjs +0 -27
  414. package/dist/surfaceEnv-C3Ktahea.mjs.map +0 -1
  415. package/dist/telemetry-C3L0iS28.d.cts.map +0 -1
  416. package/dist/telemetry-D7bVFLGi.d.mts.map +0 -1
  417. package/dist/topic/index.cjs.map +0 -1
  418. package/dist/topic/index.d.cts.map +0 -1
  419. package/dist/topic/index.d.mts.map +0 -1
  420. package/dist/topic/index.mjs.map +0 -1
  421. package/dist/types-BlAkSuGI.d.cts.map +0 -1
  422. package/dist/types-aKksMEWL.d.mts.map +0 -1
@@ -0,0 +1,175 @@
1
+ import { n as Construct } from "./construct-interface-DluK3_da.mjs";
2
+ import { t as Cache } from "./cache-CXh6GIgb.mjs";
3
+ import { ConstructName, Declaration, PostgresVersion } from "@geekmidas/manifest";
4
+ import { Kysely, KyselyConfig } from "kysely";
5
+ import { Service } from "@geekmidas/services";
6
+ import pg from "pg";
7
+ //#region src/database/pool.d.ts
8
+ /**
9
+ * End every pool opened, waiting for checked-out connections to come back.
10
+ * For a server's shutdown, after it has stopped taking requests.
11
+ */
12
+ declare function closeDatabasePools(): Promise<void>;
13
+ //#endregion
14
+ //#region src/database/kysely.d.ts
15
+ /**
16
+ * Everything Kysely takes, plus what this construct declares.
17
+ *
18
+ * `dialect` is omitted because the construct owns it — it is built from the one
19
+ * URL the adapter supplied, which is the whole point of the construct. The rest
20
+ * of `KyselyConfig` (`plugins`, `log`) is the app's business and passes
21
+ * straight through, so anything Kysely adds later arrives without being
22
+ * tracked here.
23
+ */
24
+ interface KyselyDatabaseOptions extends Omit<KyselyConfig, 'dialect'> {
25
+ /**
26
+ * The schema, pinned on both roles' `search_path`.
27
+ *
28
+ * Defaults to `app` — the role the schema plays, rather than a restatement
29
+ * of the database's own name, which reads correctly beside `auth` and
30
+ * `pgboss` and keeps the application off `public`.
31
+ */
32
+ schema?: string;
33
+ /**
34
+ * Provision the owner/runtime role split. Defaults to on.
35
+ *
36
+ * Off falls back to the cluster's master credential in both URLs, giving up
37
+ * the DDL/DML split and putting credentials that can drop a table into the
38
+ * function's environment. A deliberate downgrade, not a default.
39
+ */
40
+ roles?: boolean;
41
+ /**
42
+ * The Postgres major version to provision.
43
+ *
44
+ * Declared here so one statement reaches both targets. It was previously
45
+ * set in two unrelated places — a container tag locally, nothing at all on
46
+ * AWS (so Aurora chose) — which is how local came to run 18 while deployed
47
+ * ran 17.7 with nothing recording the difference.
48
+ *
49
+ * Defaults to {@link DEFAULT_POSTGRES_VERSION}.
50
+ */
51
+ version?: PostgresVersion;
52
+ /**
53
+ * End each query run inside a request with a comment naming what ran it —
54
+ * `/*operation='POST /orders',request_id='…'*\/` — so `pg_stat_activity`
55
+ * and the server's logs can tie a query to its endpoint — and, inside a
56
+ * trace, with the query span's `traceparent='00-…'` (sqlcommenter), so
57
+ * they can tie it to the trace too. Defaults to on.
58
+ */
59
+ queryTags?: boolean;
60
+ }
61
+ /** What makes a construct derived rather than a database in its own right. */
62
+ interface DerivedFrom {
63
+ kind: 'database-reader' | 'database-schema';
64
+ of: string;
65
+ schema?: string;
66
+ }
67
+ /**
68
+ * @typeParam DB - the database's schema.
69
+ * @typeParam TName - the canonical id. TypeScript has no partial
70
+ * type-argument inference, so `new KyselyDatabase<OrdersDB>('orders')` leaves
71
+ * this at its default and the service key widens to `string`. `db` still types
72
+ * through `.database()`, which infers from the service.
73
+ */
74
+ declare class KyselyDatabase<DB = unknown, TName extends string = string> implements Construct<TName, Kysely<DB>> {
75
+ private readonly options;
76
+ readonly id: TName;
77
+ readonly service: Service<Uncapitalize<TName>, Kysely<DB>>;
78
+ /**
79
+ * Declared once and read by both `declare()` and `connect()`, so the key the
80
+ * build publishes and the key the client reads cannot drift.
81
+ */
82
+ private readonly config;
83
+ private readonly schemaName;
84
+ private readonly roles;
85
+ private readonly version;
86
+ private readonly derivedFrom?;
87
+ constructor(id: ConstructName<TName>, options?: KyselyDatabaseOptions, derivedFrom?: DerivedFrom);
88
+ declare(): Declaration[];
89
+ /**
90
+ * A read-only endpoint on this database.
91
+ *
92
+ * Read-only is enforced by the reader role's grants rather than by which
93
+ * endpoint it resolves to, so falling back to the writer where no replica
94
+ * exists is safe rather than a silently writable connection behind a name
95
+ * that says reader. There is no `writer()`: the database *is* the writer, so
96
+ * a replica can never be reached by accident.
97
+ *
98
+ * The return type is narrower than this class on purpose — see
99
+ * {@link ReadOnlyDatabase}.
100
+ */
101
+ reader(): ReadOnlyDatabase<DB, `${TName}Reader`>;
102
+ /**
103
+ * A cache that lives in this database.
104
+ *
105
+ * The same strengthening `schema()` is over a second database: `new
106
+ * Cache('Sessions')` says the app caches and leaves where to the deployment,
107
+ * while this says it caches *here* — which is a fact about the application
108
+ * and so belongs in its code.
109
+ *
110
+ * What it buys beyond being explicit: the table's schema and the role that
111
+ * reaches it come from this database rather than from a second convention,
112
+ * and the backend no longer has to guess which database "the database" meant
113
+ * when an app declares two.
114
+ *
115
+ * A cache is not a `KyselyDatabase`, so this returns a `Cache` — the client
116
+ * is a key/value store, not a query builder, and typing it as the parent
117
+ * would be a convenience that lies.
118
+ */
119
+ cache<TCache extends string = `${TName}Cache`>(id?: ConstructName<TCache>, options?: {
120
+ table?: string;
121
+ }): Cache<TCache>;
122
+ /**
123
+ * A second schema in this database, with its own role(s) and its own URL —
124
+ * so this database's role holds no grant on those tables at all.
125
+ *
126
+ * Typed separately because a tenant has its own tables: the point is that
127
+ * `auth.selectFrom('sessions')` type-checks and
128
+ * `orders.selectFrom('sessions')` does not.
129
+ */
130
+ schema<TenantDB, TTenant extends string>(id: ConstructName<TTenant>, options?: KyselyDatabaseOptions): KyselyDatabase<TenantDB, TTenant>;
131
+ /**
132
+ * A connection as the *owner* role — the one that may create, alter and drop.
133
+ *
134
+ * A `Service` rather than part of the construct, and deliberately so: a
135
+ * construct is what `.dependsOn()` accepts, and nothing should be able to
136
+ * depend on this. A migrator asks for it by name; a handler cannot ask at
137
+ * all, which is the security property the role split exists for.
138
+ *
139
+ * Falls back to the runtime URL where no owner URL was published — the
140
+ * `roles: false` downgrade, where there is only one credential and it is the
141
+ * cluster master's.
142
+ */
143
+ get owner(): Service<`${Uncapitalize<TName>}Owner`, Kysely<DB>>;
144
+ /**
145
+ * What this database's clients are built with besides a dialect — the
146
+ * plugins and logging it was declared with.
147
+ *
148
+ * Public so that whatever opens a connection to it outside \`connect()\` —
149
+ * a test's transaction — builds the same client. A test that dropped the
150
+ * plugins would write \`createdAt\` where production writes \`created_at\`.
151
+ */
152
+ get clientConfig(): Omit<KyselyConfig, 'dialect'>;
153
+ private connect;
154
+ }
155
+ /**
156
+ * A database you may read through, and derive nothing from.
157
+ *
158
+ * A reader is terminal in the graph, and this is that fact in the type system.
159
+ * `DERIVES_FROM` gives `cache` and `database-schema` no `database-reader`
160
+ * parent, and there is no reader of a reader — so `orders.reader().cache(…)`
161
+ * has always been illegal, but it type-checked and failed later at
162
+ * `assertDerivations`. That is a long way round to learn that a read-only
163
+ * endpoint cannot own a table something writes to.
164
+ *
165
+ * Omitting the three deriving methods rather than making them throw keeps the
166
+ * failure where it costs least: the editor, on the line that wrote it.
167
+ *
168
+ * The result is deliberately not assignable back to `KyselyDatabase` — a
169
+ * reader is not one, and anything that genuinely needs the writer should say
170
+ * so.
171
+ */
172
+ type ReadOnlyDatabase<DB, TName extends string> = Omit<KyselyDatabase<DB, TName>, 'reader' | 'cache' | 'schema'>;
173
+ //#endregion
174
+ export { closeDatabasePools as i, KyselyDatabaseOptions as n, ReadOnlyDatabase as r, KyselyDatabase as t };
175
+ //# sourceMappingURL=kysely-DUqC3Ie0.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kysely-DUqC3Ie0.d.mts","names":[],"sources":["../src/database/pool.ts","../src/database/kysely.ts"],"mappings":";;;;;;;;;;;iBAwGsB,sBAAsB;;;;;;;;;;;;UChE3B,8BAA8B,KAAK;;;;;;;;EAQnD;;;;;;;;EAQA;;;;;;;;;;;EAWA,UAAU;;;;;;;;EAQV;;;UAIS;EACT;EACA;EACA;;;;;;;;;cAUY,eAAe,cAAc,0CAC9B,UAAU,OAAO,OAAO;mBAiBjB;WAfT,IAAI;WACJ,SAAS,QAAQ,aAAa,QAAQ,OAAO;;;;;mBAMrC;mBACA;mBACA;mBACA;mBACA;EAEjB,YACC,IAAI,cAAc,QACD,UAAS,uBAC1B,cAAc;EAyBf,WAAW;;;;;;;;;;;;;EAqDX,UAAU,iBAAiB,OAAO;;;;;;;;;;;;;;;;;;EAyBlC,MAAM,2BAA2B,cAChC,KAAI,cAAc,SAClB;IAAW;MACT,MAAM;;;;;;;;;EAeT,OAAO,UAAU,wBAChB,IAAI,cAAc,UAClB,UAAS,wBACP,eAAe,UAAU;;;;;;;;;;;;;MAoBxB,SAAS,WAAW,aAAa,eAAe,OAAO;;;;;;;;;MAgBvD,gBAAgB,KAAK;UAcX;;;;;;;;;;;;;;;;;;;KAuCH,iBAAiB,IAAI,wBAAwB,KACxD,eAAe,IAAI"}
@@ -1,7 +1,5 @@
1
1
  import { Context } from "aws-lambda";
2
-
3
- //#region src/telemetry.d.ts
4
-
2
+ //#region src/endpoints/lambdaTelemetry.d.ts
5
3
  /**
6
4
  * Context object returned by onRequestStart, passed to subsequent hooks
7
5
  */
@@ -89,7 +87,6 @@ interface Telemetry {
89
87
  */
90
88
  onRequestError(ctx: TelemetryContext, error: Error): void;
91
89
  }
92
- //# sourceMappingURL=telemetry.d.ts.map
93
90
  //#endregion
94
- export { Telemetry, TelemetryContext, TelemetryRequest, TelemetryResponse };
95
- //# sourceMappingURL=telemetry-C3L0iS28.d.cts.map
91
+ export { TelemetryResponse as i, TelemetryContext as n, TelemetryRequest as r, Telemetry as t };
92
+ //# sourceMappingURL=lambdaTelemetry-8vnmVZQ5.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lambdaTelemetry-8vnmVZQ5.d.cts","names":["LambdaContext"],"sources":["../src/endpoints/lambdaTelemetry.ts"],"mappings":";;;;;UAWiB;;;;GAIf;;;;;UAMe;;;;EAIhB;;;;EAKA,SAASA;;;;;UAMO;;;;EAIhB;;;;EAKA;;;;EAKA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BM;;;;;;;EAOhB,eAAe,SAAS,mBAAmB;;;;;;;EAQ3C,aAAa,KAAK,kBAAkB,UAAU;;;;;;;EAQ9C,eAAe,KAAK,kBAAkB,OAAO"}
@@ -1,7 +1,5 @@
1
1
  import { Context } from "aws-lambda";
2
-
3
- //#region src/telemetry.d.ts
4
-
2
+ //#region src/endpoints/lambdaTelemetry.d.ts
5
3
  /**
6
4
  * Context object returned by onRequestStart, passed to subsequent hooks
7
5
  */
@@ -89,7 +87,6 @@ interface Telemetry {
89
87
  */
90
88
  onRequestError(ctx: TelemetryContext, error: Error): void;
91
89
  }
92
- //# sourceMappingURL=telemetry.d.ts.map
93
90
  //#endregion
94
- export { Telemetry, TelemetryContext, TelemetryRequest, TelemetryResponse };
95
- //# sourceMappingURL=telemetry-D7bVFLGi.d.mts.map
91
+ export { TelemetryResponse as i, TelemetryContext as n, TelemetryRequest as r, Telemetry as t };
92
+ //# sourceMappingURL=lambdaTelemetry-8vnmVZQ5.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lambdaTelemetry-8vnmVZQ5.d.mts","names":["LambdaContext"],"sources":["../src/endpoints/lambdaTelemetry.ts"],"mappings":";;;;;UAWiB;;;;GAIf;;;;;UAMe;;;;EAIhB;;;;EAKA,SAASA;;;;;UAMO;;;;EAIhB;;;;EAKA;;;;EAKA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BM;;;;;;;EAOhB,eAAe,SAAS,mBAAmB;;;;;;;EAQ3C,aAAa,KAAK,kBAAkB,UAAU;;;;;;;EAQ9C,eAAe,KAAK,kBAAkB,OAAO"}
@@ -1,5 +1,4 @@
1
1
  import { getCookie } from "hono/cookie";
2
-
3
2
  //#region src/endpoints/lazyAccessors.ts
4
3
  /**
5
4
  * Create a lazy header accessor for Hono.
@@ -8,11 +7,11 @@ import { getCookie } from "hono/cookie";
8
7
  */
9
8
  function createHonoHeaders(c) {
10
9
  let allHeaders = null;
11
- return (key) => {
10
+ return ((key) => {
12
11
  if (key !== void 0) return c.req.header(key);
13
12
  if (!allHeaders) allHeaders = c.req.header();
14
13
  return allHeaders;
15
- };
14
+ });
16
15
  }
17
16
  /**
18
17
  * Create a lazy cookie accessor for Hono.
@@ -21,7 +20,7 @@ function createHonoHeaders(c) {
21
20
  */
22
21
  function createHonoCookies(c) {
23
22
  let allCookies = null;
24
- return (name) => {
23
+ return ((name) => {
25
24
  if (name !== void 0) return getCookie(c, name);
26
25
  if (!allCookies) {
27
26
  allCookies = {};
@@ -37,7 +36,7 @@ function createHonoCookies(c) {
37
36
  }
38
37
  }
39
38
  return allCookies;
40
- };
39
+ });
41
40
  }
42
41
  /**
43
42
  * Create a lazy header accessor for API Gateway events.
@@ -54,17 +53,17 @@ function createApiGatewayHeaders(headers) {
54
53
  }
55
54
  return normalizedHeaders;
56
55
  };
57
- return (key) => {
56
+ return ((key) => {
58
57
  if (key !== void 0) {
59
58
  if (headers) {
60
59
  const direct = headers[key] ?? headers[key.toLowerCase()];
61
60
  if (direct !== void 0) return direct;
62
61
  return normalize()[key.toLowerCase()];
63
62
  }
64
- return void 0;
63
+ return;
65
64
  }
66
65
  return normalize();
67
- };
66
+ });
68
67
  }
69
68
  /**
70
69
  * Create a lazy cookie accessor for API Gateway events.
@@ -95,10 +94,10 @@ function createApiGatewayCookies(cookies, cookieHeader) {
95
94
  }
96
95
  return parsed;
97
96
  };
98
- return (name) => {
97
+ return ((name) => {
99
98
  if (name !== void 0) return parse()[name];
100
99
  return parse();
101
- };
100
+ });
102
101
  }
103
102
  /**
104
103
  * Create a lazy header accessor for plain object headers (test adaptor, etc).
@@ -106,7 +105,7 @@ function createApiGatewayCookies(cookies, cookieHeader) {
106
105
  */
107
106
  function createObjectHeaders(headers) {
108
107
  let normalized = null;
109
- return (key) => {
108
+ return ((key) => {
110
109
  if (key !== void 0) {
111
110
  if (headers) {
112
111
  const direct = headers[key] ?? headers[key.toLowerCase()];
@@ -123,7 +122,7 @@ function createObjectHeaders(headers) {
123
122
  for (const [k, v] of Object.entries(headers)) normalized[k.toLowerCase()] = v;
124
123
  }
125
124
  return normalized ?? {};
126
- };
125
+ });
127
126
  }
128
127
  /**
129
128
  * Create a lazy cookie accessor from a cookie header string.
@@ -146,30 +145,30 @@ function createCookieHeaderAccessor(cookieHeader) {
146
145
  }
147
146
  return parsed;
148
147
  };
149
- return (name) => {
148
+ return ((name) => {
150
149
  if (name !== void 0) return parse()[name];
151
150
  return parse();
152
- };
151
+ });
153
152
  }
154
153
  /**
155
154
  * Create a no-op header accessor (for minimal endpoints that don't use headers).
156
155
  */
157
156
  function createNoopHeaders() {
158
- return (key) => {
157
+ return ((key) => {
159
158
  if (key !== void 0) return void 0;
160
159
  return {};
161
- };
160
+ });
162
161
  }
163
162
  /**
164
163
  * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).
165
164
  */
166
165
  function createNoopCookies() {
167
- return (name) => {
166
+ return ((name) => {
168
167
  if (name !== void 0) return void 0;
169
168
  return {};
170
- };
169
+ });
171
170
  }
172
-
173
171
  //#endregion
174
- export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
175
- //# sourceMappingURL=lazyAccessors-DM6HcXQk.mjs.map
172
+ export { createHonoHeaders as a, createObjectHeaders as c, createHonoCookies as i, createApiGatewayHeaders as n, createNoopCookies as o, createCookieHeaderAccessor as r, createNoopHeaders as s, createApiGatewayCookies as t };
173
+
174
+ //# sourceMappingURL=lazyAccessors-CFanua0O.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazyAccessors-CFanua0O.mjs","names":[],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":["/**\n * Lazy header and cookie accessors for different adaptors.\n *\n * Instead of parsing all headers/cookies upfront, these accessors\n * use native adaptor methods for single lookups and only parse\n * everything when `header()` or `cookie()` is called without arguments.\n */\nimport type { Context } from 'hono';\nimport { getCookie } from 'hono/cookie';\nimport type { CookieFn, HeaderFn } from './Endpoint';\n\n/**\n * Create a lazy header accessor for Hono.\n * Uses `c.req.header(name)` for single lookups (native, case-insensitive).\n * Only calls `c.req.header()` to get all headers when needed.\n */\nexport function createHonoHeaders(c: Context): HeaderFn {\n\tlet allHeaders: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Single header lookup - use native Hono method (case-insensitive)\n\t\t\treturn c.req.header(key);\n\t\t}\n\t\t// Get all headers - cache the result\n\t\tif (!allHeaders) {\n\t\t\tallHeaders = c.req.header();\n\t\t}\n\t\treturn allHeaders;\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for Hono.\n * Uses `getCookie(c, name)` for single lookups (native).\n * Only parses the cookie header when all cookies are requested.\n */\nexport function createHonoCookies(c: Context): CookieFn {\n\tlet allCookies: Record<string, string> | null = null;\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\t// Single cookie lookup - use native Hono method\n\t\t\treturn getCookie(c, name);\n\t\t}\n\t\t// Get all cookies - parse and cache\n\t\tif (!allCookies) {\n\t\t\tallCookies = {};\n\t\t\tconst cookieHeader = c.req.header('cookie');\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tallCookies[key] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn allCookies;\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for API Gateway events.\n * Handles case-insensitive lookups.\n */\nexport function createApiGatewayHeaders(\n\theaders: Record<string, string | undefined> | null | undefined,\n): HeaderFn {\n\tlet normalizedHeaders: Record<string, string> | null = null;\n\n\tconst normalize = () => {\n\t\tif (!normalizedHeaders) {\n\t\t\tnormalizedHeaders = {};\n\t\t\tif (headers) {\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tif (v !== undefined) {\n\t\t\t\t\t\tnormalizedHeaders[k.toLowerCase()] = v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn normalizedHeaders;\n\t};\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case: headers already lowercase)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t\t// Fall back to normalized lookup\n\t\t\t\treturn normalize()[key.toLowerCase()];\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn normalize();\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for API Gateway events.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createApiGatewayCookies(\n\tcookies: string[] | undefined,\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\t// API Gateway v2 provides cookies as array\n\t\t\tif (cookies) {\n\t\t\t\tfor (const cookie of cookies) {\n\t\t\t\t\tconst eqIndex = cookie.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = cookie.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = cookie.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cookieHeader) {\n\t\t\t\t// Fall back to parsing cookie header\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for plain object headers (test adaptor, etc).\n * Headers are already available as an object, just provide lazy access.\n */\nexport function createObjectHeaders(\n\theaders: Record<string, string> | undefined,\n): HeaderFn {\n\tlet normalized: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t}\n\t\t\t// Fall back to normalized lookup for case-insensitivity\n\t\t\tif (!normalized && headers) {\n\t\t\t\tnormalized = {};\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn normalized?.[key.toLowerCase()];\n\t\t}\n\t\t// Return all headers\n\t\tif (!normalized && headers) {\n\t\t\tnormalized = {};\n\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t}\n\t\t}\n\t\treturn normalized ?? {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor from a cookie header string.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createCookieHeaderAccessor(\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\t// Decode URL-encoded values to match Endpoint.createCookies behavior\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a no-op header accessor (for minimal endpoints that don't use headers).\n */\nexport function createNoopHeaders(): HeaderFn {\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) return undefined;\n\t\treturn {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).\n */\nexport function createNoopCookies(): CookieFn {\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) return undefined;\n\t\treturn {};\n\t}) as CookieFn;\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,kBAAkB,GAAsB;CACvD,IAAI,aAA4C;CAEhD,SAAS,QAAiB;EACzB,IAAI,QAAQ,KAAA,GAEX,OAAO,EAAE,IAAI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;CACX,IAAI,SAAwC;CAE5C,MAAM,cAAc;EACnB,IAAI,CAAC,QAAQ;GACZ,SAAS,CAAC;GACV,IAAI,cACH,KAAK,MAAM,QAAQ,aAAa,MAAM,GAAG,GAAG;IAC3C,MAAM,UAAU,KAAK,KAAK;IAC1B,MAAM,UAAU,QAAQ,QAAQ,GAAG;IACnC,IAAI,UAAU,GAAG;KAChB,MAAM,MAAM,QAAQ,MAAM,GAAG,OAAO;KACpC,MAAM,QAAQ,QAAQ,MAAM,UAAU,CAAC;KAEvC,OAAO,OAAO,mBAAmB,KAAK;IACvC;GACD;EAEF;EACA,OAAO;CACR;CAEA,SAAS,SAAkB;EAC1B,IAAI,SAAS,KAAA,GACZ,OAAO,MAAM,CAAC,CAAC;EAEhB,OAAO,MAAM;CACd;AACD;;;;AAKA,SAAgB,oBAA8B;CAC7C,SAAS,QAAiB;EACzB,IAAI,QAAQ,KAAA,GAAW,OAAO,KAAA;EAC9B,OAAO,CAAC;CACT;AACD;;;;AAKA,SAAgB,oBAA8B;CAC7C,SAAS,SAAkB;EAC1B,IAAI,SAAS,KAAA,GAAW,OAAO,KAAA;EAC/B,OAAO,CAAC;CACT;AACD"}
@@ -1,6 +1,4 @@
1
- const require_chunk = require('./chunk-DWy1uDak.cjs');
2
- const hono_cookie = require_chunk.__toESM(require("hono/cookie"));
3
-
1
+ let hono_cookie = require("hono/cookie");
4
2
  //#region src/endpoints/lazyAccessors.ts
5
3
  /**
6
4
  * Create a lazy header accessor for Hono.
@@ -9,11 +7,11 @@ const hono_cookie = require_chunk.__toESM(require("hono/cookie"));
9
7
  */
10
8
  function createHonoHeaders(c) {
11
9
  let allHeaders = null;
12
- return (key) => {
10
+ return ((key) => {
13
11
  if (key !== void 0) return c.req.header(key);
14
12
  if (!allHeaders) allHeaders = c.req.header();
15
13
  return allHeaders;
16
- };
14
+ });
17
15
  }
18
16
  /**
19
17
  * Create a lazy cookie accessor for Hono.
@@ -22,7 +20,7 @@ function createHonoHeaders(c) {
22
20
  */
23
21
  function createHonoCookies(c) {
24
22
  let allCookies = null;
25
- return (name) => {
23
+ return ((name) => {
26
24
  if (name !== void 0) return (0, hono_cookie.getCookie)(c, name);
27
25
  if (!allCookies) {
28
26
  allCookies = {};
@@ -38,7 +36,7 @@ function createHonoCookies(c) {
38
36
  }
39
37
  }
40
38
  return allCookies;
41
- };
39
+ });
42
40
  }
43
41
  /**
44
42
  * Create a lazy header accessor for API Gateway events.
@@ -55,17 +53,17 @@ function createApiGatewayHeaders(headers) {
55
53
  }
56
54
  return normalizedHeaders;
57
55
  };
58
- return (key) => {
56
+ return ((key) => {
59
57
  if (key !== void 0) {
60
58
  if (headers) {
61
59
  const direct = headers[key] ?? headers[key.toLowerCase()];
62
60
  if (direct !== void 0) return direct;
63
61
  return normalize()[key.toLowerCase()];
64
62
  }
65
- return void 0;
63
+ return;
66
64
  }
67
65
  return normalize();
68
- };
66
+ });
69
67
  }
70
68
  /**
71
69
  * Create a lazy cookie accessor for API Gateway events.
@@ -96,10 +94,10 @@ function createApiGatewayCookies(cookies, cookieHeader) {
96
94
  }
97
95
  return parsed;
98
96
  };
99
- return (name) => {
97
+ return ((name) => {
100
98
  if (name !== void 0) return parse()[name];
101
99
  return parse();
102
- };
100
+ });
103
101
  }
104
102
  /**
105
103
  * Create a lazy header accessor for plain object headers (test adaptor, etc).
@@ -107,7 +105,7 @@ function createApiGatewayCookies(cookies, cookieHeader) {
107
105
  */
108
106
  function createObjectHeaders(headers) {
109
107
  let normalized = null;
110
- return (key) => {
108
+ return ((key) => {
111
109
  if (key !== void 0) {
112
110
  if (headers) {
113
111
  const direct = headers[key] ?? headers[key.toLowerCase()];
@@ -124,7 +122,7 @@ function createObjectHeaders(headers) {
124
122
  for (const [k, v] of Object.entries(headers)) normalized[k.toLowerCase()] = v;
125
123
  }
126
124
  return normalized ?? {};
127
- };
125
+ });
128
126
  }
129
127
  /**
130
128
  * Create a lazy cookie accessor from a cookie header string.
@@ -147,77 +145,77 @@ function createCookieHeaderAccessor(cookieHeader) {
147
145
  }
148
146
  return parsed;
149
147
  };
150
- return (name) => {
148
+ return ((name) => {
151
149
  if (name !== void 0) return parse()[name];
152
150
  return parse();
153
- };
151
+ });
154
152
  }
155
153
  /**
156
154
  * Create a no-op header accessor (for minimal endpoints that don't use headers).
157
155
  */
158
156
  function createNoopHeaders() {
159
- return (key) => {
157
+ return ((key) => {
160
158
  if (key !== void 0) return void 0;
161
159
  return {};
162
- };
160
+ });
163
161
  }
164
162
  /**
165
163
  * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).
166
164
  */
167
165
  function createNoopCookies() {
168
- return (name) => {
166
+ return ((name) => {
169
167
  if (name !== void 0) return void 0;
170
168
  return {};
171
- };
169
+ });
172
170
  }
173
-
174
171
  //#endregion
175
- Object.defineProperty(exports, 'createApiGatewayCookies', {
176
- enumerable: true,
177
- get: function () {
178
- return createApiGatewayCookies;
179
- }
172
+ Object.defineProperty(exports, "createApiGatewayCookies", {
173
+ enumerable: true,
174
+ get: function() {
175
+ return createApiGatewayCookies;
176
+ }
180
177
  });
181
- Object.defineProperty(exports, 'createApiGatewayHeaders', {
182
- enumerable: true,
183
- get: function () {
184
- return createApiGatewayHeaders;
185
- }
178
+ Object.defineProperty(exports, "createApiGatewayHeaders", {
179
+ enumerable: true,
180
+ get: function() {
181
+ return createApiGatewayHeaders;
182
+ }
186
183
  });
187
- Object.defineProperty(exports, 'createCookieHeaderAccessor', {
188
- enumerable: true,
189
- get: function () {
190
- return createCookieHeaderAccessor;
191
- }
184
+ Object.defineProperty(exports, "createCookieHeaderAccessor", {
185
+ enumerable: true,
186
+ get: function() {
187
+ return createCookieHeaderAccessor;
188
+ }
192
189
  });
193
- Object.defineProperty(exports, 'createHonoCookies', {
194
- enumerable: true,
195
- get: function () {
196
- return createHonoCookies;
197
- }
190
+ Object.defineProperty(exports, "createHonoCookies", {
191
+ enumerable: true,
192
+ get: function() {
193
+ return createHonoCookies;
194
+ }
198
195
  });
199
- Object.defineProperty(exports, 'createHonoHeaders', {
200
- enumerable: true,
201
- get: function () {
202
- return createHonoHeaders;
203
- }
196
+ Object.defineProperty(exports, "createHonoHeaders", {
197
+ enumerable: true,
198
+ get: function() {
199
+ return createHonoHeaders;
200
+ }
204
201
  });
205
- Object.defineProperty(exports, 'createNoopCookies', {
206
- enumerable: true,
207
- get: function () {
208
- return createNoopCookies;
209
- }
202
+ Object.defineProperty(exports, "createNoopCookies", {
203
+ enumerable: true,
204
+ get: function() {
205
+ return createNoopCookies;
206
+ }
210
207
  });
211
- Object.defineProperty(exports, 'createNoopHeaders', {
212
- enumerable: true,
213
- get: function () {
214
- return createNoopHeaders;
215
- }
208
+ Object.defineProperty(exports, "createNoopHeaders", {
209
+ enumerable: true,
210
+ get: function() {
211
+ return createNoopHeaders;
212
+ }
216
213
  });
217
- Object.defineProperty(exports, 'createObjectHeaders', {
218
- enumerable: true,
219
- get: function () {
220
- return createObjectHeaders;
221
- }
214
+ Object.defineProperty(exports, "createObjectHeaders", {
215
+ enumerable: true,
216
+ get: function() {
217
+ return createObjectHeaders;
218
+ }
222
219
  });
223
- //# sourceMappingURL=lazyAccessors-DrJj8NpA.cjs.map
220
+
221
+ //# sourceMappingURL=lazyAccessors-hJKGv8Ay.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazyAccessors-hJKGv8Ay.cjs","names":["getCookie"],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":["/**\n * Lazy header and cookie accessors for different adaptors.\n *\n * Instead of parsing all headers/cookies upfront, these accessors\n * use native adaptor methods for single lookups and only parse\n * everything when `header()` or `cookie()` is called without arguments.\n */\nimport type { Context } from 'hono';\nimport { getCookie } from 'hono/cookie';\nimport type { CookieFn, HeaderFn } from './Endpoint';\n\n/**\n * Create a lazy header accessor for Hono.\n * Uses `c.req.header(name)` for single lookups (native, case-insensitive).\n * Only calls `c.req.header()` to get all headers when needed.\n */\nexport function createHonoHeaders(c: Context): HeaderFn {\n\tlet allHeaders: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Single header lookup - use native Hono method (case-insensitive)\n\t\t\treturn c.req.header(key);\n\t\t}\n\t\t// Get all headers - cache the result\n\t\tif (!allHeaders) {\n\t\t\tallHeaders = c.req.header();\n\t\t}\n\t\treturn allHeaders;\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for Hono.\n * Uses `getCookie(c, name)` for single lookups (native).\n * Only parses the cookie header when all cookies are requested.\n */\nexport function createHonoCookies(c: Context): CookieFn {\n\tlet allCookies: Record<string, string> | null = null;\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\t// Single cookie lookup - use native Hono method\n\t\t\treturn getCookie(c, name);\n\t\t}\n\t\t// Get all cookies - parse and cache\n\t\tif (!allCookies) {\n\t\t\tallCookies = {};\n\t\t\tconst cookieHeader = c.req.header('cookie');\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tallCookies[key] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn allCookies;\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for API Gateway events.\n * Handles case-insensitive lookups.\n */\nexport function createApiGatewayHeaders(\n\theaders: Record<string, string | undefined> | null | undefined,\n): HeaderFn {\n\tlet normalizedHeaders: Record<string, string> | null = null;\n\n\tconst normalize = () => {\n\t\tif (!normalizedHeaders) {\n\t\t\tnormalizedHeaders = {};\n\t\t\tif (headers) {\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tif (v !== undefined) {\n\t\t\t\t\t\tnormalizedHeaders[k.toLowerCase()] = v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn normalizedHeaders;\n\t};\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case: headers already lowercase)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t\t// Fall back to normalized lookup\n\t\t\t\treturn normalize()[key.toLowerCase()];\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn normalize();\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for API Gateway events.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createApiGatewayCookies(\n\tcookies: string[] | undefined,\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\t// API Gateway v2 provides cookies as array\n\t\t\tif (cookies) {\n\t\t\t\tfor (const cookie of cookies) {\n\t\t\t\t\tconst eqIndex = cookie.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = cookie.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = cookie.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cookieHeader) {\n\t\t\t\t// Fall back to parsing cookie header\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for plain object headers (test adaptor, etc).\n * Headers are already available as an object, just provide lazy access.\n */\nexport function createObjectHeaders(\n\theaders: Record<string, string> | undefined,\n): HeaderFn {\n\tlet normalized: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t}\n\t\t\t// Fall back to normalized lookup for case-insensitivity\n\t\t\tif (!normalized && headers) {\n\t\t\t\tnormalized = {};\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn normalized?.[key.toLowerCase()];\n\t\t}\n\t\t// Return all headers\n\t\tif (!normalized && headers) {\n\t\t\tnormalized = {};\n\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t}\n\t\t}\n\t\treturn normalized ?? {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor from a cookie header string.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createCookieHeaderAccessor(\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\t// Decode URL-encoded values to match Endpoint.createCookies behavior\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a no-op header accessor (for minimal endpoints that don't use headers).\n */\nexport function createNoopHeaders(): HeaderFn {\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) return undefined;\n\t\treturn {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).\n */\nexport function createNoopCookies(): CookieFn {\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) return undefined;\n\t\treturn {};\n\t}) as CookieFn;\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,kBAAkB,GAAsB;CACvD,IAAI,aAA4C;CAEhD,SAAS,QAAiB;EACzB,IAAI,QAAQ,KAAA,GAEX,OAAO,EAAE,IAAI,OAAO,GAAG;EAGxB,IAAI,CAAC,YACJ,aAAa,EAAE,IAAI,OAAO;EAE3B,OAAO;CACR;AACD;;;;;;AAOA,SAAgB,kBAAkB,GAAsB;CACvD,IAAI,aAA4C;CAEhD,SAAS,SAAkB;EAC1B,IAAI,SAAS,KAAA,GAEZ,QAAA,GAAOA,YAAAA,UAAAA,CAAU,GAAG,IAAI;EAGzB,IAAI,CAAC,YAAY;GAChB,aAAa,CAAC;GACd,MAAM,eAAe,EAAE,IAAI,OAAO,QAAQ;GAC1C,IAAI,cACH,KAAK,MAAM,QAAQ,aAAa,MAAM,GAAG,GAAG;IAC3C,MAAM,UAAU,KAAK,KAAK;IAC1B,MAAM,UAAU,QAAQ,QAAQ,GAAG;IACnC,IAAI,UAAU,GAAG;KAChB,MAAM,MAAM,QAAQ,MAAM,GAAG,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