@geekmidas/constructs 10.0.0-alpha.6 → 10.0.0-alpha.61

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 (405) hide show
  1. package/README.md +223 -158
  2. package/dist/{Construct-BD5neF7w.mjs → Construct-BO1X-kt9.mjs} +32 -33
  3. package/dist/Construct-BO1X-kt9.mjs.map +1 -0
  4. package/dist/Construct-BQALFCh2.d.cts +230 -0
  5. package/dist/Construct-BQALFCh2.d.cts.map +1 -0
  6. package/dist/{Construct-CyS3RpTL.cjs → Construct-DmvXceVY.cjs} +52 -47
  7. package/dist/Construct-DmvXceVY.cjs.map +1 -0
  8. package/dist/Construct-QXnl3VqT.d.mts +230 -0
  9. package/dist/Construct-QXnl3VqT.d.mts.map +1 -0
  10. package/dist/{Cron-DmQ8vQ4b.d.cts → Cron-DI3nKoic.d.cts} +15 -9
  11. package/dist/Cron-DI3nKoic.d.cts.map +1 -0
  12. package/dist/{Cron-dh4rUgib.d.mts → Cron-uYAHPnp7.d.mts} +15 -9
  13. package/dist/Cron-uYAHPnp7.d.mts.map +1 -0
  14. package/dist/{CronBuilder-Da0C0edR.cjs → CronBuilder-BoHzlWU_.cjs} +47 -31
  15. package/dist/CronBuilder-BoHzlWU_.cjs.map +1 -0
  16. package/dist/{CronBuilder-CYKT5RiO.mjs → CronBuilder-CCgt0wCE.mjs} +37 -21
  17. package/dist/CronBuilder-CCgt0wCE.mjs.map +1 -0
  18. package/dist/CronBuilder-DaSUm2Na.d.mts +47 -0
  19. package/dist/CronBuilder-DaSUm2Na.d.mts.map +1 -0
  20. package/dist/CronBuilder-g1lZLWyG.d.cts +47 -0
  21. package/dist/CronBuilder-g1lZLWyG.d.cts.map +1 -0
  22. package/dist/{Endpoint-BjWKinFA.d.mts → Endpoint-BJDBZBZu.d.mts} +75 -91
  23. package/dist/Endpoint-BJDBZBZu.d.mts.map +1 -0
  24. package/dist/{Endpoint-DCQPMdUX.mjs → Endpoint-CMWWrQ7u.mjs} +140 -109
  25. package/dist/Endpoint-CMWWrQ7u.mjs.map +1 -0
  26. package/dist/{Endpoint-dav89W6-.d.cts → Endpoint-DV3jK5sP.d.cts} +74 -90
  27. package/dist/Endpoint-DV3jK5sP.d.cts.map +1 -0
  28. package/dist/{Endpoint-DcWXE-SZ.cjs → Endpoint-DfiXTm_v.cjs} +168 -131
  29. package/dist/Endpoint-DfiXTm_v.cjs.map +1 -0
  30. package/dist/{EndpointFactory-CjV8F_lJ.mjs → EndpointFactory-7g4Dg6cW.mjs} +41 -75
  31. package/dist/EndpointFactory-7g4Dg6cW.mjs.map +1 -0
  32. package/dist/{EndpointFactory-CdWB7wPw.cjs → EndpointFactory-CLxrcS0O.cjs} +77 -111
  33. package/dist/EndpointFactory-CLxrcS0O.cjs.map +1 -0
  34. package/dist/{index-Bd5FqCoe.d.cts → EndpointFactory-CLzCLkLt.d.cts} +64 -133
  35. package/dist/EndpointFactory-CLzCLkLt.d.cts.map +1 -0
  36. package/dist/{index-lAO9egTb.d.mts → EndpointFactory-gaF4yRpP.d.mts} +65 -134
  37. package/dist/EndpointFactory-gaF4yRpP.d.mts.map +1 -0
  38. package/dist/Function-DuqGcbOI.d.mts +76 -0
  39. package/dist/Function-DuqGcbOI.d.mts.map +1 -0
  40. package/dist/Function-Pu-1kKZz.d.cts +76 -0
  41. package/dist/Function-Pu-1kKZz.d.cts.map +1 -0
  42. package/dist/{HonoEndpointAdaptor-DtL9j19R.cjs → HonoEndpointAdaptor-B22boEAR.cjs} +52 -54
  43. package/dist/HonoEndpointAdaptor-B22boEAR.cjs.map +1 -0
  44. package/dist/{HonoEndpointAdaptor-P1ahhZHu.mjs → HonoEndpointAdaptor-vY4JKG8i.mjs} +42 -47
  45. package/dist/HonoEndpointAdaptor-vY4JKG8i.mjs.map +1 -0
  46. package/dist/Queue-D5jcw0mu.cjs +109 -0
  47. package/dist/Queue-D5jcw0mu.cjs.map +1 -0
  48. package/dist/{Queue-D7ZuwBhy.d.cts → Queue-DlsHRzUp.d.mts} +48 -48
  49. package/dist/Queue-DlsHRzUp.d.mts.map +1 -0
  50. package/dist/{Queue-gVGfi2Yk.d.mts → Queue-HPyi0e1i.d.cts} +49 -49
  51. package/dist/Queue-HPyi0e1i.d.cts.map +1 -0
  52. package/dist/Queue-hwPN-t31.mjs +104 -0
  53. package/dist/Queue-hwPN-t31.mjs.map +1 -0
  54. package/dist/QueueBuilder-BFQn3OzZ.cjs +135 -0
  55. package/dist/QueueBuilder-BFQn3OzZ.cjs.map +1 -0
  56. package/dist/QueueBuilder-DCuYdjMw.mjs +118 -0
  57. package/dist/QueueBuilder-DCuYdjMw.mjs.map +1 -0
  58. package/dist/QueueBuilder-OSi6LkV9.d.cts +75 -0
  59. package/dist/QueueBuilder-OSi6LkV9.d.cts.map +1 -0
  60. package/dist/QueueBuilder-QHsnVt1P.d.mts +75 -0
  61. package/dist/QueueBuilder-QHsnVt1P.d.mts.map +1 -0
  62. package/dist/{Subscriber-2mEi0ImH.d.cts → Subscriber-Bpp02cGr.d.cts} +29 -20
  63. package/dist/Subscriber-Bpp02cGr.d.cts.map +1 -0
  64. package/dist/{Subscriber-xTJ9ayPN.d.mts → Subscriber-CtN9R48-.d.mts} +29 -20
  65. package/dist/Subscriber-CtN9R48-.d.mts.map +1 -0
  66. package/dist/{SubscriberBuilder-4OPehf2R.cjs → SubscriberBuilder-C2PwqwIl.cjs} +61 -36
  67. package/dist/SubscriberBuilder-C2PwqwIl.cjs.map +1 -0
  68. package/dist/SubscriberBuilder-CuCMFpYW.d.mts +67 -0
  69. package/dist/SubscriberBuilder-CuCMFpYW.d.mts.map +1 -0
  70. package/dist/{SubscriberBuilder-BjkbeT9l.mjs → SubscriberBuilder-DMFk_Ap1.mjs} +50 -24
  71. package/dist/SubscriberBuilder-DMFk_Ap1.mjs.map +1 -0
  72. package/dist/SubscriberBuilder-g3fAVWgs.d.cts +67 -0
  73. package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +1 -0
  74. package/dist/Topic-CkxOTrMv.cjs +104 -0
  75. package/dist/Topic-CkxOTrMv.cjs.map +1 -0
  76. package/dist/Topic-hPffOsot.mjs +99 -0
  77. package/dist/Topic-hPffOsot.mjs.map +1 -0
  78. package/dist/adaptors/aws.cjs +118 -216
  79. package/dist/adaptors/aws.cjs.map +1 -1
  80. package/dist/adaptors/aws.d.cts +34 -53
  81. package/dist/adaptors/aws.d.cts.map +1 -1
  82. package/dist/adaptors/aws.d.mts +35 -54
  83. package/dist/adaptors/aws.d.mts.map +1 -1
  84. package/dist/adaptors/aws.mjs +91 -191
  85. package/dist/adaptors/aws.mjs.map +1 -1
  86. package/dist/adaptors/hono.cjs +3 -10
  87. package/dist/adaptors/hono.d.cts +7 -16
  88. package/dist/adaptors/hono.d.cts.map +1 -1
  89. package/dist/adaptors/hono.d.mts +8 -17
  90. package/dist/adaptors/hono.d.mts.map +1 -1
  91. package/dist/adaptors/hono.mjs +2 -10
  92. package/dist/adaptors/testing.cjs +711 -89
  93. package/dist/adaptors/testing.cjs.map +1 -1
  94. package/dist/adaptors/testing.d.cts +325 -54
  95. package/dist/adaptors/testing.d.cts.map +1 -1
  96. package/dist/adaptors/testing.d.mts +325 -54
  97. package/dist/adaptors/testing.d.mts.map +1 -1
  98. package/dist/adaptors/testing.mjs +676 -70
  99. package/dist/adaptors/testing.mjs.map +1 -1
  100. package/dist/auth-CIFXNuDk.d.cts +194 -0
  101. package/dist/auth-CIFXNuDk.d.cts.map +1 -0
  102. package/dist/auth-CJ9Ff6Lu.d.mts +194 -0
  103. package/dist/auth-CJ9Ff6Lu.d.mts.map +1 -0
  104. package/dist/auth.cjs +172 -31
  105. package/dist/auth.cjs.map +1 -1
  106. package/dist/auth.d.cts +2 -108
  107. package/dist/auth.d.mts +2 -108
  108. package/dist/auth.mjs +161 -24
  109. package/dist/auth.mjs.map +1 -1
  110. package/dist/{cache-BrRz3fEB.d.mts → cache-CXh6GIgb.d.mts} +3 -6
  111. package/dist/cache-CXh6GIgb.d.mts.map +1 -0
  112. package/dist/{cache-BtZY_tHe.d.cts → cache-DnGDGly3.d.cts} +3 -6
  113. package/dist/cache-DnGDGly3.d.cts.map +1 -0
  114. package/dist/cache.cjs +68 -2
  115. package/dist/cache.cjs.map +1 -0
  116. package/dist/cache.d.cts +1 -2
  117. package/dist/cache.d.mts +1 -2
  118. package/dist/cache.mjs +67 -2
  119. package/dist/cache.mjs.map +1 -0
  120. package/dist/cipher-C1lEFX63.mjs +225 -0
  121. package/dist/cipher-C1lEFX63.mjs.map +1 -0
  122. package/dist/cipher-CVxfwLjk.cjs +332 -0
  123. package/dist/cipher-CVxfwLjk.cjs.map +1 -0
  124. package/dist/{clone-DblgEZZa.mjs → clone-EKNovYHu.mjs} +3 -3
  125. package/dist/clone-EKNovYHu.mjs.map +1 -0
  126. package/dist/{clone-Dy0cR2SZ.cjs → clone-UGJpvQnL.cjs} +7 -8
  127. package/dist/clone-UGJpvQnL.cjs.map +1 -0
  128. package/dist/{construct-interface-D9d4Gm4p.d.cts → construct-interface-B1AfqRl4.d.cts} +42 -11
  129. package/dist/construct-interface-B1AfqRl4.d.cts.map +1 -0
  130. package/dist/{construct-interface-g5GM5pwR.d.mts → construct-interface-DluK3_da.d.mts} +42 -11
  131. package/dist/construct-interface-DluK3_da.d.mts.map +1 -0
  132. package/dist/construct-interface.cjs +113 -7
  133. package/dist/construct-interface.cjs.map +1 -0
  134. package/dist/construct-interface.d.cts +2 -2
  135. package/dist/construct-interface.d.mts +2 -2
  136. package/dist/construct-interface.mjs +106 -2
  137. package/dist/construct-interface.mjs.map +1 -0
  138. package/dist/credential.cjs +63 -16
  139. package/dist/credential.cjs.map +1 -1
  140. package/dist/credential.d.cts +16 -9
  141. package/dist/credential.d.cts.map +1 -1
  142. package/dist/credential.d.mts +16 -9
  143. package/dist/credential.d.mts.map +1 -1
  144. package/dist/credential.mjs +58 -12
  145. package/dist/credential.mjs.map +1 -1
  146. package/dist/crons/index.cjs +105 -7
  147. package/dist/crons/index.cjs.map +1 -1
  148. package/dist/crons/index.d.cts +40 -11
  149. package/dist/crons/index.d.cts.map +1 -1
  150. package/dist/crons/index.d.mts +40 -11
  151. package/dist/crons/index.d.mts.map +1 -1
  152. package/dist/crons/index.mjs +103 -8
  153. package/dist/crons/index.mjs.map +1 -1
  154. package/dist/database/kysely.cjs +4 -181
  155. package/dist/database/kysely.d.cts +2 -152
  156. package/dist/database/kysely.d.mts +2 -152
  157. package/dist/database/kysely.mjs +2 -180
  158. package/dist/email.cjs +25 -12
  159. package/dist/email.cjs.map +1 -1
  160. package/dist/email.d.cts +3 -7
  161. package/dist/email.d.cts.map +1 -1
  162. package/dist/email.d.mts +3 -7
  163. package/dist/email.d.mts.map +1 -1
  164. package/dist/email.mjs +16 -3
  165. package/dist/email.mjs.map +1 -1
  166. package/dist/encryption.cjs +96 -0
  167. package/dist/encryption.cjs.map +1 -0
  168. package/dist/encryption.d.cts +117 -0
  169. package/dist/encryption.d.cts.map +1 -0
  170. package/dist/encryption.d.mts +117 -0
  171. package/dist/encryption.d.mts.map +1 -0
  172. package/dist/encryption.mjs +83 -0
  173. package/dist/encryption.mjs.map +1 -0
  174. package/dist/endpoints/index.cjs +8 -10
  175. package/dist/endpoints/index.d.cts +51 -7
  176. package/dist/endpoints/index.d.cts.map +1 -0
  177. package/dist/endpoints/index.d.mts +51 -7
  178. package/dist/endpoints/index.d.mts.map +1 -0
  179. package/dist/endpoints/index.mjs +6 -10
  180. package/dist/external-api-CWY9orcO.d.mts +86 -0
  181. package/dist/external-api-CWY9orcO.d.mts.map +1 -0
  182. package/dist/external-api-D-5WB-sr.d.cts +86 -0
  183. package/dist/external-api-D-5WB-sr.d.cts.map +1 -0
  184. package/dist/external-api.cjs +124 -0
  185. package/dist/external-api.cjs.map +1 -0
  186. package/dist/external-api.d.cts +2 -0
  187. package/dist/external-api.d.mts +2 -0
  188. package/dist/external-api.mjs +121 -0
  189. package/dist/external-api.mjs.map +1 -0
  190. package/dist/file-server.cjs +42 -10
  191. package/dist/file-server.cjs.map +1 -1
  192. package/dist/file-server.d.cts +6 -10
  193. package/dist/file-server.d.cts.map +1 -1
  194. package/dist/file-server.d.mts +6 -10
  195. package/dist/file-server.d.mts.map +1 -1
  196. package/dist/file-server.mjs +34 -2
  197. package/dist/file-server.mjs.map +1 -1
  198. package/dist/functions/index.cjs +3 -6
  199. package/dist/functions/index.d.cts +3 -4
  200. package/dist/functions/index.d.mts +3 -4
  201. package/dist/functions/index.mjs +2 -6
  202. package/dist/{functions-i_la-N5r.cjs → functions-CbP5ZKma.cjs} +414 -264
  203. package/dist/functions-CbP5ZKma.cjs.map +1 -0
  204. package/dist/{functions-14lpEFL4.mjs → functions-Di6n5ltG.mjs} +376 -238
  205. package/dist/{functions-14lpEFL4.mjs.map → functions-Di6n5ltG.mjs.map} +1 -1
  206. package/dist/index-BuzRvKOQ.d.cts +115 -0
  207. package/dist/index-BuzRvKOQ.d.cts.map +1 -0
  208. package/dist/index-CTkKOer4.d.mts +115 -0
  209. package/dist/index-CTkKOer4.d.mts.map +1 -0
  210. package/dist/index-CeEtxDmK.d.cts +79 -0
  211. package/dist/index-CeEtxDmK.d.cts.map +1 -0
  212. package/dist/index-CeEtxDmK.d.mts +79 -0
  213. package/dist/index-CeEtxDmK.d.mts.map +1 -0
  214. package/dist/index.cjs +6 -3
  215. package/dist/index.d.cts +26 -4
  216. package/dist/index.d.cts.map +1 -0
  217. package/dist/index.d.mts +26 -4
  218. package/dist/index.d.mts.map +1 -0
  219. package/dist/index.mjs +3 -3
  220. package/dist/kms-B-Hm3d5r.cjs +85 -0
  221. package/dist/kms-B-Hm3d5r.cjs.map +1 -0
  222. package/dist/kms-BdUlMJEZ.mjs +85 -0
  223. package/dist/kms-BdUlMJEZ.mjs.map +1 -0
  224. package/dist/kysely-BEm5sDlU.d.cts +173 -0
  225. package/dist/kysely-BEm5sDlU.d.cts.map +1 -0
  226. package/dist/kysely-BRzzawr2.cjs +301 -0
  227. package/dist/kysely-BRzzawr2.cjs.map +1 -0
  228. package/dist/kysely-BYfM6Zby.mjs +288 -0
  229. package/dist/kysely-BYfM6Zby.mjs.map +1 -0
  230. package/dist/kysely-CjuvdXEV.d.mts +173 -0
  231. package/dist/kysely-CjuvdXEV.d.mts.map +1 -0
  232. package/dist/{lazyAccessors-BoJN3SMd.mjs → lazyAccessors-CFanua0O.mjs} +20 -60
  233. package/dist/lazyAccessors-CFanua0O.mjs.map +1 -0
  234. package/dist/{lazyAccessors-e3j2oE2m.cjs → lazyAccessors-hJKGv8Ay.cjs} +60 -113
  235. package/dist/lazyAccessors-hJKGv8Ay.cjs.map +1 -0
  236. package/dist/mobile-app.cjs +73 -0
  237. package/dist/mobile-app.cjs.map +1 -0
  238. package/dist/mobile-app.d.cts +61 -0
  239. package/dist/mobile-app.d.cts.map +1 -0
  240. package/dist/mobile-app.d.mts +61 -0
  241. package/dist/mobile-app.d.mts.map +1 -0
  242. package/dist/mobile-app.mjs +72 -0
  243. package/dist/mobile-app.mjs.map +1 -0
  244. package/dist/object-storage.cjs +18 -10
  245. package/dist/object-storage.cjs.map +1 -1
  246. package/dist/object-storage.d.cts +3 -7
  247. package/dist/object-storage.d.cts.map +1 -1
  248. package/dist/object-storage.d.mts +3 -7
  249. package/dist/object-storage.d.mts.map +1 -1
  250. package/dist/object-storage.mjs +11 -3
  251. package/dist/object-storage.mjs.map +1 -1
  252. package/dist/{processAudits-Dmts9H_b.mjs → processAudits-BpRlPQMW.mjs} +16 -19
  253. package/dist/processAudits-BpRlPQMW.mjs.map +1 -0
  254. package/dist/{processAudits-CGqttuXm.cjs → processAudits-D_2W5x8k.cjs} +26 -30
  255. package/dist/processAudits-D_2W5x8k.cjs.map +1 -0
  256. package/dist/queue/index.cjs +6 -189
  257. package/dist/queue/index.d.cts +3 -60
  258. package/dist/queue/index.d.mts +3 -60
  259. package/dist/queue/index.mjs +3 -186
  260. package/dist/rest-api.cjs +88 -63
  261. package/dist/rest-api.cjs.map +1 -1
  262. package/dist/rest-api.d.cts +68 -61
  263. package/dist/rest-api.d.cts.map +1 -1
  264. package/dist/rest-api.d.mts +68 -61
  265. package/dist/rest-api.d.mts.map +1 -1
  266. package/dist/rest-api.mjs +80 -55
  267. package/dist/rest-api.mjs.map +1 -1
  268. package/dist/{chunk-DWy1uDak.cjs → rolldown-runtime-y5ARvAq5.cjs} +14 -18
  269. package/dist/runSubscriber-BRp9a_qi.cjs +126 -0
  270. package/dist/runSubscriber-BRp9a_qi.cjs.map +1 -0
  271. package/dist/runSubscriber-BYEY_bfA.mjs +109 -0
  272. package/dist/runSubscriber-BYEY_bfA.mjs.map +1 -0
  273. package/dist/shutdown-BMJmAhSt.cjs +38 -0
  274. package/dist/shutdown-BMJmAhSt.cjs.map +1 -0
  275. package/dist/shutdown-C7xa8x9S.mjs +27 -0
  276. package/dist/shutdown-C7xa8x9S.mjs.map +1 -0
  277. package/dist/site.cjs +34 -9
  278. package/dist/site.cjs.map +1 -1
  279. package/dist/site.d.cts +17 -22
  280. package/dist/site.d.cts.map +1 -1
  281. package/dist/site.d.mts +17 -22
  282. package/dist/site.d.mts.map +1 -1
  283. package/dist/site.mjs +30 -5
  284. package/dist/site.mjs.map +1 -1
  285. package/dist/subscribers/index.cjs +111 -6
  286. package/dist/subscribers/index.cjs.map +1 -0
  287. package/dist/subscribers/index.d.cts +50 -6
  288. package/dist/subscribers/index.d.cts.map +1 -0
  289. package/dist/subscribers/index.d.mts +50 -6
  290. package/dist/subscribers/index.d.mts.map +1 -0
  291. package/dist/subscribers/index.mjs +108 -5
  292. package/dist/subscribers/index.mjs.map +1 -0
  293. package/dist/surfaceEnv-CNimK76p.cjs +56 -0
  294. package/dist/surfaceEnv-CNimK76p.cjs.map +1 -0
  295. package/dist/surfaceEnv-wMT5QzgZ.mjs +45 -0
  296. package/dist/surfaceEnv-wMT5QzgZ.mjs.map +1 -0
  297. package/dist/{telemetry-C3L0iS28.d.cts → telemetry-DGcFlVpB.d.cts} +2 -5
  298. package/dist/telemetry-DGcFlVpB.d.cts.map +1 -0
  299. package/dist/{telemetry-D7bVFLGi.d.mts → telemetry-DGcFlVpB.d.mts} +2 -5
  300. package/dist/telemetry-DGcFlVpB.d.mts.map +1 -0
  301. package/dist/topic/index.cjs +3 -137
  302. package/dist/topic/index.d.cts +2 -4
  303. package/dist/topic/index.d.mts +2 -4
  304. package/dist/topic/index.mjs +2 -134
  305. package/dist/{types-BlAkSuGI.d.cts → types-DMuSQeLL.d.cts} +3 -5
  306. package/dist/types-DMuSQeLL.d.cts.map +1 -0
  307. package/dist/{types-aKksMEWL.d.mts → types-DMuSQeLL.d.mts} +3 -5
  308. package/dist/types-DMuSQeLL.d.mts.map +1 -0
  309. package/dist/types.d.cts +1 -1
  310. package/dist/types.d.mts +1 -1
  311. package/dist/types.mjs +1 -0
  312. package/dist/worker.cjs +58 -34
  313. package/dist/worker.cjs.map +1 -1
  314. package/dist/worker.d.cts +63 -45
  315. package/dist/worker.d.cts.map +1 -1
  316. package/dist/worker.d.mts +63 -44
  317. package/dist/worker.d.mts.map +1 -1
  318. package/dist/worker.mjs +53 -29
  319. package/dist/worker.mjs.map +1 -1
  320. package/package.json +82 -41
  321. package/dist/Construct-BD5neF7w.mjs.map +0 -1
  322. package/dist/Construct-C0ijr2qp.d.cts +0 -117
  323. package/dist/Construct-C0ijr2qp.d.cts.map +0 -1
  324. package/dist/Construct-Ct8nalEi.d.mts +0 -117
  325. package/dist/Construct-Ct8nalEi.d.mts.map +0 -1
  326. package/dist/Construct-CyS3RpTL.cjs.map +0 -1
  327. package/dist/Cron-DmQ8vQ4b.d.cts.map +0 -1
  328. package/dist/Cron-dh4rUgib.d.mts.map +0 -1
  329. package/dist/CronBuilder-BquXDbDI.d.cts +0 -44
  330. package/dist/CronBuilder-BquXDbDI.d.cts.map +0 -1
  331. package/dist/CronBuilder-CGgY2080.d.mts +0 -44
  332. package/dist/CronBuilder-CGgY2080.d.mts.map +0 -1
  333. package/dist/CronBuilder-CYKT5RiO.mjs.map +0 -1
  334. package/dist/CronBuilder-Da0C0edR.cjs.map +0 -1
  335. package/dist/Endpoint-BjWKinFA.d.mts.map +0 -1
  336. package/dist/Endpoint-DCQPMdUX.mjs.map +0 -1
  337. package/dist/Endpoint-DcWXE-SZ.cjs.map +0 -1
  338. package/dist/Endpoint-dav89W6-.d.cts.map +0 -1
  339. package/dist/EndpointFactory-CdWB7wPw.cjs.map +0 -1
  340. package/dist/EndpointFactory-CjV8F_lJ.mjs.map +0 -1
  341. package/dist/HonoEndpointAdaptor-DtL9j19R.cjs.map +0 -1
  342. package/dist/HonoEndpointAdaptor-P1ahhZHu.mjs.map +0 -1
  343. package/dist/Queue-D7ZuwBhy.d.cts.map +0 -1
  344. package/dist/Queue-gVGfi2Yk.d.mts.map +0 -1
  345. package/dist/Subscriber-2mEi0ImH.d.cts.map +0 -1
  346. package/dist/Subscriber-xTJ9ayPN.d.mts.map +0 -1
  347. package/dist/SubscriberBuilder-4OPehf2R.cjs.map +0 -1
  348. package/dist/SubscriberBuilder-BjkbeT9l.mjs.map +0 -1
  349. package/dist/SubscriberBuilder-Dptmo-1A.d.mts +0 -62
  350. package/dist/SubscriberBuilder-Dptmo-1A.d.mts.map +0 -1
  351. package/dist/SubscriberBuilder-waNhzjSM.d.cts +0 -62
  352. package/dist/SubscriberBuilder-waNhzjSM.d.cts.map +0 -1
  353. package/dist/Topic-19QeHBIR.d.cts +0 -91
  354. package/dist/Topic-19QeHBIR.d.cts.map +0 -1
  355. package/dist/Topic-DuFeqkBh.d.mts +0 -91
  356. package/dist/Topic-DuFeqkBh.d.mts.map +0 -1
  357. package/dist/auth.d.cts.map +0 -1
  358. package/dist/auth.d.mts.map +0 -1
  359. package/dist/cache-0ANvRQnD.mjs +0 -51
  360. package/dist/cache-0ANvRQnD.mjs.map +0 -1
  361. package/dist/cache-3WSvAulx.cjs +0 -57
  362. package/dist/cache-3WSvAulx.cjs.map +0 -1
  363. package/dist/cache-BrRz3fEB.d.mts.map +0 -1
  364. package/dist/cache-BtZY_tHe.d.cts.map +0 -1
  365. package/dist/clone-DblgEZZa.mjs.map +0 -1
  366. package/dist/clone-Dy0cR2SZ.cjs.map +0 -1
  367. package/dist/construct-interface-BfjcOD_E.cjs +0 -117
  368. package/dist/construct-interface-BfjcOD_E.cjs.map +0 -1
  369. package/dist/construct-interface-D9d4Gm4p.d.cts.map +0 -1
  370. package/dist/construct-interface-Z4CpS8tK.mjs +0 -81
  371. package/dist/construct-interface-Z4CpS8tK.mjs.map +0 -1
  372. package/dist/construct-interface-g5GM5pwR.d.mts.map +0 -1
  373. package/dist/database/kysely.cjs.map +0 -1
  374. package/dist/database/kysely.d.cts.map +0 -1
  375. package/dist/database/kysely.d.mts.map +0 -1
  376. package/dist/database/kysely.mjs.map +0 -1
  377. package/dist/functions-i_la-N5r.cjs.map +0 -1
  378. package/dist/index-Bd5FqCoe.d.cts.map +0 -1
  379. package/dist/index-BknhM6Ux.d.mts +0 -31
  380. package/dist/index-BknhM6Ux.d.mts.map +0 -1
  381. package/dist/index-CBSfrowv.d.cts +0 -31
  382. package/dist/index-CBSfrowv.d.cts.map +0 -1
  383. package/dist/index-D24Xm79M.d.cts +0 -171
  384. package/dist/index-D24Xm79M.d.cts.map +0 -1
  385. package/dist/index-_ajboYxK.d.mts +0 -171
  386. package/dist/index-_ajboYxK.d.mts.map +0 -1
  387. package/dist/index-lAO9egTb.d.mts.map +0 -1
  388. package/dist/lazyAccessors-BoJN3SMd.mjs.map +0 -1
  389. package/dist/lazyAccessors-e3j2oE2m.cjs.map +0 -1
  390. package/dist/processAudits-CGqttuXm.cjs.map +0 -1
  391. package/dist/processAudits-Dmts9H_b.mjs.map +0 -1
  392. package/dist/queue/index.cjs.map +0 -1
  393. package/dist/queue/index.d.cts.map +0 -1
  394. package/dist/queue/index.d.mts.map +0 -1
  395. package/dist/queue/index.mjs.map +0 -1
  396. package/dist/surfaceEnv-BFXEms2f.cjs +0 -39
  397. package/dist/surfaceEnv-BFXEms2f.cjs.map +0 -1
  398. package/dist/surfaceEnv-C3Ktahea.mjs +0 -27
  399. package/dist/surfaceEnv-C3Ktahea.mjs.map +0 -1
  400. package/dist/telemetry-C3L0iS28.d.cts.map +0 -1
  401. package/dist/telemetry-D7bVFLGi.d.mts.map +0 -1
  402. package/dist/topic/index.cjs.map +0 -1
  403. package/dist/topic/index.mjs.map +0 -1
  404. package/dist/types-BlAkSuGI.d.cts.map +0 -1
  405. package/dist/types-aKksMEWL.d.mts.map +0 -1
