@geekmidas/constructs 10.0.0-alpha.11 → 10.0.0-alpha.110
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-BQALFCh2.d.cts +230 -0
- package/dist/Construct-BQALFCh2.d.cts.map +1 -0
- package/dist/{Construct-BD5neF7w.mjs → Construct-CKUA-CTA.mjs} +35 -35
- package/dist/Construct-CKUA-CTA.mjs.map +1 -0
- package/dist/{Construct-CyS3RpTL.cjs → Construct-DEOVauyA.cjs} +55 -49
- package/dist/Construct-DEOVauyA.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-CQJqqkhY.d.mts} +17 -11
- package/dist/Cron-CQJqqkhY.d.mts.map +1 -0
- package/dist/{Cron-dh4rUgib.d.mts → Cron-DI3nKoic.d.cts} +17 -11
- package/dist/Cron-DI3nKoic.d.cts.map +1 -0
- package/dist/{CronBuilder-Da0C0edR.cjs → CronBuilder-BXTG10u5.cjs} +47 -31
- package/dist/CronBuilder-BXTG10u5.cjs.map +1 -0
- package/dist/{CronBuilder-CYKT5RiO.mjs → CronBuilder-D3sF9tS_.mjs} +37 -21
- package/dist/CronBuilder-D3sF9tS_.mjs.map +1 -0
- package/dist/CronBuilder-Xx_zakuc.d.mts +47 -0
- package/dist/CronBuilder-Xx_zakuc.d.mts.map +1 -0
- package/dist/CronBuilder-g1lZLWyG.d.cts +47 -0
- package/dist/CronBuilder-g1lZLWyG.d.cts.map +1 -0
- package/dist/{Endpoint-BjWKinFA.d.mts → Endpoint-BWyKCa2x.d.cts} +130 -100
- package/dist/Endpoint-BWyKCa2x.d.cts.map +1 -0
- package/dist/{Endpoint-dav89W6-.d.cts → Endpoint-CrE9Ppdk.d.mts} +130 -100
- package/dist/Endpoint-CrE9Ppdk.d.mts.map +1 -0
- package/dist/{Endpoint-DCQPMdUX.mjs → Endpoint-gPXhHKhJ.mjs} +208 -100
- package/dist/Endpoint-gPXhHKhJ.mjs.map +1 -0
- package/dist/{Endpoint-DcWXE-SZ.cjs → Endpoint-yhR2T2Wt.cjs} +248 -122
- package/dist/Endpoint-yhR2T2Wt.cjs.map +1 -0
- package/dist/{index-lAO9egTb.d.mts → EndpointFactory-BV-nfnaP.d.mts} +85 -136
- package/dist/EndpointFactory-BV-nfnaP.d.mts.map +1 -0
- package/dist/{EndpointFactory-CdWB7wPw.cjs → EndpointFactory-BVv6EIDu.cjs} +98 -112
- package/dist/EndpointFactory-BVv6EIDu.cjs.map +1 -0
- package/dist/{index-Bd5FqCoe.d.cts → EndpointFactory-C1-IBwm4.d.cts} +84 -135
- package/dist/EndpointFactory-C1-IBwm4.d.cts.map +1 -0
- package/dist/{EndpointFactory-CjV8F_lJ.mjs → EndpointFactory-Cs8IHvwF.mjs} +62 -76
- package/dist/EndpointFactory-Cs8IHvwF.mjs.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-DtL9j19R.cjs → HonoEndpointAdaptor-CN1jjUBJ.cjs} +115 -71
- package/dist/HonoEndpointAdaptor-CN1jjUBJ.cjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-P1ahhZHu.mjs → HonoEndpointAdaptor-euH1oSdY.mjs} +105 -64
- package/dist/HonoEndpointAdaptor-euH1oSdY.mjs.map +1 -0
- package/dist/Queue-BhuofM3k.cjs +109 -0
- package/dist/Queue-BhuofM3k.cjs.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/Queue-cmhqEBOB.mjs +104 -0
- package/dist/Queue-cmhqEBOB.mjs.map +1 -0
- package/dist/QueueBuilder-Cx9lKC5d.d.mts +75 -0
- package/dist/QueueBuilder-Cx9lKC5d.d.mts.map +1 -0
- package/dist/QueueBuilder-DXu1qxT1.mjs +118 -0
- package/dist/QueueBuilder-DXu1qxT1.mjs.map +1 -0
- package/dist/QueueBuilder-DdU2klPu.cjs +135 -0
- package/dist/QueueBuilder-DdU2klPu.cjs.map +1 -0
- package/dist/QueueBuilder-OSi6LkV9.d.cts +75 -0
- package/dist/QueueBuilder-OSi6LkV9.d.cts.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-4DWe9feX.d.mts +67 -0
- package/dist/SubscriberBuilder-4DWe9feX.d.mts.map +1 -0
- package/dist/{SubscriberBuilder-BjkbeT9l.mjs → SubscriberBuilder-DRXfxWn_.mjs} +50 -24
- package/dist/SubscriberBuilder-DRXfxWn_.mjs.map +1 -0
- package/dist/{SubscriberBuilder-4OPehf2R.cjs → SubscriberBuilder-M2EAgQhC.cjs} +61 -36
- package/dist/SubscriberBuilder-M2EAgQhC.cjs.map +1 -0
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts +67 -0
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +1 -0
- package/dist/Topic-D2R0r24C.mjs +99 -0
- package/dist/Topic-D2R0r24C.mjs.map +1 -0
- package/dist/Topic-DwS3QO0m.cjs +104 -0
- package/dist/Topic-DwS3QO0m.cjs.map +1 -0
- package/dist/adaptors/aws.cjs +200 -246
- package/dist/adaptors/aws.cjs.map +1 -1
- package/dist/adaptors/aws.d.cts +58 -62
- package/dist/adaptors/aws.d.cts.map +1 -1
- package/dist/adaptors/aws.d.mts +59 -63
- package/dist/adaptors/aws.d.mts.map +1 -1
- package/dist/adaptors/aws.mjs +171 -219
- 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 +9 -18
- package/dist/adaptors/hono.d.mts.map +1 -1
- package/dist/adaptors/hono.mjs +2 -10
- package/dist/adaptors/testing.cjs +765 -99
- 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 +726 -78
- 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-D_0788uW.d.mts +268 -0
- package/dist/auth-D_0788uW.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-5QZzh5Er.d.mts} +3 -6
- package/dist/cache-5QZzh5Er.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-ZvYQbivO.d.mts} +42 -11
- package/dist/construct-interface-ZvYQbivO.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-DYymbp_7.cjs +257 -0
- package/dist/credential-DYymbp_7.cjs.map +1 -0
- package/dist/credential-DfSAOOdY.mjs +222 -0
- package/dist/credential-DfSAOOdY.mjs.map +1 -0
- package/dist/credential.cjs +8 -96
- package/dist/credential.d.cts +2 -61
- package/dist/credential.d.mts +2 -61
- package/dist/credential.mjs +2 -94
- 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 +4 -8
- 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 +20 -16
- package/dist/endpoints/index.d.cts +105 -7
- package/dist/endpoints/index.d.cts.map +1 -0
- package/dist/endpoints/index.d.mts +105 -7
- package/dist/endpoints/index.d.mts.map +1 -0
- package/dist/endpoints/index.mjs +6 -10
- package/dist/external-api.cjs +106 -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 +103 -0
- package/dist/external-api.mjs.map +1 -0
- package/dist/fake-DqKo8INJ.d.mts +201 -0
- package/dist/fake-DqKo8INJ.d.mts.map +1 -0
- package/dist/fake-Dvion_Fh.d.cts +201 -0
- package/dist/fake-Dvion_Fh.d.cts.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-CTI-hDem.mjs} +376 -238
- package/dist/{functions-14lpEFL4.mjs.map → functions-CTI-hDem.mjs.map} +1 -1
- package/dist/{functions-i_la-N5r.cjs → functions-D7O5SGVc.cjs} +414 -264
- package/dist/functions-D7O5SGVc.cjs.map +1 -0
- package/dist/index-B13kQB_U.d.mts +115 -0
- package/dist/index-B13kQB_U.d.mts.map +1 -0
- package/dist/index-BuzRvKOQ.d.cts +115 -0
- package/dist/index-BuzRvKOQ.d.cts.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-B3zfg9ti.cjs +383 -0
- package/dist/kysely-B3zfg9ti.cjs.map +1 -0
- package/dist/kysely-B_0BAr0T.mjs +370 -0
- package/dist/kysely-B_0BAr0T.mjs.map +1 -0
- package/dist/kysely-D0bpzgPs.d.cts +175 -0
- package/dist/kysely-D0bpzgPs.d.cts.map +1 -0
- package/dist/kysely-DKwnl0nf.d.mts +175 -0
- package/dist/kysely-DKwnl0nf.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/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/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/random-password.cjs +86 -0
- package/dist/random-password.cjs.map +1 -0
- package/dist/random-password.d.cts +30 -0
- package/dist/random-password.d.cts.map +1 -0
- package/dist/random-password.d.mts +30 -0
- package/dist/random-password.d.mts.map +1 -0
- package/dist/random-password.mjs +84 -0
- package/dist/random-password.mjs.map +1 -0
- package/dist/{lazyAccessors-BoJN3SMd.mjs → readRequestBody-BTIl3k-D.mjs} +117 -60
- package/dist/readRequestBody-BTIl3k-D.mjs.map +1 -0
- package/dist/readRequestBody-Dej_L3c4.cjs +342 -0
- package/dist/readRequestBody-Dej_L3c4.cjs.map +1 -0
- package/dist/requestLogger-BZcXwdBs.cjs +207 -0
- package/dist/requestLogger-BZcXwdBs.cjs.map +1 -0
- package/dist/requestLogger-pA4gi3E1.mjs +178 -0
- package/dist/requestLogger-pA4gi3E1.mjs.map +1 -0
- 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-BEoBn6GO.d.mts +40 -0
- package/dist/telemetry-BEoBn6GO.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-Bbj1uoFJ.mjs +127 -0
- package/dist/tracing-Bbj1uoFJ.mjs.map +1 -0
- package/dist/tracing-C0ooU0V2.cjs +150 -0
- package/dist/tracing-C0ooU0V2.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 +71 -46
- package/dist/worker.d.mts.map +1 -1
- package/dist/worker.mjs +54 -29
- package/dist/worker.mjs.map +1 -1
- package/package.json +106 -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/credential.cjs.map +0 -1
- package/dist/credential.d.cts.map +0 -1
- package/dist/credential.d.mts.map +0 -1
- package/dist/credential.mjs.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 +0 -274
- 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
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { Construct } from "./construct-interface-
|
|
1
|
+
import { n as Construct } from "./construct-interface-ZvYQbivO.mjs";
|
|
2
2
|
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
3
3
|
import { StorageClient } from "@geekmidas/storage";
|
|
4
4
|
import { Service } from "@geekmidas/services";
|
|
5
|
-
|
|
6
5
|
//#region src/object-storage.d.ts
|
|
7
|
-
|
|
8
|
-
interface ObjectStorageOptions {
|
|
6
|
+
export interface ObjectStorageOptions {
|
|
9
7
|
/** Keep previous versions of an object. */
|
|
10
8
|
versioned?: boolean;
|
|
11
9
|
}
|
|
12
|
-
declare class ObjectStorage<TName extends string = string> implements Construct<TName, StorageClient> {
|
|
10
|
+
export declare class ObjectStorage<TName extends string = string> implements Construct<TName, StorageClient> {
|
|
13
11
|
private readonly options;
|
|
14
12
|
readonly id: TName;
|
|
15
13
|
readonly service: Service<Uncapitalize<TName>, StorageClient>;
|
|
@@ -30,7 +28,5 @@ declare class ObjectStorage<TName extends string = string> implements Construct<
|
|
|
30
28
|
*/
|
|
31
29
|
private connect;
|
|
32
30
|
}
|
|
33
|
-
//# sourceMappingURL=object-storage.d.ts.map
|
|
34
31
|
//#endregion
|
|
35
|
-
export { ObjectStorage, ObjectStorageOptions };
|
|
36
32
|
//# sourceMappingURL=object-storage.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-storage.d.mts","names":[],"sources":["../src/object-storage.ts"],"
|
|
1
|
+
{"version":3,"file":"object-storage.d.mts","names":[],"sources":["../src/object-storage.ts"],"mappings":";;;;;iBAoBiB;;EAEhB;;qBAGY,cAAc,0CACf,UAAU,OAAO;mBAcV;WAZT,IAAI;WACJ,SAAS,QAAQ,aAAa,QAAQ;;;;;;mBAO9B;EAEjB,YACC,IAAI,cAAc,QACD,UAAS;EAgB3B,WAAW;;;;;;;;UAkBG"}
|
package/dist/object-storage.mjs
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { canonicalId, provideKey, serviceKey } from "@geekmidas/manifest";
|
|
2
2
|
import { createStorageClient } from "@geekmidas/storage";
|
|
3
|
-
|
|
4
3
|
//#region src/object-storage.ts
|
|
4
|
+
/**
|
|
5
|
+
* `ObjectStorage` — a declared bucket.
|
|
6
|
+
*
|
|
7
|
+
* Where the three packages meet: it implements the construct contract, derives
|
|
8
|
+
* its env key through `@geekmidas/manifest`, and hands back a
|
|
9
|
+
* `@geekmidas/storage` client. It names no cloud — `--target=aws` fills the
|
|
10
|
+
* injected URL with S3's values, local dev with MinIO's.
|
|
11
|
+
*/
|
|
5
12
|
var ObjectStorage = class {
|
|
13
|
+
options;
|
|
6
14
|
id;
|
|
7
15
|
service;
|
|
8
16
|
/**
|
|
@@ -18,7 +26,7 @@ var ObjectStorage = class {
|
|
|
18
26
|
this.keys = { url: provideKey(canonical, "url") };
|
|
19
27
|
this.service = {
|
|
20
28
|
serviceName: serviceKey(canonical),
|
|
21
|
-
register: (options
|
|
29
|
+
register: (options) => this.connect(options)
|
|
22
30
|
};
|
|
23
31
|
}
|
|
24
32
|
declare() {
|
|
@@ -41,7 +49,7 @@ var ObjectStorage = class {
|
|
|
41
49
|
return createStorageClient(url);
|
|
42
50
|
}
|
|
43
51
|
};
|
|
44
|
-
|
|
45
52
|
//#endregion
|
|
46
53
|
export { ObjectStorage };
|
|
54
|
+
|
|
47
55
|
//# sourceMappingURL=object-storage.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-storage.mjs","names":[
|
|
1
|
+
{"version":3,"file":"object-storage.mjs","names":[],"sources":["../src/object-storage.ts"],"sourcesContent":["/**\n * `ObjectStorage` — a declared bucket.\n *\n * Where the three packages meet: it implements the construct contract, derives\n * its env key through `@geekmidas/manifest`, and hands back a\n * `@geekmidas/storage` client. It names no cloud — `--target=aws` fills the\n * injected URL with S3's values, local dev with MinIO's.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\tprovideKey,\n\tserviceKey,\n} from '@geekmidas/manifest';\nimport type { Service, ServiceRegisterOptions } from '@geekmidas/services';\nimport { createStorageClient, type StorageClient } from '@geekmidas/storage';\nimport type { Construct } from './construct-interface';\n\nexport interface ObjectStorageOptions {\n\t/** Keep previous versions of an object. */\n\tversioned?: boolean;\n}\n\nexport class ObjectStorage<TName extends string = string>\n\timplements Construct<TName, StorageClient>\n{\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, StorageClient>;\n\n\t/**\n\t * Declared once and read by both `declare()` and `connect()`, so the key the\n\t * build publishes and the key the client reads cannot drift — the whole point\n\t * of the construct owning both faces.\n\t */\n\tprivate readonly keys: { url: string };\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly options: ObjectStorageOptions = {},\n\t) {\n\t\t// Canonicalises, so `uploads` and `Uploads` are one construct rather than\n\t\t// two that collide. Throws on anything that cannot become a valid id.\n\t\tconst canonical = canonicalId(id as string);\n\n\t\tthis.id = canonical as TName;\n\t\tthis.keys = { url: provideKey(canonical, 'url') };\n\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(canonical) as Uncapitalize<TName>,\n\t\t\tregister: (options) => this.connect(options),\n\t\t};\n\t}\n\n\tdeclare(): Declaration[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'objects',\n\t\t\t\tid: this.id,\n\t\t\t\tprovides: [this.keys.url],\n\t\t\t\t...(this.options.versioned ? { versioned: true } : {}),\n\t\t\t},\n\t\t];\n\t}\n\n\t/**\n\t * Builds the client from the single URL the adapter supplied.\n\t *\n\t * The URL's scheme selects the driver, so this construct imports no provider\n\t * and an app that never touches S3 never resolves the AWS SDK. Whoever\n\t * assembles the application registers the drivers its target needs.\n\t */\n\tprivate async connect({\n\t\tenvParser,\n\t}: ServiceRegisterOptions): Promise<StorageClient> {\n\t\tconst { url } = envParser\n\t\t\t.create((get) => ({ url: get(this.keys.url).string() }))\n\t\t\t.parse();\n\n\t\treturn createStorageClient(url);\n\t}\n}\n"],"mappings":";;;;;;;;;;;AAyBA,IAAa,gBAAb,MAEA;CAamB;CAZlB;CACA;;;;;;CAOA;CAEA,YACC,IACA,UAAiD,CAAC,GACjD;EADgB,KAAA,UAAA;EAIjB,MAAM,YAAY,YAAY,EAAY;EAE1C,KAAK,KAAK;EACV,KAAK,OAAO,EAAE,KAAK,WAAW,WAAW,KAAK,EAAE;EAGhD,KAAK,UAAU;GACd,aAAa,WAAW,SAAS;GACjC,WAAW,YAAY,KAAK,QAAQ,OAAO;EAC5C;CACD;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,UAAU,CAAC,KAAK,KAAK,GAAG;GACxB,GAAI,KAAK,QAAQ,YAAY,EAAE,WAAW,KAAK,IAAI,CAAC;EACrD,CACD;CACD;;;;;;;;CASA,MAAc,QAAQ,EACrB,aACkD;EAClD,MAAM,EAAE,QAAQ,UACd,QAAQ,SAAS,EAAE,KAAK,IAAI,KAAK,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACvD,MAAM;EAER,OAAO,oBAAoB,GAAG;CAC/B;AACD"}
|
package/dist/queue/index.cjs
CHANGED
|
@@ -1,189 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const __geekmidas_events = require_chunk.__toESM(require("@geekmidas/events"));
|
|
8
|
-
|
|
9
|
-
//#region src/queue/Queue.ts
|
|
10
|
-
/**
|
|
11
|
-
* A queue worker — a point-to-point SQS-style queue and its single consumer.
|
|
12
|
-
* Unlike a `Subscriber` (topic fan-out, filtered by `subscribedEvents`), a queue
|
|
13
|
-
* drains every message of its one `message` type. Build one with `q` (see
|
|
14
|
-
* `QueueBuilder`); `gkm build` discovers it into the manifest's `queues` field.
|
|
15
|
-
*
|
|
16
|
-
* The producer side is {@link Queue.publisher} — a ready-to-inject `Service`
|
|
17
|
-
* that any endpoint/function drops into `.services([...])` to send messages.
|
|
18
|
-
*/
|
|
19
|
-
var Queue = class extends require_Construct.Construct {
|
|
20
|
-
__IS_QUEUE__ = true;
|
|
21
|
-
static isQueue(obj) {
|
|
22
|
-
return Boolean(obj && obj.__IS_QUEUE__ === true && obj.type === require_Construct.ConstructType.Queue);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The canonical id this queue is declared under.
|
|
26
|
-
*
|
|
27
|
-
* Derived from the name rather than given separately, so `emails` and
|
|
28
|
-
* `Emails` are one queue. The name stays what it was: it is the wire `type`
|
|
29
|
-
* a producer sends and the worker subscribes to, and changing that would
|
|
30
|
-
* silently orphan in-flight messages.
|
|
31
|
-
*/
|
|
32
|
-
id;
|
|
33
|
-
/**
|
|
34
|
-
* The producer's env key. Read by both {@link declare} and
|
|
35
|
-
* {@link publisher}, so what the target publishes and what the producer
|
|
36
|
-
* looks up cannot drift.
|
|
37
|
-
*/
|
|
38
|
-
connectionKey;
|
|
39
|
-
constructor(name, handler, messageSchema, timeout = 3e4, services = [], logger = __geekmidas_logger_console.DEFAULT_LOGGER, batchSize, fifo, constructs = []) {
|
|
40
|
-
super(require_Construct.ConstructType.Queue, logger, services, [], void 0, void 0, timeout, void 0, void 0, constructs);
|
|
41
|
-
this.name = name;
|
|
42
|
-
this.handler = handler;
|
|
43
|
-
this.messageSchema = messageSchema;
|
|
44
|
-
this.timeout = timeout;
|
|
45
|
-
this.services = services;
|
|
46
|
-
this.logger = logger;
|
|
47
|
-
this.batchSize = batchSize;
|
|
48
|
-
this.fifo = fifo;
|
|
49
|
-
this.id = (0, __geekmidas_manifest.canonicalId)(name);
|
|
50
|
-
this.connectionKey = (0, __geekmidas_manifest.provideKey)(this.id, "publisherConnectionString");
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* What this queue is in the manifest.
|
|
54
|
-
*
|
|
55
|
-
* A queue is a resource, not a handler: the worker is reached *through* it,
|
|
56
|
-
* so the declaration carries the producer's key and nothing about the code
|
|
57
|
-
* that drains it. The local target reads this to know which broker has to be
|
|
58
|
-
* running and what connection string to inject.
|
|
59
|
-
*/
|
|
60
|
-
declare() {
|
|
61
|
-
return [{
|
|
62
|
-
kind: "queue",
|
|
63
|
-
id: this.id,
|
|
64
|
-
provides: [this.connectionKey],
|
|
65
|
-
...this.fifo ? { fifo: true } : {},
|
|
66
|
-
worker: {
|
|
67
|
-
id: `${this.id}Worker`,
|
|
68
|
-
handler: `${this.id}.handler`,
|
|
69
|
-
dependencies: []
|
|
70
|
-
}
|
|
71
|
-
}];
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* The producer side — a `Service` exposing an `EventPublisher` typed to this
|
|
75
|
-
* queue's message. Inject it via `.services([queue.publisher])`; the handler
|
|
76
|
-
* then calls `services.<name>Publisher.publish([{ type, payload }])`.
|
|
77
|
-
*
|
|
78
|
-
* It reads `<NAME>_PUBLISHER_CONNECTION_STRING` and builds the transport from
|
|
79
|
-
* the URL protocol — `pgboss://` locally, `sqs://` deployed — so the same
|
|
80
|
-
* code publishes to Postgres in dev and SQS in prod. Because it's a `Service`,
|
|
81
|
-
* `Construct.getEnvironment()` sniffs it, so the env requirement flows into
|
|
82
|
-
* the manifest and infra links exactly this queue with least privilege.
|
|
83
|
-
*/
|
|
84
|
-
/**
|
|
85
|
-
* The queue as a dependency — what `.dependsOn([emailsQueue])` dissolves
|
|
86
|
-
* into, reachable as `services.emails`.
|
|
87
|
-
*
|
|
88
|
-
* It is the producer: a consumer is the worker written right here, so the
|
|
89
|
-
* only thing another construct can want from a queue is the ability to send
|
|
90
|
-
* to it. {@link publisher} is the same service under its older
|
|
91
|
-
* `<name>Publisher` key, kept for `.services([queue.publisher])`.
|
|
92
|
-
*/
|
|
93
|
-
get service() {
|
|
94
|
-
const { register } = this.publisher;
|
|
95
|
-
return {
|
|
96
|
-
serviceName: (0, __geekmidas_manifest.serviceKey)(this.id),
|
|
97
|
-
register
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
get publisher() {
|
|
101
|
-
const envVar = this.connectionKey;
|
|
102
|
-
return {
|
|
103
|
-
serviceName: `${this.name}Publisher`,
|
|
104
|
-
async register({ envParser }) {
|
|
105
|
-
const { connectionString } = envParser.create((get) => ({ connectionString: get(envVar).string() })).parse();
|
|
106
|
-
return __geekmidas_events.Publisher.fromConnectionString(connectionString);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/queue/QueueBuilder.ts
|
|
114
|
-
/**
|
|
115
|
-
* Builds a {@link Queue} worker — `q.queue('orders').services([db]).message(schema).handle(fn)`.
|
|
116
|
-
* Services are an array (sniffed for required env vars); `message` is the typed
|
|
117
|
-
* job payload; `handle` is the single consumer. The queue name is captured as a
|
|
118
|
-
* literal so `queue.publisher` is typed to `{ type: '<name>', payload }`.
|
|
119
|
-
*/
|
|
120
|
-
var QueueBuilder = class {
|
|
121
|
-
_name;
|
|
122
|
-
_messageSchema;
|
|
123
|
-
_timeout = 3e4;
|
|
124
|
-
_batchSize;
|
|
125
|
-
_fifo;
|
|
126
|
-
_services = [];
|
|
127
|
-
/** The construct ids `.dependsOn()` named — what the manifest records. */
|
|
128
|
-
_constructs = [];
|
|
129
|
-
_logger = __geekmidas_logger_console.DEFAULT_LOGGER;
|
|
130
|
-
/** The queue name — drives the infra queue and its `<NAME>_*` env vars. */
|
|
131
|
-
queue(name) {
|
|
132
|
-
return require_clone.cloneWith(this, { _name: name });
|
|
133
|
-
}
|
|
134
|
-
timeout(timeout) {
|
|
135
|
-
return require_clone.cloneWith(this, { _timeout: timeout });
|
|
136
|
-
}
|
|
137
|
-
/** SQS event-source batch size (deployed). */
|
|
138
|
-
batchSize(batchSize) {
|
|
139
|
-
return require_clone.cloneWith(this, { _batchSize: batchSize });
|
|
140
|
-
}
|
|
141
|
-
/** Mark the queue as FIFO (deployed). */
|
|
142
|
-
fifo(fifo = true) {
|
|
143
|
-
return require_clone.cloneWith(this, { _fifo: fifo });
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Depend on constructs — a database, a bucket, a mail sender, a queue, a
|
|
147
|
-
* topic.
|
|
148
|
-
*
|
|
149
|
-
* It records the edge and dissolves each construct's client into the
|
|
150
|
-
* handler's service record under the construct's own id, so
|
|
151
|
-
* `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
|
|
152
|
-
*
|
|
153
|
-
* Constructs only. A `Service` does not match the shape, which is what keeps
|
|
154
|
-
* env sniffing confined to `.services()` and the explicit lift.
|
|
155
|
-
*/
|
|
156
|
-
dependsOn(constructs) {
|
|
157
|
-
const services = require_construct_interface.servicesOf(constructs);
|
|
158
|
-
return require_clone.cloneWith(this, {
|
|
159
|
-
_services: [...this._services, ...services],
|
|
160
|
-
_constructs: require_construct_interface.idsOf(constructs, this._constructs)
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
services(services) {
|
|
164
|
-
return require_clone.cloneWith(this, { _services: [...this._services, ...services] });
|
|
165
|
-
}
|
|
166
|
-
logger(logger) {
|
|
167
|
-
return require_clone.cloneWith(this, { _logger: logger });
|
|
168
|
-
}
|
|
169
|
-
/** The typed message (job) payload the queue carries. */
|
|
170
|
-
message(schema) {
|
|
171
|
-
return require_clone.cloneWith(this, { _messageSchema: schema });
|
|
172
|
-
}
|
|
173
|
-
handle(fn) {
|
|
174
|
-
if (!this._name) throw new Error("Queue requires a name — call .queue(name) before .handle().");
|
|
175
|
-
if (!this._messageSchema) throw new Error("Queue requires a message schema — call .message(schema) before .handle().");
|
|
176
|
-
const queue = new Queue(this._name, fn, this._messageSchema, this._timeout, this._services, this._logger, this._batchSize, this._fifo, this._constructs);
|
|
177
|
-
return queue;
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
//#endregion
|
|
182
|
-
//#region src/queue/index.ts
|
|
183
|
-
const q = new QueueBuilder();
|
|
184
|
-
|
|
185
|
-
//#endregion
|
|
186
|
-
exports.Queue = Queue;
|
|
187
|
-
exports.QueueBuilder = QueueBuilder;
|
|
188
|
-
exports.q = q;
|
|
189
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_Queue = require("../Queue-BhuofM3k.cjs");
|
|
3
|
+
const require_QueueBuilder = require("../QueueBuilder-DdU2klPu.cjs");
|
|
4
|
+
exports.Queue = require_Queue.Queue;
|
|
5
|
+
exports.QueueNeedsMessage = require_QueueBuilder.QueueNeedsMessage;
|
|
6
|
+
exports.QueueNeedsName = require_QueueBuilder.QueueNeedsName;
|
package/dist/queue/index.d.cts
CHANGED
|
@@ -1,60 +1,3 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import * as _geekmidas_logger12 from "@geekmidas/logger";
|
|
5
|
-
import { Logger } from "@geekmidas/logger";
|
|
6
|
-
import { Service } from "@geekmidas/services";
|
|
7
|
-
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
8
|
-
|
|
9
|
-
//#region src/queue/QueueBuilder.d.ts
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Builds a {@link Queue} worker — `q.queue('orders').services([db]).message(schema).handle(fn)`.
|
|
13
|
-
* Services are an array (sniffed for required env vars); `message` is the typed
|
|
14
|
-
* job payload; `handle` is the single consumer. The queue name is captured as a
|
|
15
|
-
* literal so `queue.publisher` is typed to `{ type: '<name>', payload }`.
|
|
16
|
-
*/
|
|
17
|
-
declare class QueueBuilder<TName extends string = string, TMessage extends StandardSchemaV1 | undefined = undefined, TServices extends Service[] = [], TLogger extends Logger = Logger> {
|
|
18
|
-
private _name?;
|
|
19
|
-
private _messageSchema?;
|
|
20
|
-
private _timeout;
|
|
21
|
-
private _batchSize?;
|
|
22
|
-
private _fifo?;
|
|
23
|
-
private _services;
|
|
24
|
-
/** The construct ids `.dependsOn()` named — what the manifest records. */
|
|
25
|
-
_constructs: string[];
|
|
26
|
-
private _logger;
|
|
27
|
-
/** The queue name — drives the infra queue and its `<NAME>_*` env vars. */
|
|
28
|
-
queue<T extends string>(name: T): QueueBuilder<T, TMessage, TServices, TLogger>;
|
|
29
|
-
timeout(timeout: number): this;
|
|
30
|
-
/** SQS event-source batch size (deployed). */
|
|
31
|
-
batchSize(batchSize: number): this;
|
|
32
|
-
/** Mark the queue as FIFO (deployed). */
|
|
33
|
-
fifo(fifo?: boolean): this;
|
|
34
|
-
/**
|
|
35
|
-
* Depend on constructs — a database, a bucket, a mail sender, a queue, a
|
|
36
|
-
* topic.
|
|
37
|
-
*
|
|
38
|
-
* It records the edge and dissolves each construct's client into the
|
|
39
|
-
* handler's service record under the construct's own id, so
|
|
40
|
-
* `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
|
|
41
|
-
*
|
|
42
|
-
* Constructs only. A `Service` does not match the shape, which is what keeps
|
|
43
|
-
* env sniffing confined to `.services()` and the explicit lift.
|
|
44
|
-
*/
|
|
45
|
-
dependsOn<const T extends readonly Consumable[]>(constructs: T): QueueBuilder<TName, TMessage, [...TServices, ...ServicesOf<T>], TLogger>;
|
|
46
|
-
services<T extends Service[]>(services: T): QueueBuilder<TName, TMessage, [...TServices, ...T], TLogger>;
|
|
47
|
-
logger<T extends Logger>(logger: T): QueueBuilder<TName, TMessage, TServices, T>;
|
|
48
|
-
/** The typed message (job) payload the queue carries. */
|
|
49
|
-
message<T extends StandardSchemaV1>(schema: T): QueueBuilder<TName, T, TServices, TLogger>;
|
|
50
|
-
handle(fn: QueueHandler<NonNullable<TMessage>, TServices, TLogger>): Queue<TName, NonNullable<TMessage>, TServices, TLogger>;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=QueueBuilder.d.ts.map
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/queue/index.d.ts
|
|
55
|
-
declare const q: QueueBuilder<string, undefined, [], _geekmidas_logger12.Logger>;
|
|
56
|
-
//# sourceMappingURL=index.d.ts.map
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
export { Queue, QueueBuilder, QueueContext, QueueHandler, QueueMessage, q };
|
|
60
|
-
//# sourceMappingURL=index.d.cts.map
|
|
1
|
+
import { i as QueueMessage, n as QueueContext, r as QueueHandler, t as Queue } from "../Queue-HPyi0e1i.cjs";
|
|
2
|
+
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-OSi6LkV9.cjs";
|
|
3
|
+
export { Queue, type QueueContext, type QueueHandler, type QueueMessage, QueueNeedsMessage, QueueNeedsName };
|
package/dist/queue/index.d.mts
CHANGED
|
@@ -1,60 +1,3 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { Service } from "@geekmidas/services";
|
|
5
|
-
import * as _geekmidas_logger12 from "@geekmidas/logger";
|
|
6
|
-
import { Logger } from "@geekmidas/logger";
|
|
7
|
-
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
8
|
-
|
|
9
|
-
//#region src/queue/QueueBuilder.d.ts
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Builds a {@link Queue} worker — `q.queue('orders').services([db]).message(schema).handle(fn)`.
|
|
13
|
-
* Services are an array (sniffed for required env vars); `message` is the typed
|
|
14
|
-
* job payload; `handle` is the single consumer. The queue name is captured as a
|
|
15
|
-
* literal so `queue.publisher` is typed to `{ type: '<name>', payload }`.
|
|
16
|
-
*/
|
|
17
|
-
declare class QueueBuilder<TName extends string = string, TMessage extends StandardSchemaV1 | undefined = undefined, TServices extends Service[] = [], TLogger extends Logger = Logger> {
|
|
18
|
-
private _name?;
|
|
19
|
-
private _messageSchema?;
|
|
20
|
-
private _timeout;
|
|
21
|
-
private _batchSize?;
|
|
22
|
-
private _fifo?;
|
|
23
|
-
private _services;
|
|
24
|
-
/** The construct ids `.dependsOn()` named — what the manifest records. */
|
|
25
|
-
_constructs: string[];
|
|
26
|
-
private _logger;
|
|
27
|
-
/** The queue name — drives the infra queue and its `<NAME>_*` env vars. */
|
|
28
|
-
queue<T extends string>(name: T): QueueBuilder<T, TMessage, TServices, TLogger>;
|
|
29
|
-
timeout(timeout: number): this;
|
|
30
|
-
/** SQS event-source batch size (deployed). */
|
|
31
|
-
batchSize(batchSize: number): this;
|
|
32
|
-
/** Mark the queue as FIFO (deployed). */
|
|
33
|
-
fifo(fifo?: boolean): this;
|
|
34
|
-
/**
|
|
35
|
-
* Depend on constructs — a database, a bucket, a mail sender, a queue, a
|
|
36
|
-
* topic.
|
|
37
|
-
*
|
|
38
|
-
* It records the edge and dissolves each construct's client into the
|
|
39
|
-
* handler's service record under the construct's own id, so
|
|
40
|
-
* `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
|
|
41
|
-
*
|
|
42
|
-
* Constructs only. A `Service` does not match the shape, which is what keeps
|
|
43
|
-
* env sniffing confined to `.services()` and the explicit lift.
|
|
44
|
-
*/
|
|
45
|
-
dependsOn<const T extends readonly Consumable[]>(constructs: T): QueueBuilder<TName, TMessage, [...TServices, ...ServicesOf<T>], TLogger>;
|
|
46
|
-
services<T extends Service[]>(services: T): QueueBuilder<TName, TMessage, [...TServices, ...T], TLogger>;
|
|
47
|
-
logger<T extends Logger>(logger: T): QueueBuilder<TName, TMessage, TServices, T>;
|
|
48
|
-
/** The typed message (job) payload the queue carries. */
|
|
49
|
-
message<T extends StandardSchemaV1>(schema: T): QueueBuilder<TName, T, TServices, TLogger>;
|
|
50
|
-
handle(fn: QueueHandler<NonNullable<TMessage>, TServices, TLogger>): Queue<TName, NonNullable<TMessage>, TServices, TLogger>;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=QueueBuilder.d.ts.map
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/queue/index.d.ts
|
|
55
|
-
declare const q: QueueBuilder<string, undefined, [], _geekmidas_logger12.Logger>;
|
|
56
|
-
//# sourceMappingURL=index.d.ts.map
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
export { Queue, QueueBuilder, QueueContext, QueueHandler, QueueMessage, q };
|
|
60
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1
|
+
import { i as QueueMessage, n as QueueContext, r as QueueHandler, t as Queue } from "../Queue-DlsHRzUp.mjs";
|
|
2
|
+
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-Cx9lKC5d.mjs";
|
|
3
|
+
export { Queue, type QueueContext, type QueueHandler, type QueueMessage, QueueNeedsMessage, QueueNeedsName };
|
package/dist/queue/index.mjs
CHANGED
|
@@ -1,186 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { canonicalId, provideKey, serviceKey } from "@geekmidas/manifest";
|
|
5
|
-
import { DEFAULT_LOGGER } from "@geekmidas/logger/console";
|
|
6
|
-
import { Publisher } from "@geekmidas/events";
|
|
7
|
-
|
|
8
|
-
//#region src/queue/Queue.ts
|
|
9
|
-
/**
|
|
10
|
-
* A queue worker — a point-to-point SQS-style queue and its single consumer.
|
|
11
|
-
* Unlike a `Subscriber` (topic fan-out, filtered by `subscribedEvents`), a queue
|
|
12
|
-
* drains every message of its one `message` type. Build one with `q` (see
|
|
13
|
-
* `QueueBuilder`); `gkm build` discovers it into the manifest's `queues` field.
|
|
14
|
-
*
|
|
15
|
-
* The producer side is {@link Queue.publisher} — a ready-to-inject `Service`
|
|
16
|
-
* that any endpoint/function drops into `.services([...])` to send messages.
|
|
17
|
-
*/
|
|
18
|
-
var Queue = class extends Construct {
|
|
19
|
-
__IS_QUEUE__ = true;
|
|
20
|
-
static isQueue(obj) {
|
|
21
|
-
return Boolean(obj && obj.__IS_QUEUE__ === true && obj.type === ConstructType.Queue);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* The canonical id this queue is declared under.
|
|
25
|
-
*
|
|
26
|
-
* Derived from the name rather than given separately, so `emails` and
|
|
27
|
-
* `Emails` are one queue. The name stays what it was: it is the wire `type`
|
|
28
|
-
* a producer sends and the worker subscribes to, and changing that would
|
|
29
|
-
* silently orphan in-flight messages.
|
|
30
|
-
*/
|
|
31
|
-
id;
|
|
32
|
-
/**
|
|
33
|
-
* The producer's env key. Read by both {@link declare} and
|
|
34
|
-
* {@link publisher}, so what the target publishes and what the producer
|
|
35
|
-
* looks up cannot drift.
|
|
36
|
-
*/
|
|
37
|
-
connectionKey;
|
|
38
|
-
constructor(name, handler, messageSchema, timeout = 3e4, services = [], logger = DEFAULT_LOGGER, batchSize, fifo, constructs = []) {
|
|
39
|
-
super(ConstructType.Queue, logger, services, [], void 0, void 0, timeout, void 0, void 0, constructs);
|
|
40
|
-
this.name = name;
|
|
41
|
-
this.handler = handler;
|
|
42
|
-
this.messageSchema = messageSchema;
|
|
43
|
-
this.timeout = timeout;
|
|
44
|
-
this.services = services;
|
|
45
|
-
this.logger = logger;
|
|
46
|
-
this.batchSize = batchSize;
|
|
47
|
-
this.fifo = fifo;
|
|
48
|
-
this.id = canonicalId(name);
|
|
49
|
-
this.connectionKey = provideKey(this.id, "publisherConnectionString");
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* What this queue is in the manifest.
|
|
53
|
-
*
|
|
54
|
-
* A queue is a resource, not a handler: the worker is reached *through* it,
|
|
55
|
-
* so the declaration carries the producer's key and nothing about the code
|
|
56
|
-
* that drains it. The local target reads this to know which broker has to be
|
|
57
|
-
* running and what connection string to inject.
|
|
58
|
-
*/
|
|
59
|
-
declare() {
|
|
60
|
-
return [{
|
|
61
|
-
kind: "queue",
|
|
62
|
-
id: this.id,
|
|
63
|
-
provides: [this.connectionKey],
|
|
64
|
-
...this.fifo ? { fifo: true } : {},
|
|
65
|
-
worker: {
|
|
66
|
-
id: `${this.id}Worker`,
|
|
67
|
-
handler: `${this.id}.handler`,
|
|
68
|
-
dependencies: []
|
|
69
|
-
}
|
|
70
|
-
}];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* The producer side — a `Service` exposing an `EventPublisher` typed to this
|
|
74
|
-
* queue's message. Inject it via `.services([queue.publisher])`; the handler
|
|
75
|
-
* then calls `services.<name>Publisher.publish([{ type, payload }])`.
|
|
76
|
-
*
|
|
77
|
-
* It reads `<NAME>_PUBLISHER_CONNECTION_STRING` and builds the transport from
|
|
78
|
-
* the URL protocol — `pgboss://` locally, `sqs://` deployed — so the same
|
|
79
|
-
* code publishes to Postgres in dev and SQS in prod. Because it's a `Service`,
|
|
80
|
-
* `Construct.getEnvironment()` sniffs it, so the env requirement flows into
|
|
81
|
-
* the manifest and infra links exactly this queue with least privilege.
|
|
82
|
-
*/
|
|
83
|
-
/**
|
|
84
|
-
* The queue as a dependency — what `.dependsOn([emailsQueue])` dissolves
|
|
85
|
-
* into, reachable as `services.emails`.
|
|
86
|
-
*
|
|
87
|
-
* It is the producer: a consumer is the worker written right here, so the
|
|
88
|
-
* only thing another construct can want from a queue is the ability to send
|
|
89
|
-
* to it. {@link publisher} is the same service under its older
|
|
90
|
-
* `<name>Publisher` key, kept for `.services([queue.publisher])`.
|
|
91
|
-
*/
|
|
92
|
-
get service() {
|
|
93
|
-
const { register } = this.publisher;
|
|
94
|
-
return {
|
|
95
|
-
serviceName: serviceKey(this.id),
|
|
96
|
-
register
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
get publisher() {
|
|
100
|
-
const envVar = this.connectionKey;
|
|
101
|
-
return {
|
|
102
|
-
serviceName: `${this.name}Publisher`,
|
|
103
|
-
async register({ envParser }) {
|
|
104
|
-
const { connectionString } = envParser.create((get) => ({ connectionString: get(envVar).string() })).parse();
|
|
105
|
-
return Publisher.fromConnectionString(connectionString);
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
//#endregion
|
|
112
|
-
//#region src/queue/QueueBuilder.ts
|
|
113
|
-
/**
|
|
114
|
-
* Builds a {@link Queue} worker — `q.queue('orders').services([db]).message(schema).handle(fn)`.
|
|
115
|
-
* Services are an array (sniffed for required env vars); `message` is the typed
|
|
116
|
-
* job payload; `handle` is the single consumer. The queue name is captured as a
|
|
117
|
-
* literal so `queue.publisher` is typed to `{ type: '<name>', payload }`.
|
|
118
|
-
*/
|
|
119
|
-
var QueueBuilder = class {
|
|
120
|
-
_name;
|
|
121
|
-
_messageSchema;
|
|
122
|
-
_timeout = 3e4;
|
|
123
|
-
_batchSize;
|
|
124
|
-
_fifo;
|
|
125
|
-
_services = [];
|
|
126
|
-
/** The construct ids `.dependsOn()` named — what the manifest records. */
|
|
127
|
-
_constructs = [];
|
|
128
|
-
_logger = DEFAULT_LOGGER;
|
|
129
|
-
/** The queue name — drives the infra queue and its `<NAME>_*` env vars. */
|
|
130
|
-
queue(name) {
|
|
131
|
-
return cloneWith(this, { _name: name });
|
|
132
|
-
}
|
|
133
|
-
timeout(timeout) {
|
|
134
|
-
return cloneWith(this, { _timeout: timeout });
|
|
135
|
-
}
|
|
136
|
-
/** SQS event-source batch size (deployed). */
|
|
137
|
-
batchSize(batchSize) {
|
|
138
|
-
return cloneWith(this, { _batchSize: batchSize });
|
|
139
|
-
}
|
|
140
|
-
/** Mark the queue as FIFO (deployed). */
|
|
141
|
-
fifo(fifo = true) {
|
|
142
|
-
return cloneWith(this, { _fifo: fifo });
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Depend on constructs — a database, a bucket, a mail sender, a queue, a
|
|
146
|
-
* topic.
|
|
147
|
-
*
|
|
148
|
-
* It records the edge and dissolves each construct's client into the
|
|
149
|
-
* handler's service record under the construct's own id, so
|
|
150
|
-
* `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
|
|
151
|
-
*
|
|
152
|
-
* Constructs only. A `Service` does not match the shape, which is what keeps
|
|
153
|
-
* env sniffing confined to `.services()` and the explicit lift.
|
|
154
|
-
*/
|
|
155
|
-
dependsOn(constructs) {
|
|
156
|
-
const services = servicesOf(constructs);
|
|
157
|
-
return cloneWith(this, {
|
|
158
|
-
_services: [...this._services, ...services],
|
|
159
|
-
_constructs: idsOf(constructs, this._constructs)
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
services(services) {
|
|
163
|
-
return cloneWith(this, { _services: [...this._services, ...services] });
|
|
164
|
-
}
|
|
165
|
-
logger(logger) {
|
|
166
|
-
return cloneWith(this, { _logger: logger });
|
|
167
|
-
}
|
|
168
|
-
/** The typed message (job) payload the queue carries. */
|
|
169
|
-
message(schema) {
|
|
170
|
-
return cloneWith(this, { _messageSchema: schema });
|
|
171
|
-
}
|
|
172
|
-
handle(fn) {
|
|
173
|
-
if (!this._name) throw new Error("Queue requires a name — call .queue(name) before .handle().");
|
|
174
|
-
if (!this._messageSchema) throw new Error("Queue requires a message schema — call .message(schema) before .handle().");
|
|
175
|
-
const queue = new Queue(this._name, fn, this._messageSchema, this._timeout, this._services, this._logger, this._batchSize, this._fifo, this._constructs);
|
|
176
|
-
return queue;
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region src/queue/index.ts
|
|
182
|
-
const q = new QueueBuilder();
|
|
183
|
-
|
|
184
|
-
//#endregion
|
|
185
|
-
export { Queue, QueueBuilder, q };
|
|
186
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import { t as Queue } from "../Queue-cmhqEBOB.mjs";
|
|
2
|
+
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-DXu1qxT1.mjs";
|
|
3
|
+
export { Queue, QueueNeedsMessage, QueueNeedsName };
|