@geekmidas/constructs 10.0.0-alpha.15 → 10.0.0-alpha.151

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 (454) hide show
  1. package/README.md +222 -158
  2. package/dist/Construct-127M7yrl.d.cts +231 -0
  3. package/dist/Construct-127M7yrl.d.cts.map +1 -0
  4. package/dist/{Construct-BeYVu_QF.mjs → Construct-CGuc_Ijk.mjs} +8 -9
  5. package/dist/Construct-CGuc_Ijk.mjs.map +1 -0
  6. package/dist/{Construct-DqdlARxq.cjs → Construct-DorKS0Ua.cjs} +8 -9
  7. package/dist/Construct-DorKS0Ua.cjs.map +1 -0
  8. package/dist/Construct-DySlwh8o.d.mts +231 -0
  9. package/dist/Construct-DySlwh8o.d.mts.map +1 -0
  10. package/dist/{Cron-DKqnnTdH.d.cts → Cron-D8mB_cPX.d.mts} +16 -9
  11. package/dist/Cron-D8mB_cPX.d.mts.map +1 -0
  12. package/dist/{Cron-SyqS5oWJ.d.mts → Cron-D_sfaMGz.d.cts} +16 -9
  13. package/dist/Cron-D_sfaMGz.d.cts.map +1 -0
  14. package/dist/{CronBuilder-D_0HNBTr.mjs → CronBuilder-BJ5LoadF.mjs} +28 -11
  15. package/dist/CronBuilder-BJ5LoadF.mjs.map +1 -0
  16. package/dist/{CronBuilder-BdnI6lxF.cjs → CronBuilder-B_NSP-Y5.cjs} +27 -10
  17. package/dist/CronBuilder-B_NSP-Y5.cjs.map +1 -0
  18. package/dist/CronBuilder-C91MVLSr.d.cts +47 -0
  19. package/dist/CronBuilder-C91MVLSr.d.cts.map +1 -0
  20. package/dist/CronBuilder-Cmajva3g.d.mts +47 -0
  21. package/dist/CronBuilder-Cmajva3g.d.mts.map +1 -0
  22. package/dist/Endpoint-52z1P0Ue.cjs +581 -0
  23. package/dist/Endpoint-52z1P0Ue.cjs.map +1 -0
  24. package/dist/{Endpoint-DuT4TEEq.d.mts → Endpoint-BbHh3Qoc.d.mts} +124 -43
  25. package/dist/Endpoint-BbHh3Qoc.d.mts.map +1 -0
  26. package/dist/{Endpoint-C6yyHpRS.d.cts → Endpoint-YYwjqtS1.d.cts} +122 -41
  27. package/dist/Endpoint-YYwjqtS1.d.cts.map +1 -0
  28. package/dist/Endpoint-sUOU7uLx.mjs +552 -0
  29. package/dist/Endpoint-sUOU7uLx.mjs.map +1 -0
  30. package/dist/{EndpointFactory-Bm3aKRdV.mjs → EndpointFactory-Bzi9Sl7r.mjs} +269 -53
  31. package/dist/EndpointFactory-Bzi9Sl7r.mjs.map +1 -0
  32. package/dist/{EndpointFactory-CLvWuHyt.cjs → EndpointFactory-Cf_Cs1ym.cjs} +309 -51
  33. package/dist/EndpointFactory-Cf_Cs1ym.cjs.map +1 -0
  34. package/dist/{index-BPSZ_Lp_.d.cts → EndpointFactory-Hh1r6J_C.d.cts} +187 -104
  35. package/dist/EndpointFactory-Hh1r6J_C.d.cts.map +1 -0
  36. package/dist/{index-BoZ-iisU.d.mts → EndpointFactory-qcLzi4f-.d.mts} +188 -105
  37. package/dist/EndpointFactory-qcLzi4f-.d.mts.map +1 -0
  38. package/dist/Function-BIEsY0Hm.d.cts +76 -0
  39. package/dist/Function-BIEsY0Hm.d.cts.map +1 -0
  40. package/dist/Function-DfMzTGS4.d.mts +76 -0
  41. package/dist/Function-DfMzTGS4.d.mts.map +1 -0
  42. package/dist/{HonoEndpointAdaptor-92zavCsV.cjs → HonoEndpointAdaptor-BXBdb2Bt.cjs} +79 -31
  43. package/dist/HonoEndpointAdaptor-BXBdb2Bt.cjs.map +1 -0
  44. package/dist/{HonoEndpointAdaptor-yYaU7jVJ.mjs → HonoEndpointAdaptor-DR3j7S35.mjs} +76 -28
  45. package/dist/HonoEndpointAdaptor-DR3j7S35.mjs.map +1 -0
  46. package/dist/ObjectSubscriberBuilder-Cv8C7yS1.d.mts +129 -0
  47. package/dist/ObjectSubscriberBuilder-Cv8C7yS1.d.mts.map +1 -0
  48. package/dist/ObjectSubscriberBuilder-LWkey_oq.d.cts +129 -0
  49. package/dist/ObjectSubscriberBuilder-LWkey_oq.d.cts.map +1 -0
  50. package/dist/ProcessorBuilder-CwfP-M33.d.mts +216 -0
  51. package/dist/ProcessorBuilder-CwfP-M33.d.mts.map +1 -0
  52. package/dist/ProcessorBuilder-_jdZlbfW.d.cts +216 -0
  53. package/dist/ProcessorBuilder-_jdZlbfW.d.cts.map +1 -0
  54. package/dist/{Queue-D9X6OoON.d.mts → Queue-BnK3UH8r.d.mts} +42 -41
  55. package/dist/Queue-BnK3UH8r.d.mts.map +1 -0
  56. package/dist/{Queue-DYPB2KWL.d.cts → Queue-C4rijiM7.d.cts} +43 -42
  57. package/dist/Queue-C4rijiM7.d.cts.map +1 -0
  58. package/dist/Queue-D4Iaidrs.cjs +109 -0
  59. package/dist/Queue-D4Iaidrs.cjs.map +1 -0
  60. package/dist/Queue-u8w8_HpE.mjs +104 -0
  61. package/dist/Queue-u8w8_HpE.mjs.map +1 -0
  62. package/dist/QueueBuilder-2wP5lEC8.mjs +118 -0
  63. package/dist/QueueBuilder-2wP5lEC8.mjs.map +1 -0
  64. package/dist/QueueBuilder-BxsZ9o5z.cjs +135 -0
  65. package/dist/QueueBuilder-BxsZ9o5z.cjs.map +1 -0
  66. package/dist/QueueBuilder-DmwFtLzQ.d.mts +75 -0
  67. package/dist/QueueBuilder-DmwFtLzQ.d.mts.map +1 -0
  68. package/dist/QueueBuilder-SQli59An.d.cts +75 -0
  69. package/dist/QueueBuilder-SQli59An.d.cts.map +1 -0
  70. package/dist/Subscriber-5rCX1Nph.d.cts +83 -0
  71. package/dist/Subscriber-5rCX1Nph.d.cts.map +1 -0
  72. package/dist/Subscriber-CW_Dl-YR.d.mts +83 -0
  73. package/dist/Subscriber-CW_Dl-YR.d.mts.map +1 -0
  74. package/dist/SubscriberBuilder-BL_GTcwh.mjs +237 -0
  75. package/dist/SubscriberBuilder-BL_GTcwh.mjs.map +1 -0
  76. package/dist/SubscriberBuilder-CWzKwX1p.cjs +260 -0
  77. package/dist/SubscriberBuilder-CWzKwX1p.cjs.map +1 -0
  78. package/dist/Topic-DN2gYJ-p.mjs +99 -0
  79. package/dist/Topic-DN2gYJ-p.mjs.map +1 -0
  80. package/dist/Topic-Dp9Q7Lj2.cjs +104 -0
  81. package/dist/Topic-Dp9Q7Lj2.cjs.map +1 -0
  82. package/dist/adaptors/aws.cjs +134 -160
  83. package/dist/adaptors/aws.cjs.map +1 -1
  84. package/dist/adaptors/aws.d.cts +57 -48
  85. package/dist/adaptors/aws.d.cts.map +1 -1
  86. package/dist/adaptors/aws.d.mts +58 -49
  87. package/dist/adaptors/aws.d.mts.map +1 -1
  88. package/dist/adaptors/aws.mjs +130 -157
  89. package/dist/adaptors/aws.mjs.map +1 -1
  90. package/dist/adaptors/hono.cjs +1 -1
  91. package/dist/adaptors/hono.d.cts +5 -6
  92. package/dist/adaptors/hono.d.cts.map +1 -1
  93. package/dist/adaptors/hono.d.mts +6 -7
  94. package/dist/adaptors/hono.d.mts.map +1 -1
  95. package/dist/adaptors/hono.mjs +1 -1
  96. package/dist/adaptors/testing.cjs +955 -38
  97. package/dist/adaptors/testing.cjs.map +1 -1
  98. package/dist/adaptors/testing.d.cts +437 -39
  99. package/dist/adaptors/testing.d.cts.map +1 -1
  100. package/dist/adaptors/testing.d.mts +436 -38
  101. package/dist/adaptors/testing.d.mts.map +1 -1
  102. package/dist/adaptors/testing.mjs +929 -34
  103. package/dist/adaptors/testing.mjs.map +1 -1
  104. package/dist/auth-BqWz2JxC.d.cts +274 -0
  105. package/dist/auth-BqWz2JxC.d.cts.map +1 -0
  106. package/dist/auth-DnB9H9KL.d.mts +274 -0
  107. package/dist/auth-DnB9H9KL.d.mts.map +1 -0
  108. package/dist/auth.cjs +320 -21
  109. package/dist/auth.cjs.map +1 -1
  110. package/dist/auth.d.cts +2 -104
  111. package/dist/auth.d.mts +2 -104
  112. package/dist/auth.mjs +316 -23
  113. package/dist/auth.mjs.map +1 -1
  114. package/dist/cache-CQjMNPrC.d.cts +44 -0
  115. package/dist/cache-CQjMNPrC.d.cts.map +1 -0
  116. package/dist/cache-e3tfMQ9g.d.mts +44 -0
  117. package/dist/cache-e3tfMQ9g.d.mts.map +1 -0
  118. package/dist/cache.d.cts +2 -43
  119. package/dist/cache.d.mts +2 -43
  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/cipher-DSDxPRIp.d.cts +106 -0
  125. package/dist/cipher-DSDxPRIp.d.cts.map +1 -0
  126. package/dist/cipher-DSDxPRIp.d.mts +106 -0
  127. package/dist/cipher-DSDxPRIp.d.mts.map +1 -0
  128. package/dist/{construct-interface-DPlxfpoS.d.mts → construct-interface-CSA9VeWM.d.mts} +47 -8
  129. package/dist/construct-interface-CSA9VeWM.d.mts.map +1 -0
  130. package/dist/{construct-interface-DgXTJcOD.d.cts → construct-interface-DugP0E5q.d.cts} +47 -8
  131. package/dist/construct-interface-DugP0E5q.d.cts.map +1 -0
  132. package/dist/construct-interface.cjs +38 -4
  133. package/dist/construct-interface.cjs.map +1 -1
  134. package/dist/construct-interface.d.cts +2 -2
  135. package/dist/construct-interface.d.mts +2 -2
  136. package/dist/construct-interface.mjs +37 -5
  137. package/dist/construct-interface.mjs.map +1 -1
  138. package/dist/credential-DYymbp_7.cjs +257 -0
  139. package/dist/credential-DYymbp_7.cjs.map +1 -0
  140. package/dist/credential-DfSAOOdY.mjs +222 -0
  141. package/dist/credential-DfSAOOdY.mjs.map +1 -0
  142. package/dist/credential.cjs +7 -129
  143. package/dist/credential.d.cts +2 -58
  144. package/dist/credential.d.mts +2 -58
  145. package/dist/credential.mjs +2 -128
  146. package/dist/crons/index.cjs +126 -1
  147. package/dist/crons/index.cjs.map +1 -1
  148. package/dist/crons/index.d.cts +43 -3
  149. package/dist/crons/index.d.cts.map +1 -1
  150. package/dist/crons/index.d.mts +43 -3
  151. package/dist/crons/index.d.mts.map +1 -1
  152. package/dist/crons/index.mjs +125 -2
  153. package/dist/crons/index.mjs.map +1 -1
  154. package/dist/database/kysely.cjs +3 -194
  155. package/dist/database/kysely.d.cts +2 -149
  156. package/dist/database/kysely.d.mts +2 -149
  157. package/dist/database/kysely.mjs +2 -192
  158. package/dist/email.d.cts +1 -1
  159. package/dist/email.d.cts.map +1 -1
  160. package/dist/email.d.mts +2 -2
  161. package/dist/email.d.mts.map +1 -1
  162. package/dist/encryption/kms.cjs +95 -0
  163. package/dist/encryption/kms.cjs.map +1 -0
  164. package/dist/encryption/kms.d.cts +7 -0
  165. package/dist/encryption/kms.d.cts.map +1 -0
  166. package/dist/encryption/kms.d.mts +7 -0
  167. package/dist/encryption/kms.d.mts.map +1 -0
  168. package/dist/encryption/kms.mjs +93 -0
  169. package/dist/encryption/kms.mjs.map +1 -0
  170. package/dist/encryption.cjs +116 -0
  171. package/dist/encryption.cjs.map +1 -0
  172. package/dist/encryption.d.cts +37 -0
  173. package/dist/encryption.d.cts.map +1 -0
  174. package/dist/encryption.d.mts +37 -0
  175. package/dist/encryption.d.mts.map +1 -0
  176. package/dist/encryption.mjs +101 -0
  177. package/dist/encryption.mjs.map +1 -0
  178. package/dist/endpoints/index.cjs +32 -10
  179. package/dist/endpoints/index.d.cts +106 -3
  180. package/dist/endpoints/index.d.cts.map +1 -0
  181. package/dist/endpoints/index.d.mts +106 -3
  182. package/dist/endpoints/index.d.mts.map +1 -0
  183. package/dist/endpoints/index.mjs +6 -4
  184. package/dist/expire-C586zznE.d.cts +38 -0
  185. package/dist/expire-C586zznE.d.cts.map +1 -0
  186. package/dist/expire-C586zznE.d.mts +38 -0
  187. package/dist/expire-C586zznE.d.mts.map +1 -0
  188. package/dist/expire-CieftS01.cjs +67 -0
  189. package/dist/expire-CieftS01.cjs.map +1 -0
  190. package/dist/expire-CpzUAfr9.mjs +50 -0
  191. package/dist/expire-CpzUAfr9.mjs.map +1 -0
  192. package/dist/external-api.cjs +106 -0
  193. package/dist/external-api.cjs.map +1 -0
  194. package/dist/external-api.d.cts +2 -0
  195. package/dist/external-api.d.mts +2 -0
  196. package/dist/external-api.mjs +103 -0
  197. package/dist/external-api.mjs.map +1 -0
  198. package/dist/fake-BqhP8RRQ.d.mts +201 -0
  199. package/dist/fake-BqhP8RRQ.d.mts.map +1 -0
  200. package/dist/fake-DqieDYYA.d.cts +201 -0
  201. package/dist/fake-DqieDYYA.d.cts.map +1 -0
  202. package/dist/file-server.cjs +123 -30
  203. package/dist/file-server.cjs.map +1 -1
  204. package/dist/file-server.d.cts +115 -1
  205. package/dist/file-server.d.cts.map +1 -1
  206. package/dist/file-server.d.mts +115 -1
  207. package/dist/file-server.d.mts.map +1 -1
  208. package/dist/file-server.mjs +122 -32
  209. package/dist/file-server.mjs.map +1 -1
  210. package/dist/functions/index.cjs +1 -1
  211. package/dist/functions/index.d.cts +2 -1
  212. package/dist/functions/index.d.mts +2 -1
  213. package/dist/functions/index.mjs +1 -1
  214. package/dist/{functions-C53GW2eQ.mjs → functions-BvIDQKAA.mjs} +117 -22
  215. package/dist/functions-BvIDQKAA.mjs.map +1 -0
  216. package/dist/{functions-B6qCvfmy.cjs → functions-DLF6-IK8.cjs} +122 -18
  217. package/dist/functions-DLF6-IK8.cjs.map +1 -0
  218. package/dist/inbox-CR3L1fOI.d.cts +195 -0
  219. package/dist/inbox-CR3L1fOI.d.cts.map +1 -0
  220. package/dist/inbox-CjxpLVkH.d.mts +195 -0
  221. package/dist/inbox-CjxpLVkH.d.mts.map +1 -0
  222. package/dist/inbox.cjs +291 -0
  223. package/dist/inbox.cjs.map +1 -0
  224. package/dist/inbox.d.cts +2 -0
  225. package/dist/inbox.d.mts +2 -0
  226. package/dist/inbox.mjs +283 -0
  227. package/dist/inbox.mjs.map +1 -0
  228. package/dist/index-DCkDQkwj.d.mts +115 -0
  229. package/dist/index-DCkDQkwj.d.mts.map +1 -0
  230. package/dist/index-DPTHa6Ud.d.cts +115 -0
  231. package/dist/index-DPTHa6Ud.d.cts.map +1 -0
  232. package/dist/{index-CeEtxDmK.d.cts → index-DdRjYhiJ.d.cts} +42 -2
  233. package/dist/{index-CeEtxDmK.d.cts.map → index-DdRjYhiJ.d.cts.map} +1 -1
  234. package/dist/{index-CeEtxDmK.d.mts → index-DdRjYhiJ.d.mts} +42 -2
  235. package/dist/{index-CeEtxDmK.d.mts.map → index-DdRjYhiJ.d.mts.map} +1 -1
  236. package/dist/index.cjs +4 -1
  237. package/dist/index.d.cts +26 -3
  238. package/dist/index.d.cts.map +1 -0
  239. package/dist/index.d.mts +26 -3
  240. package/dist/index.d.mts.map +1 -0
  241. package/dist/index.mjs +3 -2
  242. package/dist/kysely-CebjCWTl.d.cts +216 -0
  243. package/dist/kysely-CebjCWTl.d.cts.map +1 -0
  244. package/dist/kysely-Cs4uPO8k.mjs +371 -0
  245. package/dist/kysely-Cs4uPO8k.mjs.map +1 -0
  246. package/dist/kysely-CukArHJ0.cjs +384 -0
  247. package/dist/kysely-CukArHJ0.cjs.map +1 -0
  248. package/dist/kysely-DE4kADWD.d.mts +216 -0
  249. package/dist/kysely-DE4kADWD.d.mts.map +1 -0
  250. package/dist/{telemetry-DGcFlVpB.d.cts → lambdaTelemetry-8vnmVZQ5.d.cts} +2 -2
  251. package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +1 -0
  252. package/dist/{telemetry-DGcFlVpB.d.mts → lambdaTelemetry-8vnmVZQ5.d.mts} +2 -2
  253. package/dist/lambdaTelemetry-8vnmVZQ5.d.mts.map +1 -0
  254. package/dist/mobile-app.cjs +74 -0
  255. package/dist/mobile-app.cjs.map +1 -0
  256. package/dist/mobile-app.d.cts +73 -0
  257. package/dist/mobile-app.d.cts.map +1 -0
  258. package/dist/mobile-app.d.mts +73 -0
  259. package/dist/mobile-app.d.mts.map +1 -0
  260. package/dist/mobile-app.mjs +73 -0
  261. package/dist/mobile-app.mjs.map +1 -0
  262. package/dist/object-storage.cjs +8 -1
  263. package/dist/object-storage.cjs.map +1 -1
  264. package/dist/object-storage.d.cts +10 -1
  265. package/dist/object-storage.d.cts.map +1 -1
  266. package/dist/object-storage.d.mts +10 -1
  267. package/dist/object-storage.d.mts.map +1 -1
  268. package/dist/object-storage.mjs +7 -2
  269. package/dist/object-storage.mjs.map +1 -1
  270. package/dist/pattern-C1CEcglD.mjs +241 -0
  271. package/dist/pattern-C1CEcglD.mjs.map +1 -0
  272. package/dist/pattern-QFaUIr77.cjs +288 -0
  273. package/dist/pattern-QFaUIr77.cjs.map +1 -0
  274. package/dist/processors/index.cjs +214 -0
  275. package/dist/processors/index.cjs.map +1 -0
  276. package/dist/processors/index.d.cts +78 -0
  277. package/dist/processors/index.d.cts.map +1 -0
  278. package/dist/processors/index.d.mts +78 -0
  279. package/dist/processors/index.d.mts.map +1 -0
  280. package/dist/processors/index.mjs +193 -0
  281. package/dist/processors/index.mjs.map +1 -0
  282. package/dist/queue/index.cjs +5 -192
  283. package/dist/queue/index.d.cts +3 -53
  284. package/dist/queue/index.d.mts +3 -53
  285. package/dist/queue/index.mjs +3 -190
  286. package/dist/random-password.cjs +86 -0
  287. package/dist/random-password.cjs.map +1 -0
  288. package/dist/random-password.d.cts +30 -0
  289. package/dist/random-password.d.cts.map +1 -0
  290. package/dist/random-password.d.mts +30 -0
  291. package/dist/random-password.d.mts.map +1 -0
  292. package/dist/random-password.mjs +84 -0
  293. package/dist/random-password.mjs.map +1 -0
  294. package/dist/{lazyAccessors-BHtcqgz2.mjs → readRequestBody-BTIl3k-D.mjs} +99 -39
  295. package/dist/readRequestBody-BTIl3k-D.mjs.map +1 -0
  296. package/dist/{lazyAccessors-Dx9NLwJZ.cjs → readRequestBody-Dej_L3c4.cjs} +118 -46
  297. package/dist/readRequestBody-Dej_L3c4.cjs.map +1 -0
  298. package/dist/requestLogger-BZcXwdBs.cjs +207 -0
  299. package/dist/requestLogger-BZcXwdBs.cjs.map +1 -0
  300. package/dist/requestLogger-pA4gi3E1.mjs +178 -0
  301. package/dist/requestLogger-pA4gi3E1.mjs.map +1 -0
  302. package/dist/rest-api.cjs +85 -70
  303. package/dist/rest-api.cjs.map +1 -1
  304. package/dist/rest-api.d.cts +77 -59
  305. package/dist/rest-api.d.cts.map +1 -1
  306. package/dist/rest-api.d.mts +77 -59
  307. package/dist/rest-api.d.mts.map +1 -1
  308. package/dist/rest-api.mjs +87 -72
  309. package/dist/rest-api.mjs.map +1 -1
  310. package/dist/runSubscriber-CC_2C9F2.cjs +133 -0
  311. package/dist/runSubscriber-CC_2C9F2.cjs.map +1 -0
  312. package/dist/runSubscriber-DyHWp_Lf.mjs +116 -0
  313. package/dist/runSubscriber-DyHWp_Lf.mjs.map +1 -0
  314. package/dist/shutdown-BMJmAhSt.cjs +38 -0
  315. package/dist/shutdown-BMJmAhSt.cjs.map +1 -0
  316. package/dist/shutdown-C7xa8x9S.mjs +27 -0
  317. package/dist/shutdown-C7xa8x9S.mjs.map +1 -0
  318. package/dist/site.cjs +85 -8
  319. package/dist/site.cjs.map +1 -1
  320. package/dist/site.d.cts +98 -2
  321. package/dist/site.d.cts.map +1 -1
  322. package/dist/site.d.mts +98 -2
  323. package/dist/site.d.mts.map +1 -1
  324. package/dist/site.mjs +84 -11
  325. package/dist/site.mjs.map +1 -1
  326. package/dist/stages-DaTaoQei.d.cts +73 -0
  327. package/dist/stages-DaTaoQei.d.cts.map +1 -0
  328. package/dist/stages-DaTaoQei.d.mts +73 -0
  329. package/dist/stages-DaTaoQei.d.mts.map +1 -0
  330. package/dist/subscribers/index.cjs +134 -1
  331. package/dist/subscribers/index.cjs.map +1 -0
  332. package/dist/subscribers/index.d.cts +74 -3
  333. package/dist/subscribers/index.d.cts.map +1 -0
  334. package/dist/subscribers/index.d.mts +74 -3
  335. package/dist/subscribers/index.d.mts.map +1 -0
  336. package/dist/subscribers/index.mjs +132 -2
  337. package/dist/subscribers/index.mjs.map +1 -0
  338. package/dist/telemetry-C1oqncFY.d.cts +40 -0
  339. package/dist/telemetry-C1oqncFY.d.cts.map +1 -0
  340. package/dist/telemetry-CObow3Dn.d.mts +40 -0
  341. package/dist/telemetry-CObow3Dn.d.mts.map +1 -0
  342. package/dist/telemetry.cjs +56 -0
  343. package/dist/telemetry.cjs.map +1 -0
  344. package/dist/telemetry.d.cts +2 -0
  345. package/dist/telemetry.d.mts +2 -0
  346. package/dist/telemetry.mjs +55 -0
  347. package/dist/telemetry.mjs.map +1 -0
  348. package/dist/topic/index.cjs +2 -134
  349. package/dist/topic/index.d.cts +2 -3
  350. package/dist/topic/index.d.mts +2 -3
  351. package/dist/topic/index.mjs +2 -132
  352. package/dist/tracing-Bbj1uoFJ.mjs +127 -0
  353. package/dist/tracing-Bbj1uoFJ.mjs.map +1 -0
  354. package/dist/tracing-C0ooU0V2.cjs +150 -0
  355. package/dist/tracing-C0ooU0V2.cjs.map +1 -0
  356. package/dist/websocket-api.cjs +951 -0
  357. package/dist/websocket-api.cjs.map +1 -0
  358. package/dist/websocket-api.d.cts +556 -0
  359. package/dist/websocket-api.d.cts.map +1 -0
  360. package/dist/websocket-api.d.mts +556 -0
  361. package/dist/websocket-api.d.mts.map +1 -0
  362. package/dist/websocket-api.mjs +933 -0
  363. package/dist/websocket-api.mjs.map +1 -0
  364. package/dist/worker.cjs +174 -32
  365. package/dist/worker.cjs.map +1 -1
  366. package/dist/worker.d.cts +147 -47
  367. package/dist/worker.d.cts.map +1 -1
  368. package/dist/worker.d.mts +147 -47
  369. package/dist/worker.d.mts.map +1 -1
  370. package/dist/worker.mjs +175 -33
  371. package/dist/worker.mjs.map +1 -1
  372. package/package.json +155 -44
  373. package/dist/Construct-BeYVu_QF.mjs.map +0 -1
  374. package/dist/Construct-DfbwIntp.d.cts +0 -115
  375. package/dist/Construct-DfbwIntp.d.cts.map +0 -1
  376. package/dist/Construct-DqdlARxq.cjs.map +0 -1
  377. package/dist/Construct-l5aOn_jv.d.mts +0 -115
  378. package/dist/Construct-l5aOn_jv.d.mts.map +0 -1
  379. package/dist/Cron-DKqnnTdH.d.cts.map +0 -1
  380. package/dist/Cron-SyqS5oWJ.d.mts.map +0 -1
  381. package/dist/CronBuilder-BdnI6lxF.cjs.map +0 -1
  382. package/dist/CronBuilder-CRGnDfTq.d.mts +0 -41
  383. package/dist/CronBuilder-CRGnDfTq.d.mts.map +0 -1
  384. package/dist/CronBuilder-D_0HNBTr.mjs.map +0 -1
  385. package/dist/CronBuilder-Df1q9PNy.d.cts +0 -41
  386. package/dist/CronBuilder-Df1q9PNy.d.cts.map +0 -1
  387. package/dist/Endpoint-BpZHtJ2W.cjs +0 -1689
  388. package/dist/Endpoint-BpZHtJ2W.cjs.map +0 -1
  389. package/dist/Endpoint-C6yyHpRS.d.cts.map +0 -1
  390. package/dist/Endpoint-DuT4TEEq.d.mts.map +0 -1
  391. package/dist/Endpoint-ONsly_dq.mjs +0 -1671
  392. package/dist/Endpoint-ONsly_dq.mjs.map +0 -1
  393. package/dist/EndpointFactory-Bm3aKRdV.mjs.map +0 -1
  394. package/dist/EndpointFactory-CLvWuHyt.cjs.map +0 -1
  395. package/dist/HonoEndpointAdaptor-92zavCsV.cjs.map +0 -1
  396. package/dist/HonoEndpointAdaptor-yYaU7jVJ.mjs.map +0 -1
  397. package/dist/Queue-D9X6OoON.d.mts.map +0 -1
  398. package/dist/Queue-DYPB2KWL.d.cts.map +0 -1
  399. package/dist/Subscriber-C4heaAyO.d.mts +0 -51
  400. package/dist/Subscriber-C4heaAyO.d.mts.map +0 -1
  401. package/dist/Subscriber-CotDUELC.d.cts +0 -51
  402. package/dist/Subscriber-CotDUELC.d.cts.map +0 -1
  403. package/dist/SubscriberBuilder-BEv0eoHy.d.cts +0 -59
  404. package/dist/SubscriberBuilder-BEv0eoHy.d.cts.map +0 -1
  405. package/dist/SubscriberBuilder-C0ZEtGDI.cjs +0 -125
  406. package/dist/SubscriberBuilder-C0ZEtGDI.cjs.map +0 -1
  407. package/dist/SubscriberBuilder-h7B_cHMr.mjs +0 -114
  408. package/dist/SubscriberBuilder-h7B_cHMr.mjs.map +0 -1
  409. package/dist/SubscriberBuilder-tyH5yTk5.d.mts +0 -59
  410. package/dist/SubscriberBuilder-tyH5yTk5.d.mts.map +0 -1
  411. package/dist/Topic-DEVGo0Dm.d.cts +0 -89
  412. package/dist/Topic-DEVGo0Dm.d.cts.map +0 -1
  413. package/dist/Topic-zk_6Gthr.d.mts +0 -89
  414. package/dist/Topic-zk_6Gthr.d.mts.map +0 -1
  415. package/dist/auth.d.cts.map +0 -1
  416. package/dist/auth.d.mts.map +0 -1
  417. package/dist/cache.d.cts.map +0 -1
  418. package/dist/cache.d.mts.map +0 -1
  419. package/dist/construct-interface-DPlxfpoS.d.mts.map +0 -1
  420. package/dist/construct-interface-DgXTJcOD.d.cts.map +0 -1
  421. package/dist/credential.cjs.map +0 -1
  422. package/dist/credential.d.cts.map +0 -1
  423. package/dist/credential.d.mts.map +0 -1
  424. package/dist/credential.mjs.map +0 -1
  425. package/dist/database/kysely.cjs.map +0 -1
  426. package/dist/database/kysely.d.cts.map +0 -1
  427. package/dist/database/kysely.d.mts.map +0 -1
  428. package/dist/database/kysely.mjs.map +0 -1
  429. package/dist/functions-B6qCvfmy.cjs.map +0 -1
  430. package/dist/functions-C53GW2eQ.mjs.map +0 -1
  431. package/dist/index-B2urf3YI.d.cts +0 -26
  432. package/dist/index-B2urf3YI.d.cts.map +0 -1
  433. package/dist/index-BPSZ_Lp_.d.cts.map +0 -1
  434. package/dist/index-BoZ-iisU.d.mts.map +0 -1
  435. package/dist/index-CdaU--_B.d.cts +0 -165
  436. package/dist/index-CdaU--_B.d.cts.map +0 -1
  437. package/dist/index-DMCDvnsM.d.mts +0 -26
  438. package/dist/index-DMCDvnsM.d.mts.map +0 -1
  439. package/dist/index-PQRWOQj4.d.mts +0 -165
  440. package/dist/index-PQRWOQj4.d.mts.map +0 -1
  441. package/dist/lazyAccessors-BHtcqgz2.mjs.map +0 -1
  442. package/dist/lazyAccessors-Dx9NLwJZ.cjs.map +0 -1
  443. package/dist/processAudits-BpRlPQMW.mjs +0 -77
  444. package/dist/processAudits-BpRlPQMW.mjs.map +0 -1
  445. package/dist/processAudits-D_2W5x8k.cjs +0 -88
  446. package/dist/processAudits-D_2W5x8k.cjs.map +0 -1
  447. package/dist/queue/index.cjs.map +0 -1
  448. package/dist/queue/index.d.cts.map +0 -1
  449. package/dist/queue/index.d.mts.map +0 -1
  450. package/dist/queue/index.mjs.map +0 -1
  451. package/dist/telemetry-DGcFlVpB.d.cts.map +0 -1
  452. package/dist/telemetry-DGcFlVpB.d.mts.map +0 -1
  453. package/dist/topic/index.cjs.map +0 -1
  454. package/dist/topic/index.mjs.map +0 -1
