@geekmidas/constructs 10.0.0-alpha.18 → 10.0.0-alpha.180
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-BcA8F0S-.d.cts} +16 -9
- package/dist/Cron-BcA8F0S-.d.cts.map +1 -0
- package/dist/{Cron-zsoSAwZo.d.cts → Cron-z2CiuQT_.d.mts} +15 -8
- package/dist/Cron-z2CiuQT_.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-BZvo34X2.d.cts +47 -0
- package/dist/CronBuilder-BZvo34X2.d.cts.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-BbgKo8OI.d.mts +47 -0
- package/dist/CronBuilder-BbgKo8OI.d.mts.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-CIDUreMW.d.mts} +104 -23
- package/dist/Endpoint-CIDUreMW.d.mts.map +1 -0
- package/dist/{Endpoint-DBflWAe4.d.cts → Endpoint-COisi9jw.d.cts} +101 -20
- package/dist/Endpoint-COisi9jw.d.cts.map +1 -0
- package/dist/Endpoint-sUOU7uLx.mjs +552 -0
- package/dist/Endpoint-sUOU7uLx.mjs.map +1 -0
- package/dist/{EndpointFactory-Bm3aKRdV.mjs → EndpointFactory-Bzi9Sl7r.mjs} +269 -53
- package/dist/EndpointFactory-Bzi9Sl7r.mjs.map +1 -0
- package/dist/{index-Cc4kKPag.d.mts → EndpointFactory-CIM80WIK.d.mts} +189 -106
- package/dist/EndpointFactory-CIM80WIK.d.mts.map +1 -0
- package/dist/{index-C1ZwNOOk.d.cts → EndpointFactory-CfBg6jJE.d.cts} +187 -104
- package/dist/EndpointFactory-CfBg6jJE.d.cts.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/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-Ci_Cc-WZ.d.mts +129 -0
- package/dist/ObjectSubscriberBuilder-Ci_Cc-WZ.d.mts.map +1 -0
- package/dist/ObjectSubscriberBuilder-DWtLxfAJ.d.cts +129 -0
- package/dist/ObjectSubscriberBuilder-DWtLxfAJ.d.cts.map +1 -0
- package/dist/ProcessorBuilder-CdLwJK4k.d.mts +216 -0
- package/dist/ProcessorBuilder-CdLwJK4k.d.mts.map +1 -0
- package/dist/ProcessorBuilder-ClD7tmEe.d.cts +216 -0
- package/dist/ProcessorBuilder-ClD7tmEe.d.cts.map +1 -0
- package/dist/Queue-9Hh20ZCk.mjs +104 -0
- package/dist/Queue-9Hh20ZCk.mjs.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-W1wueijP.cjs +109 -0
- package/dist/Queue-W1wueijP.cjs.map +1 -0
- package/dist/QueueBuilder-BDcv9B71.cjs +135 -0
- package/dist/QueueBuilder-BDcv9B71.cjs.map +1 -0
- package/dist/QueueBuilder-CjULiiDN.d.mts +75 -0
- package/dist/QueueBuilder-CjULiiDN.d.mts.map +1 -0
- package/dist/QueueBuilder-CrZL8HHs.mjs +118 -0
- package/dist/QueueBuilder-CrZL8HHs.mjs.map +1 -0
- package/dist/QueueBuilder-Dacm9qAv.d.cts +75 -0
- package/dist/QueueBuilder-Dacm9qAv.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-BGoOeCT6.mjs +99 -0
- package/dist/Topic-BGoOeCT6.mjs.map +1 -0
- package/dist/Topic-DLCZBNwK.cjs +104 -0
- package/dist/Topic-DLCZBNwK.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-CutSfNlr.d.mts +274 -0
- package/dist/auth-CutSfNlr.d.mts.map +1 -0
- package/dist/auth-b9ADezz9.d.cts +274 -0
- package/dist/auth-b9ADezz9.d.cts.map +1 -0
- package/dist/auth.cjs +311 -26
- 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 +307 -28
- package/dist/auth.mjs.map +1 -1
- package/dist/cache-9wLNSy3O.d.cts +44 -0
- package/dist/cache-9wLNSy3O.d.cts.map +1 -0
- package/dist/cache-BFPs_CGs.d.mts +44 -0
- package/dist/cache-BFPs_CGs.d.mts.map +1 -0
- package/dist/cache.cjs +4 -20
- 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 +4 -20
- 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-CVoejIpo.d.cts} +79 -8
- package/dist/construct-interface-CVoejIpo.d.cts.map +1 -0
- package/dist/{construct-interface-DgXTJcOD.d.cts → construct-interface-Nw5Dt9AC.d.mts} +79 -8
- package/dist/construct-interface-Nw5Dt9AC.d.mts.map +1 -0
- package/dist/construct-interface.cjs +62 -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 +59 -5
- package/dist/construct-interface.mjs.map +1 -1
- package/dist/credential-B80mOxwT.mjs +222 -0
- package/dist/credential-B80mOxwT.mjs.map +1 -0
- package/dist/credential-RlgbzZAc.cjs +257 -0
- package/dist/credential-RlgbzZAc.cjs.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 +24 -17
- package/dist/email.cjs.map +1 -1
- package/dist/email.d.cts +15 -5
- package/dist/email.d.cts.map +1 -1
- package/dist/email.d.mts +16 -6
- package/dist/email.d.mts.map +1 -1
- package/dist/email.mjs +23 -17
- 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/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-JI5uN1SF.d.cts +201 -0
- package/dist/fake-JI5uN1SF.d.cts.map +1 -0
- package/dist/fake-zpuXpBmY.d.mts +201 -0
- package/dist/fake-zpuXpBmY.d.mts.map +1 -0
- package/dist/file-server.cjs +170 -49
- package/dist/file-server.cjs.map +1 -1
- package/dist/file-server.d.cts +148 -16
- package/dist/file-server.d.cts.map +1 -1
- package/dist/file-server.d.mts +148 -16
- package/dist/file-server.d.mts.map +1 -1
- package/dist/file-server.mjs +168 -51
- 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-CXLU7h_8.d.cts +195 -0
- package/dist/inbox-CXLU7h_8.d.cts.map +1 -0
- package/dist/inbox-DYFsLd9A.d.mts +195 -0
- package/dist/inbox-DYFsLd9A.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-BpE9_6l5.d.mts +115 -0
- package/dist/index-BpE9_6l5.d.mts.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-zRChehJ9.d.cts +115 -0
- package/dist/index-zRChehJ9.d.cts.map +1 -0
- 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-5PAqFBzo.d.mts +216 -0
- package/dist/kysely-5PAqFBzo.d.mts.map +1 -0
- package/dist/kysely-Bc9xzaik.mjs +371 -0
- package/dist/kysely-Bc9xzaik.mjs.map +1 -0
- package/dist/kysely-D7f6J2lh.cjs +384 -0
- package/dist/kysely-D7f6J2lh.cjs.map +1 -0
- package/dist/kysely-lxNUBSTP.d.cts +216 -0
- package/dist/kysely-lxNUBSTP.d.cts.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 +79 -0
- package/dist/mobile-app.cjs.map +1 -0
- package/dist/mobile-app.d.cts +78 -0
- package/dist/mobile-app.d.cts.map +1 -0
- package/dist/mobile-app.d.mts +78 -0
- package/dist/mobile-app.d.mts.map +1 -0
- package/dist/mobile-app.mjs +78 -0
- package/dist/mobile-app.mjs.map +1 -0
- package/dist/object-storage.cjs +50 -7
- package/dist/object-storage.cjs.map +1 -1
- package/dist/object-storage.d.cts +37 -3
- package/dist/object-storage.d.cts.map +1 -1
- package/dist/object-storage.d.mts +37 -3
- package/dist/object-storage.d.mts.map +1 -1
- package/dist/object-storage.mjs +49 -9
- 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/readOnlyStorage-C7bCe-z5.cjs +101 -0
- package/dist/readOnlyStorage-C7bCe-z5.cjs.map +1 -0
- package/dist/readOnlyStorage-DMCeLuS2.mjs +78 -0
- package/dist/readOnlyStorage-DMCeLuS2.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 +100 -73
- package/dist/rest-api.cjs.map +1 -1
- package/dist/rest-api.d.cts +83 -59
- package/dist/rest-api.d.cts.map +1 -1
- package/dist/rest-api.d.mts +83 -59
- package/dist/rest-api.d.mts.map +1 -1
- package/dist/rest-api.mjs +97 -76
- 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 +140 -10
- package/dist/site.cjs.map +1 -1
- package/dist/site.d.cts +156 -3
- package/dist/site.d.cts.map +1 -1
- package/dist/site.d.mts +156 -3
- package/dist/site.d.mts.map +1 -1
- package/dist/site.mjs +120 -13
- 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-BbLyS7ln.d.cts +57 -0
- package/dist/telemetry-BbLyS7ln.d.cts.map +1 -0
- package/dist/telemetry-DWX-qKUh.d.mts +57 -0
- package/dist/telemetry-DWX-qKUh.d.mts.map +1 -0
- package/dist/telemetry.cjs +64 -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 +63 -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-9ndLBolx.d.cts +1207 -0
- package/dist/websocket-api-9ndLBolx.d.cts.map +1 -0
- package/dist/websocket-api-BPPXF79i.d.mts +1207 -0
- package/dist/websocket-api-BPPXF79i.d.mts.map +1 -0
- package/dist/websocket-api-C6LGg9-D.mjs +1716 -0
- package/dist/websocket-api-C6LGg9-D.mjs.map +1 -0
- package/dist/websocket-api-CoKPJJRl.cjs +1895 -0
- package/dist/websocket-api-CoKPJJRl.cjs.map +1 -0
- package/dist/websocket-api.cjs +42 -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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/shutdown.ts
|
|
2
|
+
const key = Symbol.for("@geekmidas/constructs/shutdown");
|
|
3
|
+
const registry = globalThis;
|
|
4
|
+
registry[key] ??= /* @__PURE__ */ new Set();
|
|
5
|
+
const hooks = registry[key];
|
|
6
|
+
/** Run `hook` when the server shuts down. Returns a function that removes it. */
|
|
7
|
+
function onShutdown(hook) {
|
|
8
|
+
hooks.add(hook);
|
|
9
|
+
return () => hooks.delete(hook);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Run every registered hook, together, and wait for them. A hook that fails is
|
|
13
|
+
* reported to `onError` and does not stop the others.
|
|
14
|
+
*/
|
|
15
|
+
async function runShutdownHooks(onError = () => {}) {
|
|
16
|
+
await Promise.all([...hooks].map(async (hook) => {
|
|
17
|
+
try {
|
|
18
|
+
await hook();
|
|
19
|
+
} catch (error) {
|
|
20
|
+
onError(error);
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
Object.defineProperty(exports, "onShutdown", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function() {
|
|
28
|
+
return onShutdown;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "runShutdownHooks", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function() {
|
|
34
|
+
return runShutdownHooks;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=shutdown-BMJmAhSt.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shutdown-BMJmAhSt.cjs","names":[],"sources":["../src/shutdown.ts"],"sourcesContent":["/**\n * What a server releases when it stops: the connections constructs opened.\n *\n * A construct that holds something open — a database's pool — registers how to\n * close it here, and the generated server runs every hook once it has stopped\n * taking requests. Without that, a rolling deploy has the old task and the new\n * one both holding connections until the old process dies.\n *\n * Kept free of any driver import so the server entry can always import it,\n * whether or not the app has a database.\n */\n\ntype ShutdownHook = () => Promise<void> | void;\n\n// On globalThis, as Credentials are: a package loaded twice (ESM and CJS)\n// would otherwise keep two registries, and the server would run the empty one.\nconst key = Symbol.for('@geekmidas/constructs/shutdown');\nconst registry = globalThis as Record<symbol, Set<ShutdownHook> | undefined>;\nregistry[key] ??= new Set<ShutdownHook>();\nconst hooks = registry[key];\n\n/** Run `hook` when the server shuts down. Returns a function that removes it. */\nexport function onShutdown(hook: ShutdownHook): () => void {\n\thooks.add(hook);\n\treturn () => hooks.delete(hook);\n}\n\n/**\n * Run every registered hook, together, and wait for them. A hook that fails is\n * reported to `onError` and does not stop the others.\n */\nexport async function runShutdownHooks(\n\tonError: (error: unknown) => void = () => {},\n): Promise<void> {\n\tawait Promise.all(\n\t\t[...hooks].map(async (hook) => {\n\t\t\ttry {\n\t\t\t\tawait hook();\n\t\t\t} catch (error) {\n\t\t\t\tonError(error);\n\t\t\t}\n\t\t}),\n\t);\n}\n"],"mappings":";AAgBA,MAAM,MAAM,OAAO,IAAI,gCAAgC;AACvD,MAAM,WAAW;AACjB,SAAS,yBAAS,IAAI,IAAkB;AACxC,MAAM,QAAQ,SAAS;;AAGvB,SAAgB,WAAW,MAAgC;CAC1D,MAAM,IAAI,IAAI;CACd,aAAa,MAAM,OAAO,IAAI;AAC/B;;;;;AAMA,eAAsB,iBACrB,gBAA0C,CAAC,GAC3B;CAChB,MAAM,QAAQ,IACb,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,OAAO,SAAS;EAC9B,IAAI;GACH,MAAM,KAAK;EACZ,SAAS,OAAO;GACf,QAAQ,KAAK;EACd;CACD,CAAC,CACF;AACD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/shutdown.ts
|
|
2
|
+
const key = Symbol.for("@geekmidas/constructs/shutdown");
|
|
3
|
+
const registry = globalThis;
|
|
4
|
+
registry[key] ??= /* @__PURE__ */ new Set();
|
|
5
|
+
const hooks = registry[key];
|
|
6
|
+
/** Run `hook` when the server shuts down. Returns a function that removes it. */
|
|
7
|
+
function onShutdown(hook) {
|
|
8
|
+
hooks.add(hook);
|
|
9
|
+
return () => hooks.delete(hook);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Run every registered hook, together, and wait for them. A hook that fails is
|
|
13
|
+
* reported to `onError` and does not stop the others.
|
|
14
|
+
*/
|
|
15
|
+
async function runShutdownHooks(onError = () => {}) {
|
|
16
|
+
await Promise.all([...hooks].map(async (hook) => {
|
|
17
|
+
try {
|
|
18
|
+
await hook();
|
|
19
|
+
} catch (error) {
|
|
20
|
+
onError(error);
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { runShutdownHooks as n, onShutdown as t };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=shutdown-C7xa8x9S.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shutdown-C7xa8x9S.mjs","names":[],"sources":["../src/shutdown.ts"],"sourcesContent":["/**\n * What a server releases when it stops: the connections constructs opened.\n *\n * A construct that holds something open — a database's pool — registers how to\n * close it here, and the generated server runs every hook once it has stopped\n * taking requests. Without that, a rolling deploy has the old task and the new\n * one both holding connections until the old process dies.\n *\n * Kept free of any driver import so the server entry can always import it,\n * whether or not the app has a database.\n */\n\ntype ShutdownHook = () => Promise<void> | void;\n\n// On globalThis, as Credentials are: a package loaded twice (ESM and CJS)\n// would otherwise keep two registries, and the server would run the empty one.\nconst key = Symbol.for('@geekmidas/constructs/shutdown');\nconst registry = globalThis as Record<symbol, Set<ShutdownHook> | undefined>;\nregistry[key] ??= new Set<ShutdownHook>();\nconst hooks = registry[key];\n\n/** Run `hook` when the server shuts down. Returns a function that removes it. */\nexport function onShutdown(hook: ShutdownHook): () => void {\n\thooks.add(hook);\n\treturn () => hooks.delete(hook);\n}\n\n/**\n * Run every registered hook, together, and wait for them. A hook that fails is\n * reported to `onError` and does not stop the others.\n */\nexport async function runShutdownHooks(\n\tonError: (error: unknown) => void = () => {},\n): Promise<void> {\n\tawait Promise.all(\n\t\t[...hooks].map(async (hook) => {\n\t\t\ttry {\n\t\t\t\tawait hook();\n\t\t\t} catch (error) {\n\t\t\t\tonError(error);\n\t\t\t}\n\t\t}),\n\t);\n}\n"],"mappings":";AAgBA,MAAM,MAAM,OAAO,IAAI,gCAAgC;AACvD,MAAM,WAAW;AACjB,SAAS,yBAAS,IAAI,IAAkB;AACxC,MAAM,QAAQ,SAAS;;AAGvB,SAAgB,WAAW,MAAgC;CAC1D,MAAM,IAAI,IAAI;CACd,aAAa,MAAM,OAAO,IAAI;AAC/B;;;;;AAMA,eAAsB,iBACrB,gBAA0C,CAAC,GAC3B;CAChB,MAAM,QAAQ,IACb,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,OAAO,SAAS;EAC9B,IAAI;GACH,MAAM,KAAK;EACZ,SAAS,OAAO;GACf,QAAQ,KAAK;EACd;CACD,CAAC,CACF;AACD"}
|
package/dist/site.cjs
CHANGED
|
@@ -15,26 +15,111 @@ let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
|
15
15
|
* .dependsOn([api, auth]);
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* A site consumes addresses, not connections: it is built, and the values it
|
|
19
|
+
* needs are inlined or fetched by its own framework, so its own edges take any
|
|
20
|
+
* {@link Declarable}. Its `.service` is its public address — what a worker's
|
|
21
|
+
* cron or an endpoint that builds links to it reads:
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* export const digest = worker
|
|
25
|
+
* .cron('rate(1 day)')
|
|
26
|
+
* .dependsOn([web])
|
|
27
|
+
* .handle(async ({ services }) => link(services.web, '/inbox'));
|
|
28
|
+
* ```
|
|
22
29
|
*
|
|
23
30
|
* Only the static variant ships. SSR deploy shapes are unstable and each one is
|
|
24
|
-
* its own maintenance, so they follow rather than arrive together
|
|
25
|
-
*
|
|
26
|
-
*
|
|
31
|
+
* its own maintenance, so they follow rather than arrive together. A mobile app
|
|
32
|
+
* is not a site — it is reached by a scheme, not a URL — and is its own
|
|
33
|
+
* construct: see `MobileApp`.
|
|
34
|
+
*/
|
|
35
|
+
/** `subdomain: '*'` without `hosts`: nothing would say which hosts are tenants. */
|
|
36
|
+
var WildcardSiteNeedsHosts = class extends Error {
|
|
37
|
+
id;
|
|
38
|
+
constructor(id) {
|
|
39
|
+
super(`'${id}' answers on every subdomain, so it has to say which of them are tenants: pass \`hosts\`, a GET endpoint answering 200 for a host it serves and 404 otherwise.`);
|
|
40
|
+
this.id = id;
|
|
41
|
+
this.name = "WildcardSiteNeedsHosts";
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
/** `hosts` on a site with one host, where there is nothing to check. */
|
|
45
|
+
var SiteHostsNeedsWildcard = class extends Error {
|
|
46
|
+
id;
|
|
47
|
+
constructor(id) {
|
|
48
|
+
super(`'${id}' names a \`hosts\` check but answers on one host. Declare \`subdomain: '*'\` to serve every subdomain, or drop \`hosts\`.`);
|
|
49
|
+
this.id = id;
|
|
50
|
+
this.name = "SiteHostsNeedsWildcard";
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
/** A `hosts` endpoint that is not a `GET`: the edge only ever asks with one. */
|
|
54
|
+
var SiteHostsNotGet = class extends Error {
|
|
55
|
+
id;
|
|
56
|
+
method;
|
|
57
|
+
route;
|
|
58
|
+
constructor(id, method, route) {
|
|
59
|
+
super(`'${id}' checks its hosts with ${method} ${route}, but the edge asks with GET ${route}?domain=<host>. Make it a GET endpoint.`);
|
|
60
|
+
this.id = id;
|
|
61
|
+
this.method = method;
|
|
62
|
+
this.route = route;
|
|
63
|
+
this.name = "SiteHostsNotGet";
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* `prerender: 'stage'` on a site that renders its pages on a server, where a
|
|
68
|
+
* page renders on its first request — which the deploy's warm-up makes — and
|
|
69
|
+
* needs no data at build.
|
|
27
70
|
*/
|
|
71
|
+
var PrerenderNeedsStaticSite = class extends Error {
|
|
72
|
+
id;
|
|
73
|
+
variant;
|
|
74
|
+
constructor(id, variant) {
|
|
75
|
+
super(`'${id}' is a '${variant}' site, which renders its pages on its own server, so it never needs its APIs at build: drop \`prerender\`, and render data-backed pages on request (the deploy warms them). \`prerender: 'stage'\` is for a 'static' site that bakes data into its files.`);
|
|
76
|
+
this.id = id;
|
|
77
|
+
this.variant = variant;
|
|
78
|
+
this.name = "PrerenderNeedsStaticSite";
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
/** A wildcard site that says it holds the base domain. */
|
|
82
|
+
var WildcardSiteCannotBeRoot = class extends Error {
|
|
83
|
+
id;
|
|
84
|
+
constructor(id) {
|
|
85
|
+
super(`'${id}' answers on every subdomain, so it cannot also hold the base domain. Drop \`root: true\`, and declare the site the base domain points at separately.`);
|
|
86
|
+
this.id = id;
|
|
87
|
+
this.name = "WildcardSiteCannotBeRoot";
|
|
88
|
+
}
|
|
89
|
+
};
|
|
28
90
|
var StaticSite = class StaticSite {
|
|
29
91
|
config;
|
|
30
92
|
dependencies;
|
|
31
93
|
id;
|
|
32
94
|
keys;
|
|
95
|
+
/**
|
|
96
|
+
* Its public address, `https://web.example.com` — a string, no await. The
|
|
97
|
+
* same `<ID>_URL` on every command and stage, so a link built from it opens
|
|
98
|
+
* in a browser.
|
|
99
|
+
*/
|
|
100
|
+
service;
|
|
33
101
|
constructor(id, config, dependencies = []) {
|
|
34
102
|
this.config = config;
|
|
35
103
|
this.dependencies = dependencies;
|
|
36
104
|
this.id = (0, _geekmidas_manifest.canonicalId)(id);
|
|
37
|
-
this.keys = { url: (0, _geekmidas_manifest.
|
|
105
|
+
this.keys = { url: (0, _geekmidas_manifest.providedKeyFor)(this.id, "site", "url") };
|
|
106
|
+
this.service = {
|
|
107
|
+
serviceName: (0, _geekmidas_manifest.serviceKey)(this.id),
|
|
108
|
+
register: (options) => require_construct_interface.publicUrl(options, this.keys.url)
|
|
109
|
+
};
|
|
110
|
+
const wildcard = config.subdomain === _geekmidas_manifest.WILDCARD_SUBDOMAIN;
|
|
111
|
+
if (wildcard && !config.hosts) throw new WildcardSiteNeedsHosts(this.id);
|
|
112
|
+
if (!wildcard && config.hosts) throw new SiteHostsNeedsWildcard(this.id);
|
|
113
|
+
if (wildcard && config.root) throw new WildcardSiteCannotBeRoot(this.id);
|
|
114
|
+
(0, _geekmidas_manifest.assertHostLabels)({
|
|
115
|
+
id: this.id,
|
|
116
|
+
...config.subdomain ? { subdomain: config.subdomain } : {},
|
|
117
|
+
...config.aliases ? { aliases: config.aliases } : {},
|
|
118
|
+
...config.redirects ? { redirects: config.redirects } : {}
|
|
119
|
+
});
|
|
120
|
+
const variant = config.variant ?? "static";
|
|
121
|
+
if (config.prerender && variant !== "static") throw new PrerenderNeedsStaticSite(this.id, variant);
|
|
122
|
+
if (config.hosts && config.hosts.method.toUpperCase() !== "GET") throw new SiteHostsNotGet(this.id, config.hosts.method, config.hosts.route);
|
|
38
123
|
}
|
|
39
124
|
/**
|
|
40
125
|
* What this site calls.
|
|
@@ -46,15 +131,31 @@ var StaticSite = class StaticSite {
|
|
|
46
131
|
* Takes {@link Declarable} rather than {@link Consumable} because a site's
|
|
47
132
|
* edge is a build-time link and not a service injection — requiring a client
|
|
48
133
|
* would exclude exactly the surfaces a frontend actually depends on.
|
|
134
|
+
*
|
|
135
|
+
* A plain edge to a `FileServer` is to its public face: the site is built
|
|
136
|
+
* with the address its objects are served on, and handed nothing that
|
|
137
|
+
* writes to the bucket. A plain edge to an `ObjectStorage` is to where its
|
|
138
|
+
* links are signed (`<PREFIX><T>_SIGNED_ORIGIN`), and to nothing else of
|
|
139
|
+
* it. `.dependsOn([assets.server])` or `.dependsOn([documents.server])`
|
|
140
|
+
* asks for the bucket and its credentials too, for a server half that
|
|
141
|
+
* uploads or presigns.
|
|
49
142
|
*/
|
|
50
143
|
dependsOn(constructs) {
|
|
51
|
-
return new StaticSite(this.id, this.config, [...this.dependencies, ...constructs.map(require_construct_interface.
|
|
144
|
+
return new StaticSite(this.id, this.config, [...this.dependencies, ...constructs.map(require_construct_interface.frontendEdgeTo)]);
|
|
52
145
|
}
|
|
53
146
|
declare() {
|
|
147
|
+
const { hosts } = this.config;
|
|
54
148
|
return [{
|
|
55
149
|
kind: "site",
|
|
56
150
|
id: this.id,
|
|
57
151
|
variant: this.config.variant ?? "static",
|
|
152
|
+
...this.config.subdomain ? { subdomain: this.config.subdomain } : {},
|
|
153
|
+
...this.config.aliases?.length ? { aliases: [...this.config.aliases] } : {},
|
|
154
|
+
...this.config.redirects?.length ? { redirects: [...this.config.redirects] } : {},
|
|
155
|
+
...hosts ? { hosts: {
|
|
156
|
+
surface: (0, _geekmidas_manifest.canonicalId)(hosts.surface.id),
|
|
157
|
+
path: hosts.route
|
|
158
|
+
} } : {},
|
|
58
159
|
app: {
|
|
59
160
|
path: this.config.path,
|
|
60
161
|
...this.config.port ? { port: this.config.port } : {},
|
|
@@ -62,11 +163,40 @@ var StaticSite = class StaticSite {
|
|
|
62
163
|
},
|
|
63
164
|
...this.config.root ? { root: true } : {},
|
|
64
165
|
dependencies: this.dependencies,
|
|
65
|
-
|
|
166
|
+
...this.config.telemetry ? { telemetry: this.config.telemetry.id } : {},
|
|
167
|
+
...this.config.password ? { password: {
|
|
168
|
+
secret: this.config.password.secret.id,
|
|
169
|
+
stages: [...this.config.password.stages]
|
|
170
|
+
} } : {},
|
|
171
|
+
...this.config.prerender ? { prerender: this.config.prerender } : {},
|
|
172
|
+
provides: [this.keys.url, ...hosts ? [(0, _geekmidas_manifest.providedKeyFor)(this.id, "site", "domain"), (0, _geekmidas_manifest.providedKeyFor)(this.id, "site", "protectedSubdomains")] : []]
|
|
66
173
|
}];
|
|
67
174
|
}
|
|
68
175
|
};
|
|
69
176
|
//#endregion
|
|
177
|
+
Object.defineProperty(exports, "HostLabelBothAliasAndRedirect", {
|
|
178
|
+
enumerable: true,
|
|
179
|
+
get: function() {
|
|
180
|
+
return _geekmidas_manifest.HostLabelBothAliasAndRedirect;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
Object.defineProperty(exports, "InvalidHostLabel", {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get: function() {
|
|
186
|
+
return _geekmidas_manifest.InvalidHostLabel;
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
exports.PrerenderNeedsStaticSite = PrerenderNeedsStaticSite;
|
|
190
|
+
exports.SiteHostsNeedsWildcard = SiteHostsNeedsWildcard;
|
|
191
|
+
exports.SiteHostsNotGet = SiteHostsNotGet;
|
|
70
192
|
exports.StaticSite = StaticSite;
|
|
193
|
+
exports.WildcardSiteCannotBeRoot = WildcardSiteCannotBeRoot;
|
|
194
|
+
Object.defineProperty(exports, "WildcardSiteCannotHaveAliases", {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function() {
|
|
197
|
+
return _geekmidas_manifest.WildcardSiteCannotHaveAliases;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
exports.WildcardSiteNeedsHosts = WildcardSiteNeedsHosts;
|
|
71
201
|
|
|
72
202
|
//# sourceMappingURL=site.cjs.map
|
package/dist/site.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.cjs","names":["canonicalId","provideKey","edgeTo"],"sources":["../src/site.ts"],"sourcesContent":["/**\n * `StaticSite` — a frontend, declared like anything else.\n *\n * The point is not that a site needs provisioning; it is that a site is the\n * *consumer* whose edges make four hand-maintained lists derivable. Declaring it\n * is what turns \"which origins does the API allow\" from something a person keeps\n * in step into something the graph already knows.\n *\n * ```ts\n * export const console = new StaticSite('Console', { path: 'apps/console' })\n * .dependsOn([api, auth]);\n * ```\n *\n * It has no `.service`. A site is not a process that registers clients — it is\n * built, and the values it needs are inlined or fetched by its own framework —\n * so the edge is {@link Declarable} rather than {@link Consumable}, and the\n * asymmetry is the honest one: a site consumes addresses, not connections.\n *\n * Only the static variant ships. SSR deploy shapes are unstable and each one is\n * its own maintenance, so they follow rather than arrive together; Expo and\n * mobile are out of scope entirely, because an app store is not infrastructure\n * and there is no URL to hand anyone.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\tprovideKey,\n\ttype SiteDeclaration,\n} from '@geekmidas/manifest';\nimport { type Declarable, edgeTo } from './construct-interface';\n\n/**\n * Where a site's source lives, and the little else a layout can differ by.\n *\n * Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a\n * complete site.\n */\nexport interface StaticSiteConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/web'`.\n\t *\n\t * Required, the same field `RestApi` and `BetterAuth` take. It was\n\t * inferred from the id, which made a site's home whatever was on disk.\n\t */\n\tpath: string;\n\t/**\n\t * The port it answers on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, so adding a site\n\t * does not renumber the ones already running.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars this site reads.\n\t *\n\t * A frontend's values are inlined at build time, so the build has to know\n\t * which ones it reads before it reads them.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Whether the base domain points at this site.\n\t *\n\t * A project with one site needs this no more than a project with one\n\t * database needs to say which database. It matters when there are several\n\t * and none is called `web`: the base domain then belongs to whichever site\n\t * says so, rather than to whichever file the glob happened to reach first.\n\t */\n\troot?: boolean;\n\t/**\n\t * Which framework builds it.\n\t *\n\t * It selects how values are delivered — `VITE_`, `NEXT_PUBLIC_`, a fetched\n\t * `config.json` — and never which values there are. One neutral name from the\n\t * construct, one serialisation per framework, the same rule as everywhere\n\t * else.\n\t */\n\tvariant?: SiteDeclaration['variant'];\n}\n\nexport class StaticSite<TName extends string = string>\n\timplements Declarable<TName>\n{\n\treadonly id: TName;\n\treadonly keys: { url: string };\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: StaticSiteConfig,\n\t\t/**\n\t\t * Internal: how `.dependsOn()` carries edges into the copy it returns.\n\t\t * Written as a parameter rather than a mutable field so the builder can\n\t\t * stay immutable without a clone method, the same shape\n\t\t * `KyselyDatabase` uses for its derived forms.\n\t\t */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { url: provideKey(this.id, 'url') };\n\t}\n\n\t/**\n\t * What this site calls.\n\t *\n\t * Immutable, like every other builder here: it returns a new site rather than\n\t * mutating this one, so a module that exports both a base and a variant of it\n\t * cannot have the second silently change the first.\n\t *\n\t * Takes {@link Declarable} rather than {@link Consumable} because a site's\n\t * edge is a build-time link and not a service injection — requiring a client\n\t * would exclude exactly the surfaces a frontend actually depends on.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): StaticSite<TName> {\n\t\treturn new StaticSite<TName>(this.id as ConstructName<TName>, this.config, [\n\t\t\t...this.dependencies,\n\t\t\t...constructs.map(edgeTo),\n\t\t]);\n\t}\n\n\tdeclare(): Declaration[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'site',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'static',\n\t\t\t\tapp: {\n\t\t\t\t\tpath: this.config.path,\n\t\t\t\t\t...(this.config.port ? { port: this.config.port } : {}),\n\t\t\t\t\t...(this.config.config ? { config: this.config.config } : {}),\n\t\t\t\t},\n\t\t\t\t...(this.config.root ? { root: true } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\tprovides: [this.keys.url],\n\t\t\t},\n\t\t];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,IAAa,aAAb,MAAa,WAEb;CAMmB;CAOA;CAZlB;CACA;CAEA,YACC,IACA,QAOA,eAAuD,CAAC,GACvD;EARgB,KAAA,SAAA;EAOA,KAAA,eAAA;EAEjB,KAAK,MAAA,GAAKA,oBAAAA,YAAAA,CAAY,EAAY;EAClC,KAAK,OAAO,EAAE,MAAA,GAAKC,oBAAAA,WAAAA,CAAW,KAAK,IAAI,KAAK,EAAE;CAC/C;;;;;;;;;;;;CAaA,UAAU,YAAsD;EAC/D,OAAO,IAAI,WAAkB,KAAK,IAA4B,KAAK,QAAQ,CAC1E,GAAG,KAAK,cACR,GAAG,WAAW,IAAIC,4BAAAA,MAAM,CACzB,CAAC;CACF;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,SAAS,KAAK,OAAO,WAAW;GAChC,KAAK;IACJ,MAAM,KAAK,OAAO;IAClB,GAAI,KAAK,OAAO,OAAO,EAAE,MAAM,KAAK,OAAO,KAAK,IAAI,CAAC;IACrD,GAAI,KAAK,OAAO,SAAS,EAAE,QAAQ,KAAK,OAAO,OAAO,IAAI,CAAC;GAC5D;GACA,GAAI,KAAK,OAAO,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;GACzC,cAAc,KAAK;GACnB,UAAU,CAAC,KAAK,KAAK,GAAG;EACzB,CACD;CACD;AACD"}
|
|
1
|
+
{"version":3,"file":"site.cjs","names":["canonicalId","providedKeyFor","serviceKey","publicUrl","WILDCARD_SUBDOMAIN","frontendEdgeTo"],"sources":["../src/site.ts"],"sourcesContent":["/**\n * `StaticSite` — a frontend, declared like anything else.\n *\n * The point is not that a site needs provisioning; it is that a site is the\n * *consumer* whose edges make four hand-maintained lists derivable. Declaring it\n * is what turns \"which origins does the API allow\" from something a person keeps\n * in step into something the graph already knows.\n *\n * ```ts\n * export const console = new StaticSite('Console', { path: 'apps/console' })\n * .dependsOn([api, auth]);\n * ```\n *\n * A site consumes addresses, not connections: it is built, and the values it\n * needs are inlined or fetched by its own framework, so its own edges take any\n * {@link Declarable}. Its `.service` is its public address — what a worker's\n * cron or an endpoint that builds links to it reads:\n *\n * ```ts\n * export const digest = worker\n * .cron('rate(1 day)')\n * .dependsOn([web])\n * .handle(async ({ services }) => link(services.web, '/inbox'));\n * ```\n *\n * Only the static variant ships. SSR deploy shapes are unstable and each one is\n * its own maintenance, so they follow rather than arrive together. A mobile app\n * is not a site — it is reached by a scheme, not a URL — and is its own\n * construct: see `MobileApp`.\n */\n\nimport {\n\tassertHostLabels,\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\tprovidedKeyFor,\n\ttype SiteDeclaration,\n\tserviceKey,\n\tWILDCARD_SUBDOMAIN,\n} from '@geekmidas/manifest';\n\n/** Thrown at construction for an alias or redirect that cannot be a host label. */\nexport {\n\tHostLabelBothAliasAndRedirect,\n\tInvalidHostLabel,\n\tWildcardSiteCannotHaveAliases,\n} from '@geekmidas/manifest';\n\nimport type { Service } from '@geekmidas/services';\nimport {\n\ttype Construct,\n\ttype Declarable,\n\tfrontendEdgeTo,\n\tpublicUrl,\n} from './construct-interface';\nimport type { RandomPassword } from './random-password';\nimport type { DeployedStage } from './stages';\nimport type { Telemetry } from './telemetry';\n\n/**\n * Where a site's source lives, and the little else a layout can differ by.\n *\n * Only `path` is required: `new StaticSite('Web', { path: 'apps/web' })` is a\n * complete site.\n */\nexport interface StaticSiteConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/web'`.\n\t *\n\t * Required, the same field `RestApi` and `BetterAuth` take. It was\n\t * inferred from the id, which made a site's home whatever was on disk.\n\t */\n\tpath: string;\n\t/**\n\t * The label it answers on under a stage's domain — `api` for\n\t * `api.myapp.com`, from `domains` — and under the project locally,\n\t * `api.myapp.localhost`. Absent, its id kebab-cased.\n\t *\n\t * `'*'` answers on every subdomain nothing else does — one host per\n\t * tenant, `acme.myapp.com` — and then `hosts` names which of them are\n\t * real. Every other app keeps its own host, and a project has at most one\n\t * such site.\n\t */\n\tsubdomain?: string;\n\t/**\n\t * More labels it answers on under the stage's domain, exactly as on its\n\t * own: each a host the site really serves, and an origin every surface it\n\t * depends on trusts. Its own host stays canonical (`<ID>_URL`).\n\t */\n\taliases?: readonly string[];\n\t/**\n\t * Labels that answer with a permanent (301) redirect to its own host,\n\t * path and query kept — `['www']` sends `www.myapp.com` to `myapp.com`.\n\t * Nothing answers on a host unless a construct names it, so there is no\n\t * automatic `www`. Sites only: an API client does not reliably follow a\n\t * redirect on a `POST`.\n\t */\n\tredirects?: readonly string[];\n\t/**\n\t * With `subdomain: '*'`, the route that says which hosts are tenants: an\n\t * exported `GET` endpoint the edge asks before it serves a host,\n\t * `?domain=<host>`, answering `200` for a tenant and `404` otherwise.\n\t *\n\t * It runs without a session and belongs to no public API.\n\t */\n\thosts?: SiteHostsEndpoint;\n\t/**\n\t * The port it answers on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, so adding a site\n\t * does not renumber the ones already running.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars this site reads.\n\t *\n\t * A frontend's values are inlined at build time, so the build has to know\n\t * which ones it reads before it reads them.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Whether the base domain points at this site.\n\t *\n\t * A project with one site needs this no more than a project with one\n\t * database needs to say which database. It matters when there are several\n\t * and none is called `web`: the base domain then belongs to whichever site\n\t * says so, rather than to whichever file the glob happened to reach first.\n\t */\n\troot?: boolean;\n\t/**\n\t * Which framework builds it.\n\t *\n\t * It selects how values are delivered — `VITE_`, `NEXT_PUBLIC_`, a fetched\n\t * `config.json` — and never which values there are. One neutral name from the\n\t * construct, one serialisation per framework, the same rule as everywhere\n\t * else.\n\t */\n\tvariant?: SiteDeclaration['variant'];\n\t/**\n\t * What the site emits — the `Telemetry` construct. An edge to the node and\n\t * nothing more for now: a site is handed none of its server keys, and the\n\t * browser half (propagation from the generated client, then a browser SDK\n\t * exporting through the API) builds on this edge.\n\t */\n\ttelemetry?: Telemetry;\n\t/**\n\t * A login the site is served behind on the stages named, so a staging\n\t * build is not public while it is tried.\n\t *\n\t * ```ts\n\t * export const sitePassword = new RandomPassword('SitePassword');\n\t *\n\t * export const web = new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * password: { secret: sitePassword, stages: ['staging'] },\n\t * });\n\t * ```\n\t *\n\t * The edge asks for it with HTTP basic auth before a request reaches the\n\t * site: the user is the stage's name, the password the `RandomPassword`'s\n\t * value on that stage. Like any `RandomPassword` it is generated on the\n\t * first deploy and kept, and one set by hand wins. It is not an edge — the\n\t * site is handed none of it — so export it from a constructs file of its\n\t * own, as any construct is.\n\t *\n\t * The compose target alone serves it so far; another refuses the stage\n\t * rather than serving it publicly.\n\t */\n\tpassword?: {\n\t\tsecret: RandomPassword;\n\t\tstages: readonly [DeployedStage, ...DeployedStage[]];\n\t};\n\t/**\n\t * `'stage'` for a `static` site that pre-renders data at build time\n\t * (vite-ssg and similar): its build fetches from the APIs it\n\t * `.dependsOn()`, and bakes their answers into its files.\n\t *\n\t * ```ts\n\t * new StaticSite('Web', {\n\t * path: 'apps/web',\n\t * variant: 'static',\n\t * prerender: 'stage',\n\t * }).dependsOn([api]);\n\t * ```\n\t *\n\t * The deploy then builds the site only once those APIs are up and\n\t * healthy on the stage, and the build reaches them at their public\n\t * addresses, as a browser would. Without it, a site is built offline,\n\t * before its stage runs (`GKM_BUILD_OFFLINE=1`), and nothing at runtime\n\t * can fill a page built without its data.\n\t *\n\t * Opt-in, because the image then holds that stage's data: the same commit\n\t * builds a different image per stage, and `gkm compose --build --push`\n\t * needs the stage it builds for already running.\n\t */\n\tprerender?: 'stage';\n}\n\n/**\n * The shape of the endpoint `hosts` names — read structurally, so a site\n * module never loads the endpoint machinery to say which route it means.\n */\nexport interface SiteHostsEndpoint {\n\troute: string;\n\tmethod: string;\n\tsurface: { id: string };\n}\n\n/** `subdomain: '*'` without `hosts`: nothing would say which hosts are tenants. */\nexport class WildcardSiteNeedsHosts extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it has to say which of them ` +\n\t\t\t\t`are tenants: pass \\`hosts\\`, a GET endpoint answering 200 for a ` +\n\t\t\t\t`host it serves and 404 otherwise.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteNeedsHosts';\n\t}\n}\n\n/** `hosts` on a site with one host, where there is nothing to check. */\nexport class SiteHostsNeedsWildcard extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' names a \\`hosts\\` check but answers on one host. ` +\n\t\t\t\t`Declare \\`subdomain: '*'\\` to serve every subdomain, or drop \\`hosts\\`.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNeedsWildcard';\n\t}\n}\n\n/** A `hosts` endpoint that is not a `GET`: the edge only ever asks with one. */\nexport class SiteHostsNotGet extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly method: string,\n\t\treadonly route: string,\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' checks its hosts with ${method} ${route}, but the edge asks ` +\n\t\t\t\t`with GET ${route}?domain=<host>. Make it a GET endpoint.`,\n\t\t);\n\t\tthis.name = 'SiteHostsNotGet';\n\t}\n}\n\n/**\n * `prerender: 'stage'` on a site that renders its pages on a server, where a\n * page renders on its first request — which the deploy's warm-up makes — and\n * needs no data at build.\n */\nexport class PrerenderNeedsStaticSite extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly variant: SiteDeclaration['variant'],\n\t) {\n\t\tsuper(\n\t\t\t`'${id}' is a '${variant}' site, which renders its pages on its own ` +\n\t\t\t\t`server, so it never needs its APIs at build: drop \\`prerender\\`, ` +\n\t\t\t\t`and render data-backed pages on request (the deploy warms them). ` +\n\t\t\t\t`\\`prerender: 'stage'\\` is for a 'static' site that bakes data into ` +\n\t\t\t\t`its files.`,\n\t\t);\n\t\tthis.name = 'PrerenderNeedsStaticSite';\n\t}\n}\n\n/** A wildcard site that says it holds the base domain. */\nexport class WildcardSiteCannotBeRoot extends Error {\n\tconstructor(readonly id: string) {\n\t\tsuper(\n\t\t\t`'${id}' answers on every subdomain, so it cannot also hold the base ` +\n\t\t\t\t`domain. Drop \\`root: true\\`, and declare the site the base domain ` +\n\t\t\t\t`points at separately.`,\n\t\t);\n\t\tthis.name = 'WildcardSiteCannotBeRoot';\n\t}\n}\n\nexport class StaticSite<TName extends string = string>\n\timplements Declarable<TName>, Construct<TName, string>\n{\n\treadonly id: TName;\n\treadonly keys: { url: string };\n\n\t/**\n\t * Its public address, `https://web.example.com` — a string, no await. The\n\t * same `<ID>_URL` on every command and stage, so a link built from it opens\n\t * in a browser.\n\t */\n\treadonly service: Service<Uncapitalize<TName>, string>;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: StaticSiteConfig,\n\t\t/**\n\t\t * Internal: how `.dependsOn()` carries edges into the copy it returns.\n\t\t * Written as a parameter rather than a mutable field so the builder can\n\t\t * stay immutable without a clone method, the same shape\n\t\t * `KyselyDatabase` uses for its derived forms.\n\t\t */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { url: providedKeyFor(this.id, 'site', 'url') };\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(this.id) as Uncapitalize<TName>,\n\t\t\tregister: (options) => publicUrl(options, this.keys.url),\n\t\t};\n\n\t\tconst wildcard = config.subdomain === WILDCARD_SUBDOMAIN;\n\t\tif (wildcard && !config.hosts) throw new WildcardSiteNeedsHosts(this.id);\n\t\tif (!wildcard && config.hosts) throw new SiteHostsNeedsWildcard(this.id);\n\t\tif (wildcard && config.root) throw new WildcardSiteCannotBeRoot(this.id);\n\t\tassertHostLabels({\n\t\t\tid: this.id,\n\t\t\t...(config.subdomain ? { subdomain: config.subdomain } : {}),\n\t\t\t...(config.aliases ? { aliases: config.aliases } : {}),\n\t\t\t...(config.redirects ? { redirects: config.redirects } : {}),\n\t\t});\n\t\tconst variant = config.variant ?? 'static';\n\t\tif (config.prerender && variant !== 'static') {\n\t\t\tthrow new PrerenderNeedsStaticSite(this.id, variant);\n\t\t}\n\t\tif (config.hosts && config.hosts.method.toUpperCase() !== 'GET') {\n\t\t\tthrow new SiteHostsNotGet(\n\t\t\t\tthis.id,\n\t\t\t\tconfig.hosts.method,\n\t\t\t\tconfig.hosts.route,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * What this site calls.\n\t *\n\t * Immutable, like every other builder here: it returns a new site rather than\n\t * mutating this one, so a module that exports both a base and a variant of it\n\t * cannot have the second silently change the first.\n\t *\n\t * Takes {@link Declarable} rather than {@link Consumable} because a site's\n\t * edge is a build-time link and not a service injection — requiring a client\n\t * would exclude exactly the surfaces a frontend actually depends on.\n\t *\n\t * A plain edge to a `FileServer` is to its public face: the site is built\n\t * with the address its objects are served on, and handed nothing that\n\t * writes to the bucket. A plain edge to an `ObjectStorage` is to where its\n\t * links are signed (`<PREFIX><T>_SIGNED_ORIGIN`), and to nothing else of\n\t * it. `.dependsOn([assets.server])` or `.dependsOn([documents.server])`\n\t * asks for the bucket and its credentials too, for a server half that\n\t * uploads or presigns.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): StaticSite<TName> {\n\t\treturn new StaticSite<TName>(this.id as ConstructName<TName>, this.config, [\n\t\t\t...this.dependencies,\n\t\t\t...constructs.map(frontendEdgeTo),\n\t\t]);\n\t}\n\n\tdeclare(): Declaration[] {\n\t\tconst { hosts } = this.config;\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'site',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'static',\n\t\t\t\t...(this.config.subdomain ? { subdomain: this.config.subdomain } : {}),\n\t\t\t\t...(this.config.aliases?.length\n\t\t\t\t\t? { aliases: [...this.config.aliases] }\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.redirects?.length\n\t\t\t\t\t? { redirects: [...this.config.redirects] }\n\t\t\t\t\t: {}),\n\t\t\t\t...(hosts\n\t\t\t\t\t? {\n\t\t\t\t\t\t\thosts: {\n\t\t\t\t\t\t\t\tsurface: canonicalId(hosts.surface.id),\n\t\t\t\t\t\t\t\tpath: hosts.route,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\tapp: {\n\t\t\t\t\tpath: this.config.path,\n\t\t\t\t\t...(this.config.port ? { port: this.config.port } : {}),\n\t\t\t\t\t...(this.config.config ? { config: this.config.config } : {}),\n\t\t\t\t},\n\t\t\t\t...(this.config.root ? { root: true } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\t...(this.config.telemetry\n\t\t\t\t\t? { telemetry: this.config.telemetry.id }\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.password\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tpassword: {\n\t\t\t\t\t\t\t\tsecret: this.config.password.secret.id,\n\t\t\t\t\t\t\t\tstages: [...this.config.password.stages],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t\t...(this.config.prerender ? { prerender: this.config.prerender } : {}),\n\t\t\t\tprovides: [\n\t\t\t\t\tthis.keys.url,\n\t\t\t\t\t...(hosts\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\tprovidedKeyFor(this.id, 'site', 'domain'),\n\t\t\t\t\t\t\t\tprovidedKeyFor(this.id, 'site', 'protectedSubdomains'),\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: []),\n\t\t\t\t],\n\t\t\t},\n\t\t];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmNA,IAAa,yBAAb,cAA4C,MAAM;CAC5B;CAArB,YAAY,IAAqB;EAChC,MACC,IAAI,GAAG,+JAGR;EALoB,KAAA,KAAA;EAMpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,yBAAb,cAA4C,MAAM;CAC5B;CAArB,YAAY,IAAqB;EAChC,MACC,IAAI,GAAG,2HAER;EAJoB,KAAA,KAAA;EAKpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,kBAAb,cAAqC,MAAM;CAEhC;CACA;CACA;CAHV,YACC,IACA,QACA,OACC;EACD,MACC,IAAI,GAAG,0BAA0B,OAAO,GAAG,MAAM,+BACpC,MAAM,wCACpB;EAPS,KAAA,KAAA;EACA,KAAA,SAAA;EACA,KAAA,QAAA;EAMT,KAAK,OAAO;CACb;AACD;;;;;;AAOA,IAAa,2BAAb,cAA8C,MAAM;CAEzC;CACA;CAFV,YACC,IACA,SACC;EACD,MACC,IAAI,GAAG,UAAU,QAAQ,2PAK1B;EATS,KAAA,KAAA;EACA,KAAA,UAAA;EAST,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,2BAAb,cAA8C,MAAM;CAC9B;CAArB,YAAY,IAAqB;EAChC,MACC,IAAI,GAAG,sJAGR;EALoB,KAAA,KAAA;EAMpB,KAAK,OAAO;CACb;AACD;AAEA,IAAa,aAAb,MAAa,WAEb;CAamB;CAOA;CAnBlB;CACA;;;;;;CAOA;CAEA,YACC,IACA,QAOA,eAAuD,CAAC,GACvD;EARgB,KAAA,SAAA;EAOA,KAAA,eAAA;EAEjB,KAAK,MAAA,GAAKA,oBAAAA,YAAAA,CAAY,EAAY;EAClC,KAAK,OAAO,EAAE,MAAA,GAAKC,oBAAAA,eAAAA,CAAe,KAAK,IAAI,QAAQ,KAAK,EAAE;EAE1D,KAAK,UAAU;GACd,cAAA,GAAaC,oBAAAA,WAAAA,CAAW,KAAK,EAAE;GAC/B,WAAW,YAAYC,4BAAAA,UAAU,SAAS,KAAK,KAAK,GAAG;EACxD;EAEA,MAAM,WAAW,OAAO,cAAcC,oBAAAA;EACtC,IAAI,YAAY,CAAC,OAAO,OAAO,MAAM,IAAI,uBAAuB,KAAK,EAAE;EACvE,IAAI,CAAC,YAAY,OAAO,OAAO,MAAM,IAAI,uBAAuB,KAAK,EAAE;EACvE,IAAI,YAAY,OAAO,MAAM,MAAM,IAAI,yBAAyB,KAAK,EAAE;EACvE,CAAA,GAAA,oBAAA,iBAAA,CAAiB;GAChB,IAAI,KAAK;GACT,GAAI,OAAO,YAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;GAC1D,GAAI,OAAO,UAAU,EAAE,SAAS,OAAO,QAAQ,IAAI,CAAC;GACpD,GAAI,OAAO,YAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;EAC3D,CAAC;EACD,MAAM,UAAU,OAAO,WAAW;EAClC,IAAI,OAAO,aAAa,YAAY,UACnC,MAAM,IAAI,yBAAyB,KAAK,IAAI,OAAO;EAEpD,IAAI,OAAO,SAAS,OAAO,MAAM,OAAO,YAAY,MAAM,OACzD,MAAM,IAAI,gBACT,KAAK,IACL,OAAO,MAAM,QACb,OAAO,MAAM,KACd;CAEF;;;;;;;;;;;;;;;;;;;;CAqBA,UAAU,YAAsD;EAC/D,OAAO,IAAI,WAAkB,KAAK,IAA4B,KAAK,QAAQ,CAC1E,GAAG,KAAK,cACR,GAAG,WAAW,IAAIC,4BAAAA,cAAc,CACjC,CAAC;CACF;CAEA,UAAyB;EACxB,MAAM,EAAE,UAAU,KAAK;EACvB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,SAAS,KAAK,OAAO,WAAW;GAChC,GAAI,KAAK,OAAO,YAAY,EAAE,WAAW,KAAK,OAAO,UAAU,IAAI,CAAC;GACpE,GAAI,KAAK,OAAO,SAAS,SACtB,EAAE,SAAS,CAAC,GAAG,KAAK,OAAO,OAAO,EAAE,IACpC,CAAC;GACJ,GAAI,KAAK,OAAO,WAAW,SACxB,EAAE,WAAW,CAAC,GAAG,KAAK,OAAO,SAAS,EAAE,IACxC,CAAC;GACJ,GAAI,QACD,EACA,OAAO;IACN,UAAA,GAASL,oBAAAA,YAAAA,CAAY,MAAM,QAAQ,EAAE;IACrC,MAAM,MAAM;GACb,EACD,IACC,CAAC;GACJ,KAAK;IACJ,MAAM,KAAK,OAAO;IAClB,GAAI,KAAK,OAAO,OAAO,EAAE,MAAM,KAAK,OAAO,KAAK,IAAI,CAAC;IACrD,GAAI,KAAK,OAAO,SAAS,EAAE,QAAQ,KAAK,OAAO,OAAO,IAAI,CAAC;GAC5D;GACA,GAAI,KAAK,OAAO,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;GACzC,cAAc,KAAK;GACnB,GAAI,KAAK,OAAO,YACb,EAAE,WAAW,KAAK,OAAO,UAAU,GAAG,IACtC,CAAC;GACJ,GAAI,KAAK,OAAO,WACb,EACA,UAAU;IACT,QAAQ,KAAK,OAAO,SAAS,OAAO;IACpC,QAAQ,CAAC,GAAG,KAAK,OAAO,SAAS,MAAM;GACxC,EACD,IACC,CAAC;GACJ,GAAI,KAAK,OAAO,YAAY,EAAE,WAAW,KAAK,OAAO,UAAU,IAAI,CAAC;GACpE,UAAU,CACT,KAAK,KAAK,KACV,GAAI,QACD,EAAA,GACAC,oBAAAA,eAAAA,CAAe,KAAK,IAAI,QAAQ,QAAQ,IAAA,GACxCA,oBAAAA,eAAAA,CAAe,KAAK,IAAI,QAAQ,qBAAqB,CACtD,IACC,CAAC,CACL;EACD,CACD;CACD;AACD"}
|
package/dist/site.d.cts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as Declarable, n as Construct } from "./construct-interface-CVoejIpo.cjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-BbLyS7ln.cjs";
|
|
3
|
+
import { n as DeployedStage } from "./stages-DaTaoQei.cjs";
|
|
4
|
+
import { RandomPassword } from "./random-password.cjs";
|
|
5
|
+
import { Service } from "@geekmidas/services";
|
|
6
|
+
import { ConstructName, Declaration, Dependency, HostLabelBothAliasAndRedirect, InvalidHostLabel, SiteDeclaration, WildcardSiteCannotHaveAliases } from "@geekmidas/manifest";
|
|
3
7
|
//#region src/site.d.ts
|
|
4
8
|
/**
|
|
5
9
|
* Where a site's source lives, and the little else a layout can differ by.
|
|
@@ -15,6 +19,39 @@ export interface StaticSiteConfig {
|
|
|
15
19
|
* inferred from the id, which made a site's home whatever was on disk.
|
|
16
20
|
*/
|
|
17
21
|
path: string;
|
|
22
|
+
/**
|
|
23
|
+
* The label it answers on under a stage's domain — `api` for
|
|
24
|
+
* `api.myapp.com`, from `domains` — and under the project locally,
|
|
25
|
+
* `api.myapp.localhost`. Absent, its id kebab-cased.
|
|
26
|
+
*
|
|
27
|
+
* `'*'` answers on every subdomain nothing else does — one host per
|
|
28
|
+
* tenant, `acme.myapp.com` — and then `hosts` names which of them are
|
|
29
|
+
* real. Every other app keeps its own host, and a project has at most one
|
|
30
|
+
* such site.
|
|
31
|
+
*/
|
|
32
|
+
subdomain?: string;
|
|
33
|
+
/**
|
|
34
|
+
* More labels it answers on under the stage's domain, exactly as on its
|
|
35
|
+
* own: each a host the site really serves, and an origin every surface it
|
|
36
|
+
* depends on trusts. Its own host stays canonical (`<ID>_URL`).
|
|
37
|
+
*/
|
|
38
|
+
aliases?: readonly string[];
|
|
39
|
+
/**
|
|
40
|
+
* Labels that answer with a permanent (301) redirect to its own host,
|
|
41
|
+
* path and query kept — `['www']` sends `www.myapp.com` to `myapp.com`.
|
|
42
|
+
* Nothing answers on a host unless a construct names it, so there is no
|
|
43
|
+
* automatic `www`. Sites only: an API client does not reliably follow a
|
|
44
|
+
* redirect on a `POST`.
|
|
45
|
+
*/
|
|
46
|
+
redirects?: readonly string[];
|
|
47
|
+
/**
|
|
48
|
+
* With `subdomain: '*'`, the route that says which hosts are tenants: an
|
|
49
|
+
* exported `GET` endpoint the edge asks before it serves a host,
|
|
50
|
+
* `?domain=<host>`, answering `200` for a tenant and `404` otherwise.
|
|
51
|
+
*
|
|
52
|
+
* It runs without a session and belongs to no public API.
|
|
53
|
+
*/
|
|
54
|
+
hosts?: SiteHostsEndpoint;
|
|
18
55
|
/**
|
|
19
56
|
* The port it answers on locally.
|
|
20
57
|
*
|
|
@@ -50,8 +87,109 @@ export interface StaticSiteConfig {
|
|
|
50
87
|
* else.
|
|
51
88
|
*/
|
|
52
89
|
variant?: SiteDeclaration['variant'];
|
|
90
|
+
/**
|
|
91
|
+
* What the site emits — the `Telemetry` construct. An edge to the node and
|
|
92
|
+
* nothing more for now: a site is handed none of its server keys, and the
|
|
93
|
+
* browser half (propagation from the generated client, then a browser SDK
|
|
94
|
+
* exporting through the API) builds on this edge.
|
|
95
|
+
*/
|
|
96
|
+
telemetry?: Telemetry;
|
|
97
|
+
/**
|
|
98
|
+
* A login the site is served behind on the stages named, so a staging
|
|
99
|
+
* build is not public while it is tried.
|
|
100
|
+
*
|
|
101
|
+
* ```ts
|
|
102
|
+
* export const sitePassword = new RandomPassword('SitePassword');
|
|
103
|
+
*
|
|
104
|
+
* export const web = new StaticSite('Web', {
|
|
105
|
+
* path: 'apps/web',
|
|
106
|
+
* password: { secret: sitePassword, stages: ['staging'] },
|
|
107
|
+
* });
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* The edge asks for it with HTTP basic auth before a request reaches the
|
|
111
|
+
* site: the user is the stage's name, the password the `RandomPassword`'s
|
|
112
|
+
* value on that stage. Like any `RandomPassword` it is generated on the
|
|
113
|
+
* first deploy and kept, and one set by hand wins. It is not an edge — the
|
|
114
|
+
* site is handed none of it — so export it from a constructs file of its
|
|
115
|
+
* own, as any construct is.
|
|
116
|
+
*
|
|
117
|
+
* The compose target alone serves it so far; another refuses the stage
|
|
118
|
+
* rather than serving it publicly.
|
|
119
|
+
*/
|
|
120
|
+
password?: {
|
|
121
|
+
secret: RandomPassword;
|
|
122
|
+
stages: readonly [DeployedStage, ...DeployedStage[]];
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* `'stage'` for a `static` site that pre-renders data at build time
|
|
126
|
+
* (vite-ssg and similar): its build fetches from the APIs it
|
|
127
|
+
* `.dependsOn()`, and bakes their answers into its files.
|
|
128
|
+
*
|
|
129
|
+
* ```ts
|
|
130
|
+
* new StaticSite('Web', {
|
|
131
|
+
* path: 'apps/web',
|
|
132
|
+
* variant: 'static',
|
|
133
|
+
* prerender: 'stage',
|
|
134
|
+
* }).dependsOn([api]);
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* The deploy then builds the site only once those APIs are up and
|
|
138
|
+
* healthy on the stage, and the build reaches them at their public
|
|
139
|
+
* addresses, as a browser would. Without it, a site is built offline,
|
|
140
|
+
* before its stage runs (`GKM_BUILD_OFFLINE=1`), and nothing at runtime
|
|
141
|
+
* can fill a page built without its data.
|
|
142
|
+
*
|
|
143
|
+
* Opt-in, because the image then holds that stage's data: the same commit
|
|
144
|
+
* builds a different image per stage, and `gkm compose --build --push`
|
|
145
|
+
* needs the stage it builds for already running.
|
|
146
|
+
*/
|
|
147
|
+
prerender?: 'stage';
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The shape of the endpoint `hosts` names — read structurally, so a site
|
|
151
|
+
* module never loads the endpoint machinery to say which route it means.
|
|
152
|
+
*/
|
|
153
|
+
export interface SiteHostsEndpoint {
|
|
154
|
+
route: string;
|
|
155
|
+
method: string;
|
|
156
|
+
surface: {
|
|
157
|
+
id: string;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/** `subdomain: '*'` without `hosts`: nothing would say which hosts are tenants. */
|
|
161
|
+
export declare class WildcardSiteNeedsHosts extends Error {
|
|
162
|
+
readonly id: string;
|
|
163
|
+
constructor(id: string);
|
|
53
164
|
}
|
|
54
|
-
|
|
165
|
+
/** `hosts` on a site with one host, where there is nothing to check. */
|
|
166
|
+
export declare class SiteHostsNeedsWildcard extends Error {
|
|
167
|
+
readonly id: string;
|
|
168
|
+
constructor(id: string);
|
|
169
|
+
}
|
|
170
|
+
/** A `hosts` endpoint that is not a `GET`: the edge only ever asks with one. */
|
|
171
|
+
export declare class SiteHostsNotGet extends Error {
|
|
172
|
+
readonly id: string;
|
|
173
|
+
readonly method: string;
|
|
174
|
+
readonly route: string;
|
|
175
|
+
constructor(id: string, method: string, route: string);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* `prerender: 'stage'` on a site that renders its pages on a server, where a
|
|
179
|
+
* page renders on its first request — which the deploy's warm-up makes — and
|
|
180
|
+
* needs no data at build.
|
|
181
|
+
*/
|
|
182
|
+
export declare class PrerenderNeedsStaticSite extends Error {
|
|
183
|
+
readonly id: string;
|
|
184
|
+
readonly variant: SiteDeclaration['variant'];
|
|
185
|
+
constructor(id: string, variant: SiteDeclaration['variant']);
|
|
186
|
+
}
|
|
187
|
+
/** A wildcard site that says it holds the base domain. */
|
|
188
|
+
export declare class WildcardSiteCannotBeRoot extends Error {
|
|
189
|
+
readonly id: string;
|
|
190
|
+
constructor(id: string);
|
|
191
|
+
}
|
|
192
|
+
export declare class StaticSite<TName extends string = string> implements Declarable<TName>, Construct<TName, string> {
|
|
55
193
|
private readonly config;
|
|
56
194
|
/**
|
|
57
195
|
* Internal: how `.dependsOn()` carries edges into the copy it returns.
|
|
@@ -64,6 +202,12 @@ export declare class StaticSite<TName extends string = string> implements Declar
|
|
|
64
202
|
readonly keys: {
|
|
65
203
|
url: string;
|
|
66
204
|
};
|
|
205
|
+
/**
|
|
206
|
+
* Its public address, `https://web.example.com` — a string, no await. The
|
|
207
|
+
* same `<ID>_URL` on every command and stage, so a link built from it opens
|
|
208
|
+
* in a browser.
|
|
209
|
+
*/
|
|
210
|
+
readonly service: Service<Uncapitalize<TName>, string>;
|
|
67
211
|
constructor(id: ConstructName<TName>, config: StaticSiteConfig,
|
|
68
212
|
/**
|
|
69
213
|
* Internal: how `.dependsOn()` carries edges into the copy it returns.
|
|
@@ -82,9 +226,18 @@ export declare class StaticSite<TName extends string = string> implements Declar
|
|
|
82
226
|
* Takes {@link Declarable} rather than {@link Consumable} because a site's
|
|
83
227
|
* edge is a build-time link and not a service injection — requiring a client
|
|
84
228
|
* would exclude exactly the surfaces a frontend actually depends on.
|
|
229
|
+
*
|
|
230
|
+
* A plain edge to a `FileServer` is to its public face: the site is built
|
|
231
|
+
* with the address its objects are served on, and handed nothing that
|
|
232
|
+
* writes to the bucket. A plain edge to an `ObjectStorage` is to where its
|
|
233
|
+
* links are signed (`<PREFIX><T>_SIGNED_ORIGIN`), and to nothing else of
|
|
234
|
+
* it. `.dependsOn([assets.server])` or `.dependsOn([documents.server])`
|
|
235
|
+
* asks for the bucket and its credentials too, for a server half that
|
|
236
|
+
* uploads or presigns.
|
|
85
237
|
*/
|
|
86
238
|
dependsOn(constructs: readonly Declarable[]): StaticSite<TName>;
|
|
87
239
|
declare(): Declaration[];
|
|
88
240
|
}
|
|
89
241
|
//#endregion
|
|
242
|
+
export { HostLabelBothAliasAndRedirect, InvalidHostLabel, WildcardSiteCannotHaveAliases };
|
|
90
243
|
//# sourceMappingURL=site.d.cts.map
|
package/dist/site.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.cts","names":[],"sources":["../src/site.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"site.d.cts","names":[],"sources":["../src/site.ts"],"mappings":";;;;;;;;;;;;;iBAmEiB;;;;;;;EAOhB;;;;;;;;;;;EAWA;;;;;;EAMA;;;;;;;;EAQA;;;;;;;;EAQA,QAAQ;;;;;;;EAOR;;;;;;;EAOA;IAAW;IAAiB;;;;;;;;;;EAS5B;;;;;;;;;EASA,UAAU;;;;;;;EAOV,YAAY;;;;;;;;;;;;;;;;;;;;;;;;EAwBZ;IACC,QAAQ;IACR,kBAAkB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;EAyBrC;;;;;;iBAOgB;EAChB;EACA;EACA;IAAW;;;;qBAIC,+BAA+B;WACtB;EAArB,YAAqB;;;qBAWT,+BAA+B;WACtB;EAArB,YAAqB;;;qBAUT,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,YACA,gBACA;;;;;;;qBAeE,iCAAiC;WAEnC;WACA,SAAS;EAFnB,YACU,YACA,SAAS;;;qBAcP,iCAAiC;WACxB;EAArB,YAAqB;;qBAUT,WAAW,0CACZ,WAAW,QAAQ,UAAU;mBActB;;;;;;;mBAOA;WAnBT,IAAI;WACJ;IAAQ;;;;;;;WAOR,SAAS,QAAQ,aAAa;EAEvC,YACC,IAAI,cAAc,QACD,QAAQ,kBAOR;;;;;;;EAAA,wBAAuB;;;;;;;;;;;;;;;;;;;;EAoDzC,UAAU,qBAAqB,eAAe,WAAW;EAOzD,WAAW"}
|