@@ -0,0 +1,56 @@
1
+ let _geekmidas_envkit = require("@geekmidas/envkit");
2
+ let _geekmidas_envkit_credentials = require("@geekmidas/envkit/credentials");
3
+ //#region src/endpoints/surfaceEnv.ts
4
+ /**
5
+ * The environment parser an endpoint runs with.
6
+ *
7
+ * Three facts, in order:
8
+ *
9
+ * 1. An endpoint built from a surface carries whatever parser that surface was
10
+ * given. This is the whole point of `api.get()` — the handler already has
11
+ * the thing, so nothing has to be named in config and nothing has to be
12
+ * printed into generated code.
13
+ * 2. A surface that named none gets this default, which is what every
14
+ * application's own `config/env.ts` was: `process.env` merged with the
15
+ * credentials `gkm dev`/`gkm exec` injected. It was boilerplate identical in
16
+ * every project, and mandatory, which is a poor combination.
17
+ * 3. An endpoint with no surface at all — a test, an MSW handler — gets the
18
+ * same default. Nothing has to opt in.
19
+ *
20
+ * Named a parser only when it is genuinely different: a merged secret source, a
21
+ * fixture, a parser that reads from somewhere other than the process.
22
+ */
23
+ let fallback;
24
+ /**
25
+ * The default parser, built once.
26
+ *
27
+ * Once because `Credentials` resolves through `globalThis` and decryption is
28
+ * not free, and because two parsers over the same environment are two caches of
29
+ * the same answer.
30
+ */
31
+ function defaultEnvParser() {
32
+ if (!fallback) fallback = new _geekmidas_envkit.EnvironmentParser({
33
+ ...process.env,
34
+ ..._geekmidas_envkit_credentials.Credentials
35
+ });
36
+ return fallback;
37
+ }
38
+ /** The parser for an endpoint, from its surface or the default. */
39
+ function envParserFor(surface) {
40
+ return surface?.envParser ?? defaultEnvParser();
41
+ }
42
+ //#endregion
43
+ Object.defineProperty(exports, "defaultEnvParser", {
44
+ enumerable: true,
45
+ get: function() {
46
+ return defaultEnvParser;
47
+ }
48
+ });
49
+ Object.defineProperty(exports, "envParserFor", {
50
+ enumerable: true,
51
+ get: function() {
52
+ return envParserFor;
53
+ }
54
+ });
55
+
56
+ //# sourceMappingURL=surfaceEnv-CNimK76p.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaceEnv-CNimK76p.cjs","names":["EnvironmentParser","Credentials"],"sources":["../src/endpoints/surfaceEnv.ts"],"sourcesContent":["/**\n * The environment parser an endpoint runs with.\n *\n * Three facts, in order:\n *\n * 1. An endpoint built from a surface carries whatever parser that surface was\n * given. This is the whole point of `api.get()` — the handler already has\n * the thing, so nothing has to be named in config and nothing has to be\n * printed into generated code.\n * 2. A surface that named none gets this default, which is what every\n * application's own `config/env.ts` was: `process.env` merged with the\n * credentials `gkm dev`/`gkm exec` injected. It was boilerplate identical in\n * every project, and mandatory, which is a poor combination.\n * 3. An endpoint with no surface at all — a test, an MSW handler — gets the\n * same default. Nothing has to opt in.\n *\n * Named a parser only when it is genuinely different: a merged secret source, a\n * fixture, a parser that reads from somewhere other than the process.\n */\n\nimport { EnvironmentParser } from '@geekmidas/envkit';\nimport { Credentials } from '@geekmidas/envkit/credentials';\nimport type { EndpointSurface } from './Endpoint';\n\nlet fallback: EnvironmentParser<{}> | undefined;\n\n/**\n * The default parser, built once.\n *\n * Once because `Credentials` resolves through `globalThis` and decryption is\n * not free, and because two parsers over the same environment are two caches of\n * the same answer.\n */\nexport function defaultEnvParser(): EnvironmentParser<{}> {\n\tif (!fallback) {\n\t\tfallback = new EnvironmentParser({ ...process.env, ...Credentials });\n\t}\n\n\treturn fallback;\n}\n\n/** The parser for an endpoint, from its surface or the default. */\nexport function envParserFor(\n\tsurface: EndpointSurface | undefined,\n): EnvironmentParser<{}> {\n\treturn surface?.envParser ?? defaultEnvParser();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAI;;;;;;;;AASJ,SAAgB,mBAA0C;CACzD,IAAI,CAAC,UACJ,WAAW,IAAIA,kBAAAA,kBAAkB;EAAE,GAAG,QAAQ;EAAK,GAAGC,8BAAAA;CAAY,CAAC;CAGpE,OAAO;AACR;;AAGA,SAAgB,aACf,SACwB;CACxB,OAAO,SAAS,aAAa,iBAAiB;AAC/C"}
@@ -0,0 +1,45 @@
1
+ import { EnvironmentParser } from "@geekmidas/envkit";
2
+ import { Credentials } from "@geekmidas/envkit/credentials";
3
+ //#region src/endpoints/surfaceEnv.ts
4
+ /**
5
+ * The environment parser an endpoint runs with.
6
+ *
7
+ * Three facts, in order:
8
+ *
9
+ * 1. An endpoint built from a surface carries whatever parser that surface was
10
+ * given. This is the whole point of `api.get()` — the handler already has
11
+ * the thing, so nothing has to be named in config and nothing has to be
12
+ * printed into generated code.
13
+ * 2. A surface that named none gets this default, which is what every
14
+ * application's own `config/env.ts` was: `process.env` merged with the
15
+ * credentials `gkm dev`/`gkm exec` injected. It was boilerplate identical in
16
+ * every project, and mandatory, which is a poor combination.
17
+ * 3. An endpoint with no surface at all — a test, an MSW handler — gets the
18
+ * same default. Nothing has to opt in.
19
+ *
20
+ * Named a parser only when it is genuinely different: a merged secret source, a
21
+ * fixture, a parser that reads from somewhere other than the process.
22
+ */
23
+ let fallback;
24
+ /**
25
+ * The default parser, built once.
26
+ *
27
+ * Once because `Credentials` resolves through `globalThis` and decryption is
28
+ * not free, and because two parsers over the same environment are two caches of
29
+ * the same answer.
30
+ */
31
+ function defaultEnvParser() {
32
+ if (!fallback) fallback = new EnvironmentParser({
33
+ ...process.env,
34
+ ...Credentials
35
+ });
36
+ return fallback;
37
+ }
38
+ /** The parser for an endpoint, from its surface or the default. */
39
+ function envParserFor(surface) {
40
+ return surface?.envParser ?? defaultEnvParser();
41
+ }
42
+ //#endregion
43
+ export { envParserFor as n, defaultEnvParser as t };
44
+
45
+ //# sourceMappingURL=surfaceEnv-wMT5QzgZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaceEnv-wMT5QzgZ.mjs","names":[],"sources":["../src/endpoints/surfaceEnv.ts"],"sourcesContent":["/**\n * The environment parser an endpoint runs with.\n *\n * Three facts, in order:\n *\n * 1. An endpoint built from a surface carries whatever parser that surface was\n * given. This is the whole point of `api.get()` — the handler already has\n * the thing, so nothing has to be named in config and nothing has to be\n * printed into generated code.\n * 2. A surface that named none gets this default, which is what every\n * application's own `config/env.ts` was: `process.env` merged with the\n * credentials `gkm dev`/`gkm exec` injected. It was boilerplate identical in\n * every project, and mandatory, which is a poor combination.\n * 3. An endpoint with no surface at all — a test, an MSW handler — gets the\n * same default. Nothing has to opt in.\n *\n * Named a parser only when it is genuinely different: a merged secret source, a\n * fixture, a parser that reads from somewhere other than the process.\n */\n\nimport { EnvironmentParser } from '@geekmidas/envkit';\nimport { Credentials } from '@geekmidas/envkit/credentials';\nimport type { EndpointSurface } from './Endpoint';\n\nlet fallback: EnvironmentParser<{}> | undefined;\n\n/**\n * The default parser, built once.\n *\n * Once because `Credentials` resolves through `globalThis` and decryption is\n * not free, and because two parsers over the same environment are two caches of\n * the same answer.\n */\nexport function defaultEnvParser(): EnvironmentParser<{}> {\n\tif (!fallback) {\n\t\tfallback = new EnvironmentParser({ ...process.env, ...Credentials });\n\t}\n\n\treturn fallback;\n}\n\n/** The parser for an endpoint, from its surface or the default. */\nexport function envParserFor(\n\tsurface: EndpointSurface | undefined,\n): EnvironmentParser<{}> {\n\treturn surface?.envParser ?? defaultEnvParser();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAI;;;;;;;;AASJ,SAAgB,mBAA0C;CACzD,IAAI,CAAC,UACJ,WAAW,IAAI,kBAAkB;EAAE,GAAG,QAAQ;EAAK,GAAG;CAAY,CAAC;CAGpE,OAAO;AACR;;AAGA,SAAgB,aACf,SACwB;CACxB,OAAO,SAAS,aAAa,iBAAiB;AAC/C"}
@@ -1,7 +1,5 @@
1
1
  import { Context } from "aws-lambda";
