Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerbeggs committed Mar 31, 2020
2 parents 5fcb325 + 1faefbd commit 47acaa5
Show file tree
Hide file tree
Showing 4 changed files with 859 additions and 890 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint and test code in pull requests

on:
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn install --production=false
- run: yarn lint
- run: yarn test
14 changes: 7 additions & 7 deletions __tests__/construct.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("DomainRedirect", (): void => {
fromLookup: fromLookup,
},
AddressRecordTarget: {
fromAlias: function(): object {
fromAlias: function (): object {
return {
bind: fromAlias,
};
Expand All @@ -40,7 +40,7 @@ describe("DomainRedirect", (): void => {
domainName: "example.com",
});
});
it("looks up an IHostedZone if a valid hostname is passed as a string to DomainOptions.zoneName", function(): void {
it("looks up an IHostedZone if a valid hostname is passed as a string to DomainOptions.zoneName", function (): void {
fromLookup.mockReturnValue({
zoneName: "example.com.",
});
Expand All @@ -52,7 +52,7 @@ describe("DomainRedirect", (): void => {
expectCDK(stack).to(countResources("AWS::S3::Bucket", 1));
expectCDK(stack).to(countResources("AWS::CloudFront::Distribution", 1));
});
it("throws if an invalid hostname is passed as a string to DomainOptions.zoneName", function(): void {
it("throws if an invalid hostname is passed as a string to DomainOptions.zoneName", function (): void {
const fn = (): void => {
new DomainRedirect(stack, "redirects", {
zoneName: "garbage",
Expand All @@ -63,7 +63,7 @@ describe("DomainRedirect", (): void => {

expect(fn).toThrow(new Error("Invalid domain"));
});
it("looks up Domain.certificateArn if a Certificate is passed to DomainOptions.cert", function(): void {
it("looks up Domain.certificateArn if a Certificate is passed to DomainOptions.cert", function (): void {
fromLookup.mockReturnValue({
zoneName: "example.com.",
});
Expand All @@ -75,7 +75,7 @@ describe("DomainRedirect", (): void => {
expectCDK(stack).to(countResources("AWS::S3::Bucket", 1));
expectCDK(stack).to(countResources("AWS::CloudFront::Distribution", 1));
});
it("accepts a string for DomainOptions.hostnames", function(): void {
it("accepts a string for DomainOptions.hostnames", function (): void {
fromLookup.mockReturnValue({
zoneName: "example.com.",
});
Expand All @@ -88,7 +88,7 @@ describe("DomainRedirect", (): void => {
expectCDK(stack).to(countResources("AWS::S3::Bucket", 1));
expectCDK(stack).to(countResources("AWS::CloudFront::Distribution", 1));
});
it("passes through an array of strings for DomainOptions.hostnames", function(): void {
it("passes through an array of strings for DomainOptions.hostnames", function (): void {
fromLookup.mockReturnValue({
zoneName: "example.com.",
});
Expand All @@ -101,7 +101,7 @@ describe("DomainRedirect", (): void => {
expectCDK(stack).to(countResources("AWS::S3::Bucket", 1));
expectCDK(stack).to(countResources("AWS::CloudFront::Distribution", 1));
});
it("handles zoneName without a trialing period", function(): void {
it("handles zoneName without a trialing period", function (): void {
fromLookup.mockReturnValue({
zoneName: "example.com",
});
Expand Down
116 changes: 59 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@spencerbeggs/aws-cdk-domain-redirect",
"description": "An AWS CDK construct that makes redirecting HTTP(S) requests to a different domain a breeze.",
"version": "1.0.3",
"version": "1.1.0",
"license": "MIT",
"author": "C. Spencer Beggs <spencer@beg.gs>",
"scripts": {
Expand Down Expand Up @@ -41,72 +41,74 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@aws-cdk/assert": "^1.27.0",
"@aws-cdk/assets": "^1.27.0",
"@aws-cdk/aws-apigateway": "^1.27.0",
"@aws-cdk/aws-certificatemanager": "^1.27.0",
"@aws-cdk/aws-cloudformation": "^1.27.0",
"@aws-cdk/aws-cloudfront": "^1.27.0",
"@aws-cdk/aws-cloudwatch": "^1.27.0",
"@aws-cdk/aws-ec2": "^1.27.0",
"@aws-cdk/aws-elasticloadbalancing": "^1.27.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.27.0",
"@aws-cdk/aws-events": "^1.27.0",
"@aws-cdk/aws-iam": "^1.27.0",
"@aws-cdk/aws-kms": "^1.27.0",
"@aws-cdk/aws-lambda": "^1.27.0",
"@aws-cdk/aws-logs": "^1.27.0",
"@aws-cdk/aws-route53": "^1.27.0",
"@aws-cdk/aws-route53-targets": "^1.27.0",
"@aws-cdk/aws-s3": "^1.27.0",
"@aws-cdk/aws-s3-assets": "^1.27.0",
"@aws-cdk/aws-sns": "^1.27.0",
"@aws-cdk/aws-sqs": "^1.27.0",
"@aws-cdk/aws-ssm": "^1.27.0",
"@aws-cdk/core": "^1.27.0",
"@aws-cdk/cx-api": "^1.27.0",
"@aws-cdk/region-info": "^1.27.0",
"@aws-cdk/assert": "^1.31.0",
"@aws-cdk/assets": "^1.31.0",
"@aws-cdk/aws-apigateway": "^1.31.0",
"@aws-cdk/aws-certificatemanager": "^1.31.0",
"@aws-cdk/aws-cloudformation": "^1.31.0",
"@aws-cdk/aws-cloudfront": "^1.31.0",
"@aws-cdk/aws-cloudwatch": "^1.31.0",
"@aws-cdk/aws-ec2": "^1.31.0",
"@aws-cdk/aws-elasticloadbalancing": "^1.31.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.31.0",
"@aws-cdk/aws-events": "^1.31.0",
"@aws-cdk/aws-iam": "^1.31.0",
"@aws-cdk/aws-kms": "^1.31.0",
"@aws-cdk/aws-lambda": "^1.31.0",
"@aws-cdk/aws-logs": "^1.31.0",
"@aws-cdk/aws-route53": "^1.31.0",
"@aws-cdk/aws-route53-targets": "^1.31.0",
"@aws-cdk/aws-s3": "^1.31.0",
"@aws-cdk/aws-s3-assets": "^1.31.0",
"@aws-cdk/aws-sns": "^1.31.0",
"@aws-cdk/aws-sqs": "^1.31.0",
"@aws-cdk/aws-ssm": "^1.31.0",
"@aws-cdk/core": "^1.31.0",
"@aws-cdk/cx-api": "^1.31.0",
"@aws-cdk/region-info": "^1.31.0",
"@types/fs-extra": "^8.0.1",
"@types/jest": "^25.1.4",
"@types/node": "13.9.1",
"@typescript-eslint/eslint-plugin": "^2.19.2",
"@typescript-eslint/parser": "^2.19.2",
"@types/node": "13.9.8",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"constructs": "^2.0.0",
"coveralls": "^3.0.9",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-prettier": "^3.1.2",
"fs-extra": "^8.1.0",
"jest": "^25.1.0",
"prettier": "^1.19.1",
"fs-extra": "^9.0.0",
"jest": "^25.2.4",
"prettier": "^2.0.2",
"ts-jest": "^25.2.1",
"ts-node": "^8.6.2",
"typescript": "^3.7.5"
},
"peerDependencies": {
"@aws-cdk/assert": "^1.27.0",
"@aws-cdk/assets": "^1.27.0",
"@aws-cdk/aws-apigateway": "^1.27.0",
"@aws-cdk/aws-certificatemanager": "^1.27.0",
"@aws-cdk/aws-cloudformation": "^1.27.0",
"@aws-cdk/aws-cloudfront": "^1.27.0",
"@aws-cdk/aws-cloudwatch": "^1.27.0",
"@aws-cdk/aws-ec2": "^1.27.0",
"@aws-cdk/aws-elasticloadbalancing": "^1.27.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.27.0",
"@aws-cdk/aws-events": "^1.27.0",
"@aws-cdk/aws-iam": "^1.27.0",
"@aws-cdk/aws-kms": "^1.27.0",
"@aws-cdk/aws-lambda": "^1.27.0",
"@aws-cdk/aws-logs": "^1.27.0",
"@aws-cdk/aws-route53": "^1.27.0",
"@aws-cdk/aws-route53-targets": "^1.27.0",
"@aws-cdk/aws-s3": "^1.27.0",
"@aws-cdk/aws-s3-assets": "^1.27.0",
"@aws-cdk/aws-sns": "^1.27.0",
"@aws-cdk/aws-sqs": "^1.27.0",
"@aws-cdk/aws-ssm": "^1.27.0",
"@aws-cdk/core": "^1.27.0",
"@aws-cdk/cx-api": "^1.27.0",
"@aws-cdk/region-info": "^1.27.0"
"@aws-cdk/assert": "^1.31.0",
"@aws-cdk/assets": "^1.31.0",
"@aws-cdk/aws-apigateway": "^1.31.0",
"@aws-cdk/aws-certificatemanager": "^1.31.0",
"@aws-cdk/aws-cloudformation": "^1.31.0",
"@aws-cdk/aws-cloudfront": "^1.31.0",
"@aws-cdk/aws-cloudwatch": "^1.31.0",
"@aws-cdk/aws-ec2": "^1.31.0",
"@aws-cdk/aws-elasticloadbalancing": "^1.31.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.31.0",
"@aws-cdk/aws-events": "^1.31.0",
"@aws-cdk/aws-iam": "^1.31.0",
"@aws-cdk/aws-kms": "^1.31.0",
"@aws-cdk/aws-lambda": "^1.31.0",
"@aws-cdk/aws-logs": "^1.31.0",
"@aws-cdk/aws-route53": "^1.31.0",
"@aws-cdk/aws-route53-targets": "^1.31.0",
"@aws-cdk/aws-s3": "^1.31.0",
"@aws-cdk/aws-s3-assets": "^1.31.0",
"@aws-cdk/aws-sns": "^1.31.0",
"@aws-cdk/aws-sqs": "^1.31.0",
"@aws-cdk/aws-ssm": "^1.31.0",
"@aws-cdk/core": "^1.31.0",
"@aws-cdk/cx-api": "^1.31.0",
"@aws-cdk/region-info": "^1.31.0",
"constructs": "^2.0.0"
}
}
Loading

0 comments on commit 47acaa5

Please sign in to comment.