@geekmidas/constructs 10.0.0-alpha.12 → 10.0.0-alpha.121
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-B7AXn0xH.d.mts +230 -0
- package/dist/Construct-B7AXn0xH.d.mts.map +1 -0
- package/dist/Construct-CFW0zjdD.d.cts +230 -0
- package/dist/Construct-CFW0zjdD.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/{Cron-DmQ8vQ4b.d.cts → Cron-bdGRSROY.d.cts} +15 -9
- package/dist/Cron-bdGRSROY.d.cts.map +1 -0
- package/dist/{Cron-dh4rUgib.d.mts → Cron-i4Uetezh.d.mts} +15 -9
- package/dist/Cron-i4Uetezh.d.mts.map +1 -0
- package/dist/CronBuilder-9H4BnD6W.d.mts +47 -0
- package/dist/CronBuilder-9H4BnD6W.d.mts.map +1 -0
- package/dist/{CronBuilder-Da0C0edR.cjs → CronBuilder-BXTG10u5.cjs} +47 -31
- package/dist/CronBuilder-BXTG10u5.cjs.map +1 -0
- package/dist/CronBuilder-B_24LZpn.d.cts +47 -0
- package/dist/CronBuilder-B_24LZpn.d.cts.map +1 -0
- package/dist/{CronBuilder-CYKT5RiO.mjs → CronBuilder-D3sF9tS_.mjs} +37 -21
- package/dist/CronBuilder-D3sF9tS_.mjs.map +1 -0
- package/dist/{Endpoint-BjWKinFA.d.mts → Endpoint-CeFkSwh5.d.mts} +129 -99
- package/dist/Endpoint-CeFkSwh5.d.mts.map +1 -0
- package/dist/{Endpoint-dav89W6-.d.cts → Endpoint-DgrpG15P.d.cts} +127 -97
- package/dist/Endpoint-DgrpG15P.d.cts.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/{EndpointFactory-CdWB7wPw.cjs → EndpointFactory-CSrAyazj.cjs} +361 -112
- package/dist/EndpointFactory-CSrAyazj.cjs.map +1 -0
- package/dist/{index-lAO9egTb.d.mts → EndpointFactory-Cc863XJS.d.cts} +190 -136
- package/dist/EndpointFactory-Cc863XJS.d.cts.map +1 -0
- package/dist/{index-Bd5FqCoe.d.cts → EndpointFactory-Dbw9ugkX.d.mts} +189 -135
- package/dist/EndpointFactory-Dbw9ugkX.d.mts.map +1 -0
- package/dist/{EndpointFactory-CjV8F_lJ.mjs → EndpointFactory-c2ZugGig.mjs} +283 -76
- package/dist/EndpointFactory-c2ZugGig.mjs.map +1 -0
- package/dist/Function-B0uZhZnU.d.cts +76 -0
- package/dist/Function-B0uZhZnU.d.cts.map +1 -0
- package/dist/Function-B_9R7Zy1.d.mts +76 -0
- package/dist/Function-B_9R7Zy1.d.mts.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-D7ZuwBhy.d.cts → Queue-B-dDXyjF.d.mts} +48 -48
- package/dist/Queue-B-dDXyjF.d.mts.map +1 -0
- package/dist/Queue-BhuofM3k.cjs +109 -0
- package/dist/Queue-BhuofM3k.cjs.map +1 -0
- package/dist/{Queue-gVGfi2Yk.d.mts → Queue-JbIjVtTf.d.cts} +49 -49
- package/dist/Queue-JbIjVtTf.d.cts.map +1 -0
- package/dist/Queue-cmhqEBOB.mjs +104 -0
- package/dist/Queue-cmhqEBOB.mjs.map +1 -0
- package/dist/QueueBuilder-48W-q8In.d.mts +75 -0
- package/dist/QueueBuilder-48W-q8In.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-MfpkJ3R9.d.cts +75 -0
- package/dist/QueueBuilder-MfpkJ3R9.d.cts.map +1 -0
- package/dist/{Subscriber-2mEi0ImH.d.cts → Subscriber-CEt7kHkc.d.cts} +29 -20
- package/dist/Subscriber-CEt7kHkc.d.cts.map +1 -0
- package/dist/{Subscriber-xTJ9ayPN.d.mts → Subscriber-dsxc5LKa.d.mts} +29 -20
- package/dist/Subscriber-dsxc5LKa.d.mts.map +1 -0
- package/dist/SubscriberBuilder-BRa_nrmH.d.cts +67 -0
- package/dist/SubscriberBuilder-BRa_nrmH.d.cts.map +1 -0
- package/dist/SubscriberBuilder-D9bkrYzH.d.mts +67 -0
- package/dist/SubscriberBuilder-D9bkrYzH.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/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/cipher-DSDxPRIp.d.cts +106 -0
- package/dist/cipher-DSDxPRIp.d.cts.map +1 -0
- package/dist/cipher-DSDxPRIp.d.mts +106 -0
- package/dist/cipher-DSDxPRIp.d.mts.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/kms.cjs +95 -0
- package/dist/encryption/kms.cjs.map +1 -0
- package/dist/encryption/kms.d.cts +7 -0
- package/dist/encryption/kms.d.cts.map +1 -0
- package/dist/encryption/kms.d.mts +7 -0
- package/dist/encryption/kms.d.mts.map +1 -0
- package/dist/encryption/kms.mjs +93 -0
- package/dist/encryption/kms.mjs.map +1 -0
- package/dist/encryption.cjs +116 -0
- package/dist/encryption.cjs.map +1 -0
- package/dist/encryption.d.cts +37 -0
- package/dist/encryption.d.cts.map +1 -0
- package/dist/encryption.d.mts +37 -0
- package/dist/encryption.d.mts.map +1 -0
- package/dist/encryption.mjs +101 -0
- package/dist/encryption.mjs.map +1 -0
- package/dist/endpoints/index.cjs +27 -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/expire-C586zznE.d.cts +38 -0
- package/dist/expire-C586zznE.d.cts.map +1 -0
- package/dist/expire-C586zznE.d.mts +38 -0
- package/dist/expire-C586zznE.d.mts.map +1 -0
- package/dist/expire-CieftS01.cjs +67 -0
- package/dist/expire-CieftS01.cjs.map +1 -0
- package/dist/expire-CpzUAfr9.mjs +50 -0
- package/dist/expire-CpzUAfr9.mjs.map +1 -0
- 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-B7rvi4Qp.d.cts +201 -0
- package/dist/fake-B7rvi4Qp.d.cts.map +1 -0
- package/dist/fake-JXbkdao8.d.mts +201 -0
- package/dist/fake-JXbkdao8.d.mts.map +1 -0
- package/dist/file-server.cjs +66 -11
- package/dist/file-server.cjs.map +1 -1
- package/dist/file-server.d.cts +25 -10
- package/dist/file-server.d.cts.map +1 -1
- package/dist/file-server.d.mts +25 -10
- package/dist/file-server.d.mts.map +1 -1
- package/dist/file-server.mjs +58 -4
- 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-Cd2w-DRL.d.cts +115 -0
- package/dist/index-Cd2w-DRL.d.cts.map +1 -0
- package/dist/index-DdRjYhiJ.d.cts +119 -0
- package/dist/index-DdRjYhiJ.d.cts.map +1 -0
- package/dist/index-DdRjYhiJ.d.mts +119 -0
- package/dist/index-DdRjYhiJ.d.mts.map +1 -0
- package/dist/index-aBIcAiH5.d.mts +115 -0
- package/dist/index-aBIcAiH5.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/kysely-BHYV-WC-.d.cts +216 -0
- package/dist/kysely-BHYV-WC-.d.cts.map +1 -0
- package/dist/kysely-CAW3QSqp.d.mts +216 -0
- package/dist/kysely-CAW3QSqp.d.mts.map +1 -0
- package/dist/kysely-Cs4uPO8k.mjs +371 -0
- package/dist/kysely-Cs4uPO8k.mjs.map +1 -0
- package/dist/kysely-CukArHJ0.cjs +384 -0
- package/dist/kysely-CukArHJ0.cjs.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 +74 -0
- package/dist/mobile-app.cjs.map +1 -0
- package/dist/mobile-app.d.cts +73 -0
- package/dist/mobile-app.d.cts.map +1 -0
- package/dist/mobile-app.d.mts +73 -0
- package/dist/mobile-app.d.mts.map +1 -0
- package/dist/mobile-app.mjs +73 -0
- package/dist/mobile-app.mjs.map +1 -0
- package/dist/object-storage.cjs +26 -11
- package/dist/object-storage.cjs.map +1 -1
- package/dist/object-storage.d.cts +12 -7
- package/dist/object-storage.d.cts.map +1 -1
- package/dist/object-storage.d.mts +12 -7
- package/dist/object-storage.d.mts.map +1 -1
- package/dist/object-storage.mjs +18 -5
- 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 -45
- package/dist/worker.d.mts.map +1 -1
- package/dist/worker.mjs +54 -29
- package/dist/worker.mjs.map +1 -1
- package/package.json +115 -41
- 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
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_logger0 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_logger0.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-JbIjVtTf.cjs";
|
|
2
|
+
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-MfpkJ3R9.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_logger16 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_logger16.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-B-dDXyjF.mjs";
|
|
2
|
+
import { n as QueueNeedsMessage, r as QueueNeedsName } from "../QueueBuilder-48W-q8In.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 };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
3
|
+
//#region src/random-password.ts
|
|
4
|
+
/**
|
|
5
|
+
* `RandomPassword` — a password the platform generates, once per stage.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* export const adminPassword = new RandomPassword('AdminPassword');
|
|
9
|
+
*
|
|
10
|
+
* // an endpoint that `.dependsOn([adminPassword])`
|
|
11
|
+
* services.adminPassword // 'k3J…' — a string, no await
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* The app's own `secret`: the kind an auth server's signing key already is,
|
|
15
|
+
* with nothing else attached. Nobody issues it and nobody sets it, which is
|
|
16
|
+
* the line between it and a `Credential`:
|
|
17
|
+
*
|
|
18
|
+
* - **A deployed stage** generates it on the first deploy that needs it and
|
|
19
|
+
* keeps it — a server stage in its secrets store, an AWS stage in its
|
|
20
|
+
* state — so every later deploy reads the same value back. One set by hand
|
|
21
|
+
* (`gkm secrets:set`, `sst secret set`) is kept, never replaced.
|
|
22
|
+
* - **`gkm dev` and `gkm test`** derive it from the project, the stage and the
|
|
23
|
+
* id, so nothing has to be set and it is the same on every run.
|
|
24
|
+
*
|
|
25
|
+
* Its key is its name, as a secret's is: `AdminPassword` is `ADMIN_PASSWORD`.
|
|
26
|
+
*
|
|
27
|
+
* 43 letters, digits, `-` and `_` unless told otherwise — for a system with
|
|
28
|
+
* rules of its own:
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* new RandomPassword('RouterPassword', { length: 24, symbols: '!@#$%' });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* The format is read when the password is generated, so changing it later
|
|
35
|
+
* leaves a deployed stage's existing password as it is.
|
|
36
|
+
*/
|
|
37
|
+
var RandomPassword = class {
|
|
38
|
+
format;
|
|
39
|
+
id;
|
|
40
|
+
service;
|
|
41
|
+
/**
|
|
42
|
+
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
43
|
+
* target publishes and the key the client reads cannot drift.
|
|
44
|
+
*/
|
|
45
|
+
key;
|
|
46
|
+
constructor(id, format = {}) {
|
|
47
|
+
this.format = format;
|
|
48
|
+
const canonical = (0, _geekmidas_manifest.canonicalId)(id);
|
|
49
|
+
const { length } = format;
|
|
50
|
+
if (length !== void 0 && !(Number.isInteger(length) && length > 0)) throw new InvalidPasswordLength(canonical, length);
|
|
51
|
+
this.id = canonical;
|
|
52
|
+
this.key = (0, _geekmidas_manifest.environmentCase)(canonical);
|
|
53
|
+
this.service = {
|
|
54
|
+
serviceName: (0, _geekmidas_manifest.serviceKey)(canonical),
|
|
55
|
+
register: (options) => this.connect(options)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
declare() {
|
|
59
|
+
return [{
|
|
60
|
+
kind: "secret",
|
|
61
|
+
id: this.id,
|
|
62
|
+
provides: [this.key],
|
|
63
|
+
...this.format.length !== void 0 ? { length: this.format.length } : {},
|
|
64
|
+
...this.format.symbols !== void 0 ? { symbols: this.format.symbols } : {}
|
|
65
|
+
}];
|
|
66
|
+
}
|
|
67
|
+
connect(options) {
|
|
68
|
+
return options.envParser.create((get) => ({ password: get(this.key).string() })).parse().password;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
/** A `RandomPassword` given a length no password can have. */
|
|
72
|
+
var InvalidPasswordLength = class extends Error {
|
|
73
|
+
id;
|
|
74
|
+
length;
|
|
75
|
+
constructor(id, length) {
|
|
76
|
+
super(`${id} asks for a password ${length} characters long. Give it a whole number of characters, at least 1 — or leave length out for 43.`);
|
|
77
|
+
this.id = id;
|
|
78
|
+
this.length = length;
|
|
79
|
+
this.name = "InvalidPasswordLength";
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
exports.InvalidPasswordLength = InvalidPasswordLength;
|
|
84
|
+
exports.RandomPassword = RandomPassword;
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=random-password.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"random-password.cjs","names":["canonicalId","environmentCase","serviceKey"],"sources":["../src/random-password.ts"],"sourcesContent":["/**\n * `RandomPassword` — a password the platform generates, once per stage.\n *\n * ```ts\n * export const adminPassword = new RandomPassword('AdminPassword');\n *\n * // an endpoint that `.dependsOn([adminPassword])`\n * services.adminPassword // 'k3J…' — a string, no await\n * ```\n *\n * The app's own `secret`: the kind an auth server's signing key already is,\n * with nothing else attached. Nobody issues it and nobody sets it, which is\n * the line between it and a `Credential`:\n *\n * - **A deployed stage** generates it on the first deploy that needs it and\n * keeps it — a server stage in its secrets store, an AWS stage in its\n * state — so every later deploy reads the same value back. One set by hand\n * (`gkm secrets:set`, `sst secret set`) is kept, never replaced.\n * - **`gkm dev` and `gkm test`** derive it from the project, the stage and the\n * id, so nothing has to be set and it is the same on every run.\n *\n * Its key is its name, as a secret's is: `AdminPassword` is `ADMIN_PASSWORD`.\n *\n * 43 letters, digits, `-` and `_` unless told otherwise — for a system with\n * rules of its own:\n *\n * ```ts\n * new RandomPassword('RouterPassword', { length: 24, symbols: '!@#$%' });\n * ```\n *\n * The format is read when the password is generated, so changing it later\n * leaves a deployed stage's existing password as it is.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\tenvironmentCase,\n\ttype SecretFormat,\n\tserviceKey,\n} from '@geekmidas/manifest';\nimport type { Service, ServiceRegisterOptions } from '@geekmidas/services';\nimport type { Construct } from './construct-interface';\n\nexport class RandomPassword<TName extends string = string>\n\timplements Construct<TName, string>\n{\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, string>;\n\n\t/**\n\t * Declared once and read by both `declare()` and `connect()`, so the key the\n\t * target publishes and the key the client reads cannot drift.\n\t */\n\tprivate readonly key: string;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly format: RandomPasswordOptions = {},\n\t) {\n\t\tconst canonical = canonicalId(id as string);\n\t\tconst { length } = format;\n\n\t\tif (length !== undefined && !(Number.isInteger(length) && length > 0)) {\n\t\t\tthrow new InvalidPasswordLength(canonical, length);\n\t\t}\n\n\t\tthis.id = canonical as TName;\n\t\tthis.key = environmentCase(canonical);\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: 'secret',\n\t\t\t\tid: this.id,\n\t\t\t\tprovides: [this.key],\n\t\t\t\t...(this.format.length !== undefined\n\t\t\t\t\t? { length: this.format.length }\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.format.symbols !== undefined\n\t\t\t\t\t? { symbols: this.format.symbols }\n\t\t\t\t\t: {}),\n\t\t\t},\n\t\t];\n\t}\n\n\tprivate connect(options: ServiceRegisterOptions): string {\n\t\treturn options.envParser\n\t\t\t.create((get) => ({ password: get(this.key).string() }))\n\t\t\t.parse().password;\n\t}\n}\n\n/**\n * What a password is drawn as. Letters and digits always; `symbols` beside\n * them, one of which is always present.\n */\nexport type RandomPasswordOptions = SecretFormat;\n\n/** A `RandomPassword` given a length no password can have. */\nexport class InvalidPasswordLength extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly length: number,\n\t) {\n\t\tsuper(\n\t\t\t`${id} asks for a password ${length} characters long. ` +\n\t\t\t\t'Give it a whole number of characters, at least 1 — or leave length out for 43.',\n\t\t);\n\t\tthis.name = 'InvalidPasswordLength';\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,IAAa,iBAAb,MAEA;CAYmB;CAXlB;CACA;;;;;CAMA;CAEA,YACC,IACA,SAAiD,CAAC,GACjD;EADgB,KAAA,SAAA;EAEjB,MAAM,aAAA,GAAYA,oBAAAA,YAAAA,CAAY,EAAY;EAC1C,MAAM,EAAE,WAAW;EAEnB,IAAI,WAAW,KAAA,KAAa,EAAE,OAAO,UAAU,MAAM,KAAK,SAAS,IAClE,MAAM,IAAI,sBAAsB,WAAW,MAAM;EAGlD,KAAK,KAAK;EACV,KAAK,OAAA,GAAMC,oBAAAA,gBAAAA,CAAgB,SAAS;EAGpC,KAAK,UAAU;GACd,cAAA,GAAaC,oBAAAA,WAAAA,CAAW,SAAS;GACjC,WAAW,YAAY,KAAK,QAAQ,OAAO;EAC5C;CACD;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,UAAU,CAAC,KAAK,GAAG;GACnB,GAAI,KAAK,OAAO,WAAW,KAAA,IACxB,EAAE,QAAQ,KAAK,OAAO,OAAO,IAC7B,CAAC;GACJ,GAAI,KAAK,OAAO,YAAY,KAAA,IACzB,EAAE,SAAS,KAAK,OAAO,QAAQ,IAC/B,CAAC;EACL,CACD;CACD;CAEA,QAAgB,SAAyC;EACxD,OAAO,QAAQ,UACb,QAAQ,SAAS,EAAE,UAAU,IAAI,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACvD,MAAM,CAAC,CAAC;CACX;AACD;;AASA,IAAa,wBAAb,cAA2C,MAAM;CAEtC;CACA;CAFV,YACC,IACA,QACC;EACD,MACC,GAAG,GAAG,uBAAuB,OAAO,iGAErC;EANS,KAAA,KAAA;EACA,KAAA,SAAA;EAMT,KAAK,OAAO;CACb;AACD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { n as Construct } from "./construct-interface-B1AfqRl4.cjs";
|
|
2
|
+
import { Service } from "@geekmidas/services";
|
|
3
|
+
import { ConstructName, Declaration, SecretFormat } from "@geekmidas/manifest";
|
|
4
|
+
//#region src/random-password.d.ts
|
|
5
|
+
export declare class RandomPassword<TName extends string = string> implements Construct<TName, string> {
|
|
6
|
+
private readonly format;
|
|
7
|
+
readonly id: TName;
|
|
8
|
+
readonly service: Service<Uncapitalize<TName>, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
11
|
+
* target publishes and the key the client reads cannot drift.
|
|
12
|
+
*/
|
|
13
|
+
private readonly key;
|
|
14
|
+
constructor(id: ConstructName<TName>, format?: RandomPasswordOptions);
|
|
15
|
+
declare(): Declaration[];
|
|
16
|
+
private connect;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* What a password is drawn as. Letters and digits always; `symbols` beside
|
|
20
|
+
* them, one of which is always present.
|
|
21
|
+
*/
|
|
22
|
+
export type RandomPasswordOptions = SecretFormat;
|
|
23
|
+
/** A `RandomPassword` given a length no password can have. */
|
|
24
|
+
export declare class InvalidPasswordLength extends Error {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly length: number;
|
|
27
|
+
constructor(id: string, length: number);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//# sourceMappingURL=random-password.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"random-password.d.cts","names":[],"sources":["../src/random-password.ts"],"mappings":";;;;qBA6Ca,eAAe,0CAChB,UAAU;mBAaH;WAXT,IAAI;WACJ,SAAS,QAAQ,aAAa;;;;;mBAMtB;EAEjB,YACC,IAAI,cAAc,QACD,SAAQ;EAmB1B,WAAW;UAgBH;;;;;;YAWG,wBAAwB;;qBAGvB,8BAA8B;WAEhC;WACA;EAFV,YACU,YACA"}
|