From 51d27b7543748df9917bc17a9953c1b1b0affed6 Mon Sep 17 00:00:00 2001 From: "C. Spencer Beggs" Date: Tue, 7 Apr 2020 15:49:07 -0400 Subject: [PATCH] Prettier 2.0 formatting Prettier 2.0 formatting --- __tests__/redirect.test.ts | 8 ++++---- src/redirect.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/__tests__/redirect.test.ts b/__tests__/redirect.test.ts index 1bd6651..998aca2 100644 --- a/__tests__/redirect.test.ts +++ b/__tests__/redirect.test.ts @@ -35,7 +35,7 @@ describe("makeRedirect", () => { }, ], }, - }) + }), ); }); it("it redirects, preserving the pathname", () => { @@ -53,7 +53,7 @@ describe("makeRedirect", () => { }, ], }, - }) + }), ); }); it("it redirects, preserving the query", () => { @@ -71,7 +71,7 @@ describe("makeRedirect", () => { }, ], }, - }) + }), ); }); it("it redirects, preserving the pathname and query", () => { @@ -89,7 +89,7 @@ describe("makeRedirect", () => { }, ], }, - }) + }), ); }); }); diff --git a/src/redirect.ts b/src/redirect.ts index 853f7ef..2d1e936 100644 --- a/src/redirect.ts +++ b/src/redirect.ts @@ -151,7 +151,7 @@ export class DomainRedirect extends Construct { }; }; - const domains = props.map(prop => makeOptions(prop)); + const domains = props.map((prop) => makeOptions(prop)); const bucket = new Bucket(this, "redirect-bucket", { blockPublicAccess: BlockPublicAccess.BLOCK_ALL, @@ -171,7 +171,7 @@ export class DomainRedirect extends Construct { policyStatement.addResources(`${bucket.bucketArn}/*`); policyStatement.addCanonicalUserPrincipal(originAccessIdentity.cloudFrontOriginAccessIdentityS3CanonicalUserId); - domains.forEach(domain => { + domains.forEach((domain) => { const { zone, acmCertificateArn, hostnames, target, preserve, name } = domain; const code = makeRedirect(target, preserve.path, preserve.query); const redirect = new Function(this, `${name}-redirect-lambda`, { @@ -181,7 +181,7 @@ export class DomainRedirect extends Construct { role: new Role(this, `${name}-redirect-lambda-role`, { assumedBy: new CompositePrincipal( new ServicePrincipal("lambda.amazonaws.com"), - new ServicePrincipal("edgelambda.amazonaws.com") + new ServicePrincipal("edgelambda.amazonaws.com"), ), managedPolicies: [ { @@ -230,7 +230,7 @@ export class DomainRedirect extends Construct { ], }); - hostnames.forEach(hostname => { + hostnames.forEach((hostname) => { new ARecord(this, `${hostname.replace(".", "-")}-record`, { target: AddressRecordTarget.fromAlias(new CloudFrontTarget(distro)), zone,