@geekmidas/events 10.0.0-alpha.99 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +1 -46
  3. package/dist/BasicConnection-CQsJpx2J.d.cts +27 -0
  4. package/dist/BasicConnection-CQsJpx2J.d.cts.map +1 -0
  5. package/dist/BasicConnection-CxfNEvlb.cjs +48 -0
  6. package/dist/BasicConnection-CxfNEvlb.cjs.map +1 -0
  7. package/dist/BasicConnection-DcRelT64.d.mts +27 -0
  8. package/dist/BasicConnection-DcRelT64.d.mts.map +1 -0
  9. package/dist/BasicConnection-hl-Ogz3a.mjs +42 -0
  10. package/dist/BasicConnection-hl-Ogz3a.mjs.map +1 -0
  11. package/dist/BasicPublisher-C-hMX2Hy.d.mts +14 -0
  12. package/dist/BasicPublisher-C-hMX2Hy.d.mts.map +1 -0
  13. package/dist/BasicPublisher-CGMXg2I2.d.cts +14 -0
  14. package/dist/BasicPublisher-CGMXg2I2.d.cts.map +1 -0
  15. package/dist/BasicPublisher-CXAVKxgq.cjs +20 -0
  16. package/dist/BasicPublisher-CXAVKxgq.cjs.map +1 -0
  17. package/dist/BasicPublisher-DogbeHAH.mjs +14 -0
  18. package/dist/BasicPublisher-DogbeHAH.mjs.map +1 -0
  19. package/dist/BasicSubscriber-BJSZN22M.mjs +16 -0
  20. package/dist/BasicSubscriber-BJSZN22M.mjs.map +1 -0
  21. package/dist/BasicSubscriber-HzSJ_MbB.d.mts +14 -0
  22. package/dist/BasicSubscriber-HzSJ_MbB.d.mts.map +1 -0
  23. package/dist/BasicSubscriber-mVJRMXhZ.cjs +22 -0
  24. package/dist/BasicSubscriber-mVJRMXhZ.cjs.map +1 -0
  25. package/dist/BasicSubscriber-uW3IOyBj.d.cts +14 -0
  26. package/dist/BasicSubscriber-uW3IOyBj.d.cts.map +1 -0
  27. package/dist/EventConnection-4niMI6D8.d.mts +13 -0
  28. package/dist/EventConnection-4niMI6D8.d.mts.map +1 -0
  29. package/dist/EventConnection-BkA9FSVL.cjs +45 -0
  30. package/dist/EventConnection-BkA9FSVL.cjs.map +1 -0
  31. package/dist/EventConnection-Kr32GAzq.mjs +40 -0
  32. package/dist/EventConnection-Kr32GAzq.mjs.map +1 -0
  33. package/dist/EventConnection-dP42P87q.d.cts +13 -0
  34. package/dist/EventConnection-dP42P87q.d.cts.map +1 -0
  35. package/dist/EventConnection.cjs +5 -0
  36. package/dist/EventConnection.d.cts +3 -0
  37. package/dist/EventConnection.d.mts +3 -0
  38. package/dist/EventConnection.mjs +4 -0
  39. package/dist/PgBossConnection-B71ssr72.cjs +80 -0
  40. package/dist/PgBossConnection-B71ssr72.cjs.map +1 -0
  41. package/dist/PgBossConnection-Bj_Wo1lQ.mjs +74 -0
  42. package/dist/PgBossConnection-Bj_Wo1lQ.mjs.map +1 -0
  43. package/dist/PgBossConnection-DCfLGoHx.d.mts +32 -0
  44. package/dist/PgBossConnection-DCfLGoHx.d.mts.map +1 -0
  45. package/dist/PgBossConnection-oto_CAbP.d.cts +32 -0
  46. package/dist/PgBossConnection-oto_CAbP.d.cts.map +1 -0
  47. package/dist/PgBossPublisher-Bwo7qSoH.mjs +35 -0
  48. package/dist/PgBossPublisher-Bwo7qSoH.mjs.map +1 -0
  49. package/dist/PgBossPublisher-CqjigBVC.d.mts +20 -0
  50. package/dist/PgBossPublisher-CqjigBVC.d.mts.map +1 -0
  51. package/dist/PgBossPublisher-FTdYh58W.cjs +41 -0
  52. package/dist/PgBossPublisher-FTdYh58W.cjs.map +1 -0
  53. package/dist/PgBossPublisher-JIiB1zpA.d.cts +20 -0
  54. package/dist/PgBossPublisher-JIiB1zpA.d.cts.map +1 -0
  55. package/dist/PgBossSubscriber-BUiB1JKf.d.mts +24 -0
  56. package/dist/PgBossSubscriber-BUiB1JKf.d.mts.map +1 -0
  57. package/dist/PgBossSubscriber-BubVfuWm.cjs +52 -0
  58. package/dist/PgBossSubscriber-BubVfuWm.cjs.map +1 -0
  59. package/dist/PgBossSubscriber-Cozijfdj.d.cts +24 -0
  60. package/dist/PgBossSubscriber-Cozijfdj.d.cts.map +1 -0
  61. package/dist/PgBossSubscriber-DopATe80.mjs +46 -0
  62. package/dist/PgBossSubscriber-DopATe80.mjs.map +1 -0
  63. package/dist/Publisher-CKloIGh6.cjs +79 -0
  64. package/dist/Publisher-CKloIGh6.cjs.map +1 -0
  65. package/dist/Publisher-ChLTrUeP.mjs +74 -0
  66. package/dist/Publisher-ChLTrUeP.mjs.map +1 -0
  67. package/dist/Publisher-DDee6xau.d.cts +21 -0
  68. package/dist/Publisher-DDee6xau.d.cts.map +1 -0
  69. package/dist/Publisher-VHumMkrP.d.mts +21 -0
  70. package/dist/Publisher-VHumMkrP.d.mts.map +1 -0
  71. package/dist/Publisher.cjs +4 -0
  72. package/dist/Publisher.d.cts +3 -0
  73. package/dist/Publisher.d.mts +3 -0
  74. package/dist/Publisher.mjs +4 -0
  75. package/dist/RabbitMQConnection-BtKZjtZY.mjs +107 -0
  76. package/dist/RabbitMQConnection-BtKZjtZY.mjs.map +1 -0
  77. package/dist/RabbitMQConnection-DV9t3VYp.d.mts +44 -0
  78. package/dist/RabbitMQConnection-DV9t3VYp.d.mts.map +1 -0
  79. package/dist/RabbitMQConnection-DmMMosT4.cjs +113 -0
  80. package/dist/RabbitMQConnection-DmMMosT4.cjs.map +1 -0
  81. package/dist/RabbitMQConnection-jNME_eR7.d.cts +44 -0
  82. package/dist/RabbitMQConnection-jNME_eR7.d.cts.map +1 -0
  83. package/dist/RabbitMQPublisher-C94q6g8q.cjs +45 -0
  84. package/dist/RabbitMQPublisher-C94q6g8q.cjs.map +1 -0
  85. package/dist/RabbitMQPublisher-DKmgwqVj.d.mts +25 -0
  86. package/dist/RabbitMQPublisher-DKmgwqVj.d.mts.map +1 -0
  87. package/dist/RabbitMQPublisher-d257OHLa.d.cts +25 -0
  88. package/dist/RabbitMQPublisher-d257OHLa.d.cts.map +1 -0
  89. package/dist/RabbitMQPublisher-yUqWNq-P.mjs +39 -0
  90. package/dist/RabbitMQPublisher-yUqWNq-P.mjs.map +1 -0
  91. package/dist/RabbitMQSubscriber-BF7JGfYm.d.cts +27 -0
  92. package/dist/RabbitMQSubscriber-BF7JGfYm.d.cts.map +1 -0
  93. package/dist/RabbitMQSubscriber-BWniDtFs.mjs +56 -0
  94. package/dist/RabbitMQSubscriber-BWniDtFs.mjs.map +1 -0
  95. package/dist/RabbitMQSubscriber-CdbUy5mB.d.mts +27 -0
  96. package/dist/RabbitMQSubscriber-CdbUy5mB.d.mts.map +1 -0
  97. package/dist/RabbitMQSubscriber-DGEO-clQ.cjs +62 -0
  98. package/dist/RabbitMQSubscriber-DGEO-clQ.cjs.map +1 -0
  99. package/dist/SNSConnection-CAcbLQOy.cjs +76 -0
  100. package/dist/SNSConnection-CAcbLQOy.cjs.map +1 -0
  101. package/dist/SNSConnection-CG4iEwA8.d.mts +41 -0
  102. package/dist/SNSConnection-CG4iEwA8.d.mts.map +1 -0
  103. package/dist/SNSConnection-CVjH93lb.mjs +70 -0
  104. package/dist/SNSConnection-CVjH93lb.mjs.map +1 -0
  105. package/dist/SNSConnection-Dol9FuxA.d.cts +41 -0
  106. package/dist/SNSConnection-Dol9FuxA.d.cts.map +1 -0
  107. package/dist/SNSPublisher-CjlMS3Z2.mjs +41 -0
  108. package/dist/SNSPublisher-CjlMS3Z2.mjs.map +1 -0
  109. package/dist/SNSPublisher-D50dPCEh.d.mts +22 -0
  110. package/dist/SNSPublisher-D50dPCEh.d.mts.map +1 -0
  111. package/dist/SNSPublisher-DQunY4NM.d.cts +22 -0
  112. package/dist/SNSPublisher-DQunY4NM.d.cts.map +1 -0
  113. package/dist/SNSPublisher-DV_8GGsi.cjs +47 -0
  114. package/dist/SNSPublisher-DV_8GGsi.cjs.map +1 -0
  115. package/dist/SNSSubscriber-BWaCQFl6.mjs +139 -0
  116. package/dist/SNSSubscriber-BWaCQFl6.mjs.map +1 -0
  117. package/dist/SNSSubscriber-CUgHK4W2.d.mts +55 -0
  118. package/dist/SNSSubscriber-CUgHK4W2.d.mts.map +1 -0
  119. package/dist/SNSSubscriber-ZE_-Hsps.cjs +145 -0
  120. package/dist/SNSSubscriber-ZE_-Hsps.cjs.map +1 -0
  121. package/dist/SNSSubscriber-ZGJjhXFQ.d.cts +55 -0
  122. package/dist/SNSSubscriber-ZGJjhXFQ.d.cts.map +1 -0
  123. package/dist/SQSConnection-BtEkDha8.d.cts +41 -0
  124. package/dist/SQSConnection-BtEkDha8.d.cts.map +1 -0
  125. package/dist/SQSConnection-CT3S7_zP.mjs +70 -0
  126. package/dist/SQSConnection-CT3S7_zP.mjs.map +1 -0
  127. package/dist/SQSConnection-DVy43GCV.d.mts +41 -0
  128. package/dist/SQSConnection-DVy43GCV.d.mts.map +1 -0
  129. package/dist/SQSConnection-Y0mdVTcB.cjs +76 -0
  130. package/dist/SQSConnection-Y0mdVTcB.cjs.map +1 -0
  131. package/dist/SQSPublisher-B-32CC4G.mjs +57 -0
  132. package/dist/SQSPublisher-B-32CC4G.mjs.map +1 -0
  133. package/dist/SQSPublisher-CgUduk6H.cjs +63 -0
  134. package/dist/SQSPublisher-CgUduk6H.cjs.map +1 -0
  135. package/dist/SQSPublisher-kyl5HW3N.d.cts +25 -0
  136. package/dist/SQSPublisher-kyl5HW3N.d.cts.map +1 -0
  137. package/dist/SQSPublisher-qDE5Fp-N.d.mts +25 -0
  138. package/dist/SQSPublisher-qDE5Fp-N.d.mts.map +1 -0
  139. package/dist/SQSSubscriber-C4UA2hKq.cjs +120 -0
  140. package/dist/SQSSubscriber-C4UA2hKq.cjs.map +1 -0
  141. package/dist/SQSSubscriber-CDvaG4ij.d.cts +44 -0
  142. package/dist/SQSSubscriber-CDvaG4ij.d.cts.map +1 -0
  143. package/dist/SQSSubscriber-CQdSFzpe.mjs +114 -0
  144. package/dist/SQSSubscriber-CQdSFzpe.mjs.map +1 -0
  145. package/dist/SQSSubscriber-JfFuAAoP.d.mts +44 -0
  146. package/dist/SQSSubscriber-JfFuAAoP.d.mts.map +1 -0
  147. package/dist/Subscriber-CG_QUQZs.d.cts +21 -0
  148. package/dist/Subscriber-CG_QUQZs.d.cts.map +1 -0
  149. package/dist/Subscriber-CghW0A02.cjs +88 -0
  150. package/dist/Subscriber-CghW0A02.cjs.map +1 -0
  151. package/dist/Subscriber-DiYHmuF0.d.mts +21 -0
  152. package/dist/Subscriber-DiYHmuF0.d.mts.map +1 -0
  153. package/dist/Subscriber-bnkFtSvt.mjs +83 -0
  154. package/dist/Subscriber-bnkFtSvt.mjs.map +1 -0
  155. package/dist/Subscriber.cjs +4 -0
  156. package/dist/Subscriber.d.cts +3 -0
  157. package/dist/Subscriber.d.mts +3 -0
  158. package/dist/Subscriber.mjs +4 -0
  159. package/dist/basic/BasicConnection.cjs +4 -0
  160. package/dist/basic/BasicConnection.d.cts +3 -0
  161. package/dist/basic/BasicConnection.d.mts +3 -0
  162. package/dist/basic/BasicConnection.mjs +4 -0
  163. package/dist/basic/BasicPublisher.cjs +3 -0
  164. package/dist/basic/BasicPublisher.d.cts +4 -0
  165. package/dist/basic/BasicPublisher.d.mts +4 -0
  166. package/dist/basic/BasicPublisher.mjs +3 -0
  167. package/dist/basic/BasicSubscriber.cjs +3 -0
  168. package/dist/basic/BasicSubscriber.d.cts +4 -0
  169. package/dist/basic/BasicSubscriber.d.mts +4 -0
  170. package/dist/basic/BasicSubscriber.mjs +3 -0
  171. package/dist/basic/index.cjs +7 -100
  172. package/dist/basic/index.d.cts +5 -45
  173. package/dist/basic/index.d.mts +5 -45
  174. package/dist/basic/index.mjs +5 -96
  175. package/dist/{rolldown-runtime-C0BPl7ul.cjs → chunk-CUT6urMc.cjs} +10 -23
  176. package/dist/index.cjs +8 -87
  177. package/dist/index.d.cts +5 -102
  178. package/dist/index.d.mts +5 -102
  179. package/dist/index.mjs +5 -71
  180. package/dist/pgboss/PgBossConnection.cjs +4 -0
  181. package/dist/pgboss/PgBossConnection.d.cts +3 -0
  182. package/dist/pgboss/PgBossConnection.d.mts +3 -0
  183. package/dist/pgboss/PgBossConnection.mjs +4 -0
  184. package/dist/pgboss/PgBossPublisher.cjs +3 -0
  185. package/dist/pgboss/PgBossPublisher.d.cts +4 -0
  186. package/dist/pgboss/PgBossPublisher.d.mts +4 -0
  187. package/dist/pgboss/PgBossPublisher.mjs +3 -0
  188. package/dist/pgboss/PgBossSubscriber.cjs +3 -0
  189. package/dist/pgboss/PgBossSubscriber.d.cts +4 -0
  190. package/dist/pgboss/PgBossSubscriber.d.mts +4 -0
  191. package/dist/pgboss/PgBossSubscriber.mjs +3 -0
  192. package/dist/pgboss/index.cjs +7 -247
  193. package/dist/pgboss/index.d.cts +5 -107
  194. package/dist/pgboss/index.d.mts +5 -107
  195. package/dist/pgboss/index.mjs +5 -240
  196. package/dist/rabbitmq/RabbitMQConnection.cjs +4 -0
  197. package/dist/rabbitmq/RabbitMQConnection.d.cts +3 -0
  198. package/dist/rabbitmq/RabbitMQConnection.d.mts +3 -0
  199. package/dist/rabbitmq/RabbitMQConnection.mjs +4 -0
  200. package/dist/rabbitmq/RabbitMQPublisher.cjs +3 -0
  201. package/dist/rabbitmq/RabbitMQPublisher.d.cts +4 -0
  202. package/dist/rabbitmq/RabbitMQPublisher.d.mts +4 -0
  203. package/dist/rabbitmq/RabbitMQPublisher.mjs +3 -0
  204. package/dist/rabbitmq/RabbitMQSubscriber.cjs +3 -0
  205. package/dist/rabbitmq/RabbitMQSubscriber.d.cts +4 -0
  206. package/dist/rabbitmq/RabbitMQSubscriber.d.mts +4 -0
  207. package/dist/rabbitmq/RabbitMQSubscriber.mjs +3 -0
  208. package/dist/rabbitmq/index.cjs +7 -243
  209. package/dist/rabbitmq/index.d.cts +5 -92
  210. package/dist/rabbitmq/index.d.mts +5 -92
  211. package/dist/rabbitmq/index.mjs +5 -237
  212. package/dist/sns/SNSConnection.cjs +4 -0
  213. package/dist/sns/SNSConnection.d.cts +3 -0
  214. package/dist/sns/SNSConnection.d.mts +3 -0
  215. package/dist/sns/SNSConnection.mjs +4 -0
  216. package/dist/sns/SNSPublisher.cjs +3 -0
  217. package/dist/sns/SNSPublisher.d.cts +4 -0
  218. package/dist/sns/SNSPublisher.d.mts +4 -0
  219. package/dist/sns/SNSPublisher.mjs +3 -0
  220. package/dist/sns/SNSSubscriber.cjs +6 -0
  221. package/dist/sns/SNSSubscriber.d.cts +4 -0
  222. package/dist/sns/SNSSubscriber.d.mts +4 -0
  223. package/dist/sns/SNSSubscriber.mjs +6 -0
  224. package/dist/sns/index.cjs +9 -551
  225. package/dist/sns/index.d.cts +5 -273
  226. package/dist/sns/index.d.mts +5 -273
  227. package/dist/sns/index.mjs +7 -527
  228. package/dist/sqs/SQSConnection.cjs +4 -0
  229. package/dist/sqs/SQSConnection.d.cts +3 -0
  230. package/dist/sqs/SQSConnection.d.mts +3 -0
  231. package/dist/sqs/SQSConnection.mjs +4 -0
  232. package/dist/sqs/SQSPublisher.cjs +3 -0
  233. package/dist/sqs/SQSPublisher.d.cts +4 -0
  234. package/dist/sqs/SQSPublisher.d.mts +4 -0
  235. package/dist/sqs/SQSPublisher.mjs +3 -0
  236. package/dist/sqs/SQSSubscriber.cjs +3 -0
  237. package/dist/sqs/SQSSubscriber.d.cts +4 -0
  238. package/dist/sqs/SQSSubscriber.d.mts +4 -0
  239. package/dist/sqs/SQSSubscriber.mjs +3 -0
  240. package/dist/sqs/index.cjs +7 -35
  241. package/dist/sqs/index.d.cts +5 -118
  242. package/dist/sqs/index.d.mts +5 -118
  243. package/dist/sqs/index.mjs +5 -24
  244. package/dist/types-BrdcSEnd.mjs +18 -0
  245. package/dist/types-BrdcSEnd.mjs.map +1 -0
  246. package/dist/types-Byv8N9ma.cjs +24 -0
  247. package/dist/types-Byv8N9ma.cjs.map +1 -0
  248. package/dist/types-Dh9Jyinx.d.mts +67 -0
  249. package/dist/types-Dh9Jyinx.d.mts.map +1 -0
  250. package/dist/types-Dj23od3e.d.cts +67 -0
  251. package/dist/types-Dj23od3e.d.cts.map +1 -0
  252. package/dist/types.cjs +3 -0
  253. package/dist/types.d.cts +2 -0
  254. package/dist/types.d.mts +2 -0
  255. package/dist/types.mjs +3 -0
  256. package/package.json +12 -40
  257. package/src/EventConnection.ts +43 -0
  258. package/src/Publisher.ts +98 -0
  259. package/src/Subscriber.ts +113 -0
  260. package/src/__tests__/EventConnection.spec.ts +42 -0
  261. package/src/__tests__/Publisher.spec.ts +96 -0
  262. package/src/__tests__/Subscriber.spec.ts +109 -0
  263. package/src/basic/BasicConnection.ts +47 -0
  264. package/src/basic/BasicPublisher.ts +15 -0
  265. package/src/basic/BasicSubscriber.ts +21 -0
  266. package/src/basic/__tests__/BasicSubscriber.spec.ts +166 -0
  267. package/src/basic/index.ts +3 -0
  268. package/src/index.ts +25 -0
  269. package/src/pgboss/PgBossConnection.ts +91 -0
  270. package/src/pgboss/PgBossPublisher.ts +49 -0
  271. package/src/pgboss/PgBossSubscriber.ts +81 -0
  272. package/src/pgboss/__tests__/pgboss.spec.ts +196 -0
  273. package/src/pgboss/__tests__/setup.ts +21 -0
  274. package/src/pgboss/index.ts +5 -0
  275. package/src/rabbitmq/RabbitMQConnection.ts +148 -0
  276. package/src/rabbitmq/RabbitMQPublisher.ts +67 -0
  277. package/src/rabbitmq/RabbitMQSubscriber.ts +111 -0
  278. package/src/rabbitmq/__tests__/RabbitMQPublisher.spec.ts +378 -0
  279. package/src/rabbitmq/__tests__/RabbitMQSubscriber.spec.ts +292 -0
  280. package/src/rabbitmq/index.ts +6 -0
  281. package/src/sns/SNSConnection.ts +98 -0
  282. package/src/sns/SNSPublisher.ts +62 -0
  283. package/src/sns/SNSSubscriber.ts +218 -0
  284. package/src/sns/__tests__/SNS-SQS-Integration.spec.ts +389 -0
  285. package/src/sns/__tests__/SNSPublisher.spec.ts +449 -0
  286. package/src/sns/__tests__/SNSSubscriber.spec.ts +527 -0
  287. package/src/sns/index.ts +6 -0
  288. package/src/sqs/SQSConnection.ts +97 -0
  289. package/src/sqs/SQSPublisher.ts +105 -0
  290. package/src/sqs/SQSSubscriber.ts +181 -0
  291. package/src/sqs/__tests__/SQSPublisher.spec.ts +189 -0
  292. package/src/sqs/index.ts +6 -0
  293. package/src/types.ts +76 -0
  294. package/tsconfig.json +9 -0
  295. package/tsdown.config.ts +10 -0
  296. package/dist/SQSSubscriber-BEJBfNTe.mjs +0 -264
  297. package/dist/SQSSubscriber-BEJBfNTe.mjs.map +0 -1
  298. package/dist/SQSSubscriber-COTqWvOk.cjs +0 -288
  299. package/dist/SQSSubscriber-COTqWvOk.cjs.map +0 -1
  300. package/dist/basic/index.cjs.map +0 -1
  301. package/dist/basic/index.d.cts.map +0 -1
  302. package/dist/basic/index.d.mts.map +0 -1
  303. package/dist/basic/index.mjs.map +0 -1
  304. package/dist/index.cjs.map +0 -1
  305. package/dist/index.d.cts.map +0 -1
  306. package/dist/index.d.mts.map +0 -1
  307. package/dist/index.mjs.map +0 -1
  308. package/dist/pgboss/index.cjs.map +0 -1
  309. package/dist/pgboss/index.d.cts.map +0 -1
  310. package/dist/pgboss/index.d.mts.map +0 -1
  311. package/dist/pgboss/index.mjs.map +0 -1
  312. package/dist/rabbitmq/index.cjs.map +0 -1
  313. package/dist/rabbitmq/index.d.cts.map +0 -1
  314. package/dist/rabbitmq/index.d.mts.map +0 -1
  315. package/dist/rabbitmq/index.mjs.map +0 -1
  316. package/dist/registry-DIx25Q5s.d.cts +0 -255
  317. package/dist/registry-DIx25Q5s.d.cts.map +0 -1
  318. package/dist/registry-DIx25Q5s.d.mts +0 -255
  319. package/dist/registry-DIx25Q5s.d.mts.map +0 -1
  320. package/dist/registry-DXLY1Xf6.mjs +0 -99
  321. package/dist/registry-DXLY1Xf6.mjs.map +0 -1
  322. package/dist/registry-DlT36229.cjs +0 -122
  323. package/dist/registry-DlT36229.cjs.map +0 -1
  324. package/dist/rolldown-runtime-D7D4PA-g.mjs +0 -13
  325. package/dist/sns/index.cjs.map +0 -1
  326. package/dist/sns/index.d.cts.map +0 -1
  327. package/dist/sns/index.d.mts.map +0 -1
  328. package/dist/sns/index.mjs.map +0 -1
  329. package/dist/sns/snsUrl.cjs +0 -92
  330. package/dist/sns/snsUrl.cjs.map +0 -1
  331. package/dist/sns/snsUrl.d.cts +0 -57
  332. package/dist/sns/snsUrl.d.cts.map +0 -1
  333. package/dist/sns/snsUrl.d.mts +0 -57
  334. package/dist/sns/snsUrl.d.mts.map +0 -1
  335. package/dist/sns/snsUrl.mjs +0 -82
  336. package/dist/sns/snsUrl.mjs.map +0 -1
  337. package/dist/sqs/index.cjs.map +0 -1
  338. package/dist/sqs/index.d.cts.map +0 -1
  339. package/dist/sqs/index.d.mts.map +0 -1
  340. package/dist/sqs/index.mjs.map +0 -1
  341. package/dist/sqs/sqsUrl.cjs +0 -93
  342. package/dist/sqs/sqsUrl.cjs.map +0 -1
  343. package/dist/sqs/sqsUrl.d.cts +0 -56
  344. package/dist/sqs/sqsUrl.d.cts.map +0 -1
  345. package/dist/sqs/sqsUrl.d.mts +0 -56
  346. package/dist/sqs/sqsUrl.d.mts.map +0 -1
  347. package/dist/sqs/sqsUrl.mjs +0 -83
  348. package/dist/sqs/sqsUrl.mjs.map +0 -1
  349. package/dist/telemetry-DG3l807O.cjs +0 -309
  350. package/dist/telemetry-DG3l807O.cjs.map +0 -1
  351. package/dist/telemetry-DjjgJMul.mjs +0 -244
  352. package/dist/telemetry-DjjgJMul.mjs.map +0 -1
