@geekmidas/constructs 3.0.1 → 3.0.2
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 +6 -0
- package/dist/{AWSLambdaFunction-BVpc9xFN.cjs → AWSLambdaFunction-CPEAl5nZ.cjs} +2 -2
- package/dist/{AWSLambdaFunction-BVpc9xFN.cjs.map → AWSLambdaFunction-CPEAl5nZ.cjs.map} +1 -1
- package/dist/{AWSLambdaFunction-OPazEPhQ.mjs → AWSLambdaFunction-DJiCAPAf.mjs} +2 -2
- package/dist/{AWSLambdaFunction-OPazEPhQ.mjs.map → AWSLambdaFunction-DJiCAPAf.mjs.map} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-YxZ_z3XG.mjs → AWSLambdaSubscriberAdaptor-RKwKYLl1.mjs} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-YxZ_z3XG.mjs.map → AWSLambdaSubscriberAdaptor-RKwKYLl1.mjs.map} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-BL7Yl1XE.cjs → AWSLambdaSubscriberAdaptor-eZ3qoKvK.cjs} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-BL7Yl1XE.cjs.map → AWSLambdaSubscriberAdaptor-eZ3qoKvK.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayEndpointAdaptor-CQSZArI6.d.mts → AmazonApiGatewayEndpointAdaptor-B30TqZRX.d.mts} +2 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-B30TqZRX.d.mts.map +1 -0
- package/dist/{AmazonApiGatewayEndpointAdaptor-Bxvs-F0F.d.cts → AmazonApiGatewayEndpointAdaptor-D4lAuXA-.d.cts} +2 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-D4lAuXA-.d.cts.map +1 -0
- package/dist/{AmazonApiGatewayEndpointAdaptor-BPxHm8Tg.mjs → AmazonApiGatewayEndpointAdaptor-ciUHVvPX.mjs} +6 -2
- package/dist/AmazonApiGatewayEndpointAdaptor-ciUHVvPX.mjs.map +1 -0
- package/dist/{AmazonApiGatewayEndpointAdaptor-1XyivLJs.cjs → AmazonApiGatewayEndpointAdaptor-jDYqkgFE.cjs} +6 -2
- package/dist/AmazonApiGatewayEndpointAdaptor-jDYqkgFE.cjs.map +1 -0
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-D9zY3nHe.d.cts → AmazonApiGatewayV1EndpointAdaptor-B5xFYauV.d.cts} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-D9zY3nHe.d.cts.map → AmazonApiGatewayV1EndpointAdaptor-B5xFYauV.d.cts.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-xTrFYt48.d.mts → AmazonApiGatewayV1EndpointAdaptor-CG1UJoAK.d.mts} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-xTrFYt48.d.mts.map → AmazonApiGatewayV1EndpointAdaptor-CG1UJoAK.d.mts.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-CQ0dtx1M.mjs → AmazonApiGatewayV1EndpointAdaptor-COLHHAsd.mjs} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-CQ0dtx1M.mjs.map → AmazonApiGatewayV1EndpointAdaptor-COLHHAsd.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Cm2wieNy.cjs → AmazonApiGatewayV1EndpointAdaptor-CW0BCUkm.cjs} +2 -2
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-Cm2wieNy.cjs.map → AmazonApiGatewayV1EndpointAdaptor-CW0BCUkm.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-CjPCxIb1.cjs → AmazonApiGatewayV2EndpointAdaptor-C7ZrwcTX.cjs} +6 -2
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-CjPCxIb1.cjs.map → AmazonApiGatewayV2EndpointAdaptor-C7ZrwcTX.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-DrbEaZ2_.mjs → AmazonApiGatewayV2EndpointAdaptor-Cl9ERGyi.mjs} +6 -2
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-DrbEaZ2_.mjs.map → AmazonApiGatewayV2EndpointAdaptor-Cl9ERGyi.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-CHi3Qe1s.d.cts → AmazonApiGatewayV2EndpointAdaptor-OkwjABOz.d.cts} +4 -3
- package/dist/AmazonApiGatewayV2EndpointAdaptor-OkwjABOz.d.cts.map +1 -0
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-BBayh2_k.d.mts → AmazonApiGatewayV2EndpointAdaptor-ofjuxcPV.d.mts} +4 -3
- package/dist/AmazonApiGatewayV2EndpointAdaptor-ofjuxcPV.d.mts.map +1 -0
- package/dist/{FunctionExecutionWrapper-Ba0Z-iwe.mjs → FunctionExecutionWrapper-B0ZAssiy.mjs} +1 -1
- package/dist/{FunctionExecutionWrapper-Ba0Z-iwe.mjs.map → FunctionExecutionWrapper-B0ZAssiy.mjs.map} +1 -1
- package/dist/{FunctionExecutionWrapper-7B-CufYj.cjs → FunctionExecutionWrapper-KKHP6fDY.cjs} +1 -1
- package/dist/{FunctionExecutionWrapper-7B-CufYj.cjs.map → FunctionExecutionWrapper-KKHP6fDY.cjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-B4NMwHkr.cjs → HonoEndpointAdaptor-CavBd6P2.cjs} +4 -4
- package/dist/{HonoEndpointAdaptor-B4NMwHkr.cjs.map → HonoEndpointAdaptor-CavBd6P2.cjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-CNlb-KGz.mjs → HonoEndpointAdaptor-y9fCIxaz.mjs} +4 -4
- package/dist/{HonoEndpointAdaptor-CNlb-KGz.mjs.map → HonoEndpointAdaptor-y9fCIxaz.mjs.map} +1 -1
- package/dist/{TestEndpointAdaptor-DJdmYxMn.mjs → TestEndpointAdaptor-CDOhCmIk.mjs} +2 -2
- package/dist/{TestEndpointAdaptor-DJdmYxMn.mjs.map → TestEndpointAdaptor-CDOhCmIk.mjs.map} +1 -1
- package/dist/{TestEndpointAdaptor-Bsqn6T0k.cjs → TestEndpointAdaptor-DjQSuxRq.cjs} +2 -2
- package/dist/{TestEndpointAdaptor-Bsqn6T0k.cjs.map → TestEndpointAdaptor-DjQSuxRq.cjs.map} +1 -1
- package/dist/adaptors/aws.cjs +7 -6
- package/dist/adaptors/aws.d.cts +4 -4
- package/dist/adaptors/aws.d.mts +3 -3
- package/dist/adaptors/aws.mjs +7 -6
- package/dist/adaptors/hono.cjs +3 -3
- package/dist/adaptors/hono.d.cts +1 -1
- package/dist/adaptors/hono.mjs +3 -3
- package/dist/adaptors/testing.cjs +2 -2
- package/dist/adaptors/testing.d.cts +1 -1
- 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 +1 -1
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +2 -2
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.mjs +1 -1
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.cjs +2 -2
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +2 -2
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.mjs +2 -2
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.cjs +3 -2
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +2 -2
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.mjs +3 -2
- package/dist/endpoints/Endpoint.d.cts +1 -1
- package/dist/endpoints/EndpointBuilder.d.cts +1 -1
- package/dist/endpoints/EndpointFactory.d.cts +1 -1
- package/dist/endpoints/HonoEndpointAdaptor.cjs +3 -3
- package/dist/endpoints/HonoEndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/HonoEndpointAdaptor.mjs +3 -3
- package/dist/endpoints/TestEndpointAdaptor.cjs +2 -2
- package/dist/endpoints/TestEndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/TestEndpointAdaptor.mjs +2 -2
- package/dist/endpoints/audit.d.cts +1 -1
- package/dist/endpoints/helpers.cjs +1 -1
- package/dist/endpoints/helpers.d.cts +1 -1
- package/dist/endpoints/helpers.mjs +1 -1
- package/dist/endpoints/index.cjs +1 -1
- package/dist/endpoints/index.d.cts +3 -3
- package/dist/endpoints/index.d.mts +2 -2
- package/dist/endpoints/index.mjs +1 -1
- package/dist/endpoints/lazyAccessors.cjs +1 -1
- package/dist/endpoints/lazyAccessors.d.cts +1 -1
- package/dist/endpoints/lazyAccessors.mjs +1 -1
- package/dist/endpoints/processAudits.d.cts +1 -1
- package/dist/endpoints/rls.d.cts +1 -1
- package/dist/functions/AWSLambdaFunction.cjs +2 -2
- package/dist/functions/AWSLambdaFunction.mjs +2 -2
- package/dist/functions/FunctionExecutionWrapper.cjs +1 -1
- package/dist/functions/FunctionExecutionWrapper.mjs +1 -1
- package/dist/functions/index.d.cts +1 -1
- package/dist/{helpers-Ciyi6Aap.cjs → helpers-BYyX0qTA.cjs} +1 -1
- package/dist/{helpers-Ciyi6Aap.cjs.map → helpers-BYyX0qTA.cjs.map} +1 -1
- package/dist/{helpers-C5j_GRBz.mjs → helpers-BtwC2IW8.mjs} +1 -1
- package/dist/{helpers-C5j_GRBz.mjs.map → helpers-BtwC2IW8.mjs.map} +1 -1
- package/dist/index-BRoc67OX.d.cts +12 -0
- package/dist/{index-BfeupgMl.d.cts.map → index-BRoc67OX.d.cts.map} +1 -1
- package/dist/{lazyAccessors-B8Hhras9.cjs → lazyAccessors-BVEtB9lU.cjs} +1 -1
- package/dist/{lazyAccessors-B8Hhras9.cjs.map → lazyAccessors-BVEtB9lU.cjs.map} +1 -1
- package/dist/{lazyAccessors-B-Jgkg2o.mjs → lazyAccessors-DM6HcXQk.mjs} +1 -1
- package/dist/{lazyAccessors-B-Jgkg2o.mjs.map → lazyAccessors-DM6HcXQk.mjs.map} +1 -1
- package/dist/subscribers/AWSLambdaSubscriberAdaptor.cjs +1 -1
- package/dist/subscribers/AWSLambdaSubscriberAdaptor.mjs +1 -1
- package/dist/subscribers/index.d.cts +2 -2
- package/dist/subscribers/index.d.cts.map +1 -1
- package/dist/subscribers/index.d.mts +2 -2
- package/dist/subscribers/index.d.mts.map +1 -1
- package/package.json +8 -8
- package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +6 -1
- package/src/endpoints/AmazonApiGatewayV2EndpointAdaptor.ts +9 -1
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.spec.ts +83 -11
- package/dist/AmazonApiGatewayEndpointAdaptor-1XyivLJs.cjs.map +0 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-BPxHm8Tg.mjs.map +0 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-Bxvs-F0F.d.cts.map +0 -1
- package/dist/AmazonApiGatewayEndpointAdaptor-CQSZArI6.d.mts.map +0 -1
- package/dist/AmazonApiGatewayV2EndpointAdaptor-BBayh2_k.d.mts.map +0 -1
- package/dist/AmazonApiGatewayV2EndpointAdaptor-CHi3Qe1s.d.cts.map +0 -1
- package/dist/index-BfeupgMl.d.cts +0 -12
|
@@ -4,9 +4,9 @@ import "../telemetry-BTaiRqPo.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
5
5
|
import "../Function-CwlB89lS.cjs";
|
|
6
6
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
7
|
-
import "../index-
|
|
7
|
+
import "../index-BRoc67OX.cjs";
|
|
8
8
|
import "../Authorizer-DWtwC8we.cjs";
|
|
9
9
|
import "../Endpoint-C9N6CmvB.cjs";
|
|
10
|
-
import "../AmazonApiGatewayEndpointAdaptor-
|
|
11
|
-
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-
|
|
10
|
+
import "../AmazonApiGatewayEndpointAdaptor-D4lAuXA-.cjs";
|
|
11
|
+
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-B5xFYauV.cjs";
|
|
12
12
|
export { AmazonApiGatewayV1Endpoint };
|
|
@@ -7,6 +7,6 @@ import "../FunctionBuilder-m5BNA2Ap.mjs";
|
|
|
7
7
|
import "../index-_5DYCNAt.mjs";
|
|
8
8
|
import "../Authorizer-DBsrDTuf.mjs";
|
|
9
9
|
import "../Endpoint-BiPM0glm.mjs";
|
|
10
|
-
import "../AmazonApiGatewayEndpointAdaptor-
|
|
11
|
-
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-
|
|
10
|
+
import "../AmazonApiGatewayEndpointAdaptor-B30TqZRX.mjs";
|
|
11
|
+
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-CG1UJoAK.mjs";
|
|
12
12
|
export { AmazonApiGatewayV1Endpoint };
|
|
@@ -6,8 +6,8 @@ import "../FunctionBuilder-CBeqX18X.mjs";
|
|
|
6
6
|
import "../functions-B1mrMoUH.mjs";
|
|
7
7
|
import "../Endpoint-DvY3aqAy.mjs";
|
|
8
8
|
import "../processAudits-Dj8UGqcW.mjs";
|
|
9
|
-
import "../AmazonApiGatewayEndpointAdaptor-
|
|
9
|
+
import "../AmazonApiGatewayEndpointAdaptor-ciUHVvPX.mjs";
|
|
10
10
|
import "../parseQueryParams-UMTRnRrW.mjs";
|
|
11
|
-
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-
|
|
11
|
+
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-COLHHAsd.mjs";
|
|
12
12
|
|
|
13
13
|
export { AmazonApiGatewayV1Endpoint };
|
|
@@ -6,8 +6,9 @@ require('../FunctionBuilder-C_xG9As7.cjs');
|
|
|
6
6
|
require('../functions-rOD3pXQd.cjs');
|
|
7
7
|
require('../Endpoint-BcxvF4F3.cjs');
|
|
8
8
|
require('../processAudits-CzHkPokQ.cjs');
|
|
9
|
-
require('../AmazonApiGatewayEndpointAdaptor-
|
|
9
|
+
require('../AmazonApiGatewayEndpointAdaptor-jDYqkgFE.cjs');
|
|
10
10
|
require('../parseQueryParams-BSNkjmZ9.cjs');
|
|
11
|
-
|
|
11
|
+
require('../lazyAccessors-BVEtB9lU.cjs');
|
|
12
|
+
const require_AmazonApiGatewayV2EndpointAdaptor = require('../AmazonApiGatewayV2EndpointAdaptor-C7ZrwcTX.cjs');
|
|
12
13
|
|
|
13
14
|
exports.AmazonApiGatewayV2Endpoint = require_AmazonApiGatewayV2EndpointAdaptor.AmazonApiGatewayV2Endpoint;
|
|
@@ -4,9 +4,9 @@ import "../telemetry-BTaiRqPo.cjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
5
5
|
import "../Function-CwlB89lS.cjs";
|
|
6
6
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
7
|
-
import "../index-
|
|
7
|
+
import "../index-BRoc67OX.cjs";
|
|
8
8
|
import "../Authorizer-DWtwC8we.cjs";
|
|
9
9
|
import "../Endpoint-C9N6CmvB.cjs";
|
|
10
|
-
import { AmazonApiGatewayEndpointOptions } from "../AmazonApiGatewayEndpointAdaptor-
|
|
11
|
-
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-
|
|
10
|
+
import { AmazonApiGatewayEndpointOptions } from "../AmazonApiGatewayEndpointAdaptor-D4lAuXA-.cjs";
|
|
11
|
+
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-OkwjABOz.cjs";
|
|
12
12
|
export { AmazonApiGatewayEndpointOptions, AmazonApiGatewayV2Endpoint };
|
|
@@ -7,6 +7,6 @@ import "../FunctionBuilder-m5BNA2Ap.mjs";
|
|
|
7
7
|
import "../index-_5DYCNAt.mjs";
|
|
8
8
|
import "../Authorizer-DBsrDTuf.mjs";
|
|
9
9
|
import "../Endpoint-BiPM0glm.mjs";
|
|
10
|
-
import { AmazonApiGatewayEndpointOptions } from "../AmazonApiGatewayEndpointAdaptor-
|
|
11
|
-
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-
|
|
10
|
+
import { AmazonApiGatewayEndpointOptions } from "../AmazonApiGatewayEndpointAdaptor-B30TqZRX.mjs";
|
|
11
|
+
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-ofjuxcPV.mjs";
|
|
12
12
|
export { AmazonApiGatewayEndpointOptions, AmazonApiGatewayV2Endpoint };
|
|
@@ -6,8 +6,9 @@ import "../FunctionBuilder-CBeqX18X.mjs";
|
|
|
6
6
|
import "../functions-B1mrMoUH.mjs";
|
|
7
7
|
import "../Endpoint-DvY3aqAy.mjs";
|
|
8
8
|
import "../processAudits-Dj8UGqcW.mjs";
|
|
9
|
-
import "../AmazonApiGatewayEndpointAdaptor-
|
|
9
|
+
import "../AmazonApiGatewayEndpointAdaptor-ciUHVvPX.mjs";
|
|
10
10
|
import "../parseQueryParams-UMTRnRrW.mjs";
|
|
11
|
-
import
|
|
11
|
+
import "../lazyAccessors-DM6HcXQk.mjs";
|
|
12
|
+
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-Cl9ERGyi.mjs";
|
|
12
13
|
|
|
13
14
|
export { AmazonApiGatewayV2Endpoint };
|
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import { AuthorizeContext, AuthorizeFn, ConvertRouteParams, CookieFn, CookieOptions, Endpoint, EndpointContext, EndpointEvent, EndpointHandler, EndpointHeaders, EndpointInput, EndpointOpenApiSchema, EndpointOptions, EndpointOutput, EndpointSchemas, HeaderFn, MultiHeaderFn, ResponseBuilder, ResponseMetadata, ResponseWithMetadata, SessionContext, SessionFn, SingleHeaderFn, SuccessStatus } from "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
export { AuthorizeContext, AuthorizeFn, ConvertRouteParams, CookieFn, CookieOptions, Endpoint, EndpointContext, EndpointEvent, EndpointHandler, EndpointHeaders, EndpointInput, EndpointOpenApiSchema, EndpointOptions, EndpointOutput, EndpointSchemas, HeaderFn, MultiHeaderFn, ResponseBuilder, ResponseMetadata, ResponseWithMetadata, SessionContext, SessionFn, SingleHeaderFn, SuccessStatus };
|
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
import { EndpointBuilder } from "../EndpointBuilder-Bel6RS7W.cjs";
|
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import { SecurityScheme } from "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
import "../EndpointBuilder-Bel6RS7W.cjs";
|
|
@@ -6,9 +6,9 @@ require('../FunctionBuilder-C_xG9As7.cjs');
|
|
|
6
6
|
require('../functions-rOD3pXQd.cjs');
|
|
7
7
|
require('../Endpoint-BcxvF4F3.cjs');
|
|
8
8
|
require('../processAudits-CzHkPokQ.cjs');
|
|
9
|
-
require('../
|
|
10
|
-
require('../
|
|
9
|
+
require('../lazyAccessors-BVEtB9lU.cjs');
|
|
10
|
+
require('../helpers-BYyX0qTA.cjs');
|
|
11
11
|
require('../parseHonoQuery-D4MhxTRc.cjs');
|
|
12
|
-
const require_HonoEndpointAdaptor = require('../HonoEndpointAdaptor-
|
|
12
|
+
const require_HonoEndpointAdaptor = require('../HonoEndpointAdaptor-CavBd6P2.cjs');
|
|
13
13
|
|
|
14
14
|
exports.HonoEndpoint = require_HonoEndpointAdaptor.HonoEndpoint;
|
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-BCql3gLP.cjs";
|
|
@@ -6,9 +6,9 @@ import "../FunctionBuilder-CBeqX18X.mjs";
|
|
|
6
6
|
import "../functions-B1mrMoUH.mjs";
|
|
7
7
|
import "../Endpoint-DvY3aqAy.mjs";
|
|
8
8
|
import "../processAudits-Dj8UGqcW.mjs";
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
9
|
+
import "../lazyAccessors-DM6HcXQk.mjs";
|
|
10
|
+
import "../helpers-BtwC2IW8.mjs";
|
|
11
11
|
import "../parseHonoQuery-DpK3sGPc.mjs";
|
|
12
|
-
import { HonoEndpoint } from "../HonoEndpointAdaptor-
|
|
12
|
+
import { HonoEndpoint } from "../HonoEndpointAdaptor-y9fCIxaz.mjs";
|
|
13
13
|
|
|
14
14
|
export { HonoEndpoint };
|
|
@@ -6,7 +6,7 @@ require('../FunctionBuilder-C_xG9As7.cjs');
|
|
|
6
6
|
require('../functions-rOD3pXQd.cjs');
|
|
7
7
|
require('../Endpoint-BcxvF4F3.cjs');
|
|
8
8
|
require('../processAudits-CzHkPokQ.cjs');
|
|
9
|
-
require('../lazyAccessors-
|
|
10
|
-
const require_TestEndpointAdaptor = require('../TestEndpointAdaptor-
|
|
9
|
+
require('../lazyAccessors-BVEtB9lU.cjs');
|
|
10
|
+
const require_TestEndpointAdaptor = require('../TestEndpointAdaptor-DjQSuxRq.cjs');
|
|
11
11
|
|
|
12
12
|
exports.TestEndpointAdaptor = require_TestEndpointAdaptor.TestEndpointAdaptor;
|
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
import { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor } from "../TestEndpointAdaptor-CCf3Dg0u.cjs";
|
|
@@ -6,7 +6,7 @@ import "../FunctionBuilder-CBeqX18X.mjs";
|
|
|
6
6
|
import "../functions-B1mrMoUH.mjs";
|
|
7
7
|
import "../Endpoint-DvY3aqAy.mjs";
|
|
8
8
|
import "../processAudits-Dj8UGqcW.mjs";
|
|
9
|
-
import "../lazyAccessors-
|
|
10
|
-
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-
|
|
9
|
+
import "../lazyAccessors-DM6HcXQk.mjs";
|
|
10
|
+
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-CDOhCmIk.mjs";
|
|
11
11
|
|
|
12
12
|
export { TestEndpointAdaptor };
|
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import { ActorExtractor, EndpointAuditorConfig, MappedAudit } from "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
export { ActorExtractor, EndpointAuditorConfig, MappedAudit };
|
|
@@ -4,7 +4,7 @@ require('../Function-DgQ_no6B.cjs');
|
|
|
4
4
|
require('../FunctionBuilder-C_xG9As7.cjs');
|
|
5
5
|
require('../functions-rOD3pXQd.cjs');
|
|
6
6
|
require('../Endpoint-BcxvF4F3.cjs');
|
|
7
|
-
const require_helpers = require('../helpers-
|
|
7
|
+
const require_helpers = require('../helpers-BYyX0qTA.cjs');
|
|
8
8
|
|
|
9
9
|
exports.getEndpointsFromRoutes = require_helpers.getEndpointsFromRoutes;
|
|
10
10
|
exports.getProjectRoot = require_helpers.getProjectRoot;
|
|
@@ -3,7 +3,7 @@ import { HttpMethod } from "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import { Endpoint } from "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
import { Service } from "@geekmidas/services";
|
|
@@ -4,6 +4,6 @@ import "../Function-xfQbftdE.mjs";
|
|
|
4
4
|
import "../FunctionBuilder-CBeqX18X.mjs";
|
|
5
5
|
import "../functions-B1mrMoUH.mjs";
|
|
6
6
|
import "../Endpoint-DvY3aqAy.mjs";
|
|
7
|
-
import { getEndpointsFromRoutes, getProjectRoot } from "../helpers-
|
|
7
|
+
import { getEndpointsFromRoutes, getProjectRoot } from "../helpers-BtwC2IW8.mjs";
|
|
8
8
|
|
|
9
9
|
export { getEndpointsFromRoutes, getProjectRoot };
|
package/dist/endpoints/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ require('../Function-DgQ_no6B.cjs');
|
|
|
5
5
|
require('../FunctionBuilder-C_xG9As7.cjs');
|
|
6
6
|
require('../functions-rOD3pXQd.cjs');
|
|
7
7
|
const require_Endpoint = require('../Endpoint-BcxvF4F3.cjs');
|
|
8
|
-
const require_lazyAccessors = require('../lazyAccessors-
|
|
8
|
+
const require_lazyAccessors = require('../lazyAccessors-BVEtB9lU.cjs');
|
|
9
9
|
const require_Authorizer = require('../Authorizer-Dx57psuM.cjs');
|
|
10
10
|
const require_rls = require('../rls-DxFqdIA0.cjs');
|
|
11
11
|
const require_EndpointBuilder = require('../EndpointBuilder-fXmTxRyW.cjs');
|
|
@@ -3,17 +3,17 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import { Authorizer, BUILT_IN_SECURITY_SCHEMES, BuiltInSecuritySchemeId, OAuthFlow, OAuthFlows, SecurityScheme, createAuthorizer, getSecurityScheme, isBuiltInSecurityScheme } from "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import { ActorExtractor, Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas, MappedAudit, RLS_BYPASS, ResponseBuilder, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
import { EndpointBuilder } from "../EndpointBuilder-Bel6RS7W.cjs";
|
|
10
10
|
import { EndpointFactory } from "../EndpointFactory-CXvakOkn.cjs";
|
|
11
11
|
import { publishConstructEvents } from "../publisher-BrzPGnm4.cjs";
|
|
12
12
|
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-DdZaA716.cjs";
|
|
13
|
-
import * as
|
|
13
|
+
import * as _geekmidas_logger0 from "@geekmidas/logger";
|
|
14
14
|
|
|
15
15
|
//#region src/endpoints/index.d.ts
|
|
16
|
-
declare const e: EndpointFactory<[], "",
|
|
16
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger0.Logger, unknown, undefined, string, readonly string[], undefined, string, never, undefined, string, Record<string, SecurityScheme>, undefined>;
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
@@ -10,10 +10,10 @@ import { EndpointBuilder } from "../EndpointBuilder-B0Aj5jbB.mjs";
|
|
|
10
10
|
import { EndpointFactory } from "../EndpointFactory-CWIeWCRG.mjs";
|
|
11
11
|
import { publishConstructEvents } from "../publisher-CP4gpv-4.mjs";
|
|
12
12
|
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-DXkJpnyX.mjs";
|
|
13
|
-
import * as
|
|
13
|
+
import * as _geekmidas_logger9 from "@geekmidas/logger";
|
|
14
14
|
|
|
15
15
|
//#region src/endpoints/index.d.ts
|
|
16
|
-
declare const e: EndpointFactory<[], "",
|
|
16
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger9.Logger, unknown, undefined, string, readonly string[], undefined, string, never, undefined, string, Record<string, SecurityScheme>, undefined>;
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
18
18
|
|
|
19
19
|
//#endregion
|
package/dist/endpoints/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import "../Function-xfQbftdE.mjs";
|
|
|
5
5
|
import "../FunctionBuilder-CBeqX18X.mjs";
|
|
6
6
|
import "../functions-B1mrMoUH.mjs";
|
|
7
7
|
import { Endpoint, ResponseBuilder } from "../Endpoint-DvY3aqAy.mjs";
|
|
8
|
-
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-
|
|
8
|
+
import { createApiGatewayCookies, createApiGatewayHeaders, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders } from "../lazyAccessors-DM6HcXQk.mjs";
|
|
9
9
|
import { BUILT_IN_SECURITY_SCHEMES, createAuthorizer, getSecurityScheme, isBuiltInSecurityScheme } from "../Authorizer-4unKN3Xn.mjs";
|
|
10
10
|
import { RLS_BYPASS } from "../rls-7XXX7DvY.mjs";
|
|
11
11
|
import { EndpointBuilder } from "../EndpointBuilder-D1RtrBu1.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_lazyAccessors = require('../lazyAccessors-
|
|
1
|
+
const require_lazyAccessors = require('../lazyAccessors-BVEtB9lU.cjs');
|
|
2
2
|
|
|
3
3
|
exports.createApiGatewayCookies = require_lazyAccessors.createApiGatewayCookies;
|
|
4
4
|
exports.createApiGatewayHeaders = require_lazyAccessors.createApiGatewayHeaders;
|
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
import { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders } from "../lazyAccessors-DdZaA716.cjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders } from "../lazyAccessors-
|
|
1
|
+
import { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders } from "../lazyAccessors-DM6HcXQk.mjs";
|
|
2
2
|
|
|
3
3
|
export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
|
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import { CookieFn, Endpoint, HeaderFn } from "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
import { AuditStorage, AuditableAction, Auditor } from "@geekmidas/audit";
|
package/dist/endpoints/rls.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import "../types-B5H3piDg.cjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
4
4
|
import "../Function-CwlB89lS.cjs";
|
|
5
5
|
import "../FunctionBuilder-D_7f5MfS.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BRoc67OX.cjs";
|
|
7
7
|
import "../Authorizer-DWtwC8we.cjs";
|
|
8
8
|
import { RLS_BYPASS, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor } from "../Endpoint-C9N6CmvB.cjs";
|
|
9
9
|
export { RLS_BYPASS, RlsBypass, RlsConfig, RlsContext, RlsContextExtractor };
|
|
@@ -3,7 +3,7 @@ require('../publisher-lFQleddL.cjs');
|
|
|
3
3
|
require('../BaseFunctionBuilder-DXf6HK-N.cjs');
|
|
4
4
|
require('../Function-DgQ_no6B.cjs');
|
|
5
5
|
require('../FunctionBuilder-C_xG9As7.cjs');
|
|
6
|
-
require('../FunctionExecutionWrapper-
|
|
7
|
-
const require_AWSLambdaFunction = require('../AWSLambdaFunction-
|
|
6
|
+
require('../FunctionExecutionWrapper-KKHP6fDY.cjs');
|
|
7
|
+
const require_AWSLambdaFunction = require('../AWSLambdaFunction-CPEAl5nZ.cjs');
|
|
8
8
|
|
|
9
9
|
exports.AWSLambdaFunction = require_AWSLambdaFunction.AWSLambdaFunction;
|
|
@@ -3,7 +3,7 @@ import "../publisher-Bw4770Hi.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C3rQMoWb.mjs";
|
|
4
4
|
import "../Function-xfQbftdE.mjs";
|
|
5
5
|
import "../FunctionBuilder-CBeqX18X.mjs";
|
|
6
|
-
import "../FunctionExecutionWrapper-
|
|
7
|
-
import { AWSLambdaFunction } from "../AWSLambdaFunction-
|
|
6
|
+
import "../FunctionExecutionWrapper-B0ZAssiy.mjs";
|
|
7
|
+
import { AWSLambdaFunction } from "../AWSLambdaFunction-DJiCAPAf.mjs";
|
|
8
8
|
|
|
9
9
|
export { AWSLambdaFunction };
|
|
@@ -3,6 +3,6 @@ require('../publisher-lFQleddL.cjs');
|
|
|
3
3
|
require('../BaseFunctionBuilder-DXf6HK-N.cjs');
|
|
4
4
|
require('../Function-DgQ_no6B.cjs');
|
|
5
5
|
require('../FunctionBuilder-C_xG9As7.cjs');
|
|
6
|
-
const require_FunctionExecutionWrapper = require('../FunctionExecutionWrapper-
|
|
6
|
+
const require_FunctionExecutionWrapper = require('../FunctionExecutionWrapper-KKHP6fDY.cjs');
|
|
7
7
|
|
|
8
8
|
exports.FunctionExecutionWrapper = require_FunctionExecutionWrapper.FunctionExecutionWrapper;
|
|
@@ -3,6 +3,6 @@ import "../publisher-Bw4770Hi.mjs";
|
|
|
3
3
|
import "../BaseFunctionBuilder-C3rQMoWb.mjs";
|
|
4
4
|
import "../Function-xfQbftdE.mjs";
|
|
5
5
|
import "../FunctionBuilder-CBeqX18X.mjs";
|
|
6
|
-
import { FunctionExecutionWrapper } from "../FunctionExecutionWrapper-
|
|
6
|
+
import { FunctionExecutionWrapper } from "../FunctionExecutionWrapper-B0ZAssiy.mjs";
|
|
7
7
|
|
|
8
8
|
export { FunctionExecutionWrapper };
|
|
@@ -2,5 +2,5 @@ import "../Construct-CX7HyFfT.cjs";
|
|
|
2
2
|
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-C-4hYTfj.cjs";
|
|
3
3
|
import { Function, FunctionContext, FunctionHandler } from "../Function-CwlB89lS.cjs";
|
|
4
4
|
import { FunctionBuilder } from "../FunctionBuilder-D_7f5MfS.cjs";
|
|
5
|
-
import { f } from "../index-
|
|
5
|
+
import { f } from "../index-BRoc67OX.cjs";
|
|
6
6
|
export { BaseFunctionBuilder, Function, FunctionBuilder, FunctionContext, FunctionHandler, f };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-
|
|
1
|
+
{"version":3,"file":"helpers-BYyX0qTA.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 type { Service } from '@geekmidas/services';\nimport fg from 'fast-glob';\nimport type { HttpMethod } from '../types';\nimport { Endpoint } from './Endpoint';\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\tif (cwd === '/') {\n\t\treturn cwd;\n\t}\n\n\tconst stream = fg.stream(\n\t\t['yarn.lock', 'pnpm-lock.yaml', 'package-lock.json', 'deno.lock'],\n\t\t{ dot: true, cwd },\n\t);\n\n\tlet isRoot = false;\n\n\tfor await (const _ of stream) {\n\t\tisRoot = true;\n\t\tbreak;\n\t}\n\n\tif (isRoot) {\n\t\treturn cwd;\n\t}\n\n\treturn 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\troutes: string[],\n\tcwd: string,\n): Promise<Endpoint<string, HttpMethod, any, any, TServices>[]> {\n\tconst stream = fg.stream(routes, { cwd });\n\n\tconst endpoints: Endpoint<string, HttpMethod, any, any, TServices>[] = [];\n\n\tfor await (const f of stream) {\n\t\t// Resolve the absolute path for the route file\n\t\tconst routePath = path.resolve(cwd, f.toString());\n\t\t// Dynamically import the route module\n\t\tconst route = await import(routePath);\n\n\t\t// Filter exported values to find only Endpoint instances\n\t\tconst handlers = Object.values(route).filter((value) => {\n\t\t\treturn Endpoint.isEndpoint(value);\n\t\t}) as unknown as Endpoint<string, HttpMethod, any, any, TServices>[];\n\n\t\tendpoints.push(...handlers);\n\t}\n\n\treturn endpoints;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsBA,eAAsB,eAAeA,KAA8B;AAClE,KAAI,QAAQ,IACX,QAAO;CAGR,MAAM,SAAS,kBAAG,OACjB;EAAC;EAAa;EAAkB;EAAqB;CAAY,GACjE;EAAE,KAAK;EAAM;CAAK,EAClB;CAED,IAAI,SAAS;AAEb,YAAW,MAAM,KAAK,QAAQ;AAC7B,WAAS;AACT;CACA;AAED,KAAI,OACH,QAAO;AAGR,QAAO,eAAe,kBAAK,QAAQ,KAAK,KAAK,CAAC;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BD,eAAsB,uBACrBC,QACAD,KAC+D;CAC/D,MAAM,SAAS,kBAAG,OAAO,QAAQ,EAAE,IAAK,EAAC;CAEzC,MAAME,YAAiE,CAAE;AAEzE,YAAW,MAAM,KAAK,QAAQ;EAE7B,MAAM,YAAY,kBAAK,QAAQ,KAAK,EAAE,UAAU,CAAC;EAEjD,MAAM,QAAQ,MAAM,OAAO;EAG3B,MAAM,WAAW,OAAO,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU;AACvD,UAAO,0BAAS,WAAW,MAAM;EACjC,EAAC;AAEF,YAAU,KAAK,GAAG,SAAS;CAC3B;AAED,QAAO;AACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-
|
|
1
|
+
{"version":3,"file":"helpers-BtwC2IW8.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 type { Service } from '@geekmidas/services';\nimport fg from 'fast-glob';\nimport type { HttpMethod } from '../types';\nimport { Endpoint } from './Endpoint';\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\tif (cwd === '/') {\n\t\treturn cwd;\n\t}\n\n\tconst stream = fg.stream(\n\t\t['yarn.lock', 'pnpm-lock.yaml', 'package-lock.json', 'deno.lock'],\n\t\t{ dot: true, cwd },\n\t);\n\n\tlet isRoot = false;\n\n\tfor await (const _ of stream) {\n\t\tisRoot = true;\n\t\tbreak;\n\t}\n\n\tif (isRoot) {\n\t\treturn cwd;\n\t}\n\n\treturn 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\troutes: string[],\n\tcwd: string,\n): Promise<Endpoint<string, HttpMethod, any, any, TServices>[]> {\n\tconst stream = fg.stream(routes, { cwd });\n\n\tconst endpoints: Endpoint<string, HttpMethod, any, any, TServices>[] = [];\n\n\tfor await (const f of stream) {\n\t\t// Resolve the absolute path for the route file\n\t\tconst routePath = path.resolve(cwd, f.toString());\n\t\t// Dynamically import the route module\n\t\tconst route = await import(routePath);\n\n\t\t// Filter exported values to find only Endpoint instances\n\t\tconst handlers = Object.values(route).filter((value) => {\n\t\t\treturn Endpoint.isEndpoint(value);\n\t\t}) as unknown as Endpoint<string, HttpMethod, any, any, TServices>[];\n\n\t\tendpoints.push(...handlers);\n\t}\n\n\treturn endpoints;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,eAAsB,eAAeA,KAA8B;AAClE,KAAI,QAAQ,IACX,QAAO;CAGR,MAAM,SAAS,GAAG,OACjB;EAAC;EAAa;EAAkB;EAAqB;CAAY,GACjE;EAAE,KAAK;EAAM;CAAK,EAClB;CAED,IAAI,SAAS;AAEb,YAAW,MAAM,KAAK,QAAQ;AAC7B,WAAS;AACT;CACA;AAED,KAAI,OACH,QAAO;AAGR,QAAO,eAAe,KAAK,QAAQ,KAAK,KAAK,CAAC;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BD,eAAsB,uBACrBC,QACAD,KAC+D;CAC/D,MAAM,SAAS,GAAG,OAAO,QAAQ,EAAE,IAAK,EAAC;CAEzC,MAAME,YAAiE,CAAE;AAEzE,YAAW,MAAM,KAAK,QAAQ;EAE7B,MAAM,YAAY,KAAK,QAAQ,KAAK,EAAE,UAAU,CAAC;EAEjD,MAAM,QAAQ,MAAM,OAAO;EAG3B,MAAM,WAAW,OAAO,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU;AACvD,UAAO,SAAS,WAAW,MAAM;EACjC,EAAC;AAEF,YAAU,KAAK,GAAG,SAAS;CAC3B;AAED,QAAO;AACP"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionBuilder } from "./FunctionBuilder-D_7f5MfS.cjs";
|
|
2
|
+
import * as _geekmidas_audit10 from "@geekmidas/audit";
|
|
3
|
+
import * as _geekmidas_logger9 from "@geekmidas/logger";
|
|
4
|
+
import * as _geekmidas_schema8 from "@geekmidas/schema";
|
|
5
|
+
|
|
6
|
+
//#region src/functions/index.d.ts
|
|
7
|
+
declare const f: FunctionBuilder<_geekmidas_schema8.ComposableStandardSchema, undefined, [], _geekmidas_logger9.Logger, undefined, string, undefined, string, undefined, string, _geekmidas_audit10.AuditableAction<string, unknown>>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { f };
|
|
12
|
+
//# sourceMappingURL=index-BRoc67OX.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BRoc67OX.d.cts","names":[],"sources":["../src/functions/index.ts"],"sourcesContent":[],"mappings":";;;;;;cAWa,GAAC,gBAAwB,kBAAA,CAAxB,wBAAA,iBAAA,kBAAA,CAAA,MAAA,2DAAA,kBAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyAccessors-B8Hhras9.cjs","names":["c: Context","allHeaders: Record<string, string> | null","key?: string","allCookies: Record<string, string> | null","name?: string","headers: Record<string, string | undefined> | null | undefined","normalizedHeaders: Record<string, string> | null","cookies: string[] | undefined","cookieHeader: string | undefined","parsed: Record<string, string> | null","headers: Record<string, string> | undefined","normalized: Record<string, string> | null"],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":["/**\n * Lazy header and cookie accessors for different adaptors.\n *\n * Instead of parsing all headers/cookies upfront, these accessors\n * use native adaptor methods for single lookups and only parse\n * everything when `header()` or `cookie()` is called without arguments.\n */\nimport type { Context } from 'hono';\nimport { getCookie } from 'hono/cookie';\nimport type { CookieFn, HeaderFn } from './Endpoint';\n\n/**\n * Create a lazy header accessor for Hono.\n * Uses `c.req.header(name)` for single lookups (native, case-insensitive).\n * Only calls `c.req.header()` to get all headers when needed.\n */\nexport function createHonoHeaders(c: Context): HeaderFn {\n\tlet allHeaders: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Single header lookup - use native Hono method (case-insensitive)\n\t\t\treturn c.req.header(key);\n\t\t}\n\t\t// Get all headers - cache the result\n\t\tif (!allHeaders) {\n\t\t\tallHeaders = c.req.header();\n\t\t}\n\t\treturn allHeaders;\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for Hono.\n * Uses `getCookie(c, name)` for single lookups (native).\n * Only parses the cookie header when all cookies are requested.\n */\nexport function createHonoCookies(c: Context): CookieFn {\n\tlet allCookies: Record<string, string> | null = null;\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\t// Single cookie lookup - use native Hono method\n\t\t\treturn getCookie(c, name);\n\t\t}\n\t\t// Get all cookies - parse and cache\n\t\tif (!allCookies) {\n\t\t\tallCookies = {};\n\t\t\tconst cookieHeader = c.req.header('cookie');\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tallCookies[key] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn allCookies;\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for API Gateway events.\n * Handles case-insensitive lookups.\n */\nexport function createApiGatewayHeaders(\n\theaders: Record<string, string | undefined> | null | undefined,\n): HeaderFn {\n\tlet normalizedHeaders: Record<string, string> | null = null;\n\n\tconst normalize = () => {\n\t\tif (!normalizedHeaders) {\n\t\t\tnormalizedHeaders = {};\n\t\t\tif (headers) {\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tif (v !== undefined) {\n\t\t\t\t\t\tnormalizedHeaders[k.toLowerCase()] = v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn normalizedHeaders;\n\t};\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case: headers already lowercase)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t\t// Fall back to normalized lookup\n\t\t\t\treturn normalize()[key.toLowerCase()];\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn normalize();\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for API Gateway events.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createApiGatewayCookies(\n\tcookies: string[] | undefined,\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\t// API Gateway v2 provides cookies as array\n\t\t\tif (cookies) {\n\t\t\t\tfor (const cookie of cookies) {\n\t\t\t\t\tconst eqIndex = cookie.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = cookie.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = cookie.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cookieHeader) {\n\t\t\t\t// Fall back to parsing cookie header\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for plain object headers (test adaptor, etc).\n * Headers are already available as an object, just provide lazy access.\n */\nexport function createObjectHeaders(\n\theaders: Record<string, string> | undefined,\n): HeaderFn {\n\tlet normalized: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t}\n\t\t\t// Fall back to normalized lookup for case-insensitivity\n\t\t\tif (!normalized && headers) {\n\t\t\t\tnormalized = {};\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn normalized?.[key.toLowerCase()];\n\t\t}\n\t\t// Return all headers\n\t\tif (!normalized && headers) {\n\t\t\tnormalized = {};\n\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t}\n\t\t}\n\t\treturn normalized ?? {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor from a cookie header string.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createCookieHeaderAccessor(\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\t// Decode URL-encoded values to match Endpoint.createCookies behavior\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a no-op header accessor (for minimal endpoints that don't use headers).\n */\nexport function createNoopHeaders(): HeaderFn {\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) return undefined;\n\t\treturn {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).\n */\nexport function createNoopCookies(): CookieFn {\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) return undefined;\n\t\treturn {};\n\t}) as CookieFn;\n}\n"],"mappings":";;;;;;;;;AAgBA,SAAgB,kBAAkBA,GAAsB;CACvD,IAAIC,aAA4C;AAEhD,QAAQ,CAACC,QAAiB;AACzB,MAAI,eAEH,QAAO,EAAE,IAAI,OAAO,IAAI;AAGzB,OAAK,WACJ,cAAa,EAAE,IAAI,QAAQ;AAE5B,SAAO;CACP;AACD;;;;;;AAOD,SAAgB,kBAAkBF,GAAsB;CACvD,IAAIG,aAA4C;AAEhD,QAAQ,CAACC,SAAkB;AAC1B,MAAI,gBAEH,QAAO,2BAAU,GAAG,KAAK;AAG1B,OAAK,YAAY;AAChB,gBAAa,CAAE;GACf,MAAM,eAAe,EAAE,IAAI,OAAO,SAAS;AAC3C,OAAI,aACH,MAAK,MAAM,QAAQ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AACD,SAAO;CACP;AAED,QAAQ,CAACL,SAAkB;AAC1B,MAAI,gBACH,QAAO,OAAO,CAAC;AAEhB,SAAO,OAAO;CACd;AACD;;;;AAKD,SAAgB,oBAA8B;AAC7C,QAAQ,CAACF,QAAiB;AACzB,MAAI,eAAmB;AACvB,SAAO,CAAE;CACT;AACD;;;;AAKD,SAAgB,oBAA8B;AAC7C,QAAQ,CAACE,SAAkB;AAC1B,MAAI,gBAAoB;AACxB,SAAO,CAAE;CACT;AACD"}
|
|
1
|
+
{"version":3,"file":"lazyAccessors-BVEtB9lU.cjs","names":["c: Context","allHeaders: Record<string, string> | null","key?: string","allCookies: Record<string, string> | null","name?: string","headers: Record<string, string | undefined> | null | undefined","normalizedHeaders: Record<string, string> | null","cookies: string[] | undefined","cookieHeader: string | undefined","parsed: Record<string, string> | null","headers: Record<string, string> | undefined","normalized: Record<string, string> | null"],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":["/**\n * Lazy header and cookie accessors for different adaptors.\n *\n * Instead of parsing all headers/cookies upfront, these accessors\n * use native adaptor methods for single lookups and only parse\n * everything when `header()` or `cookie()` is called without arguments.\n */\nimport type { Context } from 'hono';\nimport { getCookie } from 'hono/cookie';\nimport type { CookieFn, HeaderFn } from './Endpoint';\n\n/**\n * Create a lazy header accessor for Hono.\n * Uses `c.req.header(name)` for single lookups (native, case-insensitive).\n * Only calls `c.req.header()` to get all headers when needed.\n */\nexport function createHonoHeaders(c: Context): HeaderFn {\n\tlet allHeaders: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Single header lookup - use native Hono method (case-insensitive)\n\t\t\treturn c.req.header(key);\n\t\t}\n\t\t// Get all headers - cache the result\n\t\tif (!allHeaders) {\n\t\t\tallHeaders = c.req.header();\n\t\t}\n\t\treturn allHeaders;\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for Hono.\n * Uses `getCookie(c, name)` for single lookups (native).\n * Only parses the cookie header when all cookies are requested.\n */\nexport function createHonoCookies(c: Context): CookieFn {\n\tlet allCookies: Record<string, string> | null = null;\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\t// Single cookie lookup - use native Hono method\n\t\t\treturn getCookie(c, name);\n\t\t}\n\t\t// Get all cookies - parse and cache\n\t\tif (!allCookies) {\n\t\t\tallCookies = {};\n\t\t\tconst cookieHeader = c.req.header('cookie');\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tallCookies[key] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn allCookies;\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for API Gateway events.\n * Handles case-insensitive lookups.\n */\nexport function createApiGatewayHeaders(\n\theaders: Record<string, string | undefined> | null | undefined,\n): HeaderFn {\n\tlet normalizedHeaders: Record<string, string> | null = null;\n\n\tconst normalize = () => {\n\t\tif (!normalizedHeaders) {\n\t\t\tnormalizedHeaders = {};\n\t\t\tif (headers) {\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tif (v !== undefined) {\n\t\t\t\t\t\tnormalizedHeaders[k.toLowerCase()] = v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn normalizedHeaders;\n\t};\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case: headers already lowercase)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t\t// Fall back to normalized lookup\n\t\t\t\treturn normalize()[key.toLowerCase()];\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn normalize();\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for API Gateway events.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createApiGatewayCookies(\n\tcookies: string[] | undefined,\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\t// API Gateway v2 provides cookies as array\n\t\t\tif (cookies) {\n\t\t\t\tfor (const cookie of cookies) {\n\t\t\t\t\tconst eqIndex = cookie.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = cookie.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = cookie.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cookieHeader) {\n\t\t\t\t// Fall back to parsing cookie header\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for plain object headers (test adaptor, etc).\n * Headers are already available as an object, just provide lazy access.\n */\nexport function createObjectHeaders(\n\theaders: Record<string, string> | undefined,\n): HeaderFn {\n\tlet normalized: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t}\n\t\t\t// Fall back to normalized lookup for case-insensitivity\n\t\t\tif (!normalized && headers) {\n\t\t\t\tnormalized = {};\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn normalized?.[key.toLowerCase()];\n\t\t}\n\t\t// Return all headers\n\t\tif (!normalized && headers) {\n\t\t\tnormalized = {};\n\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t}\n\t\t}\n\t\treturn normalized ?? {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor from a cookie header string.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createCookieHeaderAccessor(\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\t// Decode URL-encoded values to match Endpoint.createCookies behavior\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a no-op header accessor (for minimal endpoints that don't use headers).\n */\nexport function createNoopHeaders(): HeaderFn {\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) return undefined;\n\t\treturn {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).\n */\nexport function createNoopCookies(): CookieFn {\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) return undefined;\n\t\treturn {};\n\t}) as CookieFn;\n}\n"],"mappings":";;;;;;;;;AAgBA,SAAgB,kBAAkBA,GAAsB;CACvD,IAAIC,aAA4C;AAEhD,QAAQ,CAACC,QAAiB;AACzB,MAAI,eAEH,QAAO,EAAE,IAAI,OAAO,IAAI;AAGzB,OAAK,WACJ,cAAa,EAAE,IAAI,QAAQ;AAE5B,SAAO;CACP;AACD;;;;;;AAOD,SAAgB,kBAAkBF,GAAsB;CACvD,IAAIG,aAA4C;AAEhD,QAAQ,CAACC,SAAkB;AAC1B,MAAI,gBAEH,QAAO,2BAAU,GAAG,KAAK;AAG1B,OAAK,YAAY;AAChB,gBAAa,CAAE;GACf,MAAM,eAAe,EAAE,IAAI,OAAO,SAAS;AAC3C,OAAI,aACH,MAAK,MAAM,QAAQ,aAAa,MAAM,IAAI,EAAE;IAC3C,MAAM,UAAU,KAAK,MAAM;IAC3B,MAAM,UAAU,QAAQ,QAAQ,IAAI;AACpC,QAAI,UAAU,GAAG;KAChB,MAAM,MAAM,QAAQ,MAAM,GAAG,QAAQ;KACrC,MAAM,QAAQ,QAAQ,MAAM,UAAU,EAAE;AACxC,gBAAW,OAAO;IAClB;GACD;EAEF;AACD,SAAO;CACP;AACD;;;;;AAMD,SAAgB,wBACfC,SACW;CACX,IAAIC,oBAAmD;CAEvD,MAAM,YAAY,MAAM;AACvB,OAAK,mBAAmB;AACvB,uBAAoB,CAAE;AACtB,OAAI,SACH;SAAK,MAAM,CAAC,GAAG,EAAE,IAAI,OAAO,QAAQ,QAAQ,CAC3C,KAAI,aACH,mBAAkB,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AAc,SAAS;AAC3B,iBAAa,CAAE;AACf,SAAK,MAAM,CAAC,GAAG,EAAE,IAAI,OAAO,QAAQ,QAAQ,CAC3C,YAAW,EAAE,aAAa,IAAI;GAE/B;AACD,UAAO,aAAa,IAAI,aAAa;EACrC;AAED,OAAK,cAAc,SAAS;AAC3B,gBAAa,CAAE;AACf,QAAK,MAAM,CAAC,GAAG,EAAE,IAAI,OAAO,QAAQ,QAAQ,CAC3C,YAAW,EAAE,aAAa,IAAI;EAE/B;AACD,SAAO,cAAc,CAAE;CACvB;AACD;;;;;AAMD,SAAgB,2BACfM,cACW;CACX,IAAIC,SAAwC;CAE5C,MAAM,QAAQ,MAAM;AACnB,OAAK,QAAQ;AACZ,YAAS,CAAE;AACX,OAAI,aACH,MAAK,MAAM,QAAQ,aAAa,MAAM,IAAI,EAAE;IAC3C,MAAM,UAAU,KAAK,MAAM;IAC3B,MAAM,UAAU,QAAQ,QAAQ,IAAI;AACpC,QAAI,UAAU,GAAG;KAChB,MAAM,MAAM,QAAQ,MAAM,GAAG,QAAQ;KACrC,MAAM,QAAQ,QAAQ,MAAM,UAAU,EAAE;AAExC,YAAO,OAAO,mBAAmB,MAAM;IACvC;GACD;EAEF;AACD,SAAO;CACP;AAED,QAAQ,CAACL,SAAkB;AAC1B,MAAI,gBACH,QAAO,OAAO,CAAC;AAEhB,SAAO,OAAO;CACd;AACD;;;;AAKD,SAAgB,oBAA8B;AAC7C,QAAQ,CAACF,QAAiB;AACzB,MAAI,eAAmB;AACvB,SAAO,CAAE;CACT;AACD;;;;AAKD,SAAgB,oBAA8B;AAC7C,QAAQ,CAACE,SAAkB;AAC1B,MAAI,gBAAoB;AACxB,SAAO,CAAE;CACT;AACD"}
|
|
@@ -172,4 +172,4 @@ function createNoopCookies() {
|
|
|
172
172
|
|
|
173
173
|
//#endregion
|
|
174
174
|
export { createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders };
|
|
175
|
-
//# sourceMappingURL=lazyAccessors-
|
|
175
|
+
//# sourceMappingURL=lazyAccessors-DM6HcXQk.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyAccessors-B-Jgkg2o.mjs","names":["c: Context","allHeaders: Record<string, string> | null","key?: string","allCookies: Record<string, string> | null","name?: string","headers: Record<string, string | undefined> | null | undefined","normalizedHeaders: Record<string, string> | null","cookies: string[] | undefined","cookieHeader: string | undefined","parsed: Record<string, string> | null","headers: Record<string, string> | undefined","normalized: Record<string, string> | null"],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":["/**\n * Lazy header and cookie accessors for different adaptors.\n *\n * Instead of parsing all headers/cookies upfront, these accessors\n * use native adaptor methods for single lookups and only parse\n * everything when `header()` or `cookie()` is called without arguments.\n */\nimport type { Context } from 'hono';\nimport { getCookie } from 'hono/cookie';\nimport type { CookieFn, HeaderFn } from './Endpoint';\n\n/**\n * Create a lazy header accessor for Hono.\n * Uses `c.req.header(name)` for single lookups (native, case-insensitive).\n * Only calls `c.req.header()` to get all headers when needed.\n */\nexport function createHonoHeaders(c: Context): HeaderFn {\n\tlet allHeaders: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Single header lookup - use native Hono method (case-insensitive)\n\t\t\treturn c.req.header(key);\n\t\t}\n\t\t// Get all headers - cache the result\n\t\tif (!allHeaders) {\n\t\t\tallHeaders = c.req.header();\n\t\t}\n\t\treturn allHeaders;\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for Hono.\n * Uses `getCookie(c, name)` for single lookups (native).\n * Only parses the cookie header when all cookies are requested.\n */\nexport function createHonoCookies(c: Context): CookieFn {\n\tlet allCookies: Record<string, string> | null = null;\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\t// Single cookie lookup - use native Hono method\n\t\t\treturn getCookie(c, name);\n\t\t}\n\t\t// Get all cookies - parse and cache\n\t\tif (!allCookies) {\n\t\t\tallCookies = {};\n\t\t\tconst cookieHeader = c.req.header('cookie');\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tallCookies[key] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn allCookies;\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for API Gateway events.\n * Handles case-insensitive lookups.\n */\nexport function createApiGatewayHeaders(\n\theaders: Record<string, string | undefined> | null | undefined,\n): HeaderFn {\n\tlet normalizedHeaders: Record<string, string> | null = null;\n\n\tconst normalize = () => {\n\t\tif (!normalizedHeaders) {\n\t\t\tnormalizedHeaders = {};\n\t\t\tif (headers) {\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tif (v !== undefined) {\n\t\t\t\t\t\tnormalizedHeaders[k.toLowerCase()] = v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn normalizedHeaders;\n\t};\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case: headers already lowercase)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t\t// Fall back to normalized lookup\n\t\t\t\treturn normalize()[key.toLowerCase()];\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn normalize();\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for API Gateway events.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createApiGatewayCookies(\n\tcookies: string[] | undefined,\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\t// API Gateway v2 provides cookies as array\n\t\t\tif (cookies) {\n\t\t\t\tfor (const cookie of cookies) {\n\t\t\t\t\tconst eqIndex = cookie.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = cookie.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = cookie.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cookieHeader) {\n\t\t\t\t// Fall back to parsing cookie header\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for plain object headers (test adaptor, etc).\n * Headers are already available as an object, just provide lazy access.\n */\nexport function createObjectHeaders(\n\theaders: Record<string, string> | undefined,\n): HeaderFn {\n\tlet normalized: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t}\n\t\t\t// Fall back to normalized lookup for case-insensitivity\n\t\t\tif (!normalized && headers) {\n\t\t\t\tnormalized = {};\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn normalized?.[key.toLowerCase()];\n\t\t}\n\t\t// Return all headers\n\t\tif (!normalized && headers) {\n\t\t\tnormalized = {};\n\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t}\n\t\t}\n\t\treturn normalized ?? {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor from a cookie header string.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createCookieHeaderAccessor(\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\t// Decode URL-encoded values to match Endpoint.createCookies behavior\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a no-op header accessor (for minimal endpoints that don't use headers).\n */\nexport function createNoopHeaders(): HeaderFn {\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) return undefined;\n\t\treturn {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).\n */\nexport function createNoopCookies(): CookieFn {\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) return undefined;\n\t\treturn {};\n\t}) as CookieFn;\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgB,kBAAkBA,GAAsB;CACvD,IAAIC,aAA4C;AAEhD,QAAQ,CAACC,QAAiB;AACzB,MAAI,eAEH,QAAO,EAAE,IAAI,OAAO,IAAI;AAGzB,OAAK,WACJ,cAAa,EAAE,IAAI,QAAQ;AAE5B,SAAO;CACP;AACD;;;;;;AAOD,SAAgB,kBAAkBF,GAAsB;CACvD,IAAIG,aAA4C;AAEhD,QAAQ,CAACC,SAAkB;AAC1B,MAAI,gBAEH,QAAO,UAAU,GAAG,KAAK;AAG1B,OAAK,YAAY;AAChB,gBAAa,CAAE;GACf,MAAM,eAAe,EAAE,IAAI,OAAO,SAAS;AAC3C,OAAI,aACH,MAAK,MAAM,QAAQ,aAAa,MAAM,IAAI,EAAE;IAC3C,MAAM,UAAU,KAAK,MAAM;IAC3B,MAAM,UAAU,QAAQ,QAAQ,IAAI;AACpC,QAAI,UAAU,GAAG;KAChB,MAAM,MAAM,QAAQ,MAAM,GAAG,QAAQ;KACrC,MAAM,QAAQ,QAAQ,MAAM,UAAU,EAAE;AACxC,gBAAW,OAAO;IAClB;GACD;EAEF;AACD,SAAO;CACP;AACD;;;;;AAMD,SAAgB,wBACfC,SACW;CACX,IAAIC,oBAAmD;CAEvD,MAAM,YAAY,MAAM;AACvB,OAAK,mBAAmB;AACvB,uBAAoB,CAAE;AACtB,OAAI,SACH;SAAK,MAAM,CAAC,GAAG,EAAE,IAAI,OAAO,QAAQ,QAAQ,CAC3C,KAAI,aACH,mBAAkB,EAAE,aAAa,IAAI;GAEtC;EAEF;AACD,SAAO;CACP;AAED,QAAQ,CAACJ,QAAiB;AACzB,MAAI,gBAAmB;AAEtB,OAAI,SAAS;IACZ,MAAM,SAAS,QAAQ,QAAQ,QAAQ,IAAI,aAAa;AACxD,QAAI,kBAAsB,QAAO;A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3B,gBAAa,CAAE;AACf,QAAK,MAAM,CAAC,GAAG,EAAE,IAAI,OAAO,QAAQ,QAAQ,CAC3C,YAAW,EAAE,aAAa,IAAI;EAE/B;AACD,SAAO,cAAc,CAAE;CACvB;AACD;;;;;AAMD,SAAgB,2BACfM,cACW;CACX,IAAIC,SAAwC;CAE5C,MAAM,QAAQ,MAAM;AACnB,OAAK,QAAQ;AACZ,YAAS,CAAE;AACX,OAAI,aACH,MAAK,MAAM,QAAQ,aAAa,MAAM,IAAI,EAAE;IAC3C,MAAM,UAAU,KAAK,MAAM;IAC3B,MAAM,UAAU,QAAQ,QAAQ,IAAI;AACpC,QAAI,UAAU,GAAG;KAChB,MAAM,MAAM,QAAQ,MAAM,GAAG,QAAQ;KACrC,MAAM,QAAQ,QAAQ,MAAM,UAAU,EAAE;AAExC,YAAO,OAAO,mBAAmB,MAAM;IACvC;GACD;EAEF;AACD,SAAO;CACP;AAED,QAAQ,CAACL,SAAkB;AAC1B,MAAI,gBACH,QAAO,OAAO,CAAC;AAEhB,SAAO,OAAO;CACd;AACD;;;;AAKD,SAAgB,oBAA8B;AAC7C,QAAQ,CAACF,QAAiB;AACzB,MAAI,eAAmB;AACvB,SAAO,CAAE;CACT;AACD;;;;AAKD,SAAgB,oBAA8B;AAC7C,QAAQ,CAACE,SAAkB;AAC1B,MAAI,gBAAoB;AACxB,SAAO,CAAE;CACT;AACD"}
|
|
1
|
+
{"version":3,"file":"lazyAccessors-DM6HcXQk.mjs","names":["c: Context","allHeaders: Record<string, string> | null","key?: string","allCookies: Record<string, string> | null","name?: string","headers: Record<string, string | undefined> | null | undefined","normalizedHeaders: Record<string, string> | null","cookies: string[] | undefined","cookieHeader: string | undefined","parsed: Record<string, string> | null","headers: Record<string, string> | undefined","normalized: Record<string, string> | null"],"sources":["../src/endpoints/lazyAccessors.ts"],"sourcesContent":["/**\n * Lazy header and cookie accessors for different adaptors.\n *\n * Instead of parsing all headers/cookies upfront, these accessors\n * use native adaptor methods for single lookups and only parse\n * everything when `header()` or `cookie()` is called without arguments.\n */\nimport type { Context } from 'hono';\nimport { getCookie } from 'hono/cookie';\nimport type { CookieFn, HeaderFn } from './Endpoint';\n\n/**\n * Create a lazy header accessor for Hono.\n * Uses `c.req.header(name)` for single lookups (native, case-insensitive).\n * Only calls `c.req.header()` to get all headers when needed.\n */\nexport function createHonoHeaders(c: Context): HeaderFn {\n\tlet allHeaders: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Single header lookup - use native Hono method (case-insensitive)\n\t\t\treturn c.req.header(key);\n\t\t}\n\t\t// Get all headers - cache the result\n\t\tif (!allHeaders) {\n\t\t\tallHeaders = c.req.header();\n\t\t}\n\t\treturn allHeaders;\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for Hono.\n * Uses `getCookie(c, name)` for single lookups (native).\n * Only parses the cookie header when all cookies are requested.\n */\nexport function createHonoCookies(c: Context): CookieFn {\n\tlet allCookies: Record<string, string> | null = null;\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\t// Single cookie lookup - use native Hono method\n\t\t\treturn getCookie(c, name);\n\t\t}\n\t\t// Get all cookies - parse and cache\n\t\tif (!allCookies) {\n\t\t\tallCookies = {};\n\t\t\tconst cookieHeader = c.req.header('cookie');\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tallCookies[key] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn allCookies;\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for API Gateway events.\n * Handles case-insensitive lookups.\n */\nexport function createApiGatewayHeaders(\n\theaders: Record<string, string | undefined> | null | undefined,\n): HeaderFn {\n\tlet normalizedHeaders: Record<string, string> | null = null;\n\n\tconst normalize = () => {\n\t\tif (!normalizedHeaders) {\n\t\t\tnormalizedHeaders = {};\n\t\t\tif (headers) {\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tif (v !== undefined) {\n\t\t\t\t\t\tnormalizedHeaders[k.toLowerCase()] = v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn normalizedHeaders;\n\t};\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case: headers already lowercase)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t\t// Fall back to normalized lookup\n\t\t\t\treturn normalize()[key.toLowerCase()];\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn normalize();\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor for API Gateway events.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createApiGatewayCookies(\n\tcookies: string[] | undefined,\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\t// API Gateway v2 provides cookies as array\n\t\t\tif (cookies) {\n\t\t\t\tfor (const cookie of cookies) {\n\t\t\t\t\tconst eqIndex = cookie.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = cookie.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = cookie.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cookieHeader) {\n\t\t\t\t// Fall back to parsing cookie header\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a lazy header accessor for plain object headers (test adaptor, etc).\n * Headers are already available as an object, just provide lazy access.\n */\nexport function createObjectHeaders(\n\theaders: Record<string, string> | undefined,\n): HeaderFn {\n\tlet normalized: Record<string, string> | null = null;\n\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) {\n\t\t\t// Try direct lookup first (common case)\n\t\t\tif (headers) {\n\t\t\t\tconst direct = headers[key] ?? headers[key.toLowerCase()];\n\t\t\t\tif (direct !== undefined) return direct;\n\t\t\t}\n\t\t\t// Fall back to normalized lookup for case-insensitivity\n\t\t\tif (!normalized && headers) {\n\t\t\t\tnormalized = {};\n\t\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn normalized?.[key.toLowerCase()];\n\t\t}\n\t\t// Return all headers\n\t\tif (!normalized && headers) {\n\t\t\tnormalized = {};\n\t\t\tfor (const [k, v] of Object.entries(headers)) {\n\t\t\t\tnormalized[k.toLowerCase()] = v;\n\t\t\t}\n\t\t}\n\t\treturn normalized ?? {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a lazy cookie accessor from a cookie header string.\n * Decodes URL-encoded values to match browser behavior.\n */\nexport function createCookieHeaderAccessor(\n\tcookieHeader: string | undefined,\n): CookieFn {\n\tlet parsed: Record<string, string> | null = null;\n\n\tconst parse = () => {\n\t\tif (!parsed) {\n\t\t\tparsed = {};\n\t\t\tif (cookieHeader) {\n\t\t\t\tfor (const part of cookieHeader.split(';')) {\n\t\t\t\t\tconst trimmed = part.trim();\n\t\t\t\t\tconst eqIndex = trimmed.indexOf('=');\n\t\t\t\t\tif (eqIndex > 0) {\n\t\t\t\t\t\tconst key = trimmed.slice(0, eqIndex);\n\t\t\t\t\t\tconst value = trimmed.slice(eqIndex + 1);\n\t\t\t\t\t\t// Decode URL-encoded values to match Endpoint.createCookies behavior\n\t\t\t\t\t\tparsed[key] = decodeURIComponent(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn parsed;\n\t};\n\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) {\n\t\t\treturn parse()[name];\n\t\t}\n\t\treturn parse();\n\t}) as CookieFn;\n}\n\n/**\n * Create a no-op header accessor (for minimal endpoints that don't use headers).\n */\nexport function createNoopHeaders(): HeaderFn {\n\treturn ((key?: string) => {\n\t\tif (key !== undefined) return undefined;\n\t\treturn {};\n\t}) as HeaderFn;\n}\n\n/**\n * Create a no-op cookie accessor (for minimal endpoints that don't use cookies).\n */\nexport function createNoopCookies(): CookieFn {\n\treturn ((name?: string) => {\n\t\tif (name !== undefined) return undefined;\n\t\treturn {};\n\t}) as CookieFn;\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgB,kBAAkBA,GAAsB;CACvD,IAAIC,aAA4C;AAEhD,QAAQ,CAACC,QAAiB;AACzB,MAAI,eAEH,QAAO,EAAE,IAAI,OAAO,IAAI;AAGzB,OAAK,WACJ,cAAa,EAAE,IAAI,QAAQ;AAE5B,SAAO;CACP;AACD;;;;;;AAOD,SAAgB,kBAAkBF,GAAsB;CACvD,IAAIG,aAA4C;AAEhD,QAAQ,CAACC,SAAkB;AAC1B,MAAI,gBAEH,QAAO,UAAU,GAAG,KAAK;AAG1B,OAAK,YAAY;AAChB,gBAAa,CAAE;GACf,M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,MAAM,UAAU,EAAE;AAExC,YAAO,OAAO,mBAAmB,MAAM;IACvC;GACD;EAEF;AACD,SAAO;CACP;AAED,QAAQ,CAACL,SAAkB;AAC1B,MAAI,gBACH,QAAO,OAAO,CAAC;AAEhB,SAAO,OAAO;CACd;AACD;;;;AAKD,SAAgB,oBAA8B;AAC7C,QAAQ,CAACF,QAAiB;AACzB,MAAI,eAAmB;AACvB,SAAO,CAAE;CACT;AACD;;;;AAKD,SAAgB,oBAA8B;AAC7C,QAAQ,CAACE,SAAkB;AAC1B,MAAI,gBAAoB;AACxB,SAAO,CAAE;CACT;AACD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const require_AWSLambdaSubscriberAdaptor = require('../AWSLambdaSubscriberAdaptor-
|
|
1
|
+
const require_AWSLambdaSubscriberAdaptor = require('../AWSLambdaSubscriberAdaptor-eZ3qoKvK.cjs');
|
|
2
2
|
|
|
3
3
|
exports.AWSLambdaSubscriber = require_AWSLambdaSubscriberAdaptor.AWSLambdaSubscriber;
|