@geekmidas/constructs 10.0.0-alpha.98 → 10.0.0
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/CHANGELOG.md +437 -0
- package/README.md +193 -285
- package/dist/AWSScheduledFunction-BzGCUbkk.d.mts +117 -0
- package/dist/AWSScheduledFunction-BzGCUbkk.d.mts.map +1 -0
- package/dist/AWSScheduledFunction-C42adp8A.cjs +266 -0
- package/dist/AWSScheduledFunction-C42adp8A.cjs.map +1 -0
- package/dist/AWSScheduledFunction-CsNJhXQj.d.cts +117 -0
- package/dist/AWSScheduledFunction-CsNJhXQj.d.cts.map +1 -0
- package/dist/AWSScheduledFunction-KP6lqbsW.mjs +254 -0
- package/dist/AWSScheduledFunction-KP6lqbsW.mjs.map +1 -0
- package/dist/{Construct-B1vGBPme.mjs → Construct-BWF5HxaM.mjs} +37 -47
- package/dist/Construct-BWF5HxaM.mjs.map +1 -0
- package/dist/Construct-JlyQkBkv.d.cts +117 -0
- package/dist/Construct-JlyQkBkv.d.cts.map +1 -0
- package/dist/{Construct-DUSXuTHP.cjs → Construct-TGIM_E4o.cjs} +88 -67
- package/dist/Construct-TGIM_E4o.cjs.map +1 -0
- package/dist/Construct-pxwC6fDD.d.mts +117 -0
- package/dist/Construct-pxwC6fDD.d.mts.map +1 -0
- package/dist/{Endpoint-Du-NwPX2.d.mts → Endpoint-B0P_pEMr.d.mts} +85 -126
- package/dist/Endpoint-B0P_pEMr.d.mts.map +1 -0
- package/dist/{Endpoint-aCvBMPoH.d.cts → Endpoint-BLZ7r67m.d.cts} +84 -125
- package/dist/Endpoint-BLZ7r67m.d.cts.map +1 -0
- package/dist/{HonoEndpointAdaptor-PtPlbeKY.mjs → HonoEndpointAdaptor-BMVwx2cz.mjs} +69 -81
- package/dist/HonoEndpointAdaptor-BMVwx2cz.mjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-zVzVLJEO.cjs → HonoEndpointAdaptor-DPDsDi-D.cjs} +77 -92
- package/dist/HonoEndpointAdaptor-DPDsDi-D.cjs.map +1 -0
- package/dist/Queue-BL68oDJ-.d.mts +66 -0
- package/dist/Queue-BL68oDJ-.d.mts.map +1 -0
- package/dist/Queue-DxJ6btRE.d.cts +66 -0
- package/dist/Queue-DxJ6btRE.d.cts.map +1 -0
- package/dist/Subscriber-BpVhcGhX.d.cts +47 -0
- package/dist/Subscriber-BpVhcGhX.d.cts.map +1 -0
- package/dist/Subscriber-DF6xsBAJ.d.mts +47 -0
- package/dist/Subscriber-DF6xsBAJ.d.mts.map +1 -0
- package/dist/Topic-DJXoDeMP.d.cts +60 -0
- package/dist/Topic-DJXoDeMP.d.cts.map +1 -0
- package/dist/Topic-DxWQBgMN.d.mts +60 -0
- package/dist/Topic-DxWQBgMN.d.mts.map +1 -0
- package/dist/adaptors/aws.cjs +205 -355
- package/dist/adaptors/aws.cjs.map +1 -1
- package/dist/adaptors/aws.d.cts +48 -126
- package/dist/adaptors/aws.d.cts.map +1 -1
- package/dist/adaptors/aws.d.mts +49 -127
- package/dist/adaptors/aws.d.mts.map +1 -1
- package/dist/adaptors/aws.mjs +178 -325
- package/dist/adaptors/aws.mjs.map +1 -1
- package/dist/adaptors/hono.cjs +9 -3
- package/dist/adaptors/hono.d.cts +15 -7
- package/dist/adaptors/hono.d.cts.map +1 -1
- package/dist/adaptors/hono.d.mts +17 -9
- package/dist/adaptors/hono.d.mts.map +1 -1
- package/dist/adaptors/hono.mjs +9 -2
- package/dist/adaptors/testing.cjs +209 -831
- package/dist/adaptors/testing.cjs.map +1 -1
- package/dist/adaptors/testing.d.cts +55 -351
- package/dist/adaptors/testing.d.cts.map +1 -1
- package/dist/adaptors/testing.d.mts +53 -349
- package/dist/adaptors/testing.d.mts.map +1 -1
- package/dist/adaptors/testing.mjs +195 -798
- package/dist/adaptors/testing.mjs.map +1 -1
- package/dist/{clone-UGJpvQnL.cjs → clone-I_WIpiFf.cjs} +8 -7
- package/dist/clone-I_WIpiFf.cjs.map +1 -0
- package/dist/{clone-EKNovYHu.mjs → clone-pdXxc0t3.mjs} +3 -3
- package/dist/clone-pdXxc0t3.mjs.map +1 -0
- package/dist/crons/index.cjs +66 -190
- package/dist/crons/index.cjs.map +1 -1
- package/dist/crons/index.d.cts +35 -70
- package/dist/crons/index.d.cts.map +1 -1
- package/dist/crons/index.d.mts +32 -70
- package/dist/crons/index.d.mts.map +1 -1
- package/dist/crons/index.mjs +63 -184
- package/dist/crons/index.mjs.map +1 -1
- package/dist/endpoints/index.cjs +761 -19
- package/dist/endpoints/index.cjs.map +1 -0
- package/dist/endpoints/index.d.cts +322 -22
- package/dist/endpoints/index.d.cts.map +1 -1
- package/dist/endpoints/index.d.mts +321 -22
- package/dist/endpoints/index.d.mts.map +1 -1
- package/dist/endpoints/index.mjs +751 -6
- package/dist/endpoints/index.mjs.map +1 -0
- package/dist/functions/index.cjs +5 -2
- package/dist/functions/index.d.cts +3 -3
- package/dist/functions/index.d.mts +3 -3
- package/dist/functions/index.mjs +5 -2
- package/dist/{functions-BFizikJU.mjs → functions-EqTloHjo.mjs} +331 -425
- package/dist/functions-EqTloHjo.mjs.map +1 -0
- package/dist/{functions-CfzJG9hK.cjs → functions-SqtCDc9c.cjs} +370 -459
- package/dist/functions-SqtCDc9c.cjs.map +1 -0
- package/dist/index-C7iynzLI.d.mts +139 -0
- package/dist/index-C7iynzLI.d.mts.map +1 -0
- package/dist/index-D4dM_WDY.d.cts +142 -0
- package/dist/index-D4dM_WDY.d.cts.map +1 -0
- package/dist/index.cjs +3 -6
- package/dist/index.d.cts +4 -27
- package/dist/index.d.mts +4 -27
- package/dist/index.mjs +3 -3
- package/dist/{Endpoint-BG4UJ9oA.mjs → lazyAccessors-CCTK19xj.mjs} +1040 -914
- package/dist/lazyAccessors-CCTK19xj.mjs.map +1 -0
- package/dist/{Endpoint-BoUg8ocM.cjs → lazyAccessors-D04oftGw.cjs} +1127 -960
- package/dist/lazyAccessors-D04oftGw.cjs.map +1 -0
- package/dist/monitors/index.cjs +49 -0
- package/dist/monitors/index.cjs.map +1 -0
- package/dist/monitors/index.d.cts +45 -0
- package/dist/monitors/index.d.cts.map +1 -0
- package/dist/monitors/index.d.mts +45 -0
- package/dist/monitors/index.d.mts.map +1 -0
- package/dist/monitors/index.mjs +48 -0
- package/dist/monitors/index.mjs.map +1 -0
- package/dist/processAudits-BJZT5gmy.cjs +92 -0
- package/dist/processAudits-BJZT5gmy.cjs.map +1 -0
- package/dist/processAudits-CwyaaSQc.mjs +80 -0
- package/dist/processAudits-CwyaaSQc.mjs.map +1 -0
- package/dist/publisher-BZgcrVPy.cjs +53 -0
- package/dist/publisher-BZgcrVPy.cjs.map +1 -0
- package/dist/publisher-CnpeMv-r.mjs +41 -0
- package/dist/publisher-CnpeMv-r.mjs.map +1 -0
- package/dist/queue/index.cjs +114 -6
- package/dist/queue/index.cjs.map +1 -0
- package/dist/queue/index.d.cts +45 -3
- package/dist/queue/index.d.cts.map +1 -0
- package/dist/queue/index.d.mts +44 -3
- package/dist/queue/index.d.mts.map +1 -0
- package/dist/queue/index.mjs +112 -3
- package/dist/queue/index.mjs.map +1 -0
- package/dist/subscribers/index.cjs +80 -111
- package/dist/subscribers/index.cjs.map +1 -1
- package/dist/subscribers/index.d.cts +43 -46
- package/dist/subscribers/index.d.cts.map +1 -1
- package/dist/subscribers/index.d.mts +42 -46
- package/dist/subscribers/index.d.mts.map +1 -1
- package/dist/subscribers/index.mjs +78 -108
- package/dist/subscribers/index.mjs.map +1 -1
- package/dist/{lambdaTelemetry-8vnmVZQ5.d.cts → telemetry-C--EgYVr.d.mts} +7 -4
- package/dist/telemetry-C--EgYVr.d.mts.map +1 -0
- package/dist/{lambdaTelemetry-8vnmVZQ5.d.mts → telemetry-Dqx-D3F7.d.cts} +7 -4
- package/dist/telemetry-Dqx-D3F7.d.cts.map +1 -0
- package/dist/topic/index.cjs +91 -3
- package/dist/topic/index.cjs.map +1 -0
- package/dist/topic/index.d.cts +32 -2
- package/dist/topic/index.d.cts.map +1 -0
- package/dist/topic/index.d.mts +32 -2
- package/dist/topic/index.d.mts.map +1 -0
- package/dist/topic/index.mjs +89 -2
- package/dist/topic/index.mjs.map +1 -0
- package/dist/{types-DMuSQeLL.d.cts → types-BdAaYDvd.d.cts} +5 -3
- package/dist/types-BdAaYDvd.d.cts.map +1 -0
- package/dist/{types-DMuSQeLL.d.mts → types-DNngH0fX.d.mts} +5 -3
- package/dist/types-DNngH0fX.d.mts.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.mjs +0 -1
- package/package.json +55 -223
- package/src/Construct.ts +209 -0
- package/src/__benchmarks__/build-time-optimization.bench.ts +274 -0
- package/src/__benchmarks__/endpoint.bench.ts +494 -0
- package/src/__benchmarks__/fixtures.ts +241 -0
- package/src/__benchmarks__/hono-adaptor.bench.ts +533 -0
- package/src/__benchmarks__/hono-server.bench.ts +249 -0
- package/src/__benchmarks__/response-builder.bench.ts +428 -0
- package/src/__benchmarks__/strategies/strategy-a-lazy-services.ts +319 -0
- package/src/__benchmarks__/strategies/strategy-c-middleware.ts +530 -0
- package/src/__benchmarks__/strategies/strategy-d-opt-in-events.ts +567 -0
- package/src/__tests__/Construct.environment.spec.ts +704 -0
- package/src/__tests__/builder-reuse.spec.ts +587 -0
- package/src/__tests__/monitor.spec.ts +636 -0
- package/src/__tests__/publisher.setting.spec.ts +508 -0
- package/src/__tests__/publisher.spec.ts +452 -0
- package/src/adaptors/aws.ts +6 -0
- package/src/adaptors/hono.ts +1 -0
- package/src/adaptors/testing.ts +11 -0
- package/src/clone.ts +38 -0
- package/src/crons/AWSScheduledFunction.ts +73 -0
- package/src/crons/Cron.ts +149 -0
- package/src/crons/CronBuilder.ts +261 -0
- package/src/crons/__tests__/AWSScheduledFunction.spec.ts +152 -0
- package/src/crons/__tests__/Cron.spec.ts +472 -0
- package/src/crons/__tests__/CronBuilder.state-isolation.spec.ts +273 -0
- package/src/crons/index.ts +12 -0
- package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +698 -0
- package/src/endpoints/AmazonApiGatewayV1EndpointAdaptor.ts +105 -0
- package/src/endpoints/AmazonApiGatewayV2EndpointAdaptor.ts +97 -0
- package/src/endpoints/Authorizer.ts +152 -0
- package/src/endpoints/Endpoint.ts +1287 -0
- package/src/endpoints/EndpointBuilder.ts +749 -0
- package/src/endpoints/EndpointFactory.ts +1179 -0
- package/src/endpoints/HonoEndpointAdaptor.ts +692 -0
- package/src/endpoints/MswEndpointAdaptor.ts +226 -0
- package/src/endpoints/TestEndpointAdaptor.ts +466 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.audits.spec.ts +499 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.events.spec.ts +560 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.spec.ts +1304 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.audits.spec.ts +626 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.events.spec.ts +732 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.factory-publisher.spec.ts +296 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.kysely-audit.integration.spec.ts +951 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.responseType.spec.ts +111 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.rls.spec.ts +307 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.spec.ts +629 -0
- package/src/endpoints/__tests__/Authorizer.spec.ts +286 -0
- package/src/endpoints/__tests__/Endpoint.cookies.spec.ts +207 -0
- package/src/endpoints/__tests__/Endpoint.headers.spec.ts +187 -0
- package/src/endpoints/__tests__/Endpoint.manifest.spec.ts +175 -0
- package/src/endpoints/__tests__/Endpoint.spec.ts +857 -0
- package/src/endpoints/__tests__/EndpointBuilder.audit.spec.ts +451 -0
- package/src/endpoints/__tests__/EndpointBuilder.responseType.spec.ts +50 -0
- package/src/endpoints/__tests__/EndpointBuilder.spec.ts +531 -0
- package/src/endpoints/__tests__/EndpointFactory.authorizers.spec.ts +492 -0
- package/src/endpoints/__tests__/EndpointFactory.database-auditor.spec.ts +509 -0
- package/src/endpoints/__tests__/EndpointFactory.reference-audit.spec.ts +190 -0
- package/src/endpoints/__tests__/EndpointFactory.spec.ts +479 -0
- package/src/endpoints/__tests__/EndpointFactory.state-isolation.spec.ts +155 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.audit-transactions.spec.ts +703 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.audits.spec.ts +632 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.events.spec.ts +577 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.kysely-audit.integration.spec.ts +1067 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.openapi.spec.ts +317 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.pgboss-publisher.spec.ts +289 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.responseType.spec.ts +128 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.spec.ts +1207 -0
- package/src/endpoints/__tests__/MswEndpointAdaptor.spec.ts +211 -0
- package/src/endpoints/__tests__/ResponseBuilder.spec.ts +235 -0
- package/src/endpoints/__tests__/TestEndpointAdaptor.audits.spec.ts +602 -0
- package/src/endpoints/__tests__/TestEndpointAdaptor.spec.ts +1044 -0
- package/src/endpoints/__tests__/__snapshots__/HonoEndpointAdaptor.spec.ts.snap +54 -0
- package/src/endpoints/__tests__/endpoint-types.test.ts +88 -0
- package/src/endpoints/__tests__/helpers.spec.ts +37 -0
- package/src/endpoints/__tests__/lazyAccessors.spec.ts +330 -0
- package/src/endpoints/__tests__/processAudits.spec.ts +631 -0
- package/src/endpoints/audit.ts +87 -0
- package/src/endpoints/helpers.ts +98 -0
- package/src/endpoints/index.ts +42 -0
- package/src/endpoints/lazyAccessors.ts +241 -0
- package/src/endpoints/parseHonoQuery.ts +16 -0
- package/src/endpoints/parseQueryParams.ts +32 -0
- package/src/endpoints/processAudits.ts +371 -0
- package/src/endpoints/rls.ts +67 -0
- package/src/functions/AWSLambdaFunction.ts +374 -0
- package/src/functions/BaseFunctionBuilder.ts +212 -0
- package/src/functions/Function.ts +238 -0
- package/src/functions/FunctionBuilder.ts +381 -0
- package/src/functions/FunctionExecutionWrapper.ts +216 -0
- package/src/functions/TestFunctionAdaptor.ts +252 -0
- package/src/functions/__tests__/AWSLambdaFunctionAdaptor.spec.ts +513 -0
- package/src/functions/__tests__/Function.audits.spec.ts +393 -0
- package/src/functions/__tests__/Function.spec.ts +477 -0
- package/src/functions/__tests__/FunctionBuilder.state-isolation.spec.ts +250 -0
- package/src/functions/__tests__/TestFunctionAdaptor.spec.ts +480 -0
- package/src/functions/index.ts +12 -0
- package/src/index.ts +29 -0
- package/src/monitor.ts +145 -0
- package/src/monitors/heartbeat.ts +86 -0
- package/src/monitors/index.ts +6 -0
- package/src/publisher.ts +93 -0
- package/src/queue/AWSLambdaQueueAdaptor.ts +162 -0
- package/src/queue/Queue.ts +128 -0
- package/src/queue/QueueBuilder.ts +115 -0
- package/src/queue/TestQueueAdaptor.ts +63 -0
- package/src/queue/__tests__/QueueBuilder.spec.ts +137 -0
- package/src/queue/index.ts +12 -0
- package/src/subscribers/AWSLambdaSubscriberAdaptor.ts +342 -0
- package/src/subscribers/Subscriber.ts +117 -0
- package/src/subscribers/SubscriberBuilder.ts +183 -0
- package/src/subscribers/TestSubscriberAdaptor.ts +133 -0
- package/src/subscribers/__tests__/AWSLambdaSubscriberAdaptor.spec.ts +1018 -0
- package/src/subscribers/__tests__/Subscriber.spec.ts +430 -0
- package/src/subscribers/__tests__/TestSubscriberAdaptor.spec.ts +652 -0
- package/src/subscribers/index.ts +6 -0
- package/src/telemetry.ts +103 -0
- package/src/topic/Topic.ts +103 -0
- package/src/topic/TopicBuilder.ts +53 -0
- package/src/topic/__tests__/TopicBuilder.spec.ts +82 -0
- package/src/topic/index.ts +11 -0
- package/src/types.ts +13 -0
- package/test.ts +91 -0
- package/tsconfig.json +9 -0
- package/tsdown.config.ts +35 -0
- package/dist/Construct-B1vGBPme.mjs.map +0 -1
- package/dist/Construct-BQALFCh2.d.cts +0 -230
- package/dist/Construct-BQALFCh2.d.cts.map +0 -1
- package/dist/Construct-DUSXuTHP.cjs.map +0 -1
- package/dist/Construct-QXnl3VqT.d.mts +0 -230
- package/dist/Construct-QXnl3VqT.d.mts.map +0 -1
- package/dist/Cron-DI3nKoic.d.cts +0 -45
- package/dist/Cron-DI3nKoic.d.cts.map +0 -1
- package/dist/Cron-uYAHPnp7.d.mts +0 -45
- package/dist/Cron-uYAHPnp7.d.mts.map +0 -1
- package/dist/CronBuilder-C0Ek1-RA.cjs +0 -121
- package/dist/CronBuilder-C0Ek1-RA.cjs.map +0 -1
- package/dist/CronBuilder-DaSUm2Na.d.mts +0 -47
- package/dist/CronBuilder-DaSUm2Na.d.mts.map +0 -1
- package/dist/CronBuilder-Dmix_Pen.mjs +0 -109
- package/dist/CronBuilder-Dmix_Pen.mjs.map +0 -1
- package/dist/CronBuilder-g1lZLWyG.d.cts +0 -47
- package/dist/CronBuilder-g1lZLWyG.d.cts.map +0 -1
- package/dist/Endpoint-BG4UJ9oA.mjs.map +0 -1
- package/dist/Endpoint-BoUg8ocM.cjs.map +0 -1
- package/dist/Endpoint-Du-NwPX2.d.mts.map +0 -1
- package/dist/Endpoint-aCvBMPoH.d.cts.map +0 -1
- package/dist/EndpointFactory-BDtsrEvJ.mjs +0 -791
- package/dist/EndpointFactory-BDtsrEvJ.mjs.map +0 -1
- package/dist/EndpointFactory-DJ7gXLpR.cjs +0 -833
- package/dist/EndpointFactory-DJ7gXLpR.cjs.map +0 -1
- package/dist/EndpointFactory-DMYdJCOj.d.mts +0 -363
- package/dist/EndpointFactory-DMYdJCOj.d.mts.map +0 -1
- package/dist/EndpointFactory-I7s1co3Y.d.cts +0 -363
- package/dist/EndpointFactory-I7s1co3Y.d.cts.map +0 -1
- package/dist/Function-DuqGcbOI.d.mts +0 -76
- package/dist/Function-DuqGcbOI.d.mts.map +0 -1
- package/dist/Function-Pu-1kKZz.d.cts +0 -76
- package/dist/Function-Pu-1kKZz.d.cts.map +0 -1
- package/dist/HonoEndpointAdaptor-PtPlbeKY.mjs.map +0 -1
- package/dist/HonoEndpointAdaptor-zVzVLJEO.cjs.map +0 -1
- package/dist/Queue-A3wfD0it.cjs +0 -109
- package/dist/Queue-A3wfD0it.cjs.map +0 -1
- package/dist/Queue-D6USGS4q.mjs +0 -104
- package/dist/Queue-D6USGS4q.mjs.map +0 -1
- package/dist/Queue-DlsHRzUp.d.mts +0 -105
- package/dist/Queue-DlsHRzUp.d.mts.map +0 -1
- package/dist/Queue-HPyi0e1i.d.cts +0 -105
- package/dist/Queue-HPyi0e1i.d.cts.map +0 -1
- package/dist/QueueBuilder-BjuF0UBl.cjs +0 -135
- package/dist/QueueBuilder-BjuF0UBl.cjs.map +0 -1
- package/dist/QueueBuilder-Cue73M4t.mjs +0 -118
- package/dist/QueueBuilder-Cue73M4t.mjs.map +0 -1
- package/dist/QueueBuilder-OSi6LkV9.d.cts +0 -75
- package/dist/QueueBuilder-OSi6LkV9.d.cts.map +0 -1
- package/dist/QueueBuilder-QHsnVt1P.d.mts +0 -75
- package/dist/QueueBuilder-QHsnVt1P.d.mts.map +0 -1
- package/dist/Subscriber-Bpp02cGr.d.cts +0 -61
- package/dist/Subscriber-Bpp02cGr.d.cts.map +0 -1
- package/dist/Subscriber-CtN9R48-.d.mts +0 -61
- package/dist/Subscriber-CtN9R48-.d.mts.map +0 -1
- package/dist/SubscriberBuilder-CDy4nHCz.mjs +0 -134
- package/dist/SubscriberBuilder-CDy4nHCz.mjs.map +0 -1
- package/dist/SubscriberBuilder-CuCMFpYW.d.mts +0 -67
- package/dist/SubscriberBuilder-CuCMFpYW.d.mts.map +0 -1
- package/dist/SubscriberBuilder-D_owVoHo.cjs +0 -145
- package/dist/SubscriberBuilder-D_owVoHo.cjs.map +0 -1
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts +0 -67
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +0 -1
- package/dist/Topic-D74b5cgs.mjs +0 -99
- package/dist/Topic-D74b5cgs.mjs.map +0 -1
- package/dist/Topic-GHxcU8AG.cjs +0 -104
- package/dist/Topic-GHxcU8AG.cjs.map +0 -1
- package/dist/auth-BMCJN30Y.d.cts +0 -268
- package/dist/auth-BMCJN30Y.d.cts.map +0 -1
- package/dist/auth-CcuceLYo.d.mts +0 -268
- package/dist/auth-CcuceLYo.d.mts.map +0 -1
- package/dist/auth.cjs +0 -433
- package/dist/auth.cjs.map +0 -1
- package/dist/auth.d.cts +0 -2
- package/dist/auth.d.mts +0 -2
- package/dist/auth.mjs +0 -426
- package/dist/auth.mjs.map +0 -1
- package/dist/cache-CXh6GIgb.d.mts +0 -44
- package/dist/cache-CXh6GIgb.d.mts.map +0 -1
- package/dist/cache-DnGDGly3.d.cts +0 -44
- package/dist/cache-DnGDGly3.d.cts.map +0 -1
- package/dist/cache.cjs +0 -69
- package/dist/cache.cjs.map +0 -1
- package/dist/cache.d.cts +0 -2
- package/dist/cache.d.mts +0 -2
- package/dist/cache.mjs +0 -68
- package/dist/cache.mjs.map +0 -1
- package/dist/cipher-C1lEFX63.mjs +0 -225
- package/dist/cipher-C1lEFX63.mjs.map +0 -1
- package/dist/cipher-CVxfwLjk.cjs +0 -332
- package/dist/cipher-CVxfwLjk.cjs.map +0 -1
- package/dist/clone-EKNovYHu.mjs.map +0 -1
- package/dist/clone-UGJpvQnL.cjs.map +0 -1
- package/dist/construct-interface-B1AfqRl4.d.cts +0 -162
- package/dist/construct-interface-B1AfqRl4.d.cts.map +0 -1
- package/dist/construct-interface-DluK3_da.d.mts +0 -162
- package/dist/construct-interface-DluK3_da.d.mts.map +0 -1
- package/dist/construct-interface.cjs +0 -114
- package/dist/construct-interface.cjs.map +0 -1
- package/dist/construct-interface.d.cts +0 -2
- package/dist/construct-interface.d.mts +0 -2
- package/dist/construct-interface.mjs +0 -107
- package/dist/construct-interface.mjs.map +0 -1
- package/dist/credential.cjs +0 -156
- package/dist/credential.cjs.map +0 -1
- package/dist/credential.d.cts +0 -86
- package/dist/credential.d.cts.map +0 -1
- package/dist/credential.d.mts +0 -86
- package/dist/credential.d.mts.map +0 -1
- package/dist/credential.mjs +0 -152
- package/dist/credential.mjs.map +0 -1
- package/dist/database/kysely.cjs +0 -4
- package/dist/database/kysely.d.cts +0 -2
- package/dist/database/kysely.d.mts +0 -2
- package/dist/database/kysely.mjs +0 -2
- package/dist/email.cjs +0 -72
- package/dist/email.cjs.map +0 -1
- package/dist/email.d.cts +0 -46
- package/dist/email.d.cts.map +0 -1
- package/dist/email.d.mts +0 -46
- package/dist/email.d.mts.map +0 -1
- package/dist/email.mjs +0 -71
- package/dist/email.mjs.map +0 -1
- package/dist/encryption.cjs +0 -96
- package/dist/encryption.cjs.map +0 -1
- package/dist/encryption.d.cts +0 -117
- package/dist/encryption.d.cts.map +0 -1
- package/dist/encryption.d.mts +0 -117
- package/dist/encryption.d.mts.map +0 -1
- package/dist/encryption.mjs +0 -83
- package/dist/encryption.mjs.map +0 -1
- package/dist/external-api-MJ8id87V.d.mts +0 -105
- package/dist/external-api-MJ8id87V.d.mts.map +0 -1
- package/dist/external-api-O107yzZJ.d.cts +0 -105
- package/dist/external-api-O107yzZJ.d.cts.map +0 -1
- package/dist/external-api.cjs +0 -142
- package/dist/external-api.cjs.map +0 -1
- package/dist/external-api.d.cts +0 -2
- package/dist/external-api.d.mts +0 -2
- package/dist/external-api.mjs +0 -139
- package/dist/external-api.mjs.map +0 -1
- package/dist/file-server.cjs +0 -186
- package/dist/file-server.cjs.map +0 -1
- package/dist/file-server.d.cts +0 -152
- package/dist/file-server.d.cts.map +0 -1
- package/dist/file-server.d.mts +0 -152
- package/dist/file-server.d.mts.map +0 -1
- package/dist/file-server.mjs +0 -184
- package/dist/file-server.mjs.map +0 -1
- package/dist/functions-BFizikJU.mjs.map +0 -1
- package/dist/functions-CfzJG9hK.cjs.map +0 -1
- package/dist/index-BuzRvKOQ.d.cts +0 -115
- package/dist/index-BuzRvKOQ.d.cts.map +0 -1
- package/dist/index-CTkKOer4.d.mts +0 -115
- package/dist/index-CTkKOer4.d.mts.map +0 -1
- package/dist/index-CeEtxDmK.d.cts +0 -79
- package/dist/index-CeEtxDmK.d.cts.map +0 -1
- package/dist/index-CeEtxDmK.d.mts +0 -79
- package/dist/index-CeEtxDmK.d.mts.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/kms-B-Hm3d5r.cjs +0 -85
- package/dist/kms-B-Hm3d5r.cjs.map +0 -1
- package/dist/kms-BdUlMJEZ.mjs +0 -85
- package/dist/kms-BdUlMJEZ.mjs.map +0 -1
- package/dist/kysely-Bii4l6eP.mjs +0 -370
- package/dist/kysely-Bii4l6eP.mjs.map +0 -1
- package/dist/kysely-CO_Dk43W.cjs +0 -383
- package/dist/kysely-CO_Dk43W.cjs.map +0 -1
- package/dist/kysely-D0bpzgPs.d.cts +0 -175
- package/dist/kysely-D0bpzgPs.d.cts.map +0 -1
- package/dist/kysely-DUqC3Ie0.d.mts +0 -175
- package/dist/kysely-DUqC3Ie0.d.mts.map +0 -1
- package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +0 -1
- package/dist/lambdaTelemetry-8vnmVZQ5.d.mts.map +0 -1
- package/dist/lazyAccessors-CFanua0O.mjs +0 -174
- package/dist/lazyAccessors-CFanua0O.mjs.map +0 -1
- package/dist/lazyAccessors-hJKGv8Ay.cjs +0 -221
- package/dist/lazyAccessors-hJKGv8Ay.cjs.map +0 -1
- package/dist/mobile-app.cjs +0 -73
- package/dist/mobile-app.cjs.map +0 -1
- package/dist/mobile-app.d.cts +0 -61
- package/dist/mobile-app.d.cts.map +0 -1
- package/dist/mobile-app.d.mts +0 -61
- package/dist/mobile-app.d.mts.map +0 -1
- package/dist/mobile-app.mjs +0 -72
- package/dist/mobile-app.mjs.map +0 -1
- package/dist/object-storage.cjs +0 -56
- package/dist/object-storage.cjs.map +0 -1
- package/dist/object-storage.d.cts +0 -32
- package/dist/object-storage.d.cts.map +0 -1
- package/dist/object-storage.d.mts +0 -32
- package/dist/object-storage.d.mts.map +0 -1
- package/dist/object-storage.mjs +0 -55
- package/dist/object-storage.mjs.map +0 -1
- package/dist/processAudits-BRRVVHUB.mjs +0 -131
- package/dist/processAudits-BRRVVHUB.mjs.map +0 -1
- package/dist/processAudits-DasOZjPl.cjs +0 -154
- package/dist/processAudits-DasOZjPl.cjs.map +0 -1
- package/dist/rest-api.cjs +0 -216
- package/dist/rest-api.cjs.map +0 -1
- package/dist/rest-api.d.cts +0 -241
- package/dist/rest-api.d.cts.map +0 -1
- package/dist/rest-api.d.mts +0 -241
- package/dist/rest-api.d.mts.map +0 -1
- package/dist/rest-api.mjs +0 -215
- package/dist/rest-api.mjs.map +0 -1
- package/dist/rolldown-runtime-y5ARvAq5.cjs +0 -35
- package/dist/runSubscriber-BHvJ8POr.mjs +0 -109
- package/dist/runSubscriber-BHvJ8POr.mjs.map +0 -1
- package/dist/runSubscriber-D8nLXIv1.cjs +0 -126
- package/dist/runSubscriber-D8nLXIv1.cjs.map +0 -1
- package/dist/shutdown-BMJmAhSt.cjs +0 -38
- package/dist/shutdown-BMJmAhSt.cjs.map +0 -1
- package/dist/shutdown-C7xa8x9S.mjs +0 -27
- package/dist/shutdown-C7xa8x9S.mjs.map +0 -1
- package/dist/site.cjs +0 -74
- package/dist/site.cjs.map +0 -1
- package/dist/site.d.cts +0 -104
- package/dist/site.d.cts.map +0 -1
- package/dist/site.d.mts +0 -104
- package/dist/site.d.mts.map +0 -1
- package/dist/site.mjs +0 -73
- package/dist/site.mjs.map +0 -1
- package/dist/stages-BSCF19o2.d.cts +0 -56
- package/dist/stages-BSCF19o2.d.cts.map +0 -1
- package/dist/stages-BSCF19o2.d.mts +0 -56
- package/dist/stages-BSCF19o2.d.mts.map +0 -1
- package/dist/surfaceEnv-CNimK76p.cjs +0 -56
- package/dist/surfaceEnv-CNimK76p.cjs.map +0 -1
- package/dist/surfaceEnv-wMT5QzgZ.mjs +0 -45
- package/dist/surfaceEnv-wMT5QzgZ.mjs.map +0 -1
- package/dist/telemetry-B48RLjyk.d.cts +0 -40
- package/dist/telemetry-B48RLjyk.d.cts.map +0 -1
- package/dist/telemetry-DRtT1_0A.d.mts +0 -40
- package/dist/telemetry-DRtT1_0A.d.mts.map +0 -1
- package/dist/telemetry.cjs +0 -56
- package/dist/telemetry.cjs.map +0 -1
- package/dist/telemetry.d.cts +0 -2
- package/dist/telemetry.d.mts +0 -2
- package/dist/telemetry.mjs +0 -55
- package/dist/telemetry.mjs.map +0 -1
- package/dist/tracing-CxaZ98IB.mjs +0 -110
- package/dist/tracing-CxaZ98IB.mjs.map +0 -1
- package/dist/tracing-DPMidF_r.cjs +0 -127
- package/dist/tracing-DPMidF_r.cjs.map +0 -1
- package/dist/types-DMuSQeLL.d.cts.map +0 -1
- package/dist/types-DMuSQeLL.d.mts.map +0 -1
- package/dist/worker.cjs +0 -191
- package/dist/worker.cjs.map +0 -1
- package/dist/worker.d.cts +0 -171
- package/dist/worker.d.cts.map +0 -1
- package/dist/worker.d.mts +0 -171
- package/dist/worker.d.mts.map +0 -1
- package/dist/worker.mjs +0 -190
- package/dist/worker.mjs.map +0 -1
package/dist/credential.d.cts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { t as StandardSchemaV1 } from "./index-CeEtxDmK.cjs";
|
|
2
|
-
import { r as Consumable } from "./construct-interface-B1AfqRl4.cjs";
|
|
3
|
-
import { Service, ServiceRegisterOptions } from "@geekmidas/services";
|
|
4
|
-
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
5
|
-
//#region src/credential.d.ts
|
|
6
|
-
/** What a credential's schema yields. */
|
|
7
|
-
type Value<TSchema extends StandardSchemaV1> = StandardSchemaV1.InferOutput<TSchema>;
|
|
8
|
-
export interface CredentialOptions<TSchema extends StandardSchemaV1> {
|
|
9
|
-
/**
|
|
10
|
-
* What the credential must look like.
|
|
11
|
-
*
|
|
12
|
-
* Validated at registration, so a malformed or half-set credential fails
|
|
13
|
-
* when the process starts rather than on the first request that needs the
|
|
14
|
-
* one field somebody forgot.
|
|
15
|
-
*/
|
|
16
|
-
schema: TSchema;
|
|
17
|
-
/**
|
|
18
|
-
* Re-resolve on every registration instead of once per process.
|
|
19
|
-
*
|
|
20
|
-
* Off by default: a credential is resolved once and reused, because the
|
|
21
|
-
* alternative is a fetch on every request. The cost of that default is that
|
|
22
|
-
* a rotated credential needs a restart, which is the right trade for a value
|
|
23
|
-
* that changes a few times a year — and this is the escape hatch for when it
|
|
24
|
-
* is not.
|
|
25
|
-
*/
|
|
26
|
-
refresh?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export declare class Credential<TName extends string = string, TSchema extends StandardSchemaV1 = StandardSchemaV1> implements Consumable<TName, Value<TSchema>> {
|
|
29
|
-
private readonly options;
|
|
30
|
-
readonly id: TName;
|
|
31
|
-
readonly service: Service<Uncapitalize<TName>, Value<TSchema>>;
|
|
32
|
-
/**
|
|
33
|
-
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
34
|
-
* target publishes and the key the client reads cannot drift.
|
|
35
|
-
*/
|
|
36
|
-
private readonly keys;
|
|
37
|
-
/**
|
|
38
|
-
* The resolved value, held as the *promise* rather than the value.
|
|
39
|
-
*
|
|
40
|
-
* Caching the promise is what makes two concurrent registrations share one
|
|
41
|
-
* resolution: caching the value would let both start before either finished,
|
|
42
|
-
* which is a duplicated fetch every cold start rather than never.
|
|
43
|
-
*/
|
|
44
|
-
private resolved?;
|
|
45
|
-
constructor(id: ConstructName<TName>, options: CredentialOptions<TSchema>);
|
|
46
|
-
/**
|
|
47
|
-
* What the stage's `<ID>_CREDENTIALS` must look like — the schema the value
|
|
48
|
-
* is validated against where it is read. Public so a tool setting the value
|
|
49
|
-
* (`gkm secrets:add`) can check it, and describe its fields, before it is
|
|
50
|
-
* stored rather than at the first request.
|
|
51
|
-
*/
|
|
52
|
-
get credentialsSchema(): TSchema;
|
|
53
|
-
declare(): Declaration[];
|
|
54
|
-
private connect;
|
|
55
|
-
private resolve;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* A credentials key, read and validated against its schema.
|
|
59
|
-
*
|
|
60
|
-
* Shared with every construct that holds a third party's credentials — an
|
|
61
|
-
* `ExternalApi` reads its own the same way — so the shape a stage stores and
|
|
62
|
-
* the error a bad value raises are the same everywhere.
|
|
63
|
-
*
|
|
64
|
-
* @throws {MalformedCredential} when the value is not what the schema says.
|
|
65
|
-
*/
|
|
66
|
-
export declare function readCredentials<TSchema extends StandardSchemaV1>(id: string, key: string, schema: TSchema, envParser: ServiceRegisterOptions['envParser']): Promise<Value<TSchema>>;
|
|
67
|
-
/**
|
|
68
|
-
* The raw environment value as the thing the schema should see.
|
|
69
|
-
*
|
|
70
|
-
* JSON when it is JSON, and the string itself when it is not — a credential
|
|
71
|
-
* with a single opaque field is ordinary, and requiring `"…"` around it would
|
|
72
|
-
* be ceremony that every operator setting one by hand would get wrong once.
|
|
73
|
-
*
|
|
74
|
-
* Exported so a tool checking a value before it is stored reads it exactly as
|
|
75
|
-
* the process that uses it will.
|
|
76
|
-
*/
|
|
77
|
-
export declare function decodeCredentials(raw: string): unknown;
|
|
78
|
-
/** A credential was set, and is not what its schema says it should be. */
|
|
79
|
-
export declare class MalformedCredential extends Error {
|
|
80
|
-
readonly id: string;
|
|
81
|
-
readonly key: string;
|
|
82
|
-
readonly issues: unknown;
|
|
83
|
-
constructor(id: string, key: string, issues: unknown);
|
|
84
|
-
}
|
|
85
|
-
//#endregion
|
|
86
|
-
//# sourceMappingURL=credential.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credential.d.cts","names":[],"sources":["../src/credential.ts"],"mappings":";;;;;;KA6CK,MAAM,gBAAgB,oBAC1B,iBAAiB,YAAY;iBAEb,kBAAkB,gBAAgB;;;;;;;;EAQlD,QAAQ;;;;;;;;;;EAUR;;qBAGY,WACZ,+BACA,gBAAgB,mBAAmB,6BACvB,WAAW,OAAO,MAAM;mBA6BlB;WApBT,IAAI;WACJ,SAAS,QAAQ,aAAa,QAAQ,MAAM;;;;;mBAMpC;;;;;;;;UAST;EAER,YACC,IAAI,cAAc,QACD,SAAS,kBAAkB;;;;;;;MAoBzC,qBAAqB;EAIzB,WAAW;UAUH;UAQA;;;;;;;;;;;wBAmBa,gBAAgB,gBAAgB,kBACrD,YACA,aACA,QAAQ,SACR,WAAW,sCACT,QAAQ,MAAM;;;;;;;;;;;wBAsBD,kBAAkB;;qBAoBrB,4BAA4B;WAE9B;WACA;WACA;EAHV,YACU,YACA,aACA"}
|
package/dist/credential.d.mts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { t as StandardSchemaV1 } from "./index-CeEtxDmK.mjs";
|
|
2
|
-
import { r as Consumable } from "./construct-interface-DluK3_da.mjs";
|
|
3
|
-
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
4
|
-
import { Service, ServiceRegisterOptions } from "@geekmidas/services";
|
|
5
|
-
//#region src/credential.d.ts
|
|
6
|
-
/** What a credential's schema yields. */
|
|
7
|
-
type Value<TSchema extends StandardSchemaV1> = StandardSchemaV1.InferOutput<TSchema>;
|
|
8
|
-
export interface CredentialOptions<TSchema extends StandardSchemaV1> {
|
|
9
|
-
/**
|
|
10
|
-
* What the credential must look like.
|
|
11
|
-
*
|
|
12
|
-
* Validated at registration, so a malformed or half-set credential fails
|
|
13
|
-
* when the process starts rather than on the first request that needs the
|
|
14
|
-
* one field somebody forgot.
|
|
15
|
-
*/
|
|
16
|
-
schema: TSchema;
|
|
17
|
-
/**
|
|
18
|
-
* Re-resolve on every registration instead of once per process.
|
|
19
|
-
*
|
|
20
|
-
* Off by default: a credential is resolved once and reused, because the
|
|
21
|
-
* alternative is a fetch on every request. The cost of that default is that
|
|
22
|
-
* a rotated credential needs a restart, which is the right trade for a value
|
|
23
|
-
* that changes a few times a year — and this is the escape hatch for when it
|
|
24
|
-
* is not.
|
|
25
|
-
*/
|
|
26
|
-
refresh?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export declare class Credential<TName extends string = string, TSchema extends StandardSchemaV1 = StandardSchemaV1> implements Consumable<TName, Value<TSchema>> {
|
|
29
|
-
private readonly options;
|
|
30
|
-
readonly id: TName;
|
|
31
|
-
readonly service: Service<Uncapitalize<TName>, Value<TSchema>>;
|
|
32
|
-
/**
|
|
33
|
-
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
34
|
-
* target publishes and the key the client reads cannot drift.
|
|
35
|
-
*/
|
|
36
|
-
private readonly keys;
|
|
37
|
-
/**
|
|
38
|
-
* The resolved value, held as the *promise* rather than the value.
|
|
39
|
-
*
|
|
40
|
-
* Caching the promise is what makes two concurrent registrations share one
|
|
41
|
-
* resolution: caching the value would let both start before either finished,
|
|
42
|
-
* which is a duplicated fetch every cold start rather than never.
|
|
43
|
-
*/
|
|
44
|
-
private resolved?;
|
|
45
|
-
constructor(id: ConstructName<TName>, options: CredentialOptions<TSchema>);
|
|
46
|
-
/**
|
|
47
|
-
* What the stage's `<ID>_CREDENTIALS` must look like — the schema the value
|
|
48
|
-
* is validated against where it is read. Public so a tool setting the value
|
|
49
|
-
* (`gkm secrets:add`) can check it, and describe its fields, before it is
|
|
50
|
-
* stored rather than at the first request.
|
|
51
|
-
*/
|
|
52
|
-
get credentialsSchema(): TSchema;
|
|
53
|
-
declare(): Declaration[];
|
|
54
|
-
private connect;
|
|
55
|
-
private resolve;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* A credentials key, read and validated against its schema.
|
|
59
|
-
*
|
|
60
|
-
* Shared with every construct that holds a third party's credentials — an
|
|
61
|
-
* `ExternalApi` reads its own the same way — so the shape a stage stores and
|
|
62
|
-
* the error a bad value raises are the same everywhere.
|
|
63
|
-
*
|
|
64
|
-
* @throws {MalformedCredential} when the value is not what the schema says.
|
|
65
|
-
*/
|
|
66
|
-
export declare function readCredentials<TSchema extends StandardSchemaV1>(id: string, key: string, schema: TSchema, envParser: ServiceRegisterOptions['envParser']): Promise<Value<TSchema>>;
|
|
67
|
-
/**
|
|
68
|
-
* The raw environment value as the thing the schema should see.
|
|
69
|
-
*
|
|
70
|
-
* JSON when it is JSON, and the string itself when it is not — a credential
|
|
71
|
-
* with a single opaque field is ordinary, and requiring `"…"` around it would
|
|
72
|
-
* be ceremony that every operator setting one by hand would get wrong once.
|
|
73
|
-
*
|
|
74
|
-
* Exported so a tool checking a value before it is stored reads it exactly as
|
|
75
|
-
* the process that uses it will.
|
|
76
|
-
*/
|
|
77
|
-
export declare function decodeCredentials(raw: string): unknown;
|
|
78
|
-
/** A credential was set, and is not what its schema says it should be. */
|
|
79
|
-
export declare class MalformedCredential extends Error {
|
|
80
|
-
readonly id: string;
|
|
81
|
-
readonly key: string;
|
|
82
|
-
readonly issues: unknown;
|
|
83
|
-
constructor(id: string, key: string, issues: unknown);
|
|
84
|
-
}
|
|
85
|
-
//#endregion
|
|
86
|
-
//# sourceMappingURL=credential.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credential.d.mts","names":[],"sources":["../src/credential.ts"],"mappings":";;;;;;KA6CK,MAAM,gBAAgB,oBAC1B,iBAAiB,YAAY;iBAEb,kBAAkB,gBAAgB;;;;;;;;EAQlD,QAAQ;;;;;;;;;;EAUR;;qBAGY,WACZ,+BACA,gBAAgB,mBAAmB,6BACvB,WAAW,OAAO,MAAM;mBA6BlB;WApBT,IAAI;WACJ,SAAS,QAAQ,aAAa,QAAQ,MAAM;;;;;mBAMpC;;;;;;;;UAST;EAER,YACC,IAAI,cAAc,QACD,SAAS,kBAAkB;;;;;;;MAoBzC,qBAAqB;EAIzB,WAAW;UAUH;UAQA;;;;;;;;;;;wBAmBa,gBAAgB,gBAAgB,kBACrD,YACA,aACA,QAAQ,SACR,WAAW,sCACT,QAAQ,MAAM;;;;;;;;;;;wBAsBD,kBAAkB;;qBAoBrB,4BAA4B;WAE9B;WACA;WACA;EAHV,YACU,YACA,aACA"}
|
package/dist/credential.mjs
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { canonicalId, provideKey, serviceKey } from "@geekmidas/manifest";
|
|
2
|
-
import { parseSchema } from "@geekmidas/schema/parser";
|
|
3
|
-
//#region src/credential.ts
|
|
4
|
-
/**
|
|
5
|
-
* `Credential` — a third-party credential with a shape.
|
|
6
|
-
*
|
|
7
|
-
* The answer to the design's first open question, "where does `Secret` sit?".
|
|
8
|
-
* It sits beside a secret rather than replacing it, because the two differ by
|
|
9
|
-
* *lifecycle* and that is the only difference worth two kinds for: a secret is
|
|
10
|
-
* generated and rotated by the platform and is one opaque string, while a
|
|
11
|
-
* credential is issued by someone else, arrives with several fields, and is
|
|
12
|
-
* worth validating on the way in.
|
|
13
|
-
*
|
|
14
|
-
* ```ts
|
|
15
|
-
* export const stripe = new Credential('Stripe', {
|
|
16
|
-
* schema: z.object({ secretKey: z.string(), webhookSecret: z.string() }),
|
|
17
|
-
* });
|
|
18
|
-
*
|
|
19
|
-
* // in a handler — no await, already parsed and validated
|
|
20
|
-
* services.stripe.secretKey
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* **Nothing about it is async at the call site**, which is the part that looks
|
|
24
|
-
* like it should be hard and is not. `Service.register()` may return a promise
|
|
25
|
-
* and `ServiceDiscovery` awaits every one before a handler runs, so fetching a
|
|
26
|
-
* value and validating it — including when a StandardSchema's `~standard.validate`
|
|
27
|
-
* returns a promise of its own — both happen inside that existing seam.
|
|
28
|
-
*
|
|
29
|
-
* **One key holding JSON, not one key per field.** That is the shape a secret
|
|
30
|
-
* manager stores, and it is the only shape that works with an arbitrary
|
|
31
|
-
* StandardSchema: the spec has no introspection API, so enumerating a schema's
|
|
32
|
-
* fields means reaching into one library's internals (`.shape`) and being wrong
|
|
33
|
-
* for every other.
|
|
34
|
-
*/
|
|
35
|
-
var Credential = class {
|
|
36
|
-
options;
|
|
37
|
-
id;
|
|
38
|
-
service;
|
|
39
|
-
/**
|
|
40
|
-
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
41
|
-
* target publishes and the key the client reads cannot drift.
|
|
42
|
-
*/
|
|
43
|
-
keys;
|
|
44
|
-
/**
|
|
45
|
-
* The resolved value, held as the *promise* rather than the value.
|
|
46
|
-
*
|
|
47
|
-
* Caching the promise is what makes two concurrent registrations share one
|
|
48
|
-
* resolution: caching the value would let both start before either finished,
|
|
49
|
-
* which is a duplicated fetch every cold start rather than never.
|
|
50
|
-
*/
|
|
51
|
-
resolved;
|
|
52
|
-
constructor(id, options) {
|
|
53
|
-
this.options = options;
|
|
54
|
-
const canonical = canonicalId(id);
|
|
55
|
-
this.id = canonical;
|
|
56
|
-
this.keys = { credentials: provideKey(canonical, "credentials") };
|
|
57
|
-
this.service = {
|
|
58
|
-
serviceName: serviceKey(canonical),
|
|
59
|
-
register: (registerOptions) => this.connect(registerOptions)
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* What the stage's `<ID>_CREDENTIALS` must look like — the schema the value
|
|
64
|
-
* is validated against where it is read. Public so a tool setting the value
|
|
65
|
-
* (`gkm secrets:add`) can check it, and describe its fields, before it is
|
|
66
|
-
* stored rather than at the first request.
|
|
67
|
-
*/
|
|
68
|
-
get credentialsSchema() {
|
|
69
|
-
return this.options.schema;
|
|
70
|
-
}
|
|
71
|
-
declare() {
|
|
72
|
-
return [{
|
|
73
|
-
kind: "credential",
|
|
74
|
-
id: this.id,
|
|
75
|
-
provides: [this.keys.credentials]
|
|
76
|
-
}];
|
|
77
|
-
}
|
|
78
|
-
connect(options) {
|
|
79
|
-
if (this.options.refresh) return this.resolve(options);
|
|
80
|
-
this.resolved ??= this.resolve(options);
|
|
81
|
-
return this.resolved;
|
|
82
|
-
}
|
|
83
|
-
resolve(options) {
|
|
84
|
-
return readCredentials(this.id, this.keys.credentials, this.options.schema, options.envParser);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* A credentials key, read and validated against its schema.
|
|
89
|
-
*
|
|
90
|
-
* Shared with every construct that holds a third party's credentials — an
|
|
91
|
-
* `ExternalApi` reads its own the same way — so the shape a stage stores and
|
|
92
|
-
* the error a bad value raises are the same everywhere.
|
|
93
|
-
*
|
|
94
|
-
* @throws {MalformedCredential} when the value is not what the schema says.
|
|
95
|
-
*/
|
|
96
|
-
async function readCredentials(id, key, schema, envParser) {
|
|
97
|
-
const { raw } = envParser.create((get) => ({ raw: get(key).string() })).parse();
|
|
98
|
-
try {
|
|
99
|
-
return await parseSchema(schema, decodeCredentials(raw));
|
|
100
|
-
} catch (issues) {
|
|
101
|
-
throw new MalformedCredential(id, key, issues);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* The raw environment value as the thing the schema should see.
|
|
106
|
-
*
|
|
107
|
-
* JSON when it is JSON, and the string itself when it is not — a credential
|
|
108
|
-
* with a single opaque field is ordinary, and requiring `"…"` around it would
|
|
109
|
-
* be ceremony that every operator setting one by hand would get wrong once.
|
|
110
|
-
*
|
|
111
|
-
* Exported so a tool checking a value before it is stored reads it exactly as
|
|
112
|
-
* the process that uses it will.
|
|
113
|
-
*/
|
|
114
|
-
function decodeCredentials(raw) {
|
|
115
|
-
const value = raw.startsWith(JSON_SCHEME) ? raw.slice(JSON_SCHEME.length) : raw;
|
|
116
|
-
try {
|
|
117
|
-
return JSON.parse(value);
|
|
118
|
-
} catch {
|
|
119
|
-
return value;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* The explicit form, for the case a credential legitimately *is* a JSON string
|
|
124
|
-
* and must not be parsed into an object. Rare, and cheaper to support than to
|
|
125
|
-
* explain.
|
|
126
|
-
*/
|
|
127
|
-
const JSON_SCHEME = "json:";
|
|
128
|
-
/** A credential was set, and is not what its schema says it should be. */
|
|
129
|
-
var MalformedCredential = class extends Error {
|
|
130
|
-
id;
|
|
131
|
-
key;
|
|
132
|
-
issues;
|
|
133
|
-
constructor(id, key, issues) {
|
|
134
|
-
super(`${key} is not a valid ${id} credential. It is validated where it is read, so this is the value that is set rather than the code that uses it: ${describe(issues)}`);
|
|
135
|
-
this.id = id;
|
|
136
|
-
this.key = key;
|
|
137
|
-
this.issues = issues;
|
|
138
|
-
this.name = "MalformedCredential";
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
/** StandardSchema issues as one line. */
|
|
142
|
-
function describe(issues) {
|
|
143
|
-
if (!Array.isArray(issues)) return String(issues);
|
|
144
|
-
return issues.map((issue) => {
|
|
145
|
-
const path = issue.path?.map((segment) => typeof segment === "object" ? String(segment.key) : String(segment)).join(".");
|
|
146
|
-
return path ? `${path}: ${issue.message}` : issue.message;
|
|
147
|
-
}).join("; ");
|
|
148
|
-
}
|
|
149
|
-
//#endregion
|
|
150
|
-
export { Credential, MalformedCredential, decodeCredentials, readCredentials };
|
|
151
|
-
|
|
152
|
-
//# sourceMappingURL=credential.mjs.map
|
package/dist/credential.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credential.mjs","names":[],"sources":["../src/credential.ts"],"sourcesContent":["/**\n * `Credential` — a third-party credential with a shape.\n *\n * The answer to the design's first open question, \"where does `Secret` sit?\".\n * It sits beside a secret rather than replacing it, because the two differ by\n * *lifecycle* and that is the only difference worth two kinds for: a secret is\n * generated and rotated by the platform and is one opaque string, while a\n * credential is issued by someone else, arrives with several fields, and is\n * worth validating on the way in.\n *\n * ```ts\n * export const stripe = new Credential('Stripe', {\n * schema: z.object({ secretKey: z.string(), webhookSecret: z.string() }),\n * });\n *\n * // in a handler — no await, already parsed and validated\n * services.stripe.secretKey\n * ```\n *\n * **Nothing about it is async at the call site**, which is the part that looks\n * like it should be hard and is not. `Service.register()` may return a promise\n * and `ServiceDiscovery` awaits every one before a handler runs, so fetching a\n * value and validating it — including when a StandardSchema's `~standard.validate`\n * returns a promise of its own — both happen inside that existing seam.\n *\n * **One key holding JSON, not one key per field.** That is the shape a secret\n * manager stores, and it is the only shape that works with an arbitrary\n * StandardSchema: the spec has no introspection API, so enumerating a schema's\n * fields means reaching into one library's internals (`.shape`) and being wrong\n * for every other.\n */\n\nimport {\n\ttype ConstructName,\n\tcanonicalId,\n\ttype Declaration,\n\tprovideKey,\n\tserviceKey,\n} from '@geekmidas/manifest';\nimport { parseSchema } from '@geekmidas/schema/parser';\nimport type { Service, ServiceRegisterOptions } from '@geekmidas/services';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport type { Consumable } from './construct-interface';\n\n/** What a credential's schema yields. */\ntype Value<TSchema extends StandardSchemaV1> =\n\tStandardSchemaV1.InferOutput<TSchema>;\n\nexport interface CredentialOptions<TSchema extends StandardSchemaV1> {\n\t/**\n\t * What the credential must look like.\n\t *\n\t * Validated at registration, so a malformed or half-set credential fails\n\t * when the process starts rather than on the first request that needs the\n\t * one field somebody forgot.\n\t */\n\tschema: TSchema;\n\t/**\n\t * Re-resolve on every registration instead of once per process.\n\t *\n\t * Off by default: a credential is resolved once and reused, because the\n\t * alternative is a fetch on every request. The cost of that default is that\n\t * a rotated credential needs a restart, which is the right trade for a value\n\t * that changes a few times a year — and this is the escape hatch for when it\n\t * is not.\n\t */\n\trefresh?: boolean;\n}\n\nexport class Credential<\n\tTName extends string = string,\n\tTSchema extends StandardSchemaV1 = StandardSchemaV1,\n> implements Consumable<TName, Value<TSchema>>\n{\n\t// `Consumable` rather than `Construct`, and not by preference: `Construct`\n\t// types its service as `[TClient] extends [never] ? never : Service<…>` so\n\t// that a `Cron` cannot be depended on, and TypeScript cannot evaluate that\n\t// conditional while `TClient` is still a type parameter. Every construct\n\t// with a concrete client satisfies `Construct`; the first one whose client\n\t// is generic cannot. `Consumable` is the face `.dependsOn()` requires and\n\t// carries no conditional, so it is the honest annotation here.\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, Value<TSchema>>;\n\n\t/**\n\t * Declared once and read by both `declare()` and `connect()`, so the key the\n\t * target publishes and the key the client reads cannot drift.\n\t */\n\tprivate readonly keys: { credentials: string };\n\n\t/**\n\t * The resolved value, held as the *promise* rather than the value.\n\t *\n\t * Caching the promise is what makes two concurrent registrations share one\n\t * resolution: caching the value would let both start before either finished,\n\t * which is a duplicated fetch every cold start rather than never.\n\t */\n\tprivate resolved?: Promise<Value<TSchema>>;\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly options: CredentialOptions<TSchema>,\n\t) {\n\t\tconst canonical = canonicalId(id as string);\n\n\t\tthis.id = canonical as TName;\n\t\tthis.keys = { credentials: provideKey(canonical, 'credentials') };\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: (registerOptions) => this.connect(registerOptions),\n\t\t};\n\t}\n\n\t/**\n\t * What the stage's `<ID>_CREDENTIALS` must look like — the schema the value\n\t * is validated against where it is read. Public so a tool setting the value\n\t * (`gkm secrets:add`) can check it, and describe its fields, before it is\n\t * stored rather than at the first request.\n\t */\n\tget credentialsSchema(): TSchema {\n\t\treturn this.options.schema;\n\t}\n\n\tdeclare(): Declaration[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\tkind: 'credential',\n\t\t\t\tid: this.id,\n\t\t\t\tprovides: [this.keys.credentials],\n\t\t\t},\n\t\t];\n\t}\n\n\tprivate connect(options: ServiceRegisterOptions): Promise<Value<TSchema>> {\n\t\tif (this.options.refresh) return this.resolve(options);\n\n\t\tthis.resolved ??= this.resolve(options);\n\n\t\treturn this.resolved;\n\t}\n\n\tprivate resolve(options: ServiceRegisterOptions): Promise<Value<TSchema>> {\n\t\treturn readCredentials(\n\t\t\tthis.id,\n\t\t\tthis.keys.credentials,\n\t\t\tthis.options.schema,\n\t\t\toptions.envParser,\n\t\t);\n\t}\n}\n\n/**\n * A credentials key, read and validated against its schema.\n *\n * Shared with every construct that holds a third party's credentials — an\n * `ExternalApi` reads its own the same way — so the shape a stage stores and\n * the error a bad value raises are the same everywhere.\n *\n * @throws {MalformedCredential} when the value is not what the schema says.\n */\nexport async function readCredentials<TSchema extends StandardSchemaV1>(\n\tid: string,\n\tkey: string,\n\tschema: TSchema,\n\tenvParser: ServiceRegisterOptions['envParser'],\n): Promise<Value<TSchema>> {\n\tconst { raw } = envParser\n\t\t.create((get) => ({ raw: get(key).string() }))\n\t\t.parse();\n\n\ttry {\n\t\treturn await parseSchema(schema, decodeCredentials(raw));\n\t} catch (issues) {\n\t\tthrow new MalformedCredential(id, key, issues);\n\t}\n}\n\n/**\n * The raw environment value as the thing the schema should see.\n *\n * JSON when it is JSON, and the string itself when it is not — a credential\n * with a single opaque field is ordinary, and requiring `\"…\"` around it would\n * be ceremony that every operator setting one by hand would get wrong once.\n *\n * Exported so a tool checking a value before it is stored reads it exactly as\n * the process that uses it will.\n */\nexport function decodeCredentials(raw: string): unknown {\n\tconst value = raw.startsWith(JSON_SCHEME)\n\t\t? raw.slice(JSON_SCHEME.length)\n\t\t: raw;\n\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\treturn value;\n\t}\n}\n\n/**\n * The explicit form, for the case a credential legitimately *is* a JSON string\n * and must not be parsed into an object. Rare, and cheaper to support than to\n * explain.\n */\nconst JSON_SCHEME = 'json:';\n\n/** A credential was set, and is not what its schema says it should be. */\nexport class MalformedCredential extends Error {\n\tconstructor(\n\t\treadonly id: string,\n\t\treadonly key: string,\n\t\treadonly issues: unknown,\n\t) {\n\t\tsuper(\n\t\t\t`${key} is not a valid ${id} credential. ` +\n\t\t\t\t`It is validated where it is read, so this is the value that is set ` +\n\t\t\t\t`rather than the code that uses it: ${describe(issues)}`,\n\t\t);\n\t\tthis.name = 'MalformedCredential';\n\t}\n}\n\n/** StandardSchema issues as one line. */\nfunction describe(issues: unknown): string {\n\tif (!Array.isArray(issues)) return String(issues);\n\n\treturn issues\n\t\t.map((issue: StandardSchemaV1.Issue) => {\n\t\t\tconst path = issue.path\n\t\t\t\t?.map((segment) =>\n\t\t\t\t\ttypeof segment === 'object' ? String(segment.key) : String(segment),\n\t\t\t\t)\n\t\t\t\t.join('.');\n\n\t\t\treturn path ? `${path}: ${issue.message}` : issue.message;\n\t\t})\n\t\t.join('; ');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,IAAa,aAAb,MAIA;CA4BmB;CApBlB;CACA;;;;;CAMA;;;;;;;;CASA;CAEA,YACC,IACA,SACC;EADgB,KAAA,UAAA;EAEjB,MAAM,YAAY,YAAY,EAAY;EAE1C,KAAK,KAAK;EACV,KAAK,OAAO,EAAE,aAAa,WAAW,WAAW,aAAa,EAAE;EAGhE,KAAK,UAAU;GACd,aAAa,WAAW,SAAS;GACjC,WAAW,oBAAoB,KAAK,QAAQ,eAAe;EAC5D;CACD;;;;;;;CAQA,IAAI,oBAA6B;EAChC,OAAO,KAAK,QAAQ;CACrB;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,UAAU,CAAC,KAAK,KAAK,WAAW;EACjC,CACD;CACD;CAEA,QAAgB,SAA0D;EACzE,IAAI,KAAK,QAAQ,SAAS,OAAO,KAAK,QAAQ,OAAO;EAErD,KAAK,aAAa,KAAK,QAAQ,OAAO;EAEtC,OAAO,KAAK;CACb;CAEA,QAAgB,SAA0D;EACzE,OAAO,gBACN,KAAK,IACL,KAAK,KAAK,aACV,KAAK,QAAQ,QACb,QAAQ,SACT;CACD;AACD;;;;;;;;;;AAWA,eAAsB,gBACrB,IACA,KACA,QACA,WAC0B;CAC1B,MAAM,EAAE,QAAQ,UACd,QAAQ,SAAS,EAAE,KAAK,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAC7C,MAAM;CAER,IAAI;EACH,OAAO,MAAM,YAAY,QAAQ,kBAAkB,GAAG,CAAC;CACxD,SAAS,QAAQ;EAChB,MAAM,IAAI,oBAAoB,IAAI,KAAK,MAAM;CAC9C;AACD;;;;;;;;;;;AAYA,SAAgB,kBAAkB,KAAsB;CACvD,MAAM,QAAQ,IAAI,WAAW,WAAW,IACrC,IAAI,MAAM,YAAY,MAAM,IAC5B;CAEH,IAAI;EACH,OAAO,KAAK,MAAM,KAAK;CACxB,QAAQ;EACP,OAAO;CACR;AACD;;;;;;AAOA,MAAM,cAAc;;AAGpB,IAAa,sBAAb,cAAyC,MAAM;CAEpC;CACA;CACA;CAHV,YACC,IACA,KACA,QACC;EACD,MACC,GAAG,IAAI,kBAAkB,GAAG,qHAEW,SAAS,MAAM,GACvD;EARS,KAAA,KAAA;EACA,KAAA,MAAA;EACA,KAAA,SAAA;EAOT,KAAK,OAAO;CACb;AACD;;AAGA,SAAS,SAAS,QAAyB;CAC1C,IAAI,CAAC,MAAM,QAAQ,MAAM,GAAG,OAAO,OAAO,MAAM;CAEhD,OAAO,OACL,KAAK,UAAkC;EACvC,MAAM,OAAO,MAAM,MAChB,KAAK,YACN,OAAO,YAAY,WAAW,OAAO,QAAQ,GAAG,IAAI,OAAO,OAAO,CACnE,CAAC,CACA,KAAK,GAAG;EAEV,OAAO,OAAO,GAAG,KAAK,IAAI,MAAM,YAAY,MAAM;CACnD,CAAC,CAAC,CACD,KAAK,IAAI;AACZ"}
|
package/dist/database/kysely.cjs
DELETED
package/dist/database/kysely.mjs
DELETED
package/dist/email.cjs
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
3
|
-
let _geekmidas_emailkit = require("@geekmidas/emailkit");
|
|
4
|
-
//#region src/email.ts
|
|
5
|
-
/**
|
|
6
|
-
* `Email` — declared outbound mail.
|
|
7
|
-
*
|
|
8
|
-
* The same three-package meeting point as `ObjectStorage`: it implements the
|
|
9
|
-
* construct contract, derives its env key through `@geekmidas/manifest`, and
|
|
10
|
-
* hands back an `@geekmidas/emailkit` client. It names no provider — locally the
|
|
11
|
-
* injected URL points at Mailpit, deployed it points at SES or whichever service
|
|
12
|
-
* config selected.
|
|
13
|
-
*
|
|
14
|
-
* Where object storage needs a driver per provider, this needs none: mail is
|
|
15
|
-
* delivered over SMTP whoever delivers it, so there is one client and one URL
|
|
16
|
-
* shape, and the provider survives only as a host and a credential.
|
|
17
|
-
*/
|
|
18
|
-
var Email = class {
|
|
19
|
-
options;
|
|
20
|
-
id;
|
|
21
|
-
service;
|
|
22
|
-
/**
|
|
23
|
-
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
24
|
-
* build publishes and the key the client reads cannot drift.
|
|
25
|
-
*/
|
|
26
|
-
keys;
|
|
27
|
-
constructor(id, options) {
|
|
28
|
-
this.options = options;
|
|
29
|
-
const canonical = (0, _geekmidas_manifest.canonicalId)(id);
|
|
30
|
-
this.id = canonical;
|
|
31
|
-
this.keys = {
|
|
32
|
-
url: (0, _geekmidas_manifest.provideKey)(canonical, "url"),
|
|
33
|
-
from: (0, _geekmidas_manifest.provideKey)(canonical, "from")
|
|
34
|
-
};
|
|
35
|
-
this.service = {
|
|
36
|
-
serviceName: (0, _geekmidas_manifest.serviceKey)(canonical),
|
|
37
|
-
register: (options) => this.connect(options)
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
declare() {
|
|
41
|
-
return [{
|
|
42
|
-
kind: "email",
|
|
43
|
-
id: this.id,
|
|
44
|
-
provides: [this.keys.url, this.keys.from]
|
|
45
|
-
}];
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Builds the client from the URL the adapter supplied.
|
|
49
|
-
*
|
|
50
|
-
* No provider branch and no driver lookup — `parseEmailUrl` turns any of
|
|
51
|
-
* Mailpit, SES, or Resend into the same transport config, which is the whole
|
|
52
|
-
* reason the scheme is always `smtp://`.
|
|
53
|
-
*/
|
|
54
|
-
async connect({ envParser }) {
|
|
55
|
-
const { url, from } = envParser.create((get) => ({
|
|
56
|
-
url: get(this.keys.url).string(),
|
|
57
|
-
from: get(this.keys.from).string()
|
|
58
|
-
})).parse();
|
|
59
|
-
return (0, _geekmidas_emailkit.createEmailClient)({
|
|
60
|
-
smtp: (0, _geekmidas_emailkit.parseEmailUrl)(url),
|
|
61
|
-
templates: this.options.templates,
|
|
62
|
-
defaults: {
|
|
63
|
-
from,
|
|
64
|
-
...this.options.replyTo ? { replyTo: this.options.replyTo } : {}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
//#endregion
|
|
70
|
-
exports.Email = Email;
|
|
71
|
-
|
|
72
|
-
//# sourceMappingURL=email.cjs.map
|
package/dist/email.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email.cjs","names":["canonicalId","provideKey","serviceKey","createEmailClient","parseEmailUrl"],"sources":["../src/email.ts"],"sourcesContent":["/**\n * `Email` — declared outbound mail.\n *\n * The same three-package meeting point as `ObjectStorage`: it implements the\n * construct contract, derives its env key through `@geekmidas/manifest`, and\n * hands back an `@geekmidas/emailkit` client. It names no provider — locally the\n * injected URL points at Mailpit, deployed it points at SES or whichever service\n * config selected.\n *\n * Where object storage needs a driver per provider, this needs none: mail is\n * delivered over SMTP whoever delivers it, so there is one client and one URL\n * shape, and the provider survives only as a host and a credential.\n */\n\nimport {\n\tcreateEmailClient,\n\ttype EmailClient,\n\tparseEmailUrl,\n\ttype TemplateRecord,\n} from '@geekmidas/emailkit';\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 type { Construct } from './construct-interface';\n\nexport interface EmailOptions<TTemplates extends TemplateRecord> {\n\t/**\n\t * The React templates this app can send.\n\t *\n\t * Structural — they are code, they ship with the handler, and which ones\n\t * exist cannot differ between stages. They are also what types\n\t * `sendTemplate`, so passing them here is what makes the client's call sites\n\t * checkable.\n\t */\n\ttemplates: TTemplates;\n\t/**\n\t * A reply-to address for every send.\n\t *\n\t * `from` is deliberately absent: it belongs to the verified sending domain,\n\t * which is `myapp.test` locally and the real domain deployed, so it arrives\n\t * as stage config rather than being written here.\n\t */\n\treplyTo?: string;\n}\n\nexport class Email<\n\tTName extends string = string,\n\tTTemplates extends TemplateRecord = TemplateRecord,\n> implements Construct<TName, EmailClient<TTemplates>>\n{\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, EmailClient<TTemplates>>;\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.\n\t */\n\tprivate readonly keys: { url: string; from: string };\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly options: EmailOptions<TTemplates>,\n\t) {\n\t\tconst canonical = canonicalId(id as string);\n\n\t\tthis.id = canonical as TName;\n\t\tthis.keys = {\n\t\t\turl: provideKey(canonical, 'url'),\n\t\t\t// The sending identity travels with the URL rather than being a second\n\t\t\t// construct option, for the same reason the URL does: it is the one\n\t\t\t// thing about mail that differs per stage.\n\t\t\tfrom: provideKey(canonical, 'from'),\n\t\t};\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: 'email',\n\t\t\t\tid: this.id,\n\t\t\t\tprovides: [this.keys.url, this.keys.from],\n\t\t\t},\n\t\t];\n\t}\n\n\t/**\n\t * Builds the client from the URL the adapter supplied.\n\t *\n\t * No provider branch and no driver lookup — `parseEmailUrl` turns any of\n\t * Mailpit, SES, or Resend into the same transport config, which is the whole\n\t * reason the scheme is always `smtp://`.\n\t */\n\tprivate async connect({\n\t\tenvParser,\n\t}: ServiceRegisterOptions): Promise<EmailClient<TTemplates>> {\n\t\tconst { url, from } = envParser\n\t\t\t.create((get) => ({\n\t\t\t\turl: get(this.keys.url).string(),\n\t\t\t\tfrom: get(this.keys.from).string(),\n\t\t\t}))\n\t\t\t.parse();\n\n\t\treturn createEmailClient({\n\t\t\tsmtp: parseEmailUrl(url),\n\t\t\ttemplates: this.options.templates,\n\t\t\tdefaults: {\n\t\t\t\tfrom,\n\t\t\t\t...(this.options.replyTo ? { replyTo: this.options.replyTo } : {}),\n\t\t\t},\n\t\t});\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkDA,IAAa,QAAb,MAIA;CAYmB;CAXlB;CACA;;;;;CAMA;CAEA,YACC,IACA,SACC;EADgB,KAAA,UAAA;EAEjB,MAAM,aAAA,GAAYA,oBAAAA,YAAAA,CAAY,EAAY;EAE1C,KAAK,KAAK;EACV,KAAK,OAAO;GACX,MAAA,GAAKC,oBAAAA,WAAAA,CAAW,WAAW,KAAK;GAIhC,OAAA,GAAMA,oBAAAA,WAAAA,CAAW,WAAW,MAAM;EACnC;EAGA,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,KAAK,KAAK,KAAK,IAAI;EACzC,CACD;CACD;;;;;;;;CASA,MAAc,QAAQ,EACrB,aAC4D;EAC5D,MAAM,EAAE,KAAK,SAAS,UACpB,QAAQ,SAAS;GACjB,KAAK,IAAI,KAAK,KAAK,GAAG,CAAC,CAAC,OAAO;GAC/B,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,OAAO;EAClC,EAAE,CAAC,CACF,MAAM;EAER,QAAA,GAAOC,oBAAAA,kBAAAA,CAAkB;GACxB,OAAA,GAAMC,oBAAAA,cAAAA,CAAc,GAAG;GACvB,WAAW,KAAK,QAAQ;GACxB,UAAU;IACT;IACA,GAAI,KAAK,QAAQ,UAAU,EAAE,SAAS,KAAK,QAAQ,QAAQ,IAAI,CAAC;GACjE;EACD,CAAC;CACF;AACD"}
|
package/dist/email.d.cts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { n as Construct } from "./construct-interface-B1AfqRl4.cjs";
|
|
2
|
-
import { Service } from "@geekmidas/services";
|
|
3
|
-
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
4
|
-
import { EmailClient, TemplateRecord } from "@geekmidas/emailkit";
|
|
5
|
-
//#region src/email.d.ts
|
|
6
|
-
export interface EmailOptions<TTemplates extends TemplateRecord> {
|
|
7
|
-
/**
|
|
8
|
-
* The React templates this app can send.
|
|
9
|
-
*
|
|
10
|
-
* Structural — they are code, they ship with the handler, and which ones
|
|
11
|
-
* exist cannot differ between stages. They are also what types
|
|
12
|
-
* `sendTemplate`, so passing them here is what makes the client's call sites
|
|
13
|
-
* checkable.
|
|
14
|
-
*/
|
|
15
|
-
templates: TTemplates;
|
|
16
|
-
/**
|
|
17
|
-
* A reply-to address for every send.
|
|
18
|
-
*
|
|
19
|
-
* `from` is deliberately absent: it belongs to the verified sending domain,
|
|
20
|
-
* which is `myapp.test` locally and the real domain deployed, so it arrives
|
|
21
|
-
* as stage config rather than being written here.
|
|
22
|
-
*/
|
|
23
|
-
replyTo?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare class Email<TName extends string = string, TTemplates extends TemplateRecord = TemplateRecord> implements Construct<TName, EmailClient<TTemplates>> {
|
|
26
|
-
private readonly options;
|
|
27
|
-
readonly id: TName;
|
|
28
|
-
readonly service: Service<Uncapitalize<TName>, EmailClient<TTemplates>>;
|
|
29
|
-
/**
|
|
30
|
-
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
31
|
-
* build publishes and the key the client reads cannot drift.
|
|
32
|
-
*/
|
|
33
|
-
private readonly keys;
|
|
34
|
-
constructor(id: ConstructName<TName>, options: EmailOptions<TTemplates>);
|
|
35
|
-
declare(): Declaration[];
|
|
36
|
-
/**
|
|
37
|
-
* Builds the client from the URL the adapter supplied.
|
|
38
|
-
*
|
|
39
|
-
* No provider branch and no driver lookup — `parseEmailUrl` turns any of
|
|
40
|
-
* Mailpit, SES, or Resend into the same transport config, which is the whole
|
|
41
|
-
* reason the scheme is always `smtp://`.
|
|
42
|
-
*/
|
|
43
|
-
private connect;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//# sourceMappingURL=email.d.cts.map
|
package/dist/email.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.cts","names":[],"sources":["../src/email.ts"],"mappings":";;;;;iBA8BiB,aAAa,mBAAmB;;;;;;;;;EAShD,WAAW;;;;;;;;EAQX;;qBAGY,MACZ,+BACA,mBAAmB,iBAAiB,2BACxB,UAAU,OAAO,YAAY;mBAavB;WAXT,IAAI;WACJ,SAAS,QAAQ,aAAa,QAAQ,YAAY;;;;;mBAM1C;EAEjB,YACC,IAAI,cAAc,QACD,SAAS,aAAa;EAoBxC,WAAW;;;;;;;;UAiBG"}
|
package/dist/email.d.mts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { n as Construct } from "./construct-interface-DluK3_da.mjs";
|
|
2
|
-
import { ConstructName, Declaration } from "@geekmidas/manifest";
|
|
3
|
-
import { EmailClient, TemplateRecord } from "@geekmidas/emailkit";
|
|
4
|
-
import { Service } from "@geekmidas/services";
|
|
5
|
-
//#region src/email.d.ts
|
|
6
|
-
export interface EmailOptions<TTemplates extends TemplateRecord> {
|
|
7
|
-
/**
|
|
8
|
-
* The React templates this app can send.
|
|
9
|
-
*
|
|
10
|
-
* Structural — they are code, they ship with the handler, and which ones
|
|
11
|
-
* exist cannot differ between stages. They are also what types
|
|
12
|
-
* `sendTemplate`, so passing them here is what makes the client's call sites
|
|
13
|
-
* checkable.
|
|
14
|
-
*/
|
|
15
|
-
templates: TTemplates;
|
|
16
|
-
/**
|
|
17
|
-
* A reply-to address for every send.
|
|
18
|
-
*
|
|
19
|
-
* `from` is deliberately absent: it belongs to the verified sending domain,
|
|
20
|
-
* which is `myapp.test` locally and the real domain deployed, so it arrives
|
|
21
|
-
* as stage config rather than being written here.
|
|
22
|
-
*/
|
|
23
|
-
replyTo?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare class Email<TName extends string = string, TTemplates extends TemplateRecord = TemplateRecord> implements Construct<TName, EmailClient<TTemplates>> {
|
|
26
|
-
private readonly options;
|
|
27
|
-
readonly id: TName;
|
|
28
|
-
readonly service: Service<Uncapitalize<TName>, EmailClient<TTemplates>>;
|
|
29
|
-
/**
|
|
30
|
-
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
31
|
-
* build publishes and the key the client reads cannot drift.
|
|
32
|
-
*/
|
|
33
|
-
private readonly keys;
|
|
34
|
-
constructor(id: ConstructName<TName>, options: EmailOptions<TTemplates>);
|
|
35
|
-
declare(): Declaration[];
|
|
36
|
-
/**
|
|
37
|
-
* Builds the client from the URL the adapter supplied.
|
|
38
|
-
*
|
|
39
|
-
* No provider branch and no driver lookup — `parseEmailUrl` turns any of
|
|
40
|
-
* Mailpit, SES, or Resend into the same transport config, which is the whole
|
|
41
|
-
* reason the scheme is always `smtp://`.
|
|
42
|
-
*/
|
|
43
|
-
private connect;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//# sourceMappingURL=email.d.mts.map
|
package/dist/email.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.mts","names":[],"sources":["../src/email.ts"],"mappings":";;;;;iBA8BiB,aAAa,mBAAmB;;;;;;;;;EAShD,WAAW;;;;;;;;EAQX;;qBAGY,MACZ,+BACA,mBAAmB,iBAAiB,2BACxB,UAAU,OAAO,YAAY;mBAavB;WAXT,IAAI;WACJ,SAAS,QAAQ,aAAa,QAAQ,YAAY;;;;;mBAM1C;EAEjB,YACC,IAAI,cAAc,QACD,SAAS,aAAa;EAoBxC,WAAW;;;;;;;;UAiBG"}
|
package/dist/email.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { canonicalId, provideKey, serviceKey } from "@geekmidas/manifest";
|
|
2
|
-
import { createEmailClient, parseEmailUrl } from "@geekmidas/emailkit";
|
|
3
|
-
//#region src/email.ts
|
|
4
|
-
/**
|
|
5
|
-
* `Email` — declared outbound mail.
|
|
6
|
-
*
|
|
7
|
-
* The same three-package meeting point as `ObjectStorage`: it implements the
|
|
8
|
-
* construct contract, derives its env key through `@geekmidas/manifest`, and
|
|
9
|
-
* hands back an `@geekmidas/emailkit` client. It names no provider — locally the
|
|
10
|
-
* injected URL points at Mailpit, deployed it points at SES or whichever service
|
|
11
|
-
* config selected.
|
|
12
|
-
*
|
|
13
|
-
* Where object storage needs a driver per provider, this needs none: mail is
|
|
14
|
-
* delivered over SMTP whoever delivers it, so there is one client and one URL
|
|
15
|
-
* shape, and the provider survives only as a host and a credential.
|
|
16
|
-
*/
|
|
17
|
-
var Email = class {
|
|
18
|
-
options;
|
|
19
|
-
id;
|
|
20
|
-
service;
|
|
21
|
-
/**
|
|
22
|
-
* Declared once and read by both `declare()` and `connect()`, so the key the
|
|
23
|
-
* build publishes and the key the client reads cannot drift.
|
|
24
|
-
*/
|
|
25
|
-
keys;
|
|
26
|
-
constructor(id, options) {
|
|
27
|
-
this.options = options;
|
|
28
|
-
const canonical = canonicalId(id);
|
|
29
|
-
this.id = canonical;
|
|
30
|
-
this.keys = {
|
|
31
|
-
url: provideKey(canonical, "url"),
|
|
32
|
-
from: provideKey(canonical, "from")
|
|
33
|
-
};
|
|
34
|
-
this.service = {
|
|
35
|
-
serviceName: serviceKey(canonical),
|
|
36
|
-
register: (options) => this.connect(options)
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
declare() {
|
|
40
|
-
return [{
|
|
41
|
-
kind: "email",
|
|
42
|
-
id: this.id,
|
|
43
|
-
provides: [this.keys.url, this.keys.from]
|
|
44
|
-
}];
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Builds the client from the URL the adapter supplied.
|
|
48
|
-
*
|
|
49
|
-
* No provider branch and no driver lookup — `parseEmailUrl` turns any of
|
|
50
|
-
* Mailpit, SES, or Resend into the same transport config, which is the whole
|
|
51
|
-
* reason the scheme is always `smtp://`.
|
|
52
|
-
*/
|
|
53
|
-
async connect({ envParser }) {
|
|
54
|
-
const { url, from } = envParser.create((get) => ({
|
|
55
|
-
url: get(this.keys.url).string(),
|
|
56
|
-
from: get(this.keys.from).string()
|
|
57
|
-
})).parse();
|
|
58
|
-
return createEmailClient({
|
|
59
|
-
smtp: parseEmailUrl(url),
|
|
60
|
-
templates: this.options.templates,
|
|
61
|
-
defaults: {
|
|
62
|
-
from,
|
|
63
|
-
...this.options.replyTo ? { replyTo: this.options.replyTo } : {}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
//#endregion
|
|
69
|
-
export { Email };
|
|
70
|
-
|
|
71
|
-
//# sourceMappingURL=email.mjs.map
|
package/dist/email.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email.mjs","names":[],"sources":["../src/email.ts"],"sourcesContent":["/**\n * `Email` — declared outbound mail.\n *\n * The same three-package meeting point as `ObjectStorage`: it implements the\n * construct contract, derives its env key through `@geekmidas/manifest`, and\n * hands back an `@geekmidas/emailkit` client. It names no provider — locally the\n * injected URL points at Mailpit, deployed it points at SES or whichever service\n * config selected.\n *\n * Where object storage needs a driver per provider, this needs none: mail is\n * delivered over SMTP whoever delivers it, so there is one client and one URL\n * shape, and the provider survives only as a host and a credential.\n */\n\nimport {\n\tcreateEmailClient,\n\ttype EmailClient,\n\tparseEmailUrl,\n\ttype TemplateRecord,\n} from '@geekmidas/emailkit';\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 type { Construct } from './construct-interface';\n\nexport interface EmailOptions<TTemplates extends TemplateRecord> {\n\t/**\n\t * The React templates this app can send.\n\t *\n\t * Structural — they are code, they ship with the handler, and which ones\n\t * exist cannot differ between stages. They are also what types\n\t * `sendTemplate`, so passing them here is what makes the client's call sites\n\t * checkable.\n\t */\n\ttemplates: TTemplates;\n\t/**\n\t * A reply-to address for every send.\n\t *\n\t * `from` is deliberately absent: it belongs to the verified sending domain,\n\t * which is `myapp.test` locally and the real domain deployed, so it arrives\n\t * as stage config rather than being written here.\n\t */\n\treplyTo?: string;\n}\n\nexport class Email<\n\tTName extends string = string,\n\tTTemplates extends TemplateRecord = TemplateRecord,\n> implements Construct<TName, EmailClient<TTemplates>>\n{\n\treadonly id: TName;\n\treadonly service: Service<Uncapitalize<TName>, EmailClient<TTemplates>>;\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.\n\t */\n\tprivate readonly keys: { url: string; from: string };\n\n\tconstructor(\n\t\tid: ConstructName<TName>,\n\t\tprivate readonly options: EmailOptions<TTemplates>,\n\t) {\n\t\tconst canonical = canonicalId(id as string);\n\n\t\tthis.id = canonical as TName;\n\t\tthis.keys = {\n\t\t\turl: provideKey(canonical, 'url'),\n\t\t\t// The sending identity travels with the URL rather than being a second\n\t\t\t// construct option, for the same reason the URL does: it is the one\n\t\t\t// thing about mail that differs per stage.\n\t\t\tfrom: provideKey(canonical, 'from'),\n\t\t};\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: 'email',\n\t\t\t\tid: this.id,\n\t\t\t\tprovides: [this.keys.url, this.keys.from],\n\t\t\t},\n\t\t];\n\t}\n\n\t/**\n\t * Builds the client from the URL the adapter supplied.\n\t *\n\t * No provider branch and no driver lookup — `parseEmailUrl` turns any of\n\t * Mailpit, SES, or Resend into the same transport config, which is the whole\n\t * reason the scheme is always `smtp://`.\n\t */\n\tprivate async connect({\n\t\tenvParser,\n\t}: ServiceRegisterOptions): Promise<EmailClient<TTemplates>> {\n\t\tconst { url, from } = envParser\n\t\t\t.create((get) => ({\n\t\t\t\turl: get(this.keys.url).string(),\n\t\t\t\tfrom: get(this.keys.from).string(),\n\t\t\t}))\n\t\t\t.parse();\n\n\t\treturn createEmailClient({\n\t\t\tsmtp: parseEmailUrl(url),\n\t\t\ttemplates: this.options.templates,\n\t\t\tdefaults: {\n\t\t\t\tfrom,\n\t\t\t\t...(this.options.replyTo ? { replyTo: this.options.replyTo } : {}),\n\t\t\t},\n\t\t});\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkDA,IAAa,QAAb,MAIA;CAYmB;CAXlB;CACA;;;;;CAMA;CAEA,YACC,IACA,SACC;EADgB,KAAA,UAAA;EAEjB,MAAM,YAAY,YAAY,EAAY;EAE1C,KAAK,KAAK;EACV,KAAK,OAAO;GACX,KAAK,WAAW,WAAW,KAAK;GAIhC,MAAM,WAAW,WAAW,MAAM;EACnC;EAGA,KAAK,UAAU;GACd,aAAa,WAAW,SAAS;GACjC,WAAW,YAAY,KAAK,QAAQ,OAAO;EAC5C;CACD;CAEA,UAAyB;EACxB,OAAO,CACN;GACC,MAAM;GACN,IAAI,KAAK;GACT,UAAU,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,IAAI;EACzC,CACD;CACD;;;;;;;;CASA,MAAc,QAAQ,EACrB,aAC4D;EAC5D,MAAM,EAAE,KAAK,SAAS,UACpB,QAAQ,SAAS;GACjB,KAAK,IAAI,KAAK,KAAK,GAAG,CAAC,CAAC,OAAO;GAC/B,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,OAAO;EAClC,EAAE,CAAC,CACF,MAAM;EAER,OAAO,kBAAkB;GACxB,MAAM,cAAc,GAAG;GACvB,WAAW,KAAK,QAAQ;GACxB,UAAU;IACT;IACA,GAAI,KAAK,QAAQ,UAAU,EAAE,SAAS,KAAK,QAAQ,QAAQ,IAAI,CAAC;GACjE;EACD,CAAC;CACF;AACD"}
|