@@ -1,193 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_Construct = require("../Construct-DqdlARxq.cjs");
3
- const require_construct_interface = require("../construct-interface.cjs");
4
- const require_clone = require("../clone-UGJpvQnL.cjs");
5
- let _geekmidas_manifest = require("@geekmidas/manifest");
6
- let _geekmidas_logger_console = require("@geekmidas/logger/console");
7
- let _geekmidas_events = require("@geekmidas/events");
8
- //#region src/queue/Queue.ts
9
- /**
10
- * A queue worker — a point-to-point SQS-style queue and its single consumer.
11
- * Unlike a `Subscriber` (topic fan-out, filtered by `subscribedEvents`), a queue
12
- * drains every message of its one `message` type. Build one with `q` (see
13
- * `QueueBuilder`); `gkm build` discovers it into the manifest's `queues` field.
14
- *
15
- * The producer side is {@link Queue.publisher} — a ready-to-inject `Service`
16
- * that any endpoint/function drops into `.services([...])` to send messages.
17
- */
18
- var Queue = class extends require_Construct.Construct {
19
- name;
20
- handler;
21
- messageSchema;
22
- timeout;
23
- services;
24
- logger;
25
- batchSize;
26
- fifo;
27
- __IS_QUEUE__ = true;
28
- static isQueue(obj) {
29
- return Boolean(obj && obj.__IS_QUEUE__ === true && obj.type === "dev.geekmidas.function.queue");
30
- }
31
- /**
32
- * The canonical id this queue is declared under.
33
- *
34
- * Derived from the name rather than given separately, so `emails` and
35
- * `Emails` are one queue. The name stays what it was: it is the wire `type`
36
- * a producer sends and the worker subscribes to, and changing that would
37
- * silently orphan in-flight messages.
38
- */
39
- id;
40
- /**
41
- * The producer's env key. Read by both {@link declare} and
42
- * {@link publisher}, so what the target publishes and what the producer
43
- * looks up cannot drift.
44
- */
45
- connectionKey;
46
- constructor(name, handler, messageSchema, timeout = 3e4, services = [], logger = _geekmidas_logger_console.DEFAULT_LOGGER, batchSize, fifo, constructs = []) {
47
- super("dev.geekmidas.function.queue", logger, services, [], void 0, void 0, timeout, void 0, void 0, constructs);
48
- this.name = name;
49
- this.handler = handler;
50
- this.messageSchema = messageSchema;
51
- this.timeout = timeout;
52
- this.services = services;
53
- this.logger = logger;
54
- this.batchSize = batchSize;
55
- this.fifo = fifo;
56
- this.id = (0, _geekmidas_manifest.canonicalId)(name);
57
- this.connectionKey = (0, _geekmidas_manifest.provideKey)(this.id, "publisherConnectionString");
58
- }
59
- /**
60
- * What this queue is in the manifest.
61
- *
62
- * A queue is a resource, not a handler: the worker is reached *through* it,
63
- * so the declaration carries the producer's key and nothing about the code
64
- * that drains it. The local target reads this to know which broker has to be
65
- * running and what connection string to inject.
66
- */
67
- declare() {
68
- return [{
69
- kind: "queue",
70
- id: this.id,
71
- provides: [this.connectionKey],
72
- ...this.fifo ? { fifo: true } : {},
73
- worker: {
74
- id: `${this.id}Worker`,
75
- handler: `${this.id}.handler`,
76
- dependencies: []
77
- }
78
- }];
79
- }
80
- /**
81
- * The producer side — a `Service` exposing an `EventPublisher` typed to this
82
- * queue's message. Inject it via `.services([queue.publisher])`; the handler
83
- * then calls `services.<name>Publisher.publish([{ type, payload }])`.
84
- *
85
- * It reads `<NAME>_PUBLISHER_CONNECTION_STRING` and builds the transport from
86
- * the URL protocol — `pgboss://` locally, `sqs://` deployed — so the same
87
- * code publishes to Postgres in dev and SQS in prod. Because it's a `Service`,
88
- * `Construct.getEnvironment()` sniffs it, so the env requirement flows into
89
- * the manifest and infra links exactly this queue with least privilege.
90
- */
91
- /**
92
- * The queue as a dependency — what `.dependsOn([emailsQueue])` dissolves
93
- * into, reachable as `services.emails`.
94
- *
95
- * It is the producer: a consumer is the worker written right here, so the
96
- * only thing another construct can want from a queue is the ability to send
97
- * to it. {@link publisher} is the same service under its older
98
- * `<name>Publisher` key, kept for `.services([queue.publisher])`.
99
- */
100
- get service() {
101
- const { register } = this.publisher;
102
- return {
103
- serviceName: (0, _geekmidas_manifest.serviceKey)(this.id),
104
- register
105
- };
106
- }
107
- get publisher() {
108
- const envVar = this.connectionKey;
109
- return {
110
- serviceName: `${this.name}Publisher`,
111
- async register({ envParser }) {
112
- const { connectionString } = envParser.create((get) => ({ connectionString: get(envVar).string() })).parse();
113
- return _geekmidas_events.Publisher.fromConnectionString(connectionString);
114
- }
115
- };
116
- }
117
- };
118
- //#endregion
119
- //#region src/queue/QueueBuilder.ts
120
- /**
121
- * Builds a {@link Queue} worker — `q.queue('orders').services([db]).message(schema).handle(fn)`.
122
- * Services are an array (sniffed for required env vars); `message` is the typed
123
- * job payload; `handle` is the single consumer. The queue name is captured as a
124
- * literal so `queue.publisher` is typed to `{ type: '<name>', payload }`.
125
- */
126
- var QueueBuilder = class {
127
- _name;
128
- _messageSchema;
129
- _timeout = 3e4;
130
- _batchSize;
131
- _fifo;
132
- _services = [];
133
- /** The construct ids `.dependsOn()` named — what the manifest records. */
134
- _constructs = [];
135
- _logger = _geekmidas_logger_console.DEFAULT_LOGGER;
136
- /** The queue name — drives the infra queue and its `<NAME>_*` env vars. */
137
- queue(name) {
138
- return require_clone.cloneWith(this, { _name: name });
139
- }
140
- timeout(timeout) {
141
- return require_clone.cloneWith(this, { _timeout: timeout });
142
- }
143
- /** SQS event-source batch size (deployed). */
144
- batchSize(batchSize) {
145
- return require_clone.cloneWith(this, { _batchSize: batchSize });
146
- }
147
- /** Mark the queue as FIFO (deployed). */
148
- fifo(fifo = true) {
149
- return require_clone.cloneWith(this, { _fifo: fifo });
150
- }
151
- /**
152
- * Depend on constructs — a database, a bucket, a mail sender, a queue, a
153
- * topic.
154
- *
155
- * It records the edge and dissolves each construct's client into the
156
- * handler's service record under the construct's own id, so
157
- * `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
158
- *
159
- * Constructs only. A `Service` does not match the shape, which is what keeps
160
- * env sniffing confined to `.services()` and the explicit lift.
161
- */
162
- dependsOn(constructs) {
163
- const services = require_construct_interface.servicesOf(constructs);
164
- return require_clone.cloneWith(this, {
165
- _services: [...this._services, ...services],
166
- _constructs: require_construct_interface.idsOf(constructs, this._constructs)
167
- });
168
- }
169
- services(services) {
170
- return require_clone.cloneWith(this, { _services: [...this._services, ...services] });
171
- }
172
- logger(logger) {
173
- return require_clone.cloneWith(this, { _logger: logger });
174
- }
175
- /** The typed message (job) payload the queue carries. */
176
- message(schema) {
177
- return require_clone.cloneWith(this, { _messageSchema: schema });
178
- }
179
- handle(fn) {
180
- if (!this._name) throw new Error("Queue requires a name — call .queue(name) before .handle().");
181
- if (!this._messageSchema) throw new Error("Queue requires a message schema — call .message(schema) before .handle().");
182
- return new Queue(this._name, fn, this._messageSchema, this._timeout, this._services, this._logger, this._batchSize, this._fifo, this._constructs);
183
- }
184
- };
185
- //#endregion
186
- //#region src/queue/index.ts
187
- const q = new QueueBuilder();
188
- //#endregion
189
- exports.Queue = Queue;
190
- exports.QueueBuilder = QueueBuilder;
191
- exports.q = q;
192
-
193
- //# sourceMappingURL=index.cjs.map
2
+ const require_Queue = require("../Queue-D4Iaidrs.cjs");
3
+ const require_QueueBuilder = require("../QueueBuilder-BxsZ9o5z.cjs");
4
+ exports.Queue = require_Queue.Queue;
5
+ exports.QueueNeedsMessage = require_QueueBuilder.QueueNeedsMessage;
6
+ exports.QueueNeedsName = require_QueueBuilder.QueueNeedsName;
@@ -1,53 +1,3 @@
1
- import { t as StandardSchemaV1 } from "../index-CeEtxDmK.cjs";
2
- import { n as Consumable, s as ServicesOf } from "../construct-interface-DgXTJcOD.cjs";
3
- import { i as QueueMessage, n as QueueContext, r as QueueHandler, t as Queue } from "../Queue-DYPB2KWL.cjs";
4
- import { Logger as Logger$1 } from "@geekmidas/logger";
5
- import { Service } from "@geekmidas/services";
6
- //#region src/queue/QueueBuilder.d.ts
7
- /**
8
- * Builds a {@link Queue} worker — `q.queue('orders').services([db]).message(schema).handle(fn)`.
9
- * Services are an array (sniffed for required env vars); `message` is the typed
10
- * job payload; `handle` is the single consumer. The queue name is captured as a
11
- * literal so `queue.publisher` is typed to `{ type: '<name>', payload }`.
12
- */
13
- export declare class QueueBuilder<TName extends string = string, TMessage extends StandardSchemaV1 | undefined = undefined, TServices extends Service[] = [], TLogger extends Logger$1 = Logger$1> {
14
- private _name?;
15
- private _messageSchema?;
16
- private _timeout;
17
- private _batchSize?;
18
- private _fifo?;
19
- private _services;
20
- /** The construct ids `.dependsOn()` named — what the manifest records. */
21
- _constructs: string[];
22
- private _logger;
23
- /** The queue name — drives the infra queue and its `<NAME>_*` env vars. */
24
- queue<T extends string>(name: T): QueueBuilder<T, TMessage, TServices, TLogger>;
25
- timeout(timeout: number): this;
26
- /** SQS event-source batch size (deployed). */
27
- batchSize(batchSize: number): this;
28
- /** Mark the queue as FIFO (deployed). */
29
- fifo(fifo?: boolean): this;
30
- /**
31
- * Depend on constructs — a database, a bucket, a mail sender, a queue, a
32
- * topic.
33
- *
34
- * It records the edge and dissolves each construct's client into the
35
- * handler's service record under the construct's own id, so
36
- * `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
37
- *
38
- * Constructs only. A `Service` does not match the shape, which is what keeps
39
- * env sniffing confined to `.services()` and the explicit lift.
40
- */
41
- dependsOn<const T extends readonly Consumable[]>(constructs: T): QueueBuilder<TName, TMessage, [...TServices, ...ServicesOf<T>], TLogger>;
42
- services<T extends Service[]>(services: T): QueueBuilder<TName, TMessage, [...TServices, ...T], TLogger>;
43
- logger<T extends Logger$1>(logger: T): QueueBuilder<TName, TMessage, TServices, T>;
44
- /** The typed message (job) payload the queue carries. */
45
- message<T extends StandardSchemaV1>(schema: T): QueueBuilder<TName, T, TServices, TLogger>;
46
- handle(fn: QueueHandler<NonNullable<TMessage>, TServices, TLogger>): Queue<TName, NonNullable<TMessage>, TServices, TLogger>;
47
- }
48
- //#endregion
49
- //#region src/queue/index.d.ts
50
- export declare const q: QueueBuilder<string, undefined, [], Logger>;
51
- //#endregion
52
- export { Queue, type QueueContext, type QueueHandler, type QueueMessage };
53
- //# sourceMappingURL=index.d.cts.map
1
+ import { i as QueueMessage, n as QueueContext, r as QueueHandler, t as Queue } from "../Queue-C4rijiM7.cjs";
2
+ import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-SQli59An.cjs";
3
+ export { Queue, type QueueContext, type QueueHandler, type QueueMessage, QueueNeedsMessage, QueueNeedsName };
@@ -1,53 +1,3 @@
1
- import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
2
- import { n as Consumable, s as ServicesOf } from "../construct-interface-DPlxfpoS.mjs";
3
- import { i as QueueMessage, n as QueueContext, r as QueueHandler, t as Queue } from "../Queue-D9X6OoON.mjs";
4
- import { Service } from "@geekmidas/services";
5
- import { Logger as Logger$1 } from "@geekmidas/logger";
6
- //#region src/queue/QueueBuilder.d.ts
7
- /**
8
- * Builds a {@link Queue} worker — `q.queue('orders').services([db]).message(schema).handle(fn)`.
9
- * Services are an array (sniffed for required env vars); `message` is the typed
10
- * job payload; `handle` is the single consumer. The queue name is captured as a
11
- * literal so `queue.publisher` is typed to `{ type: '<name>', payload }`.
12
- */
13
- export declare class QueueBuilder<TName extends string = string, TMessage extends StandardSchemaV1 | undefined = undefined, TServices extends Service[] = [], TLogger extends Logger$1 = Logger$1> {
14
- private _name?;
15
- private _messageSchema?;
16
- private _timeout;
17
- private _batchSize?;
18
- private _fifo?;
19
- private _services;
20
- /** The construct ids `.dependsOn()` named — what the manifest records. */
21
- _constructs: string[];
22
- private _logger;
23
- /** The queue name — drives the infra queue and its `<NAME>_*` env vars. */
24
- queue<T extends string>(name: T): QueueBuilder<T, TMessage, TServices, TLogger>;
25
- timeout(timeout: number): this;
26
- /** SQS event-source batch size (deployed). */
27
- batchSize(batchSize: number): this;
28
- /** Mark the queue as FIFO (deployed). */
29
- fifo(fifo?: boolean): this;
30
- /**
31
- * Depend on constructs — a database, a bucket, a mail sender, a queue, a
32
- * topic.
33
- *
34
- * It records the edge and dissolves each construct's client into the
35
- * handler's service record under the construct's own id, so
36
- * `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
37
- *
38
- * Constructs only. A `Service` does not match the shape, which is what keeps
39
- * env sniffing confined to `.services()` and the explicit lift.
40
- */
41
- dependsOn<const T extends readonly Consumable[]>(constructs: T): QueueBuilder<TName, TMessage, [...TServices, ...ServicesOf<T>], TLogger>;
42
- services<T extends Service[]>(services: T): QueueBuilder<TName, TMessage, [...TServices, ...T], TLogger>;
43
- logger<T extends Logger$1>(logger: T): QueueBuilder<TName, TMessage, TServices, T>;
44
- /** The typed message (job) payload the queue carries. */
45
- message<T extends StandardSchemaV1>(schema: T): QueueBuilder<TName, T, TServices, TLogger>;
46
- handle(fn: QueueHandler<NonNullable<TMessage>, TServices, TLogger>): Queue<TName, NonNullable<TMessage>, TServices, TLogger>;
47
- }
48
- //#endregion
49
- //#region src/queue/index.d.ts
50
- export declare const q: QueueBuilder<string, undefined, [], Logger>;
51
- //#endregion
52
- export { Queue, type QueueContext, type QueueHandler, type QueueMessage };
53
- //# sourceMappingURL=index.d.mts.map
1
+ import { i as QueueMessage, n as QueueContext, r as QueueHandler, t as Queue } from "../Queue-BnK3UH8r.mjs";
2
+ import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-DmwFtLzQ.mjs";
3
+ export { Queue, type QueueContext, type QueueHandler, type QueueMessage, QueueNeedsMessage, QueueNeedsName };
@@ -1,190 +1,3 @@
1
- import { t as Construct } from "../Construct-BeYVu_QF.mjs";
2
- import { idsOf, servicesOf } from "../construct-interface.mjs";
3
- import { t as cloneWith } from "../clone-EKNovYHu.mjs";
4
- import { canonicalId, provideKey, serviceKey } from "@geekmidas/manifest";
5
- import { DEFAULT_LOGGER } from "@geekmidas/logger/console";
6
- import { Publisher } from "@geekmidas/events";
7
- //#region src/queue/Queue.ts
8
- /**
9
- * A queue worker — a point-to-point SQS-style queue and its single consumer.
10
- * Unlike a `Subscriber` (topic fan-out, filtered by `subscribedEvents`), a queue
11
- * drains every message of its one `message` type. Build one with `q` (see
12
- * `QueueBuilder`); `gkm build` discovers it into the manifest's `queues` field.
13
- *
14
- * The producer side is {@link Queue.publisher} — a ready-to-inject `Service`
15
- * that any endpoint/function drops into `.services([...])` to send messages.
16
- */
17
- var Queue = class extends Construct {
18
- name;
19
- handler;
20
- messageSchema;
21
- timeout;
22
- services;
23
- logger;
24
- batchSize;
25
- fifo;
26
- __IS_QUEUE__ = true;
27
- static isQueue(obj) {
28
- return Boolean(obj && obj.__IS_QUEUE__ === true && obj.type === "dev.geekmidas.function.queue");
29
- }
30
- /**
31
- * The canonical id this queue is declared under.
32
- *
33
- * Derived from the name rather than given separately, so `emails` and
34
- * `Emails` are one queue. The name stays what it was: it is the wire `type`
35
- * a producer sends and the worker subscribes to, and changing that would
36
- * silently orphan in-flight messages.
37
- */
38
- id;
39
- /**
40
- * The producer's env key. Read by both {@link declare} and
41
- * {@link publisher}, so what the target publishes and what the producer
42
- * looks up cannot drift.
43
- */
44
- connectionKey;
45
- constructor(name, handler, messageSchema, timeout = 3e4, services = [], logger = DEFAULT_LOGGER, batchSize, fifo, constructs = []) {
46
- super("dev.geekmidas.function.queue", logger, services, [], void 0, void 0, timeout, void 0, void 0, constructs);
47
- this.name = name;
48
- this.handler = handler;
49
- this.messageSchema = messageSchema;
50
- this.timeout = timeout;
51
- this.services = services;
52
- this.logger = logger;
53
- this.batchSize = batchSize;
54
- this.fifo = fifo;
55
- this.id = canonicalId(name);
56
- this.connectionKey = provideKey(this.id, "publisherConnectionString");
57
- }
58
- /**
59
- * What this queue is in the manifest.
60
- *
61
- * A queue is a resource, not a handler: the worker is reached *through* it,
62
- * so the declaration carries the producer's key and nothing about the code
63
- * that drains it. The local target reads this to know which broker has to be
64
- * running and what connection string to inject.
65
- */
66
- declare() {
67
- return [{
68
- kind: "queue",
69
- id: this.id,
70
- provides: [this.connectionKey],
71
- ...this.fifo ? { fifo: true } : {},
72
- worker: {
73
- id: `${this.id}Worker`,
74
- handler: `${this.id}.handler`,
75
- dependencies: []
76
- }
77
- }];
78
- }
79
- /**
80
- * The producer side — a `Service` exposing an `EventPublisher` typed to this
81
- * queue's message. Inject it via `.services([queue.publisher])`; the handler
82
- * then calls `services.<name>Publisher.publish([{ type, payload }])`.
83
- *
84
- * It reads `<NAME>_PUBLISHER_CONNECTION_STRING` and builds the transport from
85
- * the URL protocol — `pgboss://` locally, `sqs://` deployed — so the same
86
- * code publishes to Postgres in dev and SQS in prod. Because it's a `Service`,
87
- * `Construct.getEnvironment()` sniffs it, so the env requirement flows into
88
- * the manifest and infra links exactly this queue with least privilege.
89
- */
90
- /**
91
- * The queue as a dependency — what `.dependsOn([emailsQueue])` dissolves
92
- * into, reachable as `services.emails`.
93
- *
94
- * It is the producer: a consumer is the worker written right here, so the
95
- * only thing another construct can want from a queue is the ability to send
96
- * to it. {@link publisher} is the same service under its older
97
- * `<name>Publisher` key, kept for `.services([queue.publisher])`.
98
- */
99
- get service() {
100
- const { register } = this.publisher;
101
- return {
102
- serviceName: serviceKey(this.id),
103
- register
104
- };
105
- }
106
- get publisher() {
107
- const envVar = this.connectionKey;
108
- return {
109
- serviceName: `${this.name}Publisher`,
110
- async register({ envParser }) {
111
- const { connectionString } = envParser.create((get) => ({ connectionString: get(envVar).string() })).parse();
112
- return Publisher.fromConnectionString(connectionString);
113
- }
114
- };
115
- }
116
- };
117
- //#endregion
118
- //#region src/queue/QueueBuilder.ts
119
- /**
120
- * Builds a {@link Queue} worker — `q.queue('orders').services([db]).message(schema).handle(fn)`.
121
- * Services are an array (sniffed for required env vars); `message` is the typed
122
- * job payload; `handle` is the single consumer. The queue name is captured as a
123
- * literal so `queue.publisher` is typed to `{ type: '<name>', payload }`.
124
- */
125
- var QueueBuilder = class {
126
- _name;
127
- _messageSchema;
128
- _timeout = 3e4;
129
- _batchSize;
130
- _fifo;
131
- _services = [];
132
- /** The construct ids `.dependsOn()` named — what the manifest records. */
133
- _constructs = [];
134
- _logger = DEFAULT_LOGGER;
135
- /** The queue name — drives the infra queue and its `<NAME>_*` env vars. */
136
- queue(name) {
137
- return cloneWith(this, { _name: name });
138
- }
139
- timeout(timeout) {
140
- return cloneWith(this, { _timeout: timeout });
141
- }
142
- /** SQS event-source batch size (deployed). */
143
- batchSize(batchSize) {
144
- return cloneWith(this, { _batchSize: batchSize });
145
- }
146
- /** Mark the queue as FIFO (deployed). */
147
- fifo(fifo = true) {
148
- return cloneWith(this, { _fifo: fifo });
149
- }
150
- /**
151
- * Depend on constructs — a database, a bucket, a mail sender, a queue, a
152
- * topic.
153
- *
154
- * It records the edge and dissolves each construct's client into the
155
- * handler's service record under the construct's own id, so
156
- * `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
157
- *
158
- * Constructs only. A `Service` does not match the shape, which is what keeps
159
- * env sniffing confined to `.services()` and the explicit lift.
160
- */
161
- dependsOn(constructs) {
162
- const services = servicesOf(constructs);
163
- return cloneWith(this, {
164
- _services: [...this._services, ...services],
165
- _constructs: idsOf(constructs, this._constructs)
166
- });
167
- }
168
- services(services) {
169
- return cloneWith(this, { _services: [...this._services, ...services] });
170
- }
171
- logger(logger) {
172
- return cloneWith(this, { _logger: logger });
173
- }
174
- /** The typed message (job) payload the queue carries. */
175
- message(schema) {
176
- return cloneWith(this, { _messageSchema: schema });
177
- }
178
- handle(fn) {
179
- if (!this._name) throw new Error("Queue requires a name — call .queue(name) before .handle().");
180
- if (!this._messageSchema) throw new Error("Queue requires a message schema — call .message(schema) before .handle().");
181
- return new Queue(this._name, fn, this._messageSchema, this._timeout, this._services, this._logger, this._batchSize, this._fifo, this._constructs);
182
- }
183
- };
184
- //#endregion
185
- //#region src/queue/index.ts
186
- const q = new QueueBuilder();
187
- //#endregion
188
- export { Queue, QueueBuilder, q };
189
-
190
- //# sourceMappingURL=index.mjs.map
1
+ import { t as Queue } from "../Queue-u8w8_HpE.mjs";
2
+ import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-2wP5lEC8.mjs";
3
+ export { Queue, QueueNeedsMessage, QueueNeedsName };
@@ -0,0 +1,86 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _geekmidas_manifest = require("@geekmidas/manifest");
3
+ //#region src/random-password.ts
4
+ /**
5
+ * `RandomPassword` — a password the platform generates, once per stage.
6
+ *
7
+ * ```ts
8
+ * export const adminPassword = new RandomPassword('AdminPassword');
9
+ *
10
+ * // an endpoint that `.dependsOn([adminPassword])`
11
+ * services.adminPassword // 'k3J…' — a string, no await
12
+ * ```
13
+ *
14
+ * The app's own `secret`: the kind an auth server's signing key already is,
15
+ * with nothing else attached. Nobody issues it and nobody sets it, which is
16
+ * the line between it and a `Credential`:
17
+ *
18
+ * - **A deployed stage** generates it on the first deploy that needs it and
19
+ * keeps it — a server stage in its secrets store, an AWS stage in its
20
+ * state — so every later deploy reads the same value back. One set by hand
21
+ * (`gkm secrets:set`, `sst secret set`) is kept, never replaced.
22
+ * - **`gkm dev` and `gkm test`** derive it from the project, the stage and the
23
+ * id, so nothing has to be set and it is the same on every run.
24
+ *
25
+ * Its key is its name, as a secret's is: `AdminPassword` is `ADMIN_PASSWORD`.
26
+ *
27
+ * 43 letters, digits, `-` and `_` unless told otherwise — for a system with
28
+ * rules of its own:
29
+ *
30
+ * ```ts
31
+ * new RandomPassword('RouterPassword', { length: 24, symbols: '!@#$%' });
32
+ * ```
33
+ *
34
+ * The format is read when the password is generated, so changing it later
35
+ * leaves a deployed stage's existing password as it is.
36
+ */
37
+ var RandomPassword = class {
38
+ format;
39
+ id;
40
+ service;
41
+ /**
42
+ * Declared once and read by both `declare()` and `connect()`, so the key the
43
+ * target publishes and the key the client reads cannot drift.
44
+ */
45
+ key;
46
+ constructor(id, format = {}) {
47
+ this.format = format;
48
+ const canonical = (0, _geekmidas_manifest.canonicalId)(id);
49
+ const { length } = format;
50
+ if (length !== void 0 && !(Number.isInteger(length) && length > 0)) throw new InvalidPasswordLength(canonical, length);
51
+ this.id = canonical;
52
+ this.key = (0, _geekmidas_manifest.environmentCase)(canonical);
53
+ this.service = {
54
+ serviceName: (0, _geekmidas_manifest.serviceKey)(canonical),
55
+ register: (options) => this.connect(options)
56
+ };
57
+ }
58
+ declare() {
59
+ return [{
60
+ kind: "secret",
61
+ id: this.id,
62
+ provides: [this.key],
63
+ ...this.format.length !== void 0 ? { length: this.format.length } : {},
64
+ ...this.format.symbols !== void 0 ? { symbols: this.format.symbols } : {}
65
+ }];
66
+ }
67
+ connect(options) {
68
+ return options.envParser.create((get) => ({ password: get(this.key).string() })).parse().password;
69
+ }
70
+ };
71
+ /** A `RandomPassword` given a length no password can have. */
72
+ var InvalidPasswordLength = class extends Error {
73
+ id;
74
+ length;
75
+ constructor(id, length) {
76
+ super(`${id} asks for a password ${length} characters long. Give it a whole number of characters, at least 1 — or leave length out for 43.`);
77
+ this.id = id;
78
+ this.length = length;
79
+ this.name = "InvalidPasswordLength";
80
+ }
81
+ };
82
+ //#endregion
83
+ exports.InvalidPasswordLength = InvalidPasswordLength;
84
+ exports.RandomPassword = RandomPassword;
85
+
86
+ //# sourceMappingURL=random-password.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random-password.cjs","names":["canonicalId","environmentCase","serviceKey"],"sources":["../src/random-password.ts"],"sourcesContent":["/**\n * `RandomPassword` — a password the platform generates, once per stage.\n *\n * ```ts\n * export const adminPassword = new RandomPassword('AdminPassword');\n *\n * // an endpoint that `.dependsOn([adminPassword])`\n * services.adminPassword // 'k3J…' — a string, no await\n * ```\n *\n * The app's own `secret`: the kind an auth server's signing key already is,\n * with nothing else attached. Nobody issues it and nobody sets it, which is\n * the line between it and a `Credential`:\n *\n * - **A deployed stage** generates it on the first deploy that needs it and\n * keeps it — a server stage in its secrets store, an AWS stage in its\n * state — so every later deploy reads the same value back. One set by hand\n * (`gkm secrets:set`, `sst secret set`) is kept, never replaced.\n * - **`gkm dev` and `gkm test`** derive it from the project, the stage and the\n * id, so nothing has to be set and it is the same on every run.\n *\n * Its key is its name, as a secret's is: `AdminPassword` is `ADMIN_PASSWORD`.\n *\n * 43 letters, digits, `-` and `_` unless told otherwise — for a system with\n * rules of its own:\n *\n * ```ts\n * new RandomPassword('RouterPassword', { length: 24, symbols: '!@#$%' });\n * ```\n *\n * The format is read when the password is generated, so changing it later\n * leaves a deployed stage's existing password as it is.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\tenvironmentCase,\n\ttype SecretFormat,\n\tserviceKey,\n} from '@geekmidas/manifest';\nimport type { Service, ServiceRegisterOptions } from '@geekmidas/services';\nimport type { Construct } from './construct-interface';\n\nexport class RandomPassword<TName extends string = string>\n\timplements Construct<TName, string>\n{\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, string>;\n\n\t/**\n\t * Declared once and read by both `declare()` and `connect()`, so the key the\n\t * target publishes and the key the client reads cannot drift.\n\t */\n\tprivate readonly key: string;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly format: RandomPasswordOptions = {},\n\t) {\n\t\tconst canonical = canonicalId(id as string);\n\t\tconst { length } = format;\n\n\t\tif (length !== undefined && !(Number.isInteger(length) && length > 0)) {\n\t\t\tthrow new InvalidPasswordLength(canonical, length);\n\t\t}\n\n\t\tthis.id = canonical as TName;\n\t\tthis.key = environmentCase(canonical);\n\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(canonical) as Uncapitalize<TName>,\n\t\t\tregister: (options) => this.connect(options),\n\t\t};\n\t}\n\n\tdeclare(): Declaration[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'secret',\n\t\t\t\tid: this.id,\n\t\t\t\tprovides: [this.key],\n\t\t\t\t...(this.format.length !== undefined\n\t\t\t\t\t? { length: this.format.length }\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.format.symbols !== undefined\n\t\t\t\t\t? { symbols: this.format.symbols }\n\t\t\t\t\t: {}),\n\t\t\t},\n\t\t];\n\t}\n\n\tprivate connect(options: ServiceRegisterOptions): string {\n\t\treturn options.envParser\n\t\t\t.create((get) => ({ password: get(this.key).string() }))\n\t\t\t.parse().password;\n\t}\n}\n\n/**\n * What a password is drawn as. Letters and digits always; `symbols` beside\n * them, one of which is always present.\n */\nexport type RandomPasswordOptions = SecretFormat;\n\n/** A `RandomPassword` given a length no password can have. */\nexport class InvalidPasswordLength extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly length: number,\n\t) {\n\t\tsuper(\n\t\t\t`${id} asks for a password ${length} characters long. ` +\n\t\t\t\t'Give it a whole number of characters, at least 1 — or leave length out for 43.',\n\t\t);\n\t\tthis.name = 'InvalidPasswordLength';\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,IAAa,iBAAb,MAEA;CAYmB;CAXlB;CACA;;;;;CAMA;CAEA,YACC,IACA,SAAiD,CAAC,GACjD;EADgB,KAAA,SAAA;EAEjB,MAAM,aAAA,GAAYA,oBAAAA,YAAAA,CAAY,EAAY;EAC1C,MAAM,EAAE,WAAW;EAEnB,IAAI,WAAW,KAAA,KAAa,EAAE,OAAO,UAAU,MAAM,KAAK,SAAS,IAClE,MAAM,IAAI,sBAAsB,WAAW,MAAM;EAGlD,KAAK,KAAK;EACV,KAAK,OAAA,GAAMC,oBAAAA,gBAAAA,CAAgB,SAAS;EAGpC,KAAK,UAAU;GACd,cAAA,GAAaC,oBAAAA,WAAAA,CAAW,SAAS;GACjC,WAAW,YAAY,KAAK,QAAQ,OAAO;EAC5C;CACD;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,UAAU,CAAC,KAAK,GAAG;GACnB,GAAI,KAAK,OAAO,WAAW,KAAA,IACxB,EAAE,QAAQ,KAAK,OAAO,OAAO,IAC7B,CAAC;GACJ,GAAI,KAAK,OAAO,YAAY,KAAA,IACzB,EAAE,SAAS,KAAK,OAAO,QAAQ,IAC/B,CAAC;EACL,CACD;CACD;CAEA,QAAgB,SAAyC;EACxD,OAAO,QAAQ,UACb,QAAQ,SAAS,EAAE,UAAU,IAAI,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACvD,MAAM,CAAC,CAAC;CACX;AACD;;AASA,IAAa,wBAAb,cAA2C,MAAM;CAEtC;CACA;CAFV,YACC,IACA,QACC;EACD,MACC,GAAG,GAAG,uBAAuB,OAAO,iGAErC;EANS,KAAA,KAAA;EACA,KAAA,SAAA;EAMT,KAAK,OAAO;CACb;AACD"}
@@ -0,0 +1,30 @@
1
+ import { n as Construct } from "./construct-interface-DugP0E5q.cjs";
2
+ import { Service } from "@geekmidas/services";
3
+ import { ConstructName, Declaration, SecretFormat } from "@geekmidas/manifest";
4
+ //#region src/random-password.d.ts
5
+ export declare class RandomPassword<TName extends string = string> implements Construct<TName, string> {
6
+ private readonly format;
7
+ readonly id: TName;
8
+ readonly service: Service<Uncapitalize<TName>, string>;
9
+ /**
10
+ * Declared once and read by both `declare()` and `connect()`, so the key the
11
+ * target publishes and the key the client reads cannot drift.
12
+ */
13
+ private readonly key;
14
+ constructor(id: ConstructName<TName>, format?: RandomPasswordOptions);
15
+ declare(): Declaration[];
16
+ private connect;
17
+ }
18
+ /**
19
+ * What a password is drawn as. Letters and digits always; `symbols` beside
20
+ * them, one of which is always present.
21
+ */
22
+ export type RandomPasswordOptions = SecretFormat;
23
+ /** A `RandomPassword` given a length no password can have. */
24
+ export declare class InvalidPasswordLength extends Error {
25
+ readonly id: string;
26
+ readonly length: number;
27
+ constructor(id: string, length: number);
28
+ }
29
+ //#endregion
30
+ //# sourceMappingURL=random-password.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random-password.d.cts","names":[],"sources":["../src/random-password.ts"],"mappings":";;;;qBA6Ca,eAAe,0CAChB,UAAU;mBAaH;WAXT,IAAI;WACJ,SAAS,QAAQ,aAAa;;;;;mBAMtB;EAEjB,YACC,IAAI,cAAc,QACD,SAAQ;EAmB1B,WAAW;UAgBH;;;;;;YAWG,wBAAwB;;qBAGvB,8BAA8B;WAEhC;WACA;EAFV,YACU,YACA"}
@@ -0,0 +1,30 @@
1
+ import { n as Construct } from "./construct-interface-CSA9VeWM.mjs";
2
+ import { ConstructName, Declaration, SecretFormat } from "@geekmidas/manifest";
3
+ import { Service } from "@geekmidas/services";
4
+ //#region src/random-password.d.ts
5
+ export declare class RandomPassword<TName extends string = string> implements Construct<TName, string> {
6
+ private readonly format;
7
+ readonly id: TName;
8
+ readonly service: Service<Uncapitalize<TName>, string>;
9
+ /**
10
+ * Declared once and read by both `declare()` and `connect()`, so the key the
11
+ * target publishes and the key the client reads cannot drift.
12
+ */
13
+ private readonly key;
14
+ constructor(id: ConstructName<TName>, format?: RandomPasswordOptions);
15
+ declare(): Declaration[];
16
+ private connect;
17
+ }
18
+ /**
19
+ * What a password is drawn as. Letters and digits always; `symbols` beside
20
+ * them, one of which is always present.
21
+ */
22
+ export type RandomPasswordOptions = SecretFormat;
23
+ /** A `RandomPassword` given a length no password can have. */
24
+ export declare class InvalidPasswordLength extends Error {
25
+ readonly id: string;
26
+ readonly length: number;
27
+ constructor(id: string, length: number);
28
+ }
29
+ //#endregion
30
+ //# sourceMappingURL=random-password.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random-password.d.mts","names":[],"sources":["../src/random-password.ts"],"mappings":";;;;qBA6Ca,eAAe,0CAChB,UAAU;mBAaH;WAXT,IAAI;WACJ,SAAS,QAAQ,aAAa;;;;;mBAMtB;EAEjB,YACC,IAAI,cAAc,QACD,SAAQ;EAmB1B,WAAW;UAgBH;;;;;;YAWG,wBAAwB;;qBAGvB,8BAA8B;WAEhC;WACA;EAFV,YACU,YACA"}