@geekmidas/constructs 10.0.0-alpha.16 → 10.0.0-alpha.160
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 +246 -158
- package/dist/Construct-127M7yrl.d.cts +231 -0
- package/dist/Construct-127M7yrl.d.cts.map +1 -0
- package/dist/Construct-BMk_CRSD.d.mts +231 -0
- package/dist/Construct-BMk_CRSD.d.mts.map +1 -0
- package/dist/{Construct-BeYVu_QF.mjs → Construct-CGuc_Ijk.mjs} +8 -9
- package/dist/Construct-CGuc_Ijk.mjs.map +1 -0
- package/dist/{Construct-DqdlARxq.cjs → Construct-DorKS0Ua.cjs} +8 -9
- package/dist/Construct-DorKS0Ua.cjs.map +1 -0
- package/dist/{Cron-l4Wlz6G9.d.mts → Cron-D6Y7BBt3.d.mts} +15 -8
- package/dist/Cron-D6Y7BBt3.d.mts.map +1 -0
- package/dist/{Cron-zsoSAwZo.d.cts → Cron-D_sfaMGz.d.cts} +14 -7
- package/dist/Cron-D_sfaMGz.d.cts.map +1 -0
- package/dist/CronBuilder-4BZhkChG.d.mts +47 -0
- package/dist/CronBuilder-4BZhkChG.d.mts.map +1 -0
- package/dist/{CronBuilder-D_0HNBTr.mjs → CronBuilder-BJ5LoadF.mjs} +28 -11
- package/dist/CronBuilder-BJ5LoadF.mjs.map +1 -0
- package/dist/{CronBuilder-BdnI6lxF.cjs → CronBuilder-B_NSP-Y5.cjs} +27 -10
- package/dist/CronBuilder-B_NSP-Y5.cjs.map +1 -0
- package/dist/CronBuilder-C91MVLSr.d.cts +47 -0
- package/dist/CronBuilder-C91MVLSr.d.cts.map +1 -0
- package/dist/Endpoint-52z1P0Ue.cjs +581 -0
- package/dist/Endpoint-52z1P0Ue.cjs.map +1 -0
- package/dist/{Endpoint-oS-Fe3d_.d.mts → Endpoint-BUoDD96P.d.mts} +104 -23
- package/dist/Endpoint-BUoDD96P.d.mts.map +1 -0
- package/dist/{Endpoint-DBflWAe4.d.cts → Endpoint-YYwjqtS1.d.cts} +101 -20
- package/dist/Endpoint-YYwjqtS1.d.cts.map +1 -0
- package/dist/Endpoint-sUOU7uLx.mjs +552 -0
- package/dist/Endpoint-sUOU7uLx.mjs.map +1 -0
- package/dist/{index-Cc4kKPag.d.mts → EndpointFactory-BbVOeryo.d.mts} +189 -106
- package/dist/EndpointFactory-BbVOeryo.d.mts.map +1 -0
- package/dist/{EndpointFactory-Bm3aKRdV.mjs → EndpointFactory-Bzi9Sl7r.mjs} +269 -53
- package/dist/EndpointFactory-Bzi9Sl7r.mjs.map +1 -0
- package/dist/{EndpointFactory-CLvWuHyt.cjs → EndpointFactory-Cf_Cs1ym.cjs} +309 -51
- package/dist/EndpointFactory-Cf_Cs1ym.cjs.map +1 -0
- package/dist/{index-C1ZwNOOk.d.cts → EndpointFactory-Hh1r6J_C.d.cts} +187 -104
- package/dist/EndpointFactory-Hh1r6J_C.d.cts.map +1 -0
- package/dist/Function-BIEsY0Hm.d.cts +76 -0
- package/dist/Function-BIEsY0Hm.d.cts.map +1 -0
- package/dist/Function-BKReud5p.d.mts +76 -0
- package/dist/Function-BKReud5p.d.mts.map +1 -0
- package/dist/{HonoEndpointAdaptor-92zavCsV.cjs → HonoEndpointAdaptor-BTbqfSaa.cjs} +115 -41
- package/dist/HonoEndpointAdaptor-BTbqfSaa.cjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-yYaU7jVJ.mjs → HonoEndpointAdaptor-CBVey2cY.mjs} +112 -38
- package/dist/HonoEndpointAdaptor-CBVey2cY.mjs.map +1 -0
- package/dist/ObjectSubscriberBuilder-DfzXQEKW.d.mts +129 -0
- package/dist/ObjectSubscriberBuilder-DfzXQEKW.d.mts.map +1 -0
- package/dist/ObjectSubscriberBuilder-LWkey_oq.d.cts +129 -0
- package/dist/ObjectSubscriberBuilder-LWkey_oq.d.cts.map +1 -0
- package/dist/ProcessorBuilder-D4oYvZeG.d.mts +216 -0
- package/dist/ProcessorBuilder-D4oYvZeG.d.mts.map +1 -0
- package/dist/ProcessorBuilder-_jdZlbfW.d.cts +216 -0
- package/dist/ProcessorBuilder-_jdZlbfW.d.cts.map +1 -0
- package/dist/{Queue-D9X6OoON.d.mts → Queue-B8HGg439.d.mts} +42 -41
- package/dist/Queue-B8HGg439.d.mts.map +1 -0
- package/dist/{Queue-DYPB2KWL.d.cts → Queue-C4rijiM7.d.cts} +43 -42
- package/dist/Queue-C4rijiM7.d.cts.map +1 -0
- package/dist/Queue-D4Iaidrs.cjs +109 -0
- package/dist/Queue-D4Iaidrs.cjs.map +1 -0
- package/dist/Queue-u8w8_HpE.mjs +104 -0
- package/dist/Queue-u8w8_HpE.mjs.map +1 -0
- package/dist/QueueBuilder-2wP5lEC8.mjs +118 -0
- package/dist/QueueBuilder-2wP5lEC8.mjs.map +1 -0
- package/dist/QueueBuilder-BxsZ9o5z.cjs +135 -0
- package/dist/QueueBuilder-BxsZ9o5z.cjs.map +1 -0
- package/dist/QueueBuilder-CVS_qPuo.d.mts +75 -0
- package/dist/QueueBuilder-CVS_qPuo.d.mts.map +1 -0
- package/dist/QueueBuilder-SQli59An.d.cts +75 -0
- package/dist/QueueBuilder-SQli59An.d.cts.map +1 -0
- package/dist/Subscriber-5rCX1Nph.d.cts +83 -0
- package/dist/Subscriber-5rCX1Nph.d.cts.map +1 -0
- package/dist/Subscriber-CtQXhcL7.d.mts +83 -0
- package/dist/Subscriber-CtQXhcL7.d.mts.map +1 -0
- package/dist/SubscriberBuilder-CpFhShTJ.mjs +238 -0
- package/dist/SubscriberBuilder-CpFhShTJ.mjs.map +1 -0
- package/dist/SubscriberBuilder-DJEvNRdD.cjs +261 -0
- package/dist/SubscriberBuilder-DJEvNRdD.cjs.map +1 -0
- package/dist/Topic-DN2gYJ-p.mjs +99 -0
- package/dist/Topic-DN2gYJ-p.mjs.map +1 -0
- package/dist/Topic-Dp9Q7Lj2.cjs +104 -0
- package/dist/Topic-Dp9Q7Lj2.cjs.map +1 -0
- package/dist/adaptors/aws.cjs +147 -168
- package/dist/adaptors/aws.cjs.map +1 -1
- package/dist/adaptors/aws.d.cts +57 -48
- package/dist/adaptors/aws.d.cts.map +1 -1
- package/dist/adaptors/aws.d.mts +58 -49
- package/dist/adaptors/aws.d.mts.map +1 -1
- package/dist/adaptors/aws.mjs +142 -164
- package/dist/adaptors/aws.mjs.map +1 -1
- package/dist/adaptors/awsWebsocket.cjs +354 -0
- package/dist/adaptors/awsWebsocket.cjs.map +1 -0
- package/dist/adaptors/awsWebsocket.d.cts +156 -0
- package/dist/adaptors/awsWebsocket.d.cts.map +1 -0
- package/dist/adaptors/awsWebsocket.d.mts +156 -0
- package/dist/adaptors/awsWebsocket.d.mts.map +1 -0
- package/dist/adaptors/awsWebsocket.mjs +347 -0
- package/dist/adaptors/awsWebsocket.mjs.map +1 -0
- package/dist/adaptors/hono.cjs +1 -1
- package/dist/adaptors/hono.d.cts +8 -7
- package/dist/adaptors/hono.d.cts.map +1 -1
- package/dist/adaptors/hono.d.mts +10 -9
- package/dist/adaptors/hono.d.mts.map +1 -1
- package/dist/adaptors/hono.mjs +1 -1
- package/dist/adaptors/testing.cjs +1174 -41
- package/dist/adaptors/testing.cjs.map +1 -1
- package/dist/adaptors/testing.d.cts +517 -40
- package/dist/adaptors/testing.d.cts.map +1 -1
- package/dist/adaptors/testing.d.mts +517 -40
- package/dist/adaptors/testing.d.mts.map +1 -1
- package/dist/adaptors/testing.mjs +1140 -36
- package/dist/adaptors/testing.mjs.map +1 -1
- package/dist/auth-BqWz2JxC.d.cts +274 -0
- package/dist/auth-BqWz2JxC.d.cts.map +1 -0
- package/dist/auth-DnB9H9KL.d.mts +274 -0
- package/dist/auth-DnB9H9KL.d.mts.map +1 -0
- package/dist/auth.cjs +308 -23
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +2 -104
- package/dist/auth.d.mts +2 -104
- package/dist/auth.mjs +304 -25
- package/dist/auth.mjs.map +1 -1
- package/dist/cache-CCHcO9Oo.d.mts +44 -0
- package/dist/cache-CCHcO9Oo.d.mts.map +1 -0
- package/dist/cache-CQjMNPrC.d.cts +44 -0
- package/dist/cache-CQjMNPrC.d.cts.map +1 -0
- package/dist/cache.cjs +3 -19
- package/dist/cache.cjs.map +1 -1
- package/dist/cache.d.cts +2 -43
- package/dist/cache.d.mts +2 -43
- package/dist/cache.mjs +2 -18
- package/dist/cache.mjs.map +1 -1
- 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/{construct-interface-DPlxfpoS.d.mts → construct-interface-CSA9VeWM.d.mts} +47 -8
- package/dist/construct-interface-CSA9VeWM.d.mts.map +1 -0
- package/dist/{construct-interface-DgXTJcOD.d.cts → construct-interface-DugP0E5q.d.cts} +47 -8
- package/dist/construct-interface-DugP0E5q.d.cts.map +1 -0
- package/dist/construct-interface.cjs +38 -4
- package/dist/construct-interface.cjs.map +1 -1
- package/dist/construct-interface.d.cts +2 -2
- package/dist/construct-interface.d.mts +2 -2
- package/dist/construct-interface.mjs +37 -5
- package/dist/construct-interface.mjs.map +1 -1
- 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 +7 -129
- package/dist/credential.d.cts +2 -58
- package/dist/credential.d.mts +2 -58
- package/dist/credential.mjs +2 -128
- package/dist/crons/index.cjs +127 -1
- package/dist/crons/index.cjs.map +1 -1
- package/dist/crons/index.d.cts +43 -3
- package/dist/crons/index.d.cts.map +1 -1
- package/dist/crons/index.d.mts +43 -3
- package/dist/crons/index.d.mts.map +1 -1
- package/dist/crons/index.mjs +126 -2
- package/dist/crons/index.mjs.map +1 -1
- package/dist/database/kysely.cjs +3 -194
- package/dist/database/kysely.d.cts +2 -149
- package/dist/database/kysely.d.mts +2 -149
- package/dist/database/kysely.mjs +2 -192
- package/dist/email.cjs +4 -16
- package/dist/email.cjs.map +1 -1
- package/dist/email.d.cts +1 -1
- package/dist/email.d.cts.map +1 -1
- package/dist/email.d.mts +2 -2
- package/dist/email.d.mts.map +1 -1
- package/dist/email.mjs +2 -14
- 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 +32 -10
- package/dist/endpoints/index.d.cts +106 -3
- package/dist/endpoints/index.d.cts.map +1 -0
- package/dist/endpoints/index.d.mts +106 -3
- package/dist/endpoints/index.d.mts.map +1 -0
- package/dist/endpoints/index.mjs +6 -4
- 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-BqhP8RRQ.d.mts +201 -0
- package/dist/fake-BqhP8RRQ.d.mts.map +1 -0
- package/dist/fake-DqieDYYA.d.cts +201 -0
- package/dist/fake-DqieDYYA.d.cts.map +1 -0
- package/dist/file-server.cjs +123 -30
- package/dist/file-server.cjs.map +1 -1
- package/dist/file-server.d.cts +115 -1
- package/dist/file-server.d.cts.map +1 -1
- package/dist/file-server.d.mts +115 -1
- package/dist/file-server.d.mts.map +1 -1
- package/dist/file-server.mjs +122 -32
- package/dist/file-server.mjs.map +1 -1
- package/dist/functions/index.cjs +1 -1
- package/dist/functions/index.d.cts +2 -1
- package/dist/functions/index.d.mts +2 -1
- package/dist/functions/index.mjs +1 -1
- package/dist/{functions-C53GW2eQ.mjs → functions-BvIDQKAA.mjs} +117 -22
- package/dist/functions-BvIDQKAA.mjs.map +1 -0
- package/dist/{functions-B6qCvfmy.cjs → functions-DLF6-IK8.cjs} +122 -18
- package/dist/functions-DLF6-IK8.cjs.map +1 -0
- package/dist/inbox-CR3L1fOI.d.cts +195 -0
- package/dist/inbox-CR3L1fOI.d.cts.map +1 -0
- package/dist/inbox-YOdxlyfj.d.mts +195 -0
- package/dist/inbox-YOdxlyfj.d.mts.map +1 -0
- package/dist/inbox.cjs +291 -0
- package/dist/inbox.cjs.map +1 -0
- package/dist/inbox.d.cts +2 -0
- package/dist/inbox.d.mts +2 -0
- package/dist/inbox.mjs +283 -0
- package/dist/inbox.mjs.map +1 -0
- package/dist/index-BoQ3-M-K.d.mts +115 -0
- package/dist/index-BoQ3-M-K.d.mts.map +1 -0
- package/dist/index-DPTHa6Ud.d.cts +115 -0
- package/dist/index-DPTHa6Ud.d.cts.map +1 -0
- package/dist/{index-CeEtxDmK.d.cts → index-DdRjYhiJ.d.cts} +42 -2
- package/dist/{index-CeEtxDmK.d.cts.map → index-DdRjYhiJ.d.cts.map} +1 -1
- package/dist/{index-CeEtxDmK.d.mts → index-DdRjYhiJ.d.mts} +42 -2
- package/dist/{index-CeEtxDmK.d.mts.map → index-DdRjYhiJ.d.mts.map} +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.d.cts +26 -3
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +26 -3
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -2
- package/dist/kysely-CebjCWTl.d.cts +216 -0
- package/dist/kysely-CebjCWTl.d.cts.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/kysely-De5rAC-E.d.mts +216 -0
- package/dist/kysely-De5rAC-E.d.mts.map +1 -0
- package/dist/{telemetry-DGcFlVpB.d.cts → lambdaTelemetry-8vnmVZQ5.d.cts} +2 -2
- package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +1 -0
- package/dist/{telemetry-DGcFlVpB.d.mts → lambdaTelemetry-8vnmVZQ5.d.mts} +2 -2
- 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 +8 -1
- package/dist/object-storage.cjs.map +1 -1
- package/dist/object-storage.d.cts +10 -1
- package/dist/object-storage.d.cts.map +1 -1
- package/dist/object-storage.d.mts +10 -1
- package/dist/object-storage.d.mts.map +1 -1
- package/dist/object-storage.mjs +7 -2
- package/dist/object-storage.mjs.map +1 -1
- package/dist/optionalPeers-D7Wt6dnF.mjs +140 -0
- package/dist/optionalPeers-D7Wt6dnF.mjs.map +1 -0
- package/dist/optionalPeers-DuNQXXe1.cjs +223 -0
- package/dist/optionalPeers-DuNQXXe1.cjs.map +1 -0
- package/dist/origins-BjxYht13.cjs +96 -0
- package/dist/origins-BjxYht13.cjs.map +1 -0
- package/dist/origins-Boc9qbo-.mjs +73 -0
- package/dist/origins-Boc9qbo-.mjs.map +1 -0
- package/dist/pattern-C1CEcglD.mjs +241 -0
- package/dist/pattern-C1CEcglD.mjs.map +1 -0
- package/dist/pattern-QFaUIr77.cjs +288 -0
- package/dist/pattern-QFaUIr77.cjs.map +1 -0
- package/dist/privateAddress-Bg5fUsbp.mjs +21 -0
- package/dist/privateAddress-Bg5fUsbp.mjs.map +1 -0
- package/dist/privateAddress-CqGyuFHn.cjs +26 -0
- package/dist/privateAddress-CqGyuFHn.cjs.map +1 -0
- package/dist/processors/index.cjs +214 -0
- package/dist/processors/index.cjs.map +1 -0
- package/dist/processors/index.d.cts +78 -0
- package/dist/processors/index.d.cts.map +1 -0
- package/dist/processors/index.d.mts +78 -0
- package/dist/processors/index.d.mts.map +1 -0
- package/dist/processors/index.mjs +193 -0
- package/dist/processors/index.mjs.map +1 -0
- package/dist/queue/index.cjs +5 -192
- package/dist/queue/index.d.cts +3 -53
- package/dist/queue/index.d.mts +3 -53
- package/dist/queue/index.mjs +3 -190
- 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/readRequestBody-BmKnPl0a.mjs +293 -0
- package/dist/readRequestBody-BmKnPl0a.mjs.map +1 -0
- package/dist/{lazyAccessors-Dx9NLwJZ.cjs → readRequestBody-CN9GVdeE.cjs} +141 -47
- package/dist/readRequestBody-CN9GVdeE.cjs.map +1 -0
- package/dist/{processAudits-D_2W5x8k.cjs → requestLogger-CnoYd-Ah.cjs} +63 -3
- package/dist/requestLogger-CnoYd-Ah.cjs.map +1 -0
- package/dist/{processAudits-BpRlPQMW.mjs → requestLogger-D2JS7pPM.mjs} +51 -3
- package/dist/requestLogger-D2JS7pPM.mjs.map +1 -0
- package/dist/rest-api.cjs +85 -70
- package/dist/rest-api.cjs.map +1 -1
- package/dist/rest-api.d.cts +77 -59
- package/dist/rest-api.d.cts.map +1 -1
- package/dist/rest-api.d.mts +77 -59
- package/dist/rest-api.d.mts.map +1 -1
- package/dist/rest-api.mjs +87 -72
- package/dist/rest-api.mjs.map +1 -1
- package/dist/runSubscriber-HEqXkin1.mjs +117 -0
- package/dist/runSubscriber-HEqXkin1.mjs.map +1 -0
- package/dist/runSubscriber-sVJfLA0-.cjs +134 -0
- package/dist/runSubscriber-sVJfLA0-.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 +104 -8
- package/dist/site.cjs.map +1 -1
- package/dist/site.d.cts +132 -2
- package/dist/site.d.cts.map +1 -1
- package/dist/site.d.mts +132 -2
- package/dist/site.d.mts.map +1 -1
- package/dist/site.mjs +102 -11
- package/dist/site.mjs.map +1 -1
- package/dist/stages-DaTaoQei.d.cts +73 -0
- package/dist/stages-DaTaoQei.d.cts.map +1 -0
- package/dist/stages-DaTaoQei.d.mts +73 -0
- package/dist/stages-DaTaoQei.d.mts.map +1 -0
- package/dist/subscribers/index.cjs +134 -1
- package/dist/subscribers/index.cjs.map +1 -0
- package/dist/subscribers/index.d.cts +74 -3
- package/dist/subscribers/index.d.cts.map +1 -0
- package/dist/subscribers/index.d.mts +74 -3
- package/dist/subscribers/index.d.mts.map +1 -0
- package/dist/subscribers/index.mjs +132 -2
- package/dist/subscribers/index.mjs.map +1 -0
- package/dist/telemetry-C1oqncFY.d.cts +40 -0
- package/dist/telemetry-C1oqncFY.d.cts.map +1 -0
- package/dist/telemetry-CObow3Dn.d.mts +40 -0
- package/dist/telemetry-CObow3Dn.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 +2 -134
- package/dist/topic/index.d.cts +2 -3
- package/dist/topic/index.d.mts +2 -3
- package/dist/topic/index.mjs +2 -132
- 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/websocket-api-Bg9SowJ5.mjs +1710 -0
- package/dist/websocket-api-Bg9SowJ5.mjs.map +1 -0
- package/dist/websocket-api-CPEzJyDt.d.mts +1201 -0
- package/dist/websocket-api-CPEzJyDt.d.mts.map +1 -0
- package/dist/websocket-api-DkF8Hva-.d.cts +1201 -0
- package/dist/websocket-api-DkF8Hva-.d.cts.map +1 -0
- package/dist/websocket-api-czxhekGG.cjs +1889 -0
- package/dist/websocket-api-czxhekGG.cjs.map +1 -0
- package/dist/websocket-api.cjs +35 -0
- package/dist/websocket-api.d.cts +2 -0
- package/dist/websocket-api.d.mts +2 -0
- package/dist/websocket-api.mjs +3 -0
- package/dist/worker.cjs +174 -32
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.cts +147 -47
- package/dist/worker.d.cts.map +1 -1
- package/dist/worker.d.mts +147 -47
- package/dist/worker.d.mts.map +1 -1
- package/dist/worker.mjs +175 -33
- package/dist/worker.mjs.map +1 -1
- package/package.json +180 -43
- package/dist/Construct-BeYVu_QF.mjs.map +0 -1
- package/dist/Construct-DfbwIntp.d.cts +0 -115
- package/dist/Construct-DfbwIntp.d.cts.map +0 -1
- package/dist/Construct-DqdlARxq.cjs.map +0 -1
- package/dist/Construct-l5aOn_jv.d.mts +0 -115
- package/dist/Construct-l5aOn_jv.d.mts.map +0 -1
- package/dist/Cron-l4Wlz6G9.d.mts.map +0 -1
- package/dist/Cron-zsoSAwZo.d.cts.map +0 -1
- package/dist/CronBuilder-BdnI6lxF.cjs.map +0 -1
- package/dist/CronBuilder-CyT71Nzg.d.cts +0 -41
- package/dist/CronBuilder-CyT71Nzg.d.cts.map +0 -1
- package/dist/CronBuilder-D_0HNBTr.mjs.map +0 -1
- package/dist/CronBuilder-UoNgFe8S.d.mts +0 -41
- package/dist/CronBuilder-UoNgFe8S.d.mts.map +0 -1
- package/dist/Endpoint-BpZHtJ2W.cjs +0 -1689
- package/dist/Endpoint-BpZHtJ2W.cjs.map +0 -1
- package/dist/Endpoint-DBflWAe4.d.cts.map +0 -1
- package/dist/Endpoint-ONsly_dq.mjs +0 -1671
- package/dist/Endpoint-ONsly_dq.mjs.map +0 -1
- package/dist/Endpoint-oS-Fe3d_.d.mts.map +0 -1
- package/dist/EndpointFactory-Bm3aKRdV.mjs.map +0 -1
- package/dist/EndpointFactory-CLvWuHyt.cjs.map +0 -1
- package/dist/HonoEndpointAdaptor-92zavCsV.cjs.map +0 -1
- package/dist/HonoEndpointAdaptor-yYaU7jVJ.mjs.map +0 -1
- package/dist/Queue-D9X6OoON.d.mts.map +0 -1
- package/dist/Queue-DYPB2KWL.d.cts.map +0 -1
- package/dist/Subscriber-C4heaAyO.d.mts +0 -51
- package/dist/Subscriber-C4heaAyO.d.mts.map +0 -1
- package/dist/Subscriber-CotDUELC.d.cts +0 -51
- package/dist/Subscriber-CotDUELC.d.cts.map +0 -1
- package/dist/SubscriberBuilder-BEv0eoHy.d.cts +0 -59
- package/dist/SubscriberBuilder-BEv0eoHy.d.cts.map +0 -1
- package/dist/SubscriberBuilder-C0ZEtGDI.cjs +0 -125
- package/dist/SubscriberBuilder-C0ZEtGDI.cjs.map +0 -1
- package/dist/SubscriberBuilder-h7B_cHMr.mjs +0 -114
- package/dist/SubscriberBuilder-h7B_cHMr.mjs.map +0 -1
- package/dist/SubscriberBuilder-tyH5yTk5.d.mts +0 -59
- package/dist/SubscriberBuilder-tyH5yTk5.d.mts.map +0 -1
- package/dist/Topic-DEVGo0Dm.d.cts +0 -89
- package/dist/Topic-DEVGo0Dm.d.cts.map +0 -1
- package/dist/Topic-zk_6Gthr.d.mts +0 -89
- package/dist/Topic-zk_6Gthr.d.mts.map +0 -1
- package/dist/auth.d.cts.map +0 -1
- package/dist/auth.d.mts.map +0 -1
- package/dist/cache.d.cts.map +0 -1
- package/dist/cache.d.mts.map +0 -1
- package/dist/construct-interface-DPlxfpoS.d.mts.map +0 -1
- package/dist/construct-interface-DgXTJcOD.d.cts.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-B6qCvfmy.cjs.map +0 -1
- package/dist/functions-C53GW2eQ.mjs.map +0 -1
- package/dist/index-B2urf3YI.d.cts +0 -26
- package/dist/index-B2urf3YI.d.cts.map +0 -1
- package/dist/index-C1ZwNOOk.d.cts.map +0 -1
- package/dist/index-Cc4kKPag.d.mts.map +0 -1
- package/dist/index-DMCDvnsM.d.mts +0 -26
- package/dist/index-DMCDvnsM.d.mts.map +0 -1
- package/dist/index-D_frT6MP.d.cts +0 -165
- package/dist/index-D_frT6MP.d.cts.map +0 -1
- package/dist/index-DcyIYbDS.d.mts +0 -165
- package/dist/index-DcyIYbDS.d.mts.map +0 -1
- package/dist/lazyAccessors-BHtcqgz2.mjs +0 -211
- package/dist/lazyAccessors-BHtcqgz2.mjs.map +0 -1
- package/dist/lazyAccessors-Dx9NLwJZ.cjs.map +0 -1
- package/dist/processAudits-BpRlPQMW.mjs.map +0 -1
- package/dist/processAudits-D_2W5x8k.cjs.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/telemetry-DGcFlVpB.d.cts.map +0 -1
- package/dist/telemetry-DGcFlVpB.d.mts.map +0 -1
- package/dist/topic/index.cjs.map +0 -1
- package/dist/topic/index.mjs.map +0 -1
|
@@ -74,6 +74,46 @@ declare namespace StandardSchemaV1 {
|
|
|
74
74
|
/** Infers the output type of a Standard. */
|
|
75
75
|
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
76
76
|
}
|
|
77
|
+
/** The Standard JSON Schema interface. */
|
|
78
|
+
interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
|
|
79
|
+
/** The Standard JSON Schema properties. */
|
|
80
|
+
readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
|
|
81
|
+
}
|
|
82
|
+
declare namespace StandardJSONSchemaV1 {
|
|
83
|
+
/** The Standard JSON Schema properties interface. */
|
|
84
|
+
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
85
|
+
/** Methods for generating the input/output JSON Schema. */
|
|
86
|
+
readonly jsonSchema: StandardJSONSchemaV1.Converter;
|
|
87
|
+
}
|
|
88
|
+
/** The Standard JSON Schema converter interface. */
|
|
89
|
+
interface Converter {
|
|
90
|
+
/** Converts the input type to JSON Schema. May throw if conversion is not supported. */
|
|
91
|
+
readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
|
|
92
|
+
/** Converts the output type to JSON Schema. May throw if conversion is not supported. */
|
|
93
|
+
readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The target version of the generated JSON Schema.
|
|
97
|
+
*
|
|
98
|
+
* It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use. All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
|
|
99
|
+
*
|
|
100
|
+
* The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
|
|
101
|
+
*/
|
|
102
|
+
type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
|
|
103
|
+
/** The options for the input/output methods. */
|
|
104
|
+
interface Options {
|
|
105
|
+
/** Specifies the target version of the generated JSON Schema. Support for all versions is on a best-effort basis. If a given version is not supported, the library should throw. */
|
|
106
|
+
readonly target: Target;
|
|
107
|
+
/** Explicit support for additional vendor-specific parameters, if needed. */
|
|
108
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
109
|
+
}
|
|
110
|
+
/** The Standard types interface. */
|
|
111
|
+
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
|
|
112
|
+
/** Infers the input type of a Standard. */
|
|
113
|
+
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
|
|
114
|
+
/** Infers the output type of a Standard. */
|
|
115
|
+
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
116
|
+
}
|
|
77
117
|
//#endregion
|
|
78
|
-
export { StandardSchemaV1 as t };
|
|
79
|
-
//# sourceMappingURL=index-
|
|
118
|
+
export { StandardSchemaV1 as n, StandardJSONSchemaV1 as t };
|
|
119
|
+
//# sourceMappingURL=index-DdRjYhiJ.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DdRjYhiJ.d.mts","names":[],"sources":["../../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts"],"x_google_ignoreList":[0],"mappings":";;UACU,gBAAgB,iBAAiB,SAAS;;WAEvC,aAAa,gBAAgB,MAAM,OAAO;;kBAErC;;YAEJ,MAAM,iBAAiB,SAAS;;aAE7B;;aAEA;;aAEA,QAAQ,MAAM,OAAO;;;YAGxB,MAAM,iBAAiB,SAAS;;aAE7B,OAAO;;aAEP,QAAQ;;;OAGhB,WAAW,eAAe,mBAAmB,YAAY;;OAEzD,YAAY,eAAe,mBAAmB,YAAY;;;UAGzD,iBAAiB,iBAAiB,SAAS;;WAExC,aAAa,iBAAiB,MAAM,OAAO;;kBAEtC;;YAEJ,MAAM,iBAAiB,SAAS,eAAe,gBAAgB,MAAM,OAAO;;aAEzE,WAAW,gBAAgB,UAAU,iBAAiB,wBAAwB,OAAO,UAAU,QAAQ,OAAO;;;OAGtH,OAAO,UAAU,cAAc,UAAU;;YAEpC,cAAc;;aAEX,OAAO;;aAEP;;YAEH;;aAEG,iBAAiB;;;YAGpB;;aAEG,QAAQ,cAAc;;;YAGzB;;aAEG;;aAEA,OAAO,cAAc,cAAc;;;YAGtC;;aAEG,KAAK;;;YAGR,MAAM,iBAAiB,SAAS,eAAe,gBAAgB,MAAM,OAAO;;OAGjF,WAAW,eAAe,mBAAmB,gBAAgB,WAAW;;OAExE,YAAY,eAAe,mBAAmB,gBAAgB,YAAY;;;UAGzE,qBAAqB,iBAAiB,SAAS;;WAE5C,aAAa,qBAAqB,MAAM,OAAO;;kBAE1C;;YAEJ,MAAM,iBAAiB,SAAS,eAAe,gBAAgB,MAAM,OAAO;;aAEzE,YAAY,qBAAqB;;;YAGpC;;aAEG,QAAQ,SAAS,qBAAqB,YAAY;;aAElD,SAAS,SAAS,qBAAqB,YAAY;;;;;;;;;OAS3D;;YAEK;;aAEG,QAAQ;;aAER,iBAAiB;;;YAGpB,MAAM,iBAAiB,SAAS,eAAe,gBAAgB,MAAM,OAAO;;OAGjF,WAAW,eAAe,mBAAmB,gBAAgB,WAAW;;OAExE,YAAY,eAAe,mBAAmB,gBAAgB,YAAY"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_Construct = require("./Construct-
|
|
2
|
+
const require_Construct = require("./Construct-DorKS0Ua.cjs");
|
|
3
|
+
const require_shutdown = require("./shutdown-BMJmAhSt.cjs");
|
|
3
4
|
exports.Construct = require_Construct.Construct;
|
|
4
5
|
exports.ConstructType = require_Construct.ConstructType;
|
|
6
|
+
exports.onShutdown = require_shutdown.onShutdown;
|
|
7
|
+
exports.runShutdownHooks = require_shutdown.runShutdownHooks;
|
|
5
8
|
exports.sniffService = require_Construct.sniffService;
|
|
6
9
|
exports.snifferContext = require_Construct.snifferContext;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
import { i as snifferContext, n as ConstructType, r as sniffService, t as Construct } from "./Construct-
|
|
1
|
+
import { i as snifferContext, n as ConstructType, r as sniffService, t as Construct } from "./Construct-127M7yrl.cjs";
|
|
2
2
|
import { n as LowerHttpMethod, r as RemoveUndefined, t as HttpMethod } from "./types-DMuSQeLL.cjs";
|
|
3
|
-
import { i as TelemetryResponse, n as TelemetryContext, r as TelemetryRequest, t as Telemetry } from "./
|
|
3
|
+
import { i as TelemetryResponse, n as TelemetryContext, r as TelemetryRequest, t as Telemetry } from "./lambdaTelemetry-8vnmVZQ5.cjs";
|
|
4
|
+
import { a as Stages, i as SeedContext, n as DeployedStage, o as TestStage, r as LocalStage, t as AnyStage } from "./stages-DaTaoQei.cjs";
|
|
4
5
|
import { Service, ServiceRecord } from "@geekmidas/services";
|
|
5
|
-
|
|
6
|
+
//#region src/shutdown.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* What a server releases when it stops: the connections constructs opened.
|
|
9
|
+
*
|
|
10
|
+
* A construct that holds something open — a database's pool — registers how to
|
|
11
|
+
* close it here, and the generated server runs every hook once it has stopped
|
|
12
|
+
* taking requests. Without that, a rolling deploy has the old task and the new
|
|
13
|
+
* one both holding connections until the old process dies.
|
|
14
|
+
*
|
|
15
|
+
* Kept free of any driver import so the server entry can always import it,
|
|
16
|
+
* whether or not the app has a database.
|
|
17
|
+
*/
|
|
18
|
+
type ShutdownHook = () => Promise<void> | void;
|
|
19
|
+
/** Run `hook` when the server shuts down. Returns a function that removes it. */
|
|
20
|
+
export declare function onShutdown(hook: ShutdownHook): () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Run every registered hook, together, and wait for them. A hook that fails is
|
|
23
|
+
* reported to `onError` and does not stop the others.
|
|
24
|
+
*/
|
|
25
|
+
export declare function runShutdownHooks(onError?: (error: unknown) => void): Promise<void>;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { type AnyStage, Construct, ConstructType, type DeployedStage, type HttpMethod, type LocalStage, type LowerHttpMethod, type RemoveUndefined, type SeedContext, type Service, type ServiceRecord, type Stages, type Telemetry, type TelemetryContext, type TelemetryRequest, type TelemetryResponse, type TestStage, sniffService, snifferContext };
|
|
28
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/shutdown.ts"],"mappings":";;;;;;;;;;;;;;;;;KAYK,qBAAqB;;wBAUV,WAAW,MAAM;;;;;wBASX,iBACrB,WAAU,0BACR"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
import { i as snifferContext, n as ConstructType, r as sniffService, t as Construct } from "./Construct-
|
|
1
|
+
import { i as snifferContext, n as ConstructType, r as sniffService, t as Construct } from "./Construct-BMk_CRSD.mjs";
|
|
2
2
|
import { n as LowerHttpMethod, r as RemoveUndefined, t as HttpMethod } from "./types-DMuSQeLL.mjs";
|
|
3
|
-
import { i as TelemetryResponse, n as TelemetryContext, r as TelemetryRequest, t as Telemetry } from "./
|
|
3
|
+
import { i as TelemetryResponse, n as TelemetryContext, r as TelemetryRequest, t as Telemetry } from "./lambdaTelemetry-8vnmVZQ5.mjs";
|
|
4
|
+
import { a as Stages, i as SeedContext, n as DeployedStage, o as TestStage, r as LocalStage, t as AnyStage } from "./stages-DaTaoQei.mjs";
|
|
4
5
|
import { Service, ServiceRecord } from "@geekmidas/services";
|
|
5
|
-
|
|
6
|
+
//#region src/shutdown.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* What a server releases when it stops: the connections constructs opened.
|
|
9
|
+
*
|
|
10
|
+
* A construct that holds something open — a database's pool — registers how to
|
|
11
|
+
* close it here, and the generated server runs every hook once it has stopped
|
|
12
|
+
* taking requests. Without that, a rolling deploy has the old task and the new
|
|
13
|
+
* one both holding connections until the old process dies.
|
|
14
|
+
*
|
|
15
|
+
* Kept free of any driver import so the server entry can always import it,
|
|
16
|
+
* whether or not the app has a database.
|
|
17
|
+
*/
|
|
18
|
+
type ShutdownHook = () => Promise<void> | void;
|
|
19
|
+
/** Run `hook` when the server shuts down. Returns a function that removes it. */
|
|
20
|
+
export declare function onShutdown(hook: ShutdownHook): () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Run every registered hook, together, and wait for them. A hook that fails is
|
|
23
|
+
* reported to `onError` and does not stop the others.
|
|
24
|
+
*/
|
|
25
|
+
export declare function runShutdownHooks(onError?: (error: unknown) => void): Promise<void>;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { type AnyStage, Construct, ConstructType, type DeployedStage, type HttpMethod, type LocalStage, type LowerHttpMethod, type RemoveUndefined, type SeedContext, type Service, type ServiceRecord, type Stages, type Telemetry, type TelemetryContext, type TelemetryRequest, type TelemetryResponse, type TestStage, sniffService, snifferContext };
|
|
28
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/shutdown.ts"],"mappings":";;;;;;;;;;;;;;;;;KAYK,qBAAqB;;wBAUV,WAAW,MAAM;;;;;wBASX,iBACrB,WAAU,0BACR"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { i as snifferContext, n as ConstructType, r as sniffService, t as Construct } from "./Construct-
|
|
2
|
-
|
|
1
|
+
import { i as snifferContext, n as ConstructType, r as sniffService, t as Construct } from "./Construct-CGuc_Ijk.mjs";
|
|
2
|
+
import { n as runShutdownHooks, t as onShutdown } from "./shutdown-C7xa8x9S.mjs";
|
|
3
|
+
export { Construct, ConstructType, onShutdown, runShutdownHooks, sniffService, snifferContext };
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { n as Construct } from "./construct-interface-DugP0E5q.cjs";
|
|
2
|
+
import { t as Cache } from "./cache-CQjMNPrC.cjs";
|
|
3
|
+
import { Service } from "@geekmidas/services";
|
|
4
|
+
import { ConstructName, Declaration, PostgresVersion } from "@geekmidas/manifest";
|
|
5
|
+
import { Kysely, KyselyConfig } from "kysely";
|
|
6
|
+
import "pg";
|
|
7
|
+
//#region src/database/pool.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* End every pool opened, waiting for checked-out connections to come back.
|
|
10
|
+
* For a server's shutdown, after it has stopped taking requests.
|
|
11
|
+
*/
|
|
12
|
+
declare function closeDatabasePools(): Promise<void>;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/database/kysely.d.ts
|
|
15
|
+
/**
|
|
16
|
+
* Everything Kysely takes, plus what this construct declares.
|
|
17
|
+
*
|
|
18
|
+
* `dialect` is omitted because the construct owns it — it is built from the one
|
|
19
|
+
* URL the adapter supplied, which is the whole point of the construct. The rest
|
|
20
|
+
* of `KyselyConfig` (`plugins`, `log`) is the app's business and passes
|
|
21
|
+
* straight through, so anything Kysely adds later arrives without being
|
|
22
|
+
* tracked here.
|
|
23
|
+
*/
|
|
24
|
+
interface KyselyDatabaseBaseOptions extends Omit<KyselyConfig, 'dialect'> {
|
|
25
|
+
/**
|
|
26
|
+
* The schema, pinned on both roles' `search_path`.
|
|
27
|
+
*
|
|
28
|
+
* Defaults to `app` — the role the schema plays, rather than a restatement
|
|
29
|
+
* of the database's own name, which reads correctly beside `auth` and
|
|
30
|
+
* `pgboss` and keeps the application off `public`.
|
|
31
|
+
*/
|
|
32
|
+
schema?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Provision the owner/runtime role split. Defaults to on.
|
|
35
|
+
*
|
|
36
|
+
* Off falls back to the cluster's master credential in both URLs, giving up
|
|
37
|
+
* the DDL/DML split and putting credentials that can drop a table into the
|
|
38
|
+
* function's environment. A deliberate downgrade, not a default.
|
|
39
|
+
*/
|
|
40
|
+
roles?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Extensions to create in this database, as the cluster master, before the
|
|
43
|
+
* first migration — for the ones the owner role a migration runs as may not
|
|
44
|
+
* create (PostGIS is not a trusted extension). They are created in
|
|
45
|
+
* `public`, which joins this database's roles' `search_path`, so their
|
|
46
|
+
* types resolve unqualified.
|
|
47
|
+
*
|
|
48
|
+
* Only attempted: the image has to ship them.
|
|
49
|
+
*/
|
|
50
|
+
extensions?: readonly string[];
|
|
51
|
+
/**
|
|
52
|
+
* End each query run inside a request with a comment naming what ran it —
|
|
53
|
+
* `/*operation='POST /orders',request_id='…'*\/` — so `pg_stat_activity`
|
|
54
|
+
* and the server's logs can tie a query to its endpoint — and, inside a
|
|
55
|
+
* trace, with the query span's `traceparent='00-…'` (sqlcommenter), so
|
|
56
|
+
* they can tie it to the trace too. Defaults to on.
|
|
57
|
+
*/
|
|
58
|
+
queryTags?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Which Postgres the database runs: a major on the stock image, or an image
|
|
62
|
+
* the project names. One or the other, never both — an image's tag already
|
|
63
|
+
* says its major, and a second statement of it is one that can disagree.
|
|
64
|
+
*/
|
|
65
|
+
type PostgresRuntime = {
|
|
66
|
+
/**
|
|
67
|
+
* The Postgres major version to provision, on the stock image.
|
|
68
|
+
*
|
|
69
|
+
* Declared here so one statement reaches every target. It was
|
|
70
|
+
* previously set in two unrelated places — a container tag locally,
|
|
71
|
+
* nothing at all on AWS (so Aurora chose) — which is how local came to
|
|
72
|
+
* run 18 while deployed ran 17.7 with nothing recording the difference.
|
|
73
|
+
*
|
|
74
|
+
* Defaults to {@link DEFAULT_POSTGRES_VERSION}.
|
|
75
|
+
*/
|
|
76
|
+
version?: PostgresVersion;
|
|
77
|
+
image?: never;
|
|
78
|
+
} | {
|
|
79
|
+
/**
|
|
80
|
+
* The container image to run, wherever a target runs one (local,
|
|
81
|
+
* Dokploy), in place of `postgres:<version>`.
|
|
82
|
+
*
|
|
83
|
+
* Yours to choose and used as written: its tag is the major, and it
|
|
84
|
+
* should ship every extension in `extensions`. AWS runs RDS, ignores
|
|
85
|
+
* it, and provisions {@link DEFAULT_POSTGRES_VERSION}.
|
|
86
|
+
*
|
|
87
|
+
* ```ts
|
|
88
|
+
* new KyselyDatabase<GeoDB>('Geo', {
|
|
89
|
+
* image: 'postgis/postgis:18-3.6-alpine',
|
|
90
|
+
* extensions: ['postgis'],
|
|
91
|
+
* });
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
image: string;
|
|
95
|
+
version?: never;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Everything Kysely takes, plus what this construct declares — including
|
|
99
|
+
* which Postgres it runs, as a version or an image.
|
|
100
|
+
*/
|
|
101
|
+
type KyselyDatabaseOptions = KyselyDatabaseBaseOptions & PostgresRuntime;
|
|
102
|
+
/** What makes a construct derived rather than a database in its own right. */
|
|
103
|
+
interface DerivedFrom {
|
|
104
|
+
kind: 'database-reader' | 'database-schema';
|
|
105
|
+
of: string;
|
|
106
|
+
schema?: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @typeParam DB - the database's schema.
|
|
110
|
+
* @typeParam TName - the canonical id. TypeScript has no partial
|
|
111
|
+
* type-argument inference, so `new KyselyDatabase<OrdersDB>('orders')` leaves
|
|
112
|
+
* this at its default and the service key widens to `string`. `db` still types
|
|
113
|
+
* through `.database()`, which infers from the service.
|
|
114
|
+
*/
|
|
115
|
+
declare class KyselyDatabase<DB = unknown, TName extends string = string> implements Construct<TName, Kysely<DB>> {
|
|
116
|
+
private readonly options;
|
|
117
|
+
readonly id: TName;
|
|
118
|
+
readonly service: Service<Uncapitalize<TName>, Kysely<DB>>;
|
|
119
|
+
/**
|
|
120
|
+
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
121
|
+
* build publishes and the key the client reads cannot drift.
|
|
122
|
+
*/
|
|
123
|
+
private readonly config;
|
|
124
|
+
private readonly schemaName;
|
|
125
|
+
private readonly roles;
|
|
126
|
+
private readonly runtime;
|
|
127
|
+
private readonly derivedFrom?;
|
|
128
|
+
constructor(id: ConstructName<TName>, options?: KyselyDatabaseOptions, derivedFrom?: DerivedFrom);
|
|
129
|
+
declare(): Declaration[];
|
|
130
|
+
/**
|
|
131
|
+
* A read-only endpoint on this database.
|
|
132
|
+
*
|
|
133
|
+
* Read-only is enforced by the reader role's grants rather than by which
|
|
134
|
+
* endpoint it resolves to, so falling back to the writer where no replica
|
|
135
|
+
* exists is safe rather than a silently writable connection behind a name
|
|
136
|
+
* that says reader. There is no `writer()`: the database *is* the writer, so
|
|
137
|
+
* a replica can never be reached by accident.
|
|
138
|
+
*
|
|
139
|
+
* The return type is narrower than this class on purpose — see
|
|
140
|
+
* {@link ReadOnlyDatabase}.
|
|
141
|
+
*/
|
|
142
|
+
reader(): ReadOnlyDatabase<DB, `${TName}Reader`>;
|
|
143
|
+
/**
|
|
144
|
+
* A cache that lives in this database.
|
|
145
|
+
*
|
|
146
|
+
* The same strengthening `schema()` is over a second database: `new
|
|
147
|
+
* Cache('Sessions')` says the app caches and leaves where to the deployment,
|
|
148
|
+
* while this says it caches *here* — which is a fact about the application
|
|
149
|
+
* and so belongs in its code.
|
|
150
|
+
*
|
|
151
|
+
* What it buys beyond being explicit: the table's schema and the role that
|
|
152
|
+
* reaches it come from this database rather than from a second convention,
|
|
153
|
+
* and the backend no longer has to guess which database "the database" meant
|
|
154
|
+
* when an app declares two.
|
|
155
|
+
*
|
|
156
|
+
* A cache is not a `KyselyDatabase`, so this returns a `Cache` — the client
|
|
157
|
+
* is a key/value store, not a query builder, and typing it as the parent
|
|
158
|
+
* would be a convenience that lies.
|
|
159
|
+
*/
|
|
160
|
+
cache<TCache extends string = `${TName}Cache`>(id?: ConstructName<TCache>, options?: {
|
|
161
|
+
table?: string;
|
|
162
|
+
}): Cache<TCache>;
|
|
163
|
+
/**
|
|
164
|
+
* A second schema in this database, with its own role(s) and its own URL —
|
|
165
|
+
* so this database's role holds no grant on those tables at all.
|
|
166
|
+
*
|
|
167
|
+
* Typed separately because a tenant has its own tables: the point is that
|
|
168
|
+
* `auth.selectFrom('sessions')` type-checks and
|
|
169
|
+
* `orders.selectFrom('sessions')` does not.
|
|
170
|
+
*/
|
|
171
|
+
schema<TenantDB, TTenant extends string>(id: ConstructName<TTenant>, options?: KyselyDatabaseOptions): KyselyDatabase<TenantDB, TTenant>;
|
|
172
|
+
/**
|
|
173
|
+
* A connection as the *owner* role — the one that may create, alter and drop.
|
|
174
|
+
*
|
|
175
|
+
* A `Service` rather than part of the construct, and deliberately so: a
|
|
176
|
+
* construct is what `.dependsOn()` accepts, and nothing should be able to
|
|
177
|
+
* depend on this. A migrator asks for it by name; a handler cannot ask at
|
|
178
|
+
* all, which is the security property the role split exists for.
|
|
179
|
+
*
|
|
180
|
+
* Falls back to the runtime URL where no owner URL was published — the
|
|
181
|
+
* `roles: false` downgrade, where there is only one credential and it is the
|
|
182
|
+
* cluster master's.
|
|
183
|
+
*/
|
|
184
|
+
get owner(): Service<`${Uncapitalize<TName>}Owner`, Kysely<DB>>;
|
|
185
|
+
/**
|
|
186
|
+
* What this database's clients are built with besides a dialect — the
|
|
187
|
+
* plugins and logging it was declared with.
|
|
188
|
+
*
|
|
189
|
+
* Public so that whatever opens a connection to it outside \`connect()\` —
|
|
190
|
+
* a test's transaction — builds the same client. A test that dropped the
|
|
191
|
+
* plugins would write \`createdAt\` where production writes \`created_at\`.
|
|
192
|
+
*/
|
|
193
|
+
get clientConfig(): Omit<KyselyConfig, 'dialect'>;
|
|
194
|
+
private connect;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* A database you may read through, and derive nothing from.
|
|
198
|
+
*
|
|
199
|
+
* A reader is terminal in the graph, and this is that fact in the type system.
|
|
200
|
+
* `DERIVES_FROM` gives `cache` and `database-schema` no `database-reader`
|
|
201
|
+
* parent, and there is no reader of a reader — so `orders.reader().cache(…)`
|
|
202
|
+
* has always been illegal, but it type-checked and failed later at
|
|
203
|
+
* `assertDerivations`. That is a long way round to learn that a read-only
|
|
204
|
+
* endpoint cannot own a table something writes to.
|
|
205
|
+
*
|
|
206
|
+
* Omitting the three deriving methods rather than making them throw keeps the
|
|
207
|
+
* failure where it costs least: the editor, on the line that wrote it.
|
|
208
|
+
*
|
|
209
|
+
* The result is deliberately not assignable back to `KyselyDatabase` — a
|
|
210
|
+
* reader is not one, and anything that genuinely needs the writer should say
|
|
211
|
+
* so.
|
|
212
|
+
*/
|
|
213
|
+
type ReadOnlyDatabase<DB, TName extends string> = Omit<KyselyDatabase<DB, TName>, 'reader' | 'cache' | 'schema'>;
|
|
214
|
+
//#endregion
|
|
215
|
+
export { closeDatabasePools as a, ReadOnlyDatabase as i, KyselyDatabaseOptions as n, PostgresRuntime as r, KyselyDatabase as t };
|
|
216
|
+
//# sourceMappingURL=kysely-CebjCWTl.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kysely-CebjCWTl.d.cts","names":[],"sources":["../src/database/pool.ts","../src/database/kysely.ts"],"mappings":";;;;;;;;;;;iBAwGsB,sBAAsB;;;;;;;;;;;;UChElC,kCAAkC,KAAK;;;;;;;;EAQhD;;;;;;;;EAQA;;;;;;;;;;EAUA;;;;;;;;EAQA;;;;;;;KAQW;;;;;;;;;;;EAYT,UAAU;EACV;;;;;;;;;;;;;;;;;EAkBA;EACA;;;;;;KAOS,wBAAwB,4BAA4B;;UAGtD;EACT;EACA;EACA;;;;;;;;;cAUY,eAAe,cAAc,0CAC9B,UAAU,OAAO,OAAO;mBAiBjB;WAfT,IAAI;WACJ,SAAS,QAAQ,aAAa,QAAQ,OAAO;;;;;mBAMrC;mBACA;mBACA;mBACA;mBACA;EAEjB,YACC,IAAI,cAAc,QACD,UAAS,uBAC1B,cAAc;EA2Bf,WAAW;;;;;;;;;;;;;EAyDX,UAAU,iBAAiB,OAAO;;;;;;;;;;;;;;;;;;EAyBlC,MAAM,2BAA2B,cAChC,KAAI,cAAc,SAClB;IAAW;MACT,MAAM;;;;;;;;;EAeT,OAAO,UAAU,wBAChB,IAAI,cAAc,UAClB,UAAS,wBACP,eAAe,UAAU;;;;;;;;;;;;;MAoBxB,SAAS,WAAW,aAAa,eAAe,OAAO;;;;;;;;;MAgBvD,gBAAgB,KAAK;UAiBX;;;;;;;;;;;;;;;;;;;KAuCH,iBAAiB,IAAI,wBAAwB,KACxD,eAAe,IAAI"}
|