@geekmidas/constructs 0.0.5 → 0.0.7
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/{AWSLambdaFunction-nic3vzt3.mjs → AWSLambdaFunction-DWIZYsCy.mjs} +2 -2
- package/dist/{AWSLambdaFunction-nic3vzt3.mjs.map → AWSLambdaFunction-DWIZYsCy.mjs.map} +1 -1
- package/dist/{AWSLambdaFunction-DW9qrBNR.cjs → AWSLambdaFunction-qA5LqPsv.cjs} +2 -2
- package/dist/{AWSLambdaFunction-DW9qrBNR.cjs.map → AWSLambdaFunction-qA5LqPsv.cjs.map} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-ZuQAhW9_.cjs → AWSLambdaSubscriberAdaptor-CmPZ10JF.cjs} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-ZuQAhW9_.cjs.map → AWSLambdaSubscriberAdaptor-CmPZ10JF.cjs.map} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-BhqrpTVc.mjs → AWSLambdaSubscriberAdaptor-G8y3YkWj.mjs} +1 -1
- package/dist/{AWSLambdaSubscriberAdaptor-BhqrpTVc.mjs.map → AWSLambdaSubscriberAdaptor-G8y3YkWj.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayEndpointAdaptor-BEzWkW5m.cjs → AmazonApiGatewayEndpointAdaptor-B8mozTcG.cjs} +3 -3
- package/dist/{AmazonApiGatewayEndpointAdaptor-BEzWkW5m.cjs.map → AmazonApiGatewayEndpointAdaptor-B8mozTcG.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayEndpointAdaptor-CASfHEj9.mjs → AmazonApiGatewayEndpointAdaptor-Bmz6Cy1e.mjs} +3 -3
- package/dist/{AmazonApiGatewayEndpointAdaptor-CASfHEj9.mjs.map → AmazonApiGatewayEndpointAdaptor-Bmz6Cy1e.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-RPnkGENb.mjs → AmazonApiGatewayV1EndpointAdaptor-24g3dLn5.mjs} +3 -3
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-RPnkGENb.mjs.map → AmazonApiGatewayV1EndpointAdaptor-24g3dLn5.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-l1df4rFt.cjs → AmazonApiGatewayV1EndpointAdaptor-D4eZ-fx5.cjs} +3 -3
- package/dist/{AmazonApiGatewayV1EndpointAdaptor-l1df4rFt.cjs.map → AmazonApiGatewayV1EndpointAdaptor-D4eZ-fx5.cjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-C5Ctz7C_.mjs → AmazonApiGatewayV2EndpointAdaptor-Cc40RThv.mjs} +3 -3
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-C5Ctz7C_.mjs.map → AmazonApiGatewayV2EndpointAdaptor-Cc40RThv.mjs.map} +1 -1
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-DH9yJsC8.cjs → AmazonApiGatewayV2EndpointAdaptor-J6tACl-N.cjs} +3 -3
- package/dist/{AmazonApiGatewayV2EndpointAdaptor-DH9yJsC8.cjs.map → AmazonApiGatewayV2EndpointAdaptor-J6tACl-N.cjs.map} +1 -1
- package/dist/{Cron-JYYGj5ik.cjs → Cron-CmZ6esMM.cjs} +1 -1
- package/dist/{Cron-JYYGj5ik.cjs.map → Cron-CmZ6esMM.cjs.map} +1 -1
- package/dist/{Cron-BgJo6EW6.mjs → Cron-D6hnZLk7.mjs} +1 -1
- package/dist/{Cron-BgJo6EW6.mjs.map → Cron-D6hnZLk7.mjs.map} +1 -1
- package/dist/{CronBuilder-DVuhB_kA.mjs → CronBuilder-Dfv5JguE.mjs} +2 -2
- package/dist/{CronBuilder-DVuhB_kA.mjs.map → CronBuilder-Dfv5JguE.mjs.map} +1 -1
- package/dist/{CronBuilder-BDDS21OP.cjs → CronBuilder-Di7QK8Rt.cjs} +2 -2
- package/dist/{CronBuilder-BDDS21OP.cjs.map → CronBuilder-Di7QK8Rt.cjs.map} +1 -1
- package/dist/{Endpoint-BVZJb4OR.cjs → Endpoint-COGAflGh.cjs} +1 -1
- package/dist/{Endpoint-BVZJb4OR.cjs.map → Endpoint-COGAflGh.cjs.map} +1 -1
- package/dist/{Endpoint-DVEmKo6G.mjs → Endpoint-DLLZvqoh.mjs} +1 -1
- package/dist/{Endpoint-DVEmKo6G.mjs.map → Endpoint-DLLZvqoh.mjs.map} +1 -1
- package/dist/{EndpointBuilder-DDnqW7rT.cjs → EndpointBuilder-FJktpPOu.cjs} +2 -2
- package/dist/{EndpointBuilder-DDnqW7rT.cjs.map → EndpointBuilder-FJktpPOu.cjs.map} +1 -1
- package/dist/{EndpointBuilder-Bhy91l_c.mjs → EndpointBuilder-oXO_ka1-.mjs} +2 -2
- package/dist/{EndpointBuilder-Bhy91l_c.mjs.map → EndpointBuilder-oXO_ka1-.mjs.map} +1 -1
- package/dist/{EndpointFactory-Cw_6-53M.cjs → EndpointFactory-Kk1tpifs.cjs} +2 -2
- package/dist/{EndpointFactory-Cw_6-53M.cjs.map → EndpointFactory-Kk1tpifs.cjs.map} +1 -1
- package/dist/{EndpointFactory-CNz3Wa08.mjs → EndpointFactory-eG8bDhOh.mjs} +2 -2
- package/dist/{EndpointFactory-CNz3Wa08.mjs.map → EndpointFactory-eG8bDhOh.mjs.map} +1 -1
- package/dist/{FunctionExecutionWrapper-UzfHDM2R.cjs → FunctionExecutionWrapper-CElXEjPe.cjs} +1 -1
- package/dist/{FunctionExecutionWrapper-UzfHDM2R.cjs.map → FunctionExecutionWrapper-CElXEjPe.cjs.map} +1 -1
- package/dist/{FunctionExecutionWrapper-CPzSbfaI.mjs → FunctionExecutionWrapper-XGrSAAPD.mjs} +1 -1
- package/dist/{FunctionExecutionWrapper-CPzSbfaI.mjs.map → FunctionExecutionWrapper-XGrSAAPD.mjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-Y4AD3E9g.mjs → HonoEndpointAdaptor-BlT1rWHV.mjs} +4 -4
- package/dist/{HonoEndpointAdaptor-Y4AD3E9g.mjs.map → HonoEndpointAdaptor-BlT1rWHV.mjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-OtKS5Dsd.d.cts → HonoEndpointAdaptor-BrbM9vxd.d.cts} +3 -3
- package/dist/{HonoEndpointAdaptor-BY2Ovj31.d.mts → HonoEndpointAdaptor-CxcYKdzT.d.mts} +3 -3
- package/dist/{HonoEndpointAdaptor-BsGMcxYb.cjs → HonoEndpointAdaptor-Ds433Q8w.cjs} +4 -4
- package/dist/{HonoEndpointAdaptor-BsGMcxYb.cjs.map → HonoEndpointAdaptor-Ds433Q8w.cjs.map} +1 -1
- package/dist/{TestEndpointAdaptor-DD3aygPp.mjs → TestEndpointAdaptor-Ct4I-gDo.mjs} +33 -7
- package/dist/TestEndpointAdaptor-Ct4I-gDo.mjs.map +1 -0
- package/dist/{TestEndpointAdaptor-CbNeUT3Y.cjs → TestEndpointAdaptor-FJUob2W_.cjs} +33 -7
- package/dist/TestEndpointAdaptor-FJUob2W_.cjs.map +1 -0
- package/dist/{TestEndpointAdaptor-Db0cm1fb.d.mts → TestEndpointAdaptor-vboVyJ0w.d.mts} +10 -4
- package/dist/{TestEndpointAdaptor-v7A-7hTs.d.cts → TestEndpointAdaptor-wwEaVHAt.d.cts} +10 -4
- package/dist/adaptors/aws.cjs +8 -8
- package/dist/adaptors/aws.d.cts +1 -1
- package/dist/adaptors/aws.d.mts +1 -1
- package/dist/adaptors/aws.mjs +8 -8
- package/dist/adaptors/hono.cjs +4 -4
- package/dist/adaptors/hono.d.cts +2 -2
- package/dist/adaptors/hono.d.mts +2 -2
- package/dist/adaptors/hono.mjs +4 -4
- package/dist/adaptors/testing.cjs +2 -2
- package/dist/adaptors/testing.d.cts +2 -2
- package/dist/adaptors/testing.d.mts +2 -2
- package/dist/adaptors/testing.mjs +2 -2
- 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.cjs +2 -2
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/AmazonApiGatewayEndpointAdaptor.mjs +2 -2
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.cjs +4 -4
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/AmazonApiGatewayV1EndpointAdaptor.mjs +4 -4
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.cjs +4 -4
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.cts +1 -1
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.d.mts +1 -1
- package/dist/endpoints/AmazonApiGatewayV2EndpointAdaptor.mjs +4 -4
- package/dist/endpoints/Endpoint.cjs +1 -1
- package/dist/endpoints/Endpoint.d.cts +1 -1
- package/dist/endpoints/Endpoint.d.mts +1 -1
- package/dist/endpoints/Endpoint.mjs +1 -1
- package/dist/endpoints/EndpointBuilder.cjs +2 -2
- package/dist/endpoints/EndpointBuilder.d.cts +1 -1
- package/dist/endpoints/EndpointBuilder.d.mts +1 -1
- package/dist/endpoints/EndpointBuilder.mjs +2 -2
- package/dist/endpoints/EndpointFactory.cjs +3 -3
- package/dist/endpoints/EndpointFactory.d.cts +1 -1
- package/dist/endpoints/EndpointFactory.d.mts +1 -1
- package/dist/endpoints/EndpointFactory.mjs +3 -3
- package/dist/endpoints/HonoEndpointAdaptor.cjs +4 -4
- package/dist/endpoints/HonoEndpointAdaptor.d.cts +2 -2
- package/dist/endpoints/HonoEndpointAdaptor.d.mts +2 -2
- package/dist/endpoints/HonoEndpointAdaptor.mjs +4 -4
- package/dist/endpoints/TestEndpointAdaptor.cjs +2 -2
- package/dist/endpoints/TestEndpointAdaptor.d.cts +3 -3
- package/dist/endpoints/TestEndpointAdaptor.d.mts +3 -3
- package/dist/endpoints/TestEndpointAdaptor.mjs +2 -2
- package/dist/endpoints/helpers.cjs +2 -2
- package/dist/endpoints/helpers.d.cts +1 -1
- package/dist/endpoints/helpers.d.mts +1 -1
- package/dist/endpoints/helpers.mjs +2 -2
- package/dist/endpoints/index.cjs +5 -3
- 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 +4 -4
- package/dist/endpoints/index.mjs.map +1 -1
- package/dist/endpoints/parseHonoQuery.cjs +1 -1
- package/dist/endpoints/parseHonoQuery.mjs +1 -1
- package/dist/endpoints/parseQueryParams.cjs +1 -1
- package/dist/endpoints/parseQueryParams.mjs +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/functions/index.d.mts +1 -1
- package/dist/{helpers-C9WBx7ms.mjs → helpers-CM0U-4Vk.mjs} +2 -2
- package/dist/{helpers-C9WBx7ms.mjs.map → helpers-CM0U-4Vk.mjs.map} +1 -1
- package/dist/{helpers-BSzj2AiQ.cjs → helpers-go4jiRvV.cjs} +2 -2
- package/dist/{helpers-BSzj2AiQ.cjs.map → helpers-go4jiRvV.cjs.map} +1 -1
- package/dist/index-BGr5gFrX.d.cts +9 -0
- package/dist/index-YM4W9XUq.d.mts +9 -0
- package/dist/{parseHonoQuery-BiPp8bEJ.cjs → parseHonoQuery-DopC24vB.cjs} +1 -1
- package/dist/{parseHonoQuery-BiPp8bEJ.cjs.map → parseHonoQuery-DopC24vB.cjs.map} +1 -1
- package/dist/{parseHonoQuery-yWRoKFFl.mjs → parseHonoQuery-znDKBhdE.mjs} +1 -1
- package/dist/{parseHonoQuery-yWRoKFFl.mjs.map → parseHonoQuery-znDKBhdE.mjs.map} +1 -1
- package/dist/{parseQueryParams-DSk9xl09.mjs → parseQueryParams-BJaRh3OB.mjs} +1 -1
- package/dist/{parseQueryParams-DSk9xl09.mjs.map → parseQueryParams-BJaRh3OB.mjs.map} +1 -1
- package/dist/{parseQueryParams-C2EjouGt.cjs → parseQueryParams-BzPop4I1.cjs} +1 -1
- package/dist/{parseQueryParams-C2EjouGt.cjs.map → parseQueryParams-BzPop4I1.cjs.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/package.json +6 -7
- package/src/endpoints/TestEndpointAdaptor.ts +75 -14
- package/src/endpoints/__tests__/TestEndpointAdaptor.spec.ts +309 -42
- package/src/endpoints/index.ts +9 -1
- package/dist/TestEndpointAdaptor-CbNeUT3Y.cjs.map +0 -1
- package/dist/TestEndpointAdaptor-DD3aygPp.mjs.map +0 -1
- package/dist/index-BXTN4mwI.d.mts +0 -9
- package/dist/index-BxApEwAF.d.cts +0 -9
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import { publishConstructEvents } from "./publisher-Bw4770Hi.mjs";
|
|
2
|
-
import { Endpoint, ResponseBuilder } from "./Endpoint-
|
|
2
|
+
import { Endpoint, ResponseBuilder } from "./Endpoint-DLLZvqoh.mjs";
|
|
3
3
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
4
4
|
import { ServiceDiscovery } from "@geekmidas/services";
|
|
5
5
|
|
|
6
6
|
//#region src/endpoints/TestEndpointAdaptor.ts
|
|
7
|
+
/**
|
|
8
|
+
* Serializes a cookie into a Set-Cookie header string
|
|
9
|
+
*/
|
|
10
|
+
function serializeCookie(name, value, options) {
|
|
11
|
+
let cookieString = `${name}=${value}`;
|
|
12
|
+
if (options) {
|
|
13
|
+
if (options.maxAge !== void 0) cookieString += `; Max-Age=${options.maxAge}`;
|
|
14
|
+
if (options.expires) cookieString += `; Expires=${options.expires.toUTCString()}`;
|
|
15
|
+
if (options.domain) cookieString += `; Domain=${options.domain}`;
|
|
16
|
+
if (options.path) cookieString += `; Path=${options.path}`;
|
|
17
|
+
if (options.httpOnly) cookieString += "; HttpOnly";
|
|
18
|
+
if (options.secure) cookieString += "; Secure";
|
|
19
|
+
if (options.sameSite) cookieString += `; SameSite=${options.sameSite}`;
|
|
20
|
+
}
|
|
21
|
+
return cookieString;
|
|
22
|
+
}
|
|
7
23
|
var TestEndpointAdaptor = class TestEndpointAdaptor {
|
|
8
24
|
static getDefaultServiceDiscover(endpoint) {
|
|
9
25
|
return ServiceDiscovery.getInstance(endpoint.logger, new EnvironmentParser({}));
|
|
@@ -12,7 +28,7 @@ var TestEndpointAdaptor = class TestEndpointAdaptor {
|
|
|
12
28
|
this.endpoint = endpoint;
|
|
13
29
|
this.serviceDiscovery = serviceDiscovery;
|
|
14
30
|
}
|
|
15
|
-
async
|
|
31
|
+
async fullRequest(ctx) {
|
|
16
32
|
const body = await this.endpoint.parseInput(ctx.body, "body");
|
|
17
33
|
const query = await this.endpoint.parseInput(ctx.query, "query");
|
|
18
34
|
const params = await this.endpoint.parseInput(ctx.params, "params");
|
|
@@ -49,14 +65,24 @@ var TestEndpointAdaptor = class TestEndpointAdaptor {
|
|
|
49
65
|
const output = await this.endpoint.parseOutput(data);
|
|
50
66
|
ctx.publisher && await this.serviceDiscovery.register([ctx.publisher]);
|
|
51
67
|
await publishConstructEvents(this.endpoint, output, this.serviceDiscovery);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
68
|
+
const headers = { ...metadata.headers || {} };
|
|
69
|
+
if (metadata.cookies && metadata.cookies.size > 0) {
|
|
70
|
+
const setCookieValues = [];
|
|
71
|
+
for (const [name, cookie$1] of metadata.cookies.entries()) setCookieValues.push(serializeCookie(name, cookie$1.value, cookie$1.options));
|
|
72
|
+
headers["set-cookie"] = setCookieValues;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
body: output,
|
|
76
|
+
status: metadata.status || 200,
|
|
77
|
+
headers
|
|
55
78
|
};
|
|
56
|
-
|
|
79
|
+
}
|
|
80
|
+
async request(ctx) {
|
|
81
|
+
const response = await this.fullRequest(ctx);
|
|
82
|
+
return response.body;
|
|
57
83
|
}
|
|
58
84
|
};
|
|
59
85
|
|
|
60
86
|
//#endregion
|
|
61
87
|
export { TestEndpointAdaptor };
|
|
62
|
-
//# sourceMappingURL=TestEndpointAdaptor-
|
|
88
|
+
//# sourceMappingURL=TestEndpointAdaptor-Ct4I-gDo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestEndpointAdaptor-Ct4I-gDo.mjs","names":["name: string","value: string","options?: CookieOptions","endpoint: Endpoint<\n TRoute,\n TMethod,\n TInput,\n TOutSchema,\n TServices,\n TLogger,\n TSession,\n TEventPublisher,\n TEventPublisherServiceName\n >","serviceDiscovery: ServiceDiscovery<\n any,\n any\n >","ctx: TestRequestAdaptor<\n TInput,\n TServices,\n TEventPublisher,\n TEventPublisherServiceName\n >","headers: Record<string, string | string[]>","setCookieValues: string[]","cookie"],"sources":["../src/endpoints/TestEndpointAdaptor.ts"],"sourcesContent":["import { EnvironmentParser } from '@geekmidas/envkit';\nimport type { EventPublisher } from '@geekmidas/events';\nimport type { Logger } from '@geekmidas/logger';\nimport type {\n InferComposableStandardSchema,\n InferStandardSchema,\n} from '@geekmidas/schema';\nimport {\n type Service,\n ServiceDiscovery,\n type ServiceRecord,\n} from '@geekmidas/services';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { publishConstructEvents } from '../publisher';\nimport type { HttpMethod } from '../types';\nimport {\n type CookieOptions,\n Endpoint,\n type EndpointSchemas,\n ResponseBuilder,\n} from './Endpoint';\n\nexport type TestHttpResponse<TBody = any> = {\n body: TBody;\n status: number;\n headers: Record<string, string | string[]>;\n};\n\n/**\n * Serializes a cookie into a Set-Cookie header string\n */\nfunction serializeCookie(\n name: string,\n value: string,\n options?: CookieOptions,\n): string {\n let cookieString = `${name}=${value}`;\n\n if (options) {\n if (options.maxAge !== undefined) {\n cookieString += `; Max-Age=${options.maxAge}`;\n }\n if (options.expires) {\n cookieString += `; Expires=${options.expires.toUTCString()}`;\n }\n if (options.domain) {\n cookieString += `; Domain=${options.domain}`;\n }\n if (options.path) {\n cookieString += `; Path=${options.path}`;\n }\n if (options.httpOnly) {\n cookieString += '; HttpOnly';\n }\n if (options.secure) {\n cookieString += '; Secure';\n }\n if (options.sameSite) {\n cookieString += `; SameSite=${options.sameSite}`;\n }\n }\n\n return cookieString;\n}\n\nexport class TestEndpointAdaptor<\n TRoute extends string,\n TMethod extends HttpMethod,\n TInput extends EndpointSchemas = {},\n TOutSchema extends StandardSchemaV1 | undefined = undefined,\n TServices extends Service[] = [],\n TLogger extends Logger = Logger,\n TSession = unknown,\n TEventPublisher extends EventPublisher<any> | undefined = undefined,\n TEventPublisherServiceName extends string = string,\n> {\n static getDefaultServiceDiscover<\n TRoute extends string,\n TMethod extends HttpMethod,\n TInput extends EndpointSchemas = {},\n TOutSchema extends StandardSchemaV1 | undefined = undefined,\n TServices extends Service[] = [],\n TLogger extends Logger = Logger,\n TSession = unknown,\n TEventPublisher extends EventPublisher<any> | undefined = undefined,\n TEventPublisherServiceName extends string = string,\n >(\n endpoint: Endpoint<\n TRoute,\n TMethod,\n TInput,\n TOutSchema,\n TServices,\n TLogger,\n TSession,\n TEventPublisher,\n TEventPublisherServiceName\n >,\n ) {\n return ServiceDiscovery.getInstance(\n endpoint.logger,\n new EnvironmentParser({}),\n );\n }\n constructor(\n private readonly endpoint: Endpoint<\n TRoute,\n TMethod,\n TInput,\n TOutSchema,\n TServices,\n TLogger,\n TSession,\n TEventPublisher,\n TEventPublisherServiceName\n >,\n private serviceDiscovery: ServiceDiscovery<\n any,\n any\n > = TestEndpointAdaptor.getDefaultServiceDiscover(endpoint),\n ) {}\n\n async fullRequest(\n ctx: TestRequestAdaptor<\n TInput,\n TServices,\n TEventPublisher,\n TEventPublisherServiceName\n >,\n ): Promise<TestHttpResponse<InferStandardSchema<TOutSchema>>> {\n const body = await this.endpoint.parseInput((ctx as any).body, 'body');\n const query = await this.endpoint.parseInput((ctx as any).query, 'query');\n const params = await this.endpoint.parseInput(\n (ctx as any).params,\n 'params',\n );\n\n const header = Endpoint.createHeaders(ctx.headers);\n const cookie = Endpoint.createCookies(ctx.headers.cookie);\n const logger = this.endpoint.logger.child({\n route: this.endpoint.route,\n host: ctx.headers.host,\n method: this.endpoint.method,\n }) as TLogger;\n const session = await this.endpoint.getSession({\n logger,\n services: ctx.services,\n header,\n cookie,\n });\n\n const responseBuilder = new ResponseBuilder();\n const response = await this.endpoint.handler(\n {\n body,\n query,\n params,\n session,\n services: ctx.services,\n logger,\n header,\n cookie,\n } as any,\n responseBuilder,\n );\n\n // Check if response has metadata\n let data = response;\n let metadata = responseBuilder.getMetadata();\n\n if (Endpoint.hasMetadata(response)) {\n data = response.data;\n metadata = response.metadata;\n }\n\n const output = await this.endpoint.parseOutput(data);\n ctx.publisher && (await this.serviceDiscovery.register([ctx.publisher]));\n\n await publishConstructEvents(this.endpoint, output, this.serviceDiscovery);\n\n // Convert cookies to Set-Cookie headers\n const headers: Record<string, string | string[]> = {\n ...(metadata.headers || {}),\n };\n\n if (metadata.cookies && metadata.cookies.size > 0) {\n const setCookieValues: string[] = [];\n for (const [name, cookie] of metadata.cookies.entries()) {\n setCookieValues.push(serializeCookie(name, cookie.value, cookie.options));\n }\n headers['set-cookie'] = setCookieValues;\n }\n\n // Return HTTP response format\n return {\n body: output,\n status: metadata.status || 200,\n headers,\n };\n }\n\n async request(\n ctx: TestRequestAdaptor<\n TInput,\n TServices,\n TEventPublisher,\n TEventPublisherServiceName\n >,\n ): Promise<InferStandardSchema<TOutSchema>> {\n const response = await this.fullRequest(ctx);\n return response.body;\n }\n}\n\nexport type TestRequestAdaptor<\n TInput extends EndpointSchemas = {},\n TServices extends Service[] = [],\n TEventPublisher extends EventPublisher<any> | undefined = undefined,\n TEventPublisherServiceName extends string = string,\n> = {\n services: ServiceRecord<TServices>;\n headers: Record<string, string>;\n publisher?: Service<TEventPublisherServiceName, TEventPublisher>;\n} & InferComposableStandardSchema<TInput>;\n"],"mappings":";;;;;;;;;AA+BA,SAAS,gBACPA,MACAC,OACAC,SACQ;CACR,IAAI,gBAAgB,EAAE,KAAK,GAAG,MAAM;AAEpC,KAAI,SAAS;AACX,MAAI,QAAQ,kBACV,kBAAiB,YAAY,QAAQ,OAAO;AAE9C,MAAI,QAAQ,QACV,kBAAiB,YAAY,QAAQ,QAAQ,aAAa,CAAC;AAE7D,MAAI,QAAQ,OACV,kBAAiB,WAAW,QAAQ,OAAO;AAE7C,MAAI,QAAQ,KACV,kBAAiB,SAAS,QAAQ,KAAK;AAEzC,MAAI,QAAQ,SACV,iBAAgB;AAElB,MAAI,QAAQ,OACV,iBAAgB;AAElB,MAAI,QAAQ,SACV,kBAAiB,aAAa,QAAQ,SAAS;CAElD;AAED,QAAO;AACR;AAED,IAAa,sBAAb,MAAa,oBAUX;CACA,OAAO,0BAWLC,UAWA;AACA,SAAO,iBAAiB,YACtB,SAAS,QACT,IAAI,kBAAkB,CAAE,GACzB;CACF;CACD,YACmBA,UAWTC,mBAGJ,oBAAoB,0BAA0B,SAAS,EAC3D;EAfiB;EAWT;CAIN;CAEJ,MAAM,YACJC,KAM4D;EAC5D,MAAM,OAAO,MAAM,KAAK,SAAS,WAAY,IAAY,MAAM,OAAO;EACtE,MAAM,QAAQ,MAAM,KAAK,SAAS,WAAY,IAAY,OAAO,QAAQ;EACzE,MAAM,SAAS,MAAM,KAAK,SAAS,WAChC,IAAY,QACb,SACD;EAED,MAAM,SAAS,SAAS,cAAc,IAAI,QAAQ;EAClD,MAAM,SAAS,SAAS,cAAc,IAAI,QAAQ,OAAO;EACzD,MAAM,SAAS,KAAK,SAAS,OAAO,MAAM;GACxC,OAAO,KAAK,SAAS;GACrB,MAAM,IAAI,QAAQ;GAClB,QAAQ,KAAK,SAAS;EACvB,EAAC;EACF,MAAM,UAAU,MAAM,KAAK,SAAS,WAAW;GAC7C;GACA,UAAU,IAAI;GACd;GACA;EACD,EAAC;EAEF,MAAM,kBAAkB,IAAI;EAC5B,MAAM,WAAW,MAAM,KAAK,SAAS,QACnC;GACE;GACA;GACA;GACA;GACA,UAAU,IAAI;GACd;GACA;GACA;EACD,GACD,gBACD;EAGD,IAAI,OAAO;EACX,IAAI,WAAW,gBAAgB,aAAa;AAE5C,MAAI,SAAS,YAAY,SAAS,EAAE;AAClC,UAAO,SAAS;AAChB,cAAW,SAAS;EACrB;EAED,MAAM,SAAS,MAAM,KAAK,SAAS,YAAY,KAAK;AACpD,MAAI,aAAc,MAAM,KAAK,iBAAiB,SAAS,CAAC,IAAI,SAAU,EAAC;AAEvE,QAAM,uBAAuB,KAAK,UAAU,QAAQ,KAAK,iBAAiB;EAG1E,MAAMC,UAA6C,EACjD,GAAI,SAAS,WAAW,CAAE,EAC3B;AAED,MAAI,SAAS,WAAW,SAAS,QAAQ,OAAO,GAAG;GACjD,MAAMC,kBAA4B,CAAE;AACpC,QAAK,MAAM,CAAC,MAAMC,SAAO,IAAI,SAAS,QAAQ,SAAS,CACrD,iBAAgB,KAAK,gBAAgB,MAAMA,SAAO,OAAOA,SAAO,QAAQ,CAAC;AAE3E,WAAQ,gBAAgB;EACzB;AAGD,SAAO;GACL,MAAM;GACN,QAAQ,SAAS,UAAU;GAC3B;EACD;CACF;CAED,MAAM,QACJH,KAM0C;EAC1C,MAAM,WAAW,MAAM,KAAK,YAAY,IAAI;AAC5C,SAAO,SAAS;CACjB;AACF"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
2
|
const require_publisher = require('./publisher-lFQleddL.cjs');
|
|
3
|
-
const require_Endpoint = require('./Endpoint-
|
|
3
|
+
const require_Endpoint = require('./Endpoint-COGAflGh.cjs');
|
|
4
4
|
const __geekmidas_envkit = require_chunk.__toESM(require("@geekmidas/envkit"));
|
|
5
5
|
const __geekmidas_services = require_chunk.__toESM(require("@geekmidas/services"));
|
|
6
6
|
|
|
7
7
|
//#region src/endpoints/TestEndpointAdaptor.ts
|
|
8
|
+
/**
|
|
9
|
+
* Serializes a cookie into a Set-Cookie header string
|
|
10
|
+
*/
|
|
11
|
+
function serializeCookie(name, value, options) {
|
|
12
|
+
let cookieString = `${name}=${value}`;
|
|
13
|
+
if (options) {
|
|
14
|
+
if (options.maxAge !== void 0) cookieString += `; Max-Age=${options.maxAge}`;
|
|
15
|
+
if (options.expires) cookieString += `; Expires=${options.expires.toUTCString()}`;
|
|
16
|
+
if (options.domain) cookieString += `; Domain=${options.domain}`;
|
|
17
|
+
if (options.path) cookieString += `; Path=${options.path}`;
|
|
18
|
+
if (options.httpOnly) cookieString += "; HttpOnly";
|
|
19
|
+
if (options.secure) cookieString += "; Secure";
|
|
20
|
+
if (options.sameSite) cookieString += `; SameSite=${options.sameSite}`;
|
|
21
|
+
}
|
|
22
|
+
return cookieString;
|
|
23
|
+
}
|
|
8
24
|
var TestEndpointAdaptor = class TestEndpointAdaptor {
|
|
9
25
|
static getDefaultServiceDiscover(endpoint) {
|
|
10
26
|
return __geekmidas_services.ServiceDiscovery.getInstance(endpoint.logger, new __geekmidas_envkit.EnvironmentParser({}));
|
|
@@ -13,7 +29,7 @@ var TestEndpointAdaptor = class TestEndpointAdaptor {
|
|
|
13
29
|
this.endpoint = endpoint;
|
|
14
30
|
this.serviceDiscovery = serviceDiscovery;
|
|
15
31
|
}
|
|
16
|
-
async
|
|
32
|
+
async fullRequest(ctx) {
|
|
17
33
|
const body = await this.endpoint.parseInput(ctx.body, "body");
|
|
18
34
|
const query = await this.endpoint.parseInput(ctx.query, "query");
|
|
19
35
|
const params = await this.endpoint.parseInput(ctx.params, "params");
|
|
@@ -50,11 +66,21 @@ var TestEndpointAdaptor = class TestEndpointAdaptor {
|
|
|
50
66
|
const output = await this.endpoint.parseOutput(data);
|
|
51
67
|
ctx.publisher && await this.serviceDiscovery.register([ctx.publisher]);
|
|
52
68
|
await require_publisher.publishConstructEvents(this.endpoint, output, this.serviceDiscovery);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
69
|
+
const headers = { ...metadata.headers || {} };
|
|
70
|
+
if (metadata.cookies && metadata.cookies.size > 0) {
|
|
71
|
+
const setCookieValues = [];
|
|
72
|
+
for (const [name, cookie$1] of metadata.cookies.entries()) setCookieValues.push(serializeCookie(name, cookie$1.value, cookie$1.options));
|
|
73
|
+
headers["set-cookie"] = setCookieValues;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
body: output,
|
|
77
|
+
status: metadata.status || 200,
|
|
78
|
+
headers
|
|
56
79
|
};
|
|
57
|
-
|
|
80
|
+
}
|
|
81
|
+
async request(ctx) {
|
|
82
|
+
const response = await this.fullRequest(ctx);
|
|
83
|
+
return response.body;
|
|
58
84
|
}
|
|
59
85
|
};
|
|
60
86
|
|
|
@@ -65,4 +91,4 @@ Object.defineProperty(exports, 'TestEndpointAdaptor', {
|
|
|
65
91
|
return TestEndpointAdaptor;
|
|
66
92
|
}
|
|
67
93
|
});
|
|
68
|
-
//# sourceMappingURL=TestEndpointAdaptor-
|
|
94
|
+
//# sourceMappingURL=TestEndpointAdaptor-FJUob2W_.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestEndpointAdaptor-FJUob2W_.cjs","names":["name: string","value: string","options?: CookieOptions","endpoint: Endpoint<\n TRoute,\n TMethod,\n TInput,\n TOutSchema,\n TServices,\n TLogger,\n TSession,\n TEventPublisher,\n TEventPublisherServiceName\n >","EnvironmentParser","serviceDiscovery: ServiceDiscovery<\n any,\n any\n >","ctx: TestRequestAdaptor<\n TInput,\n TServices,\n TEventPublisher,\n TEventPublisherServiceName\n >","ResponseBuilder","headers: Record<string, string | string[]>","setCookieValues: string[]","cookie"],"sources":["../src/endpoints/TestEndpointAdaptor.ts"],"sourcesContent":["import { EnvironmentParser } from '@geekmidas/envkit';\nimport type { EventPublisher } from '@geekmidas/events';\nimport type { Logger } from '@geekmidas/logger';\nimport type {\n InferComposableStandardSchema,\n InferStandardSchema,\n} from '@geekmidas/schema';\nimport {\n type Service,\n ServiceDiscovery,\n type ServiceRecord,\n} from '@geekmidas/services';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { publishConstructEvents } from '../publisher';\nimport type { HttpMethod } from '../types';\nimport {\n type CookieOptions,\n Endpoint,\n type EndpointSchemas,\n ResponseBuilder,\n} from './Endpoint';\n\nexport type TestHttpResponse<TBody = any> = {\n body: TBody;\n status: number;\n headers: Record<string, string | string[]>;\n};\n\n/**\n * Serializes a cookie into a Set-Cookie header string\n */\nfunction serializeCookie(\n name: string,\n value: string,\n options?: CookieOptions,\n): string {\n let cookieString = `${name}=${value}`;\n\n if (options) {\n if (options.maxAge !== undefined) {\n cookieString += `; Max-Age=${options.maxAge}`;\n }\n if (options.expires) {\n cookieString += `; Expires=${options.expires.toUTCString()}`;\n }\n if (options.domain) {\n cookieString += `; Domain=${options.domain}`;\n }\n if (options.path) {\n cookieString += `; Path=${options.path}`;\n }\n if (options.httpOnly) {\n cookieString += '; HttpOnly';\n }\n if (options.secure) {\n cookieString += '; Secure';\n }\n if (options.sameSite) {\n cookieString += `; SameSite=${options.sameSite}`;\n }\n }\n\n return cookieString;\n}\n\nexport class TestEndpointAdaptor<\n TRoute extends string,\n TMethod extends HttpMethod,\n TInput extends EndpointSchemas = {},\n TOutSchema extends StandardSchemaV1 | undefined = undefined,\n TServices extends Service[] = [],\n TLogger extends Logger = Logger,\n TSession = unknown,\n TEventPublisher extends EventPublisher<any> | undefined = undefined,\n TEventPublisherServiceName extends string = string,\n> {\n static getDefaultServiceDiscover<\n TRoute extends string,\n TMethod extends HttpMethod,\n TInput extends EndpointSchemas = {},\n TOutSchema extends StandardSchemaV1 | undefined = undefined,\n TServices extends Service[] = [],\n TLogger extends Logger = Logger,\n TSession = unknown,\n TEventPublisher extends EventPublisher<any> | undefined = undefined,\n TEventPublisherServiceName extends string = string,\n >(\n endpoint: Endpoint<\n TRoute,\n TMethod,\n TInput,\n TOutSchema,\n TServices,\n TLogger,\n TSession,\n TEventPublisher,\n TEventPublisherServiceName\n >,\n ) {\n return ServiceDiscovery.getInstance(\n endpoint.logger,\n new EnvironmentParser({}),\n );\n }\n constructor(\n private readonly endpoint: Endpoint<\n TRoute,\n TMethod,\n TInput,\n TOutSchema,\n TServices,\n TLogger,\n TSession,\n TEventPublisher,\n TEventPublisherServiceName\n >,\n private serviceDiscovery: ServiceDiscovery<\n any,\n any\n > = TestEndpointAdaptor.getDefaultServiceDiscover(endpoint),\n ) {}\n\n async fullRequest(\n ctx: TestRequestAdaptor<\n TInput,\n TServices,\n TEventPublisher,\n TEventPublisherServiceName\n >,\n ): Promise<TestHttpResponse<InferStandardSchema<TOutSchema>>> {\n const body = await this.endpoint.parseInput((ctx as any).body, 'body');\n const query = await this.endpoint.parseInput((ctx as any).query, 'query');\n const params = await this.endpoint.parseInput(\n (ctx as any).params,\n 'params',\n );\n\n const header = Endpoint.createHeaders(ctx.headers);\n const cookie = Endpoint.createCookies(ctx.headers.cookie);\n const logger = this.endpoint.logger.child({\n route: this.endpoint.route,\n host: ctx.headers.host,\n method: this.endpoint.method,\n }) as TLogger;\n const session = await this.endpoint.getSession({\n logger,\n services: ctx.services,\n header,\n cookie,\n });\n\n const responseBuilder = new ResponseBuilder();\n const response = await this.endpoint.handler(\n {\n body,\n query,\n params,\n session,\n services: ctx.services,\n logger,\n header,\n cookie,\n } as any,\n responseBuilder,\n );\n\n // Check if response has metadata\n let data = response;\n let metadata = responseBuilder.getMetadata();\n\n if (Endpoint.hasMetadata(response)) {\n data = response.data;\n metadata = response.metadata;\n }\n\n const output = await this.endpoint.parseOutput(data);\n ctx.publisher && (await this.serviceDiscovery.register([ctx.publisher]));\n\n await publishConstructEvents(this.endpoint, output, this.serviceDiscovery);\n\n // Convert cookies to Set-Cookie headers\n const headers: Record<string, string | string[]> = {\n ...(metadata.headers || {}),\n };\n\n if (metadata.cookies && metadata.cookies.size > 0) {\n const setCookieValues: string[] = [];\n for (const [name, cookie] of metadata.cookies.entries()) {\n setCookieValues.push(serializeCookie(name, cookie.value, cookie.options));\n }\n headers['set-cookie'] = setCookieValues;\n }\n\n // Return HTTP response format\n return {\n body: output,\n status: metadata.status || 200,\n headers,\n };\n }\n\n async request(\n ctx: TestRequestAdaptor<\n TInput,\n TServices,\n TEventPublisher,\n TEventPublisherServiceName\n >,\n ): Promise<InferStandardSchema<TOutSchema>> {\n const response = await this.fullRequest(ctx);\n return response.body;\n }\n}\n\nexport type TestRequestAdaptor<\n TInput extends EndpointSchemas = {},\n TServices extends Service[] = [],\n TEventPublisher extends EventPublisher<any> | undefined = undefined,\n TEventPublisherServiceName extends string = string,\n> = {\n services: ServiceRecord<TServices>;\n headers: Record<string, string>;\n publisher?: Service<TEventPublisherServiceName, TEventPublisher>;\n} & InferComposableStandardSchema<TInput>;\n"],"mappings":";;;;;;;;;;AA+BA,SAAS,gBACPA,MACAC,OACAC,SACQ;CACR,IAAI,gBAAgB,EAAE,KAAK,GAAG,MAAM;AAEpC,KAAI,SAAS;AACX,MAAI,QAAQ,kBACV,kBAAiB,YAAY,QAAQ,OAAO;AAE9C,MAAI,QAAQ,QACV,kBAAiB,YAAY,QAAQ,QAAQ,aAAa,CAAC;AAE7D,MAAI,QAAQ,OACV,kBAAiB,WAAW,QAAQ,OAAO;AAE7C,MAAI,QAAQ,KACV,kBAAiB,SAAS,QAAQ,KAAK;AAEzC,MAAI,QAAQ,SACV,iBAAgB;AAElB,MAAI,QAAQ,OACV,iBAAgB;AAElB,MAAI,QAAQ,SACV,kBAAiB,aAAa,QAAQ,SAAS;CAElD;AAED,QAAO;AACR;AAED,IAAa,sBAAb,MAAa,oBAUX;CACA,OAAO,0BAWLC,UAWA;AACA,SAAO,sCAAiB,YACtB,SAAS,QACT,IAAIC,qCAAkB,CAAE,GACzB;CACF;CACD,YACmBD,UAWTE,mBAGJ,oBAAoB,0BAA0B,SAAS,EAC3D;EAfiB;EAWT;CAIN;CAEJ,MAAM,YACJC,KAM4D;EAC5D,MAAM,OAAO,MAAM,KAAK,SAAS,WAAY,IAAY,MAAM,OAAO;EACtE,MAAM,QAAQ,MAAM,KAAK,SAAS,WAAY,IAAY,OAAO,QAAQ;EACzE,MAAM,SAAS,MAAM,KAAK,SAAS,WAChC,IAAY,QACb,SACD;EAED,MAAM,SAAS,0BAAS,cAAc,IAAI,QAAQ;EAClD,MAAM,SAAS,0BAAS,cAAc,IAAI,QAAQ,OAAO;EACzD,MAAM,SAAS,KAAK,SAAS,OAAO,MAAM;GACxC,OAAO,KAAK,SAAS;GACrB,MAAM,IAAI,QAAQ;GAClB,QAAQ,KAAK,SAAS;EACvB,EAAC;EACF,MAAM,UAAU,MAAM,KAAK,SAAS,WAAW;GAC7C;GACA,UAAU,IAAI;GACd;GACA;EACD,EAAC;EAEF,MAAM,kBAAkB,IAAIC;EAC5B,MAAM,WAAW,MAAM,KAAK,SAAS,QACnC;GACE;GACA;GACA;GACA;GACA,UAAU,IAAI;GACd;GACA;GACA;EACD,GACD,gBACD;EAGD,IAAI,OAAO;EACX,IAAI,WAAW,gBAAgB,aAAa;AAE5C,MAAI,0BAAS,YAAY,SAAS,EAAE;AAClC,UAAO,SAAS;AAChB,cAAW,SAAS;EACrB;EAED,MAAM,SAAS,MAAM,KAAK,SAAS,YAAY,KAAK;AACpD,MAAI,aAAc,MAAM,KAAK,iBAAiB,SAAS,CAAC,IAAI,SAAU,EAAC;AAEvE,QAAM,yCAAuB,KAAK,UAAU,QAAQ,KAAK,iBAAiB;EAG1E,MAAMC,UAA6C,EACjD,GAAI,SAAS,WAAW,CAAE,EAC3B;AAED,MAAI,SAAS,WAAW,SAAS,QAAQ,OAAO,GAAG;GACjD,MAAMC,kBAA4B,CAAE;AACpC,QAAK,MAAM,CAAC,MAAMC,SAAO,IAAI,SAAS,QAAQ,SAAS,CACrD,iBAAgB,KAAK,gBAAgB,MAAMA,SAAO,OAAOA,SAAO,QAAQ,CAAC;AAE3E,WAAQ,gBAAgB;EACzB;AAGD,SAAO;GACL,MAAM;GACN,QAAQ,SAAS,UAAU;GAC3B;EACD;CACF;CAED,MAAM,QACJJ,KAM0C;EAC1C,MAAM,WAAW,MAAM,KAAK,YAAY,IAAI;AAC5C,SAAO,SAAS;CACjB;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpMethod } from "./types-CVq20-fE.mjs";
|
|
2
|
-
import { Endpoint, EndpointSchemas
|
|
2
|
+
import { Endpoint, EndpointSchemas } from "./Endpoint-C7jPJzAH.mjs";
|
|
3
3
|
import { Service, ServiceDiscovery, ServiceRecord } from "@geekmidas/services";
|
|
4
4
|
import { EventPublisher } from "@geekmidas/events";
|
|
5
5
|
import { Logger } from "@geekmidas/logger";
|
|
@@ -7,12 +7,18 @@ import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
|
7
7
|
import { InferComposableStandardSchema, InferStandardSchema } from "@geekmidas/schema";
|
|
8
8
|
|
|
9
9
|
//#region src/endpoints/TestEndpointAdaptor.d.ts
|
|
10
|
+
type TestHttpResponse<TBody = any> = {
|
|
11
|
+
body: TBody;
|
|
12
|
+
status: number;
|
|
13
|
+
headers: Record<string, string | string[]>;
|
|
14
|
+
};
|
|
10
15
|
declare class TestEndpointAdaptor<TRoute extends string, TMethod extends HttpMethod, TInput extends EndpointSchemas = {}, TOutSchema extends StandardSchemaV1 | undefined = undefined, TServices extends Service[] = [], TLogger extends Logger = Logger, TSession = unknown, TEventPublisher extends EventPublisher<any> | undefined = undefined, TEventPublisherServiceName extends string = string> {
|
|
11
16
|
private readonly endpoint;
|
|
12
17
|
private serviceDiscovery;
|
|
13
18
|
static getDefaultServiceDiscover<TRoute extends string, TMethod extends HttpMethod, TInput extends EndpointSchemas = {}, TOutSchema extends StandardSchemaV1 | undefined = undefined, TServices extends Service[] = [], TLogger extends Logger = Logger, TSession = unknown, TEventPublisher extends EventPublisher<any> | undefined = undefined, TEventPublisherServiceName extends string = string>(endpoint: Endpoint<TRoute, TMethod, TInput, TOutSchema, TServices, TLogger, TSession, TEventPublisher, TEventPublisherServiceName>): ServiceDiscovery<any, Logger>;
|
|
14
19
|
constructor(endpoint: Endpoint<TRoute, TMethod, TInput, TOutSchema, TServices, TLogger, TSession, TEventPublisher, TEventPublisherServiceName>, serviceDiscovery?: ServiceDiscovery<any, any>);
|
|
15
|
-
|
|
20
|
+
fullRequest(ctx: TestRequestAdaptor<TInput, TServices, TEventPublisher, TEventPublisherServiceName>): Promise<TestHttpResponse<InferStandardSchema<TOutSchema>>>;
|
|
21
|
+
request(ctx: TestRequestAdaptor<TInput, TServices, TEventPublisher, TEventPublisherServiceName>): Promise<InferStandardSchema<TOutSchema>>;
|
|
16
22
|
}
|
|
17
23
|
type TestRequestAdaptor<TInput extends EndpointSchemas = {}, TServices extends Service[] = [], TEventPublisher extends EventPublisher<any> | undefined = undefined, TEventPublisherServiceName extends string = string> = {
|
|
18
24
|
services: ServiceRecord<TServices>;
|
|
@@ -20,5 +26,5 @@ type TestRequestAdaptor<TInput extends EndpointSchemas = {}, TServices extends S
|
|
|
20
26
|
publisher?: Service<TEventPublisherServiceName, TEventPublisher>;
|
|
21
27
|
} & InferComposableStandardSchema<TInput>;
|
|
22
28
|
//#endregion
|
|
23
|
-
export { TestEndpointAdaptor, TestRequestAdaptor };
|
|
24
|
-
//# sourceMappingURL=TestEndpointAdaptor-
|
|
29
|
+
export { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor };
|
|
30
|
+
//# sourceMappingURL=TestEndpointAdaptor-vboVyJ0w.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpMethod } from "./types-Bp9ysFXd.cjs";
|
|
2
|
-
import { Endpoint, EndpointSchemas
|
|
2
|
+
import { Endpoint, EndpointSchemas } from "./Endpoint-XUMNAXYy.cjs";
|
|
3
3
|
import { EventPublisher } from "@geekmidas/events";
|
|
4
4
|
import { Logger } from "@geekmidas/logger";
|
|
5
5
|
import { Service, ServiceDiscovery, ServiceRecord } from "@geekmidas/services";
|
|
@@ -7,12 +7,18 @@ import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
|
7
7
|
import { InferComposableStandardSchema, InferStandardSchema } from "@geekmidas/schema";
|
|
8
8
|
|
|
9
9
|
//#region src/endpoints/TestEndpointAdaptor.d.ts
|
|
10
|
+
type TestHttpResponse<TBody = any> = {
|
|
11
|
+
body: TBody;
|
|
12
|
+
status: number;
|
|
13
|
+
headers: Record<string, string | string[]>;
|
|
14
|
+
};
|
|
10
15
|
declare class TestEndpointAdaptor<TRoute extends string, TMethod extends HttpMethod, TInput extends EndpointSchemas = {}, TOutSchema extends StandardSchemaV1 | undefined = undefined, TServices extends Service[] = [], TLogger extends Logger = Logger, TSession = unknown, TEventPublisher extends EventPublisher<any> | undefined = undefined, TEventPublisherServiceName extends string = string> {
|
|
11
16
|
private readonly endpoint;
|
|
12
17
|
private serviceDiscovery;
|
|
13
18
|
static getDefaultServiceDiscover<TRoute extends string, TMethod extends HttpMethod, TInput extends EndpointSchemas = {}, TOutSchema extends StandardSchemaV1 | undefined = undefined, TServices extends Service[] = [], TLogger extends Logger = Logger, TSession = unknown, TEventPublisher extends EventPublisher<any> | undefined = undefined, TEventPublisherServiceName extends string = string>(endpoint: Endpoint<TRoute, TMethod, TInput, TOutSchema, TServices, TLogger, TSession, TEventPublisher, TEventPublisherServiceName>): ServiceDiscovery<any, Logger>;
|
|
14
19
|
constructor(endpoint: Endpoint<TRoute, TMethod, TInput, TOutSchema, TServices, TLogger, TSession, TEventPublisher, TEventPublisherServiceName>, serviceDiscovery?: ServiceDiscovery<any, any>);
|
|
15
|
-
|
|
20
|
+
fullRequest(ctx: TestRequestAdaptor<TInput, TServices, TEventPublisher, TEventPublisherServiceName>): Promise<TestHttpResponse<InferStandardSchema<TOutSchema>>>;
|
|
21
|
+
request(ctx: TestRequestAdaptor<TInput, TServices, TEventPublisher, TEventPublisherServiceName>): Promise<InferStandardSchema<TOutSchema>>;
|
|
16
22
|
}
|
|
17
23
|
type TestRequestAdaptor<TInput extends EndpointSchemas = {}, TServices extends Service[] = [], TEventPublisher extends EventPublisher<any> | undefined = undefined, TEventPublisherServiceName extends string = string> = {
|
|
18
24
|
services: ServiceRecord<TServices>;
|
|
@@ -20,5 +26,5 @@ type TestRequestAdaptor<TInput extends EndpointSchemas = {}, TServices extends S
|
|
|
20
26
|
publisher?: Service<TEventPublisherServiceName, TEventPublisher>;
|
|
21
27
|
} & InferComposableStandardSchema<TInput>;
|
|
22
28
|
//#endregion
|
|
23
|
-
export { TestEndpointAdaptor, TestRequestAdaptor };
|
|
24
|
-
//# sourceMappingURL=TestEndpointAdaptor-
|
|
29
|
+
export { TestEndpointAdaptor, TestHttpResponse, TestRequestAdaptor };
|
|
30
|
+
//# sourceMappingURL=TestEndpointAdaptor-wwEaVHAt.d.cts.map
|
package/dist/adaptors/aws.cjs
CHANGED
|
@@ -4,14 +4,14 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
4
4
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
5
5
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
6
6
|
require('../functions-DVDb5wEA.cjs');
|
|
7
|
-
require('../Endpoint-
|
|
8
|
-
require('../AmazonApiGatewayEndpointAdaptor-
|
|
9
|
-
require('../parseQueryParams-
|
|
10
|
-
const require_AmazonApiGatewayV1EndpointAdaptor = require('../AmazonApiGatewayV1EndpointAdaptor-
|
|
11
|
-
const require_AmazonApiGatewayV2EndpointAdaptor = require('../AmazonApiGatewayV2EndpointAdaptor-
|
|
12
|
-
require('../FunctionExecutionWrapper-
|
|
13
|
-
const require_AWSLambdaFunction = require('../AWSLambdaFunction-
|
|
14
|
-
const require_AWSLambdaSubscriberAdaptor = require('../AWSLambdaSubscriberAdaptor-
|
|
7
|
+
require('../Endpoint-COGAflGh.cjs');
|
|
8
|
+
require('../AmazonApiGatewayEndpointAdaptor-B8mozTcG.cjs');
|
|
9
|
+
require('../parseQueryParams-BzPop4I1.cjs');
|
|
10
|
+
const require_AmazonApiGatewayV1EndpointAdaptor = require('../AmazonApiGatewayV1EndpointAdaptor-D4eZ-fx5.cjs');
|
|
11
|
+
const require_AmazonApiGatewayV2EndpointAdaptor = require('../AmazonApiGatewayV2EndpointAdaptor-J6tACl-N.cjs');
|
|
12
|
+
require('../FunctionExecutionWrapper-CElXEjPe.cjs');
|
|
13
|
+
const require_AWSLambdaFunction = require('../AWSLambdaFunction-qA5LqPsv.cjs');
|
|
14
|
+
const require_AWSLambdaSubscriberAdaptor = require('../AWSLambdaSubscriberAdaptor-CmPZ10JF.cjs');
|
|
15
15
|
|
|
16
16
|
exports.AWSLambdaFunction = require_AWSLambdaFunction.AWSLambdaFunction;
|
|
17
17
|
exports.AWSLambdaSubscriber = require_AWSLambdaSubscriberAdaptor.AWSLambdaSubscriber;
|
package/dist/adaptors/aws.d.cts
CHANGED
|
@@ -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-BGr5gFrX.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
8
|
import "../AmazonApiGatewayEndpointAdaptor-BFhJ2Rpz.cjs";
|
|
9
9
|
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-Bd-o8ese.cjs";
|
package/dist/adaptors/aws.d.mts
CHANGED
|
@@ -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-YM4W9XUq.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
8
|
import "../AmazonApiGatewayEndpointAdaptor-BrB3RfbI.mjs";
|
|
9
9
|
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-BtNXt0-4.mjs";
|
package/dist/adaptors/aws.mjs
CHANGED
|
@@ -4,13 +4,13 @@ import "../Function-C5mW-38v.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
5
5
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
6
6
|
import "../functions-mM-jcphA.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import "../AmazonApiGatewayEndpointAdaptor-
|
|
9
|
-
import "../parseQueryParams-
|
|
10
|
-
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-
|
|
11
|
-
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-
|
|
12
|
-
import "../FunctionExecutionWrapper-
|
|
13
|
-
import { AWSLambdaFunction } from "../AWSLambdaFunction-
|
|
14
|
-
import { AWSLambdaSubscriber } from "../AWSLambdaSubscriberAdaptor-
|
|
7
|
+
import "../Endpoint-DLLZvqoh.mjs";
|
|
8
|
+
import "../AmazonApiGatewayEndpointAdaptor-Bmz6Cy1e.mjs";
|
|
9
|
+
import "../parseQueryParams-BJaRh3OB.mjs";
|
|
10
|
+
import { AmazonApiGatewayV1Endpoint } from "../AmazonApiGatewayV1EndpointAdaptor-24g3dLn5.mjs";
|
|
11
|
+
import { AmazonApiGatewayV2Endpoint } from "../AmazonApiGatewayV2EndpointAdaptor-Cc40RThv.mjs";
|
|
12
|
+
import "../FunctionExecutionWrapper-XGrSAAPD.mjs";
|
|
13
|
+
import { AWSLambdaFunction } from "../AWSLambdaFunction-DWIZYsCy.mjs";
|
|
14
|
+
import { AWSLambdaSubscriber } from "../AWSLambdaSubscriberAdaptor-G8y3YkWj.mjs";
|
|
15
15
|
|
|
16
16
|
export { AWSLambdaFunction, AWSLambdaSubscriber, AmazonApiGatewayV1Endpoint, AmazonApiGatewayV2Endpoint };
|
package/dist/adaptors/hono.cjs
CHANGED
|
@@ -4,9 +4,9 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
4
4
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
5
5
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
6
6
|
require('../functions-DVDb5wEA.cjs');
|
|
7
|
-
require('../Endpoint-
|
|
8
|
-
require('../helpers-
|
|
9
|
-
require('../parseHonoQuery-
|
|
10
|
-
const require_HonoEndpointAdaptor = require('../HonoEndpointAdaptor-
|
|
7
|
+
require('../Endpoint-COGAflGh.cjs');
|
|
8
|
+
require('../helpers-go4jiRvV.cjs');
|
|
9
|
+
require('../parseHonoQuery-DopC24vB.cjs');
|
|
10
|
+
const require_HonoEndpointAdaptor = require('../HonoEndpointAdaptor-Ds433Q8w.cjs');
|
|
11
11
|
|
|
12
12
|
exports.HonoEndpoint = require_HonoEndpointAdaptor.HonoEndpoint;
|
package/dist/adaptors/hono.d.cts
CHANGED
|
@@ -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-BGr5gFrX.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
|
-
import { HonoEndpoint } from "../HonoEndpointAdaptor-
|
|
8
|
+
import { HonoEndpoint } from "../HonoEndpointAdaptor-BrbM9vxd.cjs";
|
|
9
9
|
export { HonoEndpoint };
|
package/dist/adaptors/hono.d.mts
CHANGED
|
@@ -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-YM4W9XUq.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
|
-
import { HonoEndpoint } from "../HonoEndpointAdaptor-
|
|
8
|
+
import { HonoEndpoint } from "../HonoEndpointAdaptor-CxcYKdzT.mjs";
|
|
9
9
|
export { HonoEndpoint };
|
package/dist/adaptors/hono.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import "../Function-C5mW-38v.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
5
5
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
6
6
|
import "../functions-mM-jcphA.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import "../helpers-
|
|
9
|
-
import "../parseHonoQuery-
|
|
10
|
-
import { HonoEndpoint } from "../HonoEndpointAdaptor-
|
|
7
|
+
import "../Endpoint-DLLZvqoh.mjs";
|
|
8
|
+
import "../helpers-CM0U-4Vk.mjs";
|
|
9
|
+
import "../parseHonoQuery-znDKBhdE.mjs";
|
|
10
|
+
import { HonoEndpoint } from "../HonoEndpointAdaptor-BlT1rWHV.mjs";
|
|
11
11
|
|
|
12
12
|
export { HonoEndpoint };
|
|
@@ -4,7 +4,7 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
4
4
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
5
5
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
6
6
|
require('../functions-DVDb5wEA.cjs');
|
|
7
|
-
require('../Endpoint-
|
|
8
|
-
const require_TestEndpointAdaptor = require('../TestEndpointAdaptor-
|
|
7
|
+
require('../Endpoint-COGAflGh.cjs');
|
|
8
|
+
const require_TestEndpointAdaptor = require('../TestEndpointAdaptor-FJUob2W_.cjs');
|
|
9
9
|
|
|
10
10
|
exports.TestEndpointAdaptor = require_TestEndpointAdaptor.TestEndpointAdaptor;
|
|
@@ -3,7 +3,7 @@ import "../types-Bp9ysFXd.cjs";
|
|
|
3
3
|
import "../Function-BP58p9Mp.cjs";
|
|
4
4
|
import "../BaseFunctionBuilder-5QCHkchp.cjs";
|
|
5
5
|
import "../FunctionBuilder-BS1KgxA_.cjs";
|
|
6
|
-
import "../index-
|
|
6
|
+
import "../index-BGr5gFrX.cjs";
|
|
7
7
|
import "../Endpoint-XUMNAXYy.cjs";
|
|
8
|
-
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-
|
|
8
|
+
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-wwEaVHAt.cjs";
|
|
9
9
|
export { TestEndpointAdaptor };
|
|
@@ -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-YM4W9XUq.mjs";
|
|
7
7
|
import "../Endpoint-C7jPJzAH.mjs";
|
|
8
|
-
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-
|
|
8
|
+
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-vboVyJ0w.mjs";
|
|
9
9
|
export { TestEndpointAdaptor };
|
|
@@ -4,7 +4,7 @@ import "../Function-C5mW-38v.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
5
5
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
6
6
|
import "../functions-mM-jcphA.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-
|
|
7
|
+
import "../Endpoint-DLLZvqoh.mjs";
|
|
8
|
+
import { TestEndpointAdaptor } from "../TestEndpointAdaptor-Ct4I-gDo.mjs";
|
|
9
9
|
|
|
10
10
|
export { TestEndpointAdaptor };
|
package/dist/crons/Cron.cjs
CHANGED
|
@@ -3,6 +3,6 @@ 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-
|
|
6
|
+
const require_Cron = require('../Cron-CmZ6esMM.cjs');
|
|
7
7
|
|
|
8
8
|
exports.Cron = require_Cron.Cron;
|
package/dist/crons/Cron.d.cts
CHANGED
|
@@ -2,6 +2,6 @@ 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-BGr5gFrX.cjs";
|
|
6
6
|
import { Cron, CronExpression, RateExpression, ScheduleExpression } from "../Cron-BxMXmn4t.cjs";
|
|
7
7
|
export { Cron, CronExpression, RateExpression, ScheduleExpression };
|
package/dist/crons/Cron.d.mts
CHANGED
|
@@ -2,6 +2,6 @@ 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-YM4W9XUq.mjs";
|
|
6
6
|
import { Cron, CronExpression, RateExpression, ScheduleExpression } from "../Cron-NDBlJhb3.mjs";
|
|
7
7
|
export { Cron, CronExpression, RateExpression, ScheduleExpression };
|
package/dist/crons/Cron.mjs
CHANGED
|
@@ -3,6 +3,6 @@ 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-
|
|
6
|
+
import { Cron } from "../Cron-D6hnZLk7.mjs";
|
|
7
7
|
|
|
8
8
|
export { Cron };
|
|
@@ -3,7 +3,7 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
3
3
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
4
4
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
5
5
|
require('../functions-DVDb5wEA.cjs');
|
|
6
|
-
require('../Cron-
|
|
7
|
-
const require_CronBuilder = require('../CronBuilder-
|
|
6
|
+
require('../Cron-CmZ6esMM.cjs');
|
|
7
|
+
const require_CronBuilder = require('../CronBuilder-Di7QK8Rt.cjs');
|
|
8
8
|
|
|
9
9
|
exports.CronBuilder = require_CronBuilder.CronBuilder;
|
|
@@ -2,7 +2,7 @@ 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-BGr5gFrX.cjs";
|
|
6
6
|
import "../Cron-BxMXmn4t.cjs";
|
|
7
7
|
import { CronBuilder } from "../CronBuilder-C6K5AbIO.cjs";
|
|
8
8
|
export { CronBuilder };
|
|
@@ -2,7 +2,7 @@ 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-YM4W9XUq.mjs";
|
|
6
6
|
import "../Cron-NDBlJhb3.mjs";
|
|
7
7
|
import { CronBuilder } from "../CronBuilder-s5x8V8hH.mjs";
|
|
8
8
|
export { CronBuilder };
|
|
@@ -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-D6hnZLk7.mjs";
|
|
7
|
+
import { CronBuilder } from "../CronBuilder-Dfv5JguE.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-CmZ6esMM.cjs');
|
|
7
|
+
const require_CronBuilder = require('../CronBuilder-Di7QK8Rt.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-BGr5gFrX.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_logger7 from "@geekmidas/logger";
|
|
9
|
+
import * as _geekmidas_services6 from "@geekmidas/services";
|
|
10
|
+
import * as _geekmidas_schema5 from "@geekmidas/schema";
|
|
11
11
|
|
|
12
12
|
//#region src/crons/index.d.ts
|
|
13
|
-
declare const c: CronBuilder<
|
|
13
|
+
declare const c: CronBuilder<_geekmidas_schema5.ComposableStandardSchema, _geekmidas_services6.Service<string, unknown>[], _geekmidas_logger7.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-YM4W9XUq.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_services7 from "@geekmidas/services";
|
|
9
|
+
import * as _geekmidas_logger8 from "@geekmidas/logger";
|
|
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.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-D6hnZLk7.mjs";
|
|
7
|
+
import { CronBuilder } from "../CronBuilder-Dfv5JguE.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/crons/index.ts
|
|
10
10
|
const c = new CronBuilder();
|
|
@@ -4,7 +4,7 @@ require('../Function-CbO2NZx-.cjs');
|
|
|
4
4
|
require('../BaseFunctionBuilder-DtO4Nwxm.cjs');
|
|
5
5
|
require('../FunctionBuilder-DuOeWCAl.cjs');
|
|
6
6
|
require('../functions-DVDb5wEA.cjs');
|
|
7
|
-
require('../Endpoint-
|
|
8
|
-
const require_AmazonApiGatewayEndpointAdaptor = require('../AmazonApiGatewayEndpointAdaptor-
|
|
7
|
+
require('../Endpoint-COGAflGh.cjs');
|
|
8
|
+
const require_AmazonApiGatewayEndpointAdaptor = require('../AmazonApiGatewayEndpointAdaptor-B8mozTcG.cjs');
|
|
9
9
|
|
|
10
10
|
exports.AmazonApiGatewayEndpoint = require_AmazonApiGatewayEndpointAdaptor.AmazonApiGatewayEndpoint;
|
|
@@ -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-BGr5gFrX.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-YM4W9XUq.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 };
|
|
@@ -4,7 +4,7 @@ import "../Function-C5mW-38v.mjs";
|
|
|
4
4
|
import "../BaseFunctionBuilder-BPE9JBbT.mjs";
|
|
5
5
|
import "../FunctionBuilder-CosgPmMl.mjs";
|
|
6
6
|
import "../functions-mM-jcphA.mjs";
|
|
7
|
-
import "../Endpoint-
|
|
8
|
-
import { AmazonApiGatewayEndpoint } from "../AmazonApiGatewayEndpointAdaptor-
|
|
7
|
+
import "../Endpoint-DLLZvqoh.mjs";
|
|
8
|
+
import { AmazonApiGatewayEndpoint } from "../AmazonApiGatewayEndpointAdaptor-Bmz6Cy1e.mjs";
|
|
9
9
|
|
|
10
10
|
export { AmazonApiGatewayEndpoint };
|