@@ -1,528 +1,8 @@
1
- import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
- import { n as carrierAsAttributes, s as publishTraced } from "../telemetry-DjjgJMul.mjs";
3
- import { i as SQSConnection, t as SQSSubscriber } from "../SQSSubscriber-BEJBfNTe.mjs";
4
- import { parse, t as snsUrl_exports } from "./snsUrl.mjs";
5
- import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, SQSClient, SetQueueAttributesCommand } from "@aws-sdk/client-sqs";
6
- import { GetSubscriptionAttributesCommand, ListSubscriptionsByTopicCommand, PublishCommand, SNSClient, SetSubscriptionAttributesCommand, SubscribeCommand, UnsubscribeCommand } from "@aws-sdk/client-sns";
7
- import { createVerify } from "node:crypto";
8
- //#region src/sns/SNSConnection.ts
9
- var SNSConnection_exports = /* @__PURE__ */ __exportAll({ SNSConnection: () => SNSConnection });
10
- var SNSConnection = class SNSConnection {
11
- type = "sns";
12
- client;
13
- connected = false;
14
- config;
15
- constructor(config) {
16
- this.config = config;
17
- const clientConfig = {
18
- region: config.region,
19
- endpoint: config.endpoint,
20
- credentials: config.credentials
21
- };
22
- this.client = new SNSClient(clientConfig);
23
- }
24
- /**
25
- * Create an SNSConnection from a connection string
26
- * Format: sns://?topicArn=arn:aws:sns:region:account:topic&region=us-east-1&endpoint=http://localhost:4566
27
- */
28
- static async fromConnectionString(connectionString) {
29
- const { topicArn, region, endpoint } = parse(connectionString);
30
- const params = new URL(connectionString).searchParams;
31
- const config = {
32
- topicArn,
33
- region,
34
- endpoint
35
- };
36
- const accessKeyId = params.get("accessKeyId");
37
- const secretAccessKey = params.get("secretAccessKey");
38
- if (accessKeyId && secretAccessKey) config.credentials = {
39
- accessKeyId,
40
- secretAccessKey,
41
- sessionToken: params.get("sessionToken") || void 0
42
- };
43
- const connection = new SNSConnection(config);
44
- await connection.connect();
45
- return connection;
46
- }
47
- async connect() {
48
- this.connected = true;
49
- }
50
- async close() {
51
- this.client.destroy();
52
- this.connected = false;
53
- }
54
- isConnected() {
55
- return this.connected;
56
- }
57
- /**
58
- * Get the underlying SNS client
59
- */
60
- get snsClient() {
61
- return this.client;
62
- }
63
- /**
64
- * Get the topic ARN for this connection
65
- */
66
- get topicArn() {
67
- return this.config.topicArn;
68
- }
69
- };
70
- //#endregion
71
- //#region src/sns/SNSPublisher.ts
72
- var SNSPublisher = class SNSPublisher {
73
- connection;
74
- constructor(connection, _options = {}) {
75
- this.connection = connection;
76
- }
77
- /**
78
- * Create an SNSPublisher from a connection string
79
- * Format: sns://?topicArn=arn:aws:sns:region:account:topic&region=us-east-1&endpoint=http://localhost:4566
80
- */
81
- static async fromConnectionString(connectionString) {
82
- const { SNSConnection } = await Promise.resolve().then(() => SNSConnection_exports);
83
- const connection = await SNSConnection.fromConnectionString(connectionString);
84
- return new SNSPublisher(connection);
85
- }
86
- async publish(messages) {
87
- if (messages.length === 0) return;
88
- if (!this.connection.isConnected()) await this.connection.connect();
89
- const topicArn = this.connection.topicArn;
90
- const destination = topicArn.split(":").pop() ?? topicArn;
91
- await publishTraced(messages, (message) => ({
92
- system: "aws_sns",
93
- destination,
94
- type: message.type
95
- }), (carriers) => Promise.all(messages.map((message, i) => this.publishMessage(message, carriers[i]))));
96
- }
97
- async publishMessage(message, carrier) {
98
- const command = new PublishCommand({
99
- TopicArn: this.connection.topicArn,
100
- Message: JSON.stringify({
101
- type: message.type,
102
- payload: message.payload
103
- }),
104
- MessageAttributes: {
105
- type: {
106
- DataType: "String",
107
- StringValue: message.type
108
- },
109
- ...carrierAsAttributes(carrier)
110
- }
111
- });
112
- await this.connection.snsClient.send(command);
113
- }
114
- async close() {}
115
- };
116
- //#endregion
117
- //#region src/sns/SNSSubscriber.ts
118
- /**
119
- * SNS Subscriber - receives push-based messages from SNS via SQS queue
120
- *
121
- * Architecture:
122
- * SNS Topic → (push) → SQS Queue → Subscriber
123
- *
124
- * This subscriber automatically:
125
- * 1. Creates an SQS queue (or uses existing one)
126
- * 2. Subscribes the queue to the SNS topic
127
- * 3. Receives messages pushed from SNS to the queue
128
- * 4. Filters messages by topic ARN and message type
129
- * 5. Processes and acknowledges messages
130
- *
131
- * Note: While SQS long-polling is used internally to receive messages,
132
- * this is an implementation detail of the SNS push delivery mechanism.
133
- * Messages are pushed from SNS to SQS, and we receive those pushed messages.
134
- */
135
- var SNSSubscriber = class SNSSubscriber {
136
- connection;
137
- sqsClient;
138
- queueUrl;
139
- queueArn;
140
- subscriptionArn;
141
- sqsSubscriber;
142
- options;
143
- constructor(connection, options = {}) {
144
- this.connection = connection;
145
- this.options = {
146
- queueName: options.queueName || `sns-sub-${Date.now()}-${Math.random().toString(36).substring(7)}`,
147
- createQueue: options.createQueue ?? true,
148
- deleteQueueOnClose: options.deleteQueueOnClose ?? !options.queueName,
149
- waitTimeSeconds: options.waitTimeSeconds ?? 20,
150
- maxMessages: options.maxMessages ?? 10
151
- };
152
- this.sqsClient = new SQSClient({
153
- region: this.connection.config.region,
154
- endpoint: this.connection.config.endpoint,
155
- credentials: this.connection.config.credentials
156
- });
157
- }
158
- /**
159
- * Create an SNSSubscriber from a connection string
160
- * Format: sns://?topicArn=...&queueName=myqueue&region=us-east-1
161
- */
162
- static async fromConnectionString(connectionString) {
163
- const params = new URL(connectionString).searchParams;
164
- const { SNSConnection } = await Promise.resolve().then(() => SNSConnection_exports);
165
- const connection = await SNSConnection.fromConnectionString(connectionString);
166
- const options = {
167
- queueName: params.get("queueName") || void 0,
168
- createQueue: params.get("createQueue") !== "false",
169
- deleteQueueOnClose: params.get("deleteQueueOnClose") === "true",
170
- waitTimeSeconds: params.get("waitTimeSeconds") ? Number.parseInt(params.get("waitTimeSeconds"), 10) : void 0
171
- };
172
- return new SNSSubscriber(connection, options);
173
- }
174
- async subscribe(messages, listener) {
175
- await this.setupQueue();
176
- await this.subscribeToTopic();
177
- const sqsConnection = new SQSConnection({
178
- queueUrl: this.queueUrl,
179
- region: this.connection.config.region,
180
- endpoint: this.connection.config.endpoint,
181
- credentials: this.connection.config.credentials
182
- });
183
- await sqsConnection.connect();
184
- this.sqsSubscriber = new SQSSubscriber(sqsConnection, {
185
- waitTimeSeconds: this.options.waitTimeSeconds,
186
- maxMessages: this.options.maxMessages,
187
- expectedTopicArn: this.connection.topicArn
188
- });
189
- await this.sqsSubscriber.subscribe(messages, listener);
190
- }
191
- /**
192
- * Stop receiving messages and clean up resources
193
- */
194
- async stop() {
195
- if (this.sqsSubscriber) this.sqsSubscriber.stop();
196
- if (this.subscriptionArn) try {
197
- const command = new UnsubscribeCommand({ SubscriptionArn: this.subscriptionArn });
198
- await this.connection.snsClient.send(command);
199
- } catch (_error) {}
200
- if (this.queueUrl && this.options.deleteQueueOnClose) try {
201
- const command = new DeleteQueueCommand({ QueueUrl: this.queueUrl });
202
- await this.sqsClient.send(command);
203
- } catch (_error) {}
204
- this.sqsClient.destroy();
205
- }
206
- async setupQueue() {
207
- if (this.options.createQueue) {
208
- const createCommand = new CreateQueueCommand({ QueueName: this.options.queueName });
209
- const response = await this.sqsClient.send(createCommand);
210
- this.queueUrl = response.QueueUrl;
211
- } else throw new SnsQueueMissing(this.options.queueName);
212
- const attrsCommand = new GetQueueAttributesCommand({
213
- QueueUrl: this.queueUrl,
214
- AttributeNames: ["QueueArn"]
215
- });
216
- const attrsResponse = await this.sqsClient.send(attrsCommand);
217
- this.queueArn = attrsResponse.Attributes?.QueueArn;
218
- await this.setQueuePolicy();
219
- }
220
- async setQueuePolicy() {
221
- const policy = {
222
- Version: "2012-10-17",
223
- Statement: [{
224
- Effect: "Allow",
225
- Principal: "*",
226
- Action: "SQS:SendMessage",
227
- Resource: this.queueArn,
228
- Condition: { ArnEquals: { "aws:SourceArn": this.connection.topicArn } }
229
- }]
230
- };
231
- const command = new SetQueueAttributesCommand({
232
- QueueUrl: this.queueUrl,
233
- Attributes: { Policy: JSON.stringify(policy) }
234
- });
235
- await this.sqsClient.send(command);
236
- }
237
- async subscribeToTopic() {
238
- const command = new SubscribeCommand({
239
- TopicArn: this.connection.topicArn,
240
- Protocol: "sqs",
241
- Endpoint: this.queueArn
242
- });
243
- const response = await this.connection.snsClient.send(command);
244
- this.subscriptionArn = response.SubscriptionArn;
245
- }
246
- };
247
- /**
248
- * A subscriber asked to use a queue it may not create. The SQS queue behind an
249
- * SNS subscription has to exist first, or `createQueue` has to allow it.
250
- */
251
- var SnsQueueMissing = class extends Error {
252
- queueName;
253
- constructor(queueName) {
254
- super(`The SNS subscriber's queue${queueName ? ` "${queueName}"` : ""} is not created here: pass createQueue: true, or create the queue first.`);
255
- this.queueName = queueName;
256
- this.name = "SnsQueueMissing";
257
- }
258
- };
259
- //#endregion
260
- //#region src/sns/driver.ts
261
- /**
262
- * `sns://` — an SNS topic, consumed through an SQS queue subscribed to it.
263
- * Register it with `registerEventsDriver(snsEventsDriver)`; an AWS entry
264
- * registers `sqsEventsDriver` beside it.
265
- */
266
- const snsEventsDriver = {
267
- scheme: "sns",
268
- connect: (url) => SNSConnection.fromConnectionString(url),
269
- publisher: (url) => SNSPublisher.fromConnectionString(url),
270
- publisherFor: (connection) => new SNSPublisher(connection),
271
- subscriber: (url) => SNSSubscriber.fromConnectionString(url),
272
- subscriberFor: (connection) => new SNSSubscriber(connection)
273
- };
274
- //#endregion
275
- //#region src/sns/push.ts
276
- /** The fields signed, in the order SNS signs them, per message type. */
277
- const SIGNED_FIELDS = {
278
- Notification: [
279
- "Message",
280
- "MessageId",
281
- "Subject",
282
- "Timestamp",
283
- "TopicArn",
284
- "Type"
285
- ],
286
- SubscriptionConfirmation: [
287
- "Message",
288
- "MessageId",
289
- "SubscribeURL",
290
- "Timestamp",
291
- "Token",
292
- "TopicArn",
293
- "Type"
294
- ],
295
- UnsubscribeConfirmation: [
296
- "Message",
297
- "MessageId",
298
- "SubscribeURL",
299
- "Timestamp",
300
- "Token",
301
- "TopicArn",
302
- "Type"
303
- ]
304
- };
305
- /**
306
- * Where SNS serves its signing certificates. Anywhere else is a certificate
307
- * the sender chose, which would let the sender sign its own forgeries.
308
- */
309
- const SNS_CERTIFICATE_HOST = /^sns\.[a-z0-9-]+\.amazonaws\.com(\.cn)?$/;
310
- const certificates = /* @__PURE__ */ new Map();
311
- async function defaultFetchCertificate(url) {
312
- const response = await fetch(url);
313
- if (!response.ok) throw new SnsCertificateUnavailable(url, response.status);
314
- return response.text();
315
- }
316
- /**
317
- * A URL, or undefined for a value that is not one at all — what an emulator
318
- * sends — so it is untrusted rather than a crash. (`URL.parse` is Node 22.1+.)
319
- */
320
- function parseUrl(value) {
321
- try {
322
- return new URL(String(value));
323
- } catch {
324
- return;
325
- }
326
- }
327
- /** The string SNS signed for this message. */
328
- function snsStringToSign(message) {
329
- const fields = SIGNED_FIELDS[message.Type];
330
- if (!fields) throw new SnsMessageTypeUnknown(String(message.Type));
331
- return fields.filter((field) => message[field] !== void 0).map((field) => `${field}\n${message[field]}\n`).join("");
332
- }
333
- /**
334
- * Check that SNS sent this message: the certificate is SNS's own, and the
335
- * signature over the message's signed fields verifies against it.
336
- *
337
- * Throws rather than returning false, so a caller cannot forget to look.
338
- */
339
- async function verifySnsMessage(message, options = {}) {
340
- const url = parseUrl(message.SigningCertURL);
341
- if (url?.protocol !== "https:" || !SNS_CERTIFICATE_HOST.test(url.hostname)) throw new SnsCertificateUntrusted(message.SigningCertURL);
342
- const algorithm = message.SignatureVersion === "1" ? "RSA-SHA1" : message.SignatureVersion === "2" ? "RSA-SHA256" : void 0;
343
- if (!algorithm) throw new SnsSignatureVersionUnknown(message.SignatureVersion);
344
- const fetchCertificate = options.fetchCertificate ?? defaultFetchCertificate;
345
- let certificate = certificates.get(message.SigningCertURL);
346
- if (!certificate || options.fetchCertificate) {
347
- certificate = fetchCertificate(message.SigningCertURL);
348
- if (!options.fetchCertificate) {
349
- certificates.set(message.SigningCertURL, certificate);
350
- certificate.catch(() => certificates.delete(message.SigningCertURL));
351
- }
352
- }
353
- const verifier = createVerify(algorithm);
354
- verifier.update(snsStringToSign(message), "utf8");
355
- if (!verifier.verify(await certificate, message.Signature, "base64")) throw new SnsSignatureInvalid(message.MessageId, message.TopicArn);
356
- }
357
- /**
358
- * Confirm a subscription by visiting the URL SNS sent. Until this happens SNS
359
- * delivers nothing to the endpoint.
360
- */
361
- async function confirmSnsSubscription(message, request = fetch) {
362
- if (message.Type !== "SubscriptionConfirmation" || !message.SubscribeURL) throw new SnsNotAConfirmation(message.Type);
363
- const response = await request(message.SubscribeURL);
364
- if (!response.ok) throw new SnsConfirmationFailed(message.TopicArn, response.status);
365
- }
366
- /**
367
- * Subscribe an HTTP endpoint to the connection's topic, converging on one
368
- * confirmed subscription with the filter asked for — so it is safe on every
369
- * start:
370
- *
371
- * - **none yet** — subscribed; SNS sends a confirmation to the endpoint.
372
- * - **confirmed** — its filter and dead-letter queue are brought up to date.
373
- * Subscribing again with different attributes is an error on SNS, and the
374
- * events a subscriber names change.
375
- * - **stuck pending** — a confirmation that never landed (the endpoint was
376
- * down, or answered wrong). Subscribing the same endpoint again is a no-op
377
- * on an emulator, so it is dropped and subscribed afresh, which sends a new
378
- * confirmation.
379
- */
380
- async function subscribeHttpEndpoint(connection, options) {
381
- const protocol = new URL(options.endpoint).protocol.replace(":", "");
382
- if (protocol !== "http" && protocol !== "https") throw new SnsEndpointNotHttp(options.endpoint);
383
- const attributes = {
384
- FilterPolicyScope: "MessageAttributes",
385
- FilterPolicy: JSON.stringify({ type: [...options.events] })
386
- };
387
- if (options.deadLetterQueueArn) attributes.RedrivePolicy = JSON.stringify({ deadLetterTargetArn: options.deadLetterQueueArn });
388
- const client = connection.snsClient;
389
- const existing = await existingSubscription(connection, options.endpoint);
390
- if (existing) {
391
- const { Attributes = {} } = await client.send(new GetSubscriptionAttributesCommand({ SubscriptionArn: existing }));
392
- if (Attributes.PendingConfirmation === "true") await client.send(new UnsubscribeCommand({ SubscriptionArn: existing }));
393
- else {
394
- for (const [name, value] of Object.entries(attributes)) {
395
- if (Attributes[name] === value) continue;
396
- await client.send(new SetSubscriptionAttributesCommand({
397
- SubscriptionArn: existing,
398
- AttributeName: name,
399
- AttributeValue: value
400
- }));
401
- }
402
- return existing;
403
- }
404
- }
405
- const { SubscriptionArn } = await client.send(new SubscribeCommand({
406
- TopicArn: connection.topicArn,
407
- Protocol: protocol,
408
- Endpoint: options.endpoint,
409
- Attributes: attributes,
410
- ReturnSubscriptionArn: true
411
- }));
412
- return SubscriptionArn;
413
- }
414
- /**
415
- * The ARN of the endpoint's subscription to the topic, if it has one SNS will
416
- * name. (Real SNS lists a pending one as `PendingConfirmation`, with no ARN to
417
- * act on — and resends its confirmation on a new Subscribe anyway.)
418
- */
419
- async function existingSubscription(connection, endpoint) {
420
- let NextToken;
421
- do {
422
- const page = await connection.snsClient.send(new ListSubscriptionsByTopicCommand({
423
- TopicArn: connection.topicArn,
424
- NextToken
425
- }));
426
- const match = page.Subscriptions?.find((s) => s.Endpoint === endpoint && s.SubscriptionArn?.startsWith("arn:"));
427
- if (match) return match.SubscriptionArn;
428
- NextToken = page.NextToken;
429
- } while (NextToken);
430
- }
431
- /**
432
- * A pushed notification as the Lambda event SNS would have invoked a function
433
- * with, so it can be handed to the same adaptor.
434
- */
435
- function toSnsEvent(message, subscriptionArn = "") {
436
- return { Records: [{
437
- EventSource: "aws:sns",
438
- EventVersion: "1.0",
439
- EventSubscriptionArn: subscriptionArn,
440
- Sns: {
441
- Type: message.Type,
442
- MessageId: message.MessageId,
443
- TopicArn: message.TopicArn,
444
- Subject: message.Subject ?? null,
445
- Message: message.Message,
446
- Timestamp: message.Timestamp,
447
- SignatureVersion: message.SignatureVersion,
448
- Signature: message.Signature,
449
- SigningCertUrl: message.SigningCertURL,
450
- UnsubscribeUrl: message.UnsubscribeURL ?? "",
451
- MessageAttributes: message.MessageAttributes ?? {}
452
- }
453
- }] };
454
- }
455
- var SnsCertificateUntrusted = class extends Error {
456
- url;
457
- constructor(url) {
458
- super(`The SNS message names a signing certificate at '${url}', which is not an https URL on sns.<region>.amazonaws.com. Only SNS can send to this endpoint; reject the request.`);
459
- this.url = url;
460
- this.name = "SnsCertificateUntrusted";
461
- }
462
- };
463
- var SnsCertificateUnavailable = class extends Error {
464
- url;
465
- status;
466
- constructor(url, status) {
467
- super(`Fetching the SNS signing certificate at '${url}' answered ${status}. The message cannot be verified, so it is not handled; SNS will retry.`);
468
- this.url = url;
469
- this.status = status;
470
- this.name = "SnsCertificateUnavailable";
471
- }
472
- };
473
- var SnsSignatureVersionUnknown = class extends Error {
474
- version;
475
- constructor(version) {
476
- super(`SNS signature version '${version}' is not one this endpoint verifies (it knows '1' and '2'). Reject the request.`);
477
- this.version = version;
478
- this.name = "SnsSignatureVersionUnknown";
479
- }
480
- };
481
- var SnsSignatureInvalid = class extends Error {
482
- messageId;
483
- topicArn;
484
- constructor(messageId, topicArn) {
485
- super(`SNS message '${messageId}' from '${topicArn}' does not verify against its signing certificate. It was not sent by SNS, or was altered on the way; reject it.`);
486
- this.messageId = messageId;
487
- this.topicArn = topicArn;
488
- this.name = "SnsSignatureInvalid";
489
- }
490
- };
491
- var SnsMessageTypeUnknown = class extends Error {
492
- type;
493
- constructor(type) {
494
- super(`'${type}' is not an SNS message type (Notification, SubscriptionConfirmation, UnsubscribeConfirmation). Reject it.`);
495
- this.type = type;
496
- this.name = "SnsMessageTypeUnknown";
497
- }
498
- };
499
- var SnsNotAConfirmation = class extends Error {
500
- type;
501
- constructor(type) {
502
- super(`Only a SubscriptionConfirmation carries a URL to confirm; this is a '${type}'.`);
503
- this.type = type;
504
- this.name = "SnsNotAConfirmation";
505
- }
506
- };
507
- var SnsConfirmationFailed = class extends Error {
508
- topicArn;
509
- status;
510
- constructor(topicArn, status) {
511
- super(`Confirming the subscription to '${topicArn}' answered ${status}. SNS will deliver nothing until it is confirmed; it resends the confirmation, or subscribe the endpoint again.`);
512
- this.topicArn = topicArn;
513
- this.status = status;
514
- this.name = "SnsConfirmationFailed";
515
- }
516
- };
517
- var SnsEndpointNotHttp = class extends Error {
518
- endpoint;
519
- constructor(endpoint) {
520
- super(`'${endpoint}' is not an http(s) URL. SNS pushes to an HTTP endpoint; subscribe a queue for anything else.`);
521
- this.endpoint = endpoint;
522
- this.name = "SnsEndpointNotHttp";
523
- }
524
- };
525
- //#endregion
526
- export { SNSConnection, SNSPublisher, SNSSubscriber, SnsCertificateUnavailable, SnsCertificateUntrusted, SnsConfirmationFailed, SnsEndpointNotHttp, SnsMessageTypeUnknown, SnsNotAConfirmation, SnsQueueMissing, SnsSignatureInvalid, SnsSignatureVersionUnknown, confirmSnsSubscription, snsEventsDriver, snsStringToSign, snsUrl_exports as snsUrl, subscribeHttpEndpoint, toSnsEvent, verifySnsMessage };
1
+ import "../types-BrdcSEnd.mjs";
2
+ import { SNSConnection } from "../SNSConnection-CVjH93lb.mjs";
3
+ import { SNSPublisher } from "../SNSPublisher-CjlMS3Z2.mjs";
4
+ import "../SQSConnection-CT3S7_zP.mjs";
5
+ import "../SQSSubscriber-CQdSFzpe.mjs";
6
+ import { SNSSubscriber } from "../SNSSubscriber-BWaCQFl6.mjs";
527
7
 
