@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/dist/sqs/sqsUrl.d.mts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
declare namespace sqsUrl_d_exports {
|
|
2
|
-
export { MalformedQueueUrl, MissingQueueUrl, SqsAddress, UnexpectedQueueScheme, build, parse };
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* The `sqs://` connection-string codec — how a queue is addressed as one string.
|
|
6
|
-
*
|
|
7
|
-
* It lives beside the client rather than in a neutral package because
|
|
8
|
-
* `queueUrl`, `region`, and `endpoint` are SQS's vocabulary. The neutral layer
|
|
9
|
-
* knows only that a queue provides *one* connection string; what that string
|
|
10
|
-
* says is between the component that composes it and the publisher that parses
|
|
11
|
-
* it. The `pgboss://` form sits beside its own client and shares nothing here.
|
|
12
|
-
*
|
|
13
|
-
* Both directions live in this module so they cannot drift: `parse(build(x))`
|
|
14
|
-
* is `x`, and the deploy target composing a string it cannot parse back is the
|
|
15
|
-
* failure this shape rules out.
|
|
16
|
-
*/
|
|
17
|
-
/** What an SQS connection string addresses. */
|
|
18
|
-
export interface SqsAddress {
|
|
19
|
-
queueUrl: string;
|
|
20
|
-
/** Read off the queue, never inherited: a queue may live in another region. */
|
|
21
|
-
region?: string;
|
|
22
|
-
/** Set for SQS-compatible backends such as LocalStack. */
|
|
23
|
-
endpoint?: string;
|
|
24
|
-
/** Largest batch the publisher may send in one call. */
|
|
25
|
-
maxBatchSize?: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Compose an address into a connection string.
|
|
29
|
-
*
|
|
30
|
-
* Credentials never appear. The AWS SDK resolves them from its own chain — an
|
|
31
|
-
* execution role deployed, environment locally — so the string stays safe to log
|
|
32
|
-
* and identical across environments that differ only in who is calling.
|
|
33
|
-
*/
|
|
34
|
-
export declare function build(address: SqsAddress): string;
|
|
35
|
-
/** Parse a connection string back into an address. */
|
|
36
|
-
export declare function parse(connectionString: string): SqsAddress;
|
|
37
|
-
/** The string is not a URL at all. */
|
|
38
|
-
export declare class MalformedQueueUrl extends Error {
|
|
39
|
-
readonly url: string;
|
|
40
|
-
constructor(url: string);
|
|
41
|
-
}
|
|
42
|
-
/** The string is a URL, but not an `sqs://` one. */
|
|
43
|
-
export declare class UnexpectedQueueScheme extends Error {
|
|
44
|
-
readonly url: string;
|
|
45
|
-
readonly expected: string;
|
|
46
|
-
readonly actual: string;
|
|
47
|
-
constructor(url: string, expected: string, actual: string);
|
|
48
|
-
}
|
|
49
|
-
/** An `sqs://` string with no queue names nothing. */
|
|
50
|
-
export declare class MissingQueueUrl extends Error {
|
|
51
|
-
readonly url: string;
|
|
52
|
-
constructor(url: string);
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { sqsUrl_d_exports as t };
|
|
56
|
-
//# sourceMappingURL=sqsUrl.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sqsUrl.d.mts","names":[],"sources":["../../src/sqs/sqsUrl.ts"],"mappings":";;;;;;;;;;;;;;;;;iBAeiB;EAChB;;EAEA;;EAEA;;EAEA;;;;;;;;;wBAYe,MAAM,SAAS;;wBAgBf,MAAM,2BAA2B;;qBA4BpC,0BAA0B;WACjB;EAArB,YAAqB;;;qBAOT,8BAA8B;WAEhC;WACA;WACA;EAHV,YACU,aACA,kBACA;;;qBAUE,wBAAwB;WACf;EAArB,YAAqB"}
|
package/dist/sqs/sqsUrl.mjs
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
//#region src/sqs/sqsUrl.ts
|
|
3
|
-
var sqsUrl_exports = /* @__PURE__ */ __exportAll({
|
|
4
|
-
MalformedQueueUrl: () => MalformedQueueUrl,
|
|
5
|
-
MissingQueueUrl: () => MissingQueueUrl,
|
|
6
|
-
UnexpectedQueueScheme: () => UnexpectedQueueScheme,
|
|
7
|
-
build: () => build,
|
|
8
|
-
parse: () => parse
|
|
9
|
-
});
|
|
10
|
-
const SCHEME = "sqs:";
|
|
11
|
-
/**
|
|
12
|
-
* Compose an address into a connection string.
|
|
13
|
-
*
|
|
14
|
-
* Credentials never appear. The AWS SDK resolves them from its own chain — an
|
|
15
|
-
* execution role deployed, environment locally — so the string stays safe to log
|
|
16
|
-
* and identical across environments that differ only in who is calling.
|
|
17
|
-
*/
|
|
18
|
-
function build(address) {
|
|
19
|
-
const { queueUrl, region, endpoint, maxBatchSize } = address;
|
|
20
|
-
if (!queueUrl) throw new MissingQueueUrl("");
|
|
21
|
-
const url = new URL(`${SCHEME}//`);
|
|
22
|
-
url.searchParams.set("queueUrl", queueUrl);
|
|
23
|
-
if (region) url.searchParams.set("region", region);
|
|
24
|
-
if (endpoint) url.searchParams.set("endpoint", endpoint);
|
|
25
|
-
if (maxBatchSize !== void 0) url.searchParams.set("maxBatchSize", String(maxBatchSize));
|
|
26
|
-
return url.toString();
|
|
27
|
-
}
|
|
28
|
-
/** Parse a connection string back into an address. */
|
|
29
|
-
function parse(connectionString) {
|
|
30
|
-
let parsed;
|
|
31
|
-
try {
|
|
32
|
-
parsed = new URL(connectionString);
|
|
33
|
-
} catch {
|
|
34
|
-
throw new MalformedQueueUrl(connectionString);
|
|
35
|
-
}
|
|
36
|
-
if (parsed.protocol !== SCHEME) throw new UnexpectedQueueScheme(connectionString, SCHEME, parsed.protocol);
|
|
37
|
-
const queueUrl = parsed.searchParams.get("queueUrl");
|
|
38
|
-
if (!queueUrl) throw new MissingQueueUrl(connectionString);
|
|
39
|
-
const region = parsed.searchParams.get("region") ?? void 0;
|
|
40
|
-
const endpoint = parsed.searchParams.get("endpoint") ?? void 0;
|
|
41
|
-
const batch = parsed.searchParams.get("maxBatchSize");
|
|
42
|
-
return {
|
|
43
|
-
queueUrl,
|
|
44
|
-
...region ? { region } : {},
|
|
45
|
-
...endpoint ? { endpoint } : {},
|
|
46
|
-
...batch ? { maxBatchSize: Number(batch) } : {}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
/** The string is not a URL at all. */
|
|
50
|
-
var MalformedQueueUrl = class extends Error {
|
|
51
|
-
url;
|
|
52
|
-
constructor(url) {
|
|
53
|
-
super(`'${url}' is not a valid connection string.`);
|
|
54
|
-
this.url = url;
|
|
55
|
-
this.name = "MalformedQueueUrl";
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
/** The string is a URL, but not an `sqs://` one. */
|
|
59
|
-
var UnexpectedQueueScheme = class extends Error {
|
|
60
|
-
url;
|
|
61
|
-
expected;
|
|
62
|
-
actual;
|
|
63
|
-
constructor(url, expected, actual) {
|
|
64
|
-
super(`Expected a '${expected}//' connection string and got '${actual}//' in '${url}'.`);
|
|
65
|
-
this.url = url;
|
|
66
|
-
this.expected = expected;
|
|
67
|
-
this.actual = actual;
|
|
68
|
-
this.name = "UnexpectedQueueScheme";
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
/** An `sqs://` string with no queue names nothing. */
|
|
72
|
-
var MissingQueueUrl = class extends Error {
|
|
73
|
-
url;
|
|
74
|
-
constructor(url) {
|
|
75
|
-
super(url ? `'${url}' names no queue: an sqs:// connection string needs ?queueUrl=.` : "An sqs:// connection string needs a queueUrl.");
|
|
76
|
-
this.url = url;
|
|
77
|
-
this.name = "MissingQueueUrl";
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
//#endregion
|
|
81
|
-
export { MalformedQueueUrl, MissingQueueUrl, UnexpectedQueueScheme, build, parse, sqsUrl_exports as t };
|
|
82
|
-
|
|
83
|
-
//# sourceMappingURL=sqsUrl.mjs.map
|
package/dist/sqs/sqsUrl.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sqsUrl.mjs","names":[],"sources":["../../src/sqs/sqsUrl.ts"],"sourcesContent":["/**\n * The `sqs://` connection-string codec — how a queue is addressed as one string.\n *\n * It lives beside the client rather than in a neutral package because\n * `queueUrl`, `region`, and `endpoint` are SQS's vocabulary. The neutral layer\n * knows only that a queue provides *one* connection string; what that string\n * says is between the component that composes it and the publisher that parses\n * it. The `pgboss://` form sits beside its own client and shares nothing here.\n *\n * Both directions live in this module so they cannot drift: `parse(build(x))`\n * is `x`, and the deploy target composing a string it cannot parse back is the\n * failure this shape rules out.\n */\n\n/** What an SQS connection string addresses. */\nexport interface SqsAddress {\n\tqueueUrl: string;\n\t/** Read off the queue, never inherited: a queue may live in another region. */\n\tregion?: string;\n\t/** Set for SQS-compatible backends such as LocalStack. */\n\tendpoint?: string;\n\t/** Largest batch the publisher may send in one call. */\n\tmaxBatchSize?: number;\n}\n\nconst SCHEME = 'sqs:';\n\n/**\n * Compose an address into a connection string.\n *\n * Credentials never appear. The AWS SDK resolves them from its own chain — an\n * execution role deployed, environment locally — so the string stays safe to log\n * and identical across environments that differ only in who is calling.\n */\nexport function build(address: SqsAddress): string {\n\tconst { queueUrl, region, endpoint, maxBatchSize } = address;\n\tif (!queueUrl) throw new MissingQueueUrl('');\n\n\tconst url = new URL(`${SCHEME}//`);\n\turl.searchParams.set('queueUrl', queueUrl);\n\tif (region) url.searchParams.set('region', region);\n\tif (endpoint) url.searchParams.set('endpoint', endpoint);\n\tif (maxBatchSize !== undefined) {\n\t\turl.searchParams.set('maxBatchSize', String(maxBatchSize));\n\t}\n\n\treturn url.toString();\n}\n\n/** Parse a connection string back into an address. */\nexport function parse(connectionString: string): SqsAddress {\n\tlet parsed: URL;\n\ttry {\n\t\tparsed = new URL(connectionString);\n\t} catch {\n\t\tthrow new MalformedQueueUrl(connectionString);\n\t}\n\n\tif (parsed.protocol !== SCHEME) {\n\t\tthrow new UnexpectedQueueScheme(connectionString, SCHEME, parsed.protocol);\n\t}\n\n\tconst queueUrl = parsed.searchParams.get('queueUrl');\n\tif (!queueUrl) throw new MissingQueueUrl(connectionString);\n\n\tconst region = parsed.searchParams.get('region') ?? undefined;\n\tconst endpoint = parsed.searchParams.get('endpoint') ?? undefined;\n\tconst batch = parsed.searchParams.get('maxBatchSize');\n\n\treturn {\n\t\tqueueUrl,\n\t\t...(region ? { region } : {}),\n\t\t...(endpoint ? { endpoint } : {}),\n\t\t...(batch ? { maxBatchSize: Number(batch) } : {}),\n\t};\n}\n\n/** The string is not a URL at all. */\nexport class MalformedQueueUrl extends Error {\n\tconstructor(readonly url: string) {\n\t\tsuper(`'${url}' is not a valid connection string.`);\n\t\tthis.name = 'MalformedQueueUrl';\n\t}\n}\n\n/** The string is a URL, but not an `sqs://` one. */\nexport class UnexpectedQueueScheme extends Error {\n\tconstructor(\n\t\treadonly url: string,\n\t\treadonly expected: string,\n\t\treadonly actual: string,\n\t) {\n\t\tsuper(\n\t\t\t`Expected a '${expected}//' connection string and got '${actual}//' in '${url}'.`,\n\t\t);\n\t\tthis.name = 'UnexpectedQueueScheme';\n\t}\n}\n\n/** An `sqs://` string with no queue names nothing. */\nexport class MissingQueueUrl extends Error {\n\tconstructor(readonly url: string) {\n\t\tsuper(\n\t\t\turl\n\t\t\t\t? `'${url}' names no queue: an sqs:// connection string needs ?queueUrl=.`\n\t\t\t\t: 'An sqs:// connection string needs a queueUrl.',\n\t\t);\n\t\tthis.name = 'MissingQueueUrl';\n\t}\n}\n"],"mappings":";;;;;;;;;AAyBA,MAAM,SAAS;;;;;;;;AASf,SAAgB,MAAM,SAA6B;CAClD,MAAM,EAAE,UAAU,QAAQ,UAAU,iBAAiB;CACrD,IAAI,CAAC,UAAU,MAAM,IAAI,gBAAgB,EAAE;CAE3C,MAAM,MAAM,IAAI,IAAI,GAAG,OAAO,GAAG;CACjC,IAAI,aAAa,IAAI,YAAY,QAAQ;CACzC,IAAI,QAAQ,IAAI,aAAa,IAAI,UAAU,MAAM;CACjD,IAAI,UAAU,IAAI,aAAa,IAAI,YAAY,QAAQ;CACvD,IAAI,iBAAiB,KAAA,GACpB,IAAI,aAAa,IAAI,gBAAgB,OAAO,YAAY,CAAC;CAG1D,OAAO,IAAI,SAAS;AACrB;;AAGA,SAAgB,MAAM,kBAAsC;CAC3D,IAAI;CACJ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|
|
5
|
-
*/
|
|
6
|
-
let EventPublisherType = /* @__PURE__ */ function(EventPublisherType) {
|
|
7
|
-
EventPublisherType["Basic"] = "basic";
|
|
8
|
-
EventPublisherType["EventBridge"] = "eventbridge";
|
|
9
|
-
EventPublisherType["SQS"] = "sqs";
|
|
10
|
-
EventPublisherType["SNS"] = "sns";
|
|
11
|
-
EventPublisherType["Kafka"] = "kafka";
|
|
12
|
-
EventPublisherType["RabbitMQ"] = "rabbitmq";
|
|
13
|
-
EventPublisherType["PgBoss"] = "pgboss";
|
|
14
|
-
return EventPublisherType;
|
|
15
|
-
}({});
|
|
16
|
-
/** The transports a publisher, subscriber or connection can be built for. */
|
|
17
|
-
const SUPPORTED = [
|
|
18
|
-
"basic",
|
|
19
|
-
"sqs",
|
|
20
|
-
"sns",
|
|
21
|
-
"rabbitmq",
|
|
22
|
-
"pgboss"
|
|
23
|
-
];
|
|
24
|
-
/**
|
|
25
|
-
* A connection string or connection whose transport nothing here implements —
|
|
26
|
-
* a typo'd scheme, or one of the listed-but-unbuilt ones (EventBridge, Kafka).
|
|
27
|
-
*/
|
|
28
|
-
var UnsupportedEventTransport = class extends Error {
|
|
29
|
-
transport;
|
|
30
|
-
role;
|
|
31
|
-
constructor(transport, role) {
|
|
32
|
-
super(`No event ${role} for "${transport}". Use one of: ${SUPPORTED.join(", ")} — e.g. pgboss://… or sns://….`);
|
|
33
|
-
this.transport = transport;
|
|
34
|
-
this.role = role;
|
|
35
|
-
this.name = "UnsupportedEventTransport";
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/telemetry.ts
|
|
40
|
-
/**
|
|
41
|
-
* Trace context across a broker: what makes request → queue → worker one trace.
|
|
42
|
-
*
|
|
43
|
-
* On publish, each message gets a PRODUCER span, and that span's context is
|
|
44
|
-
* written into the message through the global propagator — into the broker's
|
|
45
|
-
* own header or attribute field where it has one. On consume, the context is
|
|
46
|
-
* read back and the handler runs inside a CONSUMER span that is its child. A
|
|
47
|
-
* message carrying no context (an older publisher, a process with telemetry
|
|
48
|
-
* off) starts a new trace instead.
|
|
49
|
-
*
|
|
50
|
-
* Everything goes through `@opentelemetry/api`'s globals. Without a registered
|
|
51
|
-
* provider and propagator the spans are no-ops and nothing is written into a
|
|
52
|
-
* message, so a process that never asked for telemetry publishes exactly what
|
|
53
|
-
* it did before.
|
|
54
|
-
*
|
|
55
|
-
* @module
|
|
56
|
-
*/
|
|
57
|
-
/**
|
|
58
|
-
* The key a trace context travels under where a broker has no header field of
|
|
59
|
-
* its own — a pg-boss job's data. Reserved: it is removed before a handler sees
|
|
60
|
-
* the payload, and a payload of the application's own should not use it.
|
|
61
|
-
*/
|
|
62
|
-
const TRACE_CONTEXT_KEY = "__gkmTrace";
|
|
63
|
-
const TRACER = "@geekmidas/events";
|
|
64
|
-
function tracer() {
|
|
65
|
-
return _opentelemetry_api.trace.getTracer(TRACER);
|
|
66
|
-
}
|
|
67
|
-
function attributes(target, operation) {
|
|
68
|
-
return {
|
|
69
|
-
"messaging.system": target.system,
|
|
70
|
-
"messaging.destination.name": target.destination,
|
|
71
|
-
"messaging.operation": operation,
|
|
72
|
-
"messaging.operation.type": operation === "publish" ? "send" : "process",
|
|
73
|
-
...target.type && { "gkm.event.type": target.type },
|
|
74
|
-
...target.messageId && { "messaging.message.id": target.messageId }
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Start the PRODUCER span for one message, as a child of whatever is active,
|
|
79
|
-
* and write its context into a carrier for the broker.
|
|
80
|
-
*/
|
|
81
|
-
function startProducer(target) {
|
|
82
|
-
const active = _opentelemetry_api.context.active();
|
|
83
|
-
const span = tracer().startSpan(`${target.destination} publish`, {
|
|
84
|
-
kind: _opentelemetry_api.SpanKind.PRODUCER,
|
|
85
|
-
attributes: attributes(target, "publish")
|
|
86
|
-
}, active);
|
|
87
|
-
const carrier = {};
|
|
88
|
-
_opentelemetry_api.propagation.inject(_opentelemetry_api.trace.setSpan(active, span), carrier);
|
|
89
|
-
return {
|
|
90
|
-
span,
|
|
91
|
-
carrier: Object.keys(carrier).length > 0 ? carrier : void 0
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
/** End producer spans, recording `error` on each when the send failed. */
|
|
95
|
-
function endProducers(spans, error) {
|
|
96
|
-
for (const span of spans) {
|
|
97
|
-
if (error !== void 0) recordError(span, error);
|
|
98
|
-
span.end();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Publish `items`, each with a PRODUCER span of its own, through `send` —
|
|
103
|
-
* which receives the carrier to attach to each item, in order.
|
|
104
|
-
*/
|
|
105
|
-
async function publishTraced(items, describe, send) {
|
|
106
|
-
const produced = items.map((item) => startProducer(describe(item)));
|
|
107
|
-
const spans = produced.map((p) => p.span);
|
|
108
|
-
try {
|
|
109
|
-
const result = await send(produced.map((p) => p.carrier));
|
|
110
|
-
endProducers(spans);
|
|
111
|
-
return result;
|
|
112
|
-
} catch (error) {
|
|
113
|
-
endProducers(spans, error);
|
|
114
|
-
throw error;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* The context a carrier holds, or undefined when it holds none — no carrier, a
|
|
119
|
-
* malformed `traceparent`, or a propagator that throws.
|
|
120
|
-
*/
|
|
121
|
-
function extractTraceContext(carrier) {
|
|
122
|
-
if (!carrier || Object.keys(carrier).length === 0) return void 0;
|
|
123
|
-
try {
|
|
124
|
-
const extracted = _opentelemetry_api.propagation.extract(_opentelemetry_api.ROOT_CONTEXT, carrier);
|
|
125
|
-
return _opentelemetry_api.trace.getSpanContext(extracted) ? extracted : void 0;
|
|
126
|
-
} catch {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Run `fn` inside a CONSUMER span for one message: a child of the context the
|
|
132
|
-
* message carried, or a new trace when it carried none. The active context of
|
|
133
|
-
* the poller that received it is never the parent — a job is not part of
|
|
134
|
-
* whatever happened to start the poll loop.
|
|
135
|
-
*/
|
|
136
|
-
function consumeTraced(target, carrier, fn) {
|
|
137
|
-
return runConsumer(target, extractTraceContext(carrier) ?? _opentelemetry_api.ROOT_CONTEXT, [], fn);
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* One CONSUMER span for a batch that arrived together — a Lambda's records.
|
|
141
|
-
* One message with a context is its child; several start a trace of their own
|
|
142
|
-
* that links to each message's producer, since a span has one parent.
|
|
143
|
-
*/
|
|
144
|
-
function consumeBatchTraced(target, carriers, fn) {
|
|
145
|
-
const contexts = carriers.map(extractTraceContext).filter((c) => c !== void 0);
|
|
146
|
-
if (carriers.length === 1 && contexts.length === 1) return runConsumer(target, contexts[0], [], fn);
|
|
147
|
-
const links = contexts.map((c) => ({ context: _opentelemetry_api.trace.getSpanContext(c) }));
|
|
148
|
-
return runConsumer(target, _opentelemetry_api.ROOT_CONTEXT, links, fn);
|
|
149
|
-
}
|
|
150
|
-
function runConsumer(target, parent, links, fn) {
|
|
151
|
-
const span = tracer().startSpan(`${target.destination} process`, {
|
|
152
|
-
kind: _opentelemetry_api.SpanKind.CONSUMER,
|
|
153
|
-
attributes: attributes(target, "process"),
|
|
154
|
-
links
|
|
155
|
-
}, parent);
|
|
156
|
-
return _opentelemetry_api.context.with(_opentelemetry_api.trace.setSpan(parent, span), async () => {
|
|
157
|
-
try {
|
|
158
|
-
return await fn();
|
|
159
|
-
} catch (error) {
|
|
160
|
-
recordError(span, error);
|
|
161
|
-
throw error;
|
|
162
|
-
} finally {
|
|
163
|
-
span.end();
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
function recordError(span, error) {
|
|
168
|
-
if (error instanceof Error) span.recordException(error);
|
|
169
|
-
span.setStatus({
|
|
170
|
-
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
171
|
-
...error instanceof Error && { message: error.message }
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* A carrier from broker message attributes, in any of the shapes they arrive
|
|
176
|
-
* in: SQS's `{ StringValue }`, a Lambda SQS record's `{ stringValue }`, an SNS
|
|
177
|
-
* envelope's `{ Value }`, or plain strings (RabbitMQ headers).
|
|
178
|
-
*/
|
|
179
|
-
function carrierFromAttributes(attributes) {
|
|
180
|
-
if (!attributes) return void 0;
|
|
181
|
-
const carrier = {};
|
|
182
|
-
for (const field of PROPAGATION_FIELDS) {
|
|
183
|
-
const value = attributeValue(attributes[field]);
|
|
184
|
-
if (value) carrier[field] = value;
|
|
185
|
-
}
|
|
186
|
-
return Object.keys(carrier).length > 0 ? carrier : void 0;
|
|
187
|
-
}
|
|
188
|
-
/** The W3C fields; what the default propagator reads and writes. */
|
|
189
|
-
const PROPAGATION_FIELDS = ["traceparent", "tracestate"];
|
|
190
|
-
function attributeValue(value) {
|
|
191
|
-
if (typeof value === "string") return value;
|
|
192
|
-
if (Buffer.isBuffer(value)) return value.toString();
|
|
193
|
-
if (value && typeof value === "object") {
|
|
194
|
-
const v = value;
|
|
195
|
-
const found = v.StringValue ?? v.stringValue ?? v.Value;
|
|
196
|
-
return typeof found === "string" ? found : void 0;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
/** A carrier as SQS/SNS message attributes. */
|
|
200
|
-
function carrierAsAttributes(carrier) {
|
|
201
|
-
const attributes = {};
|
|
202
|
-
if (!carrier) return attributes;
|
|
203
|
-
for (const [key, value] of Object.entries(carrier)) attributes[key] = {
|
|
204
|
-
DataType: "String",
|
|
205
|
-
StringValue: value
|
|
206
|
-
};
|
|
207
|
-
return attributes;
|
|
208
|
-
}
|
|
209
|
-
function isPlainObject(value) {
|
|
210
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
211
|
-
const proto = Object.getPrototypeOf(value);
|
|
212
|
-
return proto === Object.prototype || proto === null;
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* `data` with the carrier under {@link TRACE_CONTEXT_KEY}, for a broker with no
|
|
216
|
-
* header field. Unchanged when there is no carrier, or when `data` is not a
|
|
217
|
-
* plain object a key can be added to — such a message starts its own trace.
|
|
218
|
-
*/
|
|
219
|
-
function withTraceKey(data, carrier) {
|
|
220
|
-
if (!carrier || !isPlainObject(data)) return data;
|
|
221
|
-
return {
|
|
222
|
-
...data,
|
|
223
|
-
[TRACE_CONTEXT_KEY]: carrier
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* `data` without {@link TRACE_CONTEXT_KEY}, and the carrier that was under it.
|
|
228
|
-
* What a handler sees never has the key.
|
|
229
|
-
*/
|
|
230
|
-
function withoutTraceKey(data) {
|
|
231
|
-
if (!isPlainObject(data) || !("__gkmTrace" in data)) return {
|
|
232
|
-
data,
|
|
233
|
-
carrier: void 0
|
|
234
|
-
};
|
|
235
|
-
const { [TRACE_CONTEXT_KEY]: raw, ...rest } = data;
|
|
236
|
-
return {
|
|
237
|
-
data: rest,
|
|
238
|
-
carrier: isPlainObject(raw) ? carrierFromAttributes(raw) : void 0
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
//#endregion
|
|
242
|
-
Object.defineProperty(exports, "EventPublisherType", {
|
|
243
|
-
enumerable: true,
|
|
244
|
-
get: function() {
|
|
245
|
-
return EventPublisherType;
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
Object.defineProperty(exports, "TRACE_CONTEXT_KEY", {
|
|
249
|
-
enumerable: true,
|
|
250
|
-
get: function() {
|
|
251
|
-
return TRACE_CONTEXT_KEY;
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
Object.defineProperty(exports, "UnsupportedEventTransport", {
|
|
255
|
-
enumerable: true,
|
|
256
|
-
get: function() {
|
|
257
|
-
return UnsupportedEventTransport;
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
Object.defineProperty(exports, "carrierAsAttributes", {
|
|
261
|
-
enumerable: true,
|
|
262
|
-
get: function() {
|
|
263
|
-
return carrierAsAttributes;
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
Object.defineProperty(exports, "carrierFromAttributes", {
|
|
267
|
-
enumerable: true,
|
|
268
|
-
get: function() {
|
|
269
|
-
return carrierFromAttributes;
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
Object.defineProperty(exports, "consumeBatchTraced", {
|
|
273
|
-
enumerable: true,
|
|
274
|
-
get: function() {
|
|
275
|
-
return consumeBatchTraced;
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
Object.defineProperty(exports, "consumeTraced", {
|
|
279
|
-
enumerable: true,
|
|
280
|
-
get: function() {
|
|
281
|
-
return consumeTraced;
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
Object.defineProperty(exports, "extractTraceContext", {
|
|
285
|
-
enumerable: true,
|
|
286
|
-
get: function() {
|
|
287
|
-
return extractTraceContext;
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
Object.defineProperty(exports, "publishTraced", {
|
|
291
|
-
enumerable: true,
|
|
292
|
-
get: function() {
|
|
293
|
-
return publishTraced;
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
Object.defineProperty(exports, "withTraceKey", {
|
|
297
|
-
enumerable: true,
|
|
298
|
-
get: function() {
|
|
299
|
-
return withTraceKey;
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
Object.defineProperty(exports, "withoutTraceKey", {
|
|
303
|
-
enumerable: true,
|
|
304
|
-
get: function() {
|
|
305
|
-
return withoutTraceKey;
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
//# sourceMappingURL=telemetry-DG3l807O.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-DG3l807O.cjs","names":["trace","context","SpanKind","propagation","ROOT_CONTEXT","SpanStatusCode"],"sources":["../src/types.ts","../src/telemetry.ts"],"sourcesContent":["import type { InferStandardSchema } from '@geekmidas/schema';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\n\n/**\n * Represents a publishable event message with a type and payload.\n *\n * @template TType - The event type/name (e.g., 'user.created')\n * @template TPayload - The event payload data\n */\nexport type PublishableMessage<TType extends string, TPayload> = {\n\ttype: TType;\n\tpayload: TPayload;\n};\n\n/**\n * Event publisher/subscriber types\n */\nexport enum EventPublisherType {\n\tBasic = 'basic',\n\tEventBridge = 'eventbridge',\n\tSQS = 'sqs',\n\tSNS = 'sns',\n\tKafka = 'kafka',\n\tRabbitMQ = 'rabbitmq',\n\tPgBoss = 'pgboss',\n}\n\n/** The transports a publisher, subscriber or connection can be built for. */\nconst SUPPORTED: readonly string[] = [\n\tEventPublisherType.Basic,\n\tEventPublisherType.SQS,\n\tEventPublisherType.SNS,\n\tEventPublisherType.RabbitMQ,\n\tEventPublisherType.PgBoss,\n];\n\n/**\n * A connection string or connection whose transport nothing here implements —\n * a typo'd scheme, or one of the listed-but-unbuilt ones (EventBridge, Kafka).\n */\nexport class UnsupportedEventTransport extends Error {\n\tconstructor(\n\t\treadonly transport: string,\n\t\treadonly role: 'publisher' | 'subscriber' | 'connection',\n\t) {\n\t\tsuper(\n\t\t\t`No event ${role} for \"${transport}\". Use one of: ${SUPPORTED.join(', ')} — e.g. pgboss://… or sns://….`,\n\t\t);\n\t\tthis.name = 'UnsupportedEventTransport';\n\t}\n}\n\n/**\n * Base interface for event connections\n * Connections manage the underlying transport (RabbitMQ channel, SQS client, etc.)\n */\nexport interface EventConnection {\n\treadonly type: EventPublisherType;\n\tconnect(): Promise<void>;\n\tclose(): Promise<void>;\n\tisConnected(): boolean;\n}\n\n/**\n * Interface for event publishers that handle the actual publishing of events.\n * Implementations can send to EventBridge, SQS, Kafka, or any other event system.\n *\n * @template TMessage - The union type of all publishable messages\n */\nexport type EventPublisher<TMessage extends PublishableMessage<string, any>> = {\n\tpublish: (message: TMessage[]) => Promise<void>;\n};\n\n/**\n * Interface for event subscribers that handle receiving and processing events.\n *\n * @template TMessage - The union type of all publishable messages\n */\nexport type EventSubscriber<TMessage extends PublishableMessage<string, any>> =\n\t{\n\t\tsubscribe: (\n\t\t\tmessages: TMessage['type'][],\n\t\t\tlistener: (payload: TMessage) => Promise<void>,\n\t\t) => Promise<void>;\n\t};\n/**\n * Utility type to extract the message from EventPublisher\n */\nexport type ExtractPublisherMessage<T> =\n\tT extends EventPublisher<infer M> ? M : never;\n\nexport type MappedEvent<\n\tT extends EventPublisher<any> | undefined,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n> = {\n\ttype: ExtractPublisherMessage<T>['type'];\n\tpayload: (\n\t\tctx: InferStandardSchema<OutSchema>,\n\t) => ExtractPublisherMessage<T>['payload'];\n\twhen?: (ctx: InferStandardSchema<OutSchema>) => boolean;\n};\n","/**\n * Trace context across a broker: what makes request → queue → worker one trace.\n *\n * On publish, each message gets a PRODUCER span, and that span's context is\n * written into the message through the global propagator — into the broker's\n * own header or attribute field where it has one. On consume, the context is\n * read back and the handler runs inside a CONSUMER span that is its child. A\n * message carrying no context (an older publisher, a process with telemetry\n * off) starts a new trace instead.\n *\n * Everything goes through `@opentelemetry/api`'s globals. Without a registered\n * provider and propagator the spans are no-ops and nothing is written into a\n * message, so a process that never asked for telemetry publishes exactly what\n * it did before.\n *\n * @module\n */\nimport {\n\ttype Attributes,\n\ttype Context,\n\tcontext,\n\ttype Link,\n\tpropagation,\n\tROOT_CONTEXT,\n\ttype Span,\n\tSpanKind,\n\tSpanStatusCode,\n\ttrace,\n} from '@opentelemetry/api';\n\n/**\n * The key a trace context travels under where a broker has no header field of\n * its own — a pg-boss job's data. Reserved: it is removed before a handler sees\n * the payload, and a payload of the application's own should not use it.\n */\nexport const TRACE_CONTEXT_KEY = '__gkmTrace';\n\n/** A propagated trace context: `traceparent`, and `tracestate` when set. */\nexport type TraceCarrier = Record<string, string>;\n\n/** What a message is, as its spans describe it. */\nexport interface MessagingTarget {\n\t/** `messaging.system`: `pgboss`, `aws_sqs`, `aws_sns`, `rabbitmq`, `basic`. */\n\tsystem: string;\n\t/** The queue or topic — `messaging.destination.name`. */\n\tdestination: string;\n\t/** The event's type, when the message has one. */\n\ttype?: string;\n\t/** The broker's id for the message, when it has one. */\n\tmessageId?: string;\n}\n\nconst TRACER = '@geekmidas/events';\n\nfunction tracer() {\n\treturn trace.getTracer(TRACER);\n}\n\nfunction attributes(\n\ttarget: MessagingTarget,\n\toperation: 'publish' | 'process',\n): Attributes {\n\treturn {\n\t\t'messaging.system': target.system,\n\t\t'messaging.destination.name': target.destination,\n\t\t'messaging.operation': operation,\n\t\t'messaging.operation.type': operation === 'publish' ? 'send' : 'process',\n\t\t...(target.type && { 'gkm.event.type': target.type }),\n\t\t...(target.messageId && { 'messaging.message.id': target.messageId }),\n\t};\n}\n\n/** A PRODUCER span for one message, and the context to send with it. */\nexport interface ProducedMessage {\n\tspan: Span;\n\t/** Undefined when there is nothing to propagate: no propagator registered. */\n\tcarrier: TraceCarrier | undefined;\n}\n\n/**\n * Start the PRODUCER span for one message, as a child of whatever is active,\n * and write its context into a carrier for the broker.\n */\nexport function startProducer(target: MessagingTarget): ProducedMessage {\n\tconst active = context.active();\n\tconst span = tracer().startSpan(\n\t\t`${target.destination} publish`,\n\t\t{ kind: SpanKind.PRODUCER, attributes: attributes(target, 'publish') },\n\t\tactive,\n\t);\n\n\tconst carrier: TraceCarrier = {};\n\tpropagation.inject(trace.setSpan(active, span), carrier);\n\n\treturn {\n\t\tspan,\n\t\tcarrier: Object.keys(carrier).length > 0 ? carrier : undefined,\n\t};\n}\n\n/** End producer spans, recording `error` on each when the send failed. */\nexport function endProducers(spans: readonly Span[], error?: unknown): void {\n\tfor (const span of spans) {\n\t\tif (error !== undefined) recordError(span, error);\n\t\tspan.end();\n\t}\n}\n\n/**\n * Publish `items`, each with a PRODUCER span of its own, through `send` —\n * which receives the carrier to attach to each item, in order.\n */\nexport async function publishTraced<T, R>(\n\titems: readonly T[],\n\tdescribe: (item: T) => MessagingTarget,\n\tsend: (carriers: (TraceCarrier | undefined)[]) => Promise<R>,\n): Promise<R> {\n\tconst produced = items.map((item) => startProducer(describe(item)));\n\tconst spans = produced.map((p) => p.span);\n\ttry {\n\t\tconst result = await send(produced.map((p) => p.carrier));\n\t\tendProducers(spans);\n\t\treturn result;\n\t} catch (error) {\n\t\tendProducers(spans, error);\n\t\tthrow error;\n\t}\n}\n\n/**\n * The context a carrier holds, or undefined when it holds none — no carrier, a\n * malformed `traceparent`, or a propagator that throws.\n */\nexport function extractTraceContext(\n\tcarrier: TraceCarrier | undefined,\n): Context | undefined {\n\tif (!carrier || Object.keys(carrier).length === 0) return undefined;\n\ttry {\n\t\tconst extracted = propagation.extract(ROOT_CONTEXT, carrier);\n\t\treturn trace.getSpanContext(extracted) ? extracted : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Run `fn` inside a CONSUMER span for one message: a child of the context the\n * message carried, or a new trace when it carried none. The active context of\n * the poller that received it is never the parent — a job is not part of\n * whatever happened to start the poll loop.\n */\nexport function consumeTraced<R>(\n\ttarget: MessagingTarget,\n\tcarrier: TraceCarrier | undefined,\n\tfn: () => Promise<R>,\n): Promise<R> {\n\tconst parent = extractTraceContext(carrier) ?? ROOT_CONTEXT;\n\treturn runConsumer(target, parent, [], fn);\n}\n\n/**\n * One CONSUMER span for a batch that arrived together — a Lambda's records.\n * One message with a context is its child; several start a trace of their own\n * that links to each message's producer, since a span has one parent.\n */\nexport function consumeBatchTraced<R>(\n\ttarget: MessagingTarget,\n\tcarriers: readonly (TraceCarrier | undefined)[],\n\tfn: () => Promise<R>,\n): Promise<R> {\n\tconst contexts = carriers\n\t\t.map(extractTraceContext)\n\t\t.filter((c): c is Context => c !== undefined);\n\n\tif (carriers.length === 1 && contexts.length === 1) {\n\t\treturn runConsumer(target, contexts[0]!, [], fn);\n\t}\n\n\tconst links: Link[] = contexts.map((c) => ({\n\t\tcontext: trace.getSpanContext(c)!,\n\t}));\n\treturn runConsumer(target, ROOT_CONTEXT, links, fn);\n}\n\nfunction runConsumer<R>(\n\ttarget: MessagingTarget,\n\tparent: Context,\n\tlinks: Link[],\n\tfn: () => Promise<R>,\n): Promise<R> {\n\tconst span = tracer().startSpan(\n\t\t`${target.destination} process`,\n\t\t{\n\t\t\tkind: SpanKind.CONSUMER,\n\t\t\tattributes: attributes(target, 'process'),\n\t\t\tlinks,\n\t\t},\n\t\tparent,\n\t);\n\n\treturn context.with(trace.setSpan(parent, span), async () => {\n\t\ttry {\n\t\t\treturn await fn();\n\t\t} catch (error) {\n\t\t\trecordError(span, error);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tspan.end();\n\t\t}\n\t});\n}\n\nfunction recordError(span: Span, error: unknown): void {\n\tif (error instanceof Error) span.recordException(error);\n\tspan.setStatus({\n\t\tcode: SpanStatusCode.ERROR,\n\t\t...(error instanceof Error && { message: error.message }),\n\t});\n}\n\n/**\n * A carrier from broker message attributes, in any of the shapes they arrive\n * in: SQS's `{ StringValue }`, a Lambda SQS record's `{ stringValue }`, an SNS\n * envelope's `{ Value }`, or plain strings (RabbitMQ headers).\n */\nexport function carrierFromAttributes(\n\tattributes: Record<string, unknown> | undefined | null,\n): TraceCarrier | undefined {\n\tif (!attributes) return undefined;\n\tconst carrier: TraceCarrier = {};\n\tfor (const field of PROPAGATION_FIELDS) {\n\t\tconst value = attributeValue(attributes[field]);\n\t\tif (value) carrier[field] = value;\n\t}\n\treturn Object.keys(carrier).length > 0 ? carrier : undefined;\n}\n\n/** The W3C fields; what the default propagator reads and writes. */\nconst PROPAGATION_FIELDS = ['traceparent', 'tracestate'] as const;\n\nfunction attributeValue(value: unknown): string | undefined {\n\tif (typeof value === 'string') return value;\n\tif (Buffer.isBuffer(value)) return value.toString();\n\tif (value && typeof value === 'object') {\n\t\tconst v = value as {\n\t\t\tValue?: unknown;\n\t\t\tStringValue?: unknown;\n\t\t\tstringValue?: unknown;\n\t\t};\n\t\tconst found = v.StringValue ?? v.stringValue ?? v.Value;\n\t\treturn typeof found === 'string' ? found : undefined;\n\t}\n\treturn undefined;\n}\n\n/** A carrier as SQS/SNS message attributes. */\nexport function carrierAsAttributes(\n\tcarrier: TraceCarrier | undefined,\n): Record<string, { DataType: 'String'; StringValue: string }> {\n\tconst attributes: Record<\n\t\tstring,\n\t\t{ DataType: 'String'; StringValue: string }\n\t> = {};\n\tif (!carrier) return attributes;\n\tfor (const [key, value] of Object.entries(carrier)) {\n\t\tattributes[key] = { DataType: 'String', StringValue: value };\n\t}\n\treturn attributes;\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n\tif (!value || typeof value !== 'object' || Array.isArray(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\n\n/**\n * `data` with the carrier under {@link TRACE_CONTEXT_KEY}, for a broker with no\n * header field. Unchanged when there is no carrier, or when `data` is not a\n * plain object a key can be added to — such a message starts its own trace.\n */\nexport function withTraceKey<T>(data: T, carrier: TraceCarrier | undefined): T {\n\tif (!carrier || !isPlainObject(data)) return data;\n\treturn { ...data, [TRACE_CONTEXT_KEY]: carrier } as T;\n}\n\n/**\n * `data` without {@link TRACE_CONTEXT_KEY}, and the carrier that was under it.\n * What a handler sees never has the key.\n */\nexport function withoutTraceKey<T>(data: T): {\n\tdata: T;\n\tcarrier: TraceCarrier | undefined;\n} {\n\tif (!isPlainObject(data) || !(TRACE_CONTEXT_KEY in data)) {\n\t\treturn { data, carrier: undefined };\n\t}\n\tconst { [TRACE_CONTEXT_KEY]: raw, ...rest } = data;\n\treturn {\n\t\tdata: rest as T,\n\t\tcarrier: isPlainObject(raw) ? carrierFromAttributes(raw) : undefined,\n\t};\n}\n"],"mappings":";;;;;AAiBA,IAAY,qBAAL,yBAAA,oBAAA;CACN,mBAAA,WAAA;CACA,mBAAA,iBAAA;CACA,mBAAA,SAAA;CACA,mBAAA,SAAA;CACA,mBAAA,WAAA;CACA,mBAAA,cAAA;CACA,mBAAA,YAAA;;AACD,EAAA,CAAA,CAAA;;AAGA,MAAM,YAA+B;;;;;;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