@geekmidas/constructs 3.0.6 → 3.0.8

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 (449) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{Construct-BXG8cFSm.cjs → Construct-B14miJ6P.cjs} +95 -10
  3. package/dist/Construct-B14miJ6P.cjs.map +1 -0
  4. package/dist/{Construct-C2SyofdS.d.mts → Construct-CXqvzglu.d.cts} +11 -6
  5. package/dist/{Construct-C2SyofdS.d.mts.map → Construct-CXqvzglu.d.cts.map} +1 -1
  6. package/dist/{Construct-CQ9zV58W.mjs → Construct-CdJY2DJS.mjs} +83 -9
  7. package/dist/Construct-CdJY2DJS.mjs.map +1 -0
  8. package/dist/{Construct-CX7HyFfT.d.cts → Construct-D0n7QTaI.d.mts} +13 -8
  9. package/dist/Construct-D0n7QTaI.d.mts.map +1 -0
  10. package/dist/{Endpoint-DtFQFL63.d.mts → Endpoint-C991gK3T.d.cts} +133 -30
  11. package/dist/Endpoint-C991gK3T.d.cts.map +1 -0
  12. package/dist/{Endpoint-CGdCGJkC.d.cts → Endpoint-CRHpLPV3.d.mts} +133 -30
  13. package/dist/Endpoint-CRHpLPV3.d.mts.map +1 -0
  14. package/dist/{HonoEndpointAdaptor-B5fKdLi7.cjs → HonoEndpointAdaptor-BDz1qM4z.cjs} +81 -24
  15. package/dist/HonoEndpointAdaptor-BDz1qM4z.cjs.map +1 -0
  16. package/dist/{HonoEndpointAdaptor-DOUODM7n.mjs → HonoEndpointAdaptor-DPBfEPZj.mjs} +64 -7
  17. package/dist/HonoEndpointAdaptor-DPBfEPZj.mjs.map +1 -0
  18. package/dist/{Subscriber-1rDE7HuM.d.cts → Subscriber-D8WkA8np.d.cts} +3 -3
  19. package/dist/{Subscriber-1rDE7HuM.d.cts.map → Subscriber-D8WkA8np.d.cts.map} +1 -1
  20. package/dist/{Subscriber-BgB3RRxb.d.mts → Subscriber-Tft61-YG.d.mts} +5 -5
  21. package/dist/Subscriber-Tft61-YG.d.mts.map +1 -0
  22. package/dist/adaptors/aws.cjs +737 -21
  23. package/dist/adaptors/aws.cjs.map +1 -0
  24. package/dist/adaptors/aws.d.cts +221 -17
  25. package/dist/adaptors/aws.d.cts.map +1 -0
  26. package/dist/adaptors/aws.d.mts +221 -17
  27. package/dist/adaptors/aws.d.mts.map +1 -0
  28. package/dist/adaptors/aws.mjs +734 -18
  29. package/dist/adaptors/aws.mjs.map +1 -0
  30. package/dist/adaptors/hono.cjs +5 -12
  31. package/dist/adaptors/hono.d.cts +52 -10
  32. package/dist/adaptors/hono.d.cts.map +1 -0
  33. package/dist/adaptors/hono.d.mts +52 -10
  34. package/dist/adaptors/hono.d.mts.map +1 -0
  35. package/dist/adaptors/hono.mjs +5 -12
  36. package/dist/adaptors/testing.cjs +392 -15
  37. package/dist/adaptors/testing.cjs.map +1 -0
  38. package/dist/adaptors/testing.d.cts +177 -13
  39. package/dist/adaptors/testing.d.cts.map +1 -0
  40. package/dist/adaptors/testing.d.mts +177 -13
  41. package/dist/adaptors/testing.d.mts.map +1 -0
  42. package/dist/adaptors/testing.mjs +389 -14
  43. package/dist/adaptors/testing.mjs.map +1 -0
  44. package/dist/crons/index.cjs +82 -10
  45. package/dist/crons/index.cjs.map +1 -1
  46. package/dist/crons/index.d.cts +48 -11
  47. package/dist/crons/index.d.cts.map +1 -1
  48. package/dist/crons/index.d.mts +45 -11
  49. package/dist/crons/index.d.mts.map +1 -1
  50. package/dist/crons/index.mjs +79 -7
  51. package/dist/crons/index.mjs.map +1 -1
  52. package/dist/endpoints/index.cjs +717 -23
  53. package/dist/endpoints/index.cjs.map +1 -1
  54. package/dist/endpoints/index.d.cts +316 -14
  55. package/dist/endpoints/index.d.cts.map +1 -1
  56. package/dist/endpoints/index.d.mts +315 -14
  57. package/dist/endpoints/index.d.mts.map +1 -1
  58. package/dist/endpoints/index.mjs +706 -12
  59. package/dist/endpoints/index.mjs.map +1 -1
  60. package/dist/functions/index.cjs +5 -8
  61. package/dist/functions/index.d.cts +2 -5
  62. package/dist/functions/index.d.mts +2 -5
  63. package/dist/functions/index.mjs +2 -5
  64. package/dist/functions-DiaRAdfp.cjs +2893 -0
  65. package/dist/functions-DiaRAdfp.cjs.map +1 -0
  66. package/dist/functions-GmSHFbpr.mjs +2864 -0
  67. package/dist/functions-GmSHFbpr.mjs.map +1 -0
  68. package/dist/index-Cq4fz8uM.d.mts +132 -0
  69. package/dist/index-Cq4fz8uM.d.mts.map +1 -0
  70. package/dist/index-CzIMpK-e.d.cts +135 -0
  71. package/dist/index-CzIMpK-e.d.cts.map +1 -0
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.d.cts +3 -3
  74. package/dist/index.d.mts +3 -3
  75. package/dist/index.mjs +1 -1
  76. package/dist/lazyAccessors-CJZYs9uM.mjs +1887 -0
  77. package/dist/lazyAccessors-CJZYs9uM.mjs.map +1 -0
  78. package/dist/lazyAccessors-DHvDeww0.cjs +1964 -0
  79. package/dist/lazyAccessors-DHvDeww0.cjs.map +1 -0
  80. package/dist/processAudits-B0PbJf1Z.mjs +80 -0
  81. package/dist/processAudits-B0PbJf1Z.mjs.map +1 -0
  82. package/dist/processAudits-CUko08pi.cjs +92 -0
  83. package/dist/processAudits-CUko08pi.cjs.map +1 -0
  84. package/dist/subscribers/index.cjs +77 -6
  85. package/dist/subscribers/index.cjs.map +1 -1
  86. package/dist/subscribers/index.d.cts +27 -5
  87. package/dist/subscribers/index.d.cts.map +1 -1
  88. package/dist/subscribers/index.d.mts +26 -5
  89. package/dist/subscribers/index.d.mts.map +1 -1
  90. package/dist/subscribers/index.mjs +74 -3
  91. package/dist/subscribers/index.mjs.map +1 -1
  92. package/dist/{telemetry-BTaiRqPo.d.cts → telemetry-Bt0vK4ma.d.cts} +1 -1
  93. package/dist/{telemetry-BTaiRqPo.d.cts.map → telemetry-Bt0vK4ma.d.cts.map} +1 -1
  94. package/dist/{telemetry-C-kNOW3C.d.mts → telemetry-COvVBKBM.d.mts} +1 -1
  95. package/dist/{telemetry-C-kNOW3C.d.mts.map → telemetry-COvVBKBM.d.mts.map} +1 -1
  96. package/dist/{types-B5H3piDg.d.cts → types-B8YlI4cx.d.cts} +1 -1
  97. package/dist/{types-B5H3piDg.d.cts.map → types-B8YlI4cx.d.cts.map} +1 -1
  98. package/dist/{types-aFmq5cKh.d.mts → types-BA3eK4xj.d.mts} +1 -1
  99. package/dist/{types-aFmq5cKh.d.mts.map → types-BA3eK4xj.d.mts.map} +1 -1
  100. package/dist/types.d.cts +1 -1
  101. package/dist/types.d.mts +1 -1
  102. package/package.json +18 -13
  103. package/src/Construct.ts +26 -8
  104. package/src/__tests__/Construct.environment.spec.ts +123 -0
  105. package/src/adaptors/testing.ts +7 -0
  106. package/src/endpoints/MswEndpointAdaptor.ts +226 -0
  107. package/src/endpoints/__tests__/MswEndpointAdaptor.spec.ts +211 -0
  108. package/tsdown.config.ts +30 -1
  109. package/dist/AWSLambdaFunction-BF1gJJjG.d.mts +0 -32
  110. package/dist/AWSLambdaFunction-BF1gJJjG.d.mts.map +0 -1
  111. package/dist/AWSLambdaFunction-CPEAl5nZ.cjs +0 -120
  112. package/dist/AWSLambdaFunction-CPEAl5nZ.cjs.map +0 -1
  113. package/dist/AWSLambdaFunction-DJiCAPAf.mjs +0 -114
  114. package/dist/AWSLambdaFunction-DJiCAPAf.mjs.map +0 -1
  115. package/dist/AWSLambdaFunction-tzqv5XU6.d.cts +0 -32
  116. package/dist/AWSLambdaFunction-tzqv5XU6.d.cts.map +0 -1
  117. package/dist/AWSLambdaSubscriberAdaptor-Cj1wjkUP.d.cts +0 -36
  118. package/dist/AWSLambdaSubscriberAdaptor-Cj1wjkUP.d.cts.map +0 -1
  119. package/dist/AWSLambdaSubscriberAdaptor-OQvj2lKI.d.mts +0 -36
  120. package/dist/AWSLambdaSubscriberAdaptor-OQvj2lKI.d.mts.map +0 -1
  121. package/dist/AWSLambdaSubscriberAdaptor-RKwKYLl1.mjs +0 -172
  122. package/dist/AWSLambdaSubscriberAdaptor-RKwKYLl1.mjs.map +0 -1
  123. package/dist/AWSLambdaSubscriberAdaptor-eZ3qoKvK.cjs +0 -178
  124. package/dist/AWSLambdaSubscriberAdaptor-eZ3qoKvK.cjs.map +0 -1
  125. package/dist/AmazonApiGatewayEndpointAdaptor-BIltcbAc.cjs +0 -277
  126. package/dist/AmazonApiGatewayEndpointAdaptor-BIltcbAc.cjs.map +0 -1
  127. package/dist/AmazonApiGatewayEndpointAdaptor-BpYtYCeW.mjs +0 -271
  128. package/dist/AmazonApiGatewayEndpointAdaptor-BpYtYCeW.mjs.map +0 -1
  129. package/dist/AmazonApiGatewayEndpointAdaptor-DqNcQGMf.d.cts +0 -124
  130. package/dist/AmazonApiGatewayEndpointAdaptor-DqNcQGMf.d.cts.map +0 -1
  131. package/dist/AmazonApiGatewayEndpointAdaptor-Hi8Pbp2d.d.mts +0 -124
  132. package/dist/AmazonApiGatewayEndpointAdaptor-Hi8Pbp2d.d.mts.map +0 -1
  133. package/dist/AmazonApiGatewayV1EndpointAdaptor-CRwyWT6t.mjs +0 -42
  134. package/dist/AmazonApiGatewayV1EndpointAdaptor-CRwyWT6t.mjs.map +0 -1
  135. package/dist/AmazonApiGatewayV1EndpointAdaptor-DEETT6Wj.cjs +0 -47
  136. package/dist/AmazonApiGatewayV1EndpointAdaptor-DEETT6Wj.cjs.map +0 -1
  137. package/dist/AmazonApiGatewayV1EndpointAdaptor-DcN2fYsv.d.cts +0 -23
  138. package/dist/AmazonApiGatewayV1EndpointAdaptor-DcN2fYsv.d.cts.map +0 -1
  139. package/dist/AmazonApiGatewayV1EndpointAdaptor-cpwJzU4W.d.mts +0 -23
  140. package/dist/AmazonApiGatewayV1EndpointAdaptor-cpwJzU4W.d.mts.map +0 -1
  141. package/dist/AmazonApiGatewayV2EndpointAdaptor-C2qO8FN6.cjs +0 -48
  142. package/dist/AmazonApiGatewayV2EndpointAdaptor-C2qO8FN6.cjs.map +0 -1
  143. package/dist/AmazonApiGatewayV2EndpointAdaptor-Cn9UoRgB.d.cts +0 -22
  144. package/dist/AmazonApiGatewayV2EndpointAdaptor-Cn9UoRgB.d.cts.map +0 -1
  145. package/dist/AmazonApiGatewayV2EndpointAdaptor-LzH3hkB-.d.mts +0 -22
  146. package/dist/AmazonApiGatewayV2EndpointAdaptor-LzH3hkB-.d.mts.map +0 -1
  147. package/dist/AmazonApiGatewayV2EndpointAdaptor-m9YKI294.mjs +0 -42
  148. package/dist/AmazonApiGatewayV2EndpointAdaptor-m9YKI294.mjs.map +0 -1
  149. package/dist/Authorizer-4unKN3Xn.mjs +0 -68
  150. package/dist/Authorizer-4unKN3Xn.mjs.map +0 -1
  151. package/dist/Authorizer-DBsrDTuf.d.mts +0 -126
  152. package/dist/Authorizer-DBsrDTuf.d.mts.map +0 -1
  153. package/dist/Authorizer-DWtwC8we.d.cts +0 -126
  154. package/dist/Authorizer-DWtwC8we.d.cts.map +0 -1
  155. package/dist/Authorizer-Dx57psuM.cjs +0 -92
  156. package/dist/Authorizer-Dx57psuM.cjs.map +0 -1
  157. package/dist/BaseFunctionBuilder-C-4hYTfj.d.cts +0 -42
  158. package/dist/BaseFunctionBuilder-C-4hYTfj.d.cts.map +0 -1
  159. package/dist/BaseFunctionBuilder-C3rQMoWb.mjs +0 -70
  160. package/dist/BaseFunctionBuilder-C3rQMoWb.mjs.map +0 -1
  161. package/dist/BaseFunctionBuilder-CsvFjzA8.d.mts +0 -42
  162. package/dist/BaseFunctionBuilder-CsvFjzA8.d.mts.map +0 -1
  163. package/dist/BaseFunctionBuilder-DXf6HK-N.cjs +0 -76
  164. package/dist/BaseFunctionBuilder-DXf6HK-N.cjs.map +0 -1
  165. package/dist/Construct-BXG8cFSm.cjs.map +0 -1
  166. package/dist/Construct-CQ9zV58W.mjs.map +0 -1
  167. package/dist/Construct-CX7HyFfT.d.cts.map +0 -1
  168. package/dist/Construct.cjs +0 -6
  169. package/dist/Construct.d.cts +0 -2
  170. package/dist/Construct.d.mts +0 -2
  171. package/dist/Construct.mjs +0 -3
  172. package/dist/Cron-B3vrGuaD.mjs +0 -20
  173. package/dist/Cron-B3vrGuaD.mjs.map +0 -1
  174. package/dist/Cron-BDxW6fYg.d.cts +0 -26
  175. package/dist/Cron-BDxW6fYg.d.cts.map +0 -1
  176. package/dist/Cron-CWxjO2Fg.d.mts +0 -26
  177. package/dist/Cron-CWxjO2Fg.d.mts.map +0 -1
  178. package/dist/Cron-DEKZg5j4.cjs +0 -25
  179. package/dist/Cron-DEKZg5j4.cjs.map +0 -1
  180. package/dist/CronBuilder-BHpY6w3b.cjs +0 -74
  181. package/dist/CronBuilder-BHpY6w3b.cjs.map +0 -1
  182. package/dist/CronBuilder-CginrW3H.d.cts +0 -32
  183. package/dist/CronBuilder-CginrW3H.d.cts.map +0 -1
  184. package/dist/CronBuilder-DJnXbDGK.d.mts +0 -32
  185. package/dist/CronBuilder-DJnXbDGK.d.mts.map +0 -1
  186. package/dist/CronBuilder-VXpyNfp2.mjs +0 -68
  187. package/dist/CronBuilder-VXpyNfp2.mjs.map +0 -1
  188. package/dist/Endpoint-BcxvF4F3.cjs +0 -440
  189. package/dist/Endpoint-BcxvF4F3.cjs.map +0 -1
  190. package/dist/Endpoint-CGdCGJkC.d.cts.map +0 -1
  191. package/dist/Endpoint-DtFQFL63.d.mts.map +0 -1
  192. package/dist/Endpoint-DvY3aqAy.mjs +0 -422
  193. package/dist/Endpoint-DvY3aqAy.mjs.map +0 -1
  194. package/dist/EndpointBuilder-CMzbGG2c.mjs +0 -262
  195. package/dist/EndpointBuilder-CMzbGG2c.mjs.map +0 -1
  196. package/dist/EndpointBuilder-DIAsH97h.d.mts +0 -146
  197. package/dist/EndpointBuilder-DIAsH97h.d.mts.map +0 -1
  198. package/dist/EndpointBuilder-Dzqcm8Yv.d.cts +0 -146
  199. package/dist/EndpointBuilder-Dzqcm8Yv.d.cts.map +0 -1
  200. package/dist/EndpointBuilder-QdDf3x87.cjs +0 -268
  201. package/dist/EndpointBuilder-QdDf3x87.cjs.map +0 -1
  202. package/dist/EndpointFactory-AsfUsn-v.cjs +0 -393
  203. package/dist/EndpointFactory-AsfUsn-v.cjs.map +0 -1
  204. package/dist/EndpointFactory-C1rh407J.d.cts +0 -142
  205. package/dist/EndpointFactory-C1rh407J.d.cts.map +0 -1
  206. package/dist/EndpointFactory-CkPaFZA0.mjs +0 -381
  207. package/dist/EndpointFactory-CkPaFZA0.mjs.map +0 -1
  208. package/dist/EndpointFactory-pCuCu_1H.d.mts +0 -142
  209. package/dist/EndpointFactory-pCuCu_1H.d.mts.map +0 -1
  210. package/dist/Function-CZw1DRQ6.d.mts +0 -76
  211. package/dist/Function-CZw1DRQ6.d.mts.map +0 -1
  212. package/dist/Function-CwlB89lS.d.cts +0 -76
  213. package/dist/Function-CwlB89lS.d.cts.map +0 -1
  214. package/dist/Function-DgQ_no6B.cjs +0 -84
  215. package/dist/Function-DgQ_no6B.cjs.map +0 -1
  216. package/dist/Function-xfQbftdE.mjs +0 -72
  217. package/dist/Function-xfQbftdE.mjs.map +0 -1
  218. package/dist/FunctionBuilder-CBeqX18X.mjs +0 -80
  219. package/dist/FunctionBuilder-CBeqX18X.mjs.map +0 -1
  220. package/dist/FunctionBuilder-C_xG9As7.cjs +0 -86
  221. package/dist/FunctionBuilder-C_xG9As7.cjs.map +0 -1
  222. package/dist/FunctionBuilder-D_7f5MfS.d.cts +0 -40
  223. package/dist/FunctionBuilder-D_7f5MfS.d.cts.map +0 -1
  224. package/dist/FunctionBuilder-m5BNA2Ap.d.mts +0 -40
  225. package/dist/FunctionBuilder-m5BNA2Ap.d.mts.map +0 -1
  226. package/dist/FunctionExecutionWrapper-B0ZAssiy.mjs +0 -101
  227. package/dist/FunctionExecutionWrapper-B0ZAssiy.mjs.map +0 -1
  228. package/dist/FunctionExecutionWrapper-C7yYXIq-.d.mts +0 -50
  229. package/dist/FunctionExecutionWrapper-C7yYXIq-.d.mts.map +0 -1
  230. package/dist/FunctionExecutionWrapper-Cg8HjuHL.d.cts +0 -50
  231. package/dist/FunctionExecutionWrapper-Cg8HjuHL.d.cts.map +0 -1
  232. package/dist/FunctionExecutionWrapper-KKHP6fDY.cjs +0 -107
  233. package/dist/FunctionExecutionWrapper-KKHP6fDY.cjs.map +0 -1
  234. package/dist/HonoEndpointAdaptor-B5fKdLi7.cjs.map +0 -1
  235. package/dist/HonoEndpointAdaptor-BXga7Jqh.d.mts +0 -50
  236. package/dist/HonoEndpointAdaptor-BXga7Jqh.d.mts.map +0 -1
  237. package/dist/HonoEndpointAdaptor-D3IgM-0B.d.cts +0 -50
  238. package/dist/HonoEndpointAdaptor-D3IgM-0B.d.cts.map +0 -1
  239. package/dist/HonoEndpointAdaptor-DOUODM7n.mjs.map +0 -1
  240. package/dist/Subscriber-BEhOdNQi.mjs +0 -28
  241. package/dist/Subscriber-BEhOdNQi.mjs.map +0 -1
  242. package/dist/Subscriber-BgB3RRxb.d.mts.map +0 -1
  243. package/dist/Subscriber-Scz7hrV6.cjs +0 -34
  244. package/dist/Subscriber-Scz7hrV6.cjs.map +0 -1
  245. package/dist/SubscriberBuilder-B82h4v-S.cjs +0 -60
  246. package/dist/SubscriberBuilder-B82h4v-S.cjs.map +0 -1
  247. package/dist/SubscriberBuilder-B9uva8fZ.d.cts +0 -28
  248. package/dist/SubscriberBuilder-B9uva8fZ.d.cts.map +0 -1
  249. package/dist/SubscriberBuilder-DaQkh2Nt.d.mts +0 -28
  250. package/dist/SubscriberBuilder-DaQkh2Nt.d.mts.map +0 -1
  251. package/dist/SubscriberBuilder-DlUaG0Ej.mjs +0 -54
  252. package/dist/SubscriberBuilder-DlUaG0Ej.mjs.map +0 -1
  253. package/dist/TestEndpointAdaptor-Clz_L8Xj.d.cts +0 -45
  254. package/dist/TestEndpointAdaptor-Clz_L8Xj.d.cts.map +0 -1
  255. package/dist/TestEndpointAdaptor-DxXJoBBf.d.mts +0 -45
  256. package/dist/TestEndpointAdaptor-DxXJoBBf.d.mts.map +0 -1
  257. package/dist/TestEndpointAdaptor-G2T789bH.mjs +0 -174
  258. package/dist/TestEndpointAdaptor-G2T789bH.mjs.map +0 -1
  259. package/dist/TestEndpointAdaptor-YlwOEisx.cjs +0 -180
  260. package/dist/TestEndpointAdaptor-YlwOEisx.cjs.map +0 -1
  261. package/dist/TestFunctionAdaptor-BHk2bDOV.d.cts +0 -30
  262. package/dist/TestFunctionAdaptor-BHk2bDOV.d.cts.map +0 -1
  263. package/dist/TestFunctionAdaptor-C5CLuR-9.mjs +0 -75
  264. package/dist/TestFunctionAdaptor-C5CLuR-9.mjs.map +0 -1
  265. package/dist/TestFunctionAdaptor-CH6-gO_B.cjs +0 -81
  266. package/dist/TestFunctionAdaptor-CH6-gO_B.cjs.map +0 -1
  267. package/dist/TestFunctionAdaptor-DzT8GRdR.d.mts +0 -30
  268. package/dist/TestFunctionAdaptor-DzT8GRdR.d.mts.map +0 -1
  269. package/dist/TestSubscriberAdaptor-CPEiqSfE.d.mts +0 -26
  270. package/dist/TestSubscriberAdaptor-CPEiqSfE.d.mts.map +0 -1
  271. package/dist/TestSubscriberAdaptor-CwP3qNJ4.mjs +0 -51
  272. package/dist/TestSubscriberAdaptor-CwP3qNJ4.mjs.map +0 -1
  273. package/dist/TestSubscriberAdaptor-DQk5xzb0.d.cts +0 -26
  274. package/dist/TestSubscriberAdaptor-DQk5xzb0.d.cts.map +0 -1
  275. package/dist/TestSubscriberAdaptor-Dgxr_0vL.cjs +0 -57
  276. package/dist/TestSubscriberAdaptor-Dgxr_0vL.cjs.map +0 -1
  277. package/dist/chunk-CUT6urMc.cjs +0 -30
  278. package/dist/crons/Cron.cjs +0 -8
  279. package/dist/crons/Cron.d.cts +0 -7
  280. package/dist/crons/Cron.d.mts +0 -7
  281. package/dist/crons/Cron.mjs +0 -8
  282. package/dist/crons/CronBuilder.cjs +0 -9
  283. package/dist/crons/CronBuilder.d.cts +0 -8
  284. package/dist/crons/CronBuilder.d.mts +0 -8
  285. package/dist/crons/CronBuilder.mjs +0 -9
  286. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.cjs +0 -11
  287. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +0 -11
  288. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +0 -11
  289. package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.mjs +0 -11
  290. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.cjs +0 -13
  291. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.cts +0 -12
  292. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +0 -12
  293. package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.mjs +0 -13
  294. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.cjs +0 -13
  295. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.cts +0 -12
  296. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +0 -12
  297. package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.mjs +0 -13
  298. package/dist/endpoints/Authorizer.cjs +0 -6
  299. package/dist/endpoints/Authorizer.d.cts +0 -2
  300. package/dist/endpoints/Authorizer.d.mts +0 -2
  301. package/dist/endpoints/Authorizer.mjs +0 -3
  302. package/dist/endpoints/Endpoint.cjs +0 -10
  303. package/dist/endpoints/Endpoint.d.cts +0 -9
  304. package/dist/endpoints/Endpoint.d.mts +0 -9
  305. package/dist/endpoints/Endpoint.mjs +0 -8
  306. package/dist/endpoints/EndpointBuilder.cjs +0 -11
  307. package/dist/endpoints/EndpointBuilder.d.cts +0 -10
  308. package/dist/endpoints/EndpointBuilder.d.mts +0 -10
  309. package/dist/endpoints/EndpointBuilder.mjs +0 -11
  310. package/dist/endpoints/EndpointFactory.cjs +0 -13
  311. package/dist/endpoints/EndpointFactory.d.cts +0 -11
  312. package/dist/endpoints/EndpointFactory.d.mts +0 -11
  313. package/dist/endpoints/EndpointFactory.mjs +0 -12
  314. package/dist/endpoints/HonoEndpointAdaptor.cjs +0 -14
  315. package/dist/endpoints/HonoEndpointAdaptor.d.cts +0 -10
  316. package/dist/endpoints/HonoEndpointAdaptor.d.mts +0 -10
  317. package/dist/endpoints/HonoEndpointAdaptor.mjs +0 -14
  318. package/dist/endpoints/TestEndpointAdaptor.cjs +0 -12
  319. package/dist/endpoints/TestEndpointAdaptor.d.cts +0 -10
  320. package/dist/endpoints/TestEndpointAdaptor.d.mts +0 -10
  321. package/dist/endpoints/TestEndpointAdaptor.mjs +0 -12
  322. package/dist/endpoints/audit.cjs +0 -0
  323. package/dist/endpoints/audit.d.cts +0 -9
  324. package/dist/endpoints/audit.d.mts +0 -9
  325. package/dist/endpoints/audit.mjs +0 -0
  326. package/dist/endpoints/helpers.cjs +0 -10
  327. package/dist/endpoints/helpers.d.cts +0 -60
  328. package/dist/endpoints/helpers.d.cts.map +0 -1
  329. package/dist/endpoints/helpers.d.mts +0 -60
  330. package/dist/endpoints/helpers.d.mts.map +0 -1
  331. package/dist/endpoints/helpers.mjs +0 -9
  332. package/dist/endpoints/lazyAccessors.cjs +0 -10
  333. package/dist/endpoints/lazyAccessors.d.cts +0 -10
  334. package/dist/endpoints/lazyAccessors.d.mts +0 -10
  335. package/dist/endpoints/lazyAccessors.mjs +0 -3
  336. package/dist/endpoints/parseHonoQuery.cjs +0 -3
  337. package/dist/endpoints/parseHonoQuery.d.cts +0 -14
  338. package/dist/endpoints/parseHonoQuery.d.cts.map +0 -1
  339. package/dist/endpoints/parseHonoQuery.d.mts +0 -14
  340. package/dist/endpoints/parseHonoQuery.d.mts.map +0 -1
  341. package/dist/endpoints/parseHonoQuery.mjs +0 -3
  342. package/dist/endpoints/parseQueryParams.cjs +0 -3
  343. package/dist/endpoints/parseQueryParams.d.cts +0 -14
  344. package/dist/endpoints/parseQueryParams.d.cts.map +0 -1
  345. package/dist/endpoints/parseQueryParams.d.mts +0 -14
  346. package/dist/endpoints/parseQueryParams.d.mts.map +0 -1
  347. package/dist/endpoints/parseQueryParams.mjs +0 -3
  348. package/dist/endpoints/processAudits.cjs +0 -5
  349. package/dist/endpoints/processAudits.d.cts +0 -95
  350. package/dist/endpoints/processAudits.d.cts.map +0 -1
  351. package/dist/endpoints/processAudits.d.mts +0 -95
  352. package/dist/endpoints/processAudits.d.mts.map +0 -1
  353. package/dist/endpoints/processAudits.mjs +0 -3
  354. package/dist/endpoints/rls.cjs +0 -3
  355. package/dist/endpoints/rls.d.cts +0 -9
  356. package/dist/endpoints/rls.d.mts +0 -9
  357. package/dist/endpoints/rls.mjs +0 -3
  358. package/dist/functions/AWSLambdaFunction.cjs +0 -9
  359. package/dist/functions/AWSLambdaFunction.d.cts +0 -5
  360. package/dist/functions/AWSLambdaFunction.d.mts +0 -5
  361. package/dist/functions/AWSLambdaFunction.mjs +0 -9
  362. package/dist/functions/BaseFunctionBuilder.cjs +0 -4
  363. package/dist/functions/BaseFunctionBuilder.d.cts +0 -3
  364. package/dist/functions/BaseFunctionBuilder.d.mts +0 -3
  365. package/dist/functions/BaseFunctionBuilder.mjs +0 -4
  366. package/dist/functions/Function.cjs +0 -5
  367. package/dist/functions/Function.d.cts +0 -3
  368. package/dist/functions/Function.d.mts +0 -3
  369. package/dist/functions/Function.mjs +0 -4
  370. package/dist/functions/FunctionBuilder.cjs +0 -6
  371. package/dist/functions/FunctionBuilder.d.cts +0 -5
  372. package/dist/functions/FunctionBuilder.d.mts +0 -5
  373. package/dist/functions/FunctionBuilder.mjs +0 -6
  374. package/dist/functions/FunctionExecutionWrapper.cjs +0 -8
  375. package/dist/functions/FunctionExecutionWrapper.d.cts +0 -4
  376. package/dist/functions/FunctionExecutionWrapper.d.mts +0 -4
  377. package/dist/functions/FunctionExecutionWrapper.mjs +0 -8
  378. package/dist/functions/TestFunctionAdaptor.cjs +0 -8
  379. package/dist/functions/TestFunctionAdaptor.d.cts +0 -4
  380. package/dist/functions/TestFunctionAdaptor.d.mts +0 -4
  381. package/dist/functions/TestFunctionAdaptor.mjs +0 -8
  382. package/dist/functions-B1mrMoUH.mjs +0 -8
  383. package/dist/functions-B1mrMoUH.mjs.map +0 -1
  384. package/dist/functions-rOD3pXQd.cjs +0 -13
  385. package/dist/functions-rOD3pXQd.cjs.map +0 -1
  386. package/dist/helpers-BYyX0qTA.cjs +0 -95
  387. package/dist/helpers-BYyX0qTA.cjs.map +0 -1
  388. package/dist/helpers-BtwC2IW8.mjs +0 -83
  389. package/dist/helpers-BtwC2IW8.mjs.map +0 -1
  390. package/dist/index-BfeupgMl.d.cts +0 -12
  391. package/dist/index-BfeupgMl.d.cts.map +0 -1
  392. package/dist/index-DQo_Csy7.d.mts +0 -12
  393. package/dist/index-DQo_Csy7.d.mts.map +0 -1
  394. package/dist/lazyAccessors-BVEtB9lU.cjs +0 -223
  395. package/dist/lazyAccessors-BVEtB9lU.cjs.map +0 -1
  396. package/dist/lazyAccessors-Bled3FVc.d.mts +0 -49
  397. package/dist/lazyAccessors-Bled3FVc.d.mts.map +0 -1
  398. package/dist/lazyAccessors-C8AF1hNi.d.cts +0 -49
  399. package/dist/lazyAccessors-C8AF1hNi.d.cts.map +0 -1
  400. package/dist/lazyAccessors-DM6HcXQk.mjs +0 -175
  401. package/dist/lazyAccessors-DM6HcXQk.mjs.map +0 -1
  402. package/dist/parseHonoQuery-BBs8CX-H.cjs +0 -24
  403. package/dist/parseHonoQuery-BBs8CX-H.cjs.map +0 -1
  404. package/dist/parseHonoQuery-Cp8CII0P.mjs +0 -18
  405. package/dist/parseHonoQuery-Cp8CII0P.mjs.map +0 -1
  406. package/dist/parseQueryParams-B4RK1za3.cjs +0 -31
  407. package/dist/parseQueryParams-B4RK1za3.cjs.map +0 -1
  408. package/dist/parseQueryParams-DS3Qmrbd.mjs +0 -25
  409. package/dist/parseQueryParams-DS3Qmrbd.mjs.map +0 -1
  410. package/dist/processAudits-CzHkPokQ.cjs +0 -180
  411. package/dist/processAudits-CzHkPokQ.cjs.map +0 -1
  412. package/dist/processAudits-Dj8UGqcW.mjs +0 -162
  413. package/dist/processAudits-Dj8UGqcW.mjs.map +0 -1
  414. package/dist/publisher-BrzPGnm4.d.cts +0 -16
  415. package/dist/publisher-BrzPGnm4.d.cts.map +0 -1
  416. package/dist/publisher-Bw4770Hi.mjs +0 -41
  417. package/dist/publisher-Bw4770Hi.mjs.map +0 -1
  418. package/dist/publisher-CP4gpv-4.d.mts +0 -16
  419. package/dist/publisher-CP4gpv-4.d.mts.map +0 -1
  420. package/dist/publisher-lFQleddL.cjs +0 -53
  421. package/dist/publisher-lFQleddL.cjs.map +0 -1
  422. package/dist/publisher.cjs +0 -4
  423. package/dist/publisher.d.cts +0 -3
  424. package/dist/publisher.d.mts +0 -3
  425. package/dist/publisher.mjs +0 -3
  426. package/dist/rls-7XXX7DvY.mjs +0 -9
  427. package/dist/rls-7XXX7DvY.mjs.map +0 -1
  428. package/dist/rls-DxFqdIA0.cjs +0 -15
  429. package/dist/rls-DxFqdIA0.cjs.map +0 -1
  430. package/dist/subscribers/AWSLambdaSubscriberAdaptor.cjs +0 -3
  431. package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.cts +0 -4
  432. package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.mts +0 -4
  433. package/dist/subscribers/AWSLambdaSubscriberAdaptor.mjs +0 -3
  434. package/dist/subscribers/Subscriber.cjs +0 -4
  435. package/dist/subscribers/Subscriber.d.cts +0 -3
  436. package/dist/subscribers/Subscriber.d.mts +0 -3
  437. package/dist/subscribers/Subscriber.mjs +0 -4
  438. package/dist/subscribers/SubscriberBuilder.cjs +0 -5
  439. package/dist/subscribers/SubscriberBuilder.d.cts +0 -4
  440. package/dist/subscribers/SubscriberBuilder.d.mts +0 -4
  441. package/dist/subscribers/SubscriberBuilder.mjs +0 -5
  442. package/dist/subscribers/TestSubscriberAdaptor.cjs +0 -4
  443. package/dist/subscribers/TestSubscriberAdaptor.d.cts +0 -4
  444. package/dist/subscribers/TestSubscriberAdaptor.d.mts +0 -4
  445. package/dist/subscribers/TestSubscriberAdaptor.mjs +0 -4
  446. package/dist/telemetry.cjs +0 -0
  447. package/dist/telemetry.d.cts +0 -2
  448. package/dist/telemetry.d.mts +0 -2
  449. package/dist/telemetry.mjs +0 -0