2
-
3
2
  //#region src/telemetry.d.ts
4
-
5
3
  /**
6
4
  * Context object returned by onRequestStart, passed to subsequent hooks
7
5
  */
@@ -89,7 +87,6 @@ interface Telemetry {
89
87
  */
90
88
  onRequestError(ctx: TelemetryContext, error: Error): void;
91
89
  }
92
- //# sourceMappingURL=telemetry.d.ts.map
93
90
  //#endregion
94
- export { Telemetry, TelemetryContext, TelemetryRequest, TelemetryResponse };
95
- //# sourceMappingURL=telemetry-C3L0iS28.d.cts.map
91
+ export { TelemetryResponse as i, TelemetryContext as n, TelemetryRequest as r, Telemetry as t };
92
+ //# sourceMappingURL=telemetry-DGcFlVpB.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry-DGcFlVpB.d.cts","names":["LambdaContext"],"sources":["../src/telemetry.ts"],"mappings":";;;;;UAWiB;;;;GAIf;;;;;UAMe;;;;EAIhB;;;;EAKA,SAASA;;;;;UAMO;;;;EAIhB;;;;EAKA;;;;EAKA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BM;;;;;;;EAOhB,eAAe,SAAS,mBAAmB;;;;;;;EAQ3C,aAAa,KAAK,kBAAkB,UAAU;;;;;;;EAQ9C,eAAe,KAAK,kBAAkB,OAAO"}
@@ -1,7 +1,5 @@
1
1
  import { Context } from "aws-lambda";
