diff --git a/src/example-architecture/__tests__/importEvent.integration.test.ts b/src/example-architecture/__tests__/importEvent.integration.test.ts index eae577a9..d0f082c1 100644 --- a/src/example-architecture/__tests__/importEvent.integration.test.ts +++ b/src/example-architecture/__tests__/importEvent.integration.test.ts @@ -25,7 +25,7 @@ const getDynamoDBCommand = (eventId: string): GetItemCommand => }); const queryDynamodbReturnsItem = async ( - eventId: string, + eventId: string ): Promise => { try { const itemResponse = await client.send(getDynamoDBCommand(eventId)); @@ -39,7 +39,7 @@ const queryDynamodbReturnsItem = async ( }; const getEventId = ( - events: PutEventsResultEntry[] | undefined, + events: PutEventsResultEntry[] | undefined ): string | undefined => { if ( events === undefined || @@ -58,7 +58,7 @@ const wait = (interval: number) => }); const pollDynamoDB = async ( - events: PutEventsResultEntry[] | undefined, + events: PutEventsResultEntry[] | undefined ): Promise => { const eventId = getEventId(events); if (eventId === undefined) return {}; @@ -79,7 +79,7 @@ describe("Given a producer lambda that returns a Contract", () => { describe("When that lambda is invoked and returns an event response", async () => { const invokedLambda = await lambda.invoke(params); const body: PutEventsResponse = JSON.parse( - Buffer.from(invokedLambda.Payload ?? "").toString(), + Buffer.from(invokedLambda.Payload ?? "").toString() ); it("Response with an eventId is returned without an error", () => { diff --git a/src/example-architecture/consumer/functions/consumer/config.ts b/src/example-architecture/consumer/functions/consumer/config.ts index 23ee406a..e323c04b 100644 --- a/src/example-architecture/consumer/functions/consumer/config.ts +++ b/src/example-architecture/consumer/functions/consumer/config.ts @@ -26,8 +26,8 @@ export class Consumer extends Construct { lambdaRole.addManagedPolicy( ManagedPolicy.fromAwsManagedPolicyName( - "service-role/AWSLambdaBasicExecutionRole", - ), + "service-role/AWSLambdaBasicExecutionRole" + ) ); const dynamoDBTable = new Table(scope, "consumerTestTable", { @@ -39,7 +39,7 @@ export class Consumer extends Construct { new PolicyStatement({ actions: ["dynamodb:PutItem"], resources: [dynamoDBTable.tableArn], - }), + }) ); this.consumerLambda = new NodejsFunction(this, "ConsumerLambda", { @@ -57,7 +57,7 @@ export class Consumer extends Construct { const eventBus = EventBus.fromEventBusArn( this, "ExampleArchitectureEventBus", - eventBusArn, + eventBusArn ); const rule = new Rule(this, "rule", { diff --git a/src/example-architecture/helpers/__tests__/getCdkHandlerPath.test.ts b/src/example-architecture/helpers/__tests__/getCdkHandlerPath.test.ts index 2ed4d6e2..400810ac 100644 --- a/src/example-architecture/helpers/__tests__/getCdkHandlerPath.test.ts +++ b/src/example-architecture/helpers/__tests__/getCdkHandlerPath.test.ts @@ -8,7 +8,7 @@ describe("getCdkHandlerPath", () => { it("should customize the extension when given an extension parameter", () => { expect(getCdkHandlerPath("/path/to/file", { extension: "mjs" })).toBe( - "/path/to/file/handler.mjs", + "/path/to/file/handler.mjs" ); }); @@ -16,7 +16,7 @@ describe("getCdkHandlerPath", () => { expect( getCdkHandlerPath("/path/to/file", { fileName: "toto", - }), + }) ).toBe("/path/to/file/toto.ts"); }); }); diff --git a/src/example-architecture/helpers/getCdkHandlerPath.ts b/src/example-architecture/helpers/getCdkHandlerPath.ts index 62e6ba20..9fac504a 100644 --- a/src/example-architecture/helpers/getCdkHandlerPath.ts +++ b/src/example-architecture/helpers/getCdkHandlerPath.ts @@ -5,7 +5,7 @@ type GetCdkHandlerPathProps = { export const getCdkHandlerPath = ( directoryPath: string, - props?: GetCdkHandlerPathProps, + props?: GetCdkHandlerPathProps ): string => { const processRunLocation = process.cwd(); diff --git a/src/example-architecture/producer/functions/producer/config.ts b/src/example-architecture/producer/functions/producer/config.ts index 6cd11b44..043afad7 100644 --- a/src/example-architecture/producer/functions/producer/config.ts +++ b/src/example-architecture/producer/functions/producer/config.ts @@ -25,15 +25,15 @@ export class Producer extends Construct { lambdaRole.addManagedPolicy( ManagedPolicy.fromAwsManagedPolicyName( - "service-role/AWSLambdaBasicExecutionRole", - ), + "service-role/AWSLambdaBasicExecutionRole" + ) ); lambdaRole.addToPolicy( new PolicyStatement({ actions: ["events:PutEvents"], resources: [eventBusArn], - }), + }) ); this.producerLambda = new NodejsFunction(this, "ProducerLambda", { diff --git a/src/example-architecture/producer/functions/producer/handler.ts b/src/example-architecture/producer/functions/producer/handler.ts index 1254ec1d..e6d2cd00 100644 --- a/src/example-architecture/producer/functions/producer/handler.ts +++ b/src/example-architecture/producer/functions/producer/handler.ts @@ -1,7 +1,7 @@ import { type PutEventsResponse } from "@aws-sdk/client-eventbridge"; +import { Event } from "classes/Event"; import { PersonRegisteredContract } from "example-architecture/events/contracts/personRegisteredContractV1"; import { getEnvVariable } from "example-architecture/helpers/getEnvVariable"; -import { Event } from "classes/Event"; export const handler = async (): Promise => { const contract: PersonRegisteredContract = {