@@ -1,4 +0,0 @@
1
- import "../Construct-CX7HyFfT.cjs";
2
- import "../Function-CwlB89lS.cjs";
3
- import { TestFunctionAdaptor, TestFunctionRequest } from "../TestFunctionAdaptor-BHk2bDOV.cjs";
4
- export { TestFunctionAdaptor, TestFunctionRequest };
@@ -1,4 +0,0 @@
1
- import "../Construct-C2SyofdS.mjs";
2
- import "../Function-CZw1DRQ6.mjs";
3
- import { TestFunctionAdaptor, TestFunctionRequest } from "../TestFunctionAdaptor-DzT8GRdR.mjs";
4
- export { TestFunctionAdaptor, TestFunctionRequest };
@@ -1,8 +0,0 @@
1
- import "../Construct-CQ9zV58W.mjs";
2
- import "../publisher-Bw4770Hi.mjs";
3
- import "../BaseFunctionBuilder-C3rQMoWb.mjs";
4
- import "../Function-xfQbftdE.mjs";
5
- import "../FunctionBuilder-CBeqX18X.mjs";
6
- import { TestFunctionAdaptor } from "../TestFunctionAdaptor-C5CLuR-9.mjs";
7
-
8
- export { TestFunctionAdaptor };
@@ -1,8 +0,0 @@
1
- import { FunctionBuilder } from "./FunctionBuilder-CBeqX18X.mjs";
2
-
3
- //#region src/functions/index.ts
4
- const f = new FunctionBuilder();
5
-
6
- //#endregion
7
- export { f };
8
- //# sourceMappingURL=functions-B1mrMoUH.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions-B1mrMoUH.mjs","names":[],"sources":["../src/functions/index.ts"],"sourcesContent":["export { BaseFunctionBuilder } from './BaseFunctionBuilder';\nexport {\n\tFunction,\n\ttype FunctionContext,\n\ttype FunctionHandler,\n} from './Function';\n\nimport { FunctionBuilder } from './FunctionBuilder';\n\nexport { FunctionBuilder } from './FunctionBuilder';\n\nexport const f = new FunctionBuilder();\n"],"mappings":";;;AAWA,MAAa,IAAI,IAAI"}
@@ -1,13 +0,0 @@
1
- const require_FunctionBuilder = require('./FunctionBuilder-C_xG9As7.cjs');
2
-
3
- //#region src/functions/index.ts
4
- const f = new require_FunctionBuilder.FunctionBuilder();
5
-
6
- //#endregion
7
- Object.defineProperty(exports, 'f', {
8
- enumerable: true,
9
- get: function () {
10
- return f;
11
- }
12
- });
13
- //# sourceMappingURL=functions-rOD3pXQd.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions-rOD3pXQd.cjs","names":["FunctionBuilder"],"sources":["../src/functions/index.ts"],"sourcesContent":["export { BaseFunctionBuilder } from './BaseFunctionBuilder';\nexport {\n\tFunction,\n\ttype FunctionContext,\n\ttype FunctionHandler,\n} from './Function';\n\nimport { FunctionBuilder } from './FunctionBuilder';\n\nexport { FunctionBuilder } from './FunctionBuilder';\n\nexport const f = new FunctionBuilder();\n"],"mappings":";;;AAWA,MAAa,IAAI,IAAIA"}
@@ -1,95 +0,0 @@
1
- const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const require_Endpoint = require('./Endpoint-BcxvF4F3.cjs');
3
- const node_path = require_chunk.__toESM(require("node:path"));
4
- const fast_glob = require_chunk.__toESM(require("fast-glob"));
5
-
6
- //#region src/endpoints/helpers.ts
7
- /**
8
- * Recursively finds the project root directory by looking for lock files.
9
- * Traverses up the directory tree until it finds a package manager lock file.
10
- *
11
- * @param cwd - The current working directory to start searching from
12
- * @returns Promise resolving to the absolute path of the project root
13
- *
14
- * @example
15
- * ```typescript
16
- * const projectRoot = await getProjectRoot(process.cwd());
17
- * console.log(`Project root: ${projectRoot}`);
18
- * // Output: Project root: /Users/user/my-project
19
- * ```
20
- */
21
- async function getProjectRoot(cwd) {
22
- if (cwd === "/") return cwd;
23
- const stream = fast_glob.default.stream([
24
- "yarn.lock",
25
- "pnpm-lock.yaml",
26
- "package-lock.json",
27
- "deno.lock"
28
- ], {
29
- dot: true,
30
- cwd
31
- });
32
- let isRoot = false;
33
- for await (const _ of stream) {
34
- isRoot = true;
35
- break;
36
- }
37
- if (isRoot) return cwd;
38
- return getProjectRoot(node_path.default.resolve(cwd, ".."));
39
- }
40
- /**
41
- * Discovers and imports all Endpoint instances from the specified route patterns.
42
- * Uses fast-glob to find files matching the patterns and extracts exported Endpoints.
43
- *
44
- * @template TServices - Array of service types used by the endpoints
45
- * @param routes - Array of glob patterns to match route files (e.g., ['src/routes/*.ts'])
46
- * @param cwd - The current working directory to resolve paths from
47
- * @returns Promise resolving to an array of Endpoint instances found in the matched files
48
- *
49
- * @example
50
- * ```typescript
51
- * // Find all endpoints in the routes directory
52
- * const endpoints = await getEndpointsFromRoutes(
53
- * ['src/routes/**\/*.ts'],
54
- * process.cwd()
55
- * );
56
- *
57
- * // Register endpoints with your server
58
- * for (const endpoint of endpoints) {
59
- * server.register(endpoint);
60
- * }
61
- * ```
62
- *
63
- * @remarks
64
- * - Only exports that are valid Endpoint instances are included
65
- * - Files are imported dynamically, so they must be valid ES modules
66
- * - The function filters out non-Endpoint exports automatically
67
- */
68
- async function getEndpointsFromRoutes(routes, cwd) {
69
- const stream = fast_glob.default.stream(routes, { cwd });
70
- const endpoints = [];
71
- for await (const f of stream) {
72
- const routePath = node_path.default.resolve(cwd, f.toString());
73
- const route = await import(routePath);
74
- const handlers = Object.values(route).filter((value) => {
75
- return require_Endpoint.Endpoint.isEndpoint(value);
76
- });
77
- endpoints.push(...handlers);
78
- }
79
- return endpoints;
80
- }
81
-
82
- //#endregion
83
- Object.defineProperty(exports, 'getEndpointsFromRoutes', {
84
- enumerable: true,
85
- get: function () {
86
- return getEndpointsFromRoutes;
87
- }
88
- });
89
- Object.defineProperty(exports, 'getProjectRoot', {
90
- enumerable: true,
91
- get: function () {
92
- return getProjectRoot;
93
- }
94
- });
95
- //# sourceMappingURL=helpers-BYyX0qTA.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers-BYyX0qTA.cjs","names":["cwd: string","routes: string[]","endpoints: Endpoint<string, HttpMethod, any, any, TServices>[]"],"sources":["../src/endpoints/helpers.ts"],"sourcesContent":["import path from 'node:path';\nimport type { Service } from '@geekmidas/services';\nimport fg from 'fast-glob';\nimport type { HttpMethod } from '../types';\nimport { Endpoint } from './Endpoint';\n\n// Re-export utility functions\n\n/**\n * Recursively finds the project root directory by looking for lock files.\n * Traverses up the directory tree until it finds a package manager lock file.\n *\n * @param cwd - The current working directory to start searching from\n * @returns Promise resolving to the absolute path of the project root\n *\n * @example\n * ```typescript\n * const projectRoot = await getProjectRoot(process.cwd());\n * console.log(`Project root: ${projectRoot}`);\n * // Output: Project root: /Users/user/my-project\n * ```\n */\nexport async function getProjectRoot(cwd: string): Promise<string> {\n\tif (cwd === '/') {\n\t\treturn cwd;\n\t}\n\n\tconst stream = fg.stream(\n\t\t['yarn.lock', 'pnpm-lock.yaml', 'package-lock.json', 'deno.lock'],\n\t\t{ dot: true, cwd },\n\t);\n\n\tlet isRoot = false;\n\n\tfor await (const _ of stream) {\n\t\tisRoot = true;\n\t\tbreak;\n\t}\n\n\tif (isRoot) {\n\t\treturn cwd;\n\t}\n\n\treturn getProjectRoot(path.resolve(cwd, '..'));\n}\n\n/**\n * Discovers and imports all Endpoint instances from the specified route patterns.\n * Uses fast-glob to find files matching the patterns and extracts exported Endpoints.\n *\n * @template TServices - Array of service types used by the endpoints\n * @param routes - Array of glob patterns to match route files (e.g., ['src/routes/*.ts'])\n * @param cwd - The current working directory to resolve paths from\n * @returns Promise resolving to an array of Endpoint instances found in the matched files\n *\n * @example\n * ```typescript\n * // Find all endpoints in the routes directory\n * const endpoints = await getEndpointsFromRoutes(\n * ['src/routes/**\\/*.ts'],\n * process.cwd()\n * );\n *\n * // Register endpoints with your server\n * for (const endpoint of endpoints) {\n * server.register(endpoint);\n * }\n * ```\n *\n * @remarks\n * - Only exports that are valid Endpoint instances are included\n * - Files are imported dynamically, so they must be valid ES modules\n * - The function filters out non-Endpoint exports automatically\n */\nexport async function getEndpointsFromRoutes<TServices extends Service[]>(\n\troutes: string[],\n\tcwd: string,\n): Promise<Endpoint<string, HttpMethod, any, any, TServices>[]> {\n\tconst stream = fg.stream(routes, { cwd });\n\n\tconst endpoints: Endpoint<string, HttpMethod, any, any, TServices>[] = [];\n\n\tfor await (const f of stream) {\n\t\t// Resolve the absolute path for the route file\n\t\tconst routePath = path.resolve(cwd, f.toString());\n\t\t// Dynamically import the route module\n\t\tconst route = await import(routePath);\n\n\t\t// Filter exported values to find only Endpoint instances\n\t\tconst handlers = Object.values(route).filter((value) => {\n\t\t\treturn Endpoint.isEndpoint(value);\n\t\t}) as unknown as Endpoint<string, HttpMethod, any, any, TServices>[];\n\n\t\tendpoints.push(...handlers);\n\t}\n\n\treturn endpoints;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsBA,eAAsB,eAAeA,KAA8B;AAClE,KAAI,QAAQ,IACX,QAAO;CAGR,MAAM,SAAS,kBAAG,OACjB;EAAC;EAAa;EAAkB;EAAqB;CAAY,GACjE;EAAE,KAAK;EAAM;CAAK,EAClB;CAED,IAAI,SAAS;AAEb,YAAW,MAAM,KAAK,QAAQ;AAC7B,WAAS;AACT;CACA;AAED,KAAI,OACH,QAAO;AAGR,QAAO,eAAe,kBAAK,QAAQ,KAAK,KAAK,CAAC;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BD,eAAsB,uBACrBC,QACAD,KAC+D;CAC/D,MAAM,SAAS,kBAAG,OAAO,QAAQ,EAAE,IAAK,EAAC;CAEzC,MAAME,YAAiE,CAAE;AAEzE,YAAW,MAAM,KAAK,QAAQ;EAE7B,MAAM,YAAY,kBAAK,QAAQ,KAAK,EAAE,UAAU,CAAC;EAEjD,MAAM,QAAQ,MAAM,OAAO;EAG3B,MAAM,WAAW,OAAO,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU;AACvD,UAAO,0BAAS,WAAW,MAAM;EACjC,EAAC;AAEF,YAAU,KAAK,GAAG,SAAS;CAC3B;AAED,QAAO;AACP"}
@@ -1,83 +0,0 @@
1
- import { Endpoint } from "./Endpoint-DvY3aqAy.mjs";
2
- import path from "node:path";
3
- import fg from "fast-glob";
4
-
5
- //#region src/endpoints/helpers.ts
6
- /**
7
- * Recursively finds the project root directory by looking for lock files.
8
- * Traverses up the directory tree until it finds a package manager lock file.
9
- *
10
- * @param cwd - The current working directory to start searching from
11
- * @returns Promise resolving to the absolute path of the project root
12
- *
13
- * @example
14
- * ```typescript
15
- * const projectRoot = await getProjectRoot(process.cwd());
16
- * console.log(`Project root: ${projectRoot}`);
17
- * // Output: Project root: /Users/user/my-project
18
- * ```
19
- */
20
- async function getProjectRoot(cwd) {
21
- if (cwd === "/") return cwd;
22
- const stream = fg.stream([
23
- "yarn.lock",
24
- "pnpm-lock.yaml",
25
- "package-lock.json",
26
- "deno.lock"
27
- ], {
28
- dot: true,
29
- cwd
30
- });
31
- let isRoot = false;
32
- for await (const _ of stream) {
33
- isRoot = true;
34
- break;
35
- }
36
- if (isRoot) return cwd;
37
- return getProjectRoot(path.resolve(cwd, ".."));
38
- }
39
- /**
40
- * Discovers and imports all Endpoint instances from the specified route patterns.
41
- * Uses fast-glob to find files matching the patterns and extracts exported Endpoints.
42
- *
43
- * @template TServices - Array of service types used by the endpoints
44
- * @param routes - Array of glob patterns to match route files (e.g., ['src/routes/*.ts'])
45
- * @param cwd - The current working directory to resolve paths from
46
- * @returns Promise resolving to an array of Endpoint instances found in the matched files
47
- *
48
- * @example
49
- * ```typescript
50
- * // Find all endpoints in the routes directory
51
- * const endpoints = await getEndpointsFromRoutes(
52
- * ['src/routes/**\/*.ts'],
53
- * process.cwd()
54
- * );
55
- *
56
- * // Register endpoints with your server
57
- * for (const endpoint of endpoints) {
58
- * server.register(endpoint);
59
- * }
60
- * ```
61
- *
62
- * @remarks
63
- * - Only exports that are valid Endpoint instances are included
64
- * - Files are imported dynamically, so they must be valid ES modules
65
- * - The function filters out non-Endpoint exports automatically
66
- */
67
- async function getEndpointsFromRoutes(routes, cwd) {
68
- const stream = fg.stream(routes, { cwd });
69
- const endpoints = [];
70
- for await (const f of stream) {
71
- const routePath = path.resolve(cwd, f.toString());
72
- const route = await import(routePath);
73
- const handlers = Object.values(route).filter((value) => {
74
- return Endpoint.isEndpoint(value);
75
- });
76
- endpoints.push(...handlers);
77
- }
78
- return endpoints;
79
- }
80
-
81
- //#endregion
82
- export { getEndpointsFromRoutes, getProjectRoot };
83
- //# sourceMappingURL=helpers-BtwC2IW8.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers-BtwC2IW8.mjs","names":["cwd: string","routes: string[]","endpoints: Endpoint<string, HttpMethod, any, any, TServices>[]"],"sources":["../src/endpoints/helpers.ts"],"sourcesContent":["import path from 'node:path';\nimport type { Service } from '@geekmidas/services';\nimport fg from 'fast-glob';\nimport type { HttpMethod } from '../types';\nimport { Endpoint } from './Endpoint';\n\n// Re-export utility functions\n\n/**\n * Recursively finds the project root directory by looking for lock files.\n * Traverses up the directory tree until it finds a package manager lock file.\n *\n * @param cwd - The current working directory to start searching from\n * @returns Promise resolving to the absolute path of the project root\n *\n * @example\n * ```typescript\n * const projectRoot = await getProjectRoot(process.cwd());\n * console.log(`Project root: ${projectRoot}`);\n * // Output: Project root: /Users/user/my-project\n * ```\n */\nexport async function getProjectRoot(cwd: string): Promise<string> {\n\tif (cwd === '/') {\n\t\treturn cwd;\n\t}\n\n\tconst stream = fg.stream(\n\t\t['yarn.lock', 'pnpm-lock.yaml', 'package-lock.json', 'deno.lock'],\n\t\t{ dot: true, cwd },\n\t);\n\n\tlet isRoot = false;\n\n\tfor await (const _ of stream) {\n\t\tisRoot = true;\n\t\tbreak;\n\t}\n\n\tif (isRoot) {\n\t\treturn cwd;\n\t}\n\n\treturn getProjectRoot(path.resolve(cwd, '..'));\n}\n\n/**\n * Discovers and imports all Endpoint instances from the specified route patterns.\n * Uses fast-glob to find files matching the patterns and extracts exported Endpoints.\n *\n * @template TServices - Array of service types used by the endpoints\n * @param routes - Array of glob patterns to match route files (e.g., ['src/routes/*.ts'])\n * @param cwd - The current working directory to resolve paths from\n * @returns Promise resolving to an array of Endpoint instances found in the matched files\n *\n * @example\n * ```typescript\n * // Find all endpoints in the routes directory\n * const endpoints = await getEndpointsFromRoutes(\n * ['src/routes/**\\/*.ts'],\n * process.cwd()\n * );\n *\n * // Register endpoints with your server\n * for (const endpoint of endpoints) {\n * server.register(endpoint);\n * }\n * ```\n *\n * @remarks\n * - Only exports that are valid Endpoint instances are included\n * - Files are imported dynamically, so they must be valid ES modules\n * - The function filters out non-Endpoint exports automatically\n */\nexport async function getEndpointsFromRoutes<TServices extends Service[]>(\n\troutes: string[],\n\tcwd: string,\n): Promise<Endpoint<string, HttpMethod, any, any, TServices>[]> {\n\tconst stream = fg.stream(routes, { cwd });\n\n\tconst endpoints: Endpoint<string, HttpMethod, any, any, TServices>[] = [];\n\n\tfor await (const f of stream) {\n\t\t// Resolve the absolute path for the route file\n\t\tconst routePath = path.resolve(cwd, f.toString());\n\t\t// Dynamically import the route module\n\t\tconst route = await import(routePath);\n\n\t\t// Filter exported values to find only Endpoint instances\n\t\tconst handlers = Object.values(route).filter((value) => {\n\t\t\treturn Endpoint.isEndpoint(value);\n\t\t}) as unknown as Endpoint<string, HttpMethod, any, any, TServices>[];\n\n\t\tendpoints.push(...handlers);\n\t}\n\n\treturn endpoints;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,eAAsB,eAAeA,KAA8B;AAClE,KAAI,QAAQ,IACX,QAAO;CAGR,MAAM,SAAS,GAAG,OACjB;EAAC;EAAa;EAAkB;EAAqB;CAAY,GACjE;EAAE,KAAK;EAAM;CAAK,EAClB;CAED,IAAI,SAAS;AAEb,YAAW,MAAM,KAAK,QAAQ;AAC7B,WAAS;AACT;CACA;AAED,KAAI,OACH,QAAO;AAGR,QAAO,eAAe,KAAK,QAAQ,KAAK,KAAK,CAAC;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BD,eAAsB,uBACrBC,QACAD,KAC+D;CAC/D,MAAM,SAAS,GAAG,OAAO,QAAQ,EAAE,IAAK,EAAC;CAEzC,MAAME,YAAiE,CAAE;AAEzE,YAAW,MAAM,KAAK,QAAQ;EAE7B,MAAM,YAAY,KAAK,QAAQ,KAAK,EAAE,UAAU,CAAC;EAEjD,MAAM,QAAQ,MAAM,OAAO;EAG3B,MAAM,WAAW,OAAO,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU;AACvD,UAAO,SAAS,WAAW,MAAM;EACjC,EAAC;AAEF,YAAU,KAAK,GAAG,SAAS;CAC3B;AAED,QAAO;AACP"}
@@ -1,12 +0,0 @@
1
- import { FunctionBuilder } from "./FunctionBuilder-D_7f5MfS.cjs";
2
- import * as _geekmidas_audit5 from "@geekmidas/audit";
3
- import * as _geekmidas_logger4 from "@geekmidas/logger";
4
- import * as _geekmidas_schema3 from "@geekmidas/schema";
5
-
6
- //#region src/functions/index.d.ts
7
- declare const f: FunctionBuilder<_geekmidas_schema3.ComposableStandardSchema, undefined, [], _geekmidas_logger4.Logger, undefined, string, undefined, string, undefined, string, _geekmidas_audit5.AuditableAction<string, unknown>>;
8
- //# sourceMappingURL=index.d.ts.map
9
-
10
- //#endregion
11
- export { f };
12
- //# sourceMappingURL=index-BfeupgMl.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-BfeupgMl.d.cts","names":[],"sources":["../src/functions/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAWa,GAAC,gBAAwB,kBAAA,CAAxB,wBAAA,iBAAA,kBAAA,CAAA,MAAA,2DAAA,iBAAA,CAAA"}
@@ -1,12 +0,0 @@
1
- import { FunctionBuilder } from "./FunctionBuilder-m5BNA2Ap.mjs";
2
- import * as _geekmidas_audit5 from "@geekmidas/audit";
3
- import * as _geekmidas_logger4 from "@geekmidas/logger";
4
- import * as _geekmidas_schema3 from "@geekmidas/schema";
5
-
6
- //#region src/functions/index.d.ts
7
- declare const f: FunctionBuilder<_geekmidas_schema3.ComposableStandardSchema, undefined, [], _geekmidas_logger4.Logger, undefined, string, undefined, string, undefined, string, _geekmidas_audit5.AuditableAction<string, unknown>>;
8
- //# sourceMappingURL=index.d.ts.map
9
-
10
- //#endregion
11
- export { f };
12
- //# sourceMappingURL=index-DQo_Csy7.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DQo_Csy7.d.mts","names":[],"sources":["../src/functions/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAWa,GAAC,gBAAwB,kBAAA,CAAxB,wBAAA,iBAAA,kBAAA,CAAA,MAAA,2DAAA,iBAAA,CAAA"}
@@ -1,223 +0,0 @@
1
- const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const hono_cookie = require_chunk.__toESM(require("hono/cookie"));
3
-
4
- //#region src/endpoints/lazyAccessors.ts
5
- /**
6
- * Create a lazy header accessor for Hono.
7
- * Uses `c.req.header(name)` for single lookups (native, case-insensitive).
8
- * Only calls `c.req.header()` to get all headers when needed.
9
- */
10
- function createHonoHeaders(c) {
11
- let allHeaders = null;
12
- return (key) => {
13
- if (key !== void 0) return c.req.header(key);
14
- if (!allHeaders) allHeaders = c.req.header();
15
- return allHeaders;
16
- };
17
- }
18
- /**
19
- * Create a lazy cookie accessor for Hono.
20
- * Uses `getCookie(c, name)` for single lookups (native).
21
- * Only parses the cookie header when all cookies are requested.
22
- */
23
- function createHonoCookies(c) {
24
- let allCookies = null;
25
- return (name) => {
26
- if (name !== void 0) return (0, hono_cookie.getCookie)(c, name);
27
- if (!allCookies) {
28
- allCookies = {};
29
- const cookieHeader = c.req.header("cookie");
30
- if (cookieHeader) for (const part of cookieHeader.split(";")) {
31
- const trimmed = part.trim();
32
- const eqIndex = trimmed.indexOf("=");
33
- if (eqIndex > 0) {
34
- const key = trimmed.slice(0, eqIndex);
35
- const value = trimmed.slice(eqIndex + 1);
36
- allCookies[key] = value;
37
- }
38
- }
39
- }
40
- return allCookies;
41
- };
42
- }
43
- /**
44
- * Create a lazy header accessor for API Gateway events.
45
- * Handles case-insensitive lookups.
46
- */
47
- function createApiGatewayHeaders(headers) {
48
- let normalizedHeaders = null;
49
- const normalize = () => {
50
- if (!normalizedHeaders) {
51
- normalizedHeaders = {};
52
- if (headers) {
53
- for (const [k, v] of Object.entries(headers)) if (v !== void 0) normalizedHeaders[k.toLowerCase()] = v;
54
- }
55
- }
56
- return normalizedHeaders;
57
- };
58
- return (key) => {
59
- if (key !== void 0) {
60
- if (headers) {
61
- const direct = headers[key] ?? headers[key.toLowerCase()];
62
- if (direct !== void 0) return direct;
63
- return normalize()[key.toLowerCase()];
64
- }
65
- return void 0;
66
- }
67
- return normalize();
68
- };
69
- }
70
- /**
71
- * Create a lazy cookie accessor for API Gateway events.
72
- * Decodes URL-encoded values to match browser behavior.
73
- */
74
- function createApiGatewayCookies(cookies, cookieHeader) {
75
- let parsed = null;
76
- const parse = () => {
77
- if (!parsed) {
78
- parsed = {};
79
- if (cookies) for (const cookie of cookies) {
80
- const eqIndex = cookie.indexOf("=");
81
- if (eqIndex > 0) {
82
- const key = cookie.slice(0, eqIndex);
83
- const value = cookie.slice(eqIndex + 1);
84
- parsed[key] = decodeURIComponent(value);
85
- }
86
- }
87
- else if (cookieHeader) for (const part of cookieHeader.split(";")) {
88
- const trimmed = part.trim();
89
- const eqIndex = trimmed.indexOf("=");
90
- if (eqIndex > 0) {
91
- const key = trimmed.slice(0, eqIndex);
92
- const value = trimmed.slice(eqIndex + 1);
93
- parsed[key] = decodeURIComponent(value);
94
- }
95
- }
96
- }
97
- return parsed;
98
- };
99
- return (name) => {
100
- if (name !== void 0) return parse()[name];
101
- return parse();
102
- };
103
- }
104
- /**
105
- * Create a lazy header accessor for plain object headers (test adaptor, etc).
106
- * Headers are already available as an object, just provide lazy access.
107
- */
108
- function createObjectHeaders(headers) {
109
- let normalized = null;
110
- return (key) => {
111
- if (key !== void 0) {
112
- if (headers) {
113
- const direct = headers[key] ?? headers[key.toLowerCase()];
114
- if (direct !== void 0) return direct;
115
- }
116
- if (!normalized && headers) {
117
- normalized = {};
118
- for (const [k, v] of Object.entries(headers)) normalized[k.toLowerCase()] = v;
119
- }
120
- return normalized?.[key.toLowerCase()];
121
- }
122
- if (!normalized && headers) {
123
- normalized = {};
124
- for (const [k, v] of Object.entries(headers)) normalized[k.toLowerCase()] = v;
125
- }
126
- return normalized ?? {};
127
- };
128
- }
129
- /**
130
- * Create a lazy cookie accessor from a cookie header string.
131
- * Decodes URL-encoded values to match browser behavior.
132
- */
133
- function createCookieHeaderAccessor(cookieHeader) {
134
- let parsed = null;
135
- const parse = () => {
136
- if (!parsed) {
137
- parsed = {};
138
- if (cookieHeader) for (const part of cookieHeader.split(";")) {
139
- const trimmed = part.trim();
140
- const eqIndex = trimmed.indexOf("=");
141
- if (eqIndex > 0) {
142
- const key = trimmed.slice(0, eqIndex);
143
- const value = trimmed.slice(eqIndex + 1);
144
- parsed[key] = decodeURIComponent(value);
145
- }
146
- }
147
- }
148
- return parsed;
149
- };
150
- return (name) => {
151
- if (name !== void 0) return parse()[name];
152
- return parse();
153
- };
154
- }
155
- /**
156
- * Create a no-op header accessor (for minimal endpoints that don't use headers).
157
- */
158
- function createNoopHeaders() {
159
- return (key) => {
160
- if (key !== void 0) return void 0;
161
- return {};
162
- };
163
- }
164
- /**
165
- * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).
166
- */
167
- function createNoopCookies() {
168
- return (name) => {
169
- if (name !== void 0) return void 0;
170
- return {};
171
- };
172
- }
173
-
174
- //#endregion
175
- Object.defineProperty(exports, 'createApiGatewayCookies', {
176
- enumerable: true,
177
- get: function () {
178
- return createApiGatewayCookies;
179
- }
180
- });
181
- Object.defineProperty(exports, 'createApiGatewayHeaders', {
182
- enumerable: true,
183
- get: function () {
184
- return createApiGatewayHeaders;
185
- }
186
- });
187
- Object.defineProperty(exports, 'createCookieHeaderAccessor', {
188
- enumerable: true,
189
- get: function () {
190
- return createCookieHeaderAccessor;
191
- }
192
- });
193
- Object.defineProperty(exports, 'createHonoCookies', {
194
- enumerable: true,
195
- get: function () {
196
- return createHonoCookies;
197
- }
198
- });
199
- Object.defineProperty(exports, 'createHonoHeaders', {
200
- enumerable: true,
201
- get: function () {
202
- return createHonoHeaders;
203
- }
204
- });
205
- Object.defineProperty(exports, 'createNoopCookies', {
206
- enumerable: true,
207
- get: function () {
208
- return createNoopCookies;
209
- }
210
- });
211
- Object.defineProperty(exports, 'createNoopHeaders', {
212
- enumerable: true,
213
- get: function () {
214
- return createNoopHeaders;
215
- }
216
- });
217
- Object.defineProperty(exports, 'createObjectHeaders', {
218
- enumerable: true,
219
- get: function () {
220
- return createObjectHeaders;
221
- }
222
- });
223
- //# sourceMappingURL=lazyAccessors-BVEtB9lU.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazyAccessors-BVEtB9lU.cjs","names":["c: Context","allHeaders: Record<string, string> | null","key?: string","allCookies: Record<string, string> | null","name?: string","headers: Record<string, string | undefined> | null | undefined","normalizedHeaders: Record<string, string> | null","cookies: string[] | undefined","cookieHeader: string | undefined","parsed: Record<string, string> | null","headers: Record<string, string> | undefined","normalized: Record<string, string> | null"],"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":"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"}
@@ -1,49 +0,0 @@
1
- import { CookieFn, HeaderFn } from "./Endpoint-DtFQFL63.mjs";
2
- import { Context } from "hono";
3
-
4
- //#region src/endpoints/lazyAccessors.d.ts
5
-
6
- /**
7
- * Create a lazy header accessor for Hono.
8
- * Uses `c.req.header(name)` for single lookups (native, case-insensitive).
9
- * Only calls `c.req.header()` to get all headers when needed.
10
- */
11
- declare function createHonoHeaders(c: Context): HeaderFn;
12
- /**
13
- * Create a lazy cookie accessor for Hono.
14
- * Uses `getCookie(c, name)` for single lookups (native).
15
- * Only parses the cookie header when all cookies are requested.
16
- */
17
- declare function createHonoCookies(c: Context): CookieFn;
18
- /**
19
- * Create a lazy header accessor for API Gateway events.
20
- * Handles case-insensitive lookups.
21
- */
22
- declare function createApiGatewayHeaders(headers: Record<string, string | undefined> | null | undefined): HeaderFn;
23
- /**
24
- * Create a lazy cookie accessor for API Gateway events.
25
- * Decodes URL-encoded values to match browser behavior.
26
- */
27
- declare function createApiGatewayCookies(cookies: string[] | undefined, cookieHeader: string | undefined): CookieFn;
28
- /**
29
- * Create a lazy header accessor for plain object headers (test adaptor, etc).
30
- * Headers are already available as an object, just provide lazy access.
31
- */
32
- declare function createObjectHeaders(headers: Record<string, string> | undefined): HeaderFn;
33
- /**
34
- * Create a lazy cookie accessor from a cookie header string.
35
- * Decodes URL-encoded values to match browser behavior.
36
- */
37
- declare function createCookieHeaderAccessor(cookieHeader: string | undefined): CookieFn;
38
- /**
39
- * Create a no-op header accessor (for minimal endpoints that don't use headers).
40
- */
41
- declare function createNoopHeaders(): HeaderFn;
42
- /**
43
- * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).
44
- */
45
- declare function createNoopCookies(): CookieFn;
46
- //# sourceMappingURL=lazyAccessors.d.ts.map
47
- //#endregion
48
- export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
49
- //# sourceMappingURL=lazyAccessors-Bled3FVc.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazyAccessors-Bled3FVc.d.mts","names":[],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":[],"mappings":";;;;;AAqCA;;;;AAAuD;AAgCvC,iBArDA,iBAAA,CAqDuB,CAAA,EArDF,OAqDE,CAAA,EArDQ,QAqDR;;;;AAE5B;AAoCX;AA+CgB,iBArHA,iBAAA,CAqHmB,CAAA,EArHE,OAqHF,CAAA,EArHY,QAqHZ;;;;AAExB;AAkCK,iBAzHA,uBAAA,CA2Hb,OAAQ,EA1HD,MA0HC,CAAA,MAAA,EAAA,MAAA,GAAA,SAAA,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,EAzHR,QAyHQ;AAiCX;AAUA;;;iBAhIgB,uBAAA,mEAGb;;;;;iBA4Ca,mBAAA,UACN,qCACP;;;;;iBAkCa,0BAAA,oCAEb;;;;iBAiCa,iBAAA,CAAA,GAAqB;;;;iBAUrB,iBAAA,CAAA,GAAqB"}
@@ -1,49 +0,0 @@
1
- import { CookieFn, HeaderFn } from "./Endpoint-CGdCGJkC.cjs";
2
- import { Context } from "hono";
3
-
4
- //#region src/endpoints/lazyAccessors.d.ts
5
-
6
- /**
7
- * Create a lazy header accessor for Hono.
8
- * Uses `c.req.header(name)` for single lookups (native, case-insensitive).
9
- * Only calls `c.req.header()` to get all headers when needed.
10
- */
11
- declare function createHonoHeaders(c: Context): HeaderFn;
12
- /**
13
- * Create a lazy cookie accessor for Hono.
14
- * Uses `getCookie(c, name)` for single lookups (native).
15
- * Only parses the cookie header when all cookies are requested.
16
- */
17
- declare function createHonoCookies(c: Context): CookieFn;
18
- /**
19
- * Create a lazy header accessor for API Gateway events.
20
- * Handles case-insensitive lookups.
21
- */
22
- declare function createApiGatewayHeaders(headers: Record<string, string | undefined> | null | undefined): HeaderFn;
23
- /**
24
- * Create a lazy cookie accessor for API Gateway events.
25
- * Decodes URL-encoded values to match browser behavior.
26
- */
27
- declare function createApiGatewayCookies(cookies: string[] | undefined, cookieHeader: string | undefined): CookieFn;
28
- /**
29
- * Create a lazy header accessor for plain object headers (test adaptor, etc).
30
- * Headers are already available as an object, just provide lazy access.
31
- */
32
- declare function createObjectHeaders(headers: Record<string, string> | undefined): HeaderFn;
33
- /**
34
- * Create a lazy cookie accessor from a cookie header string.
35
- * Decodes URL-encoded values to match browser behavior.
36
- */
37
- declare function createCookieHeaderAccessor(cookieHeader: string | undefined): CookieFn;
38
- /**
39
- * Create a no-op header accessor (for minimal endpoints that don't use headers).
40
- */
41
- declare function createNoopHeaders(): HeaderFn;
42
- /**
43
- * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).
44
- */
45
- declare function createNoopCookies(): CookieFn;
46
- //# sourceMappingURL=lazyAccessors.d.ts.map
47
- //#endregion
48
- export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
49
- //# sourceMappingURL=lazyAccessors-C8AF1hNi.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazyAccessors-C8AF1hNi.d.cts","names":[],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":[],"mappings":";;;;;AAqCA;;;;AAAuD;AAgCvC,iBArDA,iBAAA,CAqDuB,CAAA,EArDF,OAqDE,CAAA,EArDQ,QAqDR;;;;AAE5B;AAoCX;AA+CgB,iBArHA,iBAAA,CAqHmB,CAAA,EArHE,OAqHF,CAAA,EArHY,QAqHZ;;;;AAExB;AAkCK,iBAzHA,uBAAA,CA2Hb,OAAQ,EA1HD,MA0HC,CAAA,MAAA,EAAA,MAAA,GAAA,SAAA,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,EAzHR,QAyHQ;AAiCX;AAUA;;;iBAhIgB,uBAAA,mEAGb;;;;;iBA4Ca,mBAAA,UACN,qCACP;;;;;iBAkCa,0BAAA,oCAEb;;;;iBAiCa,iBAAA,CAAA,GAAqB;;;;iBAUrB,iBAAA,CAAA,GAAqB"}