2
-
3
2
  //#region src/telemetry.d.ts
4
-
5
3
  /**
6
4
  * Context object returned by onRequestStart, passed to subsequent hooks
7
5
  */
@@ -89,7 +87,6 @@ interface Telemetry {
89
87
  */
90
88
  onRequestError(ctx: TelemetryContext, error: Error): void;
91
89
  }
92
- //# sourceMappingURL=telemetry.d.ts.map
93
90
  //#endregion
94
- export { Telemetry, TelemetryContext, TelemetryRequest, TelemetryResponse };
95
- //# sourceMappingURL=telemetry-D7bVFLGi.d.mts.map
91
+ export { TelemetryResponse as i, TelemetryContext as n, TelemetryRequest as r, Telemetry as t };
92
+ //# sourceMappingURL=telemetry-DGcFlVpB.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry-DGcFlVpB.d.mts","names":["LambdaContext"],"sources":["../src/telemetry.ts"],"mappings":";;;;;UAWiB;;;;GAIf;;;;;UAMe;;;;EAIhB;;;;EAKA,SAASA;;;;;UAMO;;;;EAIhB;;;;EAKA;;;;EAKA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BM;;;;;;;EAOhB,eAAe,SAAS,mBAAmB;;;;;;;EAQ3C,aAAa,KAAK,kBAAkB,UAAU;;;;;;;EAQ9C,eAAe,KAAK,kBAAkB,OAAO"}
@@ -1,137 +1,3 @@
1
- const require_chunk = require('../chunk-DWy1uDak.cjs');
2
- const require_Construct = require('../Construct-CyS3RpTL.cjs');
3
- const require_clone = require('../clone-Dy0cR2SZ.cjs');
4
- const __geekmidas_manifest = require_chunk.__toESM(require("@geekmidas/manifest"));
5
- const __geekmidas_logger_console = require_chunk.__toESM(require("@geekmidas/logger/console"));
6
- const __geekmidas_events = require_chunk.__toESM(require("@geekmidas/events"));
7
-
8
- //#region src/topic/Topic.ts
9
- /**
10
- * A topic — pub/sub fan-out. Unlike a `Queue` (point-to-point, one consumer), a
11
- * topic is a *resource* owned by no single handler: it declares the event
12
- * contract, derives a typed producer (`topic.publisher`), and any number of
13
- * subscribers (`s.topic(topic)`) bind to it. `gkm build` discovers it into the
14
- * manifest's `topics` field; infra provisions an SNS topic.
15
- *
16
- * This replaces hand-writing a publisher `Service`: the publisher is *derived*
17
- * from the declared event contract, the same way `Queue` derives its publisher.
18
- */
19
- var Topic = class extends require_Construct.Construct {
20
- __IS_TOPIC__ = true;
21
- static isTopic(obj) {
22
- return Boolean(obj && obj.__IS_TOPIC__ === true && obj.type === require_Construct.ConstructType.Topic);
23
- }
24
- /**
25
- * The canonical id this topic is declared under.
26
- *
27
- * Derived from the name, so `users` and `Users` are one topic. The name is
28
- * left alone: subscribers bind to it and it is what the broker routes on.
29
- */
30
- id;
31
- /**
32
- * The producer's env key, read by both {@link declare} and
33
- * {@link publisher} so the two cannot drift.
34
- */
35
- connectionKey;
36
- constructor(name, eventSchemas, logger = __geekmidas_logger_console.DEFAULT_LOGGER) {
37
- super(require_Construct.ConstructType.Topic, logger, [], []);
38
- this.name = name;
39
- this.eventSchemas = eventSchemas;
40
- this.id = (0, __geekmidas_manifest.canonicalId)(name);
41
- this.connectionKey = (0, __geekmidas_manifest.provideKey)(this.id, "publisherConnectionString");
42
- }
43
- /**
44
- * What this topic is in the manifest.
45
- *
46
- * Only the producer's key: a subscriber is *bound* to a topic rather than
47
- * depending on it, so the binding is an edge the deploy target reads and not
48
- * an env key anyone can hold. Locally both sides meet on the same broker.
49
- */
50
- declare() {
51
- return [{
52
- kind: "topic",
53
- id: this.id,
54
- provides: [this.connectionKey],
55
- events: this.eventTypes,
56
- subscribers: []
57
- }];
58
- }
59
- /** The event type names this topic carries. */
60
- get eventTypes() {
61
- return Object.keys(this.eventSchemas);
62
- }
63
- /**
64
- * The producer side — a `Service` exposing an `EventPublisher` typed to the
65
- * union of this topic's events. Inject via `.publisher(topic.publisher)` (for
66
- * declarative `.event(...)`) or `.services([topic.publisher])` (to publish
67
- * imperatively). Reads `<NAME>_PUBLISHER_CONNECTION_STRING` and selects the
68
- * transport from the URL protocol — `pgboss://` locally, `sns://` deployed.
69
- *
70
- * Because it's a `Service`, the connection-string requirement is sniffed into
71
- * the manifest of whatever construct injects it (least-privilege linking).
72
- */
73
- /**
74
- * The topic as a dependency — what `.dependsOn([users])` dissolves into,
75
- * reachable as `services.users`.
76
- *
77
- * It is the producer, because publishing is the only thing depending on a
78
- * topic can mean: a subscriber *binds* with `s.topic(…)` instead, and is
79
- * deliberately never handed this. {@link publisher} is the same service
80
- * under its older `<name>Publisher` key.
81
- */
82
- get service() {
83
- const { register } = this.publisher;
84
- return {
85
- serviceName: (0, __geekmidas_manifest.serviceKey)(this.id),
86
- register
87
- };
88
- }
89
- get publisher() {
90
- const envVar = this.connectionKey;
91
- return {
92
- serviceName: `${this.name}Publisher`,
93
- async register({ envParser }) {
94
- const { connectionString } = envParser.create((get) => ({ connectionString: get(envVar).string() })).parse();
95
- return __geekmidas_events.Publisher.fromConnectionString(connectionString);
96
- }
97
- };
98
- }
99
- };
100
-
101
- //#endregion
102
- //#region src/topic/TopicBuilder.ts
103
- /**
104
- * Builds a {@link Topic} — `t.topic('users').events({ 'user.created': schema, … })`.
105
- * The event map is the topic's contract: it types the derived `topic.publisher`
106
- * and the subscribers that bind via `s.topic(topic)`.
107
- */
108
- var TopicBuilder = class {
109
- _name;
110
- _logger = __geekmidas_logger_console.DEFAULT_LOGGER;
111
- /** The topic name — drives the infra topic and its `<NAME>_*` env vars. */
112
- topic(name) {
113
- return require_clone.cloneWith(this, { _name: name });
114
- }
115
- logger(logger) {
116
- return require_clone.cloneWith(this, { _logger: logger });
117
- }
118
- /**
119
- * The event contract — a map of event type → payload schema. Building the
120
- * topic requires this; it's what types the publisher and subscribers.
121
- */
122
- events(events) {
123
- if (!this._name) throw new Error("Topic requires a name — call .topic(name) before .events().");
124
- const topic = new Topic(this._name, events, this._logger);
125
- return topic;
126
- }
127
- };
128
-
129
- //#endregion
130
- //#region src/topic/index.ts
131
- const t = new TopicBuilder();
132
-
133
- //#endregion
134
- exports.Topic = Topic;
135
- exports.TopicBuilder = TopicBuilder;
136
- exports.t = t;
137
- //# sourceMappingURL=index.cjs.map
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_Topic = require("../Topic-CkxOTrMv.cjs");
3
+ exports.Topic = require_Topic.Topic;
@@ -1,4 +1,2 @@
1
- import "../Construct-C0ijr2qp.cjs";
2
- import { Topic, TopicEvents, TopicMessage } from "../Topic-19QeHBIR.cjs";
3
- import { TopicBuilder, t } from "../index-CBSfrowv.cjs";
4
- export { Topic, TopicBuilder, TopicEvents, TopicMessage, t };
1
+ import { c as Topic, d as TopicOptions, l as TopicEvents, u as TopicMessage } from "../Construct-BQALFCh2.cjs";
2
+ export { Topic, type TopicEvents, type TopicMessage, type TopicOptions };
@@ -1,4 +1,2 @@
1
- import "../Construct-Ct8nalEi.mjs";
2
- import { Topic, TopicEvents, TopicMessage } from "../Topic-DuFeqkBh.mjs";
3
- import { TopicBuilder, t } from "../index-BknhM6Ux.mjs";
4
- export { Topic, TopicBuilder, TopicEvents, TopicMessage, t };
1
+ import { c as Topic, d as TopicOptions, l as TopicEvents, u as TopicMessage } from "../Construct-QXnl3VqT.mjs";
2
+ export { Topic, type TopicEvents, type TopicMessage, type TopicOptions };
@@ -1,134 +1,2 @@
1
- import { Construct, ConstructType } from "../Construct-BD5neF7w.mjs";
2
- import { cloneWith } from "../clone-DblgEZZa.mjs";
3
- import { canonicalId, provideKey, serviceKey } from "@geekmidas/manifest";
4
- import { DEFAULT_LOGGER } from "@geekmidas/logger/console";
5
- import { Publisher } from "@geekmidas/events";
6
-
7
- //#region src/topic/Topic.ts
8
- /**
9
- * A topic — pub/sub fan-out. Unlike a `Queue` (point-to-point, one consumer), a
10
- * topic is a *resource* owned by no single handler: it declares the event
11
- * contract, derives a typed producer (`topic.publisher`), and any number of
12
- * subscribers (`s.topic(topic)`) bind to it. `gkm build` discovers it into the
13
- * manifest's `topics` field; infra provisions an SNS topic.
14
- *
15
- * This replaces hand-writing a publisher `Service`: the publisher is *derived*
16
- * from the declared event contract, the same way `Queue` derives its publisher.
17
- */
18
- var Topic = class extends Construct {
19
- __IS_TOPIC__ = true;
20
- static isTopic(obj) {
21
- return Boolean(obj && obj.__IS_TOPIC__ === true && obj.type === ConstructType.Topic);
22
- }
23
- /**
24
- * The canonical id this topic is declared under.
25
- *
26
- * Derived from the name, so `users` and `Users` are one topic. The name is
27
- * left alone: subscribers bind to it and it is what the broker routes on.
28
- */
29
- id;
30
- /**
31
- * The producer's env key, read by both {@link declare} and
32
- * {@link publisher} so the two cannot drift.
33
- */
34
- connectionKey;
35
- constructor(name, eventSchemas, logger = DEFAULT_LOGGER) {
36
- super(ConstructType.Topic, logger, [], []);
37
- this.name = name;
38
- this.eventSchemas = eventSchemas;
39
- this.id = canonicalId(name);
40
- this.connectionKey = provideKey(this.id, "publisherConnectionString");
41
- }
42
- /**
43
- * What this topic is in the manifest.
44
- *
45
- * Only the producer's key: a subscriber is *bound* to a topic rather than
46
- * depending on it, so the binding is an edge the deploy target reads and not
47
- * an env key anyone can hold. Locally both sides meet on the same broker.
48
- */
49
- declare() {
50
- return [{
51
- kind: "topic",
52
- id: this.id,
53
- provides: [this.connectionKey],
54
- events: this.eventTypes,
55
- subscribers: []
56
- }];
57
- }
58
- /** The event type names this topic carries. */
59
- get eventTypes() {
60
- return Object.keys(this.eventSchemas);
61
- }
62
- /**
63
- * The producer side — a `Service` exposing an `EventPublisher` typed to the
64
- * union of this topic's events. Inject via `.publisher(topic.publisher)` (for
65
- * declarative `.event(...)`) or `.services([topic.publisher])` (to publish
66
- * imperatively). Reads `<NAME>_PUBLISHER_CONNECTION_STRING` and selects the
67
- * transport from the URL protocol — `pgboss://` locally, `sns://` deployed.
68
- *
69
- * Because it's a `Service`, the connection-string requirement is sniffed into
70
- * the manifest of whatever construct injects it (least-privilege linking).
71
- */
72
- /**
73
- * The topic as a dependency — what `.dependsOn([users])` dissolves into,
74
- * reachable as `services.users`.
75
- *
76
- * It is the producer, because publishing is the only thing depending on a
77
- * topic can mean: a subscriber *binds* with `s.topic(…)` instead, and is
78
- * deliberately never handed this. {@link publisher} is the same service
79
- * under its older `<name>Publisher` key.
80
- */
81
- get service() {
82
- const { register } = this.publisher;
83
- return {
84
- serviceName: serviceKey(this.id),
85
- register
86
- };
87
- }
88
- get publisher() {
89
- const envVar = this.connectionKey;
90
- return {
91
- serviceName: `${this.name}Publisher`,
92
- async register({ envParser }) {
93
- const { connectionString } = envParser.create((get) => ({ connectionString: get(envVar).string() })).parse();
94
- return Publisher.fromConnectionString(connectionString);
95
- }
96
- };
97
- }
98
- };
99
-
100
- //#endregion
101
- //#region src/topic/TopicBuilder.ts
102
- /**
103
- * Builds a {@link Topic} — `t.topic('users').events({ 'user.created': schema, … })`.
104
- * The event map is the topic's contract: it types the derived `topic.publisher`
105
- * and the subscribers that bind via `s.topic(topic)`.
106
- */
107
- var TopicBuilder = class {
108
- _name;
109
- _logger = DEFAULT_LOGGER;
110
- /** The topic name — drives the infra topic and its `<NAME>_*` env vars. */
111
- topic(name) {
112
- return cloneWith(this, { _name: name });
113
- }
114
- logger(logger) {
115
- return cloneWith(this, { _logger: logger });
116
- }
117
- /**
118
- * The event contract — a map of event type → payload schema. Building the
119
- * topic requires this; it's what types the publisher and subscribers.
120
- */
121
- events(events) {
122
- if (!this._name) throw new Error("Topic requires a name — call .topic(name) before .events().");
123
- const topic = new Topic(this._name, events, this._logger);
124
- return topic;
125
- }
126
- };
127
-
128
- //#endregion
129
- //#region src/topic/index.ts
130
- const t = new TopicBuilder();
131
-
132
- //#endregion
133
- export { Topic, TopicBuilder, t };
134
- //# sourceMappingURL=index.mjs.map
1
+ import { t as Topic } from "../Topic-hPffOsot.mjs";
2
+ export { Topic };
@@ -1,9 +1,7 @@
1
1
  //#region src/types.d.ts
