@geekmidas/constructs 9.0.2 → 10.0.0-alpha.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/README.md +71 -44
- package/dist/{AWSScheduledFunction-Bn99MceY.d.cts → AWSScheduledFunction-BvFvBsBN.d.cts} +8 -3
- package/dist/{AWSScheduledFunction-ysaCsdWx.d.mts.map → AWSScheduledFunction-BvFvBsBN.d.cts.map} +1 -1
- package/dist/{AWSScheduledFunction-ysaCsdWx.d.mts → AWSScheduledFunction-CVccZO-L.d.mts} +9 -4
- package/dist/{AWSScheduledFunction-Bn99MceY.d.cts.map → AWSScheduledFunction-CVccZO-L.d.mts.map} +1 -1
- package/dist/{AWSScheduledFunction-CufMMhGB.mjs → AWSScheduledFunction-Db1lttJH.mjs} +3 -3
- package/dist/{AWSScheduledFunction-CufMMhGB.mjs.map → AWSScheduledFunction-Db1lttJH.mjs.map} +1 -1
- package/dist/{AWSScheduledFunction-DbkDr8CA.cjs → AWSScheduledFunction-qu4ieRZR.cjs} +9 -9
- package/dist/{AWSScheduledFunction-DbkDr8CA.cjs.map → AWSScheduledFunction-qu4ieRZR.cjs.map} +1 -1
- package/dist/{Construct-_1wX7p_Y.d.cts → Construct-B-xc0SE9.d.mts} +27 -5
- package/dist/Construct-B-xc0SE9.d.mts.map +1 -0
- package/dist/{Construct-r0U2zBwW.mjs → Construct-HmWM6YYu.mjs} +4 -3
- package/dist/Construct-HmWM6YYu.mjs.map +1 -0
- package/dist/{Construct-DCMuYOox.d.mts → Construct-WhCXIOPV.d.cts} +29 -7
- package/dist/Construct-WhCXIOPV.d.cts.map +1 -0
- package/dist/{Construct-vXMZJgRp.cjs → Construct-roId57cU.cjs} +7 -43
- package/dist/Construct-roId57cU.cjs.map +1 -0
- package/dist/{lazyAccessors-DmTG8sQH.cjs → Endpoint-BBkV6l0k.cjs} +869 -1079
- package/dist/Endpoint-BBkV6l0k.cjs.map +1 -0
- package/dist/{lazyAccessors-DfqZR6C4.mjs → Endpoint-BGwpNEX4.mjs} +840 -1003
- package/dist/Endpoint-BGwpNEX4.mjs.map +1 -0
- package/dist/{Endpoint-DgfRslct.d.cts → Endpoint-BnxZqIX-.d.cts} +53 -4
- package/dist/Endpoint-BnxZqIX-.d.cts.map +1 -0
- package/dist/{Endpoint-CLPSIl6S.d.mts → Endpoint-ROcXU-eH.d.mts} +55 -6
- package/dist/Endpoint-ROcXU-eH.d.mts.map +1 -0
- package/dist/EndpointFactory-DYoGLaIT.cjs +850 -0
- package/dist/EndpointFactory-DYoGLaIT.cjs.map +1 -0
- package/dist/EndpointFactory-Di0X9AWp.mjs +808 -0
- package/dist/EndpointFactory-Di0X9AWp.mjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-DJDT3PMx.mjs → HonoEndpointAdaptor-DFKIIG2o.mjs} +5 -4
- package/dist/HonoEndpointAdaptor-DFKIIG2o.mjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-CkJENANP.cjs → HonoEndpointAdaptor-wMsCyMgt.cjs} +24 -23
- package/dist/HonoEndpointAdaptor-wMsCyMgt.cjs.map +1 -0
- package/dist/{Queue-DaxjwmOQ.d.cts → Queue-D6WeziRD.d.cts} +43 -4
- package/dist/Queue-D6WeziRD.d.cts.map +1 -0
- package/dist/{Queue-HBDf0fqz.d.mts → Queue-DpUeqdC8.d.mts} +43 -4
- package/dist/Queue-DpUeqdC8.d.mts.map +1 -0
- package/dist/{Subscriber-B69ngPwl.d.cts → Subscriber-4rBJgDKI.d.mts} +9 -4
- package/dist/{Subscriber-B69ngPwl.d.cts.map → Subscriber-4rBJgDKI.d.mts.map} +1 -1
- package/dist/{Subscriber-D8Xm-86W.d.mts → Subscriber-DVQowdyj.d.cts} +11 -6
- package/dist/Subscriber-DVQowdyj.d.cts.map +1 -0
- package/dist/{Topic-C5ZMfveW.d.cts → Topic-Ohx9dvWr.d.cts} +33 -2
- package/dist/Topic-Ohx9dvWr.d.cts.map +1 -0
- package/dist/{Topic-DT10AqHk.d.mts → Topic-cmy2jOUy.d.mts} +33 -2
- package/dist/Topic-cmy2jOUy.d.mts.map +1 -0
- package/dist/adaptors/aws.cjs +39 -26
- package/dist/adaptors/aws.cjs.map +1 -1
- package/dist/adaptors/aws.d.cts +24 -16
- package/dist/adaptors/aws.d.cts.map +1 -1
- package/dist/adaptors/aws.d.mts +25 -17
- package/dist/adaptors/aws.d.mts.map +1 -1
- package/dist/adaptors/aws.mjs +26 -14
- package/dist/adaptors/aws.mjs.map +1 -1
- package/dist/adaptors/hono.cjs +9 -6
- package/dist/adaptors/hono.d.cts +7 -6
- package/dist/adaptors/hono.d.cts.map +1 -1
- package/dist/adaptors/hono.d.mts +8 -7
- package/dist/adaptors/hono.d.mts.map +1 -1
- package/dist/adaptors/hono.mjs +9 -6
- package/dist/adaptors/testing.cjs +18 -14
- package/dist/adaptors/testing.cjs.map +1 -1
- package/dist/adaptors/testing.d.cts +7 -6
- package/dist/adaptors/testing.d.cts.map +1 -1
- package/dist/adaptors/testing.d.mts +11 -10
- package/dist/adaptors/testing.d.mts.map +1 -1
- package/dist/adaptors/testing.mjs +10 -7
- package/dist/adaptors/testing.mjs.map +1 -1
- package/dist/auth.cjs +165 -0
- package/dist/auth.cjs.map +1 -0
- package/dist/auth.d.cts +108 -0
- package/dist/auth.d.cts.map +1 -0
- package/dist/auth.d.mts +108 -0
- package/dist/auth.d.mts.map +1 -0
- package/dist/auth.mjs +164 -0
- package/dist/auth.mjs.map +1 -0
- package/dist/cache-0ANvRQnD.mjs +51 -0
- package/dist/cache-0ANvRQnD.mjs.map +1 -0
- package/dist/cache-3WSvAulx.cjs +57 -0
- package/dist/cache-3WSvAulx.cjs.map +1 -0
- package/dist/cache-CdQ7OLpR.d.cts +47 -0
- package/dist/cache-CdQ7OLpR.d.cts.map +1 -0
- package/dist/cache-DYoJFcfd.d.mts +47 -0
- package/dist/cache-DYoJFcfd.d.mts.map +1 -0
- package/dist/cache.cjs +3 -0
- package/dist/cache.d.cts +3 -0
- package/dist/cache.d.mts +3 -0
- package/dist/cache.mjs +3 -0
- package/dist/chunk-DWy1uDak.cjs +39 -0
- package/dist/clone-DblgEZZa.mjs +39 -0
- package/dist/clone-DblgEZZa.mjs.map +1 -0
- package/dist/clone-Dy0cR2SZ.cjs +45 -0
- package/dist/clone-Dy0cR2SZ.cjs.map +1 -0
- package/dist/construct-interface-BfjcOD_E.cjs +117 -0
- package/dist/construct-interface-BfjcOD_E.cjs.map +1 -0
- package/dist/construct-interface-BqwRNYA2.d.mts +131 -0
- package/dist/construct-interface-BqwRNYA2.d.mts.map +1 -0
- package/dist/construct-interface-D2nNkHUN.d.cts +131 -0
- package/dist/construct-interface-D2nNkHUN.d.cts.map +1 -0
- package/dist/construct-interface-Z4CpS8tK.mjs +81 -0
- package/dist/construct-interface-Z4CpS8tK.mjs.map +1 -0
- package/dist/construct-interface.cjs +8 -0
- package/dist/construct-interface.d.cts +2 -0
- package/dist/construct-interface.d.mts +2 -0
- package/dist/construct-interface.mjs +3 -0
- package/dist/credential.cjs +96 -0
- package/dist/credential.cjs.map +1 -0
- package/dist/credential.d.cts +61 -0
- package/dist/credential.d.cts.map +1 -0
- package/dist/credential.d.mts +61 -0
- package/dist/credential.d.mts.map +1 -0
- package/dist/credential.mjs +94 -0
- package/dist/credential.mjs.map +1 -0
- package/dist/crons/index.cjs +39 -37
- package/dist/crons/index.cjs.map +1 -1
- package/dist/crons/index.d.cts +21 -8
- package/dist/crons/index.d.cts.map +1 -1
- package/dist/crons/index.d.mts +29 -13
- package/dist/crons/index.d.mts.map +1 -1
- package/dist/crons/index.mjs +37 -36
- package/dist/crons/index.mjs.map +1 -1
- package/dist/database/kysely.cjs +181 -0
- package/dist/database/kysely.cjs.map +1 -0
- package/dist/database/kysely.d.cts +152 -0
- package/dist/database/kysely.d.cts.map +1 -0
- package/dist/database/kysely.d.mts +152 -0
- package/dist/database/kysely.d.mts.map +1 -0
- package/dist/database/kysely.mjs +180 -0
- package/dist/database/kysely.mjs.map +1 -0
- package/dist/email.cjs +59 -0
- package/dist/email.cjs.map +1 -0
- package/dist/email.d.cts +50 -0
- package/dist/email.d.cts.map +1 -0
- package/dist/email.d.mts +50 -0
- package/dist/email.d.mts.map +1 -0
- package/dist/email.mjs +58 -0
- package/dist/email.mjs.map +1 -0
- package/dist/endpoints/index.cjs +21 -747
- package/dist/endpoints/index.d.cts +7 -343
- package/dist/endpoints/index.d.mts +7 -342
- package/dist/endpoints/index.mjs +11 -738
- package/dist/file-server.cjs +154 -0
- package/dist/file-server.cjs.map +1 -0
- package/dist/file-server.d.cts +156 -0
- package/dist/file-server.d.cts.map +1 -0
- package/dist/file-server.d.mts +156 -0
- package/dist/file-server.d.mts.map +1 -0
- package/dist/file-server.mjs +152 -0
- package/dist/file-server.mjs.map +1 -0
- package/dist/functions/index.cjs +4 -2
- package/dist/functions/index.d.cts +3 -2
- package/dist/functions/index.d.mts +3 -2
- package/dist/functions/index.mjs +4 -2
- package/dist/{functions-B-qt91O7.mjs → functions-CvT_q7Y4.mjs} +55 -51
- package/dist/functions-CvT_q7Y4.mjs.map +1 -0
- package/dist/{functions-C8i1kCMM.cjs → functions-DukjG8ov.cjs} +62 -57
- package/dist/functions-DukjG8ov.cjs.map +1 -0
- package/dist/index-7OcOWe75.d.cts +419 -0
- package/dist/index-7OcOWe75.d.cts.map +1 -0
- package/dist/index-Bt-F7u8L.d.mts +419 -0
- package/dist/index-Bt-F7u8L.d.mts.map +1 -0
- package/dist/{index-DP6fqv0I.d.mts → index-CPeqtKgq.d.mts} +48 -19
- package/dist/index-CPeqtKgq.d.mts.map +1 -0
- package/dist/{index-BVs9DvIj.d.cts → index-Dadljnh_.d.cts} +36 -9
- package/dist/index-Dadljnh_.d.cts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/lazyAccessors-DM6HcXQk.mjs +175 -0
- package/dist/lazyAccessors-DM6HcXQk.mjs.map +1 -0
- package/dist/lazyAccessors-DrJj8NpA.cjs +223 -0
- package/dist/lazyAccessors-DrJj8NpA.cjs.map +1 -0
- package/dist/object-storage.cjs +48 -0
- package/dist/object-storage.cjs.map +1 -0
- package/dist/object-storage.d.cts +36 -0
- package/dist/object-storage.d.cts.map +1 -0
- package/dist/object-storage.d.mts +36 -0
- package/dist/object-storage.d.mts.map +1 -0
- package/dist/object-storage.mjs +47 -0
- package/dist/object-storage.mjs.map +1 -0
- package/dist/{processAudits-CKjjivyz.cjs → processAudits-Bc8rz6Ev.cjs} +3 -3
- package/dist/{processAudits-CKjjivyz.cjs.map → processAudits-Bc8rz6Ev.cjs.map} +1 -1
- package/dist/{processAudits-ySnizdMG.mjs → processAudits-D89tICM4.mjs} +1 -1
- package/dist/{processAudits-ySnizdMG.mjs.map → processAudits-D89tICM4.mjs.map} +1 -1
- package/dist/{publisher-BrFOF847.mjs → publisher-CGEo8UKD.mjs} +1 -1
- package/dist/{publisher-BrFOF847.mjs.map → publisher-CGEo8UKD.mjs.map} +1 -1
- package/dist/{publisher-lFQleddL.cjs → publisher-CqGsXB2X.cjs} +1 -1
- package/dist/{publisher-lFQleddL.cjs.map → publisher-CqGsXB2X.cjs.map} +1 -1
- package/dist/queue/index.cjs +92 -30
- package/dist/queue/index.cjs.map +1 -1
- package/dist/queue/index.d.cts +19 -4
- package/dist/queue/index.d.cts.map +1 -1
- package/dist/queue/index.d.mts +22 -6
- package/dist/queue/index.d.mts.map +1 -1
- package/dist/queue/index.mjs +90 -29
- package/dist/queue/index.mjs.map +1 -1
- package/dist/rest-api.cjs +187 -0
- package/dist/rest-api.cjs.map +1 -0
- package/dist/rest-api.d.cts +221 -0
- package/dist/rest-api.d.cts.map +1 -0
- package/dist/rest-api.d.mts +221 -0
- package/dist/rest-api.d.mts.map +1 -0
- package/dist/rest-api.mjs +186 -0
- package/dist/rest-api.mjs.map +1 -0
- package/dist/site.cjs +48 -0
- package/dist/site.cjs.map +1 -0
- package/dist/site.d.cts +101 -0
- package/dist/site.d.cts.map +1 -0
- package/dist/site.d.mts +101 -0
- package/dist/site.d.mts.map +1 -0
- package/dist/site.mjs +47 -0
- package/dist/site.mjs.map +1 -0
- package/dist/subscribers/index.cjs +35 -27
- package/dist/subscribers/index.cjs.map +1 -1
- package/dist/subscribers/index.d.cts +20 -5
- package/dist/subscribers/index.d.cts.map +1 -1
- package/dist/subscribers/index.d.mts +23 -7
- package/dist/subscribers/index.d.mts.map +1 -1
- package/dist/subscribers/index.mjs +34 -27
- package/dist/subscribers/index.mjs.map +1 -1
- package/dist/surfaceEnv-BFXEms2f.cjs +39 -0
- package/dist/surfaceEnv-BFXEms2f.cjs.map +1 -0
- package/dist/surfaceEnv-C3Ktahea.mjs +27 -0
- package/dist/surfaceEnv-C3Ktahea.mjs.map +1 -0
- package/dist/{telemetry-3vdxGn4q.d.mts → telemetry-C3L0iS28.d.cts} +2 -2
- package/dist/{telemetry-3vdxGn4q.d.mts.map → telemetry-C3L0iS28.d.cts.map} +1 -1
- package/dist/{telemetry-Dqx-D3F7.d.cts → telemetry-D7bVFLGi.d.mts} +2 -2
- package/dist/{telemetry-Dqx-D3F7.d.cts.map → telemetry-D7bVFLGi.d.mts.map} +1 -1
- package/dist/topic/index.cjs +56 -13
- package/dist/topic/index.cjs.map +1 -1
- package/dist/topic/index.d.cts +2 -2
- package/dist/topic/index.d.cts.map +1 -1
- package/dist/topic/index.d.mts +2 -2
- package/dist/topic/index.d.mts.map +1 -1
- package/dist/topic/index.mjs +54 -12
- package/dist/topic/index.mjs.map +1 -1
- package/dist/{types-BDNGr7pv.d.mts → types-BlAkSuGI.d.cts} +1 -1
- package/dist/{types-BDNGr7pv.d.mts.map → types-BlAkSuGI.d.cts.map} +1 -1
- package/dist/{types-BdAaYDvd.d.cts → types-aKksMEWL.d.mts} +1 -1
- package/dist/{types-BdAaYDvd.d.cts.map → types-aKksMEWL.d.mts.map} +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +155 -23
- package/CHANGELOG.md +0 -396
- package/dist/Construct-DCMuYOox.d.mts.map +0 -1
- package/dist/Construct-_1wX7p_Y.d.cts.map +0 -1
- package/dist/Construct-r0U2zBwW.mjs.map +0 -1
- package/dist/Construct-vXMZJgRp.cjs.map +0 -1
- package/dist/Endpoint-CLPSIl6S.d.mts.map +0 -1
- package/dist/Endpoint-DgfRslct.d.cts.map +0 -1
- package/dist/HonoEndpointAdaptor-CkJENANP.cjs.map +0 -1
- package/dist/HonoEndpointAdaptor-DJDT3PMx.mjs.map +0 -1
- package/dist/Queue-DaxjwmOQ.d.cts.map +0 -1
- package/dist/Queue-HBDf0fqz.d.mts.map +0 -1
- package/dist/Subscriber-D8Xm-86W.d.mts.map +0 -1
- package/dist/Topic-C5ZMfveW.d.cts.map +0 -1
- package/dist/Topic-DT10AqHk.d.mts.map +0 -1
- package/dist/endpoints/index.cjs.map +0 -1
- package/dist/endpoints/index.d.cts.map +0 -1
- package/dist/endpoints/index.d.mts.map +0 -1
- package/dist/endpoints/index.mjs.map +0 -1
- package/dist/functions-B-qt91O7.mjs.map +0 -1
- package/dist/functions-C8i1kCMM.cjs.map +0 -1
- package/dist/index-BVs9DvIj.d.cts.map +0 -1
- package/dist/index-DP6fqv0I.d.mts.map +0 -1
- package/dist/lazyAccessors-DfqZR6C4.mjs.map +0 -1
- package/dist/lazyAccessors-DmTG8sQH.cjs.map +0 -1
- package/src/Construct.ts +0 -204
- package/src/__benchmarks__/build-time-optimization.bench.ts +0 -274
- package/src/__benchmarks__/endpoint.bench.ts +0 -494
- package/src/__benchmarks__/fixtures.ts +0 -241
- package/src/__benchmarks__/hono-adaptor.bench.ts +0 -533
- package/src/__benchmarks__/hono-server.bench.ts +0 -249
- package/src/__benchmarks__/response-builder.bench.ts +0 -428
- package/src/__benchmarks__/strategies/strategy-a-lazy-services.ts +0 -319
- package/src/__benchmarks__/strategies/strategy-c-middleware.ts +0 -530
- package/src/__benchmarks__/strategies/strategy-d-opt-in-events.ts +0 -567
- package/src/__tests__/Construct.environment.spec.ts +0 -704
- package/src/__tests__/publisher.setting.spec.ts +0 -508
- package/src/__tests__/publisher.spec.ts +0 -452
- package/src/adaptors/aws.ts +0 -6
- package/src/adaptors/hono.ts +0 -1
- package/src/adaptors/testing.ts +0 -11
- package/src/crons/AWSScheduledFunction.ts +0 -73
- package/src/crons/Cron.ts +0 -149
- package/src/crons/CronBuilder.ts +0 -271
- package/src/crons/__tests__/AWSScheduledFunction.spec.ts +0 -152
- package/src/crons/__tests__/Cron.spec.ts +0 -464
- package/src/crons/__tests__/CronBuilder.state-isolation.spec.ts +0 -227
- package/src/crons/index.ts +0 -12
- package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +0 -677
- package/src/endpoints/AmazonApiGatewayV1EndpointAdaptor.ts +0 -105
- package/src/endpoints/AmazonApiGatewayV2EndpointAdaptor.ts +0 -97
- package/src/endpoints/Authorizer.ts +0 -152
- package/src/endpoints/Endpoint.ts +0 -1287
- package/src/endpoints/EndpointBuilder.ts +0 -758
- package/src/endpoints/EndpointFactory.ts +0 -1148
- package/src/endpoints/HonoEndpointAdaptor.ts +0 -677
- package/src/endpoints/MswEndpointAdaptor.ts +0 -226
- package/src/endpoints/TestEndpointAdaptor.ts +0 -422
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.audits.spec.ts +0 -499
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.events.spec.ts +0 -560
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.spec.ts +0 -1304
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.audits.spec.ts +0 -626
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.events.spec.ts +0 -732
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.factory-publisher.spec.ts +0 -296
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.kysely-audit.integration.spec.ts +0 -951
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.responseType.spec.ts +0 -111
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.rls.spec.ts +0 -307
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.spec.ts +0 -629
- package/src/endpoints/__tests__/Authorizer.spec.ts +0 -286
- package/src/endpoints/__tests__/Endpoint.cookies.spec.ts +0 -207
- package/src/endpoints/__tests__/Endpoint.headers.spec.ts +0 -187
- package/src/endpoints/__tests__/Endpoint.manifest.spec.ts +0 -175
- package/src/endpoints/__tests__/Endpoint.spec.ts +0 -857
- package/src/endpoints/__tests__/EndpointBuilder.audit.spec.ts +0 -448
- package/src/endpoints/__tests__/EndpointBuilder.responseType.spec.ts +0 -47
- package/src/endpoints/__tests__/EndpointBuilder.spec.ts +0 -523
- package/src/endpoints/__tests__/EndpointFactory.authorizers.spec.ts +0 -492
- package/src/endpoints/__tests__/EndpointFactory.database-auditor.spec.ts +0 -509
- package/src/endpoints/__tests__/EndpointFactory.reference-audit.spec.ts +0 -190
- package/src/endpoints/__tests__/EndpointFactory.spec.ts +0 -479
- package/src/endpoints/__tests__/EndpointFactory.state-isolation.spec.ts +0 -155
- package/src/endpoints/__tests__/HonoEndpointAdaptor.audit-transactions.spec.ts +0 -703
- package/src/endpoints/__tests__/HonoEndpointAdaptor.audits.spec.ts +0 -632
- package/src/endpoints/__tests__/HonoEndpointAdaptor.events.spec.ts +0 -577
- package/src/endpoints/__tests__/HonoEndpointAdaptor.kysely-audit.integration.spec.ts +0 -1067
- package/src/endpoints/__tests__/HonoEndpointAdaptor.openapi.spec.ts +0 -317
- package/src/endpoints/__tests__/HonoEndpointAdaptor.pgboss-publisher.spec.ts +0 -289
- package/src/endpoints/__tests__/HonoEndpointAdaptor.responseType.spec.ts +0 -128
- package/src/endpoints/__tests__/HonoEndpointAdaptor.spec.ts +0 -1207
- package/src/endpoints/__tests__/MswEndpointAdaptor.spec.ts +0 -211
- package/src/endpoints/__tests__/ResponseBuilder.spec.ts +0 -235
- package/src/endpoints/__tests__/TestEndpointAdaptor.audits.spec.ts +0 -602
- package/src/endpoints/__tests__/TestEndpointAdaptor.spec.ts +0 -1044
- package/src/endpoints/__tests__/__snapshots__/HonoEndpointAdaptor.spec.ts.snap +0 -54
- package/src/endpoints/__tests__/endpoint-types.test.ts +0 -88
- package/src/endpoints/__tests__/helpers.spec.ts +0 -37
- package/src/endpoints/__tests__/lazyAccessors.spec.ts +0 -330
- package/src/endpoints/__tests__/processAudits.spec.ts +0 -631
- package/src/endpoints/audit.ts +0 -87
- package/src/endpoints/helpers.ts +0 -98
- package/src/endpoints/index.ts +0 -42
- package/src/endpoints/lazyAccessors.ts +0 -241
- package/src/endpoints/parseHonoQuery.ts +0 -16
- package/src/endpoints/parseQueryParams.ts +0 -32
- package/src/endpoints/processAudits.ts +0 -371
- package/src/endpoints/rls.ts +0 -67
- package/src/functions/AWSLambdaFunction.ts +0 -348
- package/src/functions/BaseFunctionBuilder.ts +0 -201
- package/src/functions/Function.ts +0 -238
- package/src/functions/FunctionBuilder.ts +0 -391
- package/src/functions/FunctionExecutionWrapper.ts +0 -216
- package/src/functions/TestFunctionAdaptor.ts +0 -217
- package/src/functions/__tests__/AWSLambdaFunctionAdaptor.spec.ts +0 -513
- package/src/functions/__tests__/Function.audits.spec.ts +0 -393
- package/src/functions/__tests__/Function.spec.ts +0 -477
- package/src/functions/__tests__/FunctionBuilder.state-isolation.spec.ts +0 -207
- package/src/functions/__tests__/TestFunctionAdaptor.spec.ts +0 -480
- package/src/functions/index.ts +0 -12
- package/src/index.ts +0 -23
- package/src/publisher.ts +0 -93
- package/src/queue/AWSLambdaQueueAdaptor.ts +0 -162
- package/src/queue/Queue.ts +0 -128
- package/src/queue/QueueBuilder.ts +0 -115
- package/src/queue/TestQueueAdaptor.ts +0 -63
- package/src/queue/__tests__/QueueBuilder.spec.ts +0 -137
- package/src/queue/index.ts +0 -12
- package/src/subscribers/AWSLambdaSubscriberAdaptor.ts +0 -342
- package/src/subscribers/Subscriber.ts +0 -117
- package/src/subscribers/SubscriberBuilder.ts +0 -186
- package/src/subscribers/TestSubscriberAdaptor.ts +0 -133
- package/src/subscribers/__tests__/AWSLambdaSubscriberAdaptor.spec.ts +0 -1018
- package/src/subscribers/__tests__/Subscriber.spec.ts +0 -430
- package/src/subscribers/__tests__/TestSubscriberAdaptor.spec.ts +0 -652
- package/src/subscribers/index.ts +0 -6
- package/src/telemetry.ts +0 -103
- package/src/topic/Topic.ts +0 -103
- package/src/topic/TopicBuilder.ts +0 -51
- package/src/topic/__tests__/TopicBuilder.spec.ts +0 -82
- package/src/topic/index.ts +0 -11
- package/src/types.ts +0 -13
- package/test.ts +0 -91
- package/tsconfig.json +0 -9
- package/tsdown.config.ts +0 -34
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AuditActor,
|
|
3
|
-
AuditableAction,
|
|
4
|
-
Auditor,
|
|
5
|
-
AuditStorage,
|
|
6
|
-
} from '@geekmidas/audit';
|
|
7
|
-
import { DefaultAuditor } from '@geekmidas/audit';
|
|
8
|
-
import type { Logger } from '@geekmidas/logger';
|
|
9
|
-
import type { InferStandardSchema } from '@geekmidas/schema';
|
|
10
|
-
import type { Service, ServiceDiscovery } from '@geekmidas/services';
|
|
11
|
-
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
12
|
-
import type { ActorExtractor, MappedAudit } from './audit';
|
|
13
|
-
import type { CookieFn, Endpoint, HeaderFn } from './Endpoint';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Process declarative audit definitions after successful endpoint execution.
|
|
17
|
-
* Similar to publishConstructEvents for events.
|
|
18
|
-
*
|
|
19
|
-
* @param endpoint - The endpoint with audit configuration
|
|
20
|
-
* @param response - The handler response to generate audit payloads from
|
|
21
|
-
* @param serviceDiscovery - Service discovery for registering audit storage
|
|
22
|
-
* @param logger - Logger for debug/error messages
|
|
23
|
-
* @param ctx - Request context (session, headers, cookies, services)
|
|
24
|
-
* @param existingAuditor - Optional existing auditor instance (e.g., from handler context).
|
|
25
|
-
* If provided, uses this auditor (with its stored transaction).
|
|
26
|
-
* If not provided, creates a new auditor.
|
|
27
|
-
*/
|
|
28
|
-
export async function processEndpointAudits<
|
|
29
|
-
TServices extends Service[] = [],
|
|
30
|
-
TSession = unknown,
|
|
31
|
-
TLogger extends Logger = Logger,
|
|
32
|
-
OutSchema extends StandardSchemaV1 | undefined = undefined,
|
|
33
|
-
TAuditStorage extends AuditStorage | undefined = undefined,
|
|
34
|
-
TAuditStorageServiceName extends string = string,
|
|
35
|
-
TAuditAction extends AuditableAction<string, unknown> = AuditableAction<
|
|
36
|
-
string,
|
|
37
|
-
unknown
|
|
38
|
-
>,
|
|
39
|
-
>(
|
|
40
|
-
endpoint: Endpoint<
|
|
41
|
-
any,
|
|
42
|
-
any,
|
|
43
|
-
any,
|
|
44
|
-
OutSchema,
|
|
45
|
-
TServices,
|
|
46
|
-
TLogger,
|
|
47
|
-
TSession,
|
|
48
|
-
any,
|
|
49
|
-
any,
|
|
50
|
-
TAuditStorage,
|
|
51
|
-
TAuditStorageServiceName,
|
|
52
|
-
TAuditAction
|
|
53
|
-
>,
|
|
54
|
-
response: InferStandardSchema<OutSchema>,
|
|
55
|
-
serviceDiscovery: ServiceDiscovery<any>,
|
|
56
|
-
logger: TLogger,
|
|
57
|
-
ctx: {
|
|
58
|
-
session: TSession;
|
|
59
|
-
header: HeaderFn;
|
|
60
|
-
cookie: CookieFn;
|
|
61
|
-
services: Record<string, unknown>;
|
|
62
|
-
},
|
|
63
|
-
existingAuditor?: Auditor<TAuditAction>,
|
|
64
|
-
): Promise<void> {
|
|
65
|
-
try {
|
|
66
|
-
const audits = endpoint.audits as MappedAudit<TAuditAction, OutSchema>[];
|
|
67
|
-
|
|
68
|
-
// If we have an existing auditor (from handler context), we need to flush
|
|
69
|
-
// any manual audits it collected, even if there are no declarative audits
|
|
70
|
-
const hasExistingRecords =
|
|
71
|
-
existingAuditor && existingAuditor.getRecords().length > 0;
|
|
72
|
-
|
|
73
|
-
// Skip if no declarative audits and no existing records to flush
|
|
74
|
-
if (!audits?.length && !hasExistingRecords) {
|
|
75
|
-
logger.debug('No audits to process');
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// If no auditor storage service and we have things to process, warn
|
|
80
|
-
if (!endpoint.auditorStorageService) {
|
|
81
|
-
if (hasExistingRecords || audits?.length) {
|
|
82
|
-
logger.warn('No auditor storage service available');
|
|
83
|
-
}
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Get or create auditor
|
|
88
|
-
let auditor: Auditor<TAuditAction>;
|
|
89
|
-
|
|
90
|
-
if (existingAuditor) {
|
|
91
|
-
// Use existing auditor (preserves stored transaction and manual audits)
|
|
92
|
-
auditor = existingAuditor;
|
|
93
|
-
logger.debug('Using existing auditor from handler context');
|
|
94
|
-
} else {
|
|
95
|
-
// Create new auditor (backward compatibility)
|
|
96
|
-
const services = await serviceDiscovery.register([
|
|
97
|
-
endpoint.auditorStorageService,
|
|
98
|
-
]);
|
|
99
|
-
const storage = services[
|
|
100
|
-
endpoint.auditorStorageService.serviceName
|
|
101
|
-
] as AuditStorage;
|
|
102
|
-
|
|
103
|
-
// Extract actor if configured
|
|
104
|
-
let actor: AuditActor = { id: 'system', type: 'system' };
|
|
105
|
-
if (endpoint.actorExtractor) {
|
|
106
|
-
try {
|
|
107
|
-
actor = await (
|
|
108
|
-
endpoint.actorExtractor as ActorExtractor<
|
|
109
|
-
TServices,
|
|
110
|
-
TSession,
|
|
111
|
-
TLogger
|
|
112
|
-
>
|
|
113
|
-
)({
|
|
114
|
-
services: ctx.services as any,
|
|
115
|
-
session: ctx.session,
|
|
116
|
-
header: ctx.header,
|
|
117
|
-
cookie: ctx.cookie,
|
|
118
|
-
logger,
|
|
119
|
-
});
|
|
120
|
-
} catch (error) {
|
|
121
|
-
logger.error(error as Error, 'Failed to extract actor for audits');
|
|
122
|
-
// Continue with system actor
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
auditor = new DefaultAuditor<TAuditAction>({
|
|
127
|
-
actor,
|
|
128
|
-
storage,
|
|
129
|
-
metadata: {
|
|
130
|
-
endpoint: endpoint.route,
|
|
131
|
-
method: endpoint.method,
|
|
132
|
-
},
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Process each declarative audit
|
|
137
|
-
if (audits?.length) {
|
|
138
|
-
for (const audit of audits) {
|
|
139
|
-
logger.debug({ audit: audit.type }, 'Processing declarative audit');
|
|
140
|
-
|
|
141
|
-
// Check when condition
|
|
142
|
-
if (audit.when && !audit.when(response as any)) {
|
|
143
|
-
logger.debug(
|
|
144
|
-
{ audit: audit.type },
|
|
145
|
-
'Audit skipped due to when condition',
|
|
146
|
-
);
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Extract payload
|
|
151
|
-
const payload = audit.payload(response as any);
|
|
152
|
-
|
|
153
|
-
// Extract entityId if configured
|
|
154
|
-
const entityId = audit.entityId?.(response as any);
|
|
155
|
-
|
|
156
|
-
// Record the audit
|
|
157
|
-
auditor.audit(audit.type as any, payload as any, {
|
|
158
|
-
table: audit.table,
|
|
159
|
-
entityId,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// Flush audits to storage
|
|
165
|
-
// Note: If existingAuditor has a stored transaction (via setTransaction),
|
|
166
|
-
// flush() will use it automatically
|
|
167
|
-
const recordCount = auditor.getRecords().length;
|
|
168
|
-
if (recordCount > 0) {
|
|
169
|
-
// Check if auditor has a stored transaction (for logging purposes)
|
|
170
|
-
const trx =
|
|
171
|
-
'getTransaction' in auditor
|
|
172
|
-
? (auditor as { getTransaction(): unknown }).getTransaction()
|
|
173
|
-
: undefined;
|
|
174
|
-
logger.debug(
|
|
175
|
-
{ auditCount: recordCount, hasTransaction: !!trx },
|
|
176
|
-
'Flushing audits',
|
|
177
|
-
);
|
|
178
|
-
await auditor.flush();
|
|
179
|
-
}
|
|
180
|
-
} catch (error) {
|
|
181
|
-
logger.error(error as Error, 'Failed to process audits');
|
|
182
|
-
// Don't rethrow - audit failures shouldn't fail the request
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Context for audit-aware handler execution.
|
|
188
|
-
*/
|
|
189
|
-
export interface AuditExecutionContext<
|
|
190
|
-
TAuditAction extends AuditableAction<string, unknown> = AuditableAction<
|
|
191
|
-
string,
|
|
192
|
-
unknown
|
|
193
|
-
>,
|
|
194
|
-
> {
|
|
195
|
-
/** The auditor instance for recording audits */
|
|
196
|
-
auditor: Auditor<TAuditAction>;
|
|
197
|
-
/** The audit storage instance */
|
|
198
|
-
storage: AuditStorage;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Create audit context for handler execution.
|
|
203
|
-
* Returns the auditor and storage for use in the handler.
|
|
204
|
-
*
|
|
205
|
-
* @param endpoint - The endpoint with audit configuration
|
|
206
|
-
* @param serviceDiscovery - Service discovery for getting audit storage
|
|
207
|
-
* @param logger - Logger for debug/error messages
|
|
208
|
-
* @param ctx - Request context for actor extraction
|
|
209
|
-
* @returns Audit context with auditor and storage, or undefined if not configured
|
|
210
|
-
*/
|
|
211
|
-
export async function createAuditContext<
|
|
212
|
-
TServices extends Service[] = [],
|
|
213
|
-
TSession = unknown,
|
|
214
|
-
TLogger extends Logger = Logger,
|
|
215
|
-
TAuditStorage extends AuditStorage | undefined = undefined,
|
|
216
|
-
TAuditStorageServiceName extends string = string,
|
|
217
|
-
TAuditAction extends AuditableAction<string, unknown> = AuditableAction<
|
|
218
|
-
string,
|
|
219
|
-
unknown
|
|
220
|
-
>,
|
|
221
|
-
TDatabase = undefined,
|
|
222
|
-
TDatabaseServiceName extends string = string,
|
|
223
|
-
>(
|
|
224
|
-
endpoint: Endpoint<
|
|
225
|
-
any,
|
|
226
|
-
any,
|
|
227
|
-
any,
|
|
228
|
-
any,
|
|
229
|
-
TServices,
|
|
230
|
-
TLogger,
|
|
231
|
-
TSession,
|
|
232
|
-
any,
|
|
233
|
-
any,
|
|
234
|
-
TAuditStorage,
|
|
235
|
-
TAuditStorageServiceName,
|
|
236
|
-
TAuditAction,
|
|
237
|
-
TDatabase,
|
|
238
|
-
TDatabaseServiceName
|
|
239
|
-
>,
|
|
240
|
-
serviceDiscovery: ServiceDiscovery<any>,
|
|
241
|
-
logger: TLogger,
|
|
242
|
-
ctx: {
|
|
243
|
-
session: TSession;
|
|
244
|
-
header: HeaderFn;
|
|
245
|
-
cookie: CookieFn;
|
|
246
|
-
services: Record<string, unknown>;
|
|
247
|
-
},
|
|
248
|
-
): Promise<AuditExecutionContext<TAuditAction> | undefined> {
|
|
249
|
-
if (!endpoint.auditorStorageService) {
|
|
250
|
-
return undefined;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
const services = await serviceDiscovery.register([
|
|
254
|
-
endpoint.auditorStorageService,
|
|
255
|
-
]);
|
|
256
|
-
const storage = services[
|
|
257
|
-
endpoint.auditorStorageService.serviceName
|
|
258
|
-
] as AuditStorage;
|
|
259
|
-
|
|
260
|
-
// Extract actor if configured
|
|
261
|
-
let actor: AuditActor = { id: 'system', type: 'system' };
|
|
262
|
-
if (endpoint.actorExtractor) {
|
|
263
|
-
try {
|
|
264
|
-
actor = await (
|
|
265
|
-
endpoint.actorExtractor as ActorExtractor<TServices, TSession, TLogger>
|
|
266
|
-
)({
|
|
267
|
-
services: ctx.services as any,
|
|
268
|
-
session: ctx.session,
|
|
269
|
-
header: ctx.header,
|
|
270
|
-
cookie: ctx.cookie,
|
|
271
|
-
logger,
|
|
272
|
-
});
|
|
273
|
-
} catch (error) {
|
|
274
|
-
logger.error(error as Error, 'Failed to extract actor for audits');
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
const auditor = new DefaultAuditor<TAuditAction>({
|
|
279
|
-
actor,
|
|
280
|
-
storage,
|
|
281
|
-
metadata: {
|
|
282
|
-
endpoint: endpoint.route,
|
|
283
|
-
method: endpoint.method,
|
|
284
|
-
},
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
return { auditor, storage };
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Options for executeWithAuditTransaction.
|
|
292
|
-
*/
|
|
293
|
-
export interface ExecuteWithAuditTransactionOptions {
|
|
294
|
-
/**
|
|
295
|
-
* Database connection to use for the transaction.
|
|
296
|
-
* If this is already a transaction, it will be reused instead of creating a nested one.
|
|
297
|
-
* If not provided, the storage's internal database is used.
|
|
298
|
-
*/
|
|
299
|
-
db?: unknown;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Execute a handler with automatic audit transaction support.
|
|
304
|
-
* If the audit storage provides a withTransaction method, wraps execution
|
|
305
|
-
* in a transaction so audits are atomic with handler's database operations.
|
|
306
|
-
*
|
|
307
|
-
* This is database-agnostic - each storage implementation provides its own
|
|
308
|
-
* transaction handling based on the underlying database (Kysely, Drizzle, etc.).
|
|
309
|
-
*
|
|
310
|
-
* If the db parameter is provided and is already a transaction, the storage
|
|
311
|
-
* will reuse it instead of creating a nested transaction (similar to
|
|
312
|
-
* packages/db/src/kysely.ts#withTransaction).
|
|
313
|
-
*
|
|
314
|
-
* @param auditContext - The audit context from createAuditContext
|
|
315
|
-
* @param handler - The handler function to execute (receives auditor)
|
|
316
|
-
* @param onComplete - Called after handler with response, to process declarative audits
|
|
317
|
-
* @param options - Optional configuration including database connection
|
|
318
|
-
* @returns The handler result
|
|
319
|
-
*/
|
|
320
|
-
export async function executeWithAuditTransaction<
|
|
321
|
-
T,
|
|
322
|
-
TAuditAction extends AuditableAction<string, unknown> = AuditableAction<
|
|
323
|
-
string,
|
|
324
|
-
unknown
|
|
325
|
-
>,
|
|
326
|
-
>(
|
|
327
|
-
auditContext: AuditExecutionContext<TAuditAction> | undefined,
|
|
328
|
-
handler: (auditor?: Auditor<TAuditAction>) => Promise<T>,
|
|
329
|
-
onComplete?: (response: T, auditor: Auditor<TAuditAction>) => Promise<void>,
|
|
330
|
-
options?: ExecuteWithAuditTransactionOptions,
|
|
331
|
-
): Promise<T> {
|
|
332
|
-
// No audit context - just run handler
|
|
333
|
-
if (!auditContext) {
|
|
334
|
-
return handler(undefined);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
const { auditor, storage } = auditContext;
|
|
338
|
-
|
|
339
|
-
// Check if storage provides a transaction wrapper
|
|
340
|
-
if (storage.withTransaction) {
|
|
341
|
-
// Wrap in transaction - audits are atomic with handler operations
|
|
342
|
-
// The storage's withTransaction handles setTransaction and flush
|
|
343
|
-
// Pass db so existing transactions are reused
|
|
344
|
-
return storage.withTransaction(
|
|
345
|
-
auditor,
|
|
346
|
-
async () => {
|
|
347
|
-
const response = await handler(auditor);
|
|
348
|
-
|
|
349
|
-
// Process declarative audits within the transaction
|
|
350
|
-
if (onComplete) {
|
|
351
|
-
await onComplete(response, auditor);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
return response;
|
|
355
|
-
},
|
|
356
|
-
options?.db,
|
|
357
|
-
);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
// No transaction support - run handler and flush audits after
|
|
361
|
-
const response = await handler(auditor);
|
|
362
|
-
|
|
363
|
-
if (onComplete) {
|
|
364
|
-
await onComplete(response, auditor);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
// Flush audits (no transaction)
|
|
368
|
-
await auditor.flush();
|
|
369
|
-
|
|
370
|
-
return response;
|
|
371
|
-
}
|
package/src/endpoints/rls.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { Logger } from '@geekmidas/logger';
|
|
2
|
-
import type { Service, ServiceRecord } from '@geekmidas/services';
|
|
3
|
-
import type { CookieFn, HeaderFn } from './Endpoint';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* RLS context - key-value pairs to set as PostgreSQL session variables.
|
|
7
|
-
* Keys become `prefix.key` (e.g., `app.user_id`).
|
|
8
|
-
*/
|
|
9
|
-
export interface RlsContext {
|
|
10
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Function type for extracting RLS context from request context.
|
|
15
|
-
*
|
|
16
|
-
* @template TServices - Available service dependencies
|
|
17
|
-
* @template TSession - Session data type
|
|
18
|
-
* @template TLogger - Logger type
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* const extractor: RlsContextExtractor<[], UserSession> = ({ session }) => ({
|
|
23
|
-
* user_id: session.userId,
|
|
24
|
-
* tenant_id: session.tenantId,
|
|
25
|
-
* roles: session.roles.join(','),
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export type RlsContextExtractor<
|
|
30
|
-
TServices extends Service[] = [],
|
|
31
|
-
TSession = unknown,
|
|
32
|
-
TLogger extends Logger = Logger,
|
|
33
|
-
> = (ctx: {
|
|
34
|
-
services: ServiceRecord<TServices>;
|
|
35
|
-
session: TSession;
|
|
36
|
-
header: HeaderFn;
|
|
37
|
-
cookie: CookieFn;
|
|
38
|
-
logger: TLogger;
|
|
39
|
-
}) => RlsContext | Promise<RlsContext>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Configuration for RLS on an endpoint or factory.
|
|
43
|
-
*
|
|
44
|
-
* @template TServices - Available service dependencies
|
|
45
|
-
* @template TSession - Session data type
|
|
46
|
-
* @template TLogger - Logger type
|
|
47
|
-
*/
|
|
48
|
-
export interface RlsConfig<
|
|
49
|
-
TServices extends Service[] = [],
|
|
50
|
-
TSession = unknown,
|
|
51
|
-
TLogger extends Logger = Logger,
|
|
52
|
-
> {
|
|
53
|
-
/** Function to extract RLS context from request */
|
|
54
|
-
extractor: RlsContextExtractor<TServices, TSession, TLogger>;
|
|
55
|
-
/** Prefix for PostgreSQL session variables (default: 'app') */
|
|
56
|
-
prefix?: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Symbol used to bypass RLS for an endpoint.
|
|
61
|
-
*/
|
|
62
|
-
export const RLS_BYPASS = Symbol.for('geekmidas.rls.bypass');
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Type for RLS bypass marker.
|
|
66
|
-
*/
|
|
67
|
-
export type RlsBypass = typeof RLS_BYPASS;
|