@geekmidas/constructs 10.0.0-alpha.9 → 10.0.0-alpha.90
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/README.md +222 -158
- package/dist/{Construct-BD5neF7w.mjs → Construct-B1vGBPme.mjs} +33 -34
- package/dist/Construct-B1vGBPme.mjs.map +1 -0
- package/dist/Construct-BQALFCh2.d.cts +230 -0
- package/dist/Construct-BQALFCh2.d.cts.map +1 -0
- package/dist/{Construct-CyS3RpTL.cjs → Construct-DUSXuTHP.cjs} +53 -48
- package/dist/Construct-DUSXuTHP.cjs.map +1 -0
- package/dist/Construct-QXnl3VqT.d.mts +230 -0
- package/dist/Construct-QXnl3VqT.d.mts.map +1 -0
- package/dist/{Cron-DmQ8vQ4b.d.cts → Cron-DI3nKoic.d.cts} +15 -9
- package/dist/Cron-DI3nKoic.d.cts.map +1 -0
- package/dist/{Cron-dh4rUgib.d.mts → Cron-uYAHPnp7.d.mts} +15 -9
- package/dist/Cron-uYAHPnp7.d.mts.map +1 -0
- package/dist/{CronBuilder-Da0C0edR.cjs → CronBuilder-C0Ek1-RA.cjs} +47 -31
- package/dist/CronBuilder-C0Ek1-RA.cjs.map +1 -0
- package/dist/CronBuilder-DaSUm2Na.d.mts +47 -0
- package/dist/CronBuilder-DaSUm2Na.d.mts.map +1 -0
- package/dist/{CronBuilder-CYKT5RiO.mjs → CronBuilder-Dmix_Pen.mjs} +37 -21
- package/dist/CronBuilder-Dmix_Pen.mjs.map +1 -0
- package/dist/CronBuilder-g1lZLWyG.d.cts +47 -0
- package/dist/CronBuilder-g1lZLWyG.d.cts.map +1 -0
- package/dist/{Endpoint-DCQPMdUX.mjs → Endpoint-BG4UJ9oA.mjs} +146 -109
- package/dist/Endpoint-BG4UJ9oA.mjs.map +1 -0
- package/dist/{Endpoint-DcWXE-SZ.cjs → Endpoint-BoUg8ocM.cjs} +174 -131
- package/dist/Endpoint-BoUg8ocM.cjs.map +1 -0
- package/dist/{Endpoint-BjWKinFA.d.mts → Endpoint-Du-NwPX2.d.mts} +83 -91
- package/dist/Endpoint-Du-NwPX2.d.mts.map +1 -0
- package/dist/{Endpoint-dav89W6-.d.cts → Endpoint-aCvBMPoH.d.cts} +82 -90
- package/dist/Endpoint-aCvBMPoH.d.cts.map +1 -0
- package/dist/{EndpointFactory-CjV8F_lJ.mjs → EndpointFactory-BDtsrEvJ.mjs} +57 -76
- package/dist/EndpointFactory-BDtsrEvJ.mjs.map +1 -0
- package/dist/{EndpointFactory-CdWB7wPw.cjs → EndpointFactory-DJ7gXLpR.cjs} +93 -112
- package/dist/EndpointFactory-DJ7gXLpR.cjs.map +1 -0
- package/dist/{index-Bd5FqCoe.d.cts → EndpointFactory-DMYdJCOj.d.mts} +78 -134
- package/dist/EndpointFactory-DMYdJCOj.d.mts.map +1 -0
- package/dist/{index-lAO9egTb.d.mts → EndpointFactory-I7s1co3Y.d.cts} +79 -135
- package/dist/EndpointFactory-I7s1co3Y.d.cts.map +1 -0
- package/dist/Function-DuqGcbOI.d.mts +76 -0
- package/dist/Function-DuqGcbOI.d.mts.map +1 -0
- package/dist/Function-Pu-1kKZz.d.cts +76 -0
- package/dist/Function-Pu-1kKZz.d.cts.map +1 -0
- package/dist/{HonoEndpointAdaptor-P1ahhZHu.mjs → HonoEndpointAdaptor-PtPlbeKY.mjs} +75 -56
- package/dist/HonoEndpointAdaptor-PtPlbeKY.mjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-DtL9j19R.cjs → HonoEndpointAdaptor-zVzVLJEO.cjs} +83 -61
- package/dist/HonoEndpointAdaptor-zVzVLJEO.cjs.map +1 -0
- package/dist/Queue-A3wfD0it.cjs +109 -0
- package/dist/Queue-A3wfD0it.cjs.map +1 -0
- package/dist/Queue-D6USGS4q.mjs +104 -0
- package/dist/Queue-D6USGS4q.mjs.map +1 -0
- package/dist/{Queue-D7ZuwBhy.d.cts → Queue-DlsHRzUp.d.mts} +48 -48
- package/dist/Queue-DlsHRzUp.d.mts.map +1 -0
- package/dist/{Queue-gVGfi2Yk.d.mts → Queue-HPyi0e1i.d.cts} +49 -49
- package/dist/Queue-HPyi0e1i.d.cts.map +1 -0
- package/dist/QueueBuilder-BjuF0UBl.cjs +135 -0
- package/dist/QueueBuilder-BjuF0UBl.cjs.map +1 -0
- package/dist/QueueBuilder-Cue73M4t.mjs +118 -0
- package/dist/QueueBuilder-Cue73M4t.mjs.map +1 -0
- package/dist/QueueBuilder-OSi6LkV9.d.cts +75 -0
- package/dist/QueueBuilder-OSi6LkV9.d.cts.map +1 -0
- package/dist/QueueBuilder-QHsnVt1P.d.mts +75 -0
- package/dist/QueueBuilder-QHsnVt1P.d.mts.map +1 -0
- package/dist/{Subscriber-2mEi0ImH.d.cts → Subscriber-Bpp02cGr.d.cts} +29 -20
- package/dist/Subscriber-Bpp02cGr.d.cts.map +1 -0
- package/dist/{Subscriber-xTJ9ayPN.d.mts → Subscriber-CtN9R48-.d.mts} +29 -20
- package/dist/Subscriber-CtN9R48-.d.mts.map +1 -0
- package/dist/{SubscriberBuilder-BjkbeT9l.mjs → SubscriberBuilder-CDy4nHCz.mjs} +50 -24
- package/dist/SubscriberBuilder-CDy4nHCz.mjs.map +1 -0
- package/dist/SubscriberBuilder-CuCMFpYW.d.mts +67 -0
- package/dist/SubscriberBuilder-CuCMFpYW.d.mts.map +1 -0
- package/dist/{SubscriberBuilder-4OPehf2R.cjs → SubscriberBuilder-D_owVoHo.cjs} +61 -36
- package/dist/SubscriberBuilder-D_owVoHo.cjs.map +1 -0
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts +67 -0
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +1 -0
- package/dist/Topic-D74b5cgs.mjs +99 -0
- package/dist/Topic-D74b5cgs.mjs.map +1 -0
- package/dist/Topic-GHxcU8AG.cjs +104 -0
- package/dist/Topic-GHxcU8AG.cjs.map +1 -0
- package/dist/adaptors/aws.cjs +131 -220
- package/dist/adaptors/aws.cjs.map +1 -1
- package/dist/adaptors/aws.d.cts +34 -53
- package/dist/adaptors/aws.d.cts.map +1 -1
- package/dist/adaptors/aws.d.mts +34 -53
- package/dist/adaptors/aws.d.mts.map +1 -1
- package/dist/adaptors/aws.mjs +102 -193
- package/dist/adaptors/aws.mjs.map +1 -1
- package/dist/adaptors/hono.cjs +3 -10
- package/dist/adaptors/hono.d.cts +7 -16
- package/dist/adaptors/hono.d.cts.map +1 -1
- package/dist/adaptors/hono.d.mts +8 -17
- package/dist/adaptors/hono.d.mts.map +1 -1
- package/dist/adaptors/hono.mjs +2 -10
- package/dist/adaptors/testing.cjs +743 -89
- package/dist/adaptors/testing.cjs.map +1 -1
- package/dist/adaptors/testing.d.cts +351 -54
- package/dist/adaptors/testing.d.cts.map +1 -1
- package/dist/adaptors/testing.d.mts +351 -54
- package/dist/adaptors/testing.d.mts.map +1 -1
- package/dist/adaptors/testing.mjs +706 -70
- package/dist/adaptors/testing.mjs.map +1 -1
- package/dist/auth-BMCJN30Y.d.cts +268 -0
- package/dist/auth-BMCJN30Y.d.cts.map +1 -0
- package/dist/auth-CcuceLYo.d.mts +268 -0
- package/dist/auth-CcuceLYo.d.mts.map +1 -0
- package/dist/auth.cjs +301 -33
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +2 -108
- package/dist/auth.d.mts +2 -108
- package/dist/auth.mjs +289 -27
- package/dist/auth.mjs.map +1 -1
- package/dist/{cache-BrRz3fEB.d.mts → cache-CXh6GIgb.d.mts} +3 -6
- package/dist/cache-CXh6GIgb.d.mts.map +1 -0
- package/dist/{cache-BtZY_tHe.d.cts → cache-DnGDGly3.d.cts} +3 -6
- package/dist/cache-DnGDGly3.d.cts.map +1 -0
- package/dist/cache.cjs +68 -2
- package/dist/cache.cjs.map +1 -0
- package/dist/cache.d.cts +1 -2
- package/dist/cache.d.mts +1 -2
- package/dist/cache.mjs +67 -2
- package/dist/cache.mjs.map +1 -0
- package/dist/cipher-C1lEFX63.mjs +225 -0
- package/dist/cipher-C1lEFX63.mjs.map +1 -0
- package/dist/cipher-CVxfwLjk.cjs +332 -0
- package/dist/cipher-CVxfwLjk.cjs.map +1 -0
- package/dist/{clone-DblgEZZa.mjs → clone-EKNovYHu.mjs} +3 -3
- package/dist/clone-EKNovYHu.mjs.map +1 -0
- package/dist/{clone-Dy0cR2SZ.cjs → clone-UGJpvQnL.cjs} +7 -8
- package/dist/clone-UGJpvQnL.cjs.map +1 -0
- package/dist/{construct-interface-D9d4Gm4p.d.cts → construct-interface-B1AfqRl4.d.cts} +42 -11
- package/dist/construct-interface-B1AfqRl4.d.cts.map +1 -0
- package/dist/{construct-interface-g5GM5pwR.d.mts → construct-interface-DluK3_da.d.mts} +42 -11
- package/dist/construct-interface-DluK3_da.d.mts.map +1 -0
- package/dist/construct-interface.cjs +113 -7
- package/dist/construct-interface.cjs.map +1 -0
- package/dist/construct-interface.d.cts +2 -2
- package/dist/construct-interface.d.mts +2 -2
- package/dist/construct-interface.mjs +106 -2
- package/dist/construct-interface.mjs.map +1 -0
- package/dist/credential.cjs +77 -17
- package/dist/credential.cjs.map +1 -1
- package/dist/credential.d.cts +34 -9
- package/dist/credential.d.cts.map +1 -1
- package/dist/credential.d.mts +34 -9
- package/dist/credential.d.mts.map +1 -1
- package/dist/credential.mjs +71 -13
- package/dist/credential.mjs.map +1 -1
- package/dist/crons/index.cjs +129 -7
- package/dist/crons/index.cjs.map +1 -1
- package/dist/crons/index.d.cts +45 -11
- package/dist/crons/index.d.cts.map +1 -1
- package/dist/crons/index.d.mts +45 -11
- package/dist/crons/index.d.mts.map +1 -1
- package/dist/crons/index.mjs +127 -8
- package/dist/crons/index.mjs.map +1 -1
- package/dist/database/kysely.cjs +4 -181
- package/dist/database/kysely.d.cts +2 -152
- package/dist/database/kysely.d.mts +2 -152
- package/dist/database/kysely.mjs +2 -180
- package/dist/email.cjs +25 -12
- package/dist/email.cjs.map +1 -1
- package/dist/email.d.cts +3 -7
- package/dist/email.d.cts.map +1 -1
- package/dist/email.d.mts +3 -7
- package/dist/email.d.mts.map +1 -1
- package/dist/email.mjs +16 -3
- package/dist/email.mjs.map +1 -1
- package/dist/encryption.cjs +96 -0
- package/dist/encryption.cjs.map +1 -0
- package/dist/encryption.d.cts +117 -0
- package/dist/encryption.d.cts.map +1 -0
- package/dist/encryption.d.mts +117 -0
- package/dist/encryption.d.mts.map +1 -0
- package/dist/encryption.mjs +83 -0
- package/dist/encryption.mjs.map +1 -0
- package/dist/endpoints/index.cjs +8 -10
- package/dist/endpoints/index.d.cts +51 -7
- package/dist/endpoints/index.d.cts.map +1 -0
- package/dist/endpoints/index.d.mts +51 -7
- package/dist/endpoints/index.d.mts.map +1 -0
- package/dist/endpoints/index.mjs +6 -10
- package/dist/external-api-MJ8id87V.d.mts +105 -0
- package/dist/external-api-MJ8id87V.d.mts.map +1 -0
- package/dist/external-api-O107yzZJ.d.cts +105 -0
- package/dist/external-api-O107yzZJ.d.cts.map +1 -0
- package/dist/external-api.cjs +142 -0
- package/dist/external-api.cjs.map +1 -0
- package/dist/external-api.d.cts +2 -0
- package/dist/external-api.d.mts +2 -0
- package/dist/external-api.mjs +139 -0
- package/dist/external-api.mjs.map +1 -0
- package/dist/file-server.cjs +42 -10
- package/dist/file-server.cjs.map +1 -1
- package/dist/file-server.d.cts +6 -10
- package/dist/file-server.d.cts.map +1 -1
- package/dist/file-server.d.mts +6 -10
- package/dist/file-server.d.mts.map +1 -1
- package/dist/file-server.mjs +34 -2
- package/dist/file-server.mjs.map +1 -1
- package/dist/functions/index.cjs +3 -6
- package/dist/functions/index.d.cts +3 -4
- package/dist/functions/index.d.mts +3 -4
- package/dist/functions/index.mjs +2 -6
- package/dist/{functions-14lpEFL4.mjs → functions-BFizikJU.mjs} +376 -238
- package/dist/{functions-14lpEFL4.mjs.map → functions-BFizikJU.mjs.map} +1 -1
- package/dist/{functions-i_la-N5r.cjs → functions-CfzJG9hK.cjs} +414 -264
- package/dist/functions-CfzJG9hK.cjs.map +1 -0
- package/dist/index-BuzRvKOQ.d.cts +115 -0
- package/dist/index-BuzRvKOQ.d.cts.map +1 -0
- package/dist/index-CTkKOer4.d.mts +115 -0
- package/dist/index-CTkKOer4.d.mts.map +1 -0
- package/dist/index-CeEtxDmK.d.cts +79 -0
- package/dist/index-CeEtxDmK.d.cts.map +1 -0
- package/dist/index-CeEtxDmK.d.mts +79 -0
- package/dist/index-CeEtxDmK.d.mts.map +1 -0
- package/dist/index.cjs +6 -3
- package/dist/index.d.cts +27 -4
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +27 -4
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -3
- package/dist/kms-B-Hm3d5r.cjs +85 -0
- package/dist/kms-B-Hm3d5r.cjs.map +1 -0
- package/dist/kms-BdUlMJEZ.mjs +85 -0
- package/dist/kms-BdUlMJEZ.mjs.map +1 -0
- package/dist/kysely-Bii4l6eP.mjs +370 -0
- package/dist/kysely-Bii4l6eP.mjs.map +1 -0
- package/dist/kysely-CO_Dk43W.cjs +383 -0
- package/dist/kysely-CO_Dk43W.cjs.map +1 -0
- package/dist/kysely-D0bpzgPs.d.cts +175 -0
- package/dist/kysely-D0bpzgPs.d.cts.map +1 -0
- package/dist/kysely-DUqC3Ie0.d.mts +175 -0
- package/dist/kysely-DUqC3Ie0.d.mts.map +1 -0
- package/dist/{telemetry-C3L0iS28.d.cts → lambdaTelemetry-8vnmVZQ5.d.cts} +3 -6
- package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +1 -0
- package/dist/{telemetry-D7bVFLGi.d.mts → lambdaTelemetry-8vnmVZQ5.d.mts} +3 -6
- package/dist/lambdaTelemetry-8vnmVZQ5.d.mts.map +1 -0
- package/dist/{lazyAccessors-BoJN3SMd.mjs → lazyAccessors-CFanua0O.mjs} +20 -60
- package/dist/lazyAccessors-CFanua0O.mjs.map +1 -0
- package/dist/{lazyAccessors-e3j2oE2m.cjs → lazyAccessors-hJKGv8Ay.cjs} +60 -113
- package/dist/lazyAccessors-hJKGv8Ay.cjs.map +1 -0
- package/dist/mobile-app.cjs +73 -0
- package/dist/mobile-app.cjs.map +1 -0
- package/dist/mobile-app.d.cts +61 -0
- package/dist/mobile-app.d.cts.map +1 -0
- package/dist/mobile-app.d.mts +61 -0
- package/dist/mobile-app.d.mts.map +1 -0
- package/dist/mobile-app.mjs +72 -0
- package/dist/mobile-app.mjs.map +1 -0
- package/dist/object-storage.cjs +18 -10
- package/dist/object-storage.cjs.map +1 -1
- package/dist/object-storage.d.cts +3 -7
- package/dist/object-storage.d.cts.map +1 -1
- package/dist/object-storage.d.mts +3 -7
- package/dist/object-storage.d.mts.map +1 -1
- package/dist/object-storage.mjs +11 -3
- package/dist/object-storage.mjs.map +1 -1
- package/dist/processAudits-BRRVVHUB.mjs +131 -0
- package/dist/processAudits-BRRVVHUB.mjs.map +1 -0
- package/dist/processAudits-DasOZjPl.cjs +154 -0
- package/dist/processAudits-DasOZjPl.cjs.map +1 -0
- package/dist/queue/index.cjs +6 -189
- package/dist/queue/index.d.cts +3 -60
- package/dist/queue/index.d.mts +3 -60
- package/dist/queue/index.mjs +3 -186
- package/dist/rest-api.cjs +90 -59
- package/dist/rest-api.cjs.map +1 -1
- package/dist/rest-api.d.cts +70 -42
- package/dist/rest-api.d.cts.map +1 -1
- package/dist/rest-api.d.mts +70 -42
- package/dist/rest-api.d.mts.map +1 -1
- package/dist/rest-api.mjs +82 -51
- package/dist/rest-api.mjs.map +1 -1
- package/dist/{chunk-DWy1uDak.cjs → rolldown-runtime-y5ARvAq5.cjs} +14 -18
- package/dist/runSubscriber-BHvJ8POr.mjs +109 -0
- package/dist/runSubscriber-BHvJ8POr.mjs.map +1 -0
- package/dist/runSubscriber-D8nLXIv1.cjs +126 -0
- package/dist/runSubscriber-D8nLXIv1.cjs.map +1 -0
- package/dist/shutdown-BMJmAhSt.cjs +38 -0
- package/dist/shutdown-BMJmAhSt.cjs.map +1 -0
- package/dist/shutdown-C7xa8x9S.mjs +27 -0
- package/dist/shutdown-C7xa8x9S.mjs.map +1 -0
- package/dist/site.cjs +33 -7
- package/dist/site.cjs.map +1 -1
- package/dist/site.d.cts +17 -7
- package/dist/site.d.cts.map +1 -1
- package/dist/site.d.mts +17 -7
- package/dist/site.d.mts.map +1 -1
- package/dist/site.mjs +29 -3
- package/dist/site.mjs.map +1 -1
- package/dist/stages-BSCF19o2.d.cts +56 -0
- package/dist/stages-BSCF19o2.d.cts.map +1 -0
- package/dist/stages-BSCF19o2.d.mts +56 -0
- package/dist/stages-BSCF19o2.d.mts.map +1 -0
- package/dist/subscribers/index.cjs +118 -6
- package/dist/subscribers/index.cjs.map +1 -0
- package/dist/subscribers/index.d.cts +51 -6
- package/dist/subscribers/index.d.cts.map +1 -0
- package/dist/subscribers/index.d.mts +51 -6
- package/dist/subscribers/index.d.mts.map +1 -0
- package/dist/subscribers/index.mjs +115 -5
- package/dist/subscribers/index.mjs.map +1 -0
- package/dist/surfaceEnv-CNimK76p.cjs +56 -0
- package/dist/surfaceEnv-CNimK76p.cjs.map +1 -0
- package/dist/surfaceEnv-wMT5QzgZ.mjs +45 -0
- package/dist/surfaceEnv-wMT5QzgZ.mjs.map +1 -0
- package/dist/telemetry-B48RLjyk.d.cts +40 -0
- package/dist/telemetry-B48RLjyk.d.cts.map +1 -0
- package/dist/telemetry-DRtT1_0A.d.mts +40 -0
- package/dist/telemetry-DRtT1_0A.d.mts.map +1 -0
- package/dist/telemetry.cjs +56 -0
- package/dist/telemetry.cjs.map +1 -0
- package/dist/telemetry.d.cts +2 -0
- package/dist/telemetry.d.mts +2 -0
- package/dist/telemetry.mjs +55 -0
- package/dist/telemetry.mjs.map +1 -0
- package/dist/topic/index.cjs +3 -137
- package/dist/topic/index.d.cts +2 -4
- package/dist/topic/index.d.mts +2 -4
- package/dist/topic/index.mjs +2 -134
- package/dist/tracing-CxaZ98IB.mjs +110 -0
- package/dist/tracing-CxaZ98IB.mjs.map +1 -0
- package/dist/tracing-DPMidF_r.cjs +127 -0
- package/dist/tracing-DPMidF_r.cjs.map +1 -0
- package/dist/{types-BlAkSuGI.d.cts → types-DMuSQeLL.d.cts} +3 -5
- package/dist/types-DMuSQeLL.d.cts.map +1 -0
- package/dist/{types-aKksMEWL.d.mts → types-DMuSQeLL.d.mts} +3 -5
- package/dist/types-DMuSQeLL.d.mts.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.mjs +1 -0
- package/dist/worker.cjs +59 -34
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.cts +70 -45
- package/dist/worker.d.cts.map +1 -1
- package/dist/worker.d.mts +70 -44
- package/dist/worker.d.mts.map +1 -1
- package/dist/worker.mjs +54 -29
- package/dist/worker.mjs.map +1 -1
- package/package.json +96 -42
- package/dist/Construct-BD5neF7w.mjs.map +0 -1
- package/dist/Construct-C0ijr2qp.d.cts +0 -117
- package/dist/Construct-C0ijr2qp.d.cts.map +0 -1
- package/dist/Construct-Ct8nalEi.d.mts +0 -117
- package/dist/Construct-Ct8nalEi.d.mts.map +0 -1
- package/dist/Construct-CyS3RpTL.cjs.map +0 -1
- package/dist/Cron-DmQ8vQ4b.d.cts.map +0 -1
- package/dist/Cron-dh4rUgib.d.mts.map +0 -1
- package/dist/CronBuilder-BquXDbDI.d.cts +0 -44
- package/dist/CronBuilder-BquXDbDI.d.cts.map +0 -1
- package/dist/CronBuilder-CGgY2080.d.mts +0 -44
- package/dist/CronBuilder-CGgY2080.d.mts.map +0 -1
- package/dist/CronBuilder-CYKT5RiO.mjs.map +0 -1
- package/dist/CronBuilder-Da0C0edR.cjs.map +0 -1
- package/dist/Endpoint-BjWKinFA.d.mts.map +0 -1
- package/dist/Endpoint-DCQPMdUX.mjs.map +0 -1
- package/dist/Endpoint-DcWXE-SZ.cjs.map +0 -1
- package/dist/Endpoint-dav89W6-.d.cts.map +0 -1
- package/dist/EndpointFactory-CdWB7wPw.cjs.map +0 -1
- package/dist/EndpointFactory-CjV8F_lJ.mjs.map +0 -1
- package/dist/HonoEndpointAdaptor-DtL9j19R.cjs.map +0 -1
- package/dist/HonoEndpointAdaptor-P1ahhZHu.mjs.map +0 -1
- package/dist/Queue-D7ZuwBhy.d.cts.map +0 -1
- package/dist/Queue-gVGfi2Yk.d.mts.map +0 -1
- package/dist/Subscriber-2mEi0ImH.d.cts.map +0 -1
- package/dist/Subscriber-xTJ9ayPN.d.mts.map +0 -1
- package/dist/SubscriberBuilder-4OPehf2R.cjs.map +0 -1
- package/dist/SubscriberBuilder-BjkbeT9l.mjs.map +0 -1
- package/dist/SubscriberBuilder-Dptmo-1A.d.mts +0 -62
- package/dist/SubscriberBuilder-Dptmo-1A.d.mts.map +0 -1
- package/dist/SubscriberBuilder-waNhzjSM.d.cts +0 -62
- package/dist/SubscriberBuilder-waNhzjSM.d.cts.map +0 -1
- package/dist/Topic-19QeHBIR.d.cts +0 -91
- package/dist/Topic-19QeHBIR.d.cts.map +0 -1
- package/dist/Topic-DuFeqkBh.d.mts +0 -91
- package/dist/Topic-DuFeqkBh.d.mts.map +0 -1
- package/dist/auth.d.cts.map +0 -1
- package/dist/auth.d.mts.map +0 -1
- package/dist/cache-0ANvRQnD.mjs +0 -51
- package/dist/cache-0ANvRQnD.mjs.map +0 -1
- package/dist/cache-3WSvAulx.cjs +0 -57
- package/dist/cache-3WSvAulx.cjs.map +0 -1
- package/dist/cache-BrRz3fEB.d.mts.map +0 -1
- package/dist/cache-BtZY_tHe.d.cts.map +0 -1
- package/dist/clone-DblgEZZa.mjs.map +0 -1
- package/dist/clone-Dy0cR2SZ.cjs.map +0 -1
- package/dist/construct-interface-BfjcOD_E.cjs +0 -117
- package/dist/construct-interface-BfjcOD_E.cjs.map +0 -1
- package/dist/construct-interface-D9d4Gm4p.d.cts.map +0 -1
- package/dist/construct-interface-Z4CpS8tK.mjs +0 -81
- package/dist/construct-interface-Z4CpS8tK.mjs.map +0 -1
- package/dist/construct-interface-g5GM5pwR.d.mts.map +0 -1
- package/dist/database/kysely.cjs.map +0 -1
- package/dist/database/kysely.d.cts.map +0 -1
- package/dist/database/kysely.d.mts.map +0 -1
- package/dist/database/kysely.mjs.map +0 -1
- package/dist/functions-i_la-N5r.cjs.map +0 -1
- package/dist/index-Bd5FqCoe.d.cts.map +0 -1
- package/dist/index-BknhM6Ux.d.mts +0 -31
- package/dist/index-BknhM6Ux.d.mts.map +0 -1
- package/dist/index-CBSfrowv.d.cts +0 -31
- package/dist/index-CBSfrowv.d.cts.map +0 -1
- package/dist/index-D24Xm79M.d.cts +0 -171
- package/dist/index-D24Xm79M.d.cts.map +0 -1
- package/dist/index-_ajboYxK.d.mts +0 -171
- package/dist/index-_ajboYxK.d.mts.map +0 -1
- package/dist/index-lAO9egTb.d.mts.map +0 -1
- package/dist/lazyAccessors-BoJN3SMd.mjs.map +0 -1
- package/dist/lazyAccessors-e3j2oE2m.cjs.map +0 -1
- package/dist/processAudits-CGqttuXm.cjs +0 -92
- package/dist/processAudits-CGqttuXm.cjs.map +0 -1
- package/dist/processAudits-Dmts9H_b.mjs +0 -80
- package/dist/processAudits-Dmts9H_b.mjs.map +0 -1
- package/dist/queue/index.cjs.map +0 -1
- package/dist/queue/index.d.cts.map +0 -1
- package/dist/queue/index.d.mts.map +0 -1
- package/dist/queue/index.mjs.map +0 -1
- package/dist/surfaceEnv-BFXEms2f.cjs +0 -39
- package/dist/surfaceEnv-BFXEms2f.cjs.map +0 -1
- package/dist/surfaceEnv-C3Ktahea.mjs +0 -27
- package/dist/surfaceEnv-C3Ktahea.mjs.map +0 -1
- package/dist/telemetry-C3L0iS28.d.cts.map +0 -1
- package/dist/telemetry-D7bVFLGi.d.mts.map +0 -1
- package/dist/topic/index.cjs.map +0 -1
- package/dist/topic/index.mjs.map +0 -1
- package/dist/types-BlAkSuGI.d.cts.map +0 -1
- package/dist/types-aKksMEWL.d.mts.map +0 -1
package/dist/site.d.cts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { Declarable } from "./construct-interface-
|
|
1
|
+
import { i as Declarable } from "./construct-interface-B1AfqRl4.cjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-B48RLjyk.cjs";
|
|
2
3
|
import { ConstructName, Declaration, Dependency, SiteDeclaration } from "@geekmidas/manifest";
|
|
3
|
-
|
|
4
4
|
//#region src/site.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Where a site's source lives, and the little else a layout can differ by.
|
|
8
7
|
*
|
|
9
8
|
* Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a
|
|
10
9
|
* complete site.
|
|
11
10
|
*/
|
|
12
|
-
interface StaticSiteConfig {
|
|
11
|
+
export interface StaticSiteConfig {
|
|
13
12
|
/**
|
|
14
13
|
* Where its source lives, relative to the workspace root — `'apps/web'`.
|
|
15
14
|
*
|
|
@@ -17,6 +16,12 @@ interface StaticSiteConfig {
|
|
|
17
16
|
* inferred from the id, which made a site's home whatever was on disk.
|
|
18
17
|
*/
|
|
19
18
|
path: string;
|
|
19
|
+
/**
|
|
20
|
+
* The label it answers on under a stage's domain — `api` for
|
|
21
|
+
* `api.myapp.com`, from `domains` — and under the project locally,
|
|
22
|
+
* `api.myapp.localhost`. Absent, its id kebab-cased.
|
|
23
|
+
*/
|
|
24
|
+
subdomain?: string;
|
|
20
25
|
/**
|
|
21
26
|
* The port it answers on locally.
|
|
22
27
|
*
|
|
@@ -52,8 +57,15 @@ interface StaticSiteConfig {
|
|
|
52
57
|
* else.
|
|
53
58
|
*/
|
|
54
59
|
variant?: SiteDeclaration['variant'];
|
|
60
|
+
/**
|
|
61
|
+
* What the site emits — the `Telemetry` construct. An edge to the node and
|
|
62
|
+
* nothing more for now: a site is handed none of its server keys, and the
|
|
63
|
+
* browser half (propagation from the generated client, then a browser SDK
|
|
64
|
+
* exporting through the API) builds on this edge.
|
|
65
|
+
*/
|
|
66
|
+
telemetry?: Telemetry;
|
|
55
67
|
}
|
|
56
|
-
declare class StaticSite<TName extends string = string> implements Declarable<TName> {
|
|
68
|
+
export declare class StaticSite<TName extends string = string> implements Declarable<TName> {
|
|
57
69
|
private readonly config;
|
|
58
70
|
/**
|
|
59
71
|
* Internal: how `.dependsOn()` carries edges into the copy it returns.
|
|
@@ -88,7 +100,5 @@ declare class StaticSite<TName extends string = string> implements Declarable<TN
|
|
|
88
100
|
dependsOn(constructs: readonly Declarable[]): StaticSite<TName>;
|
|
89
101
|
declare(): Declaration[];
|
|
90
102
|
}
|
|
91
|
-
//# sourceMappingURL=site.d.ts.map
|
|
92
103
|
//#endregion
|
|
93
|
-
export { StaticSite, StaticSiteConfig };
|
|
94
104
|
//# sourceMappingURL=site.d.cts.map
|
package/dist/site.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.cts","names":[],"sources":["../src/site.ts"],"
|
|
1
|
+
{"version":3,"file":"site.d.cts","names":[],"sources":["../src/site.ts"],"mappings":";;;;;;;;;;iBAyCiB;;;;;;;EAOhB;;;;;;EAMA;;;;;;;EAOA;;;;;;;EAOA;IAAW;IAAiB;;;;;;;;;;EAS5B;;;;;;;;;EASA,UAAU;;;;;;;EAOV,YAAY;;qBAGA,WAAW,0CACZ,WAAW;mBAOJ;;;;;;;mBAOA;WAZT,IAAI;WACJ;IAAQ;;EAEjB,YACC,IAAI,cAAc,QACD,QAAQ,kBAOR;;;;;;;EAAA,wBAAuB;;;;;;;;;;;;EAiBzC,UAAU,qBAAqB,eAAe,WAAW;EAOzD,WAAW"}
|
package/dist/site.d.mts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { Declarable } from "./construct-interface-
|
|
1
|
+
import { i as Declarable } from "./construct-interface-DluK3_da.mjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-DRtT1_0A.mjs";
|
|
2
3
|
import { ConstructName, Declaration, Dependency, SiteDeclaration } from "@geekmidas/manifest";
|
|
3
|
-
|
|
4
4
|
//#region src/site.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Where a site's source lives, and the little else a layout can differ by.
|
|
8
7
|
*
|
|
9
8
|
* Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a
|
|
10
9
|
* complete site.
|
|
11
10
|
*/
|
|
12
|
-
interface StaticSiteConfig {
|
|
11
|
+
export interface StaticSiteConfig {
|
|
13
12
|
/**
|
|
14
13
|
* Where its source lives, relative to the workspace root — `'apps/web'`.
|
|
15
14
|
*
|
|
@@ -17,6 +16,12 @@ interface StaticSiteConfig {
|
|
|
17
16
|
* inferred from the id, which made a site's home whatever was on disk.
|
|
18
17
|
*/
|
|
19
18
|
path: string;
|
|
19
|
+
/**
|
|
20
|
+
* The label it answers on under a stage's domain — `api` for
|
|
21
|
+
* `api.myapp.com`, from `domains` — and under the project locally,
|
|
22
|
+
* `api.myapp.localhost`. Absent, its id kebab-cased.
|
|
23
|
+
*/
|
|
24
|
+
subdomain?: string;
|
|
20
25
|
/**
|
|
21
26
|
* The port it answers on locally.
|
|
22
27
|
*
|
|
@@ -52,8 +57,15 @@ interface StaticSiteConfig {
|
|
|
52
57
|
* else.
|
|
53
58
|
*/
|
|
54
59
|
variant?: SiteDeclaration['variant'];
|
|
60
|
+
/**
|
|
61
|
+
* What the site emits — the `Telemetry` construct. An edge to the node and
|
|
62
|
+
* nothing more for now: a site is handed none of its server keys, and the
|
|
63
|
+
* browser half (propagation from the generated client, then a browser SDK
|
|
64
|
+
* exporting through the API) builds on this edge.
|
|
65
|
+
*/
|
|
66
|
+
telemetry?: Telemetry;
|
|
55
67
|
}
|
|
56
|
-
declare class StaticSite<TName extends string = string> implements Declarable<TName> {
|
|
68
|
+
export declare class StaticSite<TName extends string = string> implements Declarable<TName> {
|
|
57
69
|
private readonly config;
|
|
58
70
|
/**
|
|
59
71
|
* Internal: how `.dependsOn()` carries edges into the copy it returns.
|
|
@@ -88,7 +100,5 @@ declare class StaticSite<TName extends string = string> implements Declarable<TN
|
|
|
88
100
|
dependsOn(constructs: readonly Declarable[]): StaticSite<TName>;
|
|
89
101
|
declare(): Declaration[];
|
|
90
102
|
}
|
|
91
|
-
//# sourceMappingURL=site.d.ts.map
|
|
92
103
|
//#endregion
|
|
93
|
-
export { StaticSite, StaticSiteConfig };
|
|
94
104
|
//# sourceMappingURL=site.d.mts.map
|
package/dist/site.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.mts","names":[],"sources":["../src/site.ts"],"
|
|
1
|
+
{"version":3,"file":"site.d.mts","names":[],"sources":["../src/site.ts"],"mappings":";;;;;;;;;;iBAyCiB;;;;;;;EAOhB;;;;;;EAMA;;;;;;;EAOA;;;;;;;EAOA;IAAW;IAAiB;;;;;;;;;;EAS5B;;;;;;;;;EASA,UAAU;;;;;;;EAOV,YAAY;;qBAGA,WAAW,0CACZ,WAAW;mBAOJ;;;;;;;mBAOA;WAZT,IAAI;WACJ;IAAQ;;EAEjB,YACC,IAAI,cAAc,QACD,QAAQ,kBAOR;;;;;;;EAAA,wBAAuB;;;;;;;;;;;;EAiBzC,UAAU,qBAAqB,eAAe,WAAW;EAOzD,WAAW"}
|
package/dist/site.mjs
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
|
-
import { edgeTo } from "./construct-interface
|
|
1
|
+
import { edgeTo } from "./construct-interface.mjs";
|
|
2
2
|
import { canonicalId, provideKey } from "@geekmidas/manifest";
|
|
3
|
-
|
|
4
3
|
//#region src/site.ts
|
|
4
|
+
/**
|
|
5
|
+
* `StaticSite` — a frontend, declared like anything else.
|
|
6
|
+
*
|
|
7
|
+
* The point is not that a site needs provisioning; it is that a site is the
|
|
8
|
+
* *consumer* whose edges make four hand-maintained lists derivable. Declaring it
|
|
9
|
+
* is what turns "which origins does the API allow" from something a person keeps
|
|
10
|
+
* in step into something the graph already knows.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* export const console = new StaticSite('Console', { path: 'apps/console' })
|
|
14
|
+
* .dependsOn([api, auth]);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* It has no `.service`. A site is not a process that registers clients — it is
|
|
18
|
+
* built, and the values it needs are inlined or fetched by its own framework —
|
|
19
|
+
* so the edge is {@link Declarable} rather than {@link Consumable}, and the
|
|
20
|
+
* asymmetry is the honest one: a site consumes addresses, not connections.
|
|
21
|
+
*
|
|
22
|
+
* Only the static variant ships. SSR deploy shapes are unstable and each one is
|
|
23
|
+
* its own maintenance, so they follow rather than arrive together. A mobile app
|
|
24
|
+
* is not a site — it is reached by a scheme, not a URL — and is its own
|
|
25
|
+
* construct: see `MobileApp`.
|
|
26
|
+
*/
|
|
5
27
|
var StaticSite = class StaticSite {
|
|
28
|
+
config;
|
|
29
|
+
dependencies;
|
|
6
30
|
id;
|
|
7
31
|
keys;
|
|
8
32
|
constructor(id, config, dependencies = []) {
|
|
@@ -30,6 +54,7 @@ var StaticSite = class StaticSite {
|
|
|
30
54
|
kind: "site",
|
|
31
55
|
id: this.id,
|
|
32
56
|
variant: this.config.variant ?? "static",
|
|
57
|
+
...this.config.subdomain ? { subdomain: this.config.subdomain } : {},
|
|
33
58
|
app: {
|
|
34
59
|
path: this.config.path,
|
|
35
60
|
...this.config.port ? { port: this.config.port } : {},
|
|
@@ -37,11 +62,12 @@ var StaticSite = class StaticSite {
|
|
|
37
62
|
},
|
|
38
63
|
...this.config.root ? { root: true } : {},
|
|
39
64
|
dependencies: this.dependencies,
|
|
65
|
+
...this.config.telemetry ? { telemetry: this.config.telemetry.id } : {},
|
|
40
66
|
provides: [this.keys.url]
|
|
41
67
|
}];
|
|
42
68
|
}
|
|
43
69
|
};
|
|
44
|
-
|
|
45
70
|
//#endregion
|
|
46
71
|
export { StaticSite };
|
|
72
|
+
|
|
47
73
|
//# sourceMappingURL=site.mjs.map
|
package/dist/site.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.mjs","names":[
|
|
1
|
+
{"version":3,"file":"site.mjs","names":[],"sources":["../src/site.ts"],"sourcesContent":["/**\n * `StaticSite` — a frontend, declared like anything else.\n *\n * The point is not that a site needs provisioning; it is that a site is the\n * *consumer* whose edges make four hand-maintained lists derivable. Declaring it\n * is what turns \"which origins does the API allow\" from something a person keeps\n * in step into something the graph already knows.\n *\n * ```ts\n * export const console = new StaticSite('Console', { path: 'apps/console' })\n * .dependsOn([api, auth]);\n * ```\n *\n * It has no `.service`. A site is not a process that registers clients — it is\n * built, and the values it needs are inlined or fetched by its own framework —\n * so the edge is {@link Declarable} rather than {@link Consumable}, and the\n * asymmetry is the honest one: a site consumes addresses, not connections.\n *\n * Only the static variant ships. SSR deploy shapes are unstable and each one is\n * its own maintenance, so they follow rather than arrive together. A mobile app\n * is not a site — it is reached by a scheme, not a URL — and is its own\n * construct: see `MobileApp`.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\tprovideKey,\n\ttype SiteDeclaration,\n} from '@geekmidas/manifest';\nimport { type Declarable, edgeTo } from './construct-interface';\nimport type { Telemetry } from './telemetry';\n\n/**\n * Where a site's source lives, and the little else a layout can differ by.\n *\n * Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a\n * complete site.\n */\nexport interface StaticSiteConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/web'`.\n\t *\n\t * Required, the same field `RestApi` and `BetterAuth` take. It was\n\t * inferred from the id, which made a site's home whatever was on disk.\n\t */\n\tpath: string;\n\t/**\n\t * The label it answers on under a stage's domain — `api` for\n\t * `api.myapp.com`, from `domains` — and under the project locally,\n\t * `api.myapp.localhost`. Absent, its id kebab-cased.\n\t */\n\tsubdomain?: string;\n\t/**\n\t * The port it answers on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, so adding a site\n\t * does not renumber the ones already running.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars this site reads.\n\t *\n\t * A frontend's values are inlined at build time, so the build has to know\n\t * which ones it reads before it reads them.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Whether the base domain points at this site.\n\t *\n\t * A project with one site needs this no more than a project with one\n\t * database needs to say which database. It matters when there are several\n\t * and none is called `web`: the base domain then belongs to whichever site\n\t * says so, rather than to whichever file the glob happened to reach first.\n\t */\n\troot?: boolean;\n\t/**\n\t * Which framework builds it.\n\t *\n\t * It selects how values are delivered — `VITE_`, `NEXT_PUBLIC_`, a fetched\n\t * `config.json` — and never which values there are. One neutral name from the\n\t * construct, one serialisation per framework, the same rule as everywhere\n\t * else.\n\t */\n\tvariant?: SiteDeclaration['variant'];\n\t/**\n\t * What the site emits — the `Telemetry` construct. An edge to the node and\n\t * nothing more for now: a site is handed none of its server keys, and the\n\t * browser half (propagation from the generated client, then a browser SDK\n\t * exporting through the API) builds on this edge.\n\t */\n\ttelemetry?: Telemetry;\n}\n\nexport class StaticSite<TName extends string = string>\n\timplements Declarable<TName>\n{\n\treadonly id: TName;\n\treadonly keys: { url: string };\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: StaticSiteConfig,\n\t\t/**\n\t\t * Internal: how `.dependsOn()` carries edges into the copy it returns.\n\t\t * Written as a parameter rather than a mutable field so the builder can\n\t\t * stay immutable without a clone method, the same shape\n\t\t * `KyselyDatabase` uses for its derived forms.\n\t\t */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { url: provideKey(this.id, 'url') };\n\t}\n\n\t/**\n\t * What this site calls.\n\t *\n\t * Immutable, like every other builder here: it returns a new site rather than\n\t * mutating this one, so a module that exports both a base and a variant of it\n\t * cannot have the second silently change the first.\n\t *\n\t * Takes {@link Declarable} rather than {@link Consumable} because a site's\n\t * edge is a build-time link and not a service injection — requiring a client\n\t * would exclude exactly the surfaces a frontend actually depends on.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): StaticSite<TName> {\n\t\treturn new StaticSite<TName>(this.id as ConstructName<TName>, this.config, [\n\t\t\t...this.dependencies,\n\t\t\t...constructs.map(edgeTo),\n\t\t]);\n\t}\n\n\tdeclare(): Declaration[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'site',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'static',\n\t\t\t\t...(this.config.subdomain ? { subdomain: this.config.subdomain } : {}),\n\t\t\t\tapp: {\n\t\t\t\t\tpath: this.config.path,\n\t\t\t\t\t...(this.config.port ? { port: this.config.port } : {}),\n\t\t\t\t\t...(this.config.config ? { config: this.config.config } : {}),\n\t\t\t\t},\n\t\t\t\t...(this.config.root ? { root: true } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\t...(this.config.telemetry\n\t\t\t\t\t? { telemetry: this.config.telemetry.id }\n\t\t\t\t\t: {}),\n\t\t\t\tprovides: [this.keys.url],\n\t\t\t},\n\t\t];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,IAAa,aAAb,MAAa,WAEb;CAMmB;CAOA;CAZlB;CACA;CAEA,YACC,IACA,QAOA,eAAuD,CAAC,GACvD;EARgB,KAAA,SAAA;EAOA,KAAA,eAAA;EAEjB,KAAK,KAAK,YAAY,EAAY;EAClC,KAAK,OAAO,EAAE,KAAK,WAAW,KAAK,IAAI,KAAK,EAAE;CAC/C;;;;;;;;;;;;CAaA,UAAU,YAAsD;EAC/D,OAAO,IAAI,WAAkB,KAAK,IAA4B,KAAK,QAAQ,CAC1E,GAAG,KAAK,cACR,GAAG,WAAW,IAAI,MAAM,CACzB,CAAC;CACF;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,SAAS,KAAK,OAAO,WAAW;GAChC,GAAI,KAAK,OAAO,YAAY,EAAE,WAAW,KAAK,OAAO,UAAU,IAAI,CAAC;GACpE,KAAK;IACJ,MAAM,KAAK,OAAO;IAClB,GAAI,KAAK,OAAO,OAAO,EAAE,MAAM,KAAK,OAAO,KAAK,IAAI,CAAC;IACrD,GAAI,KAAK,OAAO,SAAS,EAAE,QAAQ,KAAK,OAAO,OAAO,IAAI,CAAC;GAC5D;GACA,GAAI,KAAK,OAAO,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;GACzC,cAAc,KAAK;GACnB,GAAI,KAAK,OAAO,YACb,EAAE,WAAW,KAAK,OAAO,UAAU,GAAG,IACtC,CAAC;GACJ,UAAU,CAAC,KAAK,KAAK,GAAG;EACzB,CACD;CACD;AACD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//#region src/stages.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The project's stage names, as types.
|
|
4
|
+
*
|
|
5
|
+
* `gkm.config.ts` declares the stages — `stages: { local: 'dev', deployed:
|
|
6
|
+
* ['staging', 'prod'] }` — but constructs and application code cannot import
|
|
7
|
+
* the config, so a stage name written anywhere else was a bare `string`: a
|
|
8
|
+
* typo'd key in an `ExternalApi`'s `url` map was silently never read, and a
|
|
9
|
+
* seed's `stage === 'prodution'` branch silently never ran.
|
|
10
|
+
*
|
|
11
|
+
* `gkm dev`, `gkm build` and `gkm test --prepare` write `.gkm/stages.d.ts`,
|
|
12
|
+
* which fills this interface in from the loaded workspace:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* declare module '@geekmidas/constructs' {
|
|
16
|
+
* interface Stages { local: 'dev'; deployed: 'staging' | 'prod' }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Until that file exists — a fresh clone, before the first run — the interface
|
|
21
|
+
* is empty and every stage type below is `string`, so nothing fails to compile
|
|
22
|
+
* for want of a generated file.
|
|
23
|
+
*/
|
|
24
|
+
interface Stages {}
|
|
25
|
+
/** What `Stages` says under `key`, or `string` while it says nothing. */
|
|
26
|
+
type Declared<TKey extends string> = Stages extends { [K in TKey]: infer TStage extends string; } ? TStage : string;
|
|
27
|
+
/** The stage `gkm dev`, `exec`, `setup` and `test` run as: `stages.local`. */
|
|
28
|
+
type LocalStage = Declared<'local'>;
|
|
29
|
+
/** A stage `gkm deploy --stage` accepts: one of `stages.deployed`. */
|
|
30
|
+
type DeployedStage = Declared<'deployed'>;
|
|
31
|
+
/** What `gkm test` runs as. The CLI's own; no project stage may take it. */
|
|
32
|
+
type TestStage = 'test';
|
|
33
|
+
/** Any stage the project's code can find itself running as. */
|
|
34
|
+
type AnyStage = LocalStage | TestStage | DeployedStage;
|
|
35
|
+
/**
|
|
36
|
+
* What a seed is handed beside its database.
|
|
37
|
+
*
|
|
38
|
+
* Seeds run on every stage, production included, so a seed that should write
|
|
39
|
+
* something only somewhere — a demo tenant on the local stage, never on a
|
|
40
|
+
* deployed one — decides by the stage it is given:
|
|
41
|
+
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* import type { SeedContext } from '@geekmidas/constructs';
|
|
44
|
+
*
|
|
45
|
+
* export async function seed(db: Kysely<Database>, { stage }: SeedContext) {
|
|
46
|
+
* if (stage === 'dev') await insertDemoTenant(db);
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
interface SeedContext {
|
|
51
|
+
/** The stage being seeded: the local one, `test`, or a deployed one. */
|
|
52
|
+
stage: AnyStage;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Stages as a, SeedContext as i, DeployedStage as n, TestStage as o, LocalStage as r, AnyStage as t };
|
|
56
|
+
//# sourceMappingURL=stages-BSCF19o2.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stages-BSCF19o2.d.cts","names":[],"sources":["../src/stages.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAuBiB;;KAGZ,SAAS,uBAAuB,kBACnC,KAAK,aAAa,2BAEjB;;KAIS,aAAa;;KAGb,gBAAgB;;KAGhB;;KAGA,WAAW,aAAa,YAAY;;;;;;;;;;;;;;;;UAiB/B;;EAEhB,OAAO"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//#region src/stages.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The project's stage names, as types.
|
|
4
|
+
*
|
|
5
|
+
* `gkm.config.ts` declares the stages — `stages: { local: 'dev', deployed:
|
|
6
|
+
* ['staging', 'prod'] }` — but constructs and application code cannot import
|
|
7
|
+
* the config, so a stage name written anywhere else was a bare `string`: a
|
|
8
|
+
* typo'd key in an `ExternalApi`'s `url` map was silently never read, and a
|
|
9
|
+
* seed's `stage === 'prodution'` branch silently never ran.
|
|
10
|
+
*
|
|
11
|
+
* `gkm dev`, `gkm build` and `gkm test --prepare` write `.gkm/stages.d.ts`,
|
|
12
|
+
* which fills this interface in from the loaded workspace:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* declare module '@geekmidas/constructs' {
|
|
16
|
+
* interface Stages { local: 'dev'; deployed: 'staging' | 'prod' }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Until that file exists — a fresh clone, before the first run — the interface
|
|
21
|
+
* is empty and every stage type below is `string`, so nothing fails to compile
|
|
22
|
+
* for want of a generated file.
|
|
23
|
+
*/
|
|
24
|
+
interface Stages {}
|
|
25
|
+
/** What `Stages` says under `key`, or `string` while it says nothing. */
|
|
26
|
+
type Declared<TKey extends string> = Stages extends { [K in TKey]: infer TStage extends string; } ? TStage : string;
|
|
27
|
+
/** The stage `gkm dev`, `exec`, `setup` and `test` run as: `stages.local`. */
|
|
28
|
+
type LocalStage = Declared<'local'>;
|
|
29
|
+
/** A stage `gkm deploy --stage` accepts: one of `stages.deployed`. */
|
|
30
|
+
type DeployedStage = Declared<'deployed'>;
|
|
31
|
+
/** What `gkm test` runs as. The CLI's own; no project stage may take it. */
|
|
32
|
+
type TestStage = 'test';
|
|
33
|
+
/** Any stage the project's code can find itself running as. */
|
|
34
|
+
type AnyStage = LocalStage | TestStage | DeployedStage;
|
|
35
|
+
/**
|
|
36
|
+
* What a seed is handed beside its database.
|
|
37
|
+
*
|
|
38
|
+
* Seeds run on every stage, production included, so a seed that should write
|
|
39
|
+
* something only somewhere — a demo tenant on the local stage, never on a
|
|
40
|
+
* deployed one — decides by the stage it is given:
|
|
41
|
+
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* import type { SeedContext } from '@geekmidas/constructs';
|
|
44
|
+
*
|
|
45
|
+
* export async function seed(db: Kysely<Database>, { stage }: SeedContext) {
|
|
46
|
+
* if (stage === 'dev') await insertDemoTenant(db);
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
interface SeedContext {
|
|
51
|
+
/** The stage being seeded: the local one, `test`, or a deployed one. */
|
|
52
|
+
stage: AnyStage;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Stages as a, SeedContext as i, DeployedStage as n, TestStage as o, LocalStage as r, AnyStage as t };
|
|
56
|
+
//# sourceMappingURL=stages-BSCF19o2.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stages-BSCF19o2.d.mts","names":[],"sources":["../src/stages.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAuBiB;;KAGZ,SAAS,uBAAuB,kBACnC,KAAK,aAAa,2BAEjB;;KAIS,aAAa;;KAGb,gBAAgB;;KAGhB;;KAGA,WAAW,aAAa,YAAY;;;;;;;;;;;;;;;;UAiB/B;;EAEhB,OAAO"}
|
|
@@ -1,7 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
require(
|
|
3
|
-
require(
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_SubscriberBuilder = require("../SubscriberBuilder-D_owVoHo.cjs");
|
|
3
|
+
const require_runSubscriber = require("../runSubscriber-D8nLXIv1.cjs");
|
|
4
|
+
let _geekmidas_events = require("@geekmidas/events");
|
|
5
|
+
let _geekmidas_errors = require("@geekmidas/errors");
|
|
6
|
+
let _geekmidas_services = require("@geekmidas/services");
|
|
7
|
+
let _geekmidas_events_sns = require("@geekmidas/events/sns");
|
|
8
|
+
//#region src/subscribers/SnsPushSubscriberAdaptor.ts
|
|
9
|
+
/**
|
|
10
|
+
* A topic subscriber run by SNS pushing to an HTTP endpoint, rather than by a
|
|
11
|
+
* poller.
|
|
12
|
+
*
|
|
13
|
+
* The notification is read as the Lambda event SNS would have invoked a
|
|
14
|
+
* function with, and run through the same parsing, services and handler as the
|
|
15
|
+
* Lambda adaptor — without its middy wrapper, which is Lambda's alone: a
|
|
16
|
+
* server serving this route has no reason to install `@middy/core`.
|
|
17
|
+
*/
|
|
18
|
+
var SnsPushSubscriberAdaptor = class {
|
|
19
|
+
envParser;
|
|
20
|
+
subscriber;
|
|
21
|
+
options;
|
|
22
|
+
constructor(envParser, subscriber, options) {
|
|
23
|
+
this.envParser = envParser;
|
|
24
|
+
this.subscriber = subscriber;
|
|
25
|
+
this.options = options;
|
|
26
|
+
}
|
|
27
|
+
async handle(body) {
|
|
28
|
+
const message = body;
|
|
29
|
+
if (typeof message?.Type !== "string" || !message.TopicArn) return refuse(400, "not an SNS message");
|
|
30
|
+
if (message.TopicArn !== this.options.topicArn) return refuse(403, `not subscribed to ${message.TopicArn}`);
|
|
31
|
+
if (this.options.verify) try {
|
|
32
|
+
await (0, _geekmidas_events_sns.verifySnsMessage)(message);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
this.subscriber.logger.warn({
|
|
35
|
+
err: error,
|
|
36
|
+
topicArn: message.TopicArn
|
|
37
|
+
}, "Refused an SNS message that did not verify");
|
|
38
|
+
return refuse(403, error.name);
|
|
39
|
+
}
|
|
40
|
+
switch (message.Type) {
|
|
41
|
+
case "SubscriptionConfirmation":
|
|
42
|
+
await (0, _geekmidas_events_sns.confirmSnsSubscription)(this.options.emulatorEndpoint && message.SubscribeURL ? {
|
|
43
|
+
...message,
|
|
44
|
+
SubscribeURL: throughEndpoint(message.SubscribeURL, this.options.emulatorEndpoint)
|
|
45
|
+
} : message);
|
|
46
|
+
this.subscriber.logger.info({ topicArn: message.TopicArn }, "Confirmed SNS subscription");
|
|
47
|
+
return {
|
|
48
|
+
status: 200,
|
|
49
|
+
body: { status: "confirmed" }
|
|
50
|
+
};
|
|
51
|
+
case "Notification": try {
|
|
52
|
+
await this.notify(message);
|
|
53
|
+
return {
|
|
54
|
+
status: 200,
|
|
55
|
+
body: { status: "ok" }
|
|
56
|
+
};
|
|
57
|
+
} catch (error) {
|
|
58
|
+
return refuse(500, error.name);
|
|
59
|
+
}
|
|
60
|
+
default: return {
|
|
61
|
+
status: 200,
|
|
62
|
+
body: { status: "ignored" }
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async notify(message) {
|
|
67
|
+
const requestId = message.MessageId;
|
|
68
|
+
const logger = this.subscriber.logger.child({ requestId });
|
|
69
|
+
await (0, _geekmidas_services.runWithRequestContext)({
|
|
70
|
+
logger,
|
|
71
|
+
requestId,
|
|
72
|
+
startTime: Date.now(),
|
|
73
|
+
operation: `subscriber ${this.subscriber.topicName ?? "sns"}`
|
|
74
|
+
}, () => (0, _geekmidas_events.consumeTraced)({
|
|
75
|
+
system: "aws_sns",
|
|
76
|
+
destination: this.subscriber.topicName ?? message.TopicArn.split(":").pop() ?? message.TopicArn,
|
|
77
|
+
type: message.MessageAttributes?.type?.Value,
|
|
78
|
+
messageId: message.MessageId
|
|
79
|
+
}, (0, _geekmidas_events.carrierFromAttributes)(message.MessageAttributes), () => this.run(message, logger)));
|
|
80
|
+
}
|
|
81
|
+
async run(message, logger) {
|
|
82
|
+
try {
|
|
83
|
+
const { services, db } = await require_runSubscriber.subscriberContext(this.subscriber, this.envParser);
|
|
84
|
+
const events = require_runSubscriber.subscribedEvents(this.subscriber, (0, _geekmidas_events_sns.toSnsEvent)(message), logger);
|
|
85
|
+
await require_runSubscriber.runSubscriber(this.subscriber, {
|
|
86
|
+
events,
|
|
87
|
+
services,
|
|
88
|
+
logger,
|
|
89
|
+
db
|
|
90
|
+
});
|
|
91
|
+
} catch (error) {
|
|
92
|
+
logger.error(error, "Error processing subscriber");
|
|
93
|
+
throw (0, _geekmidas_errors.wrapError)(error);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
/** `url`, sent to `endpoint`'s origin instead of its own. */
|
|
98
|
+
function throughEndpoint(url, endpoint) {
|
|
99
|
+
const target = new URL(url);
|
|
100
|
+
const origin = new URL(endpoint);
|
|
101
|
+
target.protocol = origin.protocol;
|
|
102
|
+
target.host = origin.host;
|
|
103
|
+
return target.toString();
|
|
104
|
+
}
|
|
105
|
+
function refuse(status, error) {
|
|
106
|
+
return {
|
|
107
|
+
status,
|
|
108
|
+
body: {
|
|
109
|
+
status: "refused",
|
|
110
|
+
error
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
exports.SnsPushSubscriberAdaptor = SnsPushSubscriberAdaptor;
|
|
6
116
|
exports.Subscriber = require_SubscriberBuilder.Subscriber;
|
|
7
|
-
exports.SubscriberBuilder = require_SubscriberBuilder.SubscriberBuilder;
|
|
117
|
+
exports.SubscriberBuilder = require_SubscriberBuilder.SubscriberBuilder;
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["verifySnsMessage","confirmSnsSubscription","runWithRequestContext","consumeTraced","carrierFromAttributes","subscriberContext","subscribedEvents","toSnsEvent","runSubscriber","wrapError"],"sources":["../../src/subscribers/SnsPushSubscriberAdaptor.ts"],"sourcesContent":["import type { EnvironmentParser } from '@geekmidas/envkit';\nimport { wrapError } from '@geekmidas/errors';\nimport { carrierFromAttributes, consumeTraced } from '@geekmidas/events';\nimport {\n\tconfirmSnsSubscription,\n\ttype SnsHttpMessage,\n\ttoSnsEvent,\n\tverifySnsMessage,\n} from '@geekmidas/events/sns';\nimport { runWithRequestContext } from '@geekmidas/services';\nimport {\n\trunSubscriber,\n\tsubscribedEvents,\n\tsubscriberContext,\n} from './runSubscriber';\nimport type { Subscriber } from './Subscriber';\n\nexport interface SnsPushOptions {\n\t/** The topic this subscriber is subscribed to. Anything else is refused. */\n\ttopicArn: string;\n\t/**\n\t * Verify each message's signature. Off only against an emulator, which\n\t * signs nothing — decided by the connection string's endpoint, never by\n\t * anything the request says about itself.\n\t */\n\tverify: boolean;\n\t/**\n\t * The emulator's address, as this server was configured with it. An\n\t * emulator names itself in `SubscribeURL` by the port it listens on inside\n\t * its container, which is not the port published to the host — so against\n\t * one, the confirmation is sent here instead. From configuration, never\n\t * from the request.\n\t */\n\temulatorEndpoint?: string;\n}\n\n/** What to answer SNS with. A non-2xx tells SNS to retry. */\nexport interface SnsPushResponse {\n\tstatus: 200 | 400 | 403 | 500;\n\tbody: { status: string; error?: string };\n}\n\n/**\n * A topic subscriber run by SNS pushing to an HTTP endpoint, rather than by a\n * poller.\n *\n * The notification is read as the Lambda event SNS would have invoked a\n * function with, and run through the same parsing, services and handler as the\n * Lambda adaptor — without its middy wrapper, which is Lambda's alone: a\n * server serving this route has no reason to install `@middy/core`.\n */\nexport class SnsPushSubscriberAdaptor {\n\tconstructor(\n\t\tprivate readonly envParser: EnvironmentParser<{}>,\n\t\treadonly subscriber: Subscriber<any, any, any, any, any, any, any>,\n\t\tprivate readonly options: SnsPushOptions,\n\t) {}\n\n\tasync handle(body: unknown): Promise<SnsPushResponse> {\n\t\tconst message = body as SnsHttpMessage;\n\t\tif (typeof message?.Type !== 'string' || !message.TopicArn) {\n\t\t\treturn refuse(400, 'not an SNS message');\n\t\t}\n\t\t// Checked before the signature: a genuine message for another topic is\n\t\t// still not this subscriber's to confirm or to handle.\n\t\tif (message.TopicArn !== this.options.topicArn) {\n\t\t\treturn refuse(403, `not subscribed to ${message.TopicArn}`);\n\t\t}\n\n\t\tif (this.options.verify) {\n\t\t\ttry {\n\t\t\t\tawait verifySnsMessage(message);\n\t\t\t} catch (error) {\n\t\t\t\tthis.subscriber.logger.warn(\n\t\t\t\t\t{ err: error, topicArn: message.TopicArn },\n\t\t\t\t\t'Refused an SNS message that did not verify',\n\t\t\t\t);\n\t\t\t\treturn refuse(403, (error as Error).name);\n\t\t\t}\n\t\t}\n\n\t\tswitch (message.Type) {\n\t\t\tcase 'SubscriptionConfirmation':\n\t\t\t\tawait confirmSnsSubscription(\n\t\t\t\t\tthis.options.emulatorEndpoint && message.SubscribeURL\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...message,\n\t\t\t\t\t\t\t\tSubscribeURL: throughEndpoint(\n\t\t\t\t\t\t\t\t\tmessage.SubscribeURL,\n\t\t\t\t\t\t\t\t\tthis.options.emulatorEndpoint,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: message,\n\t\t\t\t);\n\t\t\t\tthis.subscriber.logger.info(\n\t\t\t\t\t{ topicArn: message.TopicArn },\n\t\t\t\t\t'Confirmed SNS subscription',\n\t\t\t\t);\n\t\t\t\treturn { status: 200, body: { status: 'confirmed' } };\n\t\t\tcase 'Notification':\n\t\t\t\ttry {\n\t\t\t\t\tawait this.notify(message);\n\t\t\t\t\treturn { status: 200, body: { status: 'ok' } };\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// Already logged. A 500 makes SNS retry, which is the point of\n\t\t\t\t\t// answering at all.\n\t\t\t\t\treturn refuse(500, (error as Error).name);\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn { status: 200, body: { status: 'ignored' } };\n\t\t}\n\t}\n\n\tprivate async notify(message: SnsHttpMessage): Promise<void> {\n\t\tconst requestId = message.MessageId;\n\t\tconst logger = this.subscriber.logger.child({ requestId });\n\n\t\tawait runWithRequestContext(\n\t\t\t{\n\t\t\t\tlogger,\n\t\t\t\trequestId,\n\t\t\t\tstartTime: Date.now(),\n\t\t\t\toperation: `subscriber ${this.subscriber.topicName ?? 'sns'}`,\n\t\t\t},\n\t\t\t// A CONSUMER span, child of the publisher's: SNS hands the trace\n\t\t\t// context on in the message attributes it was published with.\n\t\t\t() =>\n\t\t\t\tconsumeTraced(\n\t\t\t\t\t{\n\t\t\t\t\t\tsystem: 'aws_sns',\n\t\t\t\t\t\tdestination:\n\t\t\t\t\t\t\tthis.subscriber.topicName ??\n\t\t\t\t\t\t\tmessage.TopicArn.split(':').pop() ??\n\t\t\t\t\t\t\tmessage.TopicArn,\n\t\t\t\t\t\ttype: message.MessageAttributes?.type?.Value,\n\t\t\t\t\t\tmessageId: message.MessageId,\n\t\t\t\t\t},\n\t\t\t\t\tcarrierFromAttributes(message.MessageAttributes),\n\t\t\t\t\t() => this.run(message, logger),\n\t\t\t\t),\n\t\t);\n\t}\n\n\tprivate async run(\n\t\tmessage: SnsHttpMessage,\n\t\tlogger: Subscriber<any, any, any, any, any, any, any>['logger'],\n\t): Promise<void> {\n\t\ttry {\n\t\t\tconst { services, db } = await subscriberContext(\n\t\t\t\tthis.subscriber,\n\t\t\t\tthis.envParser,\n\t\t\t);\n\t\t\tconst events = subscribedEvents(\n\t\t\t\tthis.subscriber,\n\t\t\t\ttoSnsEvent(message),\n\t\t\t\tlogger,\n\t\t\t);\n\t\t\tawait runSubscriber(this.subscriber, {\n\t\t\t\tevents,\n\t\t\t\tservices,\n\t\t\t\tlogger,\n\t\t\t\tdb,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tlogger.error(error as object, 'Error processing subscriber');\n\t\t\tthrow wrapError(error);\n\t\t}\n\t}\n}\n\n/** `url`, sent to `endpoint`'s origin instead of its own. */\nfunction throughEndpoint(url: string, endpoint: string): string {\n\tconst target = new URL(url);\n\tconst origin = new URL(endpoint);\n\ttarget.protocol = origin.protocol;\n\ttarget.host = origin.host;\n\treturn target.toString();\n}\n\nfunction refuse(\n\tstatus: SnsPushResponse['status'],\n\terror: string,\n): SnsPushResponse {\n\treturn { status, body: { status: 'refused', error } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmDA,IAAa,2BAAb,MAAsC;CAEnB;CACR;CACQ;CAHlB,YACC,WACA,YACA,SACC;EAHgB,KAAA,YAAA;EACR,KAAA,aAAA;EACQ,KAAA,UAAA;CACf;CAEH,MAAM,OAAO,MAAyC;EACrD,MAAM,UAAU;EAChB,IAAI,OAAO,SAAS,SAAS,YAAY,CAAC,QAAQ,UACjD,OAAO,OAAO,KAAK,oBAAoB;EAIxC,IAAI,QAAQ,aAAa,KAAK,QAAQ,UACrC,OAAO,OAAO,KAAK,qBAAqB,QAAQ,UAAU;EAG3D,IAAI,KAAK,QAAQ,QAChB,IAAI;GACH,OAAA,GAAMA,sBAAAA,iBAAAA,CAAiB,OAAO;EAC/B,SAAS,OAAO;GACf,KAAK,WAAW,OAAO,KACtB;IAAE,KAAK;IAAO,UAAU,QAAQ;GAAS,GACzC,4CACD;GACA,OAAO,OAAO,KAAM,MAAgB,IAAI;EACzC;EAGD,QAAQ,QAAQ,MAAhB;GACC,KAAK;IACJ,OAAA,GAAMC,sBAAAA,uBAAAA,CACL,KAAK,QAAQ,oBAAoB,QAAQ,eACtC;KACA,GAAG;KACH,cAAc,gBACb,QAAQ,cACR,KAAK,QAAQ,gBACd;IACD,IACC,OACJ;IACA,KAAK,WAAW,OAAO,KACtB,EAAE,UAAU,QAAQ,SAAS,GAC7B,4BACD;IACA,OAAO;KAAE,QAAQ;KAAK,MAAM,EAAE,QAAQ,YAAY;IAAE;GACrD,KAAK,gBACJ,IAAI;IACH,MAAM,KAAK,OAAO,OAAO;IACzB,OAAO;KAAE,QAAQ;KAAK,MAAM,EAAE,QAAQ,KAAK;IAAE;GAC9C,SAAS,OAAO;IAGf,OAAO,OAAO,KAAM,MAAgB,IAAI;GACzC;GACD,SACC,OAAO;IAAE,QAAQ;IAAK,MAAM,EAAE,QAAQ,UAAU;GAAE;EACpD;CACD;CAEA,MAAc,OAAO,SAAwC;EAC5D,MAAM,YAAY,QAAQ;EAC1B,MAAM,SAAS,KAAK,WAAW,OAAO,MAAM,EAAE,UAAU,CAAC;EAEzD,OAAA,GAAMC,oBAAAA,sBAAAA,CACL;GACC;GACA;GACA,WAAW,KAAK,IAAI;GACpB,WAAW,cAAc,KAAK,WAAW,aAAa;EACvD,UAAA,GAICC,kBAAAA,cAAAA,CACC;GACC,QAAQ;GACR,aACC,KAAK,WAAW,aAChB,QAAQ,SAAS,MAAM,GAAG,CAAC,CAAC,IAAI,KAChC,QAAQ;GACT,MAAM,QAAQ,mBAAmB,MAAM;GACvC,WAAW,QAAQ;EACpB,IAAA,GACAC,kBAAAA,sBAAAA,CAAsB,QAAQ,iBAAiB,SACzC,KAAK,IAAI,SAAS,MAAM,CAC/B,CACF;CACD;CAEA,MAAc,IACb,SACA,QACgB;EAChB,IAAI;GACH,MAAM,EAAE,UAAU,OAAO,MAAMC,sBAAAA,kBAC9B,KAAK,YACL,KAAK,SACN;GACA,MAAM,SAASC,sBAAAA,iBACd,KAAK,aAAA,GACLC,sBAAAA,WAAAA,CAAW,OAAO,GAClB,MACD;GACA,MAAMC,sBAAAA,cAAc,KAAK,YAAY;IACpC;IACA;IACA;IACA;GACD,CAAC;EACF,SAAS,OAAO;GACf,OAAO,MAAM,OAAiB,6BAA6B;GAC3D,OAAA,GAAMC,kBAAAA,UAAAA,CAAU,KAAK;EACtB;CACD;AACD;;AAGA,SAAS,gBAAgB,KAAa,UAA0B;CAC/D,MAAM,SAAS,IAAI,IAAI,GAAG;CAC1B,MAAM,SAAS,IAAI,IAAI,QAAQ;CAC/B,OAAO,WAAW,OAAO;CACzB,OAAO,OAAO,OAAO;CACrB,OAAO,OAAO,SAAS;AACxB;AAEA,SAAS,OACR,QACA,OACkB;CAClB,OAAO;EAAE;EAAQ,MAAM;GAAE,QAAQ;GAAW;EAAM;CAAE;AACrD"}
|
|
@@ -1,6 +1,51 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { t as Subscriber } from "../Subscriber-Bpp02cGr.cjs";
|
|
2
|
+
import { t as SubscriberBuilder } from "../SubscriberBuilder-g3fAVWgs.cjs";
|
|
3
|
+
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
4
|
+
//#region src/subscribers/SnsPushSubscriberAdaptor.d.ts
|
|
5
|
+
interface SnsPushOptions {
|
|
6
|
+
/** The topic this subscriber is subscribed to. Anything else is refused. */
|
|
7
|
+
topicArn: string;
|
|
8
|
+
/**
|
|
9
|
+
* Verify each message's signature. Off only against an emulator, which
|
|
10
|
+
* signs nothing — decided by the connection string's endpoint, never by
|
|
11
|
+
* anything the request says about itself.
|
|
12
|
+
*/
|
|
13
|
+
verify: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The emulator's address, as this server was configured with it. An
|
|
16
|
+
* emulator names itself in `SubscribeURL` by the port it listens on inside
|
|
17
|
+
* its container, which is not the port published to the host — so against
|
|
18
|
+
* one, the confirmation is sent here instead. From configuration, never
|
|
19
|
+
* from the request.
|
|
20
|
+
*/
|
|
21
|
+
emulatorEndpoint?: string;
|
|
22
|
+
}
|
|
23
|
+
/** What to answer SNS with. A non-2xx tells SNS to retry. */
|
|
24
|
+
interface SnsPushResponse {
|
|
25
|
+
status: 200 | 400 | 403 | 500;
|
|
26
|
+
body: {
|
|
27
|
+
status: string;
|
|
28
|
+
error?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A topic subscriber run by SNS pushing to an HTTP endpoint, rather than by a
|
|
33
|
+
* poller.
|
|
34
|
+
*
|
|
35
|
+
* The notification is read as the Lambda event SNS would have invoked a
|
|
36
|
+
* function with, and run through the same parsing, services and handler as the
|
|
37
|
+
* Lambda adaptor — without its middy wrapper, which is Lambda's alone: a
|
|
38
|
+
* server serving this route has no reason to install `@middy/core`.
|
|
39
|
+
*/
|
|
40
|
+
export declare class SnsPushSubscriberAdaptor {
|
|
41
|
+
private readonly envParser;
|
|
42
|
+
readonly subscriber: Subscriber<any, any, any, any, any, any, any>;
|
|
43
|
+
private readonly options;
|
|
44
|
+
constructor(envParser: EnvironmentParser<{}>, subscriber: Subscriber<any, any, any, any, any, any, any>, options: SnsPushOptions);
|
|
45
|
+
handle(body: unknown): Promise<SnsPushResponse>;
|
|
46
|
+
private notify;
|
|
47
|
+
private run;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { type SnsPushOptions, type SnsPushResponse, Subscriber, SubscriberBuilder };
|
|
51
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/subscribers/SnsPushSubscriberAdaptor.ts"],"mappings":";;;;UAiBiB;;EAEhB;;;;;;EAMA;;;;;;;;EAQA;;;UAIgB;EAChB;EACA;IAAQ;IAAgB;;;;;;;;;;;;qBAYZ;mBAEM;WACR,YAAY;mBACJ;EAHlB,YACkB,WAAW,uBACnB,YAAY,+CACJ,SAAS;EAGrB,OAAO,gBAAgB,QAAQ;UAuDvB;UA8BA"}
|
|
@@ -1,6 +1,51 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { t as Subscriber } from "../Subscriber-CtN9R48-.mjs";
|
|
2
|
+
import { t as SubscriberBuilder } from "../SubscriberBuilder-CuCMFpYW.mjs";
|
|
3
|
+
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
4
|
+
//#region src/subscribers/SnsPushSubscriberAdaptor.d.ts
|
|
5
|
+
interface SnsPushOptions {
|
|
6
|
+
/** The topic this subscriber is subscribed to. Anything else is refused. */
|
|
7
|
+
topicArn: string;
|
|
8
|
+
/**
|
|
9
|
+
* Verify each message's signature. Off only against an emulator, which
|
|
10
|
+
* signs nothing — decided by the connection string's endpoint, never by
|
|
11
|
+
* anything the request says about itself.
|
|
12
|
+
*/
|
|
13
|
+
verify: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The emulator's address, as this server was configured with it. An
|
|
16
|
+
* emulator names itself in `SubscribeURL` by the port it listens on inside
|
|
17
|
+
* its container, which is not the port published to the host — so against
|
|
18
|
+
* one, the confirmation is sent here instead. From configuration, never
|
|
19
|
+
* from the request.
|
|
20
|
+
*/
|
|
21
|
+
emulatorEndpoint?: string;
|
|
22
|
+
}
|
|
23
|
+
/** What to answer SNS with. A non-2xx tells SNS to retry. */
|
|
24
|
+
interface SnsPushResponse {
|
|
25
|
+
status: 200 | 400 | 403 | 500;
|
|
26
|
+
body: {
|
|
27
|
+
status: string;
|
|
28
|
+
error?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A topic subscriber run by SNS pushing to an HTTP endpoint, rather than by a
|
|
33
|
+
* poller.
|
|
34
|
+
*
|
|
35
|
+
* The notification is read as the Lambda event SNS would have invoked a
|
|
36
|
+
* function with, and run through the same parsing, services and handler as the
|
|
37
|
+
* Lambda adaptor — without its middy wrapper, which is Lambda's alone: a
|
|
38
|
+
* server serving this route has no reason to install `@middy/core`.
|
|
39
|
+
*/
|
|
40
|
+
export declare class SnsPushSubscriberAdaptor {
|
|
41
|
+
private readonly envParser;
|
|
42
|
+
readonly subscriber: Subscriber<any, any, any, any, any, any, any>;
|
|
43
|
+
private readonly options;
|
|
44
|
+
constructor(envParser: EnvironmentParser<{}>, subscriber: Subscriber<any, any, any, any, any, any, any>, options: SnsPushOptions);
|
|
45
|
+
handle(body: unknown): Promise<SnsPushResponse>;
|
|
46
|
+
private notify;
|
|
47
|
+
private run;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { type SnsPushOptions, type SnsPushResponse, Subscriber, SubscriberBuilder };
|
|
51
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/subscribers/SnsPushSubscriberAdaptor.ts"],"mappings":";;;;UAiBiB;;EAEhB;;;;;;EAMA;;;;;;;;EAQA;;;UAIgB;EAChB;EACA;IAAQ;IAAgB;;;;;;;;;;;;qBAYZ;mBAEM;WACR,YAAY;mBACJ;EAHlB,YACkB,WAAW,uBACnB,YAAY,+CACJ,SAAS;EAGrB,OAAO,gBAAgB,QAAQ;UAuDvB;UA8BA"}
|