2
- type RemoveUndefined<T> = { [K in keyof T as T[K] extends undefined ? never : K]: T[K] };
2
+ type RemoveUndefined<T> = { [K in keyof T as T[K] extends undefined ? never : K]: T[K]; };
3
3
  type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS';
4
4
  type LowerHttpMethod<T extends HttpMethod> = Lowercase<T>;
5
- //# sourceMappingURL=types.d.ts.map
6
-
7
5
  //#endregion
8
- export { HttpMethod, LowerHttpMethod, RemoveUndefined };
9
- //# sourceMappingURL=types-BlAkSuGI.d.cts.map
6
+ export { LowerHttpMethod as n, RemoveUndefined as r, HttpMethod as t };
7
+ //# sourceMappingURL=types-DMuSQeLL.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-DMuSQeLL.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";KAAY,gBAAgB,QAC1B,WAAW,KAAK,EAAE,+BAA+B,IAAI,EAAE;KAG7C;KAQA,gBAAgB,UAAU,cAAc,UAAU"}
@@ -1,9 +1,7 @@
1
1
  //#region src/types.d.ts
2
- type RemoveUndefined<T> = { [K in keyof T as T[K] extends undefined ? never : K]: T[K] };
2
+ type RemoveUndefined<T> = { [K in keyof T as T[K] extends undefined ? never : K]: T[K]; };
3
3
  type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS';
