@geekmidas/constructs 1.0.5 → 1.1.1
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/{AWSLambdaFunction-CDJX0Tr1.d.mts → AWSLambdaFunction-BF1gJJjG.d.mts} +3 -3
- package/dist/{AWSLambdaFunction-CDJX0Tr1.d.mts.map → AWSLambdaFunction-BF1gJJjG.d.mts.map} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-Soie57uM.cjs → AWSLambdaSubscriberAdaptor-BtBKExsh.cjs} +38 -35
- package/dist/AWSLambdaSubscriberAdaptor-BtBKExsh.cjs.map +1 -0
- package/dist/{AWSLambdaSubscriberAdaptor-BfEGolJA.d.cts → AWSLambdaSubscriberAdaptor-Cj1wjkUP.d.cts} +3 -2
- package/dist/{AWSLambdaSubscriberAdaptor-BfEGolJA.d.cts.map → AWSLambdaSubscriberAdaptor-Cj1wjkUP.d.cts.map} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-BUvb-v_n.mjs → AWSLambdaSubscriberAdaptor-DsRmmGm1.mjs} +38 -35
- package/dist/AWSLambdaSubscriberAdaptor-DsRmmGm1.mjs.map +1 -0
- package/dist/{AWSLambdaSubscriberAdaptor-Pb7Jof-i.d.mts → AWSLambdaSubscriberAdaptor-OQvj2lKI.d.mts} +4 -3
- package/dist/{AWSLambdaSubscriberAdaptor-Pb7Jof-i.d.mts.map → AWSLambdaSubscriberAdaptor-OQvj2lKI.d.mts.map} +1 -1
- package/dist/{AmazonApiGatewayEndpointAdaptor-DRG4hu-k.d.mts → AmazonApiGatewayEndpointAdaptor-CQSZArI6.d.mts} +4 -4
- package/dist/{AmazonApiGatewayEndpointAdaptor-DRG4hu-k.d.mts.map → AmazonApiGatewayEndpointAdaptor-CQSZArI6.d.mts.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Bj9BDhNM.d.mts → AmazonApiGatewayV1EndpointAdaptor-xTrFYt48.d.mts} +4 -4
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Bj9BDhNM.d.mts.map → AmazonApiGatewayV1EndpointAdaptor-xTrFYt48.d.mts.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-C0199fdk.d.mts → AmazonApiGatewayV2EndpointAdaptor-BBayh2_k.d.mts} +4 -4
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-C0199fdk.d.mts.map → AmazonApiGatewayV2EndpointAdaptor-BBayh2_k.d.mts.map} +1 -1
- 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-DCcYOx3h.d.mts → Authorizer-DBsrDTuf.d.mts} +1 -1
- package/dist/{Authorizer-DCcYOx3h.d.mts.map → Authorizer-DBsrDTuf.d.mts.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/{BaseFunctionBuilder-JpN2FtB4.d.mts → BaseFunctionBuilder-CsvFjzA8.d.mts} +2 -2
- package/dist/{BaseFunctionBuilder-JpN2FtB4.d.mts.map → BaseFunctionBuilder-CsvFjzA8.d.mts.map} +1 -1
- package/dist/{Construct-DvXCkLOP.d.mts → Construct-C2SyofdS.d.mts} +1 -1
- package/dist/{Construct-DvXCkLOP.d.mts.map → Construct-C2SyofdS.d.mts.map} +1 -1
- package/dist/Construct.d.mts +1 -1
- package/dist/{Cron-D5NpDp6y.mjs → Cron-B3vrGuaD.mjs} +1 -1
- package/dist/{Cron-D5NpDp6y.mjs.map → Cron-B3vrGuaD.mjs.map} +1 -1
- package/dist/{Cron-BJWjEj3U.d.cts → Cron-BDxW6fYg.d.cts} +1 -1
- package/dist/{Cron-BJWjEj3U.d.cts.map → Cron-BDxW6fYg.d.cts.map} +1 -1
- package/dist/{Cron-BjNvt_Wj.d.mts → Cron-CWxjO2Fg.d.mts} +2 -2
- package/dist/{Cron-BjNvt_Wj.d.mts.map → Cron-CWxjO2Fg.d.mts.map} +1 -1
- package/dist/{Cron-BV6weqem.cjs → Cron-DEKZg5j4.cjs} +1 -1
- package/dist/{Cron-BV6weqem.cjs.map → Cron-DEKZg5j4.cjs.map} +1 -1
- package/dist/{CronBuilder-DzPkDCiP.cjs → CronBuilder-BHpY6w3b.cjs} +2 -2
- package/dist/{CronBuilder-DzPkDCiP.cjs.map → CronBuilder-BHpY6w3b.cjs.map} +1 -1
- package/dist/{CronBuilder-CmPYae1S.d.cts → CronBuilder-CginrW3H.d.cts} +2 -2
- package/dist/{CronBuilder-CmPYae1S.d.cts.map → CronBuilder-CginrW3H.d.cts.map} +1 -1
- package/dist/{CronBuilder-X4au0zTu.d.mts → CronBuilder-DJnXbDGK.d.mts} +4 -4
- package/dist/{CronBuilder-X4au0zTu.d.mts.map → CronBuilder-DJnXbDGK.d.mts.map} +1 -1
- package/dist/{CronBuilder-p1Ro6a0n.mjs → CronBuilder-VXpyNfp2.mjs} +2 -2
- package/dist/{CronBuilder-p1Ro6a0n.mjs.map → CronBuilder-VXpyNfp2.mjs.map} +1 -1
- package/dist/{Endpoint-DU20A9E8.d.mts → Endpoint-BiPM0glm.d.mts} +4 -4
- package/dist/{Endpoint-DU20A9E8.d.mts.map → Endpoint-BiPM0glm.d.mts.map} +1 -1
- package/dist/{EndpointBuilder-CuVlda7g.d.mts → EndpointBuilder-B0Aj5jbB.d.mts} +5 -5
- package/dist/{EndpointBuilder-CuVlda7g.d.mts.map → EndpointBuilder-B0Aj5jbB.d.mts.map} +1 -1
- package/dist/{EndpointBuilder-BfzI6Rpc.d.cts → EndpointBuilder-Bel6RS7W.d.cts} +1 -1
- package/dist/{EndpointBuilder-BfzI6Rpc.d.cts.map → EndpointBuilder-Bel6RS7W.d.cts.map} +1 -1
- package/dist/{EndpointBuilder-CF-ZWtdu.mjs → EndpointBuilder-D1RtrBu1.mjs} +3 -3
- package/dist/{EndpointBuilder-CF-ZWtdu.mjs.map → EndpointBuilder-D1RtrBu1.mjs.map} +1 -1
- package/dist/{EndpointBuilder-CyszO0bs.cjs → EndpointBuilder-fXmTxRyW.cjs} +3 -3
- package/dist/{EndpointBuilder-CyszO0bs.cjs.map → EndpointBuilder-fXmTxRyW.cjs.map} +1 -1
- package/dist/{EndpointFactory-B29PiUhj.d.mts → EndpointFactory-CWIeWCRG.d.mts} +4 -4
- package/dist/{EndpointFactory-B29PiUhj.d.mts.map → EndpointFactory-CWIeWCRG.d.mts.map} +1 -1
- package/dist/{EndpointFactory-CVT9quQD.d.cts → EndpointFactory-CXvakOkn.d.cts} +2 -2
- package/dist/{EndpointFactory-CVT9quQD.d.cts.map → EndpointFactory-CXvakOkn.d.cts.map} +1 -1
- package/dist/{EndpointFactory-B0D6d6t9.cjs → EndpointFactory-DBfTbSTX.cjs} +3 -3
- package/dist/{EndpointFactory-B0D6d6t9.cjs.map → EndpointFactory-DBfTbSTX.cjs.map} +1 -1
- package/dist/{EndpointFactory-Do498RmG.mjs → EndpointFactory-DkB8yxdQ.mjs} +3 -3
- package/dist/{EndpointFactory-Do498RmG.mjs.map → EndpointFactory-DkB8yxdQ.mjs.map} +1 -1
- package/dist/{Function-DEX2O-SB.d.mts → Function-CZw1DRQ6.d.mts} +2 -2
- package/dist/{Function-DEX2O-SB.d.mts.map → Function-CZw1DRQ6.d.mts.map} +1 -1
- package/dist/{FunctionBuilder-DRw1s5uT.d.mts → FunctionBuilder-m5BNA2Ap.d.mts} +4 -4
- package/dist/{FunctionBuilder-DRw1s5uT.d.mts.map → FunctionBuilder-m5BNA2Ap.d.mts.map} +1 -1
- package/dist/{FunctionExecutionWrapper-D2kbmPJG.d.mts → FunctionExecutionWrapper-C7yYXIq-.d.mts} +2 -2
- package/dist/{FunctionExecutionWrapper-D2kbmPJG.d.mts.map → FunctionExecutionWrapper-C7yYXIq-.d.mts.map} +1 -1
- package/dist/{HonoEndpointAdaptor-BCql3gLP.d.cts → HonoEndpointAdaptor-BuyXynoH.d.cts} +3 -3
- package/dist/{HonoEndpointAdaptor-BCql3gLP.d.cts.map → HonoEndpointAdaptor-BuyXynoH.d.cts.map} +1 -1
- package/dist/{HonoEndpointAdaptor-BMNAai8a.d.mts → HonoEndpointAdaptor-DuVb-H5h.d.mts} +3 -3
- package/dist/{HonoEndpointAdaptor-BMNAai8a.d.mts.map → HonoEndpointAdaptor-DuVb-H5h.d.mts.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-DCgMSkQA.d.mts → Subscriber-BgB3RRxb.d.mts} +2 -2
- package/dist/{Subscriber-DCgMSkQA.d.mts.map → Subscriber-BgB3RRxb.d.mts.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-UIwW_wIY.d.cts → SubscriberBuilder-B9uva8fZ.d.cts} +1 -1
- package/dist/{SubscriberBuilder-BcyK44e_.d.mts.map → SubscriberBuilder-B9uva8fZ.d.cts.map} +1 -1
- package/dist/{SubscriberBuilder-BcyK44e_.d.mts → SubscriberBuilder-DaQkh2Nt.d.mts} +2 -2
- package/dist/{SubscriberBuilder-UIwW_wIY.d.cts.map → SubscriberBuilder-DaQkh2Nt.d.mts.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-oWNADEl4.d.mts → TestEndpointAdaptor-qSWV8dpS.d.mts} +3 -3
- package/dist/{TestEndpointAdaptor-oWNADEl4.d.mts.map → TestEndpointAdaptor-qSWV8dpS.d.mts.map} +1 -1
- package/dist/TestFunctionAdaptor-BHk2bDOV.d.cts +30 -0
- package/dist/TestFunctionAdaptor-BHk2bDOV.d.cts.map +1 -0
- package/dist/TestFunctionAdaptor-CK-dbKpO.mjs +67 -0
- package/dist/TestFunctionAdaptor-CK-dbKpO.mjs.map +1 -0
- package/dist/TestFunctionAdaptor-CSMX7myB.cjs +73 -0
- package/dist/TestFunctionAdaptor-CSMX7myB.cjs.map +1 -0
- package/dist/TestFunctionAdaptor-DzT8GRdR.d.mts +30 -0
- package/dist/TestFunctionAdaptor-DzT8GRdR.d.mts.map +1 -0
- package/dist/TestSubscriberAdaptor-1m-2bM_j.cjs +49 -0
- package/dist/TestSubscriberAdaptor-1m-2bM_j.cjs.map +1 -0
- package/dist/TestSubscriberAdaptor-CPEiqSfE.d.mts +26 -0
- package/dist/TestSubscriberAdaptor-CPEiqSfE.d.mts.map +1 -0
- package/dist/TestSubscriberAdaptor-CrqLkyUE.mjs +43 -0
- package/dist/TestSubscriberAdaptor-CrqLkyUE.mjs.map +1 -0
- package/dist/TestSubscriberAdaptor-DQk5xzb0.d.cts +26 -0
- package/dist/TestSubscriberAdaptor-DQk5xzb0.d.cts.map +1 -0
- package/dist/adaptors/aws.cjs +1 -1
- package/dist/adaptors/aws.d.cts +1 -1
- package/dist/adaptors/aws.d.mts +16 -16
- package/dist/adaptors/aws.mjs +1 -1
- package/dist/adaptors/hono.d.cts +1 -1
- package/dist/adaptors/hono.d.mts +9 -9
- package/dist/adaptors/testing.cjs +5 -1
- package/dist/adaptors/testing.d.cts +4 -1
- package/dist/adaptors/testing.d.mts +13 -10
- package/dist/adaptors/testing.mjs +3 -1
- package/dist/crons/Cron.cjs +1 -1
- package/dist/crons/Cron.d.cts +1 -1
- package/dist/crons/Cron.d.mts +6 -6
- package/dist/crons/Cron.mjs +1 -1
- package/dist/crons/CronBuilder.cjs +2 -2
- package/dist/crons/CronBuilder.d.cts +2 -2
- package/dist/crons/CronBuilder.d.mts +7 -7
- package/dist/crons/CronBuilder.mjs +2 -2
- package/dist/crons/index.cjs +2 -2
- package/dist/crons/index.d.cts +2 -2
- package/dist/crons/index.d.mts +7 -7
- package/dist/crons/index.mjs +2 -2
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +10 -10
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +11 -11
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +11 -11
- package/dist/endpoints/Authorizer.cjs +1 -1
- package/dist/endpoints/Authorizer.d.mts +1 -1
- package/dist/endpoints/Authorizer.mjs +1 -1
- package/dist/endpoints/Endpoint.d.mts +8 -8
- package/dist/endpoints/EndpointBuilder.cjs +3 -3
- package/dist/endpoints/EndpointBuilder.d.cts +1 -1
- package/dist/endpoints/EndpointBuilder.d.mts +9 -9
- package/dist/endpoints/EndpointBuilder.mjs +3 -3
- package/dist/endpoints/EndpointFactory.cjs +4 -4
- package/dist/endpoints/EndpointFactory.d.cts +2 -2
- package/dist/endpoints/EndpointFactory.d.mts +10 -10
- package/dist/endpoints/EndpointFactory.mjs +4 -4
- package/dist/endpoints/HonoEndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/HonoEndpointAdaptor.d.mts +9 -9
- package/dist/endpoints/TestEndpointAdaptor.d.mts +9 -9
- package/dist/endpoints/audit.d.mts +8 -8
- package/dist/endpoints/helpers.d.mts +8 -8
- package/dist/endpoints/index.cjs +4 -4
- package/dist/endpoints/index.d.cts +6 -6
- package/dist/endpoints/index.d.mts +12 -12
- package/dist/endpoints/index.mjs +4 -4
- package/dist/endpoints/lazyAccessors.d.cts +1 -1
- package/dist/endpoints/lazyAccessors.d.mts +9 -9
- package/dist/endpoints/processAudits.d.mts +8 -8
- package/dist/endpoints/rls.cjs +1 -1
- package/dist/endpoints/rls.d.mts +8 -8
- package/dist/endpoints/rls.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.cjs +4 -67
- package/dist/functions/TestFunctionAdaptor.d.cts +3 -30
- package/dist/functions/TestFunctionAdaptor.d.mts +4 -31
- package/dist/functions/TestFunctionAdaptor.mjs +4 -66
- package/dist/functions/index.d.mts +5 -5
- package/dist/{index-DHGtpWKA.d.mts → index-DQo_Csy7.d.mts} +2 -2
- package/dist/{index-DHGtpWKA.d.mts.map → index-DQo_Csy7.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/{lazyAccessors-D1tbdxUk.d.mts → lazyAccessors-DXkJpnyX.d.mts} +2 -2
- package/dist/{lazyAccessors-D1tbdxUk.d.mts.map → lazyAccessors-DXkJpnyX.d.mts.map} +1 -1
- package/dist/{lazyAccessors-ZRbwOONj.d.cts → lazyAccessors-DdZaA716.d.cts} +1 -1
- package/dist/{lazyAccessors-ZRbwOONj.d.cts.map → lazyAccessors-DdZaA716.d.cts.map} +1 -1
- package/dist/{publisher-DdPDps5m.d.cts → publisher-BrzPGnm4.d.cts} +1 -1
- package/dist/{publisher-BeouS9lG.d.mts.map → publisher-BrzPGnm4.d.cts.map} +1 -1
- package/dist/{publisher-BeouS9lG.d.mts → publisher-CP4gpv-4.d.mts} +2 -2
- package/dist/{publisher-DdPDps5m.d.cts.map → publisher-CP4gpv-4.d.mts.map} +1 -1
- package/dist/publisher.d.cts +1 -1
- package/dist/publisher.d.mts +2 -2
- 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/AWSLambdaSubscriberAdaptor.cjs +1 -1
- package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.cts +1 -1
- package/dist/subscribers/AWSLambdaSubscriberAdaptor.d.mts +3 -3
- package/dist/subscribers/AWSLambdaSubscriberAdaptor.mjs +1 -1
- 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.cts +1 -1
- package/dist/subscribers/SubscriberBuilder.d.mts +3 -3
- package/dist/subscribers/SubscriberBuilder.mjs +2 -2
- package/dist/subscribers/TestSubscriberAdaptor.cjs +4 -0
- package/dist/subscribers/TestSubscriberAdaptor.d.cts +4 -0
- package/dist/subscribers/TestSubscriberAdaptor.d.mts +4 -0
- package/dist/subscribers/TestSubscriberAdaptor.mjs +4 -0
- package/dist/subscribers/index.cjs +2 -2
- package/dist/subscribers/index.d.cts +3 -3
- package/dist/subscribers/index.d.cts.map +1 -1
- package/dist/subscribers/index.d.mts +3 -3
- package/dist/subscribers/index.mjs +2 -2
- package/dist/{telemetry-yAHf5yDs.d.mts → telemetry-C-kNOW3C.d.mts} +1 -1
- package/dist/{telemetry-yAHf5yDs.d.mts.map → telemetry-C-kNOW3C.d.mts.map} +1 -1
- package/dist/telemetry.d.mts +1 -1
- package/dist/{types-Dw-iLd3Y.d.mts → types-aFmq5cKh.d.mts} +1 -1
- package/dist/{types-Dw-iLd3Y.d.mts.map → types-aFmq5cKh.d.mts.map} +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +13 -13
- package/src/adaptors/testing.ts +2 -0
- package/src/subscribers/AWSLambdaSubscriberAdaptor.ts +61 -37
- package/src/subscribers/TestSubscriberAdaptor.ts +127 -0
- package/src/subscribers/__tests__/AWSLambdaSubscriberAdaptor.spec.ts +239 -27
- package/src/subscribers/__tests__/TestSubscriberAdaptor.spec.ts +558 -0
- package/dist/AWSLambdaSubscriberAdaptor-BUvb-v_n.mjs.map +0 -1
- package/dist/AWSLambdaSubscriberAdaptor-Soie57uM.cjs.map +0 -1
- package/dist/functions/TestFunctionAdaptor.cjs.map +0 -1
- package/dist/functions/TestFunctionAdaptor.d.cts.map +0 -1
- package/dist/functions/TestFunctionAdaptor.d.mts.map +0 -1
- package/dist/functions/TestFunctionAdaptor.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import "../Subscriber-
|
|
3
|
-
import { SubscriberBuilder } from "../SubscriberBuilder-
|
|
1
|
+
import "../Construct-C2SyofdS.mjs";
|
|
2
|
+
import "../Subscriber-BgB3RRxb.mjs";
|
|
3
|
+
import { SubscriberBuilder } from "../SubscriberBuilder-DaQkh2Nt.mjs";
|
|
4
4
|
export { 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
|
-
import { SubscriberBuilder } from "../SubscriberBuilder-
|
|
4
|
-
import * as
|
|
3
|
+
import { SubscriberBuilder } from "../SubscriberBuilder-B9uva8fZ.cjs";
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/subscribers/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAKa,GAAC,sBAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/subscribers/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAKa,GAAC,sBAA0B,kBAAA,CAA1B,MAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../Construct-
|
|
2
|
-
import { Subscriber } from "../Subscriber-
|
|
3
|
-
import { SubscriberBuilder } from "../SubscriberBuilder-
|
|
1
|
+
import "../Construct-C2SyofdS.mjs";
|
|
2
|
+
import { Subscriber } from "../Subscriber-BgB3RRxb.mjs";
|
|
3
|
+
import { SubscriberBuilder } from "../SubscriberBuilder-DaQkh2Nt.mjs";
|
|
4
4
|
import * as _geekmidas_logger8 from "@geekmidas/logger";
|
|
5
5
|
|
|
6
6
|
//#region src/subscribers/index.d.ts
|
|
@@ -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();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-
|
|
1
|
+
{"version":3,"file":"telemetry-C-kNOW3C.d.mts","names":[],"sources":["../src/telemetry.ts"],"sourcesContent":[],"mappings":";;;;;;;AA6FmB,UAlFF,gBAAA,CAkFE;EAAgB;;;EAQgB,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OAAA;;;;;UAhFlC,gBAAA;;;;;;;;WASP;;;;;UAMO,iBAAA;;;;;;;;;;;;YAcN;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BM,SAAA;;;;;;;0BAOQ,mBAAmB;;;;;;;oBAQzB,4BAA4B;;;;;;;sBAQ1B,yBAAyB"}
|
package/dist/telemetry.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Telemetry, TelemetryContext, TelemetryRequest, TelemetryResponse } from "./telemetry-
|
|
1
|
+
import { Telemetry, TelemetryContext, TelemetryRequest, TelemetryResponse } from "./telemetry-C-kNOW3C.mjs";
|
|
2
2
|
export { Telemetry, TelemetryContext, TelemetryRequest, TelemetryResponse };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-aFmq5cKh.d.mts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";KAAY,6BAAA,MACC,CADD,IACM,CADS,CACP,CADO,CAAA,SAAA,SAAA,GAAA,KAAA,GACwB,CADxB,GAC4B,CAD5B,CAC8B,CAD9B,CAAA,EAAA;AACd,KAGD,UAAA,GAHC,KAAA,GAAA,MAAA,GAAA,KAAA,GAAA,OAAA,GAAA,QAAA,GAAA,SAAA;AAAK,KAWN,eAXM,CAAA,UAWoB,UAXpB,CAAA,GAWkC,SAXlC,CAW4C,CAX5C,CAAA"}
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HttpMethod, LowerHttpMethod, RemoveUndefined } from "./types-
|
|
1
|
+
import { HttpMethod, LowerHttpMethod, RemoveUndefined } from "./types-aFmq5cKh.mjs";
|
|
2
2
|
export { HttpMethod, LowerHttpMethod, RemoveUndefined };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/constructs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -74,36 +74,36 @@
|
|
|
74
74
|
"@types/lodash.set": "~4.3.9",
|
|
75
75
|
"@types/lodash.uniqby": "~4.7.9",
|
|
76
76
|
"@types/pg": "~8.15.6",
|
|
77
|
-
"better-auth": "~1.4.
|
|
77
|
+
"better-auth": "~1.4.18",
|
|
78
78
|
"kysely": "~0.28.8",
|
|
79
79
|
"pg": "~8.16.3",
|
|
80
80
|
"zod": "~4.1.13",
|
|
81
|
+
"@geekmidas/cache": "^1.0.0",
|
|
81
82
|
"@geekmidas/audit": "^1.0.0",
|
|
82
83
|
"@geekmidas/db": "^1.0.0",
|
|
83
|
-
"@geekmidas/
|
|
84
|
+
"@geekmidas/envkit": "^1.0.3",
|
|
84
85
|
"@geekmidas/errors": "^1.0.0",
|
|
85
|
-
"@geekmidas/envkit": "^1.0.2",
|
|
86
86
|
"@geekmidas/events": "^1.0.0",
|
|
87
87
|
"@geekmidas/rate-limit": "^1.0.0",
|
|
88
|
-
"@geekmidas/schema": "^1.0.0",
|
|
89
|
-
"@geekmidas/services": "^1.0.1",
|
|
90
88
|
"@geekmidas/logger": "^1.0.0",
|
|
91
|
-
"@geekmidas/
|
|
89
|
+
"@geekmidas/services": "^1.0.1",
|
|
90
|
+
"@geekmidas/testkit": "^1.0.1",
|
|
91
|
+
"@geekmidas/schema": "^1.0.0"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@middy/core": ">=6.3.1",
|
|
95
95
|
"@types/aws-lambda": ">=8.10.92",
|
|
96
96
|
"hono": ">=4.8.2",
|
|
97
|
-
"@geekmidas/audit": "^1.0.0",
|
|
98
97
|
"@geekmidas/cache": "^1.0.0",
|
|
99
|
-
"@geekmidas/
|
|
100
|
-
"@geekmidas/errors": "^1.0.0",
|
|
101
|
-
"@geekmidas/logger": "^1.0.0",
|
|
98
|
+
"@geekmidas/audit": "^1.0.0",
|
|
102
99
|
"@geekmidas/db": "^1.0.0",
|
|
103
|
-
"@geekmidas/
|
|
100
|
+
"@geekmidas/envkit": "^1.0.3",
|
|
104
101
|
"@geekmidas/rate-limit": "^1.0.0",
|
|
102
|
+
"@geekmidas/errors": "^1.0.0",
|
|
103
|
+
"@geekmidas/events": "^1.0.0",
|
|
105
104
|
"@geekmidas/schema": "^1.0.0",
|
|
106
|
-
"@geekmidas/services": "^1.0.1"
|
|
105
|
+
"@geekmidas/services": "^1.0.1",
|
|
106
|
+
"@geekmidas/logger": "^1.0.0"
|
|
107
107
|
},
|
|
108
108
|
"peerDependenciesMeta": {
|
|
109
109
|
"@geekmidas/audit": {
|
package/src/adaptors/testing.ts
CHANGED
|
@@ -145,7 +145,7 @@ export class AWSLambdaSubscriber<
|
|
|
145
145
|
for (const record of rawEvent.Records) {
|
|
146
146
|
try {
|
|
147
147
|
const event = this.parseSQSRecord(record);
|
|
148
|
-
if (
|
|
148
|
+
if (this.shouldIncludeEvent(event)) {
|
|
149
149
|
events.push(event);
|
|
150
150
|
}
|
|
151
151
|
} catch (error) {
|
|
@@ -160,7 +160,7 @@ export class AWSLambdaSubscriber<
|
|
|
160
160
|
for (const record of rawEvent.Records) {
|
|
161
161
|
try {
|
|
162
162
|
const event = this.parseSNSRecord(record);
|
|
163
|
-
if (
|
|
163
|
+
if (this.shouldIncludeEvent(event)) {
|
|
164
164
|
events.push(event);
|
|
165
165
|
}
|
|
166
166
|
} catch (error) {
|
|
@@ -200,59 +200,83 @@ export class AWSLambdaSubscriber<
|
|
|
200
200
|
);
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
private parseSNSRecord(record: SNSEventRecord): any
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
// Resolve type from MessageAttributes (preferred) or message body
|
|
207
|
-
const messageType =
|
|
208
|
-
record.Sns.MessageAttributes?.type?.Value ?? message.type;
|
|
203
|
+
private parseSNSRecord(record: SNSEventRecord): any {
|
|
204
|
+
const message = this.safeJsonParse(record.Sns.Message);
|
|
205
|
+
const messageType = record.Sns.MessageAttributes?.type?.Value;
|
|
209
206
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
// Not JSON — wrap raw string with type from MessageAttributes if available
|
|
208
|
+
if (message === null) {
|
|
209
|
+
return messageType
|
|
210
|
+
? { type: messageType, payload: record.Sns.Message }
|
|
211
|
+
: record.Sns.Message;
|
|
212
|
+
}
|
|
213
213
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return
|
|
214
|
+
// Resolve type from MessageAttributes (preferred) or message body
|
|
215
|
+
const resolvedType = messageType ?? message.type;
|
|
216
|
+
|
|
217
|
+
if (message.type) {
|
|
218
|
+
return message; // Full event format: { type, payload }
|
|
219
219
|
}
|
|
220
|
+
|
|
221
|
+
// Payload-only format: type is in MessageAttributes
|
|
222
|
+
return resolvedType ? { type: resolvedType, payload: message } : message;
|
|
220
223
|
}
|
|
221
224
|
|
|
222
|
-
private parseSQSRecord(record: SQSRecord): any
|
|
223
|
-
|
|
224
|
-
const body = JSON.parse(record.body);
|
|
225
|
+
private parseSQSRecord(record: SQSRecord): any {
|
|
226
|
+
const body = this.safeJsonParse(record.body);
|
|
225
227
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
228
|
+
// Not JSON — return raw body as-is
|
|
229
|
+
if (body === null) {
|
|
230
|
+
return record.body;
|
|
231
|
+
}
|
|
229
232
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
+
// Check if this is an SNS message wrapped in SQS
|
|
234
|
+
if (body.Type === 'Notification' && body.Message) {
|
|
235
|
+
const snsMessage = this.safeJsonParse(body.Message);
|
|
236
|
+
const messageType = body.MessageAttributes?.type?.Value;
|
|
233
237
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
body.MessageAttributes?.type?.Value ?? snsMessage.type;
|
|
238
|
+
// SNS Message not JSON — wrap with type from MessageAttributes if available
|
|
239
|
+
if (snsMessage === null) {
|
|
237
240
|
return messageType
|
|
238
|
-
? { type: messageType, payload:
|
|
239
|
-
:
|
|
241
|
+
? { type: messageType, payload: body.Message }
|
|
242
|
+
: body.Message;
|
|
240
243
|
}
|
|
241
244
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
if (snsMessage.type) {
|
|
246
|
+
return snsMessage; // Full event format: { type, payload }
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Payload-only format: type is in MessageAttributes
|
|
250
|
+
const resolvedType = messageType ?? snsMessage.type;
|
|
251
|
+
return resolvedType
|
|
252
|
+
? { type: resolvedType, payload: snsMessage }
|
|
253
|
+
: snsMessage;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Direct SQS message
|
|
257
|
+
return body;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
private safeJsonParse(value: string): any | null {
|
|
261
|
+
try {
|
|
262
|
+
return JSON.parse(value);
|
|
263
|
+
} catch {
|
|
246
264
|
return null;
|
|
247
265
|
}
|
|
248
266
|
}
|
|
249
267
|
|
|
250
|
-
private
|
|
268
|
+
private shouldIncludeEvent(event: any): boolean {
|
|
269
|
+
// No event type (raw string/non-object) — always include
|
|
270
|
+
if (typeof event !== 'object' || !event?.type) {
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// No filter configured — accept all
|
|
251
275
|
if (!this.subscriber.subscribedEvents) {
|
|
252
|
-
return true;
|
|
276
|
+
return true;
|
|
253
277
|
}
|
|
254
278
|
|
|
255
|
-
return this.subscriber.subscribedEvents.includes(
|
|
279
|
+
return this.subscriber.subscribedEvents.includes(event.type as any);
|
|
256
280
|
}
|
|
257
281
|
|
|
258
282
|
private async _handler(event: SubscriberEvent<TServices, TLogger>) {
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { EnvironmentParser } from '@geekmidas/envkit';
|
|
2
|
+
import type {
|
|
3
|
+
EventPublisher,
|
|
4
|
+
ExtractPublisherMessage,
|
|
5
|
+
} from '@geekmidas/events';
|
|
6
|
+
import type { Logger } from '@geekmidas/logger';
|
|
7
|
+
import type { InferStandardSchema } from '@geekmidas/schema';
|
|
8
|
+
import type { Service, ServiceRecord } from '@geekmidas/services';
|
|
9
|
+
import { ServiceDiscovery } from '@geekmidas/services';
|
|
10
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
11
|
+
import { publishEvents } from '../publisher';
|
|
12
|
+
import type { Subscriber } from './Subscriber';
|
|
13
|
+
|
|
14
|
+
// Helper type to extract payload types for subscribed events
|
|
15
|
+
type ExtractEventPayloads<
|
|
16
|
+
TPublisher extends EventPublisher<any> | undefined,
|
|
17
|
+
TEventTypes extends any[],
|
|
18
|
+
> = TPublisher extends EventPublisher<any>
|
|
19
|
+
? Extract<ExtractPublisherMessage<TPublisher>, { type: TEventTypes[number] }>
|
|
20
|
+
: never;
|
|
21
|
+
|
|
22
|
+
export class TestSubscriberAdaptor<
|
|
23
|
+
TServices extends Service[] = [],
|
|
24
|
+
TLogger extends Logger = Logger,
|
|
25
|
+
OutSchema extends StandardSchemaV1 | undefined = undefined,
|
|
26
|
+
TEventPublisher extends EventPublisher<any> | undefined = undefined,
|
|
27
|
+
TEventPublisherServiceName extends string = string,
|
|
28
|
+
TSubscribedEvents extends
|
|
29
|
+
ExtractPublisherMessage<TEventPublisher>['type'][] = ExtractPublisherMessage<TEventPublisher>['type'][],
|
|
30
|
+
> {
|
|
31
|
+
static getDefaultServiceDiscovery() {
|
|
32
|
+
return ServiceDiscovery.getInstance(new EnvironmentParser({}));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
constructor(
|
|
36
|
+
private readonly subscriber: Subscriber<
|
|
37
|
+
TServices,
|
|
38
|
+
TLogger,
|
|
39
|
+
OutSchema,
|
|
40
|
+
TEventPublisher,
|
|
41
|
+
TEventPublisherServiceName,
|
|
42
|
+
TSubscribedEvents
|
|
43
|
+
>,
|
|
44
|
+
private serviceDiscovery: ServiceDiscovery<any> = TestSubscriberAdaptor.getDefaultServiceDiscovery(),
|
|
45
|
+
) {}
|
|
46
|
+
|
|
47
|
+
async invoke(
|
|
48
|
+
request: TestSubscriberRequest<
|
|
49
|
+
TEventPublisher,
|
|
50
|
+
TSubscribedEvents,
|
|
51
|
+
TServices
|
|
52
|
+
>,
|
|
53
|
+
): Promise<InferStandardSchema<OutSchema>> {
|
|
54
|
+
// Create logger with test context
|
|
55
|
+
const logger = this.subscriber.logger.child({
|
|
56
|
+
test: true,
|
|
57
|
+
}) as TLogger;
|
|
58
|
+
|
|
59
|
+
// Resolve services (use provided or auto-register)
|
|
60
|
+
let services: ServiceRecord<TServices>;
|
|
61
|
+
if (request.services) {
|
|
62
|
+
services = request.services;
|
|
63
|
+
} else {
|
|
64
|
+
services = await this.serviceDiscovery.register(this.subscriber.services);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Filter events to only subscribed types
|
|
68
|
+
const filteredEvents = this.filterEvents(request.events);
|
|
69
|
+
|
|
70
|
+
// Return early if no events after filtering (mirrors AWSLambdaSubscriber)
|
|
71
|
+
if (filteredEvents.length === 0) {
|
|
72
|
+
return { batchItemFailures: [] } as any;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Execute the subscriber handler
|
|
76
|
+
const result = await this.subscriber.handler({
|
|
77
|
+
events: filteredEvents,
|
|
78
|
+
services,
|
|
79
|
+
logger,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// Validate output if schema is provided
|
|
83
|
+
let output = result;
|
|
84
|
+
if (this.subscriber.outputSchema && result) {
|
|
85
|
+
const validationResult =
|
|
86
|
+
await this.subscriber.outputSchema['~standard'].validate(result);
|
|
87
|
+
|
|
88
|
+
if (validationResult.issues) {
|
|
89
|
+
throw new Error('Subscriber output validation failed');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
output = validationResult.value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Publish events if configured
|
|
96
|
+
await publishEvents(
|
|
97
|
+
logger,
|
|
98
|
+
this.serviceDiscovery,
|
|
99
|
+
this.subscriber.events,
|
|
100
|
+
output,
|
|
101
|
+
this.subscriber.publisherService,
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
return output;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
private filterEvents(
|
|
108
|
+
events: ExtractEventPayloads<TEventPublisher, TSubscribedEvents>[],
|
|
109
|
+
): ExtractEventPayloads<TEventPublisher, TSubscribedEvents>[] {
|
|
110
|
+
if (!this.subscriber.subscribedEvents) {
|
|
111
|
+
return events;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return events.filter((event: any) =>
|
|
115
|
+
this.subscriber.subscribedEvents!.includes(event.type),
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type TestSubscriberRequest<
|
|
121
|
+
TEventPublisher extends EventPublisher<any> | undefined = undefined,
|
|
122
|
+
TSubscribedEvents extends any[] = [],
|
|
123
|
+
TServices extends Service[] = [],
|
|
124
|
+
> = {
|
|
125
|
+
events: ExtractEventPayloads<TEventPublisher, TSubscribedEvents>[];
|
|
126
|
+
services?: ServiceRecord<TServices>;
|
|
127
|
+
};
|