@geekmidas/constructs 0.0.4 → 0.0.6
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/{Cron-DF1o3U_T.cjs → Cron-D6MyCqby.cjs} +1 -1
- package/dist/{Cron-DF1o3U_T.cjs.map → Cron-D6MyCqby.cjs.map} +1 -1
- package/dist/{Cron-Br2TtpGY.mjs → Cron-z0RiwSnT.mjs} +1 -1
- package/dist/{Cron-Br2TtpGY.mjs.map → Cron-z0RiwSnT.mjs.map} +1 -1
- package/dist/{CronBuilder-DNFHMTSl.mjs → CronBuilder-BLTgwOWp.mjs} +2 -2
- package/dist/{CronBuilder-DNFHMTSl.mjs.map → CronBuilder-BLTgwOWp.mjs.map} +1 -1
- package/dist/{CronBuilder-e8CAOwBV.cjs → CronBuilder-BOsYnZIm.cjs} +2 -2
- package/dist/{CronBuilder-e8CAOwBV.cjs.map → CronBuilder-BOsYnZIm.cjs.map} +1 -1
- package/dist/{EndpointBuilder-FJktpPOu.cjs → EndpointBuilder-DUE8ETVR.cjs} +1 -1
- package/dist/{EndpointBuilder-FJktpPOu.cjs.map → EndpointBuilder-DUE8ETVR.cjs.map} +1 -1
- package/dist/{EndpointBuilder-oXO_ka1-.mjs → EndpointBuilder-DpmUw--c.mjs} +1 -1
- package/dist/{EndpointBuilder-oXO_ka1-.mjs.map → EndpointBuilder-DpmUw--c.mjs.map} +1 -1
- package/dist/{EndpointFactory-eG8bDhOh.mjs → EndpointFactory-CuJUCyvZ.mjs} +2 -2
- package/dist/{EndpointFactory-eG8bDhOh.mjs.map → EndpointFactory-CuJUCyvZ.mjs.map} +1 -1
- package/dist/{EndpointFactory-Kk1tpifs.cjs → EndpointFactory-YAR24M2i.cjs} +2 -2
- package/dist/{EndpointFactory-Kk1tpifs.cjs.map → EndpointFactory-YAR24M2i.cjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-BJgpbMUG.d.cts → HonoEndpointAdaptor-CGSqpnCD.d.cts} +3 -3
- package/dist/adaptors/aws.d.cts +1 -1
- package/dist/adaptors/aws.d.mts +1 -1
- package/dist/adaptors/hono.d.cts +2 -2
- package/dist/adaptors/hono.d.mts +1 -1
- package/dist/adaptors/testing.d.cts +1 -1
- package/dist/adaptors/testing.d.mts +1 -1
- package/dist/crons/Cron.cjs +1 -1
- package/dist/crons/Cron.d.cts +1 -1
- package/dist/crons/Cron.d.mts +1 -1
- package/dist/crons/Cron.mjs +1 -1
- package/dist/crons/CronBuilder.cjs +2 -2
- package/dist/crons/CronBuilder.d.cts +1 -1
- package/dist/crons/CronBuilder.d.mts +1 -1
- package/dist/crons/CronBuilder.mjs +2 -2
- package/dist/crons/index.cjs +2 -2
- package/dist/crons/index.d.cts +5 -5
- package/dist/crons/index.d.mts +5 -5
- package/dist/crons/index.mjs +2 -2
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/Endpoint.d.cts +1 -1
- package/dist/endpoints/Endpoint.d.mts +1 -1
- package/dist/endpoints/EndpointBuilder.cjs +1 -1
- package/dist/endpoints/EndpointBuilder.d.cts +1 -1
- package/dist/endpoints/EndpointBuilder.d.mts +1 -1
- package/dist/endpoints/EndpointBuilder.mjs +1 -1
- package/dist/endpoints/EndpointFactory.cjs +2 -2
- package/dist/endpoints/EndpointFactory.d.cts +1 -1
- package/dist/endpoints/EndpointFactory.d.mts +1 -1
- package/dist/endpoints/EndpointFactory.mjs +2 -2
- package/dist/endpoints/HonoEndpointAdaptor.d.cts +2 -2
- package/dist/endpoints/HonoEndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/TestEndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/TestEndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/helpers.d.cts +1 -1
- package/dist/endpoints/helpers.d.mts +1 -1
- package/dist/endpoints/index.cjs +4 -2
- package/dist/endpoints/index.cjs.map +1 -1
- package/dist/endpoints/index.d.cts +6 -6
- 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/functions/index.d.mts +1 -1
- package/dist/index-BXTN4mwI.d.mts +9 -0
- package/dist/index-BxApEwAF.d.cts +9 -0
- package/dist/subscribers/index.d.mts +2 -2
- package/package.json +6 -7
- package/src/endpoints/index.ts +9 -1
- package/test.ts +92 -0
- package/dist/index-BjB0W_Wq.d.mts +0 -9
- package/dist/index-D9vqHZie.d.cts +0 -9
|
@@ -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 "../Cron-
|
|
7
|
-
import { CronBuilder } from "../CronBuilder-
|
|
6
|
+
import "../Cron-z0RiwSnT.mjs";
|
|
7
|
+
import { CronBuilder } from "../CronBuilder-BLTgwOWp.mjs";
|
|
8
8
|
|
|
9
9
|
export { CronBuilder };
|
package/dist/crons/index.cjs
CHANGED
|
@@ -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
|
-
const require_Cron = require('../Cron-
|
|
7
|
-
const require_CronBuilder = require('../CronBuilder-
|
|
6
|
+
const require_Cron = require('../Cron-D6MyCqby.cjs');
|
|
7
|
+
const require_CronBuilder = require('../CronBuilder-BOsYnZIm.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/crons/index.ts
|
|
10
10
|
const c = new require_CronBuilder.CronBuilder();
|
package/dist/crons/index.d.cts
CHANGED
|
@@ -2,15 +2,15 @@ import "../Construct-Bm-PSO2V.cjs";
|
|
|
2
2
|
import "../Function-BP58p9Mp.cjs";
|
|
3
3
|
import "../BaseFunctionBuilder-5QCHkchp.cjs";
|
|
4
4
|
import "../FunctionBuilder-BS1KgxA_.cjs";
|
|
5
|
-
import "../index-
|
|
5
|
+
import "../index-BxApEwAF.cjs";
|
|
6
6
|
import { Cron, CronExpression, RateExpression, ScheduleExpression } from "../Cron-BxMXmn4t.cjs";
|
|
7
7
|
import { CronBuilder } from "../CronBuilder-C6K5AbIO.cjs";
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
8
|
+
import * as _geekmidas_logger8 from "@geekmidas/logger";
|
|
9
|
+
import * as _geekmidas_services7 from "@geekmidas/services";
|
|
10
|
+
import * as _geekmidas_schema6 from "@geekmidas/schema";
|
|
11
11
|
|
|
12
12
|
//#region src/crons/index.d.ts
|
|
13
|
-
declare const c: CronBuilder<
|
|
13
|
+
declare const c: CronBuilder<_geekmidas_schema6.ComposableStandardSchema, _geekmidas_services7.Service<string, unknown>[], _geekmidas_logger8.Logger, undefined, undefined, string>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Cron, CronBuilder, CronExpression, RateExpression, ScheduleExpression, c };
|
|
16
16
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/crons/index.d.mts
CHANGED
|
@@ -2,15 +2,15 @@ import "../Construct-DdyYENBD.mjs";
|
|
|
2
2
|
import "../Function-C98H68DW.mjs";
|
|
3
3
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
4
4
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
5
|
-
import "../index-
|
|
5
|
+
import "../index-BXTN4mwI.mjs";
|
|
6
6
|
import { Cron, CronExpression, RateExpression, ScheduleExpression } from "../Cron-NDBlJhb3.mjs";
|
|
7
7
|
import { CronBuilder } from "../CronBuilder-s5x8V8hH.mjs";
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
8
|
+
import * as _geekmidas_services1 from "@geekmidas/services";
|
|
9
|
+
import * as _geekmidas_logger2 from "@geekmidas/logger";
|
|
10
|
+
import * as _geekmidas_schema0 from "@geekmidas/schema";
|
|
11
11
|
|
|
12
12
|
//#region src/crons/index.d.ts
|
|
13
|
-
declare const c: CronBuilder<
|
|
13
|
+
declare const c: CronBuilder<_geekmidas_schema0.ComposableStandardSchema, _geekmidas_services1.Service<string, unknown>[], _geekmidas_logger2.Logger, undefined, undefined, string>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Cron, CronBuilder, CronExpression, RateExpression, ScheduleExpression, c };
|
|
16
16
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/crons/index.mjs
CHANGED
|
@@ -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 { Cron } from "../Cron-
|
|
7
|
-
import { CronBuilder } from "../CronBuilder-
|
|
6
|
+
import { Cron } from "../Cron-z0RiwSnT.mjs";
|
|
7
|
+
import { CronBuilder } from "../CronBuilder-BLTgwOWp.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/crons/index.ts
|
|
10
10
|
const c = new CronBuilder();
|
|
@@ -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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import { AmazonApiGatewayEndpoint, AmazonApiGatewayEndpointHandlerResponse, AmazonApiGatewayV1EndpointHandler, AmazonApiGatewayV2EndpointHandler, Event, GetInputResponse, HandlerEvent, LoggerContext } from "../AmazonApiGatewayEndpointAdaptor-BFhJ2Rpz.cjs";
|
|
9
9
|
export { AmazonApiGatewayEndpoint, AmazonApiGatewayEndpointHandlerResponse, AmazonApiGatewayV1EndpointHandler, AmazonApiGatewayV2EndpointHandler, Event, GetInputResponse, HandlerEvent, LoggerContext };
|
|
@@ -3,7 +3,7 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import { AmazonApiGatewayEndpoint, AmazonApiGatewayEndpointHandlerResponse, AmazonApiGatewayV1EndpointHandler, AmazonApiGatewayV2EndpointHandler, Event, GetInputResponse, HandlerEvent, LoggerContext } from "../AmazonApiGatewayEndpointAdaptor-BrB3RfbI.mjs";
|
|
9
9
|
export { AmazonApiGatewayEndpoint, AmazonApiGatewayEndpointHandlerResponse, AmazonApiGatewayV1EndpointHandler, AmazonApiGatewayV2EndpointHandler, Event, GetInputResponse, HandlerEvent, LoggerContext };
|
|
@@ -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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import "../AmazonApiGatewayEndpointAdaptor-BFhJ2Rpz.cjs";
|
|
9
9
|
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-Bd-o8ese.cjs";
|
|
@@ -3,7 +3,7 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import "../AmazonApiGatewayEndpointAdaptor-BrB3RfbI.mjs";
|
|
9
9
|
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-BtNXt0-4.mjs";
|
|
@@ -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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import "../AmazonApiGatewayEndpointAdaptor-BFhJ2Rpz.cjs";
|
|
9
9
|
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-DX-Uci5w.cjs";
|
|
@@ -3,7 +3,7 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import "../AmazonApiGatewayEndpointAdaptor-BrB3RfbI.mjs";
|
|
9
9
|
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-DAJdtgek.mjs";
|
|
@@ -3,6 +3,6 @@ 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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
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-XUMNAXYy.cjs";
|
|
8
8
|
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,6 +3,6 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
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-C7jPJzAH.mjs";
|
|
8
8
|
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 };
|
|
@@ -4,6 +4,6 @@ require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
|
4
4
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
5
5
|
require('../functions-DVDb5wEA.cjs');
|
|
6
6
|
require('../Endpoint-COGAflGh.cjs');
|
|
7
|
-
const require_EndpointBuilder = require('../EndpointBuilder-
|
|
7
|
+
const require_EndpointBuilder = require('../EndpointBuilder-DUE8ETVR.cjs');
|
|
8
8
|
|
|
9
9
|
exports.EndpointBuilder = require_EndpointBuilder.EndpointBuilder;
|
|
@@ -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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import { EndpointBuilder } from "../EndpointBuilder-t6fVEKBH.cjs";
|
|
9
9
|
export { EndpointBuilder };
|
|
@@ -3,7 +3,7 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import { EndpointBuilder } from "../EndpointBuilder-CFtWQhcv.mjs";
|
|
9
9
|
export { EndpointBuilder };
|
|
@@ -4,6 +4,6 @@ import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
|
4
4
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
5
5
|
import "../functions-mM-jcphA.mjs";
|
|
6
6
|
import "../Endpoint-DLLZvqoh.mjs";
|
|
7
|
-
import { EndpointBuilder } from "../EndpointBuilder-
|
|
7
|
+
import { EndpointBuilder } from "../EndpointBuilder-DpmUw--c.mjs";
|
|
8
8
|
|
|
9
9
|
export { EndpointBuilder };
|
|
@@ -4,8 +4,8 @@ require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
|
4
4
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
5
5
|
require('../functions-DVDb5wEA.cjs');
|
|
6
6
|
require('../Endpoint-COGAflGh.cjs');
|
|
7
|
-
require('../EndpointBuilder-
|
|
8
|
-
const require_EndpointFactory = require('../EndpointFactory-
|
|
7
|
+
require('../EndpointBuilder-DUE8ETVR.cjs');
|
|
8
|
+
const require_EndpointFactory = require('../EndpointFactory-YAR24M2i.cjs');
|
|
9
9
|
|
|
10
10
|
exports.EndpointFactory = require_EndpointFactory.EndpointFactory;
|
|
11
11
|
exports.e = require_EndpointFactory.e;
|
|
@@ -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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import "../EndpointBuilder-t6fVEKBH.cjs";
|
|
9
9
|
import { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e } from "../EndpointFactory-DInjHvFR.cjs";
|
|
@@ -3,7 +3,7 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import "../EndpointBuilder-CFtWQhcv.mjs";
|
|
9
9
|
import { EndpointFactory, EndpointFactoryOptions, JoinPaths, RemoveTrailingSlash, e } from "../EndpointFactory-DBRGrXAy.mjs";
|
|
@@ -4,7 +4,7 @@ import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
|
4
4
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
5
5
|
import "../functions-mM-jcphA.mjs";
|
|
6
6
|
import "../Endpoint-DLLZvqoh.mjs";
|
|
7
|
-
import "../EndpointBuilder-
|
|
8
|
-
import { EndpointFactory, e } from "../EndpointFactory-
|
|
7
|
+
import "../EndpointBuilder-DpmUw--c.mjs";
|
|
8
|
+
import { EndpointFactory, e } from "../EndpointFactory-CuJUCyvZ.mjs";
|
|
9
9
|
|
|
10
10
|
export { EndpointFactory, e };
|
|
@@ -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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
|
-
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-
|
|
8
|
+
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-CGSqpnCD.cjs";
|
|
9
9
|
export { HonoEndpoint, HonoEndpointOptions };
|
|
@@ -3,7 +3,7 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import { HonoEndpoint, HonoEndpointOptions } from "../HonoEndpointAdaptor-C9Xe2pRp.mjs";
|
|
9
9
|
export { HonoEndpoint, HonoEndpointOptions };
|
|
@@ -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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import { TestEndpointAdaptor, TestRequestAdaptor } from "../TestEndpointAdaptor-v7A-7hTs.cjs";
|
|
9
9
|
export { TestEndpointAdaptor, TestRequestAdaptor };
|
|
@@ -3,7 +3,7 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import { TestEndpointAdaptor, TestRequestAdaptor } from "../TestEndpointAdaptor-Db0cm1fb.mjs";
|
|
9
9
|
export { TestEndpointAdaptor, TestRequestAdaptor };
|
|
@@ -3,7 +3,7 @@ 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-
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
7
|
import { Endpoint } from "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import { Service } from "@geekmidas/services";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { HttpMethod } from "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
7
|
import { Endpoint } from "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import { Service } from "@geekmidas/services";
|
|
9
9
|
|
package/dist/endpoints/index.cjs
CHANGED
|
@@ -4,13 +4,15 @@ require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
|
4
4
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
5
5
|
require('../functions-DVDb5wEA.cjs');
|
|
6
6
|
const require_Endpoint = require('../Endpoint-COGAflGh.cjs');
|
|
7
|
-
require('../EndpointBuilder-
|
|
8
|
-
const require_EndpointFactory = require('../EndpointFactory-
|
|
7
|
+
const require_EndpointBuilder = require('../EndpointBuilder-DUE8ETVR.cjs');
|
|
8
|
+
const require_EndpointFactory = require('../EndpointFactory-YAR24M2i.cjs');
|
|
9
9
|
|
|
10
10
|
//#region src/endpoints/index.ts
|
|
11
11
|
const e = new require_EndpointFactory.EndpointFactory();
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
exports.Endpoint = require_Endpoint.Endpoint;
|
|
15
|
+
exports.EndpointBuilder = require_EndpointBuilder.EndpointBuilder;
|
|
16
|
+
exports.EndpointFactory = require_EndpointFactory.EndpointFactory;
|
|
15
17
|
exports.e = e;
|
|
16
18
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["EndpointFactory"],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { Endpoint
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["EndpointFactory"],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { EndpointFactory } from './EndpointFactory';\nexport {\n Endpoint,\n type EndpointOutput,\n type EndpointSchemas,\n type EndpointHandler,\n type EndpointContext,\n} from './Endpoint';\nexport { EndpointBuilder } from './EndpointBuilder';\n\nexport const e = new EndpointFactory();\n"],"mappings":";;;;;;;;;;AAYA,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, EndpointSchemas } from "../Endpoint-XUMNAXYy.cjs";
|
|
8
|
-
import "../EndpointBuilder-t6fVEKBH.cjs";
|
|
6
|
+
import "../index-BxApEwAF.cjs";
|
|
7
|
+
import { Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas } from "../Endpoint-XUMNAXYy.cjs";
|
|
8
|
+
import { EndpointBuilder } from "../EndpointBuilder-t6fVEKBH.cjs";
|
|
9
9
|
import { EndpointFactory } from "../EndpointFactory-DInjHvFR.cjs";
|
|
10
|
-
import * as
|
|
10
|
+
import * as _geekmidas_logger0 from "@geekmidas/logger";
|
|
11
11
|
|
|
12
12
|
//#region src/endpoints/index.d.ts
|
|
13
|
-
declare const e: EndpointFactory<[], "",
|
|
13
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger0.Logger, unknown, undefined, string>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { Endpoint, EndpointOutput, EndpointSchemas, e };
|
|
15
|
+
export { Endpoint, EndpointBuilder, EndpointContext, EndpointFactory, EndpointHandler, EndpointOutput, EndpointSchemas, e };
|
|
16
16
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -3,14 +3,14 @@ import "../types-CVq20-fE.mjs";
|
|
|
3
3
|
import "../Function-C98H68DW.mjs";
|
|
4
4
|
import "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
5
5
|
import "../FunctionBuilder-DBwR7jg7.mjs";
|
|
6
|
-
import "../index-
|
|
7
|
-
import { Endpoint, EndpointOutput, EndpointSchemas } from "../Endpoint-C7jPJzAH.mjs";
|
|
8
|
-
import "../EndpointBuilder-CFtWQhcv.mjs";
|
|
6
|
+
import "../index-BXTN4mwI.mjs";
|
|
7
|
+
import { Endpoint, EndpointContext, EndpointHandler, EndpointOutput, EndpointSchemas } from "../Endpoint-C7jPJzAH.mjs";
|
|
8
|
+
import { EndpointBuilder } from "../EndpointBuilder-CFtWQhcv.mjs";
|
|
9
9
|
import { EndpointFactory } from "../EndpointFactory-DBRGrXAy.mjs";
|
|
10
|
-
import * as
|
|
10
|
+
import * as _geekmidas_logger5 from "@geekmidas/logger";
|
|
11
11
|
|
|
12
12
|
//#region src/endpoints/index.d.ts
|
|
13
|
-
declare const e: EndpointFactory<[], "",
|
|
13
|
+
declare const e: EndpointFactory<[], "", _geekmidas_logger5.Logger, unknown, undefined, string>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { Endpoint, EndpointOutput, EndpointSchemas, e };
|
|
15
|
+
export { Endpoint, EndpointBuilder, EndpointContext, EndpointFactory, EndpointHandler, EndpointOutput, EndpointSchemas, e };
|
|
16
16
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/endpoints/index.mjs
CHANGED
|
@@ -4,12 +4,12 @@ import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
|
4
4
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
5
5
|
import "../functions-mM-jcphA.mjs";
|
|
6
6
|
import { Endpoint } from "../Endpoint-DLLZvqoh.mjs";
|
|
7
|
-
import "../EndpointBuilder-
|
|
8
|
-
import { EndpointFactory } from "../EndpointFactory-
|
|
7
|
+
import { EndpointBuilder } from "../EndpointBuilder-DpmUw--c.mjs";
|
|
8
|
+
import { EndpointFactory } from "../EndpointFactory-CuJUCyvZ.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/endpoints/index.ts
|
|
11
11
|
const e = new EndpointFactory();
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
|
-
export { Endpoint, e };
|
|
14
|
+
export { Endpoint, EndpointBuilder, EndpointFactory, e };
|
|
15
15
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { Endpoint
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/endpoints/index.ts"],"sourcesContent":["import { EndpointFactory } from './EndpointFactory';\n\nexport { EndpointFactory } from './EndpointFactory';\nexport {\n Endpoint,\n type EndpointOutput,\n type EndpointSchemas,\n type EndpointHandler,\n type EndpointContext,\n} from './Endpoint';\nexport { EndpointBuilder } from './EndpointBuilder';\n\nexport const e = new EndpointFactory();\n"],"mappings":";;;;;;;;;;AAYA,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 };
|
|
@@ -2,5 +2,5 @@ import "../Construct-DdyYENBD.mjs";
|
|
|
2
2
|
import { Function, FunctionContext, FunctionHandler } from "../Function-C98H68DW.mjs";
|
|
3
3
|
import { BaseFunctionBuilder } from "../BaseFunctionBuilder-Dda7AiID.mjs";
|
|
4
4
|
import { FunctionBuilder } from "../FunctionBuilder-DBwR7jg7.mjs";
|
|
5
|
-
import { f } from "../index-
|
|
5
|
+
import { f } from "../index-BXTN4mwI.mjs";
|
|
6
6
|
export { BaseFunctionBuilder, Function, FunctionBuilder, FunctionContext, FunctionHandler, f };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionBuilder } from "./FunctionBuilder-DBwR7jg7.mjs";
|
|
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-BXTN4mwI.d.mts.map
|
|
@@ -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,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_logger6 from "@geekmidas/logger";
|
|
5
5
|
|
|
6
6
|
//#region src/subscribers/index.d.ts
|
|
7
|
-
declare const s: SubscriberBuilder<[],
|
|
7
|
+
declare const s: SubscriberBuilder<[], _geekmidas_logger6.Logger, undefined, undefined, string, []>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Subscriber, SubscriberBuilder, s };
|
|
10
10
|
//# sourceMappingURL=index.d.mts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/constructs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
"lodash.compact": "~3.0.1",
|
|
67
67
|
"openapi-types": "~12.1.3",
|
|
68
68
|
"fast-glob": "~3.3.3",
|
|
69
|
-
"@geekmidas/schema": "0.0.
|
|
70
|
-
"@geekmidas/services": "0.0.1",
|
|
69
|
+
"@geekmidas/schema": "0.0.2",
|
|
71
70
|
"@geekmidas/logger": "0.0.1",
|
|
72
|
-
"@geekmidas/errors": "0.0.1",
|
|
73
71
|
"@geekmidas/cache": "0.0.7",
|
|
74
72
|
"@geekmidas/rate-limit": "0.1.0",
|
|
75
|
-
"@geekmidas/
|
|
73
|
+
"@geekmidas/services": "0.0.1",
|
|
74
|
+
"@geekmidas/errors": "0.0.1",
|
|
75
|
+
"@geekmidas/events": "0.0.2"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/lodash.pick": "~4.4.9",
|
|
@@ -84,11 +84,10 @@
|
|
|
84
84
|
"@geekmidas/testkit": "0.0.16"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@standard-schema/spec": ">=1.0.0",
|
|
88
87
|
"@middy/core": ">=6.3.1",
|
|
89
88
|
"@types/aws-lambda": ">=8.10.92",
|
|
90
89
|
"hono": ">=4.8.2",
|
|
91
|
-
"@geekmidas/envkit": "0.0.7"
|
|
90
|
+
"@geekmidas/envkit": "~0.0.7"
|
|
92
91
|
},
|
|
93
92
|
"scripts": {
|
|
94
93
|
"ts": "tsc --noEmit --skipLibCheck src/**/*.ts"
|
package/src/endpoints/index.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { EndpointFactory } from './EndpointFactory';
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { EndpointFactory } from './EndpointFactory';
|
|
4
|
+
export {
|
|
5
|
+
Endpoint,
|
|
6
|
+
type EndpointOutput,
|
|
7
|
+
type EndpointSchemas,
|
|
8
|
+
type EndpointHandler,
|
|
9
|
+
type EndpointContext,
|
|
10
|
+
} from './Endpoint';
|
|
11
|
+
export { EndpointBuilder } from './EndpointBuilder';
|
|
4
12
|
|
|
5
13
|
export const e = new EndpointFactory();
|
package/test.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { e } from '@geekmidas/constructs/endpoints';
|
|
2
|
+
import { UnauthorizedError } from '@geekmidas/errors';
|
|
3
|
+
import { ConsoleLogger } from '@geekmidas/logger/console';
|
|
4
|
+
import { isValidJWT } from 'zod/v4/core';
|
|
5
|
+
|
|
6
|
+
import type { Cache } from '@geekmidas/cache';
|
|
7
|
+
import { UpstashCache } from '@geekmidas/cache/upstash';
|
|
8
|
+
import type { EnvironmentParser } from '@geekmidas/envkit';
|
|
9
|
+
import type { EventPublisher } from '@geekmidas/events';
|
|
10
|
+
import z4 from 'zod/v4';
|
|
11
|
+
|
|
12
|
+
export type CacheClient = Cache<string>;
|
|
13
|
+
|
|
14
|
+
export class CacheService {
|
|
15
|
+
private static client: CacheClient;
|
|
16
|
+
static serviceName = 'cache' as const;
|
|
17
|
+
|
|
18
|
+
private static config = (envParser: EnvironmentParser<{}>) =>
|
|
19
|
+
envParser.create((get) => ({
|
|
20
|
+
url: get('UPSTASH_URL').string(),
|
|
21
|
+
token: get('UPSTASH_TOKEN').string(),
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
static register(envParser: EnvironmentParser<{}>): CacheClient {
|
|
25
|
+
if (!CacheService.client) {
|
|
26
|
+
const config = this.config(envParser).parse();
|
|
27
|
+
CacheService.client = new UpstashCache(config.url, config.token);
|
|
28
|
+
}
|
|
29
|
+
return CacheService.client;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class EventsService {
|
|
34
|
+
public static instance: ShortstaffEventPublisher;
|
|
35
|
+
static serviceName = 'events' as const;
|
|
36
|
+
|
|
37
|
+
public static config = (envParser: EnvironmentParser<{}>) =>
|
|
38
|
+
envParser.create((get) => ({
|
|
39
|
+
topicArn: get('NOTIFICATION_TOPIC_ARN').string(),
|
|
40
|
+
region: get('AWS_REGION').string(),
|
|
41
|
+
accessKeyId: get('AWS_ACCESS_KEY_ID').string().optional(),
|
|
42
|
+
secretAccessKey: get('AWS_SECRET_ACCESS_KEY').string().optional(),
|
|
43
|
+
endpoint: get('AWS_ENDPOINT_URL').string().optional(),
|
|
44
|
+
}));
|
|
45
|
+
|
|
46
|
+
static register(envParser: EnvironmentParser<{}>): ShortstaffEventPublisher {
|
|
47
|
+
return EventsService.instance;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type ShortstaffEventPublisher = EventPublisher<{
|
|
52
|
+
type: 'user';
|
|
53
|
+
payload: {};
|
|
54
|
+
}>;
|
|
55
|
+
|
|
56
|
+
export const r = e
|
|
57
|
+
.logger(new ConsoleLogger())
|
|
58
|
+
.services([CacheService])
|
|
59
|
+
.publisher(EventsService);
|
|
60
|
+
|
|
61
|
+
export const sessionRouter = r.session(async ({ header, services }) => {
|
|
62
|
+
const authHeader = header('authorization');
|
|
63
|
+
|
|
64
|
+
if (!authHeader || !authHeader.startsWith('Bearer ')) {
|
|
65
|
+
throw new UnauthorizedError('Authorization header required');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const token = authHeader.substring(7);
|
|
69
|
+
|
|
70
|
+
if (!isValidJWT(token)) {
|
|
71
|
+
throw new UnauthorizedError('Invalid token format');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return { token };
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const LoginUserSchema = z4.object({
|
|
78
|
+
username: z4.string().min(3),
|
|
79
|
+
password: z4.string().min(6),
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const LoginResponseSchema = z4.object({
|
|
83
|
+
token: z4.string(),
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export const login = r
|
|
87
|
+
.post('/auth/login')
|
|
88
|
+
.body(LoginUserSchema)
|
|
89
|
+
.output(LoginResponseSchema)
|
|
90
|
+
.handle(async ({ body, services, header }, res) => {
|
|
91
|
+
return { token: 'mock-jwt-token' };
|
|
92
|
+
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FunctionBuilder } from "./FunctionBuilder-DBwR7jg7.mjs";
|
|
2
|
-
import * as _geekmidas_logger5 from "@geekmidas/logger";
|
|
3
|
-
import * as _geekmidas_schema4 from "@geekmidas/schema";
|
|
4
|
-
|
|
5
|
-
//#region src/functions/index.d.ts
|
|
6
|
-
declare const f: FunctionBuilder<_geekmidas_schema4.ComposableStandardSchema, undefined, [], _geekmidas_logger5.Logger, undefined, string>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { f };
|
|
9
|
-
//# sourceMappingURL=index-BjB0W_Wq.d.mts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FunctionBuilder } from "./FunctionBuilder-BS1KgxA_.cjs";
|
|
2
|
-
import * as _geekmidas_logger8 from "@geekmidas/logger";
|
|
3
|
-
import * as _geekmidas_schema7 from "@geekmidas/schema";
|
|
4
|
-
|
|
5
|
-
//#region src/functions/index.d.ts
|
|
6
|
-
declare const f: FunctionBuilder<_geekmidas_schema7.ComposableStandardSchema, undefined, [], _geekmidas_logger8.Logger, undefined, string>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { f };
|
|
9
|
-
//# sourceMappingURL=index-D9vqHZie.d.cts.map
|