4
4
  type LowerHttpMethod<T extends HttpMethod> = Lowercase<T>;
5
- //# sourceMappingURL=types.d.ts.map
6
-
7
5
  //#endregion
8
- export { HttpMethod, LowerHttpMethod, RemoveUndefined };
9
- //# sourceMappingURL=types-aKksMEWL.d.mts.map
6
+ export { LowerHttpMethod as n, RemoveUndefined as r, HttpMethod as t };
7
+ //# sourceMappingURL=types-DMuSQeLL.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-DMuSQeLL.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";KAAY,gBAAgB,QAC1B,WAAW,KAAK,EAAE,+BAA+B,IAAI,EAAE;KAG7C;KAQA,gBAAgB,UAAU,cAAc,UAAU"}
package/dist/types.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { HttpMethod, LowerHttpMethod, RemoveUndefined } from "./types-BlAkSuGI.cjs";
1
+ import { n as LowerHttpMethod, r as RemoveUndefined, t as HttpMethod } from "./types-DMuSQeLL.cjs";
2
2
  export { HttpMethod, LowerHttpMethod, RemoveUndefined };
package/dist/types.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { HttpMethod, LowerHttpMethod, RemoveUndefined } from "./types-aKksMEWL.mjs";
1
+ import { n as LowerHttpMethod, r as RemoveUndefined, t as HttpMethod } from "./types-DMuSQeLL.mjs";
2
2
  export { HttpMethod, LowerHttpMethod, RemoveUndefined };
