Skip to content

Commit

Permalink
Prettier 2.0 formatting
Browse files Browse the repository at this point in the history
Prettier 2.0 formatting
  • Loading branch information
spencerbeggs committed Apr 7, 2020
1 parent 12099e1 commit 51d27b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions __tests__/redirect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("makeRedirect", () => {
},
],
},
})
}),
);
});
it("it redirects, preserving the pathname", () => {
Expand All @@ -53,7 +53,7 @@ describe("makeRedirect", () => {
},
],
},
})
}),
);
});
it("it redirects, preserving the query", () => {
Expand All @@ -71,7 +71,7 @@ describe("makeRedirect", () => {
},
],
},
})
}),
);
});
it("it redirects, preserving the pathname and query", () => {
Expand All @@ -89,7 +89,7 @@ describe("makeRedirect", () => {
},
],
},
})
}),
);
});
});
8 changes: 4 additions & 4 deletions src/redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand 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`, {
Expand All @@ -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: [
{
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 51d27b7

Please sign in to comment.