@geekmidas/constructs 3.0.3 → 3.0.5
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 +12 -0
- package/dist/{AmazonApiGatewayEndpointAdaptor-B30TqZRX.d.mts → AmazonApiGatewayEndpointAdaptor-CS-m4WZy.d.mts} +11 -2
- package/dist/AmazonApiGatewayEndpointAdaptor-CS-m4WZy.d.mts.map +1 -0
- package/dist/{AmazonApiGatewayEndpointAdaptor-ciUHVvPX.mjs → AmazonApiGatewayEndpointAdaptor-Cmm9d_Po.mjs} +20 -2
- package/dist/AmazonApiGatewayEndpointAdaptor-Cmm9d_Po.mjs.map +1 -0
- package/dist/{AmazonApiGatewayEndpointAdaptor-jDYqkgFE.cjs → AmazonApiGatewayEndpointAdaptor-D7mhDtSL.cjs} +20 -2
- package/dist/AmazonApiGatewayEndpointAdaptor-D7mhDtSL.cjs.map +1 -0
- package/dist/{AmazonApiGatewayEndpointAdaptor-D4lAuXA-.d.cts → AmazonApiGatewayEndpointAdaptor-DisDeEF0.d.cts} +11 -2
- package/dist/AmazonApiGatewayEndpointAdaptor-DisDeEF0.d.cts.map +1 -0
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-B5xFYauV.d.cts → AmazonApiGatewayV1EndpointAdaptor-D6wNqjth.d.cts} +3 -3
- package/dist/AmazonApiGatewayV1EndpointAdaptor-D6wNqjth.d.cts.map +1 -0
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-CG1UJoAK.d.mts → AmazonApiGatewayV1EndpointAdaptor-DSMe7dZ4.d.mts} +3 -3
- package/dist/AmazonApiGatewayV1EndpointAdaptor-DSMe7dZ4.d.mts.map +1 -0
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-DwKlAfnb.cjs → AmazonApiGatewayV1EndpointAdaptor-DstIoQBv.cjs} +3 -3
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-DwKlAfnb.cjs.map → AmazonApiGatewayV1EndpointAdaptor-DstIoQBv.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-DCfEo-Tu.mjs → AmazonApiGatewayV1EndpointAdaptor-zrlehWUG.mjs} +3 -3
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-DCfEo-Tu.mjs.map → AmazonApiGatewayV1EndpointAdaptor-zrlehWUG.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-ofjuxcPV.d.mts → AmazonApiGatewayV2EndpointAdaptor-ByljgCnY.d.mts} +3 -3
- package/dist/AmazonApiGatewayV2EndpointAdaptor-ByljgCnY.d.mts.map +1 -0
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-B126fL6i.cjs → AmazonApiGatewayV2EndpointAdaptor-DaAHSnqs.cjs} +4 -3
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-B126fL6i.cjs.map → AmazonApiGatewayV2EndpointAdaptor-DaAHSnqs.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-CGMF4lD4.mjs → AmazonApiGatewayV2EndpointAdaptor-Dj5v-I6S.mjs} +4 -3
- package/dist/AmazonApiGatewayV2EndpointAdaptor-Dj5v-I6S.mjs.map +1 -0
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-OkwjABOz.d.cts → AmazonApiGatewayV2EndpointAdaptor-PcMFUEF9.d.cts} +3 -3
- package/dist/AmazonApiGatewayV2EndpointAdaptor-PcMFUEF9.d.cts.map +1 -0
- package/dist/{Authorizer-BgjU8-z6.mjs → Authorizer-4unKN3Xn.mjs} +1 -1
- package/dist/{Authorizer-BgjU8-z6.mjs.map → Authorizer-4unKN3Xn.mjs.map} +1 -1
- package/dist/{Authorizer-BXxBee2P.cjs → Authorizer-Dx57psuM.cjs} +1 -1
- package/dist/{Authorizer-BXxBee2P.cjs.map → Authorizer-Dx57psuM.cjs.map} +1 -1
- package/dist/{Cron-BUpUS-0f.mjs → Cron-B3vrGuaD.mjs} +1 -1
- package/dist/{Cron-BUpUS-0f.mjs.map → Cron-B3vrGuaD.mjs.map} +1 -1
- package/dist/{Cron-Bp08dJ4R.cjs → Cron-DEKZg5j4.cjs} +1 -1
- package/dist/{Cron-Bp08dJ4R.cjs.map → Cron-DEKZg5j4.cjs.map} +1 -1
- package/dist/{CronBuilder-CIxJQ1Ps.cjs → CronBuilder-BHpY6w3b.cjs} +2 -2
- package/dist/{CronBuilder-CIxJQ1Ps.cjs.map → CronBuilder-BHpY6w3b.cjs.map} +1 -1
- package/dist/{CronBuilder-DUggbCHc.mjs → CronBuilder-VXpyNfp2.mjs} +2 -2
- package/dist/{CronBuilder-DUggbCHc.mjs.map → CronBuilder-VXpyNfp2.mjs.map} +1 -1
- package/dist/{Endpoint-BiPM0glm.d.mts → Endpoint-BIvS-rKH.d.mts} +6 -6
- package/dist/Endpoint-BIvS-rKH.d.mts.map +1 -0
- package/dist/{Endpoint-C9N6CmvB.d.cts → Endpoint-BPh52sXZ.d.cts} +6 -6
- package/dist/Endpoint-BPh52sXZ.d.cts.map +1 -0
- package/dist/Endpoint-BcxvF4F3.cjs.map +1 -1
- package/dist/Endpoint-DvY3aqAy.mjs.map +1 -1
- package/dist/{EndpointBuilder-B0Aj5jbB.d.mts → EndpointBuilder-3xH8Gllw.d.mts} +4 -3
- package/dist/EndpointBuilder-3xH8Gllw.d.mts.map +1 -0
- package/dist/{EndpointBuilder-Bel6RS7W.d.cts → EndpointBuilder-BmVTFp1A.d.cts} +4 -3
- package/dist/EndpointBuilder-BmVTFp1A.d.cts.map +1 -0
- package/dist/{EndpointBuilder-CF-ZWtdu.mjs → EndpointBuilder-CMzbGG2c.mjs} +7 -3
- package/dist/{EndpointBuilder-CF-ZWtdu.mjs.map → EndpointBuilder-CMzbGG2c.mjs.map} +1 -1
- package/dist/{EndpointBuilder-CyszO0bs.cjs → EndpointBuilder-QdDf3x87.cjs} +7 -3
- package/dist/{EndpointBuilder-CyszO0bs.cjs.map → EndpointBuilder-QdDf3x87.cjs.map} +1 -1
- package/dist/{EndpointFactory-B0D6d6t9.cjs → EndpointFactory-AsfUsn-v.cjs} +3 -3
- package/dist/{EndpointFactory-B0D6d6t9.cjs.map → EndpointFactory-AsfUsn-v.cjs.map} +1 -1
- package/dist/{EndpointFactory-Do498RmG.mjs → EndpointFactory-CkPaFZA0.mjs} +3 -3
- package/dist/{EndpointFactory-Do498RmG.mjs.map → EndpointFactory-CkPaFZA0.mjs.map} +1 -1
- package/dist/{EndpointFactory-CWIeWCRG.d.mts → EndpointFactory-DKHnUYl8.d.mts} +3 -3
- package/dist/{EndpointFactory-CXvakOkn.d.cts.map → EndpointFactory-DKHnUYl8.d.mts.map} +1 -1
- package/dist/{EndpointFactory-CXvakOkn.d.cts → EndpointFactory-DaDXPRAg.d.cts} +3 -3
- package/dist/{EndpointFactory-CWIeWCRG.d.mts.map → EndpointFactory-DaDXPRAg.d.cts.map} +1 -1
- package/dist/{HonoEndpointAdaptor-DgoeqUX6.d.mts → HonoEndpointAdaptor-Cb45sqM9.d.mts} +4 -4
- package/dist/{HonoEndpointAdaptor-BNHGwpvZ.d.cts.map → HonoEndpointAdaptor-Cb45sqM9.d.mts.map} +1 -1
- package/dist/{HonoEndpointAdaptor-BvxQreVM.mjs → HonoEndpointAdaptor-D7N5oiO0.mjs} +5 -2
- package/dist/HonoEndpointAdaptor-D7N5oiO0.mjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-CQqQPLHH.cjs → HonoEndpointAdaptor-Jbptyuxv.cjs} +5 -2
- package/dist/HonoEndpointAdaptor-Jbptyuxv.cjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-BNHGwpvZ.d.cts → HonoEndpointAdaptor-VStaYQHr.d.cts} +4 -4
- package/dist/{HonoEndpointAdaptor-DgoeqUX6.d.mts.map → HonoEndpointAdaptor-VStaYQHr.d.cts.map} +1 -1
- package/dist/{Subscriber-DKQK5gLD.mjs → Subscriber-BEhOdNQi.mjs} +1 -1
- package/dist/{Subscriber-DKQK5gLD.mjs.map → Subscriber-BEhOdNQi.mjs.map} +1 -1
- package/dist/{Subscriber-ClqSPbIZ.cjs → Subscriber-Scz7hrV6.cjs} +1 -1
- package/dist/{Subscriber-ClqSPbIZ.cjs.map → Subscriber-Scz7hrV6.cjs.map} +1 -1
- package/dist/{SubscriberBuilder-BS5B_688.cjs → SubscriberBuilder-B82h4v-S.cjs} +2 -2
- package/dist/{SubscriberBuilder-BS5B_688.cjs.map → SubscriberBuilder-B82h4v-S.cjs.map} +1 -1
- package/dist/{SubscriberBuilder-BswTuvUc.mjs → SubscriberBuilder-DlUaG0Ej.mjs} +2 -2
- package/dist/{SubscriberBuilder-BswTuvUc.mjs.map → SubscriberBuilder-DlUaG0Ej.mjs.map} +1 -1
- package/dist/{TestEndpointAdaptor-DjQSuxRq.cjs → TestEndpointAdaptor-BKoJpTGT.cjs} +5 -2
- package/dist/TestEndpointAdaptor-BKoJpTGT.cjs.map +1 -0
- package/dist/{TestEndpointAdaptor-qSWV8dpS.d.mts → TestEndpointAdaptor-Bt-uW6SC.d.mts} +2 -2
- package/dist/{TestEndpointAdaptor-CCf3Dg0u.d.cts.map → TestEndpointAdaptor-Bt-uW6SC.d.mts.map} +1 -1
- package/dist/{TestEndpointAdaptor-CDOhCmIk.mjs → TestEndpointAdaptor-DHVaHmhw.mjs} +5 -2
- package/dist/TestEndpointAdaptor-DHVaHmhw.mjs.map +1 -0
- package/dist/{TestEndpointAdaptor-CCf3Dg0u.d.cts → TestEndpointAdaptor-UKhHj1RR.d.cts} +2 -2
- package/dist/{TestEndpointAdaptor-qSWV8dpS.d.mts.map → TestEndpointAdaptor-UKhHj1RR.d.cts.map} +1 -1
- package/dist/adaptors/aws.cjs +3 -3
- package/dist/adaptors/aws.d.cts +5 -5
- package/dist/adaptors/aws.d.mts +5 -5
- package/dist/adaptors/aws.mjs +3 -3
- package/dist/adaptors/hono.cjs +1 -1
- package/dist/adaptors/hono.d.cts +3 -3
- package/dist/adaptors/hono.d.mts +3 -3
- package/dist/adaptors/hono.mjs +1 -1
- package/dist/adaptors/testing.cjs +1 -1
- package/dist/adaptors/testing.d.cts +3 -3
- package/dist/adaptors/testing.d.mts +3 -3
- package/dist/adaptors/testing.mjs +1 -1
- package/dist/crons/Cron.cjs +1 -1
- package/dist/crons/Cron.d.cts +1 -1
- package/dist/crons/Cron.d.mts +1 -1
- package/dist/crons/Cron.mjs +1 -1
- package/dist/crons/CronBuilder.cjs +2 -2
- package/dist/crons/CronBuilder.d.cts +1 -1
- package/dist/crons/CronBuilder.d.mts +1 -1
- package/dist/crons/CronBuilder.mjs +2 -2
- package/dist/crons/index.cjs +2 -2
- package/dist/crons/index.d.cts +5 -5
- package/dist/crons/index.d.cts.map +1 -1
- package/dist/crons/index.d.mts +5 -5
- package/dist/crons/index.d.mts.map +1 -1
- package/dist/crons/index.mjs +2 -2
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.cjs +1 -1
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +3 -3
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.mjs +1 -1
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.cjs +2 -2
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.cts +4 -4
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +4 -4
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.mjs +2 -2
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.cjs +2 -2
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.cts +4 -4
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +4 -4
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.mjs +2 -2
- package/dist/endpoints/Authorizer.cjs +1 -1
- package/dist/endpoints/Authorizer.mjs +1 -1
- package/dist/endpoints/Endpoint.d.cts +2 -2
- package/dist/endpoints/Endpoint.d.mts +2 -2
- package/dist/endpoints/EndpointBuilder.cjs +3 -3
- package/dist/endpoints/EndpointBuilder.d.cts +3 -3
- package/dist/endpoints/EndpointBuilder.d.mts +3 -3
- package/dist/endpoints/EndpointBuilder.mjs +3 -3
- package/dist/endpoints/EndpointFactory.cjs +4 -4
- package/dist/endpoints/EndpointFactory.d.cts +4 -4
- package/dist/endpoints/EndpointFactory.d.mts +4 -4
- package/dist/endpoints/EndpointFactory.mjs +4 -4
- package/dist/endpoints/HonoEndpointAdaptor.cjs +1 -1
- package/dist/endpoints/HonoEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/HonoEndpointAdaptor.d.mts +3 -3
- package/dist/endpoints/HonoEndpointAdaptor.mjs +1 -1
- package/dist/endpoints/TestEndpointAdaptor.cjs +1 -1
- package/dist/endpoints/TestEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/TestEndpointAdaptor.d.mts +3 -3
- package/dist/endpoints/TestEndpointAdaptor.mjs +1 -1
- package/dist/endpoints/audit.d.cts +2 -2
- package/dist/endpoints/audit.d.mts +2 -2
- package/dist/endpoints/helpers.d.cts +2 -2
- package/dist/endpoints/helpers.d.mts +2 -2
- package/dist/endpoints/index.cjs +4 -4
- package/dist/endpoints/index.d.cts +7 -7
- package/dist/endpoints/index.d.mts +5 -5
- package/dist/endpoints/index.mjs +4 -4
- package/dist/endpoints/lazyAccessors.d.cts +3 -3
- package/dist/endpoints/lazyAccessors.d.mts +3 -3
- package/dist/endpoints/processAudits.d.cts +2 -2
- package/dist/endpoints/processAudits.d.mts +2 -2
- package/dist/endpoints/rls.cjs +1 -1
- package/dist/endpoints/rls.d.cts +2 -2
- package/dist/endpoints/rls.d.mts +2 -2
- package/dist/endpoints/rls.mjs +1 -1
- package/dist/functions/index.d.cts +1 -1
- package/dist/functions/index.d.mts +1 -1
- package/dist/index-BfeupgMl.d.cts +12 -0
- package/dist/{index-Br-zTYii.d.mts.map → index-BfeupgMl.d.cts.map} +1 -1
- package/dist/index-CtMNRkV7.d.mts +12 -0
- package/dist/{index-dRNH0dT6.d.cts.map → index-CtMNRkV7.d.mts.map} +1 -1
- package/dist/{lazyAccessors-DXkJpnyX.d.mts → lazyAccessors-Ba8HxeIC.d.cts} +2 -2
- package/dist/{lazyAccessors-DXkJpnyX.d.mts.map → lazyAccessors-Ba8HxeIC.d.cts.map} +1 -1
- package/dist/{lazyAccessors-DdZaA716.d.cts → lazyAccessors-D9tzUZaz.d.mts} +2 -2
- package/dist/{lazyAccessors-DdZaA716.d.cts.map → lazyAccessors-D9tzUZaz.d.mts.map} +1 -1
- package/dist/{rls-C0cWOnk4.mjs → rls-7XXX7DvY.mjs} +1 -1
- package/dist/{rls-C0cWOnk4.mjs.map → rls-7XXX7DvY.mjs.map} +1 -1
- package/dist/{rls-BrywnrQb.cjs → rls-DxFqdIA0.cjs} +1 -1
- package/dist/{rls-BrywnrQb.cjs.map → rls-DxFqdIA0.cjs.map} +1 -1
- package/dist/subscribers/Subscriber.cjs +1 -1
- package/dist/subscribers/Subscriber.mjs +1 -1
- package/dist/subscribers/SubscriberBuilder.cjs +2 -2
- package/dist/subscribers/SubscriberBuilder.mjs +2 -2
- package/dist/subscribers/index.cjs +2 -2
- package/dist/subscribers/index.d.cts +2 -2
- package/dist/subscribers/index.d.mts +2 -2
- package/dist/subscribers/index.d.mts.map +1 -1
- package/dist/subscribers/index.mjs +2 -2
- package/package.json +7 -7
- package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +32 -1
- package/src/endpoints/AmazonApiGatewayV1EndpointAdaptor.ts +5 -1
- package/src/endpoints/AmazonApiGatewayV2EndpointAdaptor.ts +7 -1
- package/src/endpoints/Endpoint.ts +7 -4
- package/src/endpoints/EndpointBuilder.ts +6 -1
- package/src/endpoints/EndpointFactory.ts +1 -1
- package/src/endpoints/HonoEndpointAdaptor.ts +9 -0
- package/src/endpoints/TestEndpointAdaptor.ts +3 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.spec.ts +112 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.spec.ts +137 -0
- package/src/endpoints/__tests__/EndpointBuilder.spec.ts +35 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.spec.ts +105 -0
- package/src/endpoints/__tests__/TestEndpointAdaptor.spec.ts +139 -0
- package/dist/AmazonApiGatewayEndpointAdaptor-B30TqZRX.d.mts.map +0 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-D4lAuXA-.d.cts.map +0 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-ciUHVvPX.mjs.map +0 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-jDYqkgFE.cjs.map +0 -1
- package/dist/AmazonApiGatewayV1EndpointAdaptor-B5xFYauV.d.cts.map +0 -1
- package/dist/AmazonApiGatewayV1EndpointAdaptor-CG1UJoAK.d.mts.map +0 -1
- package/dist/AmazonApiGatewayV2EndpointAdaptor-CGMF4lD4.mjs.map +0 -1
- package/dist/AmazonApiGatewayV2EndpointAdaptor-OkwjABOz.d.cts.map +0 -1
- package/dist/AmazonApiGatewayV2EndpointAdaptor-ofjuxcPV.d.mts.map +0 -1
- package/dist/Endpoint-BiPM0glm.d.mts.map +0 -1
- package/dist/Endpoint-C9N6CmvB.d.cts.map +0 -1
- package/dist/EndpointBuilder-B0Aj5jbB.d.mts.map +0 -1
- package/dist/EndpointBuilder-Bel6RS7W.d.cts.map +0 -1
- package/dist/HonoEndpointAdaptor-BvxQreVM.mjs.map +0 -1
- package/dist/HonoEndpointAdaptor-CQqQPLHH.cjs.map +0 -1
- package/dist/TestEndpointAdaptor-CDOhCmIk.mjs.map +0 -1
- package/dist/TestEndpointAdaptor-DjQSuxRq.cjs.map +0 -1
- package/dist/index-Br-zTYii.d.mts +0 -12
- package/dist/index-dRNH0dT6.d.cts +0 -12
package/dist/endpoints/index.cjs
CHANGED
|
@@ -6,10 +6,10 @@ require('../FunctionBuilder-C_xG9As7.cjs');
|
|
|
6
6
|
require('../functions-rOD3pXQd.cjs');
|
|
7
7
|
const require_Endpoint = require('../Endpoint-BcxvF4F3.cjs');
|
|
8
8
|
const require_lazyAccessors = require('../lazyAccessors-BVEtB9lU.cjs');
|
|
9
|
-
const require_Authorizer = require('../Authorizer-
|
|
10
|
-
const require_rls = require('../rls-
|
|
11
|
-
const require_EndpointBuilder = require('../EndpointBuilder-
|
|
12
|
-
const require_EndpointFactory = require('../EndpointFactory-
|
|
9
|
+
const require_Authorizer = require('../Authorizer-Dx57psuM.cjs');
|
|
10
|
+
const require_rls = require('../rls-DxFqdIA0.cjs');
|
|
11
|
+
const require_EndpointBuilder = require('../EndpointBuilder-QdDf3x87.cjs');
|
|
12
|
+
const require_EndpointFactory = require('../EndpointFactory-AsfUsn-v.cjs');
|
|
13
13
|
|
|
14
14
|
//#region src/endpoints/index.ts
|
|
15
15
|
const e = new require_EndpointFactory.EndpointFactory();
|
|
@@ -3,17 +3,17 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BfeupgMl.cjs";
|
|
7
7
|
import { Authorizer, BUILT_IN_SECURITY_SCHEMES, BuiltInSecuritySchemeId, OAuthFlow, OAuthFlows, SecurityScheme, createAuthorizer, getSecurityScheme, isBuiltInSecurityScheme } from "../Authorizer-DWtwC8we.cjs";
|
|
8
|
-
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit, RLS_BYPASS, ResponseBuilder, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-
|
|
9
|
-
import { EndpointBuilder } from "../EndpointBuilder-
|
|
10
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
8
|
+
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit, RLS_BYPASS, ResponseBuilder, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-BPh52sXZ.cjs";
|
|
9
|
+
import { EndpointBuilder } from "../EndpointBuilder-BmVTFp1A.cjs";
|
|
10
|
+
import { EndpointFactory } from "../EndpointFactory-DaDXPRAg.cjs";
|
|
11
11
|
import { publishConstructEvents } from "../publisher-BrzPGnm4.cjs";
|
|
12
|
-
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-
|
|
13
|
-
import * as
|
|
12
|
+
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-Ba8HxeIC.cjs";
|
|
13
|
+
import * as _geekmidas_logger9 from "@geekmidas/logger";
|
|
14
14
|
|
|
15
15
|
//#region src/endpoints/index.d.ts
|
|
16
|
-
declare const e: EndpointFactory<[], "",
|
|
16
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger9.Logger, unknown, undefined, string, readonly string[], undefined, string, never, undefined, string, Record<string, SecurityScheme>, undefined>;
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
@@ -3,13 +3,13 @@ import "../types-aFmq5cKh.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-CsvFjzA8.mjs";
|
|
4
4
|
import "../Function-CZw1DRQ6.mjs";
|
|
5
5
|
import "../FunctionBuilder-m5BNA2Ap.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-CtMNRkV7.mjs";
|
|
7
7
|
import { Authorizer, BUILT_IN_SECURITY_SCHEMES, BuiltInSecuritySchemeId, OAuthFlow, OAuthFlows, SecurityScheme, createAuthorizer, getSecurityScheme, isBuiltInSecurityScheme } from "../Authorizer-DBsrDTuf.mjs";
|
|
8
|
-
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit, RLS_BYPASS, ResponseBuilder, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-
|
|
9
|
-
import { EndpointBuilder } from "../EndpointBuilder-
|
|
10
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
8
|
+
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit, RLS_BYPASS, ResponseBuilder, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-BIvS-rKH.mjs";
|
|
9
|
+
import { EndpointBuilder } from "../EndpointBuilder-3xH8Gllw.mjs";
|
|
10
|
+
import { EndpointFactory } from "../EndpointFactory-DKHnUYl8.mjs";
|
|
11
11
|
import { publishConstructEvents } from "../publisher-CP4gpv-4.mjs";
|
|
12
|
-
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-
|
|
12
|
+
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-D9tzUZaz.mjs";
|
|
13
13
|
import * as _geekmidas_logger5 from "@geekmidas/logger";
|
|
14
14
|
|
|
15
15
|
//#region src/endpoints/index.d.ts
|
package/dist/endpoints/index.mjs
CHANGED
|
@@ -6,10 +6,10 @@ import "../FunctionBuilder-CBeqX18X.mjs";
|
|
|
6
6
|
import "../functions-B1mrMoUH.mjs";
|
|
7
7
|
import { Endpoint, ResponseBuilder } from "../Endpoint-DvY3aqAy.mjs";
|
|
8
8
|
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-DM6HcXQk.mjs";
|
|
9
|
-
import { BUILT_IN_SECURITY_SCHEMES, createAuthorizer, getSecurityScheme, isBuiltInSecurityScheme } from "../Authorizer-
|
|
10
|
-
import { RLS_BYPASS } from "../rls-
|
|
11
|
-
import { EndpointBuilder } from "../EndpointBuilder-
|
|
12
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
9
|
+
import { BUILT_IN_SECURITY_SCHEMES, createAuthorizer, getSecurityScheme, isBuiltInSecurityScheme } from "../Authorizer-4unKN3Xn.mjs";
|
|
10
|
+
import { RLS_BYPASS } from "../rls-7XXX7DvY.mjs";
|
|
11
|
+
import { EndpointBuilder } from "../EndpointBuilder-CMzbGG2c.mjs";
|
|
12
|
+
import { EndpointFactory } from "../EndpointFactory-CkPaFZA0.mjs";
|
|
13
13
|
|
|
14
14
|
//#region src/endpoints/index.ts
|
|
15
15
|
const e = new EndpointFactory();
|
|
@@ -3,8 +3,8 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BfeupgMl.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
|
-
import "../Endpoint-
|
|
9
|
-
import { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders } from "../lazyAccessors-
|
|
8
|
+
import "../Endpoint-BPh52sXZ.cjs";
|
|
9
|
+
import { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders } from "../lazyAccessors-Ba8HxeIC.cjs";
|
|
10
10
|
export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
|
|
@@ -3,8 +3,8 @@ import "../types-aFmq5cKh.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-CsvFjzA8.mjs";
|
|
4
4
|
import "../Function-CZw1DRQ6.mjs";
|
|
5
5
|
import "../FunctionBuilder-m5BNA2Ap.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-CtMNRkV7.mjs";
|
|
7
7
|
import "../Authorizer-DBsrDTuf.mjs";
|
|
8
|
-
import "../Endpoint-
|
|
9
|
-
import { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders } from "../lazyAccessors-
|
|
8
|
+
import "../Endpoint-BIvS-rKH.mjs";
|
|
9
|
+
import { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders } from "../lazyAccessors-D9tzUZaz.mjs";
|
|
10
10
|
export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
|
|
@@ -3,9 +3,9 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BfeupgMl.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
|
-
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-
|
|
8
|
+
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-BPh52sXZ.cjs";
|
|
9
9
|
import { AuditStorage, AuditableAction, Auditor } from "@geekmidas/audit";
|
|
10
10
|
import { Logger } from "@geekmidas/logger";
|
|
11
11
|
import { Service, ServiceDiscovery } from "@geekmidas/services";
|
|
@@ -3,9 +3,9 @@ import "../types-aFmq5cKh.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-CsvFjzA8.mjs";
|
|
4
4
|
import "../Function-CZw1DRQ6.mjs";
|
|
5
5
|
import "../FunctionBuilder-m5BNA2Ap.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-CtMNRkV7.mjs";
|
|
7
7
|
import "../Authorizer-DBsrDTuf.mjs";
|
|
8
|
-
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-
|
|
8
|
+
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-BIvS-rKH.mjs";
|
|
9
9
|
import { Service, ServiceDiscovery } from "@geekmidas/services";
|
|
10
10
|
import { AuditStorage, AuditableAction, Auditor } from "@geekmidas/audit";
|
|
11
11
|
import { Logger } from "@geekmidas/logger";
|
package/dist/endpoints/rls.cjs
CHANGED
package/dist/endpoints/rls.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BfeupgMl.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
|
-
import { RLS_BYPASS, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-
|
|
8
|
+
import { RLS_BYPASS, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-BPh52sXZ.cjs";
|
|
9
9
|
export { RLS_BYPASS, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor };
|
package/dist/endpoints/rls.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import "../types-aFmq5cKh.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-CsvFjzA8.mjs";
|
|
4
4
|
import "../Function-CZw1DRQ6.mjs";
|
|
5
5
|
import "../FunctionBuilder-m5BNA2Ap.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-CtMNRkV7.mjs";
|
|
7
7
|
import "../Authorizer-DBsrDTuf.mjs";
|
|
8
|
-
import { RLS_BYPASS, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-
|
|
8
|
+
import { RLS_BYPASS, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-BIvS-rKH.mjs";
|
|
9
9
|
export { RLS_BYPASS, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor };
|
package/dist/endpoints/rls.mjs
CHANGED
|
@@ -2,5 +2,5 @@ import "../Construct-CX7HyFfT.cjs";
|
|
|
2
2
|
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
3
3
|
import { Function, FunctionContext, FunctionHandler } from "../Function-CwlB89lS.cjs";
|
|
4
4
|
import { FunctionBuilder } from "../FunctionBuilder-D_7f5MfS.cjs";
|
|
5
|
-
import { f } from "../index-
|
|
5
|
+
import { f } from "../index-BfeupgMl.cjs";
|
|
6
6
|
export { BaseFunctionBuilder, Function, FunctionBuilder, FunctionContext, FunctionHandler, f };
|
|
@@ -2,5 +2,5 @@ import "../Construct-C2SyofdS.mjs";
|
|
|
2
2
|
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-CsvFjzA8.mjs";
|
|
3
3
|
import { Function, FunctionContext, FunctionHandler } from "../Function-CZw1DRQ6.mjs";
|
|
4
4
|
import { FunctionBuilder } from "../FunctionBuilder-m5BNA2Ap.mjs";
|
|
5
|
-
import { f } from "../index-
|
|
5
|
+
import { f } from "../index-CtMNRkV7.mjs";
|
|
6
6
|
export { BaseFunctionBuilder, Function, FunctionBuilder, FunctionContext, FunctionHandler, f };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionBuilder } from "./FunctionBuilder-D_7f5MfS.cjs";
|
|
2
|
+
import * as _geekmidas_audit5 from "@geekmidas/audit";
|
|
3
|
+
import * as _geekmidas_logger4 from "@geekmidas/logger";
|
|
4
|
+
import * as _geekmidas_schema3 from "@geekmidas/schema";
|
|
5
|
+
|
|
6
|
+
//#region src/functions/index.d.ts
|
|
7
|
+
declare const f: FunctionBuilder<_geekmidas_schema3.ComposableStandardSchema, undefined, [], _geekmidas_logger4.Logger, undefined, string, undefined, string, undefined, string, _geekmidas_audit5.AuditableAction<string, unknown>>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { f };
|
|
12
|
+
//# sourceMappingURL=index-BfeupgMl.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BfeupgMl.d.cts","names":[],"sources":["../src/functions/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAWa,GAAC,gBAAwB,kBAAA,CAAxB,wBAAA,iBAAA,kBAAA,CAAA,MAAA,2DAAA,iBAAA,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionBuilder } from "./FunctionBuilder-m5BNA2Ap.mjs";
|
|
2
|
+
import * as _geekmidas_audit9 from "@geekmidas/audit";
|
|
3
|
+
import * as _geekmidas_logger8 from "@geekmidas/logger";
|
|
4
|
+
import * as _geekmidas_schema7 from "@geekmidas/schema";
|
|
5
|
+
|
|
6
|
+
//#region src/functions/index.d.ts
|
|
7
|
+
declare const f: FunctionBuilder<_geekmidas_schema7.ComposableStandardSchema, undefined, [], _geekmidas_logger8.Logger, undefined, string, undefined, string, undefined, string, _geekmidas_audit9.AuditableAction<string, unknown>>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { f };
|
|
12
|
+
//# sourceMappingURL=index-CtMNRkV7.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CtMNRkV7.d.mts","names":[],"sources":["../src/functions/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAWa,GAAC,gBAAwB,kBAAA,CAAxB,wBAAA,iBAAA,kBAAA,CAAA,MAAA,2DAAA,iBAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CookieFn, HeaderFn } from "./Endpoint-
|
|
1
|
+
import { CookieFn, HeaderFn } from "./Endpoint-BPh52sXZ.cjs";
|
|
2
2
|
import { Context } from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/endpoints/lazyAccessors.d.ts
|
|
@@ -46,4 +46,4 @@ declare function createNoopCookies(): CookieFn;
|
|
|
46
46
|
//# sourceMappingURL=lazyAccessors.d.ts.map
|
|
47
47
|
//#endregion
|
|
48
48
|
export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
|
|
49
|
-
//# sourceMappingURL=lazyAccessors-
|
|
49
|
+
//# sourceMappingURL=lazyAccessors-Ba8HxeIC.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyAccessors-
|
|
1
|
+
{"version":3,"file":"lazyAccessors-Ba8HxeIC.d.cts","names":[],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":[],"mappings":";;;;;AAqCA;;;;AAAuD;AAgCvC,iBArDA,iBAAA,CAqDuB,CAAA,EArDF,OAqDE,CAAA,EArDQ,QAqDR;;;;AAE5B;AAoCX;AA+CgB,iBArHA,iBAAA,CAqHmB,CAAA,EArHE,OAqHF,CAAA,EArHY,QAqHZ;;;;AAExB;AAkCK,iBAzHA,uBAAA,CA2Hb,OAAQ,EA1HD,MA0HC,CAAA,MAAA,EAAA,MAAA,GAAA,SAAA,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,EAzHR,QAyHQ;AAiCX;AAUA;;;iBAhIgB,uBAAA,mEAGb;;;;;iBA4Ca,mBAAA,UACN,qCACP;;;;;iBAkCa,0BAAA,oCAEb;;;;iBAiCa,iBAAA,CAAA,GAAqB;;;;iBAUrB,iBAAA,CAAA,GAAqB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CookieFn, HeaderFn } from "./Endpoint-
|
|
1
|
+
import { CookieFn, HeaderFn } from "./Endpoint-BIvS-rKH.mjs";
|
|
2
2
|
import { Context } from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/endpoints/lazyAccessors.d.ts
|
|
@@ -46,4 +46,4 @@ declare function createNoopCookies(): CookieFn;
|
|
|
46
46
|
//# sourceMappingURL=lazyAccessors.d.ts.map
|
|
47
47
|
//#endregion
|
|
48
48
|
export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
|
|
49
|
-
//# sourceMappingURL=lazyAccessors-
|
|
49
|
+
//# sourceMappingURL=lazyAccessors-D9tzUZaz.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyAccessors-
|
|
1
|
+
{"version":3,"file":"lazyAccessors-D9tzUZaz.d.mts","names":[],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":[],"mappings":";;;;;AAqCA;;;;AAAuD;AAgCvC,iBArDA,iBAAA,CAqDuB,CAAA,EArDF,OAqDE,CAAA,EArDQ,QAqDR;;;;AAE5B;AAoCX;AA+CgB,iBArHA,iBAAA,CAqHmB,CAAA,EArHE,OAqHF,CAAA,EArHY,QAqHZ;;;;AAExB;AAkCK,iBAzHA,uBAAA,CA2Hb,OAAQ,EA1HD,MA0HC,CAAA,MAAA,EAAA,MAAA,GAAA,SAAA,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,EAzHR,QAyHQ;AAiCX;AAUA;;;iBAhIgB,uBAAA,mEAGb;;;;;iBA4Ca,mBAAA,UACN,qCACP;;;;;iBAkCa,0BAAA,oCAEb;;;;iBAiCa,iBAAA,CAAA,GAAqB;;;;iBAUrB,iBAAA,CAAA,GAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rls-
|
|
1
|
+
{"version":3,"file":"rls-7XXX7DvY.mjs","names":[],"sources":["../src/endpoints/rls.ts"],"sourcesContent":["import type { Logger } from '@geekmidas/logger';\nimport type { Service, ServiceRecord } from '@geekmidas/services';\nimport type { CookieFn, HeaderFn } from './Endpoint';\n\n/**\n * RLS context - key-value pairs to set as PostgreSQL session variables.\n * Keys become `prefix.key` (e.g., `app.user_id`).\n */\nexport interface RlsContext {\n\t[key: string]: string | number | boolean | null | undefined;\n}\n\n/**\n * Function type for extracting RLS context from request context.\n *\n * @template TServices - Available service dependencies\n * @template TSession - Session data type\n * @template TLogger - Logger type\n *\n * @example\n * ```ts\n * const extractor: RlsContextExtractor<[], UserSession> = ({ session }) => ({\n * user_id: session.userId,\n * tenant_id: session.tenantId,\n * roles: session.roles.join(','),\n * });\n * ```\n */\nexport type RlsContextExtractor<\n\tTServices extends Service[] = [],\n\tTSession = unknown,\n\tTLogger extends Logger = Logger,\n> = (ctx: {\n\tservices: ServiceRecord<TServices>;\n\tsession: TSession;\n\theader: HeaderFn;\n\tcookie: CookieFn;\n\tlogger: TLogger;\n}) => RlsContext | Promise<RlsContext>;\n\n/**\n * Configuration for RLS on an endpoint or factory.\n *\n * @template TServices - Available service dependencies\n * @template TSession - Session data type\n * @template TLogger - Logger type\n */\nexport interface RlsConfig<\n\tTServices extends Service[] = [],\n\tTSession = unknown,\n\tTLogger extends Logger = Logger,\n> {\n\t/** Function to extract RLS context from request */\n\textractor: RlsContextExtractor<TServices, TSession, TLogger>;\n\t/** Prefix for PostgreSQL session variables (default: 'app') */\n\tprefix?: string;\n}\n\n/**\n * Symbol used to bypass RLS for an endpoint.\n */\nexport const RLS_BYPASS = Symbol.for('geekmidas.rls.bypass');\n\n/**\n * Type for RLS bypass marker.\n */\nexport type RlsBypass = typeof RLS_BYPASS;\n"],"mappings":";;;;AA6DA,MAAa,aAAa,OAAO,IAAI,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rls-
|
|
1
|
+
{"version":3,"file":"rls-DxFqdIA0.cjs","names":[],"sources":["../src/endpoints/rls.ts"],"sourcesContent":["import type { Logger } from '@geekmidas/logger';\nimport type { Service, ServiceRecord } from '@geekmidas/services';\nimport type { CookieFn, HeaderFn } from './Endpoint';\n\n/**\n * RLS context - key-value pairs to set as PostgreSQL session variables.\n * Keys become `prefix.key` (e.g., `app.user_id`).\n */\nexport interface RlsContext {\n\t[key: string]: string | number | boolean | null | undefined;\n}\n\n/**\n * Function type for extracting RLS context from request context.\n *\n * @template TServices - Available service dependencies\n * @template TSession - Session data type\n * @template TLogger - Logger type\n *\n * @example\n * ```ts\n * const extractor: RlsContextExtractor<[], UserSession> = ({ session }) => ({\n * user_id: session.userId,\n * tenant_id: session.tenantId,\n * roles: session.roles.join(','),\n * });\n * ```\n */\nexport type RlsContextExtractor<\n\tTServices extends Service[] = [],\n\tTSession = unknown,\n\tTLogger extends Logger = Logger,\n> = (ctx: {\n\tservices: ServiceRecord<TServices>;\n\tsession: TSession;\n\theader: HeaderFn;\n\tcookie: CookieFn;\n\tlogger: TLogger;\n}) => RlsContext | Promise<RlsContext>;\n\n/**\n * Configuration for RLS on an endpoint or factory.\n *\n * @template TServices - Available service dependencies\n * @template TSession - Session data type\n * @template TLogger - Logger type\n */\nexport interface RlsConfig<\n\tTServices extends Service[] = [],\n\tTSession = unknown,\n\tTLogger extends Logger = Logger,\n> {\n\t/** Function to extract RLS context from request */\n\textractor: RlsContextExtractor<TServices, TSession, TLogger>;\n\t/** Prefix for PostgreSQL session variables (default: 'app') */\n\tprefix?: string;\n}\n\n/**\n * Symbol used to bypass RLS for an endpoint.\n */\nexport const RLS_BYPASS = Symbol.for('geekmidas.rls.bypass');\n\n/**\n * Type for RLS bypass marker.\n */\nexport type RlsBypass = typeof RLS_BYPASS;\n"],"mappings":";;;;;AA6DA,MAAa,aAAa,OAAO,IAAI,uBAAuB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require('../Construct-BXG8cFSm.cjs');
|
|
2
|
-
require('../Subscriber-
|
|
3
|
-
const require_SubscriberBuilder = require('../SubscriberBuilder-
|
|
2
|
+
require('../Subscriber-Scz7hrV6.cjs');
|
|
3
|
+
const require_SubscriberBuilder = require('../SubscriberBuilder-B82h4v-S.cjs');
|
|
4
4
|
|
|
5
5
|
exports.SubscriberBuilder = require_SubscriberBuilder.SubscriberBuilder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../Construct-CQ9zV58W.mjs";
|
|
2
|
-
import "../Subscriber-
|
|
3
|
-
import { SubscriberBuilder } from "../SubscriberBuilder-
|
|
2
|
+
import "../Subscriber-BEhOdNQi.mjs";
|
|
3
|
+
import { SubscriberBuilder } from "../SubscriberBuilder-DlUaG0Ej.mjs";
|
|
4
4
|
|
|
5
5
|
export { SubscriberBuilder };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('../Construct-BXG8cFSm.cjs');
|
|
2
|
-
const require_Subscriber = require('../Subscriber-
|
|
3
|
-
const require_SubscriberBuilder = require('../SubscriberBuilder-
|
|
2
|
+
const require_Subscriber = require('../Subscriber-Scz7hrV6.cjs');
|
|
3
|
+
const require_SubscriberBuilder = require('../SubscriberBuilder-B82h4v-S.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/subscribers/index.ts
|
|
6
6
|
const s = new require_SubscriberBuilder.SubscriberBuilder();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../Construct-CX7HyFfT.cjs";
|
|
2
2
|
import { Subscriber } from "../Subscriber-1rDE7HuM.cjs";
|
|
3
3
|
import { SubscriberBuilder } from "../SubscriberBuilder-B9uva8fZ.cjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _geekmidas_logger8 from "@geekmidas/logger";
|
|
5
5
|
|
|
6
6
|
//#region src/subscribers/index.d.ts
|
|
7
|
-
declare const s: SubscriberBuilder<[],
|
|
7
|
+
declare const s: SubscriberBuilder<[], _geekmidas_logger8.Logger, undefined, undefined, string, []>;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../Construct-C2SyofdS.mjs";
|
|
2
2
|
import { Subscriber } from "../Subscriber-BgB3RRxb.mjs";
|
|
3
3
|
import { SubscriberBuilder } from "../SubscriberBuilder-DaQkh2Nt.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _geekmidas_logger10 from "@geekmidas/logger";
|
|
5
5
|
|
|
6
6
|
//#region src/subscribers/index.d.ts
|
|
7
|
-
declare const s: SubscriberBuilder<[],
|
|
7
|
+
declare const s: SubscriberBuilder<[], _geekmidas_logger10.Logger, undefined, undefined, string, []>;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/subscribers/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAKa,GAAC,sBAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/subscribers/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAKa,GAAC,sBAA0B,mBAAA,CAA1B,MAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../Construct-CQ9zV58W.mjs";
|
|
2
|
-
import { Subscriber } from "../Subscriber-
|
|
3
|
-
import { SubscriberBuilder } from "../SubscriberBuilder-
|
|
2
|
+
import { Subscriber } from "../Subscriber-BEhOdNQi.mjs";
|
|
3
|
+
import { SubscriberBuilder } from "../SubscriberBuilder-DlUaG0Ej.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/subscribers/index.ts
|
|
6
6
|
const s = new SubscriberBuilder();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/constructs",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -81,15 +81,15 @@
|
|
|
81
81
|
"pg": "~8.16.3",
|
|
82
82
|
"zod": "~4.1.13",
|
|
83
83
|
"@geekmidas/audit": "^2.0.0",
|
|
84
|
-
"@geekmidas/cache": "^1.1.0",
|
|
85
84
|
"@geekmidas/db": "^1.0.1",
|
|
85
|
+
"@geekmidas/cache": "^1.1.0",
|
|
86
86
|
"@geekmidas/envkit": "^1.0.4",
|
|
87
87
|
"@geekmidas/errors": "^1.0.0",
|
|
88
88
|
"@geekmidas/logger": "^1.0.0",
|
|
89
|
+
"@geekmidas/events": "^1.1.0",
|
|
90
|
+
"@geekmidas/rate-limit": "^2.0.0",
|
|
89
91
|
"@geekmidas/schema": "^1.0.0",
|
|
90
92
|
"@geekmidas/services": "^1.0.1",
|
|
91
|
-
"@geekmidas/rate-limit": "^2.0.0",
|
|
92
|
-
"@geekmidas/events": "^1.1.0",
|
|
93
93
|
"@geekmidas/testkit": "^1.0.5"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
@@ -100,12 +100,12 @@
|
|
|
100
100
|
"@geekmidas/cache": "^1.1.0",
|
|
101
101
|
"@geekmidas/db": "^1.0.1",
|
|
102
102
|
"@geekmidas/envkit": "^1.0.4",
|
|
103
|
-
"@geekmidas/logger": "^1.0.0",
|
|
104
103
|
"@geekmidas/events": "^1.1.0",
|
|
105
104
|
"@geekmidas/errors": "^1.0.0",
|
|
106
|
-
"@geekmidas/
|
|
105
|
+
"@geekmidas/logger": "^1.0.0",
|
|
107
106
|
"@geekmidas/services": "^1.0.1",
|
|
108
|
-
"@geekmidas/rate-limit": "^2.0.0"
|
|
107
|
+
"@geekmidas/rate-limit": "^2.0.0",
|
|
108
|
+
"@geekmidas/schema": "^1.0.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependenciesMeta": {
|
|
111
111
|
"@geekmidas/audit": {
|
|
@@ -145,6 +145,34 @@ export abstract class AmazonApiGatewayEndpoint<
|
|
|
145
145
|
}
|
|
146
146
|
abstract getInput(e: TEvent): GetInputResponse;
|
|
147
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Decodes the raw body from an API Gateway event.
|
|
150
|
+
* Uses Content-Type to decide parsing strategy (like Express/Fastify/Hono):
|
|
151
|
+
* - `application/json` (or missing) → JSON.parse the decoded string
|
|
152
|
+
* - Anything else → return decoded string as-is, let the schema handle it
|
|
153
|
+
*
|
|
154
|
+
* Defaults to JSON when no Content-Type is provided for backwards compatibility.
|
|
155
|
+
*/
|
|
156
|
+
static decodeBody(
|
|
157
|
+
body: string | undefined | null,
|
|
158
|
+
isBase64Encoded: boolean | undefined,
|
|
159
|
+
contentType: string | undefined,
|
|
160
|
+
): any {
|
|
161
|
+
if (!body) return undefined;
|
|
162
|
+
|
|
163
|
+
const raw = isBase64Encoded
|
|
164
|
+
? Buffer.from(body, 'base64').toString('utf-8')
|
|
165
|
+
: body;
|
|
166
|
+
|
|
167
|
+
const isJson =
|
|
168
|
+
!contentType || contentType.toLowerCase().includes('application/json');
|
|
169
|
+
if (isJson) {
|
|
170
|
+
return JSON.parse(raw);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return raw;
|
|
174
|
+
}
|
|
175
|
+
|
|
148
176
|
protected getCookies(e: TEvent): CookieFn {
|
|
149
177
|
const headers = e.headers as Record<string, string>;
|
|
150
178
|
return Endpoint.createCookies(headers?.cookie);
|
|
@@ -230,7 +258,10 @@ export abstract class AmazonApiGatewayEndpoint<
|
|
|
230
258
|
services,
|
|
231
259
|
logger,
|
|
232
260
|
session,
|
|
233
|
-
|
|
261
|
+
body: (req.event as any).body,
|
|
262
|
+
query: (req.event as any).query,
|
|
263
|
+
params: (req.event as any).params,
|
|
264
|
+
} as any);
|
|
234
265
|
|
|
235
266
|
if (!isAuthorized) {
|
|
236
267
|
logger.warn('Unauthorized access attempt');
|
|
@@ -59,7 +59,11 @@ export class AmazonApiGatewayV1Endpoint<
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
return {
|
|
62
|
-
body:
|
|
62
|
+
body: AmazonApiGatewayEndpoint.decodeBody(
|
|
63
|
+
e.body,
|
|
64
|
+
e.isBase64Encoded,
|
|
65
|
+
e.headers?.['Content-Type'] ?? e.headers?.['content-type'],
|
|
66
|
+
),
|
|
63
67
|
query: parseQueryParams(mergedParams),
|
|
64
68
|
params: e.pathParameters || {},
|
|
65
69
|
};
|
|
@@ -45,8 +45,14 @@ export class AmazonApiGatewayV2Endpoint<
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
override getInput(e: APIGatewayProxyEventV2): GetInputResponse {
|
|
48
|
+
const raw = AmazonApiGatewayEndpoint.decodeBody(
|
|
49
|
+
e.body,
|
|
50
|
+
e.isBase64Encoded,
|
|
51
|
+
e.headers?.['content-type'],
|
|
52
|
+
);
|
|
53
|
+
|
|
48
54
|
return {
|
|
49
|
-
body:
|
|
55
|
+
body: raw,
|
|
50
56
|
query: qs.parse(e.rawQueryString) as Record<string, any>,
|
|
51
57
|
params: e.pathParameters || {},
|
|
52
58
|
};
|
|
@@ -113,7 +113,8 @@ export class Endpoint<
|
|
|
113
113
|
public getSession: SessionFn<TServices, TLogger, TSession, TDatabase> = () =>
|
|
114
114
|
({}) as TSession;
|
|
115
115
|
/** Function to determine if the request is authorized */
|
|
116
|
-
public authorize: AuthorizeFn<TServices, TLogger, TSession> = () =>
|
|
116
|
+
public authorize: AuthorizeFn<TServices, TLogger, TSession, TInput> = () =>
|
|
117
|
+
true;
|
|
117
118
|
/** Optional rate limiting configuration */
|
|
118
119
|
public rateLimit?: RateLimitConfig;
|
|
119
120
|
/** Optional authorizer for this endpoint */
|
|
@@ -749,7 +750,7 @@ export interface EndpointOptions<
|
|
|
749
750
|
TAuditAction
|
|
750
751
|
>;
|
|
751
752
|
/** Optional authorization check function */
|
|
752
|
-
authorize: AuthorizeFn<TServices, TLogger, TSession> | undefined;
|
|
753
|
+
authorize: AuthorizeFn<TServices, TLogger, TSession, TInput> | undefined;
|
|
753
754
|
/** Optional description for documentation */
|
|
754
755
|
description: string | undefined;
|
|
755
756
|
/** Optional tags for OpenAPI documentation */
|
|
@@ -813,13 +814,14 @@ export type AuthorizeContext<
|
|
|
813
814
|
TServices extends Service[] = [],
|
|
814
815
|
TLogger extends Logger = Logger,
|
|
815
816
|
TSession = unknown,
|
|
817
|
+
TInput extends EndpointSchemas | undefined = undefined,
|
|
816
818
|
> = {
|
|
817
819
|
services: ServiceRecord<TServices>;
|
|
818
820
|
logger: TLogger;
|
|
819
821
|
header: HeaderFn;
|
|
820
822
|
cookie: CookieFn;
|
|
821
823
|
session: TSession;
|
|
822
|
-
}
|
|
824
|
+
} & InferComposableStandardSchema<TInput>;
|
|
823
825
|
/**
|
|
824
826
|
* Function type for endpoint authorization checks.
|
|
825
827
|
*
|
|
@@ -841,8 +843,9 @@ export type AuthorizeFn<
|
|
|
841
843
|
TServices extends Service[] = [],
|
|
842
844
|
TLogger extends Logger = Logger,
|
|
843
845
|
TSession = unknown,
|
|
846
|
+
TInput extends EndpointSchemas | undefined = undefined,
|
|
844
847
|
> = (
|
|
845
|
-
ctx: AuthorizeContext<TServices, TLogger, TSession>,
|
|
848
|
+
ctx: AuthorizeContext<TServices, TLogger, TSession, TInput>,
|
|
846
849
|
) => Promise<boolean> | boolean;
|
|
847
850
|
|
|
848
851
|
/**
|
|
@@ -63,7 +63,7 @@ export class EndpointBuilder<
|
|
|
63
63
|
protected _memorySize?: number;
|
|
64
64
|
_getSession: SessionFn<TServices, TLogger, TSession, TDatabase> = () =>
|
|
65
65
|
({}) as TSession;
|
|
66
|
-
_authorize: AuthorizeFn<TServices, TLogger, TSession> = () => true;
|
|
66
|
+
_authorize: AuthorizeFn<TServices, TLogger, TSession, TInput> = () => true;
|
|
67
67
|
_rateLimit?: RateLimitConfig;
|
|
68
68
|
_availableAuthorizers: Authorizer[] = [];
|
|
69
69
|
_authorizerName?: TAuthorizers[number];
|
|
@@ -263,6 +263,11 @@ export class EndpointBuilder<
|
|
|
263
263
|
return this;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
+
authorize(fn: AuthorizeFn<TServices, TLogger, TSession, TInput>): this {
|
|
267
|
+
this._authorize = fn;
|
|
268
|
+
return this;
|
|
269
|
+
}
|
|
270
|
+
|
|
266
271
|
rateLimit(config: RateLimitConfig): this {
|
|
267
272
|
this._rateLimit = config;
|
|
268
273
|
return this;
|
|
@@ -988,7 +988,7 @@ export class EndpointFactory<
|
|
|
988
988
|
>(fullPath, method);
|
|
989
989
|
|
|
990
990
|
if (this.defaultAuthorizeFn) {
|
|
991
|
-
builder._authorize = this.defaultAuthorizeFn;
|
|
991
|
+
builder._authorize = this.defaultAuthorizeFn as any;
|
|
992
992
|
}
|
|
993
993
|
if (this.defaultServices.length) {
|
|
994
994
|
// Create a copy to avoid sharing references between builders
|
|
@@ -393,6 +393,15 @@ export class HonoEndpoint<
|
|
|
393
393
|
services,
|
|
394
394
|
logger,
|
|
395
395
|
session,
|
|
396
|
+
body: features.hasBodyValidation
|
|
397
|
+
? (c.req.valid as any)('json')
|
|
398
|
+
: undefined,
|
|
399
|
+
query: features.hasQueryValidation
|
|
400
|
+
? (c.req.valid as any)('query')
|
|
401
|
+
: undefined,
|
|
402
|
+
params: features.hasParamValidation
|
|
403
|
+
? (c.req.valid as any)('param')
|
|
404
|
+
: undefined,
|
|
396
405
|
});
|
|
397
406
|
|
|
398
407
|
if (!isAuthorized) {
|