package/dist/types.mjs CHANGED
@@ -0,0 +1 @@
1
+ export {};
package/dist/worker.cjs CHANGED
@@ -1,16 +1,16 @@
1
- const require_chunk = require('./chunk-DWy1uDak.cjs');
2
- const require_construct_interface = require('./construct-interface-BfjcOD_E.cjs');
3
- require('./Construct-CyS3RpTL.cjs');
4
- const require_functions = require('./functions-i_la-N5r.cjs');
5
- require('./clone-Dy0cR2SZ.cjs');
6
- const require_surfaceEnv = require('./surfaceEnv-BFXEms2f.cjs');
7
- const require_CronBuilder = require('./CronBuilder-Da0C0edR.cjs');
8
- const require_SubscriberBuilder = require('./SubscriberBuilder-4OPehf2R.cjs');
9
- const __geekmidas_manifest = require_chunk.__toESM(require("@geekmidas/manifest"));
10
- const __geekmidas_logger_console = require_chunk.__toESM(require("@geekmidas/logger/console"));
11
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_construct_interface = require("./construct-interface.cjs");
3
+ const require_functions = require("./functions-CbP5ZKma.cjs");
4
+ const require_surfaceEnv = require("./surfaceEnv-CNimK76p.cjs");
5
+ const require_CronBuilder = require("./CronBuilder-BoHzlWU_.cjs");
6
+ const require_QueueBuilder = require("./QueueBuilder-BFQn3OzZ.cjs");
7
+ const require_SubscriberBuilder = require("./SubscriberBuilder-C2PwqwIl.cjs");
8
+ let _geekmidas_manifest = require("@geekmidas/manifest");
9
+ let _geekmidas_logger_console = require("@geekmidas/logger/console");
12
10
  //#region src/worker.ts
