@geekmidas/events 10.0.0-alpha.98 → 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.
- package/CHANGELOG.md +116 -0
- package/README.md +1 -46
- package/dist/BasicConnection-CQsJpx2J.d.cts +27 -0
- package/dist/BasicConnection-CQsJpx2J.d.cts.map +1 -0
- package/dist/BasicConnection-CxfNEvlb.cjs +48 -0
- package/dist/BasicConnection-CxfNEvlb.cjs.map +1 -0
- package/dist/BasicConnection-DcRelT64.d.mts +27 -0
- package/dist/BasicConnection-DcRelT64.d.mts.map +1 -0
- package/dist/BasicConnection-hl-Ogz3a.mjs +42 -0
- package/dist/BasicConnection-hl-Ogz3a.mjs.map +1 -0
- package/dist/BasicPublisher-C-hMX2Hy.d.mts +14 -0
- package/dist/BasicPublisher-C-hMX2Hy.d.mts.map +1 -0
- package/dist/BasicPublisher-CGMXg2I2.d.cts +14 -0
- package/dist/BasicPublisher-CGMXg2I2.d.cts.map +1 -0
- package/dist/BasicPublisher-CXAVKxgq.cjs +20 -0
- package/dist/BasicPublisher-CXAVKxgq.cjs.map +1 -0
- package/dist/BasicPublisher-DogbeHAH.mjs +14 -0
- package/dist/BasicPublisher-DogbeHAH.mjs.map +1 -0
- package/dist/BasicSubscriber-BJSZN22M.mjs +16 -0
- package/dist/BasicSubscriber-BJSZN22M.mjs.map +1 -0
- package/dist/BasicSubscriber-HzSJ_MbB.d.mts +14 -0
- package/dist/BasicSubscriber-HzSJ_MbB.d.mts.map +1 -0
- package/dist/BasicSubscriber-mVJRMXhZ.cjs +22 -0
- package/dist/BasicSubscriber-mVJRMXhZ.cjs.map +1 -0
- package/dist/BasicSubscriber-uW3IOyBj.d.cts +14 -0
- package/dist/BasicSubscriber-uW3IOyBj.d.cts.map +1 -0
- package/dist/EventConnection-4niMI6D8.d.mts +13 -0
- package/dist/EventConnection-4niMI6D8.d.mts.map +1 -0
- package/dist/EventConnection-BkA9FSVL.cjs +45 -0
- package/dist/EventConnection-BkA9FSVL.cjs.map +1 -0
- package/dist/EventConnection-Kr32GAzq.mjs +40 -0
- package/dist/EventConnection-Kr32GAzq.mjs.map +1 -0
- package/dist/EventConnection-dP42P87q.d.cts +13 -0
- package/dist/EventConnection-dP42P87q.d.cts.map +1 -0
- package/dist/EventConnection.cjs +5 -0
- package/dist/EventConnection.d.cts +3 -0
- package/dist/EventConnection.d.mts +3 -0
- package/dist/EventConnection.mjs +4 -0
- package/dist/PgBossConnection-B71ssr72.cjs +80 -0
- package/dist/PgBossConnection-B71ssr72.cjs.map +1 -0
- package/dist/PgBossConnection-Bj_Wo1lQ.mjs +74 -0
- package/dist/PgBossConnection-Bj_Wo1lQ.mjs.map +1 -0
- package/dist/PgBossConnection-DCfLGoHx.d.mts +32 -0
- package/dist/PgBossConnection-DCfLGoHx.d.mts.map +1 -0
- package/dist/PgBossConnection-oto_CAbP.d.cts +32 -0
- package/dist/PgBossConnection-oto_CAbP.d.cts.map +1 -0
- package/dist/PgBossPublisher-Bwo7qSoH.mjs +35 -0
- package/dist/PgBossPublisher-Bwo7qSoH.mjs.map +1 -0
- package/dist/PgBossPublisher-CqjigBVC.d.mts +20 -0
- package/dist/PgBossPublisher-CqjigBVC.d.mts.map +1 -0
- package/dist/PgBossPublisher-FTdYh58W.cjs +41 -0
- package/dist/PgBossPublisher-FTdYh58W.cjs.map +1 -0
- package/dist/PgBossPublisher-JIiB1zpA.d.cts +20 -0
- package/dist/PgBossPublisher-JIiB1zpA.d.cts.map +1 -0
- package/dist/PgBossSubscriber-BUiB1JKf.d.mts +24 -0
- package/dist/PgBossSubscriber-BUiB1JKf.d.mts.map +1 -0
- package/dist/PgBossSubscriber-BubVfuWm.cjs +52 -0
- package/dist/PgBossSubscriber-BubVfuWm.cjs.map +1 -0
- package/dist/PgBossSubscriber-Cozijfdj.d.cts +24 -0
- package/dist/PgBossSubscriber-Cozijfdj.d.cts.map +1 -0
- package/dist/PgBossSubscriber-DopATe80.mjs +46 -0
- package/dist/PgBossSubscriber-DopATe80.mjs.map +1 -0
- package/dist/Publisher-CKloIGh6.cjs +79 -0
- package/dist/Publisher-CKloIGh6.cjs.map +1 -0
- package/dist/Publisher-ChLTrUeP.mjs +74 -0
- package/dist/Publisher-ChLTrUeP.mjs.map +1 -0
- package/dist/Publisher-DDee6xau.d.cts +21 -0
- package/dist/Publisher-DDee6xau.d.cts.map +1 -0
- package/dist/Publisher-VHumMkrP.d.mts +21 -0
- package/dist/Publisher-VHumMkrP.d.mts.map +1 -0
- package/dist/Publisher.cjs +4 -0
- package/dist/Publisher.d.cts +3 -0
- package/dist/Publisher.d.mts +3 -0
- package/dist/Publisher.mjs +4 -0
- package/dist/RabbitMQConnection-BtKZjtZY.mjs +107 -0
- package/dist/RabbitMQConnection-BtKZjtZY.mjs.map +1 -0
- package/dist/RabbitMQConnection-DV9t3VYp.d.mts +44 -0
- package/dist/RabbitMQConnection-DV9t3VYp.d.mts.map +1 -0
- package/dist/RabbitMQConnection-DmMMosT4.cjs +113 -0
- package/dist/RabbitMQConnection-DmMMosT4.cjs.map +1 -0
- package/dist/RabbitMQConnection-jNME_eR7.d.cts +44 -0
- package/dist/RabbitMQConnection-jNME_eR7.d.cts.map +1 -0
- package/dist/RabbitMQPublisher-C94q6g8q.cjs +45 -0
- package/dist/RabbitMQPublisher-C94q6g8q.cjs.map +1 -0
- package/dist/RabbitMQPublisher-DKmgwqVj.d.mts +25 -0
- package/dist/RabbitMQPublisher-DKmgwqVj.d.mts.map +1 -0
- package/dist/RabbitMQPublisher-d257OHLa.d.cts +25 -0
- package/dist/RabbitMQPublisher-d257OHLa.d.cts.map +1 -0
- package/dist/RabbitMQPublisher-yUqWNq-P.mjs +39 -0
- package/dist/RabbitMQPublisher-yUqWNq-P.mjs.map +1 -0
- package/dist/RabbitMQSubscriber-BF7JGfYm.d.cts +27 -0
- package/dist/RabbitMQSubscriber-BF7JGfYm.d.cts.map +1 -0
- package/dist/RabbitMQSubscriber-BWniDtFs.mjs +56 -0
- package/dist/RabbitMQSubscriber-BWniDtFs.mjs.map +1 -0
- package/dist/RabbitMQSubscriber-CdbUy5mB.d.mts +27 -0
- package/dist/RabbitMQSubscriber-CdbUy5mB.d.mts.map +1 -0
- package/dist/RabbitMQSubscriber-DGEO-clQ.cjs +62 -0
- package/dist/RabbitMQSubscriber-DGEO-clQ.cjs.map +1 -0
- package/dist/SNSConnection-CAcbLQOy.cjs +76 -0
- package/dist/SNSConnection-CAcbLQOy.cjs.map +1 -0
- package/dist/SNSConnection-CG4iEwA8.d.mts +41 -0
- package/dist/SNSConnection-CG4iEwA8.d.mts.map +1 -0
- package/dist/SNSConnection-CVjH93lb.mjs +70 -0
- package/dist/SNSConnection-CVjH93lb.mjs.map +1 -0
- package/dist/SNSConnection-Dol9FuxA.d.cts +41 -0
- package/dist/SNSConnection-Dol9FuxA.d.cts.map +1 -0
- package/dist/SNSPublisher-CjlMS3Z2.mjs +41 -0
- package/dist/SNSPublisher-CjlMS3Z2.mjs.map +1 -0
- package/dist/SNSPublisher-D50dPCEh.d.mts +22 -0
- package/dist/SNSPublisher-D50dPCEh.d.mts.map +1 -0
- package/dist/SNSPublisher-DQunY4NM.d.cts +22 -0
- package/dist/SNSPublisher-DQunY4NM.d.cts.map +1 -0
- package/dist/SNSPublisher-DV_8GGsi.cjs +47 -0
- package/dist/SNSPublisher-DV_8GGsi.cjs.map +1 -0
- package/dist/SNSSubscriber-BWaCQFl6.mjs +139 -0
- package/dist/SNSSubscriber-BWaCQFl6.mjs.map +1 -0
- package/dist/SNSSubscriber-CUgHK4W2.d.mts +55 -0
- package/dist/SNSSubscriber-CUgHK4W2.d.mts.map +1 -0
- package/dist/SNSSubscriber-ZE_-Hsps.cjs +145 -0
- package/dist/SNSSubscriber-ZE_-Hsps.cjs.map +1 -0
- package/dist/SNSSubscriber-ZGJjhXFQ.d.cts +55 -0
- package/dist/SNSSubscriber-ZGJjhXFQ.d.cts.map +1 -0
- package/dist/SQSConnection-BtEkDha8.d.cts +41 -0
- package/dist/SQSConnection-BtEkDha8.d.cts.map +1 -0
- package/dist/SQSConnection-CT3S7_zP.mjs +70 -0
- package/dist/SQSConnection-CT3S7_zP.mjs.map +1 -0
- package/dist/SQSConnection-DVy43GCV.d.mts +41 -0
- package/dist/SQSConnection-DVy43GCV.d.mts.map +1 -0
- package/dist/SQSConnection-Y0mdVTcB.cjs +76 -0
- package/dist/SQSConnection-Y0mdVTcB.cjs.map +1 -0
- package/dist/SQSPublisher-B-32CC4G.mjs +57 -0
- package/dist/SQSPublisher-B-32CC4G.mjs.map +1 -0
- package/dist/SQSPublisher-CgUduk6H.cjs +63 -0
- package/dist/SQSPublisher-CgUduk6H.cjs.map +1 -0
- package/dist/SQSPublisher-kyl5HW3N.d.cts +25 -0
- package/dist/SQSPublisher-kyl5HW3N.d.cts.map +1 -0
- package/dist/SQSPublisher-qDE5Fp-N.d.mts +25 -0
- package/dist/SQSPublisher-qDE5Fp-N.d.mts.map +1 -0
- package/dist/SQSSubscriber-C4UA2hKq.cjs +120 -0
- package/dist/SQSSubscriber-C4UA2hKq.cjs.map +1 -0
- package/dist/SQSSubscriber-CDvaG4ij.d.cts +44 -0
- package/dist/SQSSubscriber-CDvaG4ij.d.cts.map +1 -0
- package/dist/SQSSubscriber-CQdSFzpe.mjs +114 -0
- package/dist/SQSSubscriber-CQdSFzpe.mjs.map +1 -0
- package/dist/SQSSubscriber-JfFuAAoP.d.mts +44 -0
- package/dist/SQSSubscriber-JfFuAAoP.d.mts.map +1 -0
- package/dist/Subscriber-CG_QUQZs.d.cts +21 -0
- package/dist/Subscriber-CG_QUQZs.d.cts.map +1 -0
- package/dist/Subscriber-CghW0A02.cjs +88 -0
- package/dist/Subscriber-CghW0A02.cjs.map +1 -0
- package/dist/Subscriber-DiYHmuF0.d.mts +21 -0
- package/dist/Subscriber-DiYHmuF0.d.mts.map +1 -0
- package/dist/Subscriber-bnkFtSvt.mjs +83 -0
- package/dist/Subscriber-bnkFtSvt.mjs.map +1 -0
- package/dist/Subscriber.cjs +4 -0
- package/dist/Subscriber.d.cts +3 -0
- package/dist/Subscriber.d.mts +3 -0
- package/dist/Subscriber.mjs +4 -0
- package/dist/basic/BasicConnection.cjs +4 -0
- package/dist/basic/BasicConnection.d.cts +3 -0
- package/dist/basic/BasicConnection.d.mts +3 -0
- package/dist/basic/BasicConnection.mjs +4 -0
- package/dist/basic/BasicPublisher.cjs +3 -0
- package/dist/basic/BasicPublisher.d.cts +4 -0
- package/dist/basic/BasicPublisher.d.mts +4 -0
- package/dist/basic/BasicPublisher.mjs +3 -0
- package/dist/basic/BasicSubscriber.cjs +3 -0
- package/dist/basic/BasicSubscriber.d.cts +4 -0
- package/dist/basic/BasicSubscriber.d.mts +4 -0
- package/dist/basic/BasicSubscriber.mjs +3 -0
- package/dist/basic/index.cjs +7 -100
- package/dist/basic/index.d.cts +5 -45
- package/dist/basic/index.d.mts +5 -45
- package/dist/basic/index.mjs +5 -96
- package/dist/{rolldown-runtime-C0BPl7ul.cjs → chunk-CUT6urMc.cjs} +10 -23
- package/dist/index.cjs +8 -87
- package/dist/index.d.cts +5 -102
- package/dist/index.d.mts +5 -102
- package/dist/index.mjs +5 -71
- package/dist/pgboss/PgBossConnection.cjs +4 -0
- package/dist/pgboss/PgBossConnection.d.cts +3 -0
- package/dist/pgboss/PgBossConnection.d.mts +3 -0
- package/dist/pgboss/PgBossConnection.mjs +4 -0
- package/dist/pgboss/PgBossPublisher.cjs +3 -0
- package/dist/pgboss/PgBossPublisher.d.cts +4 -0
- package/dist/pgboss/PgBossPublisher.d.mts +4 -0
- package/dist/pgboss/PgBossPublisher.mjs +3 -0
- package/dist/pgboss/PgBossSubscriber.cjs +3 -0
- package/dist/pgboss/PgBossSubscriber.d.cts +4 -0
- package/dist/pgboss/PgBossSubscriber.d.mts +4 -0
- package/dist/pgboss/PgBossSubscriber.mjs +3 -0
- package/dist/pgboss/index.cjs +7 -247
- package/dist/pgboss/index.d.cts +5 -107
- package/dist/pgboss/index.d.mts +5 -107
- package/dist/pgboss/index.mjs +5 -240
- package/dist/rabbitmq/RabbitMQConnection.cjs +4 -0
- package/dist/rabbitmq/RabbitMQConnection.d.cts +3 -0
- package/dist/rabbitmq/RabbitMQConnection.d.mts +3 -0
- package/dist/rabbitmq/RabbitMQConnection.mjs +4 -0
- package/dist/rabbitmq/RabbitMQPublisher.cjs +3 -0
- package/dist/rabbitmq/RabbitMQPublisher.d.cts +4 -0
- package/dist/rabbitmq/RabbitMQPublisher.d.mts +4 -0
- package/dist/rabbitmq/RabbitMQPublisher.mjs +3 -0
- package/dist/rabbitmq/RabbitMQSubscriber.cjs +3 -0
- package/dist/rabbitmq/RabbitMQSubscriber.d.cts +4 -0
- package/dist/rabbitmq/RabbitMQSubscriber.d.mts +4 -0
- package/dist/rabbitmq/RabbitMQSubscriber.mjs +3 -0
- package/dist/rabbitmq/index.cjs +7 -243
- package/dist/rabbitmq/index.d.cts +5 -92
- package/dist/rabbitmq/index.d.mts +5 -92
- package/dist/rabbitmq/index.mjs +5 -237
- package/dist/sns/SNSConnection.cjs +4 -0
- package/dist/sns/SNSConnection.d.cts +3 -0
- package/dist/sns/SNSConnection.d.mts +3 -0
- package/dist/sns/SNSConnection.mjs +4 -0
- package/dist/sns/SNSPublisher.cjs +3 -0
- package/dist/sns/SNSPublisher.d.cts +4 -0
- package/dist/sns/SNSPublisher.d.mts +4 -0
- package/dist/sns/SNSPublisher.mjs +3 -0
- package/dist/sns/SNSSubscriber.cjs +6 -0
- package/dist/sns/SNSSubscriber.d.cts +4 -0
- package/dist/sns/SNSSubscriber.d.mts +4 -0
- package/dist/sns/SNSSubscriber.mjs +6 -0
- package/dist/sns/index.cjs +9 -551
- package/dist/sns/index.d.cts +5 -273
- package/dist/sns/index.d.mts +5 -273
- package/dist/sns/index.mjs +7 -527
- package/dist/sqs/SQSConnection.cjs +4 -0
- package/dist/sqs/SQSConnection.d.cts +3 -0
- package/dist/sqs/SQSConnection.d.mts +3 -0
- package/dist/sqs/SQSConnection.mjs +4 -0
- package/dist/sqs/SQSPublisher.cjs +3 -0
- package/dist/sqs/SQSPublisher.d.cts +4 -0
- package/dist/sqs/SQSPublisher.d.mts +4 -0
- package/dist/sqs/SQSPublisher.mjs +3 -0
- package/dist/sqs/SQSSubscriber.cjs +3 -0
- package/dist/sqs/SQSSubscriber.d.cts +4 -0
- package/dist/sqs/SQSSubscriber.d.mts +4 -0
- package/dist/sqs/SQSSubscriber.mjs +3 -0
- package/dist/sqs/index.cjs +7 -35
- package/dist/sqs/index.d.cts +5 -118
- package/dist/sqs/index.d.mts +5 -118
- package/dist/sqs/index.mjs +5 -24
- package/dist/types-BrdcSEnd.mjs +18 -0
- package/dist/types-BrdcSEnd.mjs.map +1 -0
- package/dist/types-Byv8N9ma.cjs +24 -0
- package/dist/types-Byv8N9ma.cjs.map +1 -0
- package/dist/types-Dh9Jyinx.d.mts +67 -0
- package/dist/types-Dh9Jyinx.d.mts.map +1 -0
- package/dist/types-Dj23od3e.d.cts +67 -0
- package/dist/types-Dj23od3e.d.cts.map +1 -0
- package/dist/types.cjs +3 -0
- package/dist/types.d.cts +2 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +3 -0
- package/package.json +12 -40
- package/src/EventConnection.ts +43 -0
- package/src/Publisher.ts +98 -0
- package/src/Subscriber.ts +113 -0
- package/src/__tests__/EventConnection.spec.ts +42 -0
- package/src/__tests__/Publisher.spec.ts +96 -0
- package/src/__tests__/Subscriber.spec.ts +109 -0
- package/src/basic/BasicConnection.ts +47 -0
- package/src/basic/BasicPublisher.ts +15 -0
- package/src/basic/BasicSubscriber.ts +21 -0
- package/src/basic/__tests__/BasicSubscriber.spec.ts +166 -0
- package/src/basic/index.ts +3 -0
- package/src/index.ts +25 -0
- package/src/pgboss/PgBossConnection.ts +91 -0
- package/src/pgboss/PgBossPublisher.ts +49 -0
- package/src/pgboss/PgBossSubscriber.ts +81 -0
- package/src/pgboss/__tests__/pgboss.spec.ts +196 -0
- package/src/pgboss/__tests__/setup.ts +21 -0
- package/src/pgboss/index.ts +5 -0
- package/src/rabbitmq/RabbitMQConnection.ts +148 -0
- package/src/rabbitmq/RabbitMQPublisher.ts +67 -0
- package/src/rabbitmq/RabbitMQSubscriber.ts +111 -0
- package/src/rabbitmq/__tests__/RabbitMQPublisher.spec.ts +378 -0
- package/src/rabbitmq/__tests__/RabbitMQSubscriber.spec.ts +292 -0
- package/src/rabbitmq/index.ts +6 -0
- package/src/sns/SNSConnection.ts +98 -0
- package/src/sns/SNSPublisher.ts +62 -0
- package/src/sns/SNSSubscriber.ts +218 -0
- package/src/sns/__tests__/SNS-SQS-Integration.spec.ts +389 -0
- package/src/sns/__tests__/SNSPublisher.spec.ts +449 -0
- package/src/sns/__tests__/SNSSubscriber.spec.ts +527 -0
- package/src/sns/index.ts +6 -0
- package/src/sqs/SQSConnection.ts +97 -0
- package/src/sqs/SQSPublisher.ts +105 -0
- package/src/sqs/SQSSubscriber.ts +181 -0
- package/src/sqs/__tests__/SQSPublisher.spec.ts +189 -0
- package/src/sqs/index.ts +6 -0
- package/src/types.ts +76 -0
- package/tsconfig.json +9 -0
- package/tsdown.config.ts +10 -0
- package/dist/SQSSubscriber-BEJBfNTe.mjs +0 -264
- package/dist/SQSSubscriber-BEJBfNTe.mjs.map +0 -1
- package/dist/SQSSubscriber-COTqWvOk.cjs +0 -288
- package/dist/SQSSubscriber-COTqWvOk.cjs.map +0 -1
- package/dist/basic/index.cjs.map +0 -1
- package/dist/basic/index.d.cts.map +0 -1
- package/dist/basic/index.d.mts.map +0 -1
- package/dist/basic/index.mjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/pgboss/index.cjs.map +0 -1
- package/dist/pgboss/index.d.cts.map +0 -1
- package/dist/pgboss/index.d.mts.map +0 -1
- package/dist/pgboss/index.mjs.map +0 -1
- package/dist/rabbitmq/index.cjs.map +0 -1
- package/dist/rabbitmq/index.d.cts.map +0 -1
- package/dist/rabbitmq/index.d.mts.map +0 -1
- package/dist/rabbitmq/index.mjs.map +0 -1
- package/dist/registry-DIx25Q5s.d.cts +0 -255
- package/dist/registry-DIx25Q5s.d.cts.map +0 -1
- package/dist/registry-DIx25Q5s.d.mts +0 -255
- package/dist/registry-DIx25Q5s.d.mts.map +0 -1
- package/dist/registry-DXLY1Xf6.mjs +0 -99
- package/dist/registry-DXLY1Xf6.mjs.map +0 -1
- package/dist/registry-DlT36229.cjs +0 -122
- package/dist/registry-DlT36229.cjs.map +0 -1
- package/dist/rolldown-runtime-D7D4PA-g.mjs +0 -13
- package/dist/sns/index.cjs.map +0 -1
- package/dist/sns/index.d.cts.map +0 -1
- package/dist/sns/index.d.mts.map +0 -1
- package/dist/sns/index.mjs.map +0 -1
- package/dist/sns/snsUrl.cjs +0 -92
- package/dist/sns/snsUrl.cjs.map +0 -1
- package/dist/sns/snsUrl.d.cts +0 -57
- package/dist/sns/snsUrl.d.cts.map +0 -1
- package/dist/sns/snsUrl.d.mts +0 -57
- package/dist/sns/snsUrl.d.mts.map +0 -1
- package/dist/sns/snsUrl.mjs +0 -82
- package/dist/sns/snsUrl.mjs.map +0 -1
- package/dist/sqs/index.cjs.map +0 -1
- package/dist/sqs/index.d.cts.map +0 -1
- package/dist/sqs/index.d.mts.map +0 -1
- package/dist/sqs/index.mjs.map +0 -1
- package/dist/sqs/sqsUrl.cjs +0 -93
- package/dist/sqs/sqsUrl.cjs.map +0 -1
- package/dist/sqs/sqsUrl.d.cts +0 -56
- package/dist/sqs/sqsUrl.d.cts.map +0 -1
- package/dist/sqs/sqsUrl.d.mts +0 -56
- package/dist/sqs/sqsUrl.d.mts.map +0 -1
- package/dist/sqs/sqsUrl.mjs +0 -83
- package/dist/sqs/sqsUrl.mjs.map +0 -1
- package/dist/telemetry-DG3l807O.cjs +0 -309
- package/dist/telemetry-DG3l807O.cjs.map +0 -1
- package/dist/telemetry-DjjgJMul.mjs +0 -244
- package/dist/telemetry-DjjgJMul.mjs.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# @geekmidas/events
|
|
2
|
+
|
|
3
|
+
## 10.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @geekmidas/schema@10.0.0
|
|
9
|
+
|
|
10
|
+
## 9.0.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#12](https://github.com/geekmidas/toolbox/pull/12) [`d53863a`](https://github.com/geekmidas/toolbox/commit/d53863a84db2e4ab5420e08f79128b637043fc42) Thanks [@geekmidas](https://github.com/geekmidas)! - Align every published package on a single version and keep them in step.
|
|
15
|
+
|
|
16
|
+
All packages now share one version, enforced by a changesets `fixed` group. The
|
|
17
|
+
baseline is 9.0.1 — @geekmidas/client's published version — so nothing moves
|
|
18
|
+
backwards; this release takes the whole set to 9.0.2 together.
|
|
19
|
+
|
|
20
|
+
Independent versions made "which version of the docs applies to me"
|
|
21
|
+
unanswerable: a reader on constructs@7 and cli@2 was on no version at all. One
|
|
22
|
+
number per release makes versioned documentation possible, and lets 9 freeze as
|
|
23
|
+
the current paradigm while the constructs rework is developed against it.
|
|
24
|
+
|
|
25
|
+
Every release now publishes every package, and a major anywhere is a major
|
|
26
|
+
everywhere. Peer ranges get simpler in return.
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [[`d53863a`](https://github.com/geekmidas/toolbox/commit/d53863a84db2e4ab5420e08f79128b637043fc42)]:
|
|
29
|
+
- @geekmidas/schema@9.0.2
|
|
30
|
+
|
|
31
|
+
## 1.1.6
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 🐛 [#11](https://github.com/geekmidas/toolbox/pull/11) [`40f4dc0`](https://github.com/geekmidas/toolbox/commit/40f4dc095911b2223a255029d8f776caf7781309) Thanks [@geekmidas](https://github.com/geekmidas)! - Patch release across all packages to realign published versions with the
|
|
36
|
+
registry. The previous release only published the four packages that had
|
|
37
|
+
version bumps; the remaining packages failed with "cannot publish over the
|
|
38
|
+
previously published versions" because their versions were unchanged.
|
|
39
|
+
- Updated dependencies [[`40f4dc0`](https://github.com/geekmidas/toolbox/commit/40f4dc095911b2223a255029d8f776caf7781309)]:
|
|
40
|
+
- @geekmidas/schema@1.0.4
|
|
41
|
+
|
|
42
|
+
## 1.1.5
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- ✨ [#8](https://github.com/geekmidas/toolbox/pull/8) [`03b08fe`](https://github.com/geekmidas/toolbox/commit/03b08feba2e735539c43f95b77792c18a627b07d) Thanks [@geekmidas](https://github.com/geekmidas)! - refactor(manifest): model the unified `gkm build` manifest and add `QueueInfo`
|
|
47
|
+
|
|
48
|
+
`gkm build` emits a single TypeScript module per provider
|
|
49
|
+
(`export const manifest = { routes, functions, crons, subscribers } as const`),
|
|
50
|
+
not separate JSON files. `@geekmidas/manifest` now models that:
|
|
51
|
+
- a unified `Manifest` type plus `ManifestField<T>` (a field is a flat
|
|
52
|
+
`readonly T[]` or a partitioned `Record<string, readonly T[]>`) and a
|
|
53
|
+
`flattenManifestField` helper;
|
|
54
|
+
- the item types (`RouteInfo`/`FunctionInfo`/`CronInfo`/`SubscriberInfo`) gain a
|
|
55
|
+
new `QueueInfo`, `SubscriberInfo.transport`, and readonly array fields so the
|
|
56
|
+
`as const` manifest assigns cleanly;
|
|
57
|
+
- 🔥 the per-unit `*Manifest` wrapper types are removed.
|
|
58
|
+
|
|
59
|
+
`@geekmidas/cloud/sst`'s `Api`/`Function`/`Cron` `fromManifest` now take the
|
|
60
|
+
manifest **field** (`Api.fromManifest(stack, id, manifest.routes, …)`) and
|
|
61
|
+
flatten the flat-or-partitioned shape. `@geekmidas/cli` re-exports the updated
|
|
62
|
+
types.
|
|
63
|
+
|
|
64
|
+
Also fixes `@geekmidas/events` to externalise `pg-boss` (it was the one
|
|
65
|
+
transport dep being bundled).
|
|
66
|
+
|
|
67
|
+
## 1.1.4
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- 🐛 [`75954ab`](https://github.com/geekmidas/toolbox/commit/75954ab60413ecba60b24aad7f9e0a08f29863dd) Thanks [@geekmidas](https://github.com/geekmidas)! - Republish with the `package.json` exports fix that nests `types` inside each `import`/`require` condition and points at the `.d.mts`/`.d.cts` files that `tsdown` actually emits. The previous version (1.1.3) was tagged but failed to publish to npm; this bump retries publication so consumers can resolve types correctly under NodeNext/Bundler module resolution.
|
|
72
|
+
|
|
73
|
+
## 1.1.3
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- 🐛 [`d70c6c0`](https://github.com/geekmidas/toolbox/commit/d70c6c0aeb8a79da2473ac77dbd8255a4a2f5651) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix `package.json` exports so TypeScript declarations resolve correctly under NodeNext/Bundler module resolution. Each subpath export now nests `types` inside its `import`/`require` condition, pointing at the `.d.mts` and `.d.cts` files that `tsdown` actually emits (previously the exports referenced non-existent `.d.ts` files, causing type-resolution failures for consumers). Both ESM (`.mjs`) and CJS (`.cjs`) runtime entry points are preserved. Additionally, `@geekmidas/ui` had `import` paths pointing at `.js` files that were never emitted — those are corrected to `.mjs`.
|
|
78
|
+
|
|
79
|
+
- Updated dependencies [[`d70c6c0`](https://github.com/geekmidas/toolbox/commit/d70c6c0aeb8a79da2473ac77dbd8255a4a2f5651)]:
|
|
80
|
+
- @geekmidas/schema@1.0.2
|
|
81
|
+
|
|
82
|
+
## 1.1.2
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- 🐛 [`aeba918`](https://github.com/geekmidas/toolbox/commit/aeba918fc258f6ccdb96b8273b2bc01bd2190553) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix schema, openapi generation and events testkit
|
|
87
|
+
|
|
88
|
+
- Updated dependencies [[`aeba918`](https://github.com/geekmidas/toolbox/commit/aeba918fc258f6ccdb96b8273b2bc01bd2190553)]:
|
|
89
|
+
- @geekmidas/schema@1.0.1
|
|
90
|
+
|
|
91
|
+
## 1.1.1
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- ⬆️ [`bf6c028`](https://github.com/geekmidas/toolbox/commit/bf6c0286c046794c322ebf7765378fc6ae1f9155) Thanks [@geekmidas](https://github.com/geekmidas)! - Upgrade pg-boss to 12
|
|
96
|
+
|
|
97
|
+
## 1.1.0
|
|
98
|
+
|
|
99
|
+
### Minor Changes
|
|
100
|
+
|
|
101
|
+
- ✨ [`83a24de`](https://github.com/geekmidas/toolbox/commit/83a24de902b3fadd98444cab552ecd84f32b6661) Thanks [@geekmidas](https://github.com/geekmidas)! - Add pg-boss event publisher/subscriber, CLI setup and upgrade commands, and secrets sync via AWS SSM
|
|
102
|
+
- ✨ **@geekmidas/events**: Add pg-boss backend for event publishing and subscribing with connection string support
|
|
103
|
+
- ✨ **@geekmidas/cli**: Add `gkm setup` command for dev environment initialization, `gkm upgrade` command with workspace detection, and secrets push/pull via AWS SSM Parameter Store
|
|
104
|
+
- 🐛 **@geekmidas/testkit**: Fix database creation race condition in PostgresMigrator
|
|
105
|
+
- ✨ **@geekmidas/constructs**: Add integration tests for pg-boss with HonoEndpoint
|
|
106
|
+
|
|
107
|
+
## 1.0.0
|
|
108
|
+
|
|
109
|
+
### Major Changes
|
|
110
|
+
|
|
111
|
+
- [`ff7b115`](https://github.com/geekmidas/toolbox/commit/ff7b11599f60f84ac6cdc73714c853ecf786b2e8) Thanks [@geekmidas](https://github.com/geekmidas)! - Version 1 Stable release
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- Updated dependencies [[`ff7b115`](https://github.com/geekmidas/toolbox/commit/ff7b11599f60f84ac6cdc73714c853ecf786b2e8)]:
|
|
116
|
+
- @geekmidas/schema@1.0.0
|
package/README.md
CHANGED
|
@@ -28,38 +28,8 @@ pnpm add amqplib
|
|
|
28
28
|
|
|
29
29
|
# For AWS SQS/SNS
|
|
30
30
|
pnpm add @aws-sdk/client-sqs @aws-sdk/client-sns
|
|
31
|
-
|
|
32
|
-
# For pg-boss (PostgreSQL)
|
|
33
|
-
pnpm add pg-boss
|
|
34
31
|
```
|
|
35
32
|
|
|
36
|
-
### Registering a Broker
|
|
37
|
-
|
|
38
|
-
Each broker is a driver on its own subpath — the only module that imports its
|
|
39
|
-
peer dependency — and the core uses whichever ones the process registered. A
|
|
40
|
-
bundle therefore contains only the brokers its entry point registers.
|
|
41
|
-
|
|
42
|
-
| Subpath | Driver |
|
|
43
|
-
| --- | --- |
|
|
44
|
-
| `@geekmidas/events/basic` | `basicEventsDriver` |
|
|
45
|
-
| `@geekmidas/events/pgboss` | `pgbossEventsDriver` |
|
|
46
|
-
| `@geekmidas/events/rabbitmq` | `rabbitmqEventsDriver` |
|
|
47
|
-
| `@geekmidas/events/sns` | `snsEventsDriver` |
|
|
48
|
-
| `@geekmidas/events/sqs` | `sqsEventsDriver` |
|
|
49
|
-
|
|
50
|
-
Code generated by `gkm` (dev, build, test, Lambda handlers) registers its
|
|
51
|
-
target's broker. A script that builds its own publisher registers it once:
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
import { registerEventsDriver } from '@geekmidas/events';
|
|
55
|
-
import { pgbossEventsDriver } from '@geekmidas/events/pgboss';
|
|
56
|
-
|
|
57
|
-
registerEventsDriver(pgbossEventsDriver);
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Without it, `Publisher.fromConnectionString('pgboss://…')` throws
|
|
61
|
-
`UnregisteredEventsScheme`, which names the subpath and the call to add.
|
|
62
|
-
|
|
63
33
|
## Quick Start
|
|
64
34
|
|
|
65
35
|
### 1. Define Your Message Types
|
|
@@ -76,14 +46,7 @@ type UserEvents =
|
|
|
76
46
|
### 2. Create Publisher and Subscriber
|
|
77
47
|
|
|
78
48
|
```typescript
|
|
79
|
-
import {
|
|
80
|
-
Publisher,
|
|
81
|
-
registerEventsDriver,
|
|
82
|
-
Subscriber,
|
|
83
|
-
} from '@geekmidas/events';
|
|
84
|
-
import { rabbitmqEventsDriver } from '@geekmidas/events/rabbitmq';
|
|
85
|
-
|
|
86
|
-
registerEventsDriver(rabbitmqEventsDriver);
|
|
49
|
+
import { Publisher, Subscriber } from '@geekmidas/events';
|
|
87
50
|
|
|
88
51
|
// Create publisher from connection string
|
|
89
52
|
const publisher = await Publisher.fromConnectionString<UserEvents>(
|
|
@@ -448,14 +411,6 @@ Then use `endpoint: 'http://localhost:4566'` in your configuration.
|
|
|
448
411
|
|
|
449
412
|
## API Reference
|
|
450
413
|
|
|
451
|
-
### Registry
|
|
452
|
-
|
|
453
|
-
```typescript
|
|
454
|
-
function registerEventsDriver(driver: EventsDriver): void
|
|
455
|
-
function eventsDriverFor(scheme: string): EventsDriver // throws UnregisteredEventsScheme
|
|
456
|
-
function registeredEventsSchemes(): string[]
|
|
457
|
-
```
|
|
458
|
-
|
|
459
414
|
### Publisher
|
|
460
415
|
|
|
461
416
|
```typescript
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventConnection, EventPublisherType } from "./types-Dj23od3e.cjs";
|
|
2
|
+
import { EventEmitter } from "node:events";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicConnection.d.ts
|
|
5
|
+
declare class BasicConnection implements EventConnection {
|
|
6
|
+
readonly type = EventPublisherType.Basic;
|
|
7
|
+
private emitter;
|
|
8
|
+
private connected;
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Create a BasicConnection from a connection string
|
|
12
|
+
* Format: basic://
|
|
13
|
+
*/
|
|
14
|
+
static fromConnectionString(_connectionString: string): Promise<BasicConnection>;
|
|
15
|
+
connect(): Promise<void>;
|
|
16
|
+
close(): Promise<void>;
|
|
17
|
+
isConnected(): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the underlying EventEmitter
|
|
20
|
+
* Used by BasicPublisher and BasicSubscriber
|
|
21
|
+
*/
|
|
22
|
+
get eventEmitter(): EventEmitter;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=BasicConnection.d.ts.map
|
|
25
|
+
//#endregion
|
|
26
|
+
export { BasicConnection };
|
|
27
|
+
//# sourceMappingURL=BasicConnection-CQsJpx2J.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicConnection-CQsJpx2J.d.cts","names":[],"sources":["../src/basic/BasicConnection.ts"],"sourcesContent":[],"mappings":";;;;cAIa,eAAA,YAA2B;EAA3B,SAAA,IAAA,GACC,kBAAA,CAAA,KAAA;EADe,QAAA,OAAA;EAAA,QACf,SAAA;EAAA,WAcF,CAAA;EAAe;;;;EAwBM,OAvCO,oBAAA,CAAA,iBAAA,EAAA,MAAA,CAAA,EAepC,OAfoC,CAe5B,eAf4B,CAAA;EAAe,OAAA,CAAA,CAAA,EAsBrC,OAtBqC,CAAA,IAAA,CAAA;WA0BvC;;;;;;sBAaK"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_types = require('./types-Byv8N9ma.cjs');
|
|
3
|
+
const node_events = require_chunk.__toESM(require("node:events"));
|
|
4
|
+
|
|
5
|
+
//#region src/basic/BasicConnection.ts
|
|
6
|
+
var BasicConnection = class BasicConnection {
|
|
7
|
+
type = require_types.EventPublisherType.Basic;
|
|
8
|
+
emitter;
|
|
9
|
+
connected = false;
|
|
10
|
+
constructor() {
|
|
11
|
+
this.emitter = new node_events.EventEmitter();
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create a BasicConnection from a connection string
|
|
15
|
+
* Format: basic://
|
|
16
|
+
*/
|
|
17
|
+
static async fromConnectionString(_connectionString) {
|
|
18
|
+
const connection = new BasicConnection();
|
|
19
|
+
await connection.connect();
|
|
20
|
+
return connection;
|
|
21
|
+
}
|
|
22
|
+
async connect() {
|
|
23
|
+
this.connected = true;
|
|
24
|
+
}
|
|
25
|
+
async close() {
|
|
26
|
+
this.emitter.removeAllListeners();
|
|
27
|
+
this.connected = false;
|
|
28
|
+
}
|
|
29
|
+
isConnected() {
|
|
30
|
+
return this.connected;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the underlying EventEmitter
|
|
34
|
+
* Used by BasicPublisher and BasicSubscriber
|
|
35
|
+
*/
|
|
36
|
+
get eventEmitter() {
|
|
37
|
+
return this.emitter;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
Object.defineProperty(exports, 'BasicConnection', {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return BasicConnection;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=BasicConnection-CxfNEvlb.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicConnection-CxfNEvlb.cjs","names":["EventPublisherType","EventEmitter","_connectionString: string"],"sources":["../src/basic/BasicConnection.ts"],"sourcesContent":["import { EventEmitter } from 'node:events';\nimport type { EventConnection } from '../types';\nimport { EventPublisherType } from '../types';\n\nexport class BasicConnection implements EventConnection {\n\treadonly type = EventPublisherType.Basic;\n\tprivate emitter: EventEmitter;\n\tprivate connected = false;\n\n\tconstructor() {\n\t\tthis.emitter = new EventEmitter();\n\t}\n\n\t/**\n\t * Create a BasicConnection from a connection string\n\t * Format: basic://\n\t */\n\tstatic async fromConnectionString(\n\t\t_connectionString: string,\n\t): Promise<BasicConnection> {\n\t\t// Basic connection doesn't need any configuration\n\t\tconst connection = new BasicConnection();\n\t\tawait connection.connect();\n\t\treturn connection;\n\t}\n\n\tasync connect(): Promise<void> {\n\t\tthis.connected = true;\n\t}\n\n\tasync close(): Promise<void> {\n\t\tthis.emitter.removeAllListeners();\n\t\tthis.connected = false;\n\t}\n\n\tisConnected(): boolean {\n\t\treturn this.connected;\n\t}\n\n\t/**\n\t * Get the underlying EventEmitter\n\t * Used by BasicPublisher and BasicSubscriber\n\t */\n\tget eventEmitter(): EventEmitter {\n\t\treturn this.emitter;\n\t}\n}\n"],"mappings":";;;;;AAIA,IAAa,kBAAb,MAAa,gBAA2C;CACvD,AAAS,OAAOA,iCAAmB;CACnC,AAAQ;CACR,AAAQ,YAAY;CAEpB,cAAc;AACb,OAAK,UAAU,IAAIC;CACnB;;;;;CAMD,aAAa,qBACZC,mBAC2B;EAE3B,MAAM,aAAa,IAAI;AACvB,QAAM,WAAW,SAAS;AAC1B,SAAO;CACP;CAED,MAAM,UAAyB;AAC9B,OAAK,YAAY;CACjB;CAED,MAAM,QAAuB;AAC5B,OAAK,QAAQ,oBAAoB;AACjC,OAAK,YAAY;CACjB;CAED,cAAuB;AACtB,SAAO,KAAK;CACZ;;;;;CAMD,IAAI,eAA6B;AAChC,SAAO,KAAK;CACZ;AACD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventConnection, EventPublisherType } from "./types-Dh9Jyinx.mjs";
|
|
2
|
+
import { EventEmitter } from "node:events";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicConnection.d.ts
|
|
5
|
+
declare class BasicConnection implements EventConnection {
|
|
6
|
+
readonly type = EventPublisherType.Basic;
|
|
7
|
+
private emitter;
|
|
8
|
+
private connected;
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Create a BasicConnection from a connection string
|
|
12
|
+
* Format: basic://
|
|
13
|
+
*/
|
|
14
|
+
static fromConnectionString(_connectionString: string): Promise<BasicConnection>;
|
|
15
|
+
connect(): Promise<void>;
|
|
16
|
+
close(): Promise<void>;
|
|
17
|
+
isConnected(): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the underlying EventEmitter
|
|
20
|
+
* Used by BasicPublisher and BasicSubscriber
|
|
21
|
+
*/
|
|
22
|
+
get eventEmitter(): EventEmitter;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=BasicConnection.d.ts.map
|
|
25
|
+
//#endregion
|
|
26
|
+
export { BasicConnection };
|
|
27
|
+
//# sourceMappingURL=BasicConnection-DcRelT64.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicConnection-DcRelT64.d.mts","names":[],"sources":["../src/basic/BasicConnection.ts"],"sourcesContent":[],"mappings":";;;;cAIa,eAAA,YAA2B;EAA3B,SAAA,IAAA,GACC,kBAAA,CAAA,KAAA;EADe,QAAA,OAAA;EAAA,QACf,SAAA;EAAA,WAcF,CAAA;EAAe;;;;EAwBM,OAvCO,oBAAA,CAAA,iBAAA,EAAA,MAAA,CAAA,EAepC,OAfoC,CAe5B,eAf4B,CAAA;EAAe,OAAA,CAAA,CAAA,EAsBrC,OAtBqC,CAAA,IAAA,CAAA;WA0BvC;;;;;;sBAaK"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventPublisherType } from "./types-BrdcSEnd.mjs";
|
|
2
|
+
import { EventEmitter } from "node:events";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicConnection.ts
|
|
5
|
+
var BasicConnection = class BasicConnection {
|
|
6
|
+
type = EventPublisherType.Basic;
|
|
7
|
+
emitter;
|
|
8
|
+
connected = false;
|
|
9
|
+
constructor() {
|
|
10
|
+
this.emitter = new EventEmitter();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create a BasicConnection from a connection string
|
|
14
|
+
* Format: basic://
|
|
15
|
+
*/
|
|
16
|
+
static async fromConnectionString(_connectionString) {
|
|
17
|
+
const connection = new BasicConnection();
|
|
18
|
+
await connection.connect();
|
|
19
|
+
return connection;
|
|
20
|
+
}
|
|
21
|
+
async connect() {
|
|
22
|
+
this.connected = true;
|
|
23
|
+
}
|
|
24
|
+
async close() {
|
|
25
|
+
this.emitter.removeAllListeners();
|
|
26
|
+
this.connected = false;
|
|
27
|
+
}
|
|
28
|
+
isConnected() {
|
|
29
|
+
return this.connected;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get the underlying EventEmitter
|
|
33
|
+
* Used by BasicPublisher and BasicSubscriber
|
|
34
|
+
*/
|
|
35
|
+
get eventEmitter() {
|
|
36
|
+
return this.emitter;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { BasicConnection };
|
|
42
|
+
//# sourceMappingURL=BasicConnection-hl-Ogz3a.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicConnection-hl-Ogz3a.mjs","names":["_connectionString: string"],"sources":["../src/basic/BasicConnection.ts"],"sourcesContent":["import { EventEmitter } from 'node:events';\nimport type { EventConnection } from '../types';\nimport { EventPublisherType } from '../types';\n\nexport class BasicConnection implements EventConnection {\n\treadonly type = EventPublisherType.Basic;\n\tprivate emitter: EventEmitter;\n\tprivate connected = false;\n\n\tconstructor() {\n\t\tthis.emitter = new EventEmitter();\n\t}\n\n\t/**\n\t * Create a BasicConnection from a connection string\n\t * Format: basic://\n\t */\n\tstatic async fromConnectionString(\n\t\t_connectionString: string,\n\t): Promise<BasicConnection> {\n\t\t// Basic connection doesn't need any configuration\n\t\tconst connection = new BasicConnection();\n\t\tawait connection.connect();\n\t\treturn connection;\n\t}\n\n\tasync connect(): Promise<void> {\n\t\tthis.connected = true;\n\t}\n\n\tasync close(): Promise<void> {\n\t\tthis.emitter.removeAllListeners();\n\t\tthis.connected = false;\n\t}\n\n\tisConnected(): boolean {\n\t\treturn this.connected;\n\t}\n\n\t/**\n\t * Get the underlying EventEmitter\n\t * Used by BasicPublisher and BasicSubscriber\n\t */\n\tget eventEmitter(): EventEmitter {\n\t\treturn this.emitter;\n\t}\n}\n"],"mappings":";;;;AAIA,IAAa,kBAAb,MAAa,gBAA2C;CACvD,AAAS,OAAO,mBAAmB;CACnC,AAAQ;CACR,AAAQ,YAAY;CAEpB,cAAc;AACb,OAAK,UAAU,IAAI;CACnB;;;;;CAMD,aAAa,qBACZA,mBAC2B;EAE3B,MAAM,aAAa,IAAI;AACvB,QAAM,WAAW,SAAS;AAC1B,SAAO;CACP;CAED,MAAM,UAAyB;AAC9B,OAAK,YAAY;CACjB;CAED,MAAM,QAAuB;AAC5B,OAAK,QAAQ,oBAAoB;AACjC,OAAK,YAAY;CACjB;CAED,cAAuB;AACtB,SAAO,KAAK;CACZ;;;;;CAMD,IAAI,eAA6B;AAChC,SAAO,KAAK;CACZ;AACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventPublisher, PublishableMessage } from "./types-Dh9Jyinx.mjs";
|
|
2
|
+
import { BasicConnection } from "./BasicConnection-DcRelT64.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicPublisher.d.ts
|
|
5
|
+
declare class BasicPublisher<TMessage extends PublishableMessage<string, any>> implements EventPublisher<TMessage> {
|
|
6
|
+
private connection;
|
|
7
|
+
constructor(connection: BasicConnection);
|
|
8
|
+
publish(messages: TMessage[]): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=BasicPublisher.d.ts.map
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BasicPublisher };
|
|
14
|
+
//# sourceMappingURL=BasicPublisher-C-hMX2Hy.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicPublisher-C-hMX2Hy.d.mts","names":[],"sources":["../src/basic/BasicPublisher.ts"],"sourcesContent":[],"mappings":";;;;cAGa,gCAAgC,4CACjC,eAAe;;EADd,WAAA,CAAA,UAAc,EAGM,eAHN;EAAA,OAAA,CAAA,QAAA,EAKF,QALE,EAAA,CAAA,EAKQ,OALR,CAAA,IAAA,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventPublisher, PublishableMessage } from "./types-Dj23od3e.cjs";
|
|
2
|
+
import { BasicConnection } from "./BasicConnection-CQsJpx2J.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicPublisher.d.ts
|
|
5
|
+
declare class BasicPublisher<TMessage extends PublishableMessage<string, any>> implements EventPublisher<TMessage> {
|
|
6
|
+
private connection;
|
|
7
|
+
constructor(connection: BasicConnection);
|
|
8
|
+
publish(messages: TMessage[]): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=BasicPublisher.d.ts.map
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BasicPublisher };
|
|
14
|
+
//# sourceMappingURL=BasicPublisher-CGMXg2I2.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicPublisher-CGMXg2I2.d.cts","names":[],"sources":["../src/basic/BasicPublisher.ts"],"sourcesContent":[],"mappings":";;;;cAGa,gCAAgC,4CACjC,eAAe;;EADd,WAAA,CAAA,UAAc,EAGM,eAHN;EAAA,OAAA,CAAA,QAAA,EAKF,QALE,EAAA,CAAA,EAKQ,OALR,CAAA,IAAA,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/basic/BasicPublisher.ts
|
|
3
|
+
var BasicPublisher = class {
|
|
4
|
+
constructor(connection) {
|
|
5
|
+
this.connection = connection;
|
|
6
|
+
}
|
|
7
|
+
async publish(messages) {
|
|
8
|
+
const emitter = this.connection.eventEmitter;
|
|
9
|
+
for (const message of messages) emitter.emit(message.type, message);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
Object.defineProperty(exports, 'BasicPublisher', {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return BasicPublisher;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=BasicPublisher-CXAVKxgq.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicPublisher-CXAVKxgq.cjs","names":["connection: BasicConnection","messages: TMessage[]"],"sources":["../src/basic/BasicPublisher.ts"],"sourcesContent":["import type { EventPublisher, PublishableMessage } from '../types';\nimport type { BasicConnection } from './BasicConnection';\n\nexport class BasicPublisher<TMessage extends PublishableMessage<string, any>>\n\timplements EventPublisher<TMessage>\n{\n\tconstructor(private connection: BasicConnection) {}\n\n\tasync publish(messages: TMessage[]) {\n\t\tconst emitter = this.connection.eventEmitter;\n\t\tfor (const message of messages) {\n\t\t\temitter.emit(message.type, message);\n\t\t}\n\t}\n}\n"],"mappings":";;AAGA,IAAa,iBAAb,MAEA;CACC,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,QAAQC,UAAsB;EACnC,MAAM,UAAU,KAAK,WAAW;AAChC,OAAK,MAAM,WAAW,SACrB,SAAQ,KAAK,QAAQ,MAAM,QAAQ;CAEpC;AACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/basic/BasicPublisher.ts
|
|
2
|
+
var BasicPublisher = class {
|
|
3
|
+
constructor(connection) {
|
|
4
|
+
this.connection = connection;
|
|
5
|
+
}
|
|
6
|
+
async publish(messages) {
|
|
7
|
+
const emitter = this.connection.eventEmitter;
|
|
8
|
+
for (const message of messages) emitter.emit(message.type, message);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BasicPublisher };
|
|
14
|
+
//# sourceMappingURL=BasicPublisher-DogbeHAH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicPublisher-DogbeHAH.mjs","names":["connection: BasicConnection","messages: TMessage[]"],"sources":["../src/basic/BasicPublisher.ts"],"sourcesContent":["import type { EventPublisher, PublishableMessage } from '../types';\nimport type { BasicConnection } from './BasicConnection';\n\nexport class BasicPublisher<TMessage extends PublishableMessage<string, any>>\n\timplements EventPublisher<TMessage>\n{\n\tconstructor(private connection: BasicConnection) {}\n\n\tasync publish(messages: TMessage[]) {\n\t\tconst emitter = this.connection.eventEmitter;\n\t\tfor (const message of messages) {\n\t\t\temitter.emit(message.type, message);\n\t\t}\n\t}\n}\n"],"mappings":";AAGA,IAAa,iBAAb,MAEA;CACC,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,QAAQC,UAAsB;EACnC,MAAM,UAAU,KAAK,WAAW;AAChC,OAAK,MAAM,WAAW,SACrB,SAAQ,KAAK,QAAQ,MAAM,QAAQ;CAEpC;AACD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/basic/BasicSubscriber.ts
|
|
2
|
+
var BasicSubscriber = class {
|
|
3
|
+
constructor(connection) {
|
|
4
|
+
this.connection = connection;
|
|
5
|
+
}
|
|
6
|
+
async subscribe(messages, listener) {
|
|
7
|
+
const emitter = this.connection.eventEmitter;
|
|
8
|
+
for (const messageType of messages) emitter.on(messageType, (message) => {
|
|
9
|
+
listener(message).catch((_error) => {});
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { BasicSubscriber };
|
|
16
|
+
//# sourceMappingURL=BasicSubscriber-BJSZN22M.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicSubscriber-BJSZN22M.mjs","names":["connection: BasicConnection","messages: TMessage['type'][]","listener: (payload: TMessage) => Promise<void>","message: TMessage"],"sources":["../src/basic/BasicSubscriber.ts"],"sourcesContent":["import type { EventSubscriber, PublishableMessage } from '../types';\nimport type { BasicConnection } from './BasicConnection';\n\nexport class BasicSubscriber<TMessage extends PublishableMessage<string, any>>\n\timplements EventSubscriber<TMessage>\n{\n\tconstructor(private connection: BasicConnection) {}\n\n\tasync subscribe(\n\t\tmessages: TMessage['type'][],\n\t\tlistener: (payload: TMessage) => Promise<void>,\n\t): Promise<void> {\n\t\tconst emitter = this.connection.eventEmitter;\n\n\t\tfor (const messageType of messages) {\n\t\t\temitter.on(messageType, (message: TMessage) => {\n\t\t\t\tlistener(message).catch((_error) => {});\n\t\t\t});\n\t\t}\n\t}\n}\n"],"mappings":";AAGA,IAAa,kBAAb,MAEA;CACC,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,UACLC,UACAC,UACgB;EAChB,MAAM,UAAU,KAAK,WAAW;AAEhC,OAAK,MAAM,eAAe,SACzB,SAAQ,GAAG,aAAa,CAACC,YAAsB;AAC9C,YAAS,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAE,EAAC;EACvC,EAAC;CAEH;AACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventSubscriber, PublishableMessage } from "./types-Dh9Jyinx.mjs";
|
|
2
|
+
import { BasicConnection } from "./BasicConnection-DcRelT64.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicSubscriber.d.ts
|
|
5
|
+
declare class BasicSubscriber<TMessage extends PublishableMessage<string, any>> implements EventSubscriber<TMessage> {
|
|
6
|
+
private connection;
|
|
7
|
+
constructor(connection: BasicConnection);
|
|
8
|
+
subscribe(messages: TMessage['type'][], listener: (payload: TMessage) => Promise<void>): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=BasicSubscriber.d.ts.map
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BasicSubscriber };
|
|
14
|
+
//# sourceMappingURL=BasicSubscriber-HzSJ_MbB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicSubscriber-HzSJ_MbB.d.mts","names":[],"sources":["../src/basic/BasicSubscriber.ts"],"sourcesContent":[],"mappings":";;;;cAGa,iCAAiC,4CAClC,gBAAgB;;EADf,WAAA,CAAA,UAAe,EAGK,eAHL;EAAA,SAAA,CAAA,QAAA,EAMhB,QANgB,CAAA,MAAA,CAAA,EAAA,EAAA,QAAA,EAAA,CAAA,OAAA,EAON,QAPM,EAAA,GAOO,OAPP,CAAA,IAAA,CAAA,CAAA,EAQxB,OARwB,CAAA,IAAA,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/basic/BasicSubscriber.ts
|
|
3
|
+
var BasicSubscriber = class {
|
|
4
|
+
constructor(connection) {
|
|
5
|
+
this.connection = connection;
|
|
6
|
+
}
|
|
7
|
+
async subscribe(messages, listener) {
|
|
8
|
+
const emitter = this.connection.eventEmitter;
|
|
9
|
+
for (const messageType of messages) emitter.on(messageType, (message) => {
|
|
10
|
+
listener(message).catch((_error) => {});
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
Object.defineProperty(exports, 'BasicSubscriber', {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return BasicSubscriber;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=BasicSubscriber-mVJRMXhZ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicSubscriber-mVJRMXhZ.cjs","names":["connection: BasicConnection","messages: TMessage['type'][]","listener: (payload: TMessage) => Promise<void>","message: TMessage"],"sources":["../src/basic/BasicSubscriber.ts"],"sourcesContent":["import type { EventSubscriber, PublishableMessage } from '../types';\nimport type { BasicConnection } from './BasicConnection';\n\nexport class BasicSubscriber<TMessage extends PublishableMessage<string, any>>\n\timplements EventSubscriber<TMessage>\n{\n\tconstructor(private connection: BasicConnection) {}\n\n\tasync subscribe(\n\t\tmessages: TMessage['type'][],\n\t\tlistener: (payload: TMessage) => Promise<void>,\n\t): Promise<void> {\n\t\tconst emitter = this.connection.eventEmitter;\n\n\t\tfor (const messageType of messages) {\n\t\t\temitter.on(messageType, (message: TMessage) => {\n\t\t\t\tlistener(message).catch((_error) => {});\n\t\t\t});\n\t\t}\n\t}\n}\n"],"mappings":";;AAGA,IAAa,kBAAb,MAEA;CACC,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,UACLC,UACAC,UACgB;EAChB,MAAM,UAAU,KAAK,WAAW;AAEhC,OAAK,MAAM,eAAe,SACzB,SAAQ,GAAG,aAAa,CAACC,YAAsB;AAC9C,YAAS,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAE,EAAC;EACvC,EAAC;CAEH;AACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventSubscriber, PublishableMessage } from "./types-Dj23od3e.cjs";
|
|
2
|
+
import { BasicConnection } from "./BasicConnection-CQsJpx2J.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicSubscriber.d.ts
|
|
5
|
+
declare class BasicSubscriber<TMessage extends PublishableMessage<string, any>> implements EventSubscriber<TMessage> {
|
|
6
|
+
private connection;
|
|
7
|
+
constructor(connection: BasicConnection);
|
|
8
|
+
subscribe(messages: TMessage['type'][], listener: (payload: TMessage) => Promise<void>): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=BasicSubscriber.d.ts.map
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BasicSubscriber };
|
|
14
|
+
//# sourceMappingURL=BasicSubscriber-uW3IOyBj.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicSubscriber-uW3IOyBj.d.cts","names":[],"sources":["../src/basic/BasicSubscriber.ts"],"sourcesContent":[],"mappings":";;;;cAGa,iCAAiC,4CAClC,gBAAgB;;EADf,WAAA,CAAA,UAAe,EAGK,eAHL;EAAA,SAAA,CAAA,QAAA,EAMhB,QANgB,CAAA,MAAA,CAAA,EAAA,EAAA,QAAA,EAAA,CAAA,OAAA,EAON,QAPM,EAAA,GAOO,OAPP,CAAA,IAAA,CAAA,CAAA,EAQxB,OARwB,CAAA,IAAA,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventConnection } from "./types-Dh9Jyinx.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/EventConnection.d.ts
|
|
4
|
+
declare class EventConnectionFactory {
|
|
5
|
+
/**
|
|
6
|
+
* Create an EventConnection from a connection string
|
|
7
|
+
* Dynamically imports the appropriate connection implementation
|
|
8
|
+
*/
|
|
9
|
+
static fromConnectionString(connectionStr: string): Promise<EventConnection>;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { EventConnectionFactory };
|
|
13
|
+
//# sourceMappingURL=EventConnection-4niMI6D8.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventConnection-4niMI6D8.d.mts","names":[],"sources":["../src/EventConnection.ts"],"sourcesContent":[],"mappings":";;;cAGa,sBAAA;;AAAb;;;EAO2B,OAAvB,oBAAA,CAAA,aAAA,EAAA,MAAA,CAAA,EAAA,OAAA,CAAQ,eAAR,CAAA;AAAO"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const require_types = require('./types-Byv8N9ma.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/EventConnection.ts
|
|
4
|
+
var EventConnectionFactory = class {
|
|
5
|
+
/**
|
|
6
|
+
* Create an EventConnection from a connection string
|
|
7
|
+
* Dynamically imports the appropriate connection implementation
|
|
8
|
+
*/
|
|
9
|
+
static async fromConnectionString(connectionStr) {
|
|
10
|
+
const url = new URL(connectionStr);
|
|
11
|
+
const protocol = url.protocol.replace(":", "");
|
|
12
|
+
switch (protocol) {
|
|
13
|
+
case require_types.EventPublisherType.Basic: {
|
|
14
|
+
const { BasicConnection } = await Promise.resolve().then(() => require("./basic/index.cjs"));
|
|
15
|
+
return BasicConnection.fromConnectionString(connectionStr);
|
|
16
|
+
}
|
|
17
|
+
case require_types.EventPublisherType.RabbitMQ: {
|
|
18
|
+
const { RabbitMQConnection } = await Promise.resolve().then(() => require("./rabbitmq/index.cjs"));
|
|
19
|
+
return RabbitMQConnection.fromConnectionString(connectionStr);
|
|
20
|
+
}
|
|
21
|
+
case require_types.EventPublisherType.SQS: {
|
|
22
|
+
const { SQSConnection } = await Promise.resolve().then(() => require("./sqs/index.cjs"));
|
|
23
|
+
return SQSConnection.fromConnectionString(connectionStr);
|
|
24
|
+
}
|
|
25
|
+
case require_types.EventPublisherType.SNS: {
|
|
26
|
+
const { SNSConnection } = await Promise.resolve().then(() => require("./sns/index.cjs"));
|
|
27
|
+
return SNSConnection.fromConnectionString(connectionStr);
|
|
28
|
+
}
|
|
29
|
+
case require_types.EventPublisherType.PgBoss: {
|
|
30
|
+
const { PgBossConnection } = await Promise.resolve().then(() => require("./pgboss/index.cjs"));
|
|
31
|
+
return PgBossConnection.fromConnectionString(connectionStr);
|
|
32
|
+
}
|
|
33
|
+
default: throw new Error(`Unsupported connection type: ${protocol}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
Object.defineProperty(exports, 'EventConnectionFactory', {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
return EventConnectionFactory;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=EventConnection-BkA9FSVL.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventConnection-BkA9FSVL.cjs","names":["connectionStr: string","EventPublisherType"],"sources":["../src/EventConnection.ts"],"sourcesContent":["import type { EventConnection } from './types';\nimport { EventPublisherType } from './types';\n\nexport class EventConnectionFactory {\n\t/**\n\t * Create an EventConnection from a connection string\n\t * Dynamically imports the appropriate connection implementation\n\t */\n\tstatic async fromConnectionString(\n\t\tconnectionStr: string,\n\t): Promise<EventConnection> {\n\t\tconst url = new URL(connectionStr);\n\t\tconst protocol = url.protocol.replace(':', '') as EventPublisherType;\n\n\t\tswitch (protocol) {\n\t\t\tcase EventPublisherType.Basic: {\n\t\t\t\tconst { BasicConnection } = await import('./basic');\n\t\t\t\treturn BasicConnection.fromConnectionString(connectionStr);\n\t\t\t}\n\t\t\tcase EventPublisherType.RabbitMQ: {\n\t\t\t\tconst { RabbitMQConnection } = await import('./rabbitmq');\n\t\t\t\treturn RabbitMQConnection.fromConnectionString(connectionStr);\n\t\t\t}\n\t\t\tcase EventPublisherType.SQS: {\n\t\t\t\tconst { SQSConnection } = await import('./sqs');\n\t\t\t\treturn SQSConnection.fromConnectionString(connectionStr);\n\t\t\t}\n\t\t\tcase EventPublisherType.SNS: {\n\t\t\t\tconst { SNSConnection } = await import('./sns');\n\t\t\t\treturn SNSConnection.fromConnectionString(connectionStr);\n\t\t\t}\n\t\t\tcase EventPublisherType.PgBoss: {\n\t\t\t\tconst { PgBossConnection } = await import('./pgboss');\n\t\t\t\treturn PgBossConnection.fromConnectionString(connectionStr);\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unsupported connection type: ${protocol}`);\n\t\t}\n\t}\n}\n\nexport type { EventConnection } from './types';\nexport { EventPublisherType } from './types';\n"],"mappings":";;;AAGA,IAAa,yBAAb,MAAoC;;;;;CAKnC,aAAa,qBACZA,eAC2B;EAC3B,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,WAAW,IAAI,SAAS,QAAQ,KAAK,GAAG;AAE9C,UAAQ,UAAR;GACC,KAAKC,iCAAmB,OAAO;IAC9B,MAAM,EAAE,iBAAiB,GAAG,2CAAM;AAClC,WAAO,gBAAgB,qBAAqB,cAAc;GAC1D;GACD,KAAKA,iCAAmB,UAAU;IACjC,MAAM,EAAE,oBAAoB,GAAG,2CAAM;AACrC,WAAO,mBAAmB,qBAAqB,cAAc;GAC7D;GACD,KAAKA,iCAAmB,KAAK;IAC5B,MAAM,EAAE,eAAe,GAAG,2CAAM;AAChC,WAAO,cAAc,qBAAqB,cAAc;GACxD;GACD,KAAKA,iCAAmB,KAAK;IAC5B,MAAM,EAAE,eAAe,GAAG,2CAAM;AAChC,WAAO,cAAc,qBAAqB,cAAc;GACxD;GACD,KAAKA,iCAAmB,QAAQ;IAC/B,MAAM,EAAE,kBAAkB,GAAG,2CAAM;AACnC,WAAO,iBAAiB,qBAAqB,cAAc;GAC3D;GACD,QACC,OAAM,IAAI,OAAO,+BAA+B,SAAS;EAC1D;CACD;AACD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EventPublisherType } from "./types-BrdcSEnd.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/EventConnection.ts
|
|
4
|
+
var EventConnectionFactory = class {
|
|
5
|
+
/**
|
|
6
|
+
* Create an EventConnection from a connection string
|
|
7
|
+
* Dynamically imports the appropriate connection implementation
|
|
8
|
+
*/
|
|
9
|
+
static async fromConnectionString(connectionStr) {
|
|
10
|
+
const url = new URL(connectionStr);
|
|
11
|
+
const protocol = url.protocol.replace(":", "");
|
|
12
|
+
switch (protocol) {
|
|
13
|
+
case EventPublisherType.Basic: {
|
|
14
|
+
const { BasicConnection } = await import("./basic/index.mjs");
|
|
15
|
+
return BasicConnection.fromConnectionString(connectionStr);
|
|
16
|
+
}
|
|
17
|
+
case EventPublisherType.RabbitMQ: {
|
|
18
|
+
const { RabbitMQConnection } = await import("./rabbitmq/index.mjs");
|
|
19
|
+
return RabbitMQConnection.fromConnectionString(connectionStr);
|
|
20
|
+
}
|
|
21
|
+
case EventPublisherType.SQS: {
|
|
22
|
+
const { SQSConnection } = await import("./sqs/index.mjs");
|
|
23
|
+
return SQSConnection.fromConnectionString(connectionStr);
|
|
24
|
+
}
|
|
25
|
+
case EventPublisherType.SNS: {
|
|
26
|
+
const { SNSConnection } = await import("./sns/index.mjs");
|
|
27
|
+
return SNSConnection.fromConnectionString(connectionStr);
|
|
28
|
+
}
|
|
29
|
+
case EventPublisherType.PgBoss: {
|
|
30
|
+
const { PgBossConnection } = await import("./pgboss/index.mjs");
|
|
31
|
+
return PgBossConnection.fromConnectionString(connectionStr);
|
|
32
|
+
}
|
|
33
|
+
default: throw new Error(`Unsupported connection type: ${protocol}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { EventConnectionFactory };
|
|
40
|
+
//# sourceMappingURL=EventConnection-Kr32GAzq.mjs.map
|