@geekmidas/constructs 10.0.0-alpha.11 → 10.0.0-alpha.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +222 -158
- package/dist/Construct-BQALFCh2.d.cts +230 -0
- package/dist/Construct-BQALFCh2.d.cts.map +1 -0
- package/dist/{Construct-BD5neF7w.mjs → Construct-CKUA-CTA.mjs} +35 -35
- package/dist/Construct-CKUA-CTA.mjs.map +1 -0
- package/dist/{Construct-CyS3RpTL.cjs → Construct-DEOVauyA.cjs} +55 -49
- package/dist/Construct-DEOVauyA.cjs.map +1 -0
- package/dist/Construct-QXnl3VqT.d.mts +230 -0
- package/dist/Construct-QXnl3VqT.d.mts.map +1 -0
- package/dist/{Cron-DmQ8vQ4b.d.cts → Cron-CQJqqkhY.d.mts} +17 -11
- package/dist/Cron-CQJqqkhY.d.mts.map +1 -0
- package/dist/{Cron-dh4rUgib.d.mts → Cron-DI3nKoic.d.cts} +17 -11
- package/dist/Cron-DI3nKoic.d.cts.map +1 -0
- package/dist/{CronBuilder-Da0C0edR.cjs → CronBuilder-BXTG10u5.cjs} +47 -31
- package/dist/CronBuilder-BXTG10u5.cjs.map +1 -0
- package/dist/{CronBuilder-CYKT5RiO.mjs → CronBuilder-D3sF9tS_.mjs} +37 -21
- package/dist/CronBuilder-D3sF9tS_.mjs.map +1 -0
- package/dist/CronBuilder-Xx_zakuc.d.mts +47 -0
- package/dist/CronBuilder-Xx_zakuc.d.mts.map +1 -0
- package/dist/CronBuilder-g1lZLWyG.d.cts +47 -0
- package/dist/CronBuilder-g1lZLWyG.d.cts.map +1 -0
- package/dist/{Endpoint-BjWKinFA.d.mts → Endpoint-BWyKCa2x.d.cts} +130 -100
- package/dist/Endpoint-BWyKCa2x.d.cts.map +1 -0
- package/dist/{Endpoint-dav89W6-.d.cts → Endpoint-CrE9Ppdk.d.mts} +130 -100
- package/dist/Endpoint-CrE9Ppdk.d.mts.map +1 -0
- package/dist/{Endpoint-DCQPMdUX.mjs → Endpoint-gPXhHKhJ.mjs} +208 -100
- package/dist/Endpoint-gPXhHKhJ.mjs.map +1 -0
- package/dist/{Endpoint-DcWXE-SZ.cjs → Endpoint-yhR2T2Wt.cjs} +248 -122
- package/dist/Endpoint-yhR2T2Wt.cjs.map +1 -0
- package/dist/{index-lAO9egTb.d.mts → EndpointFactory-BV-nfnaP.d.mts} +85 -136
- package/dist/EndpointFactory-BV-nfnaP.d.mts.map +1 -0
- package/dist/{EndpointFactory-CdWB7wPw.cjs → EndpointFactory-BVv6EIDu.cjs} +98 -112
- package/dist/EndpointFactory-BVv6EIDu.cjs.map +1 -0
- package/dist/{index-Bd5FqCoe.d.cts → EndpointFactory-C1-IBwm4.d.cts} +84 -135
- package/dist/EndpointFactory-C1-IBwm4.d.cts.map +1 -0
- package/dist/{EndpointFactory-CjV8F_lJ.mjs → EndpointFactory-Cs8IHvwF.mjs} +62 -76
- package/dist/EndpointFactory-Cs8IHvwF.mjs.map +1 -0
- package/dist/Function-DuqGcbOI.d.mts +76 -0
- package/dist/Function-DuqGcbOI.d.mts.map +1 -0
- package/dist/Function-Pu-1kKZz.d.cts +76 -0
- package/dist/Function-Pu-1kKZz.d.cts.map +1 -0
- package/dist/{HonoEndpointAdaptor-DtL9j19R.cjs → HonoEndpointAdaptor-CN1jjUBJ.cjs} +115 -71
- package/dist/HonoEndpointAdaptor-CN1jjUBJ.cjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-P1ahhZHu.mjs → HonoEndpointAdaptor-euH1oSdY.mjs} +105 -64
- package/dist/HonoEndpointAdaptor-euH1oSdY.mjs.map +1 -0
- package/dist/Queue-BhuofM3k.cjs +109 -0
- package/dist/Queue-BhuofM3k.cjs.map +1 -0
- package/dist/{Queue-D7ZuwBhy.d.cts → Queue-DlsHRzUp.d.mts} +48 -48
- package/dist/Queue-DlsHRzUp.d.mts.map +1 -0
- package/dist/{Queue-gVGfi2Yk.d.mts → Queue-HPyi0e1i.d.cts} +49 -49
- package/dist/Queue-HPyi0e1i.d.cts.map +1 -0
- package/dist/Queue-cmhqEBOB.mjs +104 -0
- package/dist/Queue-cmhqEBOB.mjs.map +1 -0
- package/dist/QueueBuilder-Cx9lKC5d.d.mts +75 -0
- package/dist/QueueBuilder-Cx9lKC5d.d.mts.map +1 -0
- package/dist/QueueBuilder-DXu1qxT1.mjs +118 -0
- package/dist/QueueBuilder-DXu1qxT1.mjs.map +1 -0
- package/dist/QueueBuilder-DdU2klPu.cjs +135 -0
- package/dist/QueueBuilder-DdU2klPu.cjs.map +1 -0
- package/dist/QueueBuilder-OSi6LkV9.d.cts +75 -0
- package/dist/QueueBuilder-OSi6LkV9.d.cts.map +1 -0
- package/dist/{Subscriber-2mEi0ImH.d.cts → Subscriber-Bpp02cGr.d.cts} +29 -20
- package/dist/Subscriber-Bpp02cGr.d.cts.map +1 -0
- package/dist/{Subscriber-xTJ9ayPN.d.mts → Subscriber-CtN9R48-.d.mts} +29 -20
- package/dist/Subscriber-CtN9R48-.d.mts.map +1 -0
- package/dist/SubscriberBuilder-4DWe9feX.d.mts +67 -0
- package/dist/SubscriberBuilder-4DWe9feX.d.mts.map +1 -0
- package/dist/{SubscriberBuilder-BjkbeT9l.mjs → SubscriberBuilder-DRXfxWn_.mjs} +50 -24
- package/dist/SubscriberBuilder-DRXfxWn_.mjs.map +1 -0
- package/dist/{SubscriberBuilder-4OPehf2R.cjs → SubscriberBuilder-M2EAgQhC.cjs} +61 -36
- package/dist/SubscriberBuilder-M2EAgQhC.cjs.map +1 -0
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts +67 -0
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +1 -0
- package/dist/Topic-D2R0r24C.mjs +99 -0
- package/dist/Topic-D2R0r24C.mjs.map +1 -0
- package/dist/Topic-DwS3QO0m.cjs +104 -0
- package/dist/Topic-DwS3QO0m.cjs.map +1 -0
- package/dist/adaptors/aws.cjs +200 -246
- package/dist/adaptors/aws.cjs.map +1 -1
- package/dist/adaptors/aws.d.cts +58 -62
- package/dist/adaptors/aws.d.cts.map +1 -1
- package/dist/adaptors/aws.d.mts +59 -63
- package/dist/adaptors/aws.d.mts.map +1 -1
- package/dist/adaptors/aws.mjs +171 -219
- package/dist/adaptors/aws.mjs.map +1 -1
- package/dist/adaptors/hono.cjs +3 -10
- package/dist/adaptors/hono.d.cts +7 -16
- package/dist/adaptors/hono.d.cts.map +1 -1
- package/dist/adaptors/hono.d.mts +9 -18
- package/dist/adaptors/hono.d.mts.map +1 -1
- package/dist/adaptors/hono.mjs +2 -10
- package/dist/adaptors/testing.cjs +765 -99
- package/dist/adaptors/testing.cjs.map +1 -1
- package/dist/adaptors/testing.d.cts +351 -54
- package/dist/adaptors/testing.d.cts.map +1 -1
- package/dist/adaptors/testing.d.mts +351 -54
- package/dist/adaptors/testing.d.mts.map +1 -1
- package/dist/adaptors/testing.mjs +726 -78
- package/dist/adaptors/testing.mjs.map +1 -1
- package/dist/auth-BMCJN30Y.d.cts +268 -0
- package/dist/auth-BMCJN30Y.d.cts.map +1 -0
- package/dist/auth-D_0788uW.d.mts +268 -0
- package/dist/auth-D_0788uW.d.mts.map +1 -0
- package/dist/auth.cjs +301 -33
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +2 -108
- package/dist/auth.d.mts +2 -108
- package/dist/auth.mjs +289 -27
- package/dist/auth.mjs.map +1 -1
- package/dist/{cache-BrRz3fEB.d.mts → cache-5QZzh5Er.d.mts} +3 -6
- package/dist/cache-5QZzh5Er.d.mts.map +1 -0
- package/dist/{cache-BtZY_tHe.d.cts → cache-DnGDGly3.d.cts} +3 -6
- package/dist/cache-DnGDGly3.d.cts.map +1 -0
- package/dist/cache.cjs +68 -2
- package/dist/cache.cjs.map +1 -0
- package/dist/cache.d.cts +1 -2
- package/dist/cache.d.mts +1 -2
- package/dist/cache.mjs +67 -2
- package/dist/cache.mjs.map +1 -0
- package/dist/cipher-C1lEFX63.mjs +225 -0
- package/dist/cipher-C1lEFX63.mjs.map +1 -0
- package/dist/cipher-CVxfwLjk.cjs +332 -0
- package/dist/cipher-CVxfwLjk.cjs.map +1 -0
- package/dist/{clone-DblgEZZa.mjs → clone-EKNovYHu.mjs} +3 -3
- package/dist/clone-EKNovYHu.mjs.map +1 -0
- package/dist/{clone-Dy0cR2SZ.cjs → clone-UGJpvQnL.cjs} +7 -8
- package/dist/clone-UGJpvQnL.cjs.map +1 -0
- package/dist/{construct-interface-D9d4Gm4p.d.cts → construct-interface-B1AfqRl4.d.cts} +42 -11
- package/dist/construct-interface-B1AfqRl4.d.cts.map +1 -0
- package/dist/{construct-interface-g5GM5pwR.d.mts → construct-interface-ZvYQbivO.d.mts} +42 -11
- package/dist/construct-interface-ZvYQbivO.d.mts.map +1 -0
- package/dist/construct-interface.cjs +113 -7
- package/dist/construct-interface.cjs.map +1 -0
- package/dist/construct-interface.d.cts +2 -2
- package/dist/construct-interface.d.mts +2 -2
- package/dist/construct-interface.mjs +106 -2
- package/dist/construct-interface.mjs.map +1 -0
- package/dist/credential-DYymbp_7.cjs +257 -0
- package/dist/credential-DYymbp_7.cjs.map +1 -0
- package/dist/credential-DfSAOOdY.mjs +222 -0
- package/dist/credential-DfSAOOdY.mjs.map +1 -0
- package/dist/credential.cjs +8 -96
- package/dist/credential.d.cts +2 -61
- package/dist/credential.d.mts +2 -61
- package/dist/credential.mjs +2 -94
- package/dist/crons/index.cjs +129 -7
- package/dist/crons/index.cjs.map +1 -1
- package/dist/crons/index.d.cts +45 -11
- package/dist/crons/index.d.cts.map +1 -1
- package/dist/crons/index.d.mts +45 -11
- package/dist/crons/index.d.mts.map +1 -1
- package/dist/crons/index.mjs +127 -8
- package/dist/crons/index.mjs.map +1 -1
- package/dist/database/kysely.cjs +4 -181
- package/dist/database/kysely.d.cts +2 -152
- package/dist/database/kysely.d.mts +2 -152
- package/dist/database/kysely.mjs +2 -180
- package/dist/email.cjs +25 -12
- package/dist/email.cjs.map +1 -1
- package/dist/email.d.cts +3 -7
- package/dist/email.d.cts.map +1 -1
- package/dist/email.d.mts +4 -8
- package/dist/email.d.mts.map +1 -1
- package/dist/email.mjs +16 -3
- package/dist/email.mjs.map +1 -1
- package/dist/encryption.cjs +96 -0
- package/dist/encryption.cjs.map +1 -0
- package/dist/encryption.d.cts +117 -0
- package/dist/encryption.d.cts.map +1 -0
- package/dist/encryption.d.mts +117 -0
- package/dist/encryption.d.mts.map +1 -0
- package/dist/encryption.mjs +83 -0
- package/dist/encryption.mjs.map +1 -0
- package/dist/endpoints/index.cjs +20 -16
- package/dist/endpoints/index.d.cts +105 -7
- package/dist/endpoints/index.d.cts.map +1 -0
- package/dist/endpoints/index.d.mts +105 -7
- package/dist/endpoints/index.d.mts.map +1 -0
- package/dist/endpoints/index.mjs +6 -10
- package/dist/external-api.cjs +106 -0
- package/dist/external-api.cjs.map +1 -0
- package/dist/external-api.d.cts +2 -0
- package/dist/external-api.d.mts +2 -0
- package/dist/external-api.mjs +103 -0
- package/dist/external-api.mjs.map +1 -0
- package/dist/fake-DqKo8INJ.d.mts +201 -0
- package/dist/fake-DqKo8INJ.d.mts.map +1 -0
- package/dist/fake-Dvion_Fh.d.cts +201 -0
- package/dist/fake-Dvion_Fh.d.cts.map +1 -0
- package/dist/file-server.cjs +42 -10
- package/dist/file-server.cjs.map +1 -1
- package/dist/file-server.d.cts +6 -10
- package/dist/file-server.d.cts.map +1 -1
- package/dist/file-server.d.mts +6 -10
- package/dist/file-server.d.mts.map +1 -1
- package/dist/file-server.mjs +34 -2
- package/dist/file-server.mjs.map +1 -1
- package/dist/functions/index.cjs +3 -6
- package/dist/functions/index.d.cts +3 -4
- package/dist/functions/index.d.mts +3 -4
- package/dist/functions/index.mjs +2 -6
- package/dist/{functions-14lpEFL4.mjs → functions-CTI-hDem.mjs} +376 -238
- package/dist/{functions-14lpEFL4.mjs.map → functions-CTI-hDem.mjs.map} +1 -1
- package/dist/{functions-i_la-N5r.cjs → functions-D7O5SGVc.cjs} +414 -264
- package/dist/functions-D7O5SGVc.cjs.map +1 -0
- package/dist/index-B13kQB_U.d.mts +115 -0
- package/dist/index-B13kQB_U.d.mts.map +1 -0
- package/dist/index-BuzRvKOQ.d.cts +115 -0
- package/dist/index-BuzRvKOQ.d.cts.map +1 -0
- package/dist/index-CeEtxDmK.d.cts +79 -0
- package/dist/index-CeEtxDmK.d.cts.map +1 -0
- package/dist/index-CeEtxDmK.d.mts +79 -0
- package/dist/index-CeEtxDmK.d.mts.map +1 -0
- package/dist/index.cjs +6 -3
- package/dist/index.d.cts +27 -4
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +27 -4
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -3
- package/dist/kms-B-Hm3d5r.cjs +85 -0
- package/dist/kms-B-Hm3d5r.cjs.map +1 -0
- package/dist/kms-BdUlMJEZ.mjs +85 -0
- package/dist/kms-BdUlMJEZ.mjs.map +1 -0
- package/dist/kysely-B3zfg9ti.cjs +383 -0
- package/dist/kysely-B3zfg9ti.cjs.map +1 -0
- package/dist/kysely-B_0BAr0T.mjs +370 -0
- package/dist/kysely-B_0BAr0T.mjs.map +1 -0
- package/dist/kysely-D0bpzgPs.d.cts +175 -0
- package/dist/kysely-D0bpzgPs.d.cts.map +1 -0
- package/dist/kysely-DKwnl0nf.d.mts +175 -0
- package/dist/kysely-DKwnl0nf.d.mts.map +1 -0
- package/dist/{telemetry-C3L0iS28.d.cts → lambdaTelemetry-8vnmVZQ5.d.cts} +3 -6
- package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +1 -0
- package/dist/{telemetry-D7bVFLGi.d.mts → lambdaTelemetry-8vnmVZQ5.d.mts} +3 -6
- package/dist/lambdaTelemetry-8vnmVZQ5.d.mts.map +1 -0
- package/dist/mobile-app.cjs +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 +18 -10
- package/dist/object-storage.cjs.map +1 -1
- package/dist/object-storage.d.cts +3 -7
- package/dist/object-storage.d.cts.map +1 -1
- package/dist/object-storage.d.mts +3 -7
- package/dist/object-storage.d.mts.map +1 -1
- package/dist/object-storage.mjs +11 -3
- package/dist/object-storage.mjs.map +1 -1
- package/dist/queue/index.cjs +6 -189
- package/dist/queue/index.d.cts +3 -60
- package/dist/queue/index.d.mts +3 -60
- package/dist/queue/index.mjs +3 -186
- package/dist/random-password.cjs +86 -0
- package/dist/random-password.cjs.map +1 -0
- package/dist/random-password.d.cts +30 -0
- package/dist/random-password.d.cts.map +1 -0
- package/dist/random-password.d.mts +30 -0
- package/dist/random-password.d.mts.map +1 -0
- package/dist/random-password.mjs +84 -0
- package/dist/random-password.mjs.map +1 -0
- package/dist/{lazyAccessors-BoJN3SMd.mjs → readRequestBody-BTIl3k-D.mjs} +117 -60
- package/dist/readRequestBody-BTIl3k-D.mjs.map +1 -0
- package/dist/readRequestBody-Dej_L3c4.cjs +342 -0
- package/dist/readRequestBody-Dej_L3c4.cjs.map +1 -0
- package/dist/requestLogger-BZcXwdBs.cjs +207 -0
- package/dist/requestLogger-BZcXwdBs.cjs.map +1 -0
- package/dist/requestLogger-pA4gi3E1.mjs +178 -0
- package/dist/requestLogger-pA4gi3E1.mjs.map +1 -0
- package/dist/rest-api.cjs +90 -59
- package/dist/rest-api.cjs.map +1 -1
- package/dist/rest-api.d.cts +70 -42
- package/dist/rest-api.d.cts.map +1 -1
- package/dist/rest-api.d.mts +70 -42
- package/dist/rest-api.d.mts.map +1 -1
- package/dist/rest-api.mjs +82 -51
- package/dist/rest-api.mjs.map +1 -1
- package/dist/{chunk-DWy1uDak.cjs → rolldown-runtime-y5ARvAq5.cjs} +14 -18
- package/dist/runSubscriber-BHvJ8POr.mjs +109 -0
- package/dist/runSubscriber-BHvJ8POr.mjs.map +1 -0
- package/dist/runSubscriber-D8nLXIv1.cjs +126 -0
- package/dist/runSubscriber-D8nLXIv1.cjs.map +1 -0
- package/dist/shutdown-BMJmAhSt.cjs +38 -0
- package/dist/shutdown-BMJmAhSt.cjs.map +1 -0
- package/dist/shutdown-C7xa8x9S.mjs +27 -0
- package/dist/shutdown-C7xa8x9S.mjs.map +1 -0
- package/dist/site.cjs +33 -7
- package/dist/site.cjs.map +1 -1
- package/dist/site.d.cts +17 -7
- package/dist/site.d.cts.map +1 -1
- package/dist/site.d.mts +17 -7
- package/dist/site.d.mts.map +1 -1
- package/dist/site.mjs +29 -3
- package/dist/site.mjs.map +1 -1
- package/dist/stages-BSCF19o2.d.cts +56 -0
- package/dist/stages-BSCF19o2.d.cts.map +1 -0
- package/dist/stages-BSCF19o2.d.mts +56 -0
- package/dist/stages-BSCF19o2.d.mts.map +1 -0
- package/dist/subscribers/index.cjs +118 -6
- package/dist/subscribers/index.cjs.map +1 -0
- package/dist/subscribers/index.d.cts +51 -6
- package/dist/subscribers/index.d.cts.map +1 -0
- package/dist/subscribers/index.d.mts +51 -6
- package/dist/subscribers/index.d.mts.map +1 -0
- package/dist/subscribers/index.mjs +115 -5
- package/dist/subscribers/index.mjs.map +1 -0
- package/dist/surfaceEnv-CNimK76p.cjs +56 -0
- package/dist/surfaceEnv-CNimK76p.cjs.map +1 -0
- package/dist/surfaceEnv-wMT5QzgZ.mjs +45 -0
- package/dist/surfaceEnv-wMT5QzgZ.mjs.map +1 -0
- package/dist/telemetry-B48RLjyk.d.cts +40 -0
- package/dist/telemetry-B48RLjyk.d.cts.map +1 -0
- package/dist/telemetry-BEoBn6GO.d.mts +40 -0
- package/dist/telemetry-BEoBn6GO.d.mts.map +1 -0
- package/dist/telemetry.cjs +56 -0
- package/dist/telemetry.cjs.map +1 -0
- package/dist/telemetry.d.cts +2 -0
- package/dist/telemetry.d.mts +2 -0
- package/dist/telemetry.mjs +55 -0
- package/dist/telemetry.mjs.map +1 -0
- package/dist/topic/index.cjs +3 -137
- package/dist/topic/index.d.cts +2 -4
- package/dist/topic/index.d.mts +2 -4
- package/dist/topic/index.mjs +2 -134
- package/dist/tracing-Bbj1uoFJ.mjs +127 -0
- package/dist/tracing-Bbj1uoFJ.mjs.map +1 -0
- package/dist/tracing-C0ooU0V2.cjs +150 -0
- package/dist/tracing-C0ooU0V2.cjs.map +1 -0
- package/dist/{types-BlAkSuGI.d.cts → types-DMuSQeLL.d.cts} +3 -5
- package/dist/types-DMuSQeLL.d.cts.map +1 -0
- package/dist/{types-aKksMEWL.d.mts → types-DMuSQeLL.d.mts} +3 -5
- package/dist/types-DMuSQeLL.d.mts.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.mjs +1 -0
- package/dist/worker.cjs +59 -34
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.cts +70 -45
- package/dist/worker.d.cts.map +1 -1
- package/dist/worker.d.mts +71 -46
- package/dist/worker.d.mts.map +1 -1
- package/dist/worker.mjs +54 -29
- package/dist/worker.mjs.map +1 -1
- package/package.json +106 -42
- package/dist/Construct-BD5neF7w.mjs.map +0 -1
- package/dist/Construct-C0ijr2qp.d.cts +0 -117
- package/dist/Construct-C0ijr2qp.d.cts.map +0 -1
- package/dist/Construct-Ct8nalEi.d.mts +0 -117
- package/dist/Construct-Ct8nalEi.d.mts.map +0 -1
- package/dist/Construct-CyS3RpTL.cjs.map +0 -1
- package/dist/Cron-DmQ8vQ4b.d.cts.map +0 -1
- package/dist/Cron-dh4rUgib.d.mts.map +0 -1
- package/dist/CronBuilder-BquXDbDI.d.cts +0 -44
- package/dist/CronBuilder-BquXDbDI.d.cts.map +0 -1
- package/dist/CronBuilder-CGgY2080.d.mts +0 -44
- package/dist/CronBuilder-CGgY2080.d.mts.map +0 -1
- package/dist/CronBuilder-CYKT5RiO.mjs.map +0 -1
- package/dist/CronBuilder-Da0C0edR.cjs.map +0 -1
- package/dist/Endpoint-BjWKinFA.d.mts.map +0 -1
- package/dist/Endpoint-DCQPMdUX.mjs.map +0 -1
- package/dist/Endpoint-DcWXE-SZ.cjs.map +0 -1
- package/dist/Endpoint-dav89W6-.d.cts.map +0 -1
- package/dist/EndpointFactory-CdWB7wPw.cjs.map +0 -1
- package/dist/EndpointFactory-CjV8F_lJ.mjs.map +0 -1
- package/dist/HonoEndpointAdaptor-DtL9j19R.cjs.map +0 -1
- package/dist/HonoEndpointAdaptor-P1ahhZHu.mjs.map +0 -1
- package/dist/Queue-D7ZuwBhy.d.cts.map +0 -1
- package/dist/Queue-gVGfi2Yk.d.mts.map +0 -1
- package/dist/Subscriber-2mEi0ImH.d.cts.map +0 -1
- package/dist/Subscriber-xTJ9ayPN.d.mts.map +0 -1
- package/dist/SubscriberBuilder-4OPehf2R.cjs.map +0 -1
- package/dist/SubscriberBuilder-BjkbeT9l.mjs.map +0 -1
- package/dist/SubscriberBuilder-Dptmo-1A.d.mts +0 -62
- package/dist/SubscriberBuilder-Dptmo-1A.d.mts.map +0 -1
- package/dist/SubscriberBuilder-waNhzjSM.d.cts +0 -62
- package/dist/SubscriberBuilder-waNhzjSM.d.cts.map +0 -1
- package/dist/Topic-19QeHBIR.d.cts +0 -91
- package/dist/Topic-19QeHBIR.d.cts.map +0 -1
- package/dist/Topic-DuFeqkBh.d.mts +0 -91
- package/dist/Topic-DuFeqkBh.d.mts.map +0 -1
- package/dist/auth.d.cts.map +0 -1
- package/dist/auth.d.mts.map +0 -1
- package/dist/cache-0ANvRQnD.mjs +0 -51
- package/dist/cache-0ANvRQnD.mjs.map +0 -1
- package/dist/cache-3WSvAulx.cjs +0 -57
- package/dist/cache-3WSvAulx.cjs.map +0 -1
- package/dist/cache-BrRz3fEB.d.mts.map +0 -1
- package/dist/cache-BtZY_tHe.d.cts.map +0 -1
- package/dist/clone-DblgEZZa.mjs.map +0 -1
- package/dist/clone-Dy0cR2SZ.cjs.map +0 -1
- package/dist/construct-interface-BfjcOD_E.cjs +0 -117
- package/dist/construct-interface-BfjcOD_E.cjs.map +0 -1
- package/dist/construct-interface-D9d4Gm4p.d.cts.map +0 -1
- package/dist/construct-interface-Z4CpS8tK.mjs +0 -81
- package/dist/construct-interface-Z4CpS8tK.mjs.map +0 -1
- package/dist/construct-interface-g5GM5pwR.d.mts.map +0 -1
- package/dist/credential.cjs.map +0 -1
- package/dist/credential.d.cts.map +0 -1
- package/dist/credential.d.mts.map +0 -1
- package/dist/credential.mjs.map +0 -1
- package/dist/database/kysely.cjs.map +0 -1
- package/dist/database/kysely.d.cts.map +0 -1
- package/dist/database/kysely.d.mts.map +0 -1
- package/dist/database/kysely.mjs.map +0 -1
- package/dist/functions-i_la-N5r.cjs.map +0 -1
- package/dist/index-Bd5FqCoe.d.cts.map +0 -1
- package/dist/index-BknhM6Ux.d.mts +0 -31
- package/dist/index-BknhM6Ux.d.mts.map +0 -1
- package/dist/index-CBSfrowv.d.cts +0 -31
- package/dist/index-CBSfrowv.d.cts.map +0 -1
- package/dist/index-D24Xm79M.d.cts +0 -171
- package/dist/index-D24Xm79M.d.cts.map +0 -1
- package/dist/index-_ajboYxK.d.mts +0 -171
- package/dist/index-_ajboYxK.d.mts.map +0 -1
- package/dist/index-lAO9egTb.d.mts.map +0 -1
- package/dist/lazyAccessors-BoJN3SMd.mjs.map +0 -1
- package/dist/lazyAccessors-e3j2oE2m.cjs +0 -274
- package/dist/lazyAccessors-e3j2oE2m.cjs.map +0 -1
- package/dist/processAudits-CGqttuXm.cjs +0 -92
- package/dist/processAudits-CGqttuXm.cjs.map +0 -1
- package/dist/processAudits-Dmts9H_b.mjs +0 -80
- package/dist/processAudits-Dmts9H_b.mjs.map +0 -1
- package/dist/queue/index.cjs.map +0 -1
- package/dist/queue/index.d.cts.map +0 -1
- package/dist/queue/index.d.mts.map +0 -1
- package/dist/queue/index.mjs.map +0 -1
- package/dist/surfaceEnv-BFXEms2f.cjs +0 -39
- package/dist/surfaceEnv-BFXEms2f.cjs.map +0 -1
- package/dist/surfaceEnv-C3Ktahea.mjs +0 -27
- package/dist/surfaceEnv-C3Ktahea.mjs.map +0 -1
- package/dist/telemetry-C3L0iS28.d.cts.map +0 -1
- package/dist/telemetry-D7bVFLGi.d.mts.map +0 -1
- package/dist/topic/index.cjs.map +0 -1
- package/dist/topic/index.mjs.map +0 -1
- package/dist/types-BlAkSuGI.d.cts.map +0 -1
- package/dist/types-aKksMEWL.d.mts.map +0 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { n as Construct } from "./construct-interface-ZvYQbivO.mjs";
|
|
2
|
+
import { t as Cache } from "./cache-5QZzh5Er.mjs";
|
|
3
|
+
import { ConstructName, Declaration, PostgresVersion } from "@geekmidas/manifest";
|
|
4
|
+
import { Service } from "@geekmidas/services";
|
|
5
|
+
import { Kysely, KyselyConfig } from "kysely";
|
|
6
|
+
import pg from "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 KyselyDatabaseOptions 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
|
+
* The Postgres major version to provision.
|
|
43
|
+
*
|
|
44
|
+
* Declared here so one statement reaches both targets. It was previously
|
|
45
|
+
* set in two unrelated places — a container tag locally, nothing at all on
|
|
46
|
+
* AWS (so Aurora chose) — which is how local came to run 18 while deployed
|
|
47
|
+
* ran 17.7 with nothing recording the difference.
|
|
48
|
+
*
|
|
49
|
+
* Defaults to {@link DEFAULT_POSTGRES_VERSION}.
|
|
50
|
+
*/
|
|
51
|
+
version?: PostgresVersion;
|
|
52
|
+
/**
|
|
53
|
+
* End each query run inside a request with a comment naming what ran it —
|
|
54
|
+
* `/*operation='POST /orders',request_id='…'*\/` — so `pg_stat_activity`
|
|
55
|
+
* and the server's logs can tie a query to its endpoint — and, inside a
|
|
56
|
+
* trace, with the query span's `traceparent='00-…'` (sqlcommenter), so
|
|
57
|
+
* they can tie it to the trace too. Defaults to on.
|
|
58
|
+
*/
|
|
59
|
+
queryTags?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** What makes a construct derived rather than a database in its own right. */
|
|
62
|
+
interface DerivedFrom {
|
|
63
|
+
kind: 'database-reader' | 'database-schema';
|
|
64
|
+
of: string;
|
|
65
|
+
schema?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @typeParam DB - the database's schema.
|
|
69
|
+
* @typeParam TName - the canonical id. TypeScript has no partial
|
|
70
|
+
* type-argument inference, so `new KyselyDatabase<OrdersDB>('orders')` leaves
|
|
71
|
+
* this at its default and the service key widens to `string`. `db` still types
|
|
72
|
+
* through `.database()`, which infers from the service.
|
|
73
|
+
*/
|
|
74
|
+
declare class KyselyDatabase<DB = unknown, TName extends string = string> implements Construct<TName, Kysely<DB>> {
|
|
75
|
+
private readonly options;
|
|
76
|
+
readonly id: TName;
|
|
77
|
+
readonly service: Service<Uncapitalize<TName>, Kysely<DB>>;
|
|
78
|
+
/**
|
|
79
|
+
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
80
|
+
* build publishes and the key the client reads cannot drift.
|
|
81
|
+
*/
|
|
82
|
+
private readonly config;
|
|
83
|
+
private readonly schemaName;
|
|
84
|
+
private readonly roles;
|
|
85
|
+
private readonly version;
|
|
86
|
+
private readonly derivedFrom?;
|
|
87
|
+
constructor(id: ConstructName<TName>, options?: KyselyDatabaseOptions, derivedFrom?: DerivedFrom);
|
|
88
|
+
declare(): Declaration[];
|
|
89
|
+
/**
|
|
90
|
+
* A read-only endpoint on this database.
|
|
91
|
+
*
|
|
92
|
+
* Read-only is enforced by the reader role's grants rather than by which
|
|
93
|
+
* endpoint it resolves to, so falling back to the writer where no replica
|
|
94
|
+
* exists is safe rather than a silently writable connection behind a name
|
|
95
|
+
* that says reader. There is no `writer()`: the database *is* the writer, so
|
|
96
|
+
* a replica can never be reached by accident.
|
|
97
|
+
*
|
|
98
|
+
* The return type is narrower than this class on purpose — see
|
|
99
|
+
* {@link ReadOnlyDatabase}.
|
|
100
|
+
*/
|
|
101
|
+
reader(): ReadOnlyDatabase<DB, `${TName}Reader`>;
|
|
102
|
+
/**
|
|
103
|
+
* A cache that lives in this database.
|
|
104
|
+
*
|
|
105
|
+
* The same strengthening `schema()` is over a second database: `new
|
|
106
|
+
* Cache('Sessions')` says the app caches and leaves where to the deployment,
|
|
107
|
+
* while this says it caches *here* — which is a fact about the application
|
|
108
|
+
* and so belongs in its code.
|
|
109
|
+
*
|
|
110
|
+
* What it buys beyond being explicit: the table's schema and the role that
|
|
111
|
+
* reaches it come from this database rather than from a second convention,
|
|
112
|
+
* and the backend no longer has to guess which database "the database" meant
|
|
113
|
+
* when an app declares two.
|
|
114
|
+
*
|
|
115
|
+
* A cache is not a `KyselyDatabase`, so this returns a `Cache` — the client
|
|
116
|
+
* is a key/value store, not a query builder, and typing it as the parent
|
|
117
|
+
* would be a convenience that lies.
|
|
118
|
+
*/
|
|
119
|
+
cache<TCache extends string = `${TName}Cache`>(id?: ConstructName<TCache>, options?: {
|
|
120
|
+
table?: string;
|
|
121
|
+
}): Cache<TCache>;
|
|
122
|
+
/**
|
|
123
|
+
* A second schema in this database, with its own role(s) and its own URL —
|
|
124
|
+
* so this database's role holds no grant on those tables at all.
|
|
125
|
+
*
|
|
126
|
+
* Typed separately because a tenant has its own tables: the point is that
|
|
127
|
+
* `auth.selectFrom('sessions')` type-checks and
|
|
128
|
+
* `orders.selectFrom('sessions')` does not.
|
|
129
|
+
*/
|
|
130
|
+
schema<TenantDB, TTenant extends string>(id: ConstructName<TTenant>, options?: KyselyDatabaseOptions): KyselyDatabase<TenantDB, TTenant>;
|
|
131
|
+
/**
|
|
132
|
+
* A connection as the *owner* role — the one that may create, alter and drop.
|
|
133
|
+
*
|
|
134
|
+
* A `Service` rather than part of the construct, and deliberately so: a
|
|
135
|
+
* construct is what `.dependsOn()` accepts, and nothing should be able to
|
|
136
|
+
* depend on this. A migrator asks for it by name; a handler cannot ask at
|
|
137
|
+
* all, which is the security property the role split exists for.
|
|
138
|
+
*
|
|
139
|
+
* Falls back to the runtime URL where no owner URL was published — the
|
|
140
|
+
* `roles: false` downgrade, where there is only one credential and it is the
|
|
141
|
+
* cluster master's.
|
|
142
|
+
*/
|
|
143
|
+
get owner(): Service<`${Uncapitalize<TName>}Owner`, Kysely<DB>>;
|
|
144
|
+
/**
|
|
145
|
+
* What this database's clients are built with besides a dialect — the
|
|
146
|
+
* plugins and logging it was declared with.
|
|
147
|
+
*
|
|
148
|
+
* Public so that whatever opens a connection to it outside \`connect()\` —
|
|
149
|
+
* a test's transaction — builds the same client. A test that dropped the
|
|
150
|
+
* plugins would write \`createdAt\` where production writes \`created_at\`.
|
|
151
|
+
*/
|
|
152
|
+
get clientConfig(): Omit<KyselyConfig, 'dialect'>;
|
|
153
|
+
private connect;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* A database you may read through, and derive nothing from.
|
|
157
|
+
*
|
|
158
|
+
* A reader is terminal in the graph, and this is that fact in the type system.
|
|
159
|
+
* `DERIVES_FROM` gives `cache` and `database-schema` no `database-reader`
|
|
160
|
+
* parent, and there is no reader of a reader — so `orders.reader().cache(…)`
|
|
161
|
+
* has always been illegal, but it type-checked and failed later at
|
|
162
|
+
* `assertDerivations`. That is a long way round to learn that a read-only
|
|
163
|
+
* endpoint cannot own a table something writes to.
|
|
164
|
+
*
|
|
165
|
+
* Omitting the three deriving methods rather than making them throw keeps the
|
|
166
|
+
* failure where it costs least: the editor, on the line that wrote it.
|
|
167
|
+
*
|
|
168
|
+
* The result is deliberately not assignable back to `KyselyDatabase` — a
|
|
169
|
+
* reader is not one, and anything that genuinely needs the writer should say
|
|
170
|
+
* so.
|
|
171
|
+
*/
|
|
172
|
+
type ReadOnlyDatabase<DB, TName extends string> = Omit<KyselyDatabase<DB, TName>, 'reader' | 'cache' | 'schema'>;
|
|
173
|
+
//#endregion
|
|
174
|
+
export { closeDatabasePools as i, KyselyDatabaseOptions as n, ReadOnlyDatabase as r, KyselyDatabase as t };
|
|
175
|
+
//# sourceMappingURL=kysely-DKwnl0nf.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kysely-DKwnl0nf.d.mts","names":[],"sources":["../src/database/pool.ts","../src/database/kysely.ts"],"mappings":";;;;;;;;;;;iBAwGsB,sBAAsB;;;;;;;;;;;;UChE3B,8BAA8B,KAAK;;;;;;;;EAQnD;;;;;;;;EAQA;;;;;;;;;;;EAWA,UAAU;;;;;;;;EAQV;;;UAIS;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;EAyBf,WAAW;;;;;;;;;;;;;EAqDX,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;UAcX;;;;;;;;;;;;;;;;;;;KAuCH,iBAAiB,IAAI,wBAAwB,KACxD,eAAe,IAAI"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Context } from "aws-lambda";
|
|
2
|
-
|
|
3
|
-
//#region src/telemetry.d.ts
|
|
4
|
-
|
|
2
|
+
//#region src/endpoints/lambdaTelemetry.d.ts
|
|
5
3
|
/**
|
|
6
4
|
* Context object returned by onRequestStart, passed to subsequent hooks
|
|
7
5
|
*/
|
|
@@ -89,7 +87,6 @@ interface Telemetry {
|
|
|
89
87
|
*/
|
|
90
88
|
onRequestError(ctx: TelemetryContext, error: Error): void;
|
|
91
89
|
}
|
|
92
|
-
//# sourceMappingURL=telemetry.d.ts.map
|
|
93
90
|
//#endregion
|
|
94
|
-
export {
|
|
95
|
-
//# sourceMappingURL=
|
|
91
|
+
export { TelemetryResponse as i, TelemetryContext as n, TelemetryRequest as r, Telemetry as t };
|
|
92
|
+
//# sourceMappingURL=lambdaTelemetry-8vnmVZQ5.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambdaTelemetry-8vnmVZQ5.d.cts","names":["LambdaContext"],"sources":["../src/endpoints/lambdaTelemetry.ts"],"mappings":";;;;;UAWiB;;;;GAIf;;;;;UAMe;;;;EAIhB;;;;EAKA,SAASA;;;;;UAMO;;;;EAIhB;;;;EAKA;;;;EAKA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BM;;;;;;;EAOhB,eAAe,SAAS,mBAAmB;;;;;;;EAQ3C,aAAa,KAAK,kBAAkB,UAAU;;;;;;;EAQ9C,eAAe,KAAK,kBAAkB,OAAO"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Context } from "aws-lambda";
|
|
2
|
-
|
|
3
|
-
//#region src/telemetry.d.ts
|
|
4
|
-
|
|
2
|
+
//#region src/endpoints/lambdaTelemetry.d.ts
|
|
5
3
|
/**
|
|
6
4
|
* Context object returned by onRequestStart, passed to subsequent hooks
|
|
7
5
|
*/
|
|
@@ -89,7 +87,6 @@ interface Telemetry {
|
|
|
89
87
|
*/
|
|
90
88
|
onRequestError(ctx: TelemetryContext, error: Error): void;
|
|
91
89
|
}
|
|
92
|
-
//# sourceMappingURL=telemetry.d.ts.map
|
|
93
90
|
//#endregion
|
|
94
|
-
export {
|
|
95
|
-
//# sourceMappingURL=
|
|
91
|
+
export { TelemetryResponse as i, TelemetryContext as n, TelemetryRequest as r, Telemetry as t };
|
|
92
|
+
//# sourceMappingURL=lambdaTelemetry-8vnmVZQ5.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambdaTelemetry-8vnmVZQ5.d.mts","names":["LambdaContext"],"sources":["../src/endpoints/lambdaTelemetry.ts"],"mappings":";;;;;UAWiB;;;;GAIf;;;;;UAMe;;;;EAIhB;;;;EAKA,SAASA;;;;;UAMO;;;;EAIhB;;;;EAKA;;;;EAKA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BM;;;;;;;EAOhB,eAAe,SAAS,mBAAmB;;;;;;;EAQ3C,aAAa,KAAK,kBAAkB,UAAU;;;;;;;EAQ9C,eAAe,KAAK,kBAAkB,OAAO"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_construct_interface = require("./construct-interface.cjs");
|
|
3
|
+
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
4
|
+
//#region src/mobile-app.ts
|
|
5
|
+
/**
|
|
6
|
+
* `MobileApp` — an Expo app, declared like a site.
|
|
7
|
+
*
|
|
8
|
+
* Its edges are the point, as a site's are. One `.dependsOn([api, auth])` is
|
|
9
|
+
* the fact behind everything a mobile app otherwise has written down by hand:
|
|
10
|
+
*
|
|
11
|
+
* - its `EXPO_PUBLIC_API_URL` and `EXPO_PUBLIC_AUTH_URL`, which locally are
|
|
12
|
+
* the servers' own ports — reachable once the app swaps `localhost` for the
|
|
13
|
+
* address Metro is served from, which is what makes a phone on the LAN work;
|
|
14
|
+
* - with an `Email` among them, Mailpit's inbox on a local stage
|
|
15
|
+
* (`EXPO_PUBLIC_<ID>_INBOX_URL`), so a sign-in link can be opened from the
|
|
16
|
+
* app — unset deployed, where there is no inbox;
|
|
17
|
+
* - its URL scheme (`shop`), the same on every stage;
|
|
18
|
+
* - the scheme in the auth server's and the API's trusted origins — and, on a
|
|
19
|
+
* local stage, the `exp://` origins Expo Go sends from;
|
|
20
|
+
* - Better Auth's Expo plugin on the auth server, and sign-in links an app asks
|
|
21
|
+
* for built on an address the phone can open.
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* export const app = new MobileApp('App', { path: 'apps/app' })
|
|
25
|
+
* .dependsOn([api, auth]);
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* Like a site it has no `.service`: it is built by its own toolchain, and
|
|
29
|
+
* consumes addresses rather than connections. Nothing deploys it — EAS and the
|
|
30
|
+
* stores do — so the targets derive *for* it and never run it.
|
|
31
|
+
*/
|
|
32
|
+
var MobileApp = class MobileApp {
|
|
33
|
+
config;
|
|
34
|
+
dependencies;
|
|
35
|
+
id;
|
|
36
|
+
/** The key its scheme arrives under — what its `app.config.ts` reads. */
|
|
37
|
+
keys;
|
|
38
|
+
constructor(id, config, dependencies = []) {
|
|
39
|
+
this.config = config;
|
|
40
|
+
this.dependencies = dependencies;
|
|
41
|
+
this.id = (0, _geekmidas_manifest.canonicalId)(id);
|
|
42
|
+
this.keys = { scheme: (0, _geekmidas_manifest.provideKey)(this.id, "scheme") };
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* What this app calls — the surfaces it is built with the URLs of, and the
|
|
46
|
+
* ones that come to trust its scheme.
|
|
47
|
+
*
|
|
48
|
+
* Immutable, like every other builder: it returns a new app rather than
|
|
49
|
+
* changing this one.
|
|
50
|
+
*/
|
|
51
|
+
dependsOn(constructs) {
|
|
52
|
+
return new MobileApp(this.id, this.config, [...this.dependencies, ...constructs.map(require_construct_interface.edgeTo)]);
|
|
53
|
+
}
|
|
54
|
+
declare() {
|
|
55
|
+
return [{
|
|
56
|
+
kind: "mobile-app",
|
|
57
|
+
id: this.id,
|
|
58
|
+
variant: this.config.variant ?? "expo",
|
|
59
|
+
app: {
|
|
60
|
+
path: this.config.path,
|
|
61
|
+
...this.config.port ? { port: this.config.port } : {},
|
|
62
|
+
...this.config.config ? { config: this.config.config } : {}
|
|
63
|
+
},
|
|
64
|
+
...this.config.scheme ? { scheme: this.config.scheme } : {},
|
|
65
|
+
...this.config.stages ? { stages: this.config.stages } : {},
|
|
66
|
+
dependencies: this.dependencies,
|
|
67
|
+
provides: [this.keys.scheme]
|
|
68
|
+
}];
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
exports.MobileApp = MobileApp;
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=mobile-app.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-app.cjs","names":["canonicalId","provideKey","edgeTo"],"sources":["../src/mobile-app.ts"],"sourcesContent":["/**\n * `MobileApp` — an Expo app, declared like a site.\n *\n * Its edges are the point, as a site's are. One `.dependsOn([api, auth])` is\n * the fact behind everything a mobile app otherwise has written down by hand:\n *\n * - its `EXPO_PUBLIC_API_URL` and `EXPO_PUBLIC_AUTH_URL`, which locally are\n * the servers' own ports — reachable once the app swaps `localhost` for the\n * address Metro is served from, which is what makes a phone on the LAN work;\n * - with an `Email` among them, Mailpit's inbox on a local stage\n * (`EXPO_PUBLIC_<ID>_INBOX_URL`), so a sign-in link can be opened from the\n * app — unset deployed, where there is no inbox;\n * - its URL scheme (`shop`), the same on every stage;\n * - the scheme in the auth server's and the API's trusted origins — and, on a\n * local stage, the `exp://` origins Expo Go sends from;\n * - Better Auth's Expo plugin on the auth server, and sign-in links an app asks\n * for built on an address the phone can open.\n *\n * ```ts\n * export const app = new MobileApp('App', { path: 'apps/app' })\n * .dependsOn([api, auth]);\n * ```\n *\n * Like a site it has no `.service`: it is built by its own toolchain, and\n * consumes addresses rather than connections. Nothing deploys it — EAS and the\n * stores do — so the targets derive *for* it and never run it.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\ttype MobileAppDeclaration,\n\ttype MobileAppStage,\n\tprovideKey,\n} from '@geekmidas/manifest';\nimport { type Declarable, edgeTo } from './construct-interface';\n\nexport interface MobileAppConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/app'`.\n\t * Required, the same field a site and a surface take.\n\t */\n\tpath: string;\n\t/**\n\t * The port Metro serves it on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, as a site's are,\n\t * and `gkm exec` hands it to Expo as `RCT_METRO_PORT`.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars the app reads — its\n\t * values are inlined at build time, as a site's are.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Which toolchain builds it — the same field a site names its framework\n\t * by. Expo is the one that ships, and the default.\n\t */\n\tvariant?: MobileAppDeclaration['variant'];\n\t/**\n\t * Its URL scheme.\n\t *\n\t * Normally omitted: it is the project's name — `shop` — on every stage.\n\t * Give one only when the app is known by another name.\n\t */\n\tscheme?: string;\n\t/**\n\t * How a deployed stage ships it, where that differs from the defaults: the\n\t * protected stage reads EAS's `production` environment and submits to\n\t * Play's `production` track, every other deployed stage `preview` and\n\t * `internal`, and every Android release is a `draft` until someone\n\t * releases it in Play Console.\n\t *\n\t * ```ts\n\t * stages: { beta: { environment: 'preview', android: { track: 'alpha' } } }\n\t * ```\n\t */\n\tstages?: Readonly<Record<string, MobileAppStage>>;\n}\n\nexport class MobileApp<TName extends string = string>\n\timplements Declarable<TName>\n{\n\treadonly id: TName;\n\t/** The key its scheme arrives under — what its `app.config.ts` reads. */\n\treadonly keys: { scheme: string };\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: MobileAppConfig,\n\t\t/** Internal: how `.dependsOn()` carries edges into the copy it returns. */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { scheme: provideKey(this.id, 'scheme') };\n\t}\n\n\t/**\n\t * What this app calls — the surfaces it is built with the URLs of, and the\n\t * ones that come to trust its scheme.\n\t *\n\t * Immutable, like every other builder: it returns a new app rather than\n\t * changing this one.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): MobileApp<TName> {\n\t\treturn new MobileApp<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: 'mobile-app',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'expo',\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.scheme ? { scheme: this.config.scheme } : {}),\n\t\t\t\t...(this.config.stages ? { stages: this.config.stages } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\tprovides: [this.keys.scheme],\n\t\t\t},\n\t\t];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,IAAa,YAAb,MAAa,UAEb;CAOmB;CAEA;CARlB;;CAEA;CAEA,YACC,IACA,QAEA,eAAuD,CAAC,GACvD;EAHgB,KAAA,SAAA;EAEA,KAAA,eAAA;EAEjB,KAAK,MAAA,GAAKA,oBAAAA,YAAAA,CAAY,EAAY;EAClC,KAAK,OAAO,EAAE,SAAA,GAAQC,oBAAAA,WAAAA,CAAW,KAAK,IAAI,QAAQ,EAAE;CACrD;;;;;;;;CASA,UAAU,YAAqD;EAC9D,OAAO,IAAI,UAAiB,KAAK,IAA4B,KAAK,QAAQ,CACzE,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,SAAS,EAAE,QAAQ,KAAK,OAAO,OAAO,IAAI,CAAC;GAC3D,GAAI,KAAK,OAAO,SAAS,EAAE,QAAQ,KAAK,OAAO,OAAO,IAAI,CAAC;GAC3D,cAAc,KAAK;GACnB,UAAU,CAAC,KAAK,KAAK,MAAM;EAC5B,CACD;CACD;AACD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { i as Declarable } from "./construct-interface-B1AfqRl4.cjs";
|
|
2
|
+
import { ConstructName, Declaration, Dependency, MobileAppDeclaration, MobileAppStage } from "@geekmidas/manifest";
|
|
3
|
+
//#region src/mobile-app.d.ts
|
|
4
|
+
export interface MobileAppConfig {
|
|
5
|
+
/**
|
|
6
|
+
* Where its source lives, relative to the workspace root — `'apps/app'`.
|
|
7
|
+
* Required, the same field a site and a surface take.
|
|
8
|
+
*/
|
|
9
|
+
path: string;
|
|
10
|
+
/**
|
|
11
|
+
* The port Metro serves it on locally.
|
|
12
|
+
*
|
|
13
|
+
* Normally omitted: ports are assigned in a stable order, as a site's are,
|
|
14
|
+
* and `gkm exec` hands it to Expo as `RCT_METRO_PORT`.
|
|
15
|
+
*/
|
|
16
|
+
port?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Modules to import when sniffing which env vars the app reads — its
|
|
19
|
+
* values are inlined at build time, as a site's are.
|
|
20
|
+
*/
|
|
21
|
+
config?: {
|
|
22
|
+
client?: string;
|
|
23
|
+
server?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Which toolchain builds it — the same field a site names its framework
|
|
27
|
+
* by. Expo is the one that ships, and the default.
|
|
28
|
+
*/
|
|
29
|
+
variant?: MobileAppDeclaration['variant'];
|
|
30
|
+
/**
|
|
31
|
+
* Its URL scheme.
|
|
32
|
+
*
|
|
33
|
+
* Normally omitted: it is the project's name — `shop` — on every stage.
|
|
34
|
+
* Give one only when the app is known by another name.
|
|
35
|
+
*/
|
|
36
|
+
scheme?: string;
|
|
37
|
+
/**
|
|
38
|
+
* How a deployed stage ships it, where that differs from the defaults: the
|
|
39
|
+
* protected stage reads EAS's `production` environment and submits to
|
|
40
|
+
* Play's `production` track, every other deployed stage `preview` and
|
|
41
|
+
* `internal`, and every Android release is a `draft` until someone
|
|
42
|
+
* releases it in Play Console.
|
|
43
|
+
*
|
|
44
|
+
* ```ts
|
|
45
|
+
* stages: { beta: { environment: 'preview', android: { track: 'alpha' } } }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
stages?: Readonly<Record<string, MobileAppStage>>;
|
|
49
|
+
}
|
|
50
|
+
export declare class MobileApp<TName extends string = string> implements Declarable<TName> {
|
|
51
|
+
private readonly config;
|
|
52
|
+
/** Internal: how `.dependsOn()` carries edges into the copy it returns. */
|
|
53
|
+
private readonly dependencies;
|
|
54
|
+
readonly id: TName;
|
|
55
|
+
/** The key its scheme arrives under — what its `app.config.ts` reads. */
|
|
56
|
+
readonly keys: {
|
|
57
|
+
scheme: string;
|
|
58
|
+
};
|
|
59
|
+
constructor(id: ConstructName<TName>, config: MobileAppConfig,
|
|
60
|
+
/** Internal: how `.dependsOn()` carries edges into the copy it returns. */
|
|
61
|
+
dependencies?: readonly Dependency[]);
|
|
62
|
+
/**
|
|
63
|
+
* What this app calls — the surfaces it is built with the URLs of, and the
|
|
64
|
+
* ones that come to trust its scheme.
|
|
65
|
+
*
|
|
66
|
+
* Immutable, like every other builder: it returns a new app rather than
|
|
67
|
+
* changing this one.
|
|
68
|
+
*/
|
|
69
|
+
dependsOn(constructs: readonly Declarable[]): MobileApp<TName>;
|
|
70
|
+
declare(): Declaration[];
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//# sourceMappingURL=mobile-app.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-app.d.cts","names":[],"sources":["../src/mobile-app.ts"],"mappings":";;;iBAuCiB;;;;;EAKhB;;;;;;;EAOA;;;;;EAKA;IAAW;IAAiB;;;;;;EAK5B,UAAU;;;;;;;EAOV;;;;;;;;;;;;EAYA,SAAS,SAAS,eAAe;;qBAGrB,UAAU,0CACX,WAAW;mBAQJ;;mBAEA;WART,IAAI;;WAEJ;IAAQ;;EAEjB,YACC,IAAI,cAAc,QACD,QAAQ,iBAER;;EAAA,wBAAuB;;;;;;;;EAazC,UAAU,qBAAqB,eAAe,UAAU;EAOxD,WAAW"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { i as Declarable } from "./construct-interface-ZvYQbivO.mjs";
|
|
2
|
+
import { ConstructName, Declaration, Dependency, MobileAppDeclaration, MobileAppStage } from "@geekmidas/manifest";
|
|
3
|
+
//#region src/mobile-app.d.ts
|
|
4
|
+
export interface MobileAppConfig {
|
|
5
|
+
/**
|
|
6
|
+
* Where its source lives, relative to the workspace root — `'apps/app'`.
|
|
7
|
+
* Required, the same field a site and a surface take.
|
|
8
|
+
*/
|
|
9
|
+
path: string;
|
|
10
|
+
/**
|
|
11
|
+
* The port Metro serves it on locally.
|
|
12
|
+
*
|
|
13
|
+
* Normally omitted: ports are assigned in a stable order, as a site's are,
|
|
14
|
+
* and `gkm exec` hands it to Expo as `RCT_METRO_PORT`.
|
|
15
|
+
*/
|
|
16
|
+
port?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Modules to import when sniffing which env vars the app reads — its
|
|
19
|
+
* values are inlined at build time, as a site's are.
|
|
20
|
+
*/
|
|
21
|
+
config?: {
|
|
22
|
+
client?: string;
|
|
23
|
+
server?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Which toolchain builds it — the same field a site names its framework
|
|
27
|
+
* by. Expo is the one that ships, and the default.
|
|
28
|
+
*/
|
|
29
|
+
variant?: MobileAppDeclaration['variant'];
|
|
30
|
+
/**
|
|
31
|
+
* Its URL scheme.
|
|
32
|
+
*
|
|
33
|
+
* Normally omitted: it is the project's name — `shop` — on every stage.
|
|
34
|
+
* Give one only when the app is known by another name.
|
|
35
|
+
*/
|
|
36
|
+
scheme?: string;
|
|
37
|
+
/**
|
|
38
|
+
* How a deployed stage ships it, where that differs from the defaults: the
|
|
39
|
+
* protected stage reads EAS's `production` environment and submits to
|
|
40
|
+
* Play's `production` track, every other deployed stage `preview` and
|
|
41
|
+
* `internal`, and every Android release is a `draft` until someone
|
|
42
|
+
* releases it in Play Console.
|
|
43
|
+
*
|
|
44
|
+
* ```ts
|
|
45
|
+
* stages: { beta: { environment: 'preview', android: { track: 'alpha' } } }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
stages?: Readonly<Record<string, MobileAppStage>>;
|
|
49
|
+
}
|
|
50
|
+
export declare class MobileApp<TName extends string = string> implements Declarable<TName> {
|
|
51
|
+
private readonly config;
|
|
52
|
+
/** Internal: how `.dependsOn()` carries edges into the copy it returns. */
|
|
53
|
+
private readonly dependencies;
|
|
54
|
+
readonly id: TName;
|
|
55
|
+
/** The key its scheme arrives under — what its `app.config.ts` reads. */
|
|
56
|
+
readonly keys: {
|
|
57
|
+
scheme: string;
|
|
58
|
+
};
|
|
59
|
+
constructor(id: ConstructName<TName>, config: MobileAppConfig,
|
|
60
|
+
/** Internal: how `.dependsOn()` carries edges into the copy it returns. */
|
|
61
|
+
dependencies?: readonly Dependency[]);
|
|
62
|
+
/**
|
|
63
|
+
* What this app calls — the surfaces it is built with the URLs of, and the
|
|
64
|
+
* ones that come to trust its scheme.
|
|
65
|
+
*
|
|
66
|
+
* Immutable, like every other builder: it returns a new app rather than
|
|
67
|
+
* changing this one.
|
|
68
|
+
*/
|
|
69
|
+
dependsOn(constructs: readonly Declarable[]): MobileApp<TName>;
|
|
70
|
+
declare(): Declaration[];
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//# sourceMappingURL=mobile-app.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-app.d.mts","names":[],"sources":["../src/mobile-app.ts"],"mappings":";;;iBAuCiB;;;;;EAKhB;;;;;;;EAOA;;;;;EAKA;IAAW;IAAiB;;;;;;EAK5B,UAAU;;;;;;;EAOV;;;;;;;;;;;;EAYA,SAAS,SAAS,eAAe;;qBAGrB,UAAU,0CACX,WAAW;mBAQJ;;mBAEA;WART,IAAI;;WAEJ;IAAQ;;EAEjB,YACC,IAAI,cAAc,QACD,QAAQ,iBAER;;EAAA,wBAAuB;;;;;;;;EAazC,UAAU,qBAAqB,eAAe,UAAU;EAOxD,WAAW"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { edgeTo } from "./construct-interface.mjs";
|
|
2
|
+
import { canonicalId, provideKey } from "@geekmidas/manifest";
|
|
3
|
+
//#region src/mobile-app.ts
|
|
4
|
+
/**
|
|
5
|
+
* `MobileApp` — an Expo app, declared like a site.
|
|
6
|
+
*
|
|
7
|
+
* Its edges are the point, as a site's are. One `.dependsOn([api, auth])` is
|
|
8
|
+
* the fact behind everything a mobile app otherwise has written down by hand:
|
|
9
|
+
*
|
|
10
|
+
* - its `EXPO_PUBLIC_API_URL` and `EXPO_PUBLIC_AUTH_URL`, which locally are
|
|
11
|
+
* the servers' own ports — reachable once the app swaps `localhost` for the
|
|
12
|
+
* address Metro is served from, which is what makes a phone on the LAN work;
|
|
13
|
+
* - with an `Email` among them, Mailpit's inbox on a local stage
|
|
14
|
+
* (`EXPO_PUBLIC_<ID>_INBOX_URL`), so a sign-in link can be opened from the
|
|
15
|
+
* app — unset deployed, where there is no inbox;
|
|
16
|
+
* - its URL scheme (`shop`), the same on every stage;
|
|
17
|
+
* - the scheme in the auth server's and the API's trusted origins — and, on a
|
|
18
|
+
* local stage, the `exp://` origins Expo Go sends from;
|
|
19
|
+
* - Better Auth's Expo plugin on the auth server, and sign-in links an app asks
|
|
20
|
+
* for built on an address the phone can open.
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* export const app = new MobileApp('App', { path: 'apps/app' })
|
|
24
|
+
* .dependsOn([api, auth]);
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Like a site it has no `.service`: it is built by its own toolchain, and
|
|
28
|
+
* consumes addresses rather than connections. Nothing deploys it — EAS and the
|
|
29
|
+
* stores do — so the targets derive *for* it and never run it.
|
|
30
|
+
*/
|
|
31
|
+
var MobileApp = class MobileApp {
|
|
32
|
+
config;
|
|
33
|
+
dependencies;
|
|
34
|
+
id;
|
|
35
|
+
/** The key its scheme arrives under — what its `app.config.ts` reads. */
|
|
36
|
+
keys;
|
|
37
|
+
constructor(id, config, dependencies = []) {
|
|
38
|
+
this.config = config;
|
|
39
|
+
this.dependencies = dependencies;
|
|
40
|
+
this.id = canonicalId(id);
|
|
41
|
+
this.keys = { scheme: provideKey(this.id, "scheme") };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* What this app calls — the surfaces it is built with the URLs of, and the
|
|
45
|
+
* ones that come to trust its scheme.
|
|
46
|
+
*
|
|
47
|
+
* Immutable, like every other builder: it returns a new app rather than
|
|
48
|
+
* changing this one.
|
|
49
|
+
*/
|
|
50
|
+
dependsOn(constructs) {
|
|
51
|
+
return new MobileApp(this.id, this.config, [...this.dependencies, ...constructs.map(edgeTo)]);
|
|
52
|
+
}
|
|
53
|
+
declare() {
|
|
54
|
+
return [{
|
|
55
|
+
kind: "mobile-app",
|
|
56
|
+
id: this.id,
|
|
57
|
+
variant: this.config.variant ?? "expo",
|
|
58
|
+
app: {
|
|
59
|
+
path: this.config.path,
|
|
60
|
+
...this.config.port ? { port: this.config.port } : {},
|
|
61
|
+
...this.config.config ? { config: this.config.config } : {}
|
|
62
|
+
},
|
|
63
|
+
...this.config.scheme ? { scheme: this.config.scheme } : {},
|
|
64
|
+
...this.config.stages ? { stages: this.config.stages } : {},
|
|
65
|
+
dependencies: this.dependencies,
|
|
66
|
+
provides: [this.keys.scheme]
|
|
67
|
+
}];
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { MobileApp };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=mobile-app.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-app.mjs","names":[],"sources":["../src/mobile-app.ts"],"sourcesContent":["/**\n * `MobileApp` — an Expo app, declared like a site.\n *\n * Its edges are the point, as a site's are. One `.dependsOn([api, auth])` is\n * the fact behind everything a mobile app otherwise has written down by hand:\n *\n * - its `EXPO_PUBLIC_API_URL` and `EXPO_PUBLIC_AUTH_URL`, which locally are\n * the servers' own ports — reachable once the app swaps `localhost` for the\n * address Metro is served from, which is what makes a phone on the LAN work;\n * - with an `Email` among them, Mailpit's inbox on a local stage\n * (`EXPO_PUBLIC_<ID>_INBOX_URL`), so a sign-in link can be opened from the\n * app — unset deployed, where there is no inbox;\n * - its URL scheme (`shop`), the same on every stage;\n * - the scheme in the auth server's and the API's trusted origins — and, on a\n * local stage, the `exp://` origins Expo Go sends from;\n * - Better Auth's Expo plugin on the auth server, and sign-in links an app asks\n * for built on an address the phone can open.\n *\n * ```ts\n * export const app = new MobileApp('App', { path: 'apps/app' })\n * .dependsOn([api, auth]);\n * ```\n *\n * Like a site it has no `.service`: it is built by its own toolchain, and\n * consumes addresses rather than connections. Nothing deploys it — EAS and the\n * stores do — so the targets derive *for* it and never run it.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\ttype Dependency,\n\ttype MobileAppDeclaration,\n\ttype MobileAppStage,\n\tprovideKey,\n} from '@geekmidas/manifest';\nimport { type Declarable, edgeTo } from './construct-interface';\n\nexport interface MobileAppConfig {\n\t/**\n\t * Where its source lives, relative to the workspace root — `'apps/app'`.\n\t * Required, the same field a site and a surface take.\n\t */\n\tpath: string;\n\t/**\n\t * The port Metro serves it on locally.\n\t *\n\t * Normally omitted: ports are assigned in a stable order, as a site's are,\n\t * and `gkm exec` hands it to Expo as `RCT_METRO_PORT`.\n\t */\n\tport?: number;\n\t/**\n\t * Modules to import when sniffing which env vars the app reads — its\n\t * values are inlined at build time, as a site's are.\n\t */\n\tconfig?: { client?: string; server?: string };\n\t/**\n\t * Which toolchain builds it — the same field a site names its framework\n\t * by. Expo is the one that ships, and the default.\n\t */\n\tvariant?: MobileAppDeclaration['variant'];\n\t/**\n\t * Its URL scheme.\n\t *\n\t * Normally omitted: it is the project's name — `shop` — on every stage.\n\t * Give one only when the app is known by another name.\n\t */\n\tscheme?: string;\n\t/**\n\t * How a deployed stage ships it, where that differs from the defaults: the\n\t * protected stage reads EAS's `production` environment and submits to\n\t * Play's `production` track, every other deployed stage `preview` and\n\t * `internal`, and every Android release is a `draft` until someone\n\t * releases it in Play Console.\n\t *\n\t * ```ts\n\t * stages: { beta: { environment: 'preview', android: { track: 'alpha' } } }\n\t * ```\n\t */\n\tstages?: Readonly<Record<string, MobileAppStage>>;\n}\n\nexport class MobileApp<TName extends string = string>\n\timplements Declarable<TName>\n{\n\treadonly id: TName;\n\t/** The key its scheme arrives under — what its `app.config.ts` reads. */\n\treadonly keys: { scheme: string };\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly config: MobileAppConfig,\n\t\t/** Internal: how `.dependsOn()` carries edges into the copy it returns. */\n\t\tprivate readonly dependencies: readonly Dependency[] = [],\n\t) {\n\t\tthis.id = canonicalId(id as string) as TName;\n\t\tthis.keys = { scheme: provideKey(this.id, 'scheme') };\n\t}\n\n\t/**\n\t * What this app calls — the surfaces it is built with the URLs of, and the\n\t * ones that come to trust its scheme.\n\t *\n\t * Immutable, like every other builder: it returns a new app rather than\n\t * changing this one.\n\t */\n\tdependsOn(constructs: readonly Declarable[]): MobileApp<TName> {\n\t\treturn new MobileApp<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: 'mobile-app',\n\t\t\t\tid: this.id,\n\t\t\t\tvariant: this.config.variant ?? 'expo',\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.scheme ? { scheme: this.config.scheme } : {}),\n\t\t\t\t...(this.config.stages ? { stages: this.config.stages } : {}),\n\t\t\t\tdependencies: this.dependencies,\n\t\t\t\tprovides: [this.keys.scheme],\n\t\t\t},\n\t\t];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,IAAa,YAAb,MAAa,UAEb;CAOmB;CAEA;CARlB;;CAEA;CAEA,YACC,IACA,QAEA,eAAuD,CAAC,GACvD;EAHgB,KAAA,SAAA;EAEA,KAAA,eAAA;EAEjB,KAAK,KAAK,YAAY,EAAY;EAClC,KAAK,OAAO,EAAE,QAAQ,WAAW,KAAK,IAAI,QAAQ,EAAE;CACrD;;;;;;;;CASA,UAAU,YAAqD;EAC9D,OAAO,IAAI,UAAiB,KAAK,IAA4B,KAAK,QAAQ,CACzE,GAAG,KAAK,cACR,GAAG,WAAW,IAAI,MAAM,CACzB,CAAC;CACF;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,SAAS,KAAK,OAAO,WAAW;GAChC,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,SAAS,EAAE,QAAQ,KAAK,OAAO,OAAO,IAAI,CAAC;GAC3D,GAAI,KAAK,OAAO,SAAS,EAAE,QAAQ,KAAK,OAAO,OAAO,IAAI,CAAC;GAC3D,cAAc,KAAK;GACnB,UAAU,CAAC,KAAK,KAAK,MAAM;EAC5B,CACD;CACD;AACD"}
|
package/dist/object-storage.cjs
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
3
|
+
let _geekmidas_storage = require("@geekmidas/storage");
|
|
5
4
|
//#region src/object-storage.ts
|
|
5
|
+
/**
|
|
6
|
+
* `ObjectStorage` — a declared bucket.
|
|
7
|
+
*
|
|
8
|
+
* Where the three packages meet: it implements the construct contract, derives
|
|
9
|
+
* its env key through `@geekmidas/manifest`, and hands back a
|
|
10
|
+
* `@geekmidas/storage` client. It names no cloud — `--target=aws` fills the
|
|
11
|
+
* injected URL with S3's values, local dev with MinIO's.
|
|
12
|
+
*/
|
|
6
13
|
var ObjectStorage = class {
|
|
14
|
+
options;
|
|
7
15
|
id;
|
|
8
16
|
service;
|
|
9
17
|
/**
|
|
@@ -14,12 +22,12 @@ var ObjectStorage = class {
|
|
|
14
22
|
keys;
|
|
15
23
|
constructor(id, options = {}) {
|
|
16
24
|
this.options = options;
|
|
17
|
-
const canonical = (0,
|
|
25
|
+
const canonical = (0, _geekmidas_manifest.canonicalId)(id);
|
|
18
26
|
this.id = canonical;
|
|
19
|
-
this.keys = { url: (0,
|
|
27
|
+
this.keys = { url: (0, _geekmidas_manifest.provideKey)(canonical, "url") };
|
|
20
28
|
this.service = {
|
|
21
|
-
serviceName: (0,
|
|
22
|
-
register: (options
|
|
29
|
+
serviceName: (0, _geekmidas_manifest.serviceKey)(canonical),
|
|
30
|
+
register: (options) => this.connect(options)
|
|
23
31
|
};
|
|
24
32
|
}
|
|
25
33
|
declare() {
|
|
@@ -39,10 +47,10 @@ var ObjectStorage = class {
|
|
|
39
47
|
*/
|
|
40
48
|
async connect({ envParser }) {
|
|
41
49
|
const { url } = envParser.create((get) => ({ url: get(this.keys.url).string() })).parse();
|
|
42
|
-
return (0,
|
|
50
|
+
return (0, _geekmidas_storage.createStorageClient)(url);
|
|
43
51
|
}
|
|
44
52
|
};
|
|
45
|
-
|
|
46
53
|
//#endregion
|
|
47
54
|
exports.ObjectStorage = ObjectStorage;
|
|
55
|
+
|
|
48
56
|
//# sourceMappingURL=object-storage.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-storage.cjs","names":["
|
|
1
|
+
{"version":3,"file":"object-storage.cjs","names":["canonicalId","provideKey","serviceKey","createStorageClient"],"sources":["../src/object-storage.ts"],"sourcesContent":["/**\n * `ObjectStorage` — a declared bucket.\n *\n * Where the three packages meet: it implements the construct contract, derives\n * its env key through `@geekmidas/manifest`, and hands back a\n * `@geekmidas/storage` client. It names no cloud — `--target=aws` fills the\n * injected URL with S3's values, local dev with MinIO's.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\tprovideKey,\n\tserviceKey,\n} from '@geekmidas/manifest';\nimport type { Service, ServiceRegisterOptions } from '@geekmidas/services';\nimport { createStorageClient, type StorageClient } from '@geekmidas/storage';\nimport type { Construct } from './construct-interface';\n\nexport interface ObjectStorageOptions {\n\t/** Keep previous versions of an object. */\n\tversioned?: boolean;\n}\n\nexport class ObjectStorage<TName extends string = string>\n\timplements Construct<TName, StorageClient>\n{\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, StorageClient>;\n\n\t/**\n\t * Declared once and read by both `declare()` and `connect()`, so the key the\n\t * build publishes and the key the client reads cannot drift — the whole point\n\t * of the construct owning both faces.\n\t */\n\tprivate readonly keys: { url: string };\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly options: ObjectStorageOptions = {},\n\t) {\n\t\t// Canonicalises, so `uploads` and `Uploads` are one construct rather than\n\t\t// two that collide. Throws on anything that cannot become a valid id.\n\t\tconst canonical = canonicalId(id as string);\n\n\t\tthis.id = canonical as TName;\n\t\tthis.keys = { url: provideKey(canonical, 'url') };\n\n\t\t// A field, not a getter: consumers cache services by object identity.\n\t\tthis.service = {\n\t\t\tserviceName: serviceKey(canonical) as Uncapitalize<TName>,\n\t\t\tregister: (options) => this.connect(options),\n\t\t};\n\t}\n\n\tdeclare(): Declaration[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'objects',\n\t\t\t\tid: this.id,\n\t\t\t\tprovides: [this.keys.url],\n\t\t\t\t...(this.options.versioned ? { versioned: true } : {}),\n\t\t\t},\n\t\t];\n\t}\n\n\t/**\n\t * Builds the client from the single URL the adapter supplied.\n\t *\n\t * The URL's scheme selects the driver, so this construct imports no provider\n\t * and an app that never touches S3 never resolves the AWS SDK. Whoever\n\t * assembles the application registers the drivers its target needs.\n\t */\n\tprivate async connect({\n\t\tenvParser,\n\t}: ServiceRegisterOptions): Promise<StorageClient> {\n\t\tconst { url } = envParser\n\t\t\t.create((get) => ({ url: get(this.keys.url).string() }))\n\t\t\t.parse();\n\n\t\treturn createStorageClient(url);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAyBA,IAAa,gBAAb,MAEA;CAamB;CAZlB;CACA;;;;;;CAOA;CAEA,YACC,IACA,UAAiD,CAAC,GACjD;EADgB,KAAA,UAAA;EAIjB,MAAM,aAAA,GAAYA,oBAAAA,YAAAA,CAAY,EAAY;EAE1C,KAAK,KAAK;EACV,KAAK,OAAO,EAAE,MAAA,GAAKC,oBAAAA,WAAAA,CAAW,WAAW,KAAK,EAAE;EAGhD,KAAK,UAAU;GACd,cAAA,GAAaC,oBAAAA,WAAAA,CAAW,SAAS;GACjC,WAAW,YAAY,KAAK,QAAQ,OAAO;EAC5C;CACD;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,UAAU,CAAC,KAAK,KAAK,GAAG;GACxB,GAAI,KAAK,QAAQ,YAAY,EAAE,WAAW,KAAK,IAAI,CAAC;EACrD,CACD;CACD;;;;;;;;CASA,MAAc,QAAQ,EACrB,aACkD;EAClD,MAAM,EAAE,QAAQ,UACd,QAAQ,SAAS,EAAE,KAAK,IAAI,KAAK,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACvD,MAAM;EAER,QAAA,GAAOC,mBAAAA,oBAAAA,CAAoB,GAAG;CAC/B;AACD"}
|