13
11
  var Worker = class Worker {
12
+ config;
13
+ dependencies;
14
14
  id;
15
15
  /** Always defined — the worker's own, or the console logger. */
16
16
  logger;
@@ -18,15 +18,16 @@ var Worker = class Worker {
18
18
  envParser;
19
19
  /**
20
20
  * Where this worker's schedules live, when it has crons and a server runs
21
- * them. `undefined` until `.database(…)` says.
21
+ * them — and the database everything built from it receives as `db`.
22
+ * `undefined` until `.database(…)` says.
22
23
  */
23
24
  scheduleStore;
24
25
  constructor(id, config = {}, dependencies = [], scheduleStore) {
25
26
  this.config = config;
26
27
  this.dependencies = dependencies;
27
- const canonical = (0, __geekmidas_manifest.canonicalId)(id);
28
+ const canonical = (0, _geekmidas_manifest.canonicalId)(id);
28
29
  this.id = canonical;
29
- this.logger = config.logger ?? __geekmidas_logger_console.DEFAULT_LOGGER;
30
+ this.logger = config.logger ?? _geekmidas_logger_console.DEFAULT_LOGGER;
30
31
  this.envParser = require_surfaceEnv.envParserFor(config.envParser ? {
31
32
  id: canonical,
32
33
  envParser: config.envParser
@@ -34,7 +35,10 @@ var Worker = class Worker {
34
35
  this.scheduleStore = scheduleStore;
35
36
  }
36
37
  /**
37
- * The database this worker keeps its schedules in.
38
+ * The database this worker keeps its schedules in, and the one everything
39
+ * built from it — crons, queues, subscribers, functions — receives as `db`.
40
+ * One of them that works against another database names it with its own
41
+ * `.database(other)`, which replaces this one for that runnable alone.
38
42
  *
39
43
  * Only a server target uses it. On AWS a cron is an EventBridge rule
40
44
  * invoking a Lambda and nothing here is consulted — but a server has nothing
@@ -51,6 +55,10 @@ var Worker = class Worker {
51
55
  * @example
52
56
  * ```ts
53
57
  * export const jobs = new Worker('Jobs', { logger }).database(database);
58
+ *
59
+ * export const sweep = jobs
60
+ * .cron('rate(1 hour)')
61
+ * .handle(async ({ db }) => db.deleteFrom('sessions').execute());
54
62
  * ```
55
63
  */
56
64
  database(source) {
@@ -65,12 +73,31 @@ var Worker = class Worker {
65
73
  return this.own(new require_CronBuilder.CronBuilder().logger(this.logger)).schedule(schedule);
66
74
  }
67
75
  /**
76
+ * A queue and its one consumer, run by this worker.
77
+ *
78
+ * One construct, because a queue has exactly one consumer: nothing else can
79
+ * attach a second, or forget to attach the first. Producers send to it by
80
+ * depending on it — `.dependsOn([emails])` makes `services.emails` the
81
+ * publisher.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * export const emails = worker
86
+ * .queue('Emails')
87
+ * .message(z.object({ userId: z.uuid(), template: z.string() }))
88
+ * .handle(async ({ messages, services }) => { … });
89
+ * ```
90
+ */
91
+ queue(name) {
92
+ return this.own(new require_QueueBuilder.QueueBuilder().logger(this.logger)).queue(name);
93
+ }
94
+ /**
68
95
  * A runnable that consumes a topic.
69
96
  *
70
97
  * Binding is not publishing: a consumer is handed the topic's event types
71
- * and no connection string it could publish with. Chain `.publishes(…)` when
72
- * the handler emits follow-up events, which is the only reason it would need
73
- * one.
98
+ * and no connection string it could publish with. A handler that emits
99
+ * follow-up events depends on the topic it emits to —
100
+ * `.dependsOn([orders])` — which is the only reason it would need one.
74
101
  *
75
102
  * @example `worker.topic(users).subscribe(['user.created']).handle(…)`
76
103
  */
@@ -78,17 +105,6 @@ var Worker = class Worker {
78
105
  return this.own(new require_SubscriberBuilder.SubscriberBuilder().logger(this.logger)).topic(topic);
79
106
  }
80
107
  /**
81
- * A runnable that consumes events typed from a publisher service.
82
- *
83
- * The older of the two ways to bind a subscriber, kept for a project whose
84
- * events come from a hand-written publisher rather than a `Topic`
85
- * construct. `topic()` is the one to reach for: it types the events the same
86
- * way and hands the consumer no connection string it could publish with.
87
- */
88
- publisher(service) {
89
- return this.own(new require_SubscriberBuilder.SubscriberBuilder().logger(this.logger)).publisher(service);
90
- }
91
- /**
92
108
  * Everything below builds a function — the runnable with no schedule and no
93
109
  * topic, invoked by something else.
94
110
  *
@@ -144,12 +160,20 @@ var Worker = class Worker {
144
160
  }
145
161
  /**
146
162
  * Stamps this worker's id onto a builder, so everything built from it says
147
- * which process runs it.
163
+ * which process runs it — and hands it the worker's database.
164
+ *
165
+ * The database goes through the builder's own `.database()` rather than
166
+ * being written into its fields, so the default is recorded exactly as an
167
+ * explicit one would be: the client the handler gets, and the edge the
168
+ * manifest reads. That is also what lets a later `.database(other)` replace
169
+ * it outright. The builder arrives already typed with this worker's
170
+ * database; this is the runtime half of that.
148
171
  */
149
172
  own(builder) {
150
- builder._owner = this.id;
151
- builder._scheduleStore = this.scheduleStore;
152
- return builder;
173
+ const owned = this.scheduleStore ? builder.database(this.scheduleStore) : builder;
174
+ owned._owner = this.id;
175
+ owned._scheduleStore = this.scheduleStore;
176
+ return owned;
153
177
  }
154
178
  declare() {
155
179
  return [{
@@ -160,7 +184,7 @@ var Worker = class Worker {
160
184
  }];
161
185
  }
162
186
  };
163
-
164
187
  //#endregion
165
188
  exports.Worker = Worker;
189
+
166
190
  //# sourceMappingURL=worker.cjs.map