@geekmidas/constructs 0.0.3 → 0.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/dist/{AmazonApiGatewayEndpointAdaptor-D_Q_NTMT.cjs → AmazonApiGatewayEndpointAdaptor-BEzWkW5m.cjs} +32 -9
- package/dist/AmazonApiGatewayEndpointAdaptor-BEzWkW5m.cjs.map +1 -0
- package/dist/{AmazonApiGatewayEndpointAdaptor-DtzgQ9Vb.d.cts → AmazonApiGatewayEndpointAdaptor-BFhJ2Rpz.d.cts} +5 -2
- package/dist/{AmazonApiGatewayEndpointAdaptor-DNZLntHj.d.mts → AmazonApiGatewayEndpointAdaptor-BrB3RfbI.d.mts} +5 -2
- package/dist/{AmazonApiGatewayEndpointAdaptor-QzIAnWzS.mjs → AmazonApiGatewayEndpointAdaptor-CASfHEj9.mjs} +32 -9
- package/dist/AmazonApiGatewayEndpointAdaptor-CASfHEj9.mjs.map +1 -0
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Gw-j61qM.d.cts → AmazonApiGatewayV1EndpointAdaptor-Bd-o8ese.d.cts} +3 -3
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-DbJa4cpU.d.mts → AmazonApiGatewayV1EndpointAdaptor-BtNXt0-4.d.mts} +3 -3
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-BF5bGWV1.mjs → AmazonApiGatewayV1EndpointAdaptor-RPnkGENb.mjs} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-BF5bGWV1.mjs.map → AmazonApiGatewayV1EndpointAdaptor-RPnkGENb.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Bh4tckwd.cjs → AmazonApiGatewayV1EndpointAdaptor-l1df4rFt.cjs} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Bh4tckwd.cjs.map → AmazonApiGatewayV1EndpointAdaptor-l1df4rFt.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-BOaOkLXF.mjs → AmazonApiGatewayV2EndpointAdaptor-C5Ctz7C_.mjs} +2 -2
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-BOaOkLXF.mjs.map → AmazonApiGatewayV2EndpointAdaptor-C5Ctz7C_.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-BlKn-KJ6.d.mts → AmazonApiGatewayV2EndpointAdaptor-DAJdtgek.d.mts} +3 -3
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-L4Ywv3Pk.cjs → AmazonApiGatewayV2EndpointAdaptor-DH9yJsC8.cjs} +2 -2
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-L4Ywv3Pk.cjs.map → AmazonApiGatewayV2EndpointAdaptor-DH9yJsC8.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-LUlpwmUW.d.cts → AmazonApiGatewayV2EndpointAdaptor-DX-Uci5w.d.cts} +3 -3
- package/dist/{Endpoint-D1nnEsBU.cjs → Endpoint-BVZJb4OR.cjs} +128 -4
- package/dist/Endpoint-BVZJb4OR.cjs.map +1 -0
- package/dist/{Endpoint-DYUjJdEs.d.mts → Endpoint-C7jPJzAH.d.mts} +115 -6
- package/dist/{Endpoint-DNlmybXV.mjs → Endpoint-DVEmKo6G.mjs} +123 -5
- package/dist/Endpoint-DVEmKo6G.mjs.map +1 -0
- package/dist/{Endpoint-C7z9YJHK.d.cts → Endpoint-XUMNAXYy.d.cts} +115 -6
- package/dist/{EndpointBuilder-CpjIMYb0.mjs → EndpointBuilder-Bhy91l_c.mjs} +2 -2
- package/dist/{EndpointBuilder-CpjIMYb0.mjs.map → EndpointBuilder-Bhy91l_c.mjs.map} +1 -1
- package/dist/{EndpointBuilder-B2iScUND.d.mts → EndpointBuilder-CFtWQhcv.d.mts} +2 -2
- package/dist/{EndpointBuilder-BhRd626m.cjs → EndpointBuilder-DDnqW7rT.cjs} +2 -2
- package/dist/{EndpointBuilder-BhRd626m.cjs.map → EndpointBuilder-DDnqW7rT.cjs.map} +1 -1
- package/dist/{EndpointBuilder-1fw103D6.d.cts → EndpointBuilder-t6fVEKBH.d.cts} +2 -2
- package/dist/{EndpointFactory-DLpEbLzL.mjs → EndpointFactory-CNz3Wa08.mjs} +4 -3
- package/dist/EndpointFactory-CNz3Wa08.mjs.map +1 -0
- package/dist/{EndpointFactory-ChmVHWim.cjs → EndpointFactory-Cw_6-53M.cjs} +4 -3
- package/dist/EndpointFactory-Cw_6-53M.cjs.map +1 -0
- package/dist/{EndpointFactory-D576BhaH.d.cts → EndpointFactory-DBRGrXAy.d.mts} +10 -10
- package/dist/{EndpointFactory-DZQpM-9K.d.mts → EndpointFactory-DInjHvFR.d.cts} +10 -10
- package/dist/{HonoEndpointAdaptor-01cH100U.d.mts → HonoEndpointAdaptor-BY2Ovj31.d.mts} +4 -4
- package/dist/{HonoEndpointAdaptor-6LERutxi.cjs → HonoEndpointAdaptor-BsGMcxYb.cjs} +23 -8
- package/dist/HonoEndpointAdaptor-BsGMcxYb.cjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-ua6mp3gt.d.cts → HonoEndpointAdaptor-OtKS5Dsd.d.cts} +4 -4
- package/dist/{HonoEndpointAdaptor-fs2928iO.mjs → HonoEndpointAdaptor-Y4AD3E9g.mjs} +23 -8
- package/dist/HonoEndpointAdaptor-Y4AD3E9g.mjs.map +1 -0
- package/dist/{Subscriber-G7EUI3yc.cjs → Subscriber-CSt7EOlT.cjs} +1 -1
- package/dist/{Subscriber-G7EUI3yc.cjs.map → Subscriber-CSt7EOlT.cjs.map} +1 -1
- package/dist/{Subscriber-BTwKnz3c.mjs → Subscriber-DkCDcTUL.mjs} +1 -1
- package/dist/{Subscriber-BTwKnz3c.mjs.map → Subscriber-DkCDcTUL.mjs.map} +1 -1
- package/dist/{SubscriberBuilder-C1me_972.mjs → SubscriberBuilder-Bn9Hyi28.mjs} +2 -2
- package/dist/{SubscriberBuilder-C1me_972.mjs.map → SubscriberBuilder-Bn9Hyi28.mjs.map} +1 -1
- package/dist/{SubscriberBuilder-C6iZvuDe.cjs → SubscriberBuilder-RsiOmnwq.cjs} +2 -2
- package/dist/{SubscriberBuilder-C6iZvuDe.cjs.map → SubscriberBuilder-RsiOmnwq.cjs.map} +1 -1
- package/dist/{TestEndpointAdaptor-B4SvJvK-.cjs → TestEndpointAdaptor-CbNeUT3Y.cjs} +20 -6
- package/dist/TestEndpointAdaptor-CbNeUT3Y.cjs.map +1 -0
- package/dist/{TestEndpointAdaptor-CelYsQi0.mjs → TestEndpointAdaptor-DD3aygPp.mjs} +20 -6
- package/dist/TestEndpointAdaptor-DD3aygPp.mjs.map +1 -0
- package/dist/{TestEndpointAdaptor-Da0ooGt2.d.mts → TestEndpointAdaptor-Db0cm1fb.d.mts} +3 -3
- package/dist/{TestEndpointAdaptor-CHcgyI3V.d.cts → TestEndpointAdaptor-v7A-7hTs.d.cts} +3 -3
- package/dist/adaptors/aws.cjs +4 -4
- package/dist/adaptors/aws.d.cts +5 -5
- package/dist/adaptors/aws.d.mts +4 -4
- package/dist/adaptors/aws.mjs +4 -4
- package/dist/adaptors/hono.cjs +3 -3
- package/dist/adaptors/hono.d.cts +3 -3
- package/dist/adaptors/hono.d.mts +2 -2
- package/dist/adaptors/hono.mjs +3 -3
- package/dist/adaptors/testing.cjs +2 -2
- package/dist/adaptors/testing.d.cts +3 -3
- package/dist/adaptors/testing.d.mts +2 -2
- package/dist/adaptors/testing.mjs +2 -2
- package/dist/crons/Cron.d.cts +1 -1
- package/dist/crons/CronBuilder.d.cts +1 -1
- package/dist/crons/index.d.cts +5 -5
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.cjs +2 -2
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +2 -2
- 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 +3 -3
- 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 +3 -3
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.mjs +3 -3
- package/dist/endpoints/Endpoint.cjs +2 -1
- package/dist/endpoints/Endpoint.d.cts +3 -3
- package/dist/endpoints/Endpoint.d.mts +2 -2
- package/dist/endpoints/Endpoint.mjs +2 -2
- package/dist/endpoints/EndpointBuilder.cjs +2 -2
- package/dist/endpoints/EndpointBuilder.d.cts +3 -3
- package/dist/endpoints/EndpointBuilder.d.mts +2 -2
- package/dist/endpoints/EndpointBuilder.mjs +2 -2
- package/dist/endpoints/EndpointFactory.cjs +3 -3
- package/dist/endpoints/EndpointFactory.d.cts +4 -4
- package/dist/endpoints/EndpointFactory.d.mts +3 -3
- package/dist/endpoints/EndpointFactory.mjs +3 -3
- package/dist/endpoints/HonoEndpointAdaptor.cjs +3 -3
- package/dist/endpoints/HonoEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/HonoEndpointAdaptor.d.mts +2 -2
- package/dist/endpoints/HonoEndpointAdaptor.mjs +3 -3
- package/dist/endpoints/TestEndpointAdaptor.cjs +2 -2
- package/dist/endpoints/TestEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/TestEndpointAdaptor.d.mts +2 -2
- package/dist/endpoints/TestEndpointAdaptor.mjs +2 -2
- package/dist/endpoints/helpers.cjs +2 -2
- package/dist/endpoints/helpers.d.cts +2 -2
- package/dist/endpoints/helpers.d.mts +1 -1
- package/dist/endpoints/helpers.mjs +2 -2
- package/dist/endpoints/index.cjs +3 -3
- package/dist/endpoints/index.cjs.map +1 -1
- package/dist/endpoints/index.d.cts +7 -7
- package/dist/endpoints/index.d.mts +6 -6
- package/dist/endpoints/index.mjs +3 -3
- package/dist/endpoints/index.mjs.map +1 -1
- package/dist/functions/index.d.cts +1 -1
- package/dist/{helpers-CjvCSIF5.cjs → helpers-BSzj2AiQ.cjs} +2 -2
- package/dist/{helpers-CjvCSIF5.cjs.map → helpers-BSzj2AiQ.cjs.map} +1 -1
- package/dist/{helpers-CP7A0U_s.mjs → helpers-C9WBx7ms.mjs} +2 -2
- package/dist/{helpers-CP7A0U_s.mjs.map → helpers-C9WBx7ms.mjs.map} +1 -1
- package/dist/index-BxApEwAF.d.cts +9 -0
- 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.mjs +2 -2
- package/package.json +4 -4
- package/src/endpoints/EndpointFactory.ts +88 -18
- package/src/endpoints/index.ts +1 -1
- package/test.ts +92 -0
- package/dist/AmazonApiGatewayEndpointAdaptor-D_Q_NTMT.cjs.map +0 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-QzIAnWzS.mjs.map +0 -1
- package/dist/Endpoint-D1nnEsBU.cjs.map +0 -1
- package/dist/Endpoint-DNlmybXV.mjs.map +0 -1
- package/dist/EndpointFactory-ChmVHWim.cjs.map +0 -1
- package/dist/EndpointFactory-DLpEbLzL.mjs.map +0 -1
- package/dist/HonoEndpointAdaptor-6LERutxi.cjs.map +0 -1
- package/dist/HonoEndpointAdaptor-fs2928iO.mjs.map +0 -1
- package/dist/TestEndpointAdaptor-B4SvJvK-.cjs.map +0 -1
- package/dist/TestEndpointAdaptor-CelYsQi0.mjs.map +0 -1
- package/dist/index-zOH9f4sh.d.cts +0 -9
|
@@ -4,7 +4,7 @@ import "../Function-C98H68DW.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
6
|
import "../index-BXTN4mwI.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import "../EndpointBuilder-
|
|
9
|
-
import { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e } from "../EndpointFactory-
|
|
7
|
+
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
|
+
import "../EndpointBuilder-CFtWQhcv.mjs";
|
|
9
|
+
import { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e } from "../EndpointFactory-DBRGrXAy.mjs";
|
|
10
10
|
export { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e };
|
|
@@ -3,8 +3,8 @@ import "../Function-C5mW-38v.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
4
4
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
5
5
|
import "../functions-mM-jcphA.mjs";
|
|
6
|
-
import "../Endpoint-
|
|
7
|
-
import "../EndpointBuilder-
|
|
8
|
-
import { EndpointFactory, e } from "../EndpointFactory-
|
|
6
|
+
import "../Endpoint-DVEmKo6G.mjs";
|
|
7
|
+
import "../EndpointBuilder-Bhy91l_c.mjs";
|
|
8
|
+
import { EndpointFactory, e } from "../EndpointFactory-CNz3Wa08.mjs";
|
|
9
9
|
|
|
10
10
|
export { EndpointFactory, e };
|
|
@@ -4,9 +4,9 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
4
4
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
5
5
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
6
6
|
require('../functions-DVDb5wEA.cjs');
|
|
7
|
-
require('../Endpoint-
|
|
8
|
-
require('../helpers-
|
|
7
|
+
require('../Endpoint-BVZJb4OR.cjs');
|
|
8
|
+
require('../helpers-BSzj2AiQ.cjs');
|
|
9
9
|
require('../parseHonoQuery-BiPp8bEJ.cjs');
|
|
10
|
-
const require_HonoEndpointAdaptor = require('../HonoEndpointAdaptor-
|
|
10
|
+
const require_HonoEndpointAdaptor = require('../HonoEndpointAdaptor-BsGMcxYb.cjs');
|
|
11
11
|
|
|
12
12
|
exports.HonoEndpoint = require_HonoEndpointAdaptor.HonoEndpoint;
|
|
@@ -3,7 +3,7 @@ import "../types-Bp9ysFXd.cjs";
|
|
|
3
3
|
import "../Function-BP58p9Mp.cjs";
|
|
4
4
|
import "../BaseFunctionBuilder-5QCHkchp.cjs";
|
|
5
5
|
import "../FunctionBuilder-BS1KgxA_.cjs";
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
|
+
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
|
+
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-OtKS5Dsd.cjs";
|
|
9
9
|
export { HonoEndpoint, HonoEndpointOptions };
|
|
@@ -4,6 +4,6 @@ import "../Function-C98H68DW.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
6
|
import "../index-BXTN4mwI.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-
|
|
7
|
+
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
|
+
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-BY2Ovj31.mjs";
|
|
9
9
|
export { HonoEndpoint, HonoEndpointOptions };
|
|
@@ -4,9 +4,9 @@ import "../Function-C5mW-38v.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
5
5
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
6
6
|
import "../functions-mM-jcphA.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import "../helpers-
|
|
7
|
+
import "../Endpoint-DVEmKo6G.mjs";
|
|
8
|
+
import "../helpers-C9WBx7ms.mjs";
|
|
9
9
|
import "../parseHonoQuery-yWRoKFFl.mjs";
|
|
10
|
-
import { HonoEndpoint } from "../HonoEndpointAdaptor-
|
|
10
|
+
import { HonoEndpoint } from "../HonoEndpointAdaptor-Y4AD3E9g.mjs";
|
|
11
11
|
|
|
12
12
|
export { HonoEndpoint };
|
|
@@ -4,7 +4,7 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
4
4
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
5
5
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
6
6
|
require('../functions-DVDb5wEA.cjs');
|
|
7
|
-
require('../Endpoint-
|
|
8
|
-
const require_TestEndpointAdaptor = require('../TestEndpointAdaptor-
|
|
7
|
+
require('../Endpoint-BVZJb4OR.cjs');
|
|
8
|
+
const require_TestEndpointAdaptor = require('../TestEndpointAdaptor-CbNeUT3Y.cjs');
|
|
9
9
|
|
|
10
10
|
exports.TestEndpointAdaptor = require_TestEndpointAdaptor.TestEndpointAdaptor;
|
|
@@ -3,7 +3,7 @@ import "../types-Bp9ysFXd.cjs";
|
|
|
3
3
|
import "../Function-BP58p9Mp.cjs";
|
|
4
4
|
import "../BaseFunctionBuilder-5QCHkchp.cjs";
|
|
5
5
|
import "../FunctionBuilder-BS1KgxA_.cjs";
|
|
6
|
-
import "../index-
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import { TestEndpointAdaptor, TestRequestAdaptor } from "../TestEndpointAdaptor-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
|
+
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
|
+
import { TestEndpointAdaptor, TestRequestAdaptor } from "../TestEndpointAdaptor-v7A-7hTs.cjs";
|
|
9
9
|
export { TestEndpointAdaptor, TestRequestAdaptor };
|
|
@@ -4,6 +4,6 @@ import "../Function-C98H68DW.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
6
|
import "../index-BXTN4mwI.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import { TestEndpointAdaptor, TestRequestAdaptor } from "../TestEndpointAdaptor-
|
|
7
|
+
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
|
+
import { TestEndpointAdaptor, TestRequestAdaptor } from "../TestEndpointAdaptor-Db0cm1fb.mjs";
|
|
9
9
|
export { TestEndpointAdaptor, TestRequestAdaptor };
|
|
@@ -4,7 +4,7 @@ import "../Function-C5mW-38v.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
5
5
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
6
6
|
import "../functions-mM-jcphA.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-
|
|
7
|
+
import "../Endpoint-DVEmKo6G.mjs";
|
|
8
|
+
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-DD3aygPp.mjs";
|
|
9
9
|
|
|
10
10
|
export { TestEndpointAdaptor };
|
|
@@ -3,8 +3,8 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
3
3
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
4
4
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
5
5
|
require('../functions-DVDb5wEA.cjs');
|
|
6
|
-
require('../Endpoint-
|
|
7
|
-
const require_helpers = require('../helpers-
|
|
6
|
+
require('../Endpoint-BVZJb4OR.cjs');
|
|
7
|
+
const require_helpers = require('../helpers-BSzj2AiQ.cjs');
|
|
8
8
|
|
|
9
9
|
exports.getEndpointsFromRoutes = require_helpers.getEndpointsFromRoutes;
|
|
10
10
|
exports.getProjectRoot = require_helpers.getProjectRoot;
|
|
@@ -3,8 +3,8 @@ import { HttpMethod } from "../types-Bp9ysFXd.cjs";
|
|
|
3
3
|
import "../Function-BP58p9Mp.cjs";
|
|
4
4
|
import "../BaseFunctionBuilder-5QCHkchp.cjs";
|
|
5
5
|
import "../FunctionBuilder-BS1KgxA_.cjs";
|
|
6
|
-
import "../index-
|
|
7
|
-
import { Endpoint } from "../Endpoint-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
|
+
import { Endpoint } from "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import { Service } from "@geekmidas/services";
|
|
9
9
|
|
|
10
10
|
//#region src/endpoints/helpers.d.ts
|
|
@@ -4,7 +4,7 @@ import "../Function-C98H68DW.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
6
|
import "../index-BXTN4mwI.mjs";
|
|
7
|
-
import { Endpoint } from "../Endpoint-
|
|
7
|
+
import { Endpoint } from "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import { Service } from "@geekmidas/services";
|
|
9
9
|
|
|
10
10
|
//#region src/endpoints/helpers.d.ts
|
|
@@ -3,7 +3,7 @@ import "../Function-C5mW-38v.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
4
4
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
5
5
|
import "../functions-mM-jcphA.mjs";
|
|
6
|
-
import "../Endpoint-
|
|
7
|
-
import { getEndpointsFromRoutes, getProjectRoot } from "../helpers-
|
|
6
|
+
import "../Endpoint-DVEmKo6G.mjs";
|
|
7
|
+
import { getEndpointsFromRoutes, getProjectRoot } from "../helpers-C9WBx7ms.mjs";
|
|
8
8
|
|
|
9
9
|
export { getEndpointsFromRoutes, getProjectRoot };
|
package/dist/endpoints/index.cjs
CHANGED
|
@@ -3,9 +3,9 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
3
3
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
4
4
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
5
5
|
require('../functions-DVDb5wEA.cjs');
|
|
6
|
-
const require_Endpoint = require('../Endpoint-
|
|
7
|
-
require('../EndpointBuilder-
|
|
8
|
-
const require_EndpointFactory = require('../EndpointFactory-
|
|
6
|
+
const require_Endpoint = require('../Endpoint-BVZJb4OR.cjs');
|
|
7
|
+
require('../EndpointBuilder-DDnqW7rT.cjs');
|
|
8
|
+
const require_EndpointFactory = require('../EndpointFactory-Cw_6-53M.cjs');
|
|
9
9
|
|
|
10
10
|
//#region src/endpoints/index.ts
|
|
11
11
|
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 { Endpoint, type EndpointOutput } from './Endpoint';\n\nexport const e = new EndpointFactory();\n"],"mappings":";;;;;;;;;;AAIA,MAAa,IAAI,IAAIA"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["EndpointFactory"],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { Endpoint, type EndpointOutput, type EndpointSchemas } from './Endpoint';\n\nexport const e = new EndpointFactory();\n"],"mappings":";;;;;;;;;;AAIA,MAAa,IAAI,IAAIA"}
|
|
@@ -3,14 +3,14 @@ import "../types-Bp9ysFXd.cjs";
|
|
|
3
3
|
import "../Function-BP58p9Mp.cjs";
|
|
4
4
|
import "../BaseFunctionBuilder-5QCHkchp.cjs";
|
|
5
5
|
import "../FunctionBuilder-BS1KgxA_.cjs";
|
|
6
|
-
import "../index-
|
|
7
|
-
import { Endpoint, EndpointOutput } from "../Endpoint-
|
|
8
|
-
import "../EndpointBuilder-
|
|
9
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
10
|
-
import * as
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
|
+
import { Endpoint, EndpointOutput, EndpointSchemas } from "../Endpoint-XUMNAXYy.cjs";
|
|
8
|
+
import "../EndpointBuilder-t6fVEKBH.cjs";
|
|
9
|
+
import { EndpointFactory } from "../EndpointFactory-DInjHvFR.cjs";
|
|
10
|
+
import * as _geekmidas_logger8 from "@geekmidas/logger";
|
|
11
11
|
|
|
12
12
|
//#region src/endpoints/index.d.ts
|
|
13
|
-
declare const e: EndpointFactory<[], "",
|
|
13
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger8.Logger, unknown, undefined, string>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { Endpoint, EndpointOutput, e };
|
|
15
|
+
export { Endpoint, EndpointOutput, EndpointSchemas, e };
|
|
16
16
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -4,13 +4,13 @@ import "../Function-C98H68DW.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
6
|
import "../index-BXTN4mwI.mjs";
|
|
7
|
-
import { Endpoint, EndpointOutput } from "../Endpoint-
|
|
8
|
-
import "../EndpointBuilder-
|
|
9
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
10
|
-
import * as
|
|
7
|
+
import { Endpoint, EndpointOutput, EndpointSchemas } from "../Endpoint-C7jPJzAH.mjs";
|
|
8
|
+
import "../EndpointBuilder-CFtWQhcv.mjs";
|
|
9
|
+
import { EndpointFactory } from "../EndpointFactory-DBRGrXAy.mjs";
|
|
10
|
+
import * as _geekmidas_logger8 from "@geekmidas/logger";
|
|
11
11
|
|
|
12
12
|
//#region src/endpoints/index.d.ts
|
|
13
|
-
declare const e: EndpointFactory<[], "",
|
|
13
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger8.Logger, unknown, undefined, string>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { Endpoint, EndpointOutput, e };
|
|
15
|
+
export { Endpoint, EndpointOutput, EndpointSchemas, e };
|
|
16
16
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/endpoints/index.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import "../Function-C5mW-38v.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
4
4
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
5
5
|
import "../functions-mM-jcphA.mjs";
|
|
6
|
-
import { Endpoint } from "../Endpoint-
|
|
7
|
-
import "../EndpointBuilder-
|
|
8
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
6
|
+
import { Endpoint } from "../Endpoint-DVEmKo6G.mjs";
|
|
7
|
+
import "../EndpointBuilder-Bhy91l_c.mjs";
|
|
8
|
+
import { EndpointFactory } from "../EndpointFactory-CNz3Wa08.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/endpoints/index.ts
|
|
11
11
|
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 { Endpoint, type EndpointOutput } from './Endpoint';\n\nexport const e = new EndpointFactory();\n"],"mappings":";;;;;;;;;;AAIA,MAAa,IAAI,IAAI"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { Endpoint, type EndpointOutput, type EndpointSchemas } from './Endpoint';\n\nexport const e = new EndpointFactory();\n"],"mappings":";;;;;;;;;;AAIA,MAAa,IAAI,IAAI"}
|
|
@@ -2,5 +2,5 @@ import "../Construct-Bm-PSO2V.cjs";
|
|
|
2
2
|
import { Function, FunctionContext, FunctionHandler } from "../Function-BP58p9Mp.cjs";
|
|
3
3
|
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-5QCHkchp.cjs";
|
|
4
4
|
import { FunctionBuilder } from "../FunctionBuilder-BS1KgxA_.cjs";
|
|
5
|
-
import { f } from "../index-
|
|
5
|
+
import { f } from "../index-BxApEwAF.cjs";
|
|
6
6
|
export { BaseFunctionBuilder, Function, FunctionBuilder, FunctionContext, FunctionHandler, f };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_Endpoint = require('./Endpoint-
|
|
2
|
+
const require_Endpoint = require('./Endpoint-BVZJb4OR.cjs');
|
|
3
3
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
4
4
|
const fast_glob = require_chunk.__toESM(require("fast-glob"));
|
|
5
5
|
|
|
@@ -92,4 +92,4 @@ Object.defineProperty(exports, 'getProjectRoot', {
|
|
|
92
92
|
return getProjectRoot;
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
|
-
//# sourceMappingURL=helpers-
|
|
95
|
+
//# sourceMappingURL=helpers-BSzj2AiQ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-
|
|
1
|
+
{"version":3,"file":"helpers-BSzj2AiQ.cjs","names":["cwd: string","routes: string[]","endpoints: Endpoint<string, HttpMethod, any, any, TServices>[]"],"sources":["../src/endpoints/helpers.ts"],"sourcesContent":["import path from 'node:path';\nimport fg from 'fast-glob';\nimport { Endpoint } from './Endpoint';\n\nimport type { Service } from '@geekmidas/services';\nimport type { HttpMethod } from '../types';\n\n// Re-export utility functions\n\n/**\n * Recursively finds the project root directory by looking for lock files.\n * Traverses up the directory tree until it finds a package manager lock file.\n *\n * @param cwd - The current working directory to start searching from\n * @returns Promise resolving to the absolute path of the project root\n *\n * @example\n * ```typescript\n * const projectRoot = await getProjectRoot(process.cwd());\n * console.log(`Project root: ${projectRoot}`);\n * // Output: Project root: /Users/user/my-project\n * ```\n */\nexport async function getProjectRoot(cwd: string): Promise<string> {\n if (cwd === '/') {\n return cwd;\n }\n\n const stream = fg.stream(\n ['yarn.lock', 'pnpm-lock.yaml', 'package-lock.json', 'deno.lock'],\n { dot: true, cwd },\n );\n\n let isRoot = false;\n\n for await (const _ of stream) {\n isRoot = true;\n break;\n }\n\n if (isRoot) {\n return cwd;\n }\n\n return getProjectRoot(path.resolve(cwd, '..'));\n}\n\n/**\n * Discovers and imports all Endpoint instances from the specified route patterns.\n * Uses fast-glob to find files matching the patterns and extracts exported Endpoints.\n *\n * @template TServices - Array of service types used by the endpoints\n * @param routes - Array of glob patterns to match route files (e.g., ['src/routes/*.ts'])\n * @param cwd - The current working directory to resolve paths from\n * @returns Promise resolving to an array of Endpoint instances found in the matched files\n *\n * @example\n * ```typescript\n * // Find all endpoints in the routes directory\n * const endpoints = await getEndpointsFromRoutes(\n * ['src/routes/**\\/*.ts'],\n * process.cwd()\n * );\n *\n * // Register endpoints with your server\n * for (const endpoint of endpoints) {\n * server.register(endpoint);\n * }\n * ```\n *\n * @remarks\n * - Only exports that are valid Endpoint instances are included\n * - Files are imported dynamically, so they must be valid ES modules\n * - The function filters out non-Endpoint exports automatically\n */\nexport async function getEndpointsFromRoutes<TServices extends Service[]>(\n routes: string[],\n cwd: string,\n): Promise<Endpoint<string, HttpMethod, any, any, TServices>[]> {\n const stream = fg.stream(routes, { cwd });\n\n const endpoints: Endpoint<string, HttpMethod, any, any, TServices>[] = [];\n\n for await (const f of stream) {\n // Resolve the absolute path for the route file\n const routePath = path.resolve(cwd, f.toString());\n // Dynamically import the route module\n const route = await import(routePath);\n\n // Filter exported values to find only Endpoint instances\n const handlers = Object.values(route).filter((value) => {\n return Endpoint.isEndpoint(value);\n }) as unknown as Endpoint<string, HttpMethod, any, any, TServices>[];\n\n endpoints.push(...handlers);\n }\n\n return endpoints;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,eAAsB,eAAeA,KAA8B;AACjE,KAAI,QAAQ,IACV,QAAO;CAGT,MAAM,SAAS,kBAAG,OAChB;EAAC;EAAa;EAAkB;EAAqB;CAAY,GACjE;EAAE,KAAK;EAAM;CAAK,EACnB;CAED,IAAI,SAAS;AAEb,YAAW,MAAM,KAAK,QAAQ;AAC5B,WAAS;AACT;CACD;AAED,KAAI,OACF,QAAO;AAGT,QAAO,eAAe,kBAAK,QAAQ,KAAK,KAAK,CAAC;AAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BD,eAAsB,uBACpBC,QACAD,KAC8D;CAC9D,MAAM,SAAS,kBAAG,OAAO,QAAQ,EAAE,IAAK,EAAC;CAEzC,MAAME,YAAiE,CAAE;AAEzE,YAAW,MAAM,KAAK,QAAQ;EAE5B,MAAM,YAAY,kBAAK,QAAQ,KAAK,EAAE,UAAU,CAAC;EAEjD,MAAM,QAAQ,MAAM,OAAO;EAG3B,MAAM,WAAW,OAAO,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU;AACtD,UAAO,0BAAS,WAAW,MAAM;EAClC,EAAC;AAEF,YAAU,KAAK,GAAG,SAAS;CAC5B;AAED,QAAO;AACR"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Endpoint } from "./Endpoint-
|
|
1
|
+
import { Endpoint } from "./Endpoint-DVEmKo6G.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fg from "fast-glob";
|
|
4
4
|
|
|
@@ -80,4 +80,4 @@ async function getEndpointsFromRoutes(routes, cwd) {
|
|
|
80
80
|
|
|
81
81
|
//#endregion
|
|
82
82
|
export { getEndpointsFromRoutes, getProjectRoot };
|
|
83
|
-
//# sourceMappingURL=helpers-
|
|
83
|
+
//# sourceMappingURL=helpers-C9WBx7ms.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-
|
|
1
|
+
{"version":3,"file":"helpers-C9WBx7ms.mjs","names":["cwd: string","routes: string[]","endpoints: Endpoint<string, HttpMethod, any, any, TServices>[]"],"sources":["../src/endpoints/helpers.ts"],"sourcesContent":["import path from 'node:path';\nimport fg from 'fast-glob';\nimport { Endpoint } from './Endpoint';\n\nimport type { Service } from '@geekmidas/services';\nimport type { HttpMethod } from '../types';\n\n// Re-export utility functions\n\n/**\n * Recursively finds the project root directory by looking for lock files.\n * Traverses up the directory tree until it finds a package manager lock file.\n *\n * @param cwd - The current working directory to start searching from\n * @returns Promise resolving to the absolute path of the project root\n *\n * @example\n * ```typescript\n * const projectRoot = await getProjectRoot(process.cwd());\n * console.log(`Project root: ${projectRoot}`);\n * // Output: Project root: /Users/user/my-project\n * ```\n */\nexport async function getProjectRoot(cwd: string): Promise<string> {\n if (cwd === '/') {\n return cwd;\n }\n\n const stream = fg.stream(\n ['yarn.lock', 'pnpm-lock.yaml', 'package-lock.json', 'deno.lock'],\n { dot: true, cwd },\n );\n\n let isRoot = false;\n\n for await (const _ of stream) {\n isRoot = true;\n break;\n }\n\n if (isRoot) {\n return cwd;\n }\n\n return getProjectRoot(path.resolve(cwd, '..'));\n}\n\n/**\n * Discovers and imports all Endpoint instances from the specified route patterns.\n * Uses fast-glob to find files matching the patterns and extracts exported Endpoints.\n *\n * @template TServices - Array of service types used by the endpoints\n * @param routes - Array of glob patterns to match route files (e.g., ['src/routes/*.ts'])\n * @param cwd - The current working directory to resolve paths from\n * @returns Promise resolving to an array of Endpoint instances found in the matched files\n *\n * @example\n * ```typescript\n * // Find all endpoints in the routes directory\n * const endpoints = await getEndpointsFromRoutes(\n * ['src/routes/**\\/*.ts'],\n * process.cwd()\n * );\n *\n * // Register endpoints with your server\n * for (const endpoint of endpoints) {\n * server.register(endpoint);\n * }\n * ```\n *\n * @remarks\n * - Only exports that are valid Endpoint instances are included\n * - Files are imported dynamically, so they must be valid ES modules\n * - The function filters out non-Endpoint exports automatically\n */\nexport async function getEndpointsFromRoutes<TServices extends Service[]>(\n routes: string[],\n cwd: string,\n): Promise<Endpoint<string, HttpMethod, any, any, TServices>[]> {\n const stream = fg.stream(routes, { cwd });\n\n const endpoints: Endpoint<string, HttpMethod, any, any, TServices>[] = [];\n\n for await (const f of stream) {\n // Resolve the absolute path for the route file\n const routePath = path.resolve(cwd, f.toString());\n // Dynamically import the route module\n const route = await import(routePath);\n\n // Filter exported values to find only Endpoint instances\n const handlers = Object.values(route).filter((value) => {\n return Endpoint.isEndpoint(value);\n }) as unknown as Endpoint<string, HttpMethod, any, any, TServices>[];\n\n endpoints.push(...handlers);\n }\n\n return endpoints;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuBA,eAAsB,eAAeA,KAA8B;AACjE,KAAI,QAAQ,IACV,QAAO;CAGT,MAAM,SAAS,GAAG,OAChB;EAAC;EAAa;EAAkB;EAAqB;CAAY,GACjE;EAAE,KAAK;EAAM;CAAK,EACnB;CAED,IAAI,SAAS;AAEb,YAAW,MAAM,KAAK,QAAQ;AAC5B,WAAS;AACT;CACD;AAED,KAAI,OACF,QAAO;AAGT,QAAO,eAAe,KAAK,QAAQ,KAAK,KAAK,CAAC;AAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BD,eAAsB,uBACpBC,QACAD,KAC8D;CAC9D,MAAM,SAAS,GAAG,OAAO,QAAQ,EAAE,IAAK,EAAC;CAEzC,MAAME,YAAiE,CAAE;AAEzE,YAAW,MAAM,KAAK,QAAQ;EAE5B,MAAM,YAAY,KAAK,QAAQ,KAAK,EAAE,UAAU,CAAC;EAEjD,MAAM,QAAQ,MAAM,OAAO;EAG3B,MAAM,WAAW,OAAO,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU;AACtD,UAAO,SAAS,WAAW,MAAM;EAClC,EAAC;AAEF,YAAU,KAAK,GAAG,SAAS;CAC5B;AAED,QAAO;AACR"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionBuilder } from "./FunctionBuilder-BS1KgxA_.cjs";
|
|
2
|
+
import * as _geekmidas_logger4 from "@geekmidas/logger";
|
|
3
|
+
import * as _geekmidas_schema3 from "@geekmidas/schema";
|
|
4
|
+
|
|
5
|
+
//#region src/functions/index.d.ts
|
|
6
|
+
declare const f: FunctionBuilder<_geekmidas_schema3.ComposableStandardSchema, undefined, [], _geekmidas_logger4.Logger, undefined, string>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { f };
|
|
9
|
+
//# sourceMappingURL=index-BxApEwAF.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require('../Construct-BSEs6uwW.cjs');
|
|
2
|
-
require('../Subscriber-
|
|
3
|
-
const require_SubscriberBuilder = require('../SubscriberBuilder-
|
|
2
|
+
require('../Subscriber-CSt7EOlT.cjs');
|
|
3
|
+
const require_SubscriberBuilder = require('../SubscriberBuilder-RsiOmnwq.cjs');
|
|
4
4
|
|
|
5
5
|
exports.SubscriberBuilder = require_SubscriberBuilder.SubscriberBuilder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../Construct-BbKCIPQm.mjs";
|
|
2
|
-
import "../Subscriber-
|
|
3
|
-
import { SubscriberBuilder } from "../SubscriberBuilder-
|
|
2
|
+
import "../Subscriber-DkCDcTUL.mjs";
|
|
3
|
+
import { SubscriberBuilder } from "../SubscriberBuilder-Bn9Hyi28.mjs";
|
|
4
4
|
|
|
5
5
|
export { SubscriberBuilder };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('../Construct-BSEs6uwW.cjs');
|
|
2
|
-
const require_Subscriber = require('../Subscriber-
|
|
3
|
-
const require_SubscriberBuilder = require('../SubscriberBuilder-
|
|
2
|
+
const require_Subscriber = require('../Subscriber-CSt7EOlT.cjs');
|
|
3
|
+
const require_SubscriberBuilder = require('../SubscriberBuilder-RsiOmnwq.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-Bm-PSO2V.cjs";
|
|
2
2
|
import { Subscriber } from "../Subscriber-BoFm12i_.cjs";
|
|
3
3
|
import { SubscriberBuilder } from "../SubscriberBuilder-DgljKtYu.cjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _geekmidas_logger7 from "@geekmidas/logger";
|
|
5
5
|
|
|
6
6
|
//#region src/subscribers/index.d.ts
|
|
7
|
-
declare const s: SubscriberBuilder<[],
|
|
7
|
+
declare const s: SubscriberBuilder<[], _geekmidas_logger7.Logger, undefined, undefined, string, []>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Subscriber, SubscriberBuilder, s };
|
|
10
10
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../Construct-DdyYENBD.mjs";
|
|
2
2
|
import { Subscriber } from "../Subscriber-BxH6n8zQ.mjs";
|
|
3
3
|
import { SubscriberBuilder } from "../SubscriberBuilder-BpSDPzBz.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _geekmidas_logger5 from "@geekmidas/logger";
|
|
5
5
|
|
|
6
6
|
//#region src/subscribers/index.d.ts
|
|
7
|
-
declare const s: SubscriberBuilder<[],
|
|
7
|
+
declare const s: SubscriberBuilder<[], _geekmidas_logger5.Logger, undefined, undefined, string, []>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Subscriber, SubscriberBuilder, s };
|
|
10
10
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../Construct-BbKCIPQm.mjs";
|
|
2
|
-
import { Subscriber } from "../Subscriber-
|
|
3
|
-
import { SubscriberBuilder } from "../SubscriberBuilder-
|
|
2
|
+
import { Subscriber } from "../Subscriber-DkCDcTUL.mjs";
|
|
3
|
+
import { SubscriberBuilder } from "../SubscriberBuilder-Bn9Hyi28.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": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"@geekmidas/services": "0.0.1",
|
|
71
71
|
"@geekmidas/logger": "0.0.1",
|
|
72
72
|
"@geekmidas/events": "0.0.1",
|
|
73
|
-
"@geekmidas/errors": "0.0.1",
|
|
74
73
|
"@geekmidas/cache": "0.0.7",
|
|
75
|
-
"@geekmidas/rate-limit": "0.1.0"
|
|
74
|
+
"@geekmidas/rate-limit": "0.1.0",
|
|
75
|
+
"@geekmidas/errors": "0.0.1"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/lodash.pick": "~4.4.9",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@middy/core": ">=6.3.1",
|
|
89
89
|
"@types/aws-lambda": ">=8.10.92",
|
|
90
90
|
"hono": ">=4.8.2",
|
|
91
|
-
"@geekmidas/envkit": "0.0.7"
|
|
91
|
+
"@geekmidas/envkit": "~0.0.7"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"ts": "tsc --noEmit --skipLibCheck src/**/*.ts"
|
|
@@ -102,10 +102,18 @@ export class EndpointFactory<
|
|
|
102
102
|
JoinPaths<TBasePath, TPath>,
|
|
103
103
|
TLogger,
|
|
104
104
|
TSession,
|
|
105
|
-
TEventPublisher
|
|
105
|
+
TEventPublisher,
|
|
106
|
+
TEventPublisherServiceName
|
|
106
107
|
> {
|
|
107
108
|
const newBasePath = EndpointFactory.joinPaths(path, this.basePath);
|
|
108
|
-
return new EndpointFactory
|
|
109
|
+
return new EndpointFactory<
|
|
110
|
+
TServices,
|
|
111
|
+
JoinPaths<TBasePath, TPath>,
|
|
112
|
+
TLogger,
|
|
113
|
+
TSession,
|
|
114
|
+
TEventPublisher,
|
|
115
|
+
TEventPublisherServiceName
|
|
116
|
+
>({
|
|
109
117
|
defaultServices: this.defaultServices,
|
|
110
118
|
basePath: newBasePath,
|
|
111
119
|
defaultAuthorizeFn: this.defaultAuthorizeFn,
|
|
@@ -118,8 +126,22 @@ export class EndpointFactory<
|
|
|
118
126
|
// Create a new factory with authorization
|
|
119
127
|
authorize(
|
|
120
128
|
fn: AuthorizeFn<TServices, TLogger, TSession>,
|
|
121
|
-
): EndpointFactory<
|
|
122
|
-
|
|
129
|
+
): EndpointFactory<
|
|
130
|
+
TServices,
|
|
131
|
+
TBasePath,
|
|
132
|
+
TLogger,
|
|
133
|
+
TSession,
|
|
134
|
+
TEventPublisher,
|
|
135
|
+
TEventPublisherServiceName
|
|
136
|
+
> {
|
|
137
|
+
return new EndpointFactory<
|
|
138
|
+
TServices,
|
|
139
|
+
TBasePath,
|
|
140
|
+
TLogger,
|
|
141
|
+
TSession,
|
|
142
|
+
TEventPublisher,
|
|
143
|
+
TEventPublisherServiceName
|
|
144
|
+
>({
|
|
123
145
|
defaultServices: this.defaultServices,
|
|
124
146
|
basePath: this.basePath,
|
|
125
147
|
defaultAuthorizeFn: fn,
|
|
@@ -137,14 +159,16 @@ export class EndpointFactory<
|
|
|
137
159
|
TBasePath,
|
|
138
160
|
TLogger,
|
|
139
161
|
TSession,
|
|
140
|
-
TEventPublisher
|
|
162
|
+
TEventPublisher,
|
|
163
|
+
TEventPublisherServiceName
|
|
141
164
|
> {
|
|
142
165
|
return new EndpointFactory<
|
|
143
166
|
[...S, ...TServices],
|
|
144
167
|
TBasePath,
|
|
145
168
|
TLogger,
|
|
146
169
|
TSession,
|
|
147
|
-
TEventPublisher
|
|
170
|
+
TEventPublisher,
|
|
171
|
+
TEventPublisherServiceName
|
|
148
172
|
>({
|
|
149
173
|
defaultServices: [...services, ...this.defaultServices],
|
|
150
174
|
basePath: this.basePath,
|
|
@@ -157,14 +181,34 @@ export class EndpointFactory<
|
|
|
157
181
|
|
|
158
182
|
logger<L extends Logger>(
|
|
159
183
|
logger: L,
|
|
160
|
-
): EndpointFactory<
|
|
161
|
-
|
|
184
|
+
): EndpointFactory<
|
|
185
|
+
TServices,
|
|
186
|
+
TBasePath,
|
|
187
|
+
L,
|
|
188
|
+
TSession,
|
|
189
|
+
TEventPublisher,
|
|
190
|
+
TEventPublisherServiceName
|
|
191
|
+
> {
|
|
192
|
+
return new EndpointFactory<
|
|
193
|
+
TServices,
|
|
194
|
+
TBasePath,
|
|
195
|
+
L,
|
|
196
|
+
TSession,
|
|
197
|
+
TEventPublisher,
|
|
198
|
+
TEventPublisherServiceName
|
|
199
|
+
>({
|
|
162
200
|
defaultServices: this.defaultServices,
|
|
163
201
|
basePath: this.basePath,
|
|
164
|
-
defaultAuthorizeFn: this.defaultAuthorizeFn
|
|
202
|
+
defaultAuthorizeFn: this.defaultAuthorizeFn as unknown as AuthorizeFn<
|
|
203
|
+
TServices,
|
|
204
|
+
L,
|
|
205
|
+
TSession
|
|
206
|
+
>,
|
|
165
207
|
defaultLogger: logger,
|
|
166
|
-
defaultSessionExtractor: this
|
|
167
|
-
|
|
208
|
+
defaultSessionExtractor: this
|
|
209
|
+
.defaultSessionExtractor as unknown as SessionFn<TServices, L, TSession>,
|
|
210
|
+
defaultEventPublisher: this.defaultEventPublisher,
|
|
211
|
+
});
|
|
168
212
|
}
|
|
169
213
|
|
|
170
214
|
publisher<
|
|
@@ -172,8 +216,15 @@ export class EndpointFactory<
|
|
|
172
216
|
TServiceName extends string = string,
|
|
173
217
|
>(
|
|
174
218
|
publisher: Service<TServiceName, T>,
|
|
175
|
-
): EndpointFactory<TServices, TBasePath, TLogger, TSession, T> {
|
|
176
|
-
return new EndpointFactory<
|
|
219
|
+
): EndpointFactory<TServices, TBasePath, TLogger, TSession, T, TServiceName> {
|
|
220
|
+
return new EndpointFactory<
|
|
221
|
+
TServices,
|
|
222
|
+
TBasePath,
|
|
223
|
+
TLogger,
|
|
224
|
+
TSession,
|
|
225
|
+
T,
|
|
226
|
+
TServiceName
|
|
227
|
+
>({
|
|
177
228
|
defaultServices: this.defaultServices,
|
|
178
229
|
basePath: this.basePath,
|
|
179
230
|
defaultAuthorizeFn: this.defaultAuthorizeFn,
|
|
@@ -183,15 +234,34 @@ export class EndpointFactory<
|
|
|
183
234
|
});
|
|
184
235
|
}
|
|
185
236
|
|
|
186
|
-
session<T>(
|
|
187
|
-
|
|
237
|
+
session<T>(
|
|
238
|
+
session: SessionFn<TServices, TLogger, T>,
|
|
239
|
+
): EndpointFactory<
|
|
240
|
+
TServices,
|
|
241
|
+
TBasePath,
|
|
242
|
+
TLogger,
|
|
243
|
+
T,
|
|
244
|
+
TEventPublisher,
|
|
245
|
+
TEventPublisherServiceName
|
|
246
|
+
> {
|
|
247
|
+
return new EndpointFactory<
|
|
248
|
+
TServices,
|
|
249
|
+
TBasePath,
|
|
250
|
+
TLogger,
|
|
251
|
+
T,
|
|
252
|
+
TEventPublisher,
|
|
253
|
+
TEventPublisherServiceName
|
|
254
|
+
>({
|
|
188
255
|
defaultServices: this.defaultServices,
|
|
189
256
|
basePath: this.basePath,
|
|
190
|
-
|
|
191
|
-
|
|
257
|
+
defaultAuthorizeFn: this.defaultAuthorizeFn as unknown as AuthorizeFn<
|
|
258
|
+
TServices,
|
|
259
|
+
TLogger,
|
|
260
|
+
T
|
|
261
|
+
>,
|
|
192
262
|
defaultLogger: this.defaultLogger,
|
|
193
263
|
defaultSessionExtractor: session,
|
|
194
|
-
defaultEventPublisher: this.defaultEventPublisher
|
|
264
|
+
defaultEventPublisher: this.defaultEventPublisher,
|
|
195
265
|
});
|
|
196
266
|
}
|
|
197
267
|
|
package/src/endpoints/index.ts
CHANGED