@geekmidas/constructs 0.0.22 → 0.1.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 +90 -0
- package/dist/{AWSLambdaFunction-qWpalqfr.d.mts → AWSLambdaFunction-DCh1tOhB.d.mts} +3 -3
- package/dist/{AWSLambdaSubscriberAdaptor-CWbBNRz3.d.mts → AWSLambdaSubscriberAdaptor-DtNZPMoV.d.mts} +2 -2
- package/dist/{AmazonApiGatewayEndpointAdaptor-BQ0IJdaI.d.mts → AmazonApiGatewayEndpointAdaptor-BaTM2TNu.d.mts} +3 -3
- package/dist/{AmazonApiGatewayEndpointAdaptor-DXssXsJi.cjs → AmazonApiGatewayEndpointAdaptor-CPqlw2Rx.cjs} +3 -3
- package/dist/{AmazonApiGatewayEndpointAdaptor-DXssXsJi.cjs.map → AmazonApiGatewayEndpointAdaptor-CPqlw2Rx.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayEndpointAdaptor-CacGag6F.mjs → AmazonApiGatewayEndpointAdaptor-Cm4iD199.mjs} +3 -3
- package/dist/{AmazonApiGatewayEndpointAdaptor-CacGag6F.mjs.map → AmazonApiGatewayEndpointAdaptor-Cm4iD199.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayEndpointAdaptor-Da9BR5On.d.cts → AmazonApiGatewayEndpointAdaptor-TP_hLNAa.d.cts} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-C4_AZ1ek.d.mts → AmazonApiGatewayV1EndpointAdaptor-B2ZpUFiC.d.mts} +4 -4
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-CSm3NsWz.d.cts → AmazonApiGatewayV1EndpointAdaptor-CConfCqz.d.cts} +3 -3
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-BpnG55R7.mjs → AmazonApiGatewayV1EndpointAdaptor-D38HuQa9.mjs} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-BpnG55R7.mjs.map → AmazonApiGatewayV1EndpointAdaptor-D38HuQa9.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Df4kszio.cjs → AmazonApiGatewayV1EndpointAdaptor-tjpvLBRb.cjs} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Df4kszio.cjs.map → AmazonApiGatewayV1EndpointAdaptor-tjpvLBRb.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-DdM8Tr1X.d.mts → AmazonApiGatewayV2EndpointAdaptor-BwMQInBi.d.mts} +4 -4
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-ZORzMEET.mjs → AmazonApiGatewayV2EndpointAdaptor-ByYtiJtN.mjs} +2 -2
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-ZORzMEET.mjs.map → AmazonApiGatewayV2EndpointAdaptor-ByYtiJtN.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-5SIvqPby.cjs → AmazonApiGatewayV2EndpointAdaptor-DcJ_w3ro.cjs} +2 -2
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-5SIvqPby.cjs.map → AmazonApiGatewayV2EndpointAdaptor-DcJ_w3ro.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-6hsBFVLf.d.cts → AmazonApiGatewayV2EndpointAdaptor-DurJvFwa.d.cts} +3 -3
- package/dist/Authorizer-C0ge_tc8.cjs +92 -0
- package/dist/Authorizer-C0ge_tc8.cjs.map +1 -0
- package/dist/Authorizer-CpSUMTIs.d.cts +125 -0
- package/dist/Authorizer-D1w7MpK6.d.mts +125 -0
- package/dist/Authorizer-r9U3y_ms.mjs +68 -0
- package/dist/Authorizer-r9U3y_ms.mjs.map +1 -0
- package/dist/{BaseFunctionBuilder-Ct6zY6Jq.d.mts → BaseFunctionBuilder-Oc2xmxmg.d.mts} +2 -2
- package/dist/{Construct-DDR0295I.d.mts → Construct-DCPATqec.d.mts} +1 -1
- package/dist/Construct.d.mts +1 -1
- package/dist/{Cron-DnMRWPFR.d.mts → Cron-DPEcDCDW.d.mts} +2 -2
- package/dist/{CronBuilder-RLDitFmP.d.mts → CronBuilder-CxKTiepV.d.mts} +4 -4
- package/dist/{Endpoint-D2Imgihs.d.cts → Endpoint-BJPJTGjV.d.cts} +2 -2
- package/dist/{Endpoint-PtQ-wLIS.d.mts → Endpoint-DoY1Owv2.d.mts} +4 -4
- package/dist/{EndpointBuilder-W5fdXxYQ.mjs → EndpointBuilder-69uVrKZL.mjs} +15 -2
- package/dist/EndpointBuilder-69uVrKZL.mjs.map +1 -0
- package/dist/{EndpointBuilder-BPHpUekp.d.mts → EndpointBuilder-BJRkivxQ.d.mts} +6 -5
- package/dist/{EndpointBuilder-CYkeYpsL.cjs → EndpointBuilder-Bhyft7WY.cjs} +15 -2
- package/dist/EndpointBuilder-Bhyft7WY.cjs.map +1 -0
- package/dist/{EndpointBuilder-TApJQhtG.d.cts → EndpointBuilder-CQ-jOXsD.d.cts} +4 -3
- package/dist/{EndpointFactory-B27nfeiE.mjs → EndpointFactory-ARUlRlyM.mjs} +68 -14
- package/dist/EndpointFactory-ARUlRlyM.mjs.map +1 -0
- package/dist/{EndpointFactory-CNlfBDuD.d.mts → EndpointFactory-BKEPcQgE.d.mts} +45 -20
- package/dist/{EndpointFactory-D5lFZXqY.cjs → EndpointFactory-BcVbkrxf.cjs} +68 -14
- package/dist/EndpointFactory-BcVbkrxf.cjs.map +1 -0
- package/dist/{EndpointFactory-B5fOINuc.d.cts → EndpointFactory-DgwmAR_8.d.cts} +45 -20
- package/dist/{Function-CD3rXWfa.d.mts → Function-Dthlh2Fb.d.mts} +2 -2
- package/dist/{FunctionBuilder-j2VkwuGf.d.mts → FunctionBuilder-CZFBLfdV.d.mts} +4 -4
- package/dist/{FunctionExecutionWrapper-B0WP-Vec.d.mts → FunctionExecutionWrapper-CfuajSB5.d.mts} +2 -2
- package/dist/{HonoEndpointAdaptor-Bg_vTyA5.mjs → HonoEndpointAdaptor-BmB4Sc7L.mjs} +3 -3
- package/dist/{HonoEndpointAdaptor-Bg_vTyA5.mjs.map → HonoEndpointAdaptor-BmB4Sc7L.mjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-B_gJPWGD.cjs → HonoEndpointAdaptor-CnqR6PSB.cjs} +3 -3
- package/dist/{HonoEndpointAdaptor-B_gJPWGD.cjs.map → HonoEndpointAdaptor-CnqR6PSB.cjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-CLOpobdq.d.cts → HonoEndpointAdaptor-DBjipl6Q.d.mts} +6 -6
- package/dist/{HonoEndpointAdaptor-C9gYYBWu.d.mts → HonoEndpointAdaptor-sSG85VER.d.cts} +8 -8
- package/dist/{Subscriber-itwm7ugy.d.mts → Subscriber-BfxLwZpX.d.mts} +2 -2
- package/dist/{Subscriber-D-FPWts6.cjs → Subscriber-DvOtIyWq.cjs} +1 -1
- package/dist/{Subscriber-D-FPWts6.cjs.map → Subscriber-DvOtIyWq.cjs.map} +1 -1
- package/dist/{Subscriber-CGb8LjZa.mjs → Subscriber-JzcFFi4p.mjs} +1 -1
- package/dist/{Subscriber-CGb8LjZa.mjs.map → Subscriber-JzcFFi4p.mjs.map} +1 -1
- package/dist/{SubscriberBuilder-BfE2cL1q.cjs → SubscriberBuilder-DUuV207i.cjs} +2 -2
- package/dist/{SubscriberBuilder-BfE2cL1q.cjs.map → SubscriberBuilder-DUuV207i.cjs.map} +1 -1
- package/dist/{SubscriberBuilder-9j3JCu8-.d.mts → SubscriberBuilder-lTiTUS1o.d.mts} +2 -2
- package/dist/{SubscriberBuilder-BcAspHv9.mjs → SubscriberBuilder-tm4oVOt3.mjs} +2 -2
- package/dist/{SubscriberBuilder-BcAspHv9.mjs.map → SubscriberBuilder-tm4oVOt3.mjs.map} +1 -1
- package/dist/{TestEndpointAdaptor-Bew9lWsx.cjs → TestEndpointAdaptor-BtLcw4JW.cjs} +3 -3
- package/dist/{TestEndpointAdaptor-Bew9lWsx.cjs.map → TestEndpointAdaptor-BtLcw4JW.cjs.map} +1 -1
- package/dist/{TestEndpointAdaptor-C-c8v7VI.d.mts → TestEndpointAdaptor-CGQVysE0.d.mts} +3 -3
- package/dist/{TestEndpointAdaptor-BYCwwiYk.d.cts → TestEndpointAdaptor-CJO-og9U.d.cts} +2 -2
- package/dist/{TestEndpointAdaptor-JONQJeXc.mjs → TestEndpointAdaptor-o7JbNcL-.mjs} +3 -3
- package/dist/{TestEndpointAdaptor-JONQJeXc.mjs.map → TestEndpointAdaptor-o7JbNcL-.mjs.map} +1 -1
- package/dist/adaptors/aws.cjs +4 -4
- package/dist/adaptors/aws.d.cts +5 -5
- package/dist/adaptors/aws.d.mts +15 -15
- package/dist/adaptors/aws.mjs +4 -4
- package/dist/adaptors/hono.cjs +2 -2
- package/dist/adaptors/hono.d.cts +3 -3
- package/dist/adaptors/hono.d.mts +9 -9
- package/dist/adaptors/hono.mjs +2 -2
- package/dist/adaptors/testing.cjs +2 -2
- package/dist/adaptors/testing.d.cts +3 -3
- package/dist/adaptors/testing.d.mts +9 -9
- package/dist/adaptors/testing.mjs +2 -2
- package/dist/crons/Cron.d.mts +6 -6
- package/dist/crons/CronBuilder.d.mts +7 -7
- package/dist/crons/index.d.cts +4 -4
- package/dist/crons/index.d.mts +7 -7
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.cjs +2 -2
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +9 -9
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.mjs +2 -2
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.cjs +3 -3
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.cts +4 -4
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +10 -10
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.mjs +3 -3
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.cjs +3 -3
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.cts +4 -4
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +10 -10
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.mjs +3 -3
- package/dist/endpoints/Authorizer.cjs +5 -14
- package/dist/endpoints/Authorizer.d.cts +2 -2
- package/dist/endpoints/Authorizer.d.mts +2 -2
- package/dist/endpoints/Authorizer.mjs +2 -13
- package/dist/endpoints/Endpoint.d.cts +2 -2
- package/dist/endpoints/Endpoint.d.mts +8 -8
- package/dist/endpoints/EndpointBuilder.cjs +2 -1
- package/dist/endpoints/EndpointBuilder.d.cts +3 -3
- package/dist/endpoints/EndpointBuilder.d.mts +9 -9
- package/dist/endpoints/EndpointBuilder.mjs +2 -1
- package/dist/endpoints/EndpointFactory.cjs +3 -2
- package/dist/endpoints/EndpointFactory.d.cts +4 -4
- package/dist/endpoints/EndpointFactory.d.mts +10 -10
- package/dist/endpoints/EndpointFactory.mjs +3 -2
- package/dist/endpoints/HonoEndpointAdaptor.cjs +2 -2
- package/dist/endpoints/HonoEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/HonoEndpointAdaptor.d.mts +9 -9
- package/dist/endpoints/HonoEndpointAdaptor.mjs +2 -2
- package/dist/endpoints/TestEndpointAdaptor.cjs +2 -2
- package/dist/endpoints/TestEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/TestEndpointAdaptor.d.mts +9 -9
- package/dist/endpoints/TestEndpointAdaptor.mjs +2 -2
- package/dist/endpoints/audit.d.cts +2 -2
- package/dist/endpoints/audit.d.mts +8 -8
- package/dist/endpoints/helpers.d.cts +2 -2
- package/dist/endpoints/helpers.d.mts +8 -8
- package/dist/endpoints/index.cjs +3 -2
- package/dist/endpoints/index.cjs.map +1 -1
- package/dist/endpoints/index.d.cts +6 -6
- package/dist/endpoints/index.d.mts +12 -12
- package/dist/endpoints/index.mjs +3 -2
- package/dist/endpoints/index.mjs.map +1 -1
- package/dist/endpoints/processAudits.cjs +1 -1
- package/dist/endpoints/processAudits.d.cts +24 -5
- package/dist/endpoints/processAudits.d.mts +30 -11
- package/dist/endpoints/processAudits.mjs +1 -1
- package/dist/functions/AWSLambdaFunction.d.mts +4 -4
- package/dist/functions/BaseFunctionBuilder.d.mts +2 -2
- package/dist/functions/Function.d.mts +2 -2
- package/dist/functions/FunctionBuilder.d.mts +4 -4
- package/dist/functions/FunctionExecutionWrapper.d.mts +3 -3
- package/dist/functions/TestFunctionAdaptor.d.mts +2 -2
- package/dist/functions/index.d.mts +5 -5
- package/dist/index-9gJrM7Rw.d.mts +10 -0
- package/dist/index.d.mts +2 -2
- package/dist/{processAudits-BFokHhCO.cjs → processAudits-CzHkPokQ.cjs} +13 -7
- package/dist/processAudits-CzHkPokQ.cjs.map +1 -0
- package/dist/{processAudits-DfcB-X-4.mjs → processAudits-Dj8UGqcW.mjs} +13 -7
- package/dist/processAudits-Dj8UGqcW.mjs.map +1 -0
- package/dist/publisher.d.mts +1 -1
- package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.mts +3 -3
- package/dist/subscribers/Subscriber.cjs +1 -1
- package/dist/subscribers/Subscriber.d.mts +2 -2
- package/dist/subscribers/Subscriber.mjs +1 -1
- package/dist/subscribers/SubscriberBuilder.cjs +2 -2
- package/dist/subscribers/SubscriberBuilder.d.mts +3 -3
- 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 +5 -5
- package/dist/subscribers/index.mjs +2 -2
- package/dist/{types-DKf0juBf.d.mts → types-Cy1IhmUB.d.mts} +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +5 -5
- package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +2 -0
- package/src/endpoints/Authorizer.ts +119 -1
- package/src/endpoints/EndpointBuilder.ts +23 -6
- package/src/endpoints/EndpointFactory.ts +156 -27
- package/src/endpoints/HonoEndpointAdaptor.ts +2 -0
- package/src/endpoints/TestEndpointAdaptor.ts +2 -0
- package/src/endpoints/processAudits.ts +39 -16
- package/dist/Authorizer-BTmly8ps.d.cts +0 -29
- package/dist/Authorizer-pmPvIVgv.d.mts +0 -29
- package/dist/EndpointBuilder-CYkeYpsL.cjs.map +0 -1
- package/dist/EndpointBuilder-W5fdXxYQ.mjs.map +0 -1
- package/dist/EndpointFactory-B27nfeiE.mjs.map +0 -1
- package/dist/EndpointFactory-D5lFZXqY.cjs.map +0 -1
- package/dist/endpoints/Authorizer.cjs.map +0 -1
- package/dist/endpoints/Authorizer.mjs.map +0 -1
- package/dist/index-licEVXjh.d.mts +0 -10
- package/dist/processAudits-BFokHhCO.cjs.map +0 -1
- package/dist/processAudits-DfcB-X-4.mjs.map +0 -1
|
@@ -4,8 +4,9 @@ require('../BaseFunctionBuilder-C5Se7pdL.cjs');
|
|
|
4
4
|
require('../FunctionBuilder-DXvG_XD-.cjs');
|
|
5
5
|
require('../functions-FCb-wWFC.cjs');
|
|
6
6
|
require('../Endpoint-CA-byrDr.cjs');
|
|
7
|
-
require('../
|
|
8
|
-
|
|
7
|
+
require('../Authorizer-C0ge_tc8.cjs');
|
|
8
|
+
require('../EndpointBuilder-Bhyft7WY.cjs');
|
|
9
|
+
const require_EndpointFactory = require('../EndpointFactory-BcVbkrxf.cjs');
|
|
9
10
|
|
|
10
11
|
exports.EndpointFactory = require_EndpointFactory.EndpointFactory;
|
|
11
12
|
exports.e = require_EndpointFactory.e;
|
|
@@ -4,8 +4,8 @@ import "../Function-DHD1V9QW.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-DaQA0uKE.cjs";
|
|
5
5
|
import "../FunctionBuilder-FV6r3I7X.cjs";
|
|
6
6
|
import "../index-Ceo-GuhJ.cjs";
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import "../Endpoint-
|
|
9
|
-
import "../EndpointBuilder-
|
|
10
|
-
import { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e } from "../EndpointFactory-
|
|
7
|
+
import "../Authorizer-CpSUMTIs.cjs";
|
|
8
|
+
import "../Endpoint-BJPJTGjV.cjs";
|
|
9
|
+
import "../EndpointBuilder-CQ-jOXsD.cjs";
|
|
10
|
+
import { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e } from "../EndpointFactory-DgwmAR_8.cjs";
|
|
11
11
|
export { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../Function-
|
|
4
|
-
import "../BaseFunctionBuilder-
|
|
5
|
-
import "../FunctionBuilder-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import "../Endpoint-
|
|
9
|
-
import "../EndpointBuilder-
|
|
10
|
-
import { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e } from "../EndpointFactory-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../types-Cy1IhmUB.mjs";
|
|
3
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
4
|
+
import "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
5
|
+
import "../FunctionBuilder-CZFBLfdV.mjs";
|
|
6
|
+
import "../index-9gJrM7Rw.mjs";
|
|
7
|
+
import "../Authorizer-D1w7MpK6.mjs";
|
|
8
|
+
import "../Endpoint-DoY1Owv2.mjs";
|
|
9
|
+
import "../EndpointBuilder-BJRkivxQ.mjs";
|
|
10
|
+
import { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e } from "../EndpointFactory-BKEPcQgE.mjs";
|
|
11
11
|
export { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e };
|
|
@@ -4,7 +4,8 @@ import "../BaseFunctionBuilder-B5gkW0Kt.mjs";
|
|
|
4
4
|
import "../FunctionBuilder-CVT7bG2o.mjs";
|
|
5
5
|
import "../functions-JhRsNoAZ.mjs";
|
|
6
6
|
import "../Endpoint-DbPsw13b.mjs";
|
|
7
|
-
import "../
|
|
8
|
-
import
|
|
7
|
+
import "../Authorizer-r9U3y_ms.mjs";
|
|
8
|
+
import "../EndpointBuilder-69uVrKZL.mjs";
|
|
9
|
+
import { EndpointFactory, e } from "../EndpointFactory-ARUlRlyM.mjs";
|
|
9
10
|
|
|
10
11
|
export { EndpointFactory, e };
|
|
@@ -5,9 +5,9 @@ require('../BaseFunctionBuilder-C5Se7pdL.cjs');
|
|
|
5
5
|
require('../FunctionBuilder-DXvG_XD-.cjs');
|
|
6
6
|
require('../functions-FCb-wWFC.cjs');
|
|
7
7
|
require('../Endpoint-CA-byrDr.cjs');
|
|
8
|
-
require('../processAudits-
|
|
8
|
+
require('../processAudits-CzHkPokQ.cjs');
|
|
9
9
|
require('../helpers-DiPZVJQC.cjs');
|
|
10
10
|
require('../parseHonoQuery-CT8Cvin-.cjs');
|
|
11
|
-
const require_HonoEndpointAdaptor = require('../HonoEndpointAdaptor-
|
|
11
|
+
const require_HonoEndpointAdaptor = require('../HonoEndpointAdaptor-CnqR6PSB.cjs');
|
|
12
12
|
|
|
13
13
|
exports.HonoEndpoint = require_HonoEndpointAdaptor.HonoEndpoint;
|
|
@@ -4,7 +4,7 @@ import "../Function-DHD1V9QW.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-DaQA0uKE.cjs";
|
|
5
5
|
import "../FunctionBuilder-FV6r3I7X.cjs";
|
|
6
6
|
import "../index-Ceo-GuhJ.cjs";
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import "../Endpoint-
|
|
9
|
-
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-
|
|
7
|
+
import "../Authorizer-CpSUMTIs.cjs";
|
|
8
|
+
import "../Endpoint-BJPJTGjV.cjs";
|
|
9
|
+
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-sSG85VER.cjs";
|
|
10
10
|
export { HonoEndpoint, HonoEndpointOptions };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../Function-
|
|
4
|
-
import "../BaseFunctionBuilder-
|
|
5
|
-
import "../FunctionBuilder-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import "../Endpoint-
|
|
9
|
-
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../types-Cy1IhmUB.mjs";
|
|
3
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
4
|
+
import "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
5
|
+
import "../FunctionBuilder-CZFBLfdV.mjs";
|
|
6
|
+
import "../index-9gJrM7Rw.mjs";
|
|
7
|
+
import "../Authorizer-D1w7MpK6.mjs";
|
|
8
|
+
import "../Endpoint-DoY1Owv2.mjs";
|
|
9
|
+
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-DBjipl6Q.mjs";
|
|
10
10
|
export { HonoEndpoint, HonoEndpointOptions };
|
|
@@ -5,9 +5,9 @@ import "../BaseFunctionBuilder-B5gkW0Kt.mjs";
|
|
|
5
5
|
import "../FunctionBuilder-CVT7bG2o.mjs";
|
|
6
6
|
import "../functions-JhRsNoAZ.mjs";
|
|
7
7
|
import "../Endpoint-DbPsw13b.mjs";
|
|
8
|
-
import "../processAudits-
|
|
8
|
+
import "../processAudits-Dj8UGqcW.mjs";
|
|
9
9
|
import "../helpers-CrrdyA04.mjs";
|
|
10
10
|
import "../parseHonoQuery-CwFKw2ua.mjs";
|
|
11
|
-
import { HonoEndpoint } from "../HonoEndpointAdaptor-
|
|
11
|
+
import { HonoEndpoint } from "../HonoEndpointAdaptor-BmB4Sc7L.mjs";
|
|
12
12
|
|
|
13
13
|
export { HonoEndpoint };
|
|
@@ -5,7 +5,7 @@ require('../BaseFunctionBuilder-C5Se7pdL.cjs');
|
|
|
5
5
|
require('../FunctionBuilder-DXvG_XD-.cjs');
|
|
6
6
|
require('../functions-FCb-wWFC.cjs');
|
|
7
7
|
require('../Endpoint-CA-byrDr.cjs');
|
|
8
|
-
require('../processAudits-
|
|
9
|
-
const require_TestEndpointAdaptor = require('../TestEndpointAdaptor-
|
|
8
|
+
require('../processAudits-CzHkPokQ.cjs');
|
|
9
|
+
const require_TestEndpointAdaptor = require('../TestEndpointAdaptor-BtLcw4JW.cjs');
|
|
10
10
|
|
|
11
11
|
exports.TestEndpointAdaptor = require_TestEndpointAdaptor.TestEndpointAdaptor;
|
|
@@ -4,7 +4,7 @@ import "../Function-DHD1V9QW.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-DaQA0uKE.cjs";
|
|
5
5
|
import "../FunctionBuilder-FV6r3I7X.cjs";
|
|
6
6
|
import "../index-Ceo-GuhJ.cjs";
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import "../Endpoint-
|
|
9
|
-
import { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor } from "../TestEndpointAdaptor-
|
|
7
|
+
import "../Authorizer-CpSUMTIs.cjs";
|
|
8
|
+
import "../Endpoint-BJPJTGjV.cjs";
|
|
9
|
+
import { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor } from "../TestEndpointAdaptor-CJO-og9U.cjs";
|
|
10
10
|
export { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../Function-
|
|
4
|
-
import "../BaseFunctionBuilder-
|
|
5
|
-
import "../FunctionBuilder-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import "../Endpoint-
|
|
9
|
-
import { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor } from "../TestEndpointAdaptor-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../types-Cy1IhmUB.mjs";
|
|
3
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
4
|
+
import "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
5
|
+
import "../FunctionBuilder-CZFBLfdV.mjs";
|
|
6
|
+
import "../index-9gJrM7Rw.mjs";
|
|
7
|
+
import "../Authorizer-D1w7MpK6.mjs";
|
|
8
|
+
import "../Endpoint-DoY1Owv2.mjs";
|
|
9
|
+
import { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor } from "../TestEndpointAdaptor-CGQVysE0.mjs";
|
|
10
10
|
export { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor };
|
|
@@ -5,7 +5,7 @@ import "../BaseFunctionBuilder-B5gkW0Kt.mjs";
|
|
|
5
5
|
import "../FunctionBuilder-CVT7bG2o.mjs";
|
|
6
6
|
import "../functions-JhRsNoAZ.mjs";
|
|
7
7
|
import "../Endpoint-DbPsw13b.mjs";
|
|
8
|
-
import "../processAudits-
|
|
9
|
-
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-
|
|
8
|
+
import "../processAudits-Dj8UGqcW.mjs";
|
|
9
|
+
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-o7JbNcL-.mjs";
|
|
10
10
|
|
|
11
11
|
export { TestEndpointAdaptor };
|
|
@@ -4,6 +4,6 @@ import "../Function-DHD1V9QW.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-DaQA0uKE.cjs";
|
|
5
5
|
import "../FunctionBuilder-FV6r3I7X.cjs";
|
|
6
6
|
import "../index-Ceo-GuhJ.cjs";
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import { ActorExtractor, EndpointAuditorConfig, MappedAudit } from "../Endpoint-
|
|
7
|
+
import "../Authorizer-CpSUMTIs.cjs";
|
|
8
|
+
import { ActorExtractor, EndpointAuditorConfig, MappedAudit } from "../Endpoint-BJPJTGjV.cjs";
|
|
9
9
|
export { ActorExtractor, EndpointAuditorConfig, MappedAudit };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../Function-
|
|
4
|
-
import "../BaseFunctionBuilder-
|
|
5
|
-
import "../FunctionBuilder-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import { ActorExtractor, EndpointAuditorConfig, MappedAudit } from "../Endpoint-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../types-Cy1IhmUB.mjs";
|
|
3
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
4
|
+
import "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
5
|
+
import "../FunctionBuilder-CZFBLfdV.mjs";
|
|
6
|
+
import "../index-9gJrM7Rw.mjs";
|
|
7
|
+
import "../Authorizer-D1w7MpK6.mjs";
|
|
8
|
+
import { ActorExtractor, EndpointAuditorConfig, MappedAudit } from "../Endpoint-DoY1Owv2.mjs";
|
|
9
9
|
export { ActorExtractor, EndpointAuditorConfig, MappedAudit };
|
|
@@ -4,8 +4,8 @@ import "../Function-DHD1V9QW.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-DaQA0uKE.cjs";
|
|
5
5
|
import "../FunctionBuilder-FV6r3I7X.cjs";
|
|
6
6
|
import "../index-Ceo-GuhJ.cjs";
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import { Endpoint } from "../Endpoint-
|
|
7
|
+
import "../Authorizer-CpSUMTIs.cjs";
|
|
8
|
+
import { Endpoint } from "../Endpoint-BJPJTGjV.cjs";
|
|
9
9
|
import { Service } from "@geekmidas/services";
|
|
10
10
|
|
|
11
11
|
//#region src/endpoints/helpers.d.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import { HttpMethod } from "../types-
|
|
3
|
-
import "../Function-
|
|
4
|
-
import "../BaseFunctionBuilder-
|
|
5
|
-
import "../FunctionBuilder-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import { Endpoint } from "../Endpoint-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import { HttpMethod } from "../types-Cy1IhmUB.mjs";
|
|
3
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
4
|
+
import "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
5
|
+
import "../FunctionBuilder-CZFBLfdV.mjs";
|
|
6
|
+
import "../index-9gJrM7Rw.mjs";
|
|
7
|
+
import "../Authorizer-D1w7MpK6.mjs";
|
|
8
|
+
import { Endpoint } from "../Endpoint-DoY1Owv2.mjs";
|
|
9
9
|
import { Service } from "@geekmidas/services";
|
|
10
10
|
|
|
11
11
|
//#region src/endpoints/helpers.d.ts
|
package/dist/endpoints/index.cjs
CHANGED
|
@@ -4,8 +4,9 @@ require('../BaseFunctionBuilder-C5Se7pdL.cjs');
|
|
|
4
4
|
require('../FunctionBuilder-DXvG_XD-.cjs');
|
|
5
5
|
require('../functions-FCb-wWFC.cjs');
|
|
6
6
|
const require_Endpoint = require('../Endpoint-CA-byrDr.cjs');
|
|
7
|
-
|
|
8
|
-
const
|
|
7
|
+
require('../Authorizer-C0ge_tc8.cjs');
|
|
8
|
+
const require_EndpointBuilder = require('../EndpointBuilder-Bhyft7WY.cjs');
|
|
9
|
+
const require_EndpointFactory = require('../EndpointFactory-BcVbkrxf.cjs');
|
|
9
10
|
|
|
10
11
|
//#region src/endpoints/index.ts
|
|
11
12
|
const e = new require_EndpointFactory.EndpointFactory();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["EndpointFactory"],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { EndpointFactory } from './EndpointFactory';\nexport {\n Endpoint,\n type EndpointOutput,\n type EndpointSchemas,\n type EndpointHandler,\n type EndpointContext,\n} from './Endpoint';\nexport { EndpointBuilder } from './EndpointBuilder';\nexport { type MappedAudit, type ActorExtractor } from './audit';\n\nexport const e = new EndpointFactory();\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["EndpointFactory"],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { EndpointFactory } from './EndpointFactory';\nexport {\n Endpoint,\n type EndpointOutput,\n type EndpointSchemas,\n type EndpointHandler,\n type EndpointContext,\n} from './Endpoint';\nexport { EndpointBuilder } from './EndpointBuilder';\nexport { type MappedAudit, type ActorExtractor } from './audit';\n\nexport const e = new EndpointFactory();\n"],"mappings":";;;;;;;;;;;AAaA,MAAa,IAAI,IAAIA"}
|
|
@@ -4,14 +4,14 @@ import "../Function-DHD1V9QW.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-DaQA0uKE.cjs";
|
|
5
5
|
import "../FunctionBuilder-FV6r3I7X.cjs";
|
|
6
6
|
import "../index-Ceo-GuhJ.cjs";
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit } from "../Endpoint-
|
|
9
|
-
import { EndpointBuilder } from "../EndpointBuilder-
|
|
10
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
11
|
-
import * as
|
|
7
|
+
import { SecurityScheme } from "../Authorizer-CpSUMTIs.cjs";
|
|
8
|
+
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit } from "../Endpoint-BJPJTGjV.cjs";
|
|
9
|
+
import { EndpointBuilder } from "../EndpointBuilder-CQ-jOXsD.cjs";
|
|
10
|
+
import { EndpointFactory } from "../EndpointFactory-DgwmAR_8.cjs";
|
|
11
|
+
import * as _geekmidas_logger5 from "@geekmidas/logger";
|
|
12
12
|
|
|
13
13
|
//#region src/endpoints/index.d.ts
|
|
14
|
-
declare const e: EndpointFactory<[], "",
|
|
14
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger5.Logger, unknown, undefined, string, readonly string[], undefined, string, never, undefined, string, Record<string, SecurityScheme>>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ActorExtractor, Endpoint, EndpointBuilder, EndpointContext, EndpointFactory, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit, e };
|
|
17
17
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../Function-
|
|
4
|
-
import "../BaseFunctionBuilder-
|
|
5
|
-
import "../FunctionBuilder-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit } from "../Endpoint-
|
|
9
|
-
import { EndpointBuilder } from "../EndpointBuilder-
|
|
10
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
11
|
-
import * as
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../types-Cy1IhmUB.mjs";
|
|
3
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
4
|
+
import "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
5
|
+
import "../FunctionBuilder-CZFBLfdV.mjs";
|
|
6
|
+
import "../index-9gJrM7Rw.mjs";
|
|
7
|
+
import { SecurityScheme } from "../Authorizer-D1w7MpK6.mjs";
|
|
8
|
+
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit } from "../Endpoint-DoY1Owv2.mjs";
|
|
9
|
+
import { EndpointBuilder } from "../EndpointBuilder-BJRkivxQ.mjs";
|
|
10
|
+
import { EndpointFactory } from "../EndpointFactory-BKEPcQgE.mjs";
|
|
11
|
+
import * as _geekmidas_logger3 from "@geekmidas/logger";
|
|
12
12
|
|
|
13
13
|
//#region src/endpoints/index.d.ts
|
|
14
|
-
declare const e: EndpointFactory<[], "",
|
|
14
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger3.Logger, unknown, undefined, string, readonly string[], undefined, string, never, undefined, string, Record<string, SecurityScheme>>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ActorExtractor, Endpoint, EndpointBuilder, EndpointContext, EndpointFactory, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit, e };
|
|
17
17
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/endpoints/index.mjs
CHANGED
|
@@ -4,8 +4,9 @@ import "../BaseFunctionBuilder-B5gkW0Kt.mjs";
|
|
|
4
4
|
import "../FunctionBuilder-CVT7bG2o.mjs";
|
|
5
5
|
import "../functions-JhRsNoAZ.mjs";
|
|
6
6
|
import { Endpoint } from "../Endpoint-DbPsw13b.mjs";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
7
|
+
import "../Authorizer-r9U3y_ms.mjs";
|
|
8
|
+
import { EndpointBuilder } from "../EndpointBuilder-69uVrKZL.mjs";
|
|
9
|
+
import { EndpointFactory } from "../EndpointFactory-ARUlRlyM.mjs";
|
|
9
10
|
|
|
10
11
|
//#region src/endpoints/index.ts
|
|
11
12
|
const e = new EndpointFactory();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { EndpointFactory } from './EndpointFactory';\nexport {\n Endpoint,\n type EndpointOutput,\n type EndpointSchemas,\n type EndpointHandler,\n type EndpointContext,\n} from './Endpoint';\nexport { EndpointBuilder } from './EndpointBuilder';\nexport { type MappedAudit, type ActorExtractor } from './audit';\n\nexport const e = new EndpointFactory();\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { EndpointFactory } from './EndpointFactory';\nexport {\n Endpoint,\n type EndpointOutput,\n type EndpointSchemas,\n type EndpointHandler,\n type EndpointContext,\n} from './Endpoint';\nexport { EndpointBuilder } from './EndpointBuilder';\nexport { type MappedAudit, type ActorExtractor } from './audit';\n\nexport const e = new EndpointFactory();\n"],"mappings":";;;;;;;;;;;AAaA,MAAa,IAAI,IAAI"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_processAudits = require('../processAudits-
|
|
1
|
+
const require_processAudits = require('../processAudits-CzHkPokQ.cjs');
|
|
2
2
|
|
|
3
3
|
exports.createAuditContext = require_processAudits.createAuditContext;
|
|
4
4
|
exports.executeWithAuditTransaction = require_processAudits.executeWithAuditTransaction;
|
|
@@ -4,8 +4,8 @@ import "../Function-DHD1V9QW.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-DaQA0uKE.cjs";
|
|
5
5
|
import "../FunctionBuilder-FV6r3I7X.cjs";
|
|
6
6
|
import "../index-Ceo-GuhJ.cjs";
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-
|
|
7
|
+
import "../Authorizer-CpSUMTIs.cjs";
|
|
8
|
+
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-BJPJTGjV.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";
|
|
@@ -58,17 +58,36 @@ declare function createAuditContext<TServices extends Service[] = [], TSession =
|
|
|
58
58
|
cookie: CookieFn;
|
|
59
59
|
services: Record<string, unknown>;
|
|
60
60
|
}): Promise<AuditExecutionContext<TAuditAction> | undefined>;
|
|
61
|
+
/**
|
|
62
|
+
* Options for executeWithAuditTransaction.
|
|
63
|
+
*/
|
|
64
|
+
interface ExecuteWithAuditTransactionOptions {
|
|
65
|
+
/**
|
|
66
|
+
* Database connection to use for the transaction.
|
|
67
|
+
* If this is already a transaction, it will be reused instead of creating a nested one.
|
|
68
|
+
* If not provided, the storage's internal database is used.
|
|
69
|
+
*/
|
|
70
|
+
db?: unknown;
|
|
71
|
+
}
|
|
61
72
|
/**
|
|
62
73
|
* Execute a handler with automatic audit transaction support.
|
|
63
|
-
* If the audit storage
|
|
74
|
+
* If the audit storage provides a withTransaction method, wraps execution
|
|
64
75
|
* in a transaction so audits are atomic with handler's database operations.
|
|
65
76
|
*
|
|
77
|
+
* This is database-agnostic - each storage implementation provides its own
|
|
78
|
+
* transaction handling based on the underlying database (Kysely, Drizzle, etc.).
|
|
79
|
+
*
|
|
80
|
+
* If the db parameter is provided and is already a transaction, the storage
|
|
81
|
+
* will reuse it instead of creating a nested transaction (similar to
|
|
82
|
+
* packages/db/src/kysely.ts#withTransaction).
|
|
83
|
+
*
|
|
66
84
|
* @param auditContext - The audit context from createAuditContext
|
|
67
85
|
* @param handler - The handler function to execute (receives auditor)
|
|
68
86
|
* @param onComplete - Called after handler with response, to process declarative audits
|
|
87
|
+
* @param options - Optional configuration including database connection
|
|
69
88
|
* @returns The handler result
|
|
70
89
|
*/
|
|
71
|
-
declare function executeWithAuditTransaction<T, TAuditAction extends AuditableAction<string, unknown> = AuditableAction<string, unknown>>(auditContext: AuditExecutionContext<TAuditAction> | undefined, handler: (auditor?: Auditor<TAuditAction>) => Promise<T>, onComplete?: (response: T, auditor: Auditor<TAuditAction>) => Promise<void
|
|
90
|
+
declare function executeWithAuditTransaction<T, TAuditAction extends AuditableAction<string, unknown> = AuditableAction<string, unknown>>(auditContext: AuditExecutionContext<TAuditAction> | undefined, handler: (auditor?: Auditor<TAuditAction>) => Promise<T>, onComplete?: (response: T, auditor: Auditor<TAuditAction>) => Promise<void>, options?: ExecuteWithAuditTransactionOptions): Promise<T>;
|
|
72
91
|
//#endregion
|
|
73
|
-
export { AuditExecutionContext, createAuditContext, executeWithAuditTransaction, processEndpointAudits };
|
|
92
|
+
export { AuditExecutionContext, ExecuteWithAuditTransactionOptions, createAuditContext, executeWithAuditTransaction, processEndpointAudits };
|
|
74
93
|
//# sourceMappingURL=processAudits.d.cts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../Function-
|
|
4
|
-
import "../BaseFunctionBuilder-
|
|
5
|
-
import "../FunctionBuilder-
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Authorizer-
|
|
8
|
-
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../types-Cy1IhmUB.mjs";
|
|
3
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
4
|
+
import "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
5
|
+
import "../FunctionBuilder-CZFBLfdV.mjs";
|
|
6
|
+
import "../index-9gJrM7Rw.mjs";
|
|
7
|
+
import "../Authorizer-D1w7MpK6.mjs";
|
|
8
|
+
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-DoY1Owv2.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";
|
|
@@ -58,17 +58,36 @@ declare function createAuditContext<TServices extends Service[] = [], TSession =
|
|
|
58
58
|
cookie: CookieFn;
|
|
59
59
|
services: Record<string, unknown>;
|
|
60
60
|
}): Promise<AuditExecutionContext<TAuditAction> | undefined>;
|
|
61
|
+
/**
|
|
62
|
+
* Options for executeWithAuditTransaction.
|
|
63
|
+
*/
|
|
64
|
+
interface ExecuteWithAuditTransactionOptions {
|
|
65
|
+
/**
|
|
66
|
+
* Database connection to use for the transaction.
|
|
67
|
+
* If this is already a transaction, it will be reused instead of creating a nested one.
|
|
68
|
+
* If not provided, the storage's internal database is used.
|
|
69
|
+
*/
|
|
70
|
+
db?: unknown;
|
|
71
|
+
}
|
|
61
72
|
/**
|
|
62
73
|
* Execute a handler with automatic audit transaction support.
|
|
63
|
-
* If the audit storage
|
|
74
|
+
* If the audit storage provides a withTransaction method, wraps execution
|
|
64
75
|
* in a transaction so audits are atomic with handler's database operations.
|
|
65
76
|
*
|
|
77
|
+
* This is database-agnostic - each storage implementation provides its own
|
|
78
|
+
* transaction handling based on the underlying database (Kysely, Drizzle, etc.).
|
|
79
|
+
*
|
|
80
|
+
* If the db parameter is provided and is already a transaction, the storage
|
|
81
|
+
* will reuse it instead of creating a nested transaction (similar to
|
|
82
|
+
* packages/db/src/kysely.ts#withTransaction).
|
|
83
|
+
*
|
|
66
84
|
* @param auditContext - The audit context from createAuditContext
|
|
67
85
|
* @param handler - The handler function to execute (receives auditor)
|
|
68
86
|
* @param onComplete - Called after handler with response, to process declarative audits
|
|
87
|
+
* @param options - Optional configuration including database connection
|
|
69
88
|
* @returns The handler result
|
|
70
89
|
*/
|
|
71
|
-
declare function executeWithAuditTransaction<T, TAuditAction extends AuditableAction<string, unknown> = AuditableAction<string, unknown>>(auditContext: AuditExecutionContext<TAuditAction> | undefined, handler: (auditor?: Auditor<TAuditAction>) => Promise<T>, onComplete?: (response: T, auditor: Auditor<TAuditAction>) => Promise<void
|
|
90
|
+
declare function executeWithAuditTransaction<T, TAuditAction extends AuditableAction<string, unknown> = AuditableAction<string, unknown>>(auditContext: AuditExecutionContext<TAuditAction> | undefined, handler: (auditor?: Auditor<TAuditAction>) => Promise<T>, onComplete?: (response: T, auditor: Auditor<TAuditAction>) => Promise<void>, options?: ExecuteWithAuditTransactionOptions): Promise<T>;
|
|
72
91
|
//#endregion
|
|
73
|
-
export { AuditExecutionContext, createAuditContext, executeWithAuditTransaction, processEndpointAudits };
|
|
92
|
+
export { AuditExecutionContext, ExecuteWithAuditTransactionOptions, createAuditContext, executeWithAuditTransaction, processEndpointAudits };
|
|
74
93
|
//# sourceMappingURL=processAudits.d.mts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { createAuditContext, executeWithAuditTransaction, processEndpointAudits } from "../processAudits-
|
|
1
|
+
import { createAuditContext, executeWithAuditTransaction, processEndpointAudits } from "../processAudits-Dj8UGqcW.mjs";
|
|
2
2
|
|
|
3
3
|
export { createAuditContext, executeWithAuditTransaction, processEndpointAudits };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../Function-
|
|
3
|
-
import "../FunctionExecutionWrapper-
|
|
4
|
-
import { AWSLambdaFunction, AWSLambdaHandler } from "../AWSLambdaFunction-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
3
|
+
import "../FunctionExecutionWrapper-CfuajSB5.mjs";
|
|
4
|
+
import { AWSLambdaFunction, AWSLambdaHandler } from "../AWSLambdaFunction-DCh1tOhB.mjs";
|
|
5
5
|
export { AWSLambdaFunction, AWSLambdaHandler };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
3
3
|
export { BaseFunctionBuilder };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import { Function, FunctionContext, FunctionFactory, FunctionHandler } from "../Function-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import { Function, FunctionContext, FunctionFactory, FunctionHandler } from "../Function-Dthlh2Fb.mjs";
|
|
3
3
|
export { Function, FunctionContext, FunctionFactory, FunctionHandler };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../Function-
|
|
3
|
-
import "../BaseFunctionBuilder-
|
|
4
|
-
import { FunctionBuilder } from "../FunctionBuilder-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
3
|
+
import "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
4
|
+
import { FunctionBuilder } from "../FunctionBuilder-CZFBLfdV.mjs";
|
|
5
5
|
export { FunctionBuilder };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../Function-
|
|
3
|
-
import { FunctionExecutionWrapper } from "../FunctionExecutionWrapper-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import "../Function-Dthlh2Fb.mjs";
|
|
3
|
+
import { FunctionExecutionWrapper } from "../FunctionExecutionWrapper-CfuajSB5.mjs";
|
|
4
4
|
export { FunctionExecutionWrapper };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import { Function } from "../Function-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import { Function } from "../Function-Dthlh2Fb.mjs";
|
|
3
3
|
import { Service, ServiceDiscovery, ServiceRecord } from "@geekmidas/services";
|
|
4
4
|
import { AuditStorage, AuditableAction, Auditor } from "@geekmidas/audit";
|
|
5
5
|
import { EventPublisher } from "@geekmidas/events";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import { Function, FunctionContext, FunctionHandler } from "../Function-
|
|
3
|
-
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-
|
|
4
|
-
import { FunctionBuilder } from "../FunctionBuilder-
|
|
5
|
-
import { f } from "../index-
|
|
1
|
+
import "../Construct-DCPATqec.mjs";
|
|
2
|
+
import { Function, FunctionContext, FunctionHandler } from "../Function-Dthlh2Fb.mjs";
|
|
3
|
+
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-Oc2xmxmg.mjs";
|
|
4
|
+
import { FunctionBuilder } from "../FunctionBuilder-CZFBLfdV.mjs";
|
|
5
|
+
import { f } from "../index-9gJrM7Rw.mjs";
|
|
6
6
|
export { BaseFunctionBuilder, Function, FunctionBuilder, FunctionContext, FunctionHandler, f };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionBuilder } from "./FunctionBuilder-CZFBLfdV.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
|
+
//#endregion
|
|
9
|
+
export { f };
|
|
10
|
+
//# sourceMappingURL=index-9gJrM7Rw.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Construct, ConstructType } from "./Construct-
|
|
2
|
-
import { HttpMethod, LowerHttpMethod, RemoveUndefined } from "./types-
|
|
1
|
+
import { Construct, ConstructType } from "./Construct-DCPATqec.mjs";
|
|
2
|
+
import { HttpMethod, LowerHttpMethod, RemoveUndefined } from "./types-Cy1IhmUB.mjs";
|
|
3
3
|
import { Service, ServiceRecord } from "@geekmidas/services";
|
|
4
4
|
export { Construct, ConstructType, HttpMethod, LowerHttpMethod, RemoveUndefined, Service, ServiceRecord };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
2
|
const __geekmidas_audit = require_chunk.__toESM(require("@geekmidas/audit"));
|
|
3
|
-
const __geekmidas_audit_kysely = require_chunk.__toESM(require("@geekmidas/audit/kysely"));
|
|
4
3
|
|
|
5
4
|
//#region src/endpoints/processAudits.ts
|
|
6
5
|
/**
|
|
@@ -129,23 +128,30 @@ async function createAuditContext(endpoint, serviceDiscovery, logger, ctx) {
|
|
|
129
128
|
}
|
|
130
129
|
/**
|
|
131
130
|
* Execute a handler with automatic audit transaction support.
|
|
132
|
-
* If the audit storage
|
|
131
|
+
* If the audit storage provides a withTransaction method, wraps execution
|
|
133
132
|
* in a transaction so audits are atomic with handler's database operations.
|
|
134
133
|
*
|
|
134
|
+
* This is database-agnostic - each storage implementation provides its own
|
|
135
|
+
* transaction handling based on the underlying database (Kysely, Drizzle, etc.).
|
|
136
|
+
*
|
|
137
|
+
* If the db parameter is provided and is already a transaction, the storage
|
|
138
|
+
* will reuse it instead of creating a nested transaction (similar to
|
|
139
|
+
* packages/db/src/kysely.ts#withTransaction).
|
|
140
|
+
*
|
|
135
141
|
* @param auditContext - The audit context from createAuditContext
|
|
136
142
|
* @param handler - The handler function to execute (receives auditor)
|
|
137
143
|
* @param onComplete - Called after handler with response, to process declarative audits
|
|
144
|
+
* @param options - Optional configuration including database connection
|
|
138
145
|
* @returns The handler result
|
|
139
146
|
*/
|
|
140
|
-
async function executeWithAuditTransaction(auditContext, handler, onComplete) {
|
|
147
|
+
async function executeWithAuditTransaction(auditContext, handler, onComplete, options) {
|
|
141
148
|
if (!auditContext) return handler(void 0);
|
|
142
149
|
const { auditor, storage } = auditContext;
|
|
143
|
-
|
|
144
|
-
if (db) return (0, __geekmidas_audit_kysely.withAuditableTransaction)(db, auditor, async () => {
|
|
150
|
+
if (storage.withTransaction) return storage.withTransaction(auditor, async () => {
|
|
145
151
|
const response$1 = await handler(auditor);
|
|
146
152
|
if (onComplete) await onComplete(response$1, auditor);
|
|
147
153
|
return response$1;
|
|
148
|
-
});
|
|
154
|
+
}, options?.db);
|
|
149
155
|
const response = await handler(auditor);
|
|
150
156
|
if (onComplete) await onComplete(response, auditor);
|
|
151
157
|
await auditor.flush();
|
|
@@ -171,4 +177,4 @@ Object.defineProperty(exports, 'processEndpointAudits', {
|
|
|
171
177
|
return processEndpointAudits;
|
|
172
178
|
}
|
|
173
179
|
});
|
|
174
|
-
//# sourceMappingURL=processAudits-
|
|
180
|
+
//# sourceMappingURL=processAudits-CzHkPokQ.cjs.map
|