528
- //# sourceMappingURL=index.mjs.map
8
+ export { SNSConnection, SNSPublisher, SNSSubscriber };
@@ -0,0 +1,4 @@
1
+ require('../types-Byv8N9ma.cjs');
2
+ const require_SQSConnection = require('../SQSConnection-Y0mdVTcB.cjs');
3
+
4
+ exports.SQSConnection = require_SQSConnection.SQSConnection;
@@ -0,0 +1,3 @@
1
+ import "../types-Dj23od3e.cjs";
2
+ import { SQSConnection, SQSConnectionConfig } from "../SQSConnection-BtEkDha8.cjs";
3
+ export { SQSConnection, SQSConnectionConfig };
@@ -0,0 +1,3 @@
1
+ import "../types-Dh9Jyinx.mjs";
2
+ import { SQSConnection, SQSConnectionConfig } from "../SQSConnection-DVy43GCV.mjs";
3
+ export { SQSConnection, SQSConnectionConfig };
@@ -0,0 +1,4 @@
1
+ import "../types-BrdcSEnd.mjs";
2
+ import { SQSConnection } from "../SQSConnection-CT3S7_zP.mjs";
3
+
4
+ export { SQSConnection };
@@ -0,0 +1,3 @@
1
+ const require_SQSPublisher = require('../SQSPublisher-CgUduk6H.cjs');
2
+
3
+ exports.SQSPublisher = require_SQSPublisher.SQSPublisher;
@@ -0,0 +1,4 @@
1
+ import "../types-Dj23od3e.cjs";
2
+ import "../SQSConnection-BtEkDha8.cjs";
3
+ import { SQSPublisher, SQSPublisherOptions } from "../SQSPublisher-kyl5HW3N.cjs";
4
+ export { SQSPublisher, SQSPublisherOptions };
@@ -0,0 +1,4 @@
1
+ import "../types-Dh9Jyinx.mjs";
2
+ import "../SQSConnection-DVy43GCV.mjs";
3
+ import { SQSPublisher, SQSPublisherOptions } from "../SQSPublisher-qDE5Fp-N.mjs";
4
+ export { SQSPublisher, SQSPublisherOptions };
@@ -0,0 +1,3 @@
1
+ import { SQSPublisher } from "../SQSPublisher-B-32CC4G.mjs";
2
+
3
+ export { SQSPublisher };
@@ -0,0 +1,3 @@
1
+ const require_SQSSubscriber = require('../SQSSubscriber-C4UA2hKq.cjs');
2
+
3
+ exports.SQSSubscriber = require_SQSSubscriber.SQSSubscriber;
@@ -0,0 +1,4 @@
1
+ import "../types-Dj23od3e.cjs";
2
+ import "../SQSConnection-BtEkDha8.cjs";
3
+ import { SQSSubscriber, SQSSubscriberOptions } from "../SQSSubscriber-CDvaG4ij.cjs";
4
+ export { SQSSubscriber, SQSSubscriberOptions };
@@ -0,0 +1,4 @@
1
+ import "../types-Dh9Jyinx.mjs";
2
+ import "../SQSConnection-DVy43GCV.mjs";
3
+ import { SQSSubscriber, SQSSubscriberOptions } from "../SQSSubscriber-JfFuAAoP.mjs";
4
+ export { SQSSubscriber, SQSSubscriberOptions };
@@ -0,0 +1,3 @@
1
+ import { SQSSubscriber } from "../SQSSubscriber-CQdSFzpe.mjs";
2
+
3
+ export { SQSSubscriber };
@@ -1,36 +1,8 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../telemetry-DG3l807O.cjs");
3
- const require_registry = require("../registry-DlT36229.cjs");
4
- const require_sqs_sqsUrl = require("./sqsUrl.cjs");
5
- const require_SQSSubscriber = require("../SQSSubscriber-COTqWvOk.cjs");
6
- //#region src/sqs/driver.ts
7
- /**
8
- * `sqs://` — an SQS queue. Register it with
9
- * `registerEventsDriver(sqsEventsDriver)`; this subpath is the only one that
10
- * imports `@aws-sdk/client-sqs` on its own.
11
- */
12
- const sqsEventsDriver = {
13
- scheme: "sqs",
14
- connect: (url) => require_SQSSubscriber.SQSConnection.fromConnectionString(url),
15
- publisher: (url) => require_SQSSubscriber.SQSPublisher.fromConnectionString(url),
16
- publisherFor: (connection) => new require_SQSSubscriber.SQSPublisher(connection),
17
- async subscriber(url) {
18
- if (new URL(url).searchParams.get("topicArn")) return require_registry.eventsDriverFor("sns", "subscriber").subscriber(url.replace(/^sqs:/, "sns:"));
19
- return new require_SQSSubscriber.SQSSubscriber(await require_SQSSubscriber.SQSConnection.fromConnectionString(url));
20
- },
21
- subscriberFor: (connection) => new require_SQSSubscriber.SQSSubscriber(connection)
22
- };
23
- //#endregion
24
- exports.SQSConnection = require_SQSSubscriber.SQSConnection;
25
- exports.SQSPublisher = require_SQSSubscriber.SQSPublisher;
26
- exports.SQSSubscriber = require_SQSSubscriber.SQSSubscriber;
27
- exports.SqsBatchPartlyFailed = require_SQSSubscriber.SqsBatchPartlyFailed;
28
- exports.sqsEventsDriver = sqsEventsDriver;
29
- Object.defineProperty(exports, "sqsUrl", {
30
- enumerable: true,
31
- get: function() {
32
- return require_sqs_sqsUrl.sqsUrl_exports;
33
- }
34
- });
1
+ require('../types-Byv8N9ma.cjs');
2
+ const require_SQSConnection = require('../SQSConnection-Y0mdVTcB.cjs');
3
+ const require_SQSSubscriber = require('../SQSSubscriber-C4UA2hKq.cjs');
4
+ const require_SQSPublisher = require('../SQSPublisher-CgUduk6H.cjs');
35
5
 
36
- //# sourceMappingURL=index.cjs.map
6
+ exports.SQSConnection = require_SQSConnection.SQSConnection;
7
+ exports.SQSPublisher = require_SQSPublisher.SQSPublisher;
8
+ exports.SQSSubscriber = require_SQSSubscriber.SQSSubscriber;