From 6d04fd229322a60df1ab28ff5f3abe0164efb775 Mon Sep 17 00:00:00 2001 From: hilotter <1042519+hilotter@users.noreply.github.com> Date: Tue, 20 Oct 2020 15:05:55 +0900 Subject: [PATCH 01/45] docs(stepfunctions): fix typo in README (#10939) The parameter specified for LogOptions is `destination`, not `destinations`. https://github.com/aws/aws-cdk/blob/2640d9aa06039a6eb539d959d2126749486c7ef3/packages/%40aws-cdk/aws-stepfunctions/lib/state-machine.ts#L62 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-stepfunctions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-stepfunctions/README.md b/packages/@aws-cdk/aws-stepfunctions/README.md index a8d712400a2b5..206c6e8f0981d 100644 --- a/packages/@aws-cdk/aws-stepfunctions/README.md +++ b/packages/@aws-cdk/aws-stepfunctions/README.md @@ -562,7 +562,7 @@ const logGroup = new logs.LogGroup(stack, 'MyLogGroup'); new stepfunctions.StateMachine(stack, 'MyStateMachine', { definition: stepfunctions.Chain.start(new stepfunctions.Pass(stack, 'Pass')), logs: { - destinations: logGroup, + destination: logGroup, level: stepfunctions.LogLevel.ALL, } }); From b93cda6f528e0e1d98b88ad8407620b8ef472125 Mon Sep 17 00:00:00 2001 From: cheruvian Date: Mon, 19 Oct 2020 23:34:29 -0700 Subject: [PATCH 02/45] feat(events-targets): add support for Kinesis Firehose as a target (#10400) closes #10349 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-events-targets/README.md | 1 + .../@aws-cdk/aws-events-targets/lib/index.ts | 1 + .../lib/kinesis-firehose-stream.ts | 47 +++++ .../@aws-cdk/aws-events-targets/package.json | 17 +- ...nteg.kinesis-firehose-stream.expected.json | 164 ++++++++++++++++++ .../integ.kinesis-firehose-stream.ts | 33 ++++ .../kinesis-firehose-stream.test.ts | 80 +++++++++ 7 files changed, 336 insertions(+), 7 deletions(-) create mode 100644 packages/@aws-cdk/aws-events-targets/lib/kinesis-firehose-stream.ts create mode 100644 packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.expected.json create mode 100644 packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.ts create mode 100644 packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/kinesis-firehose-stream.test.ts diff --git a/packages/@aws-cdk/aws-events-targets/README.md b/packages/@aws-cdk/aws-events-targets/README.md index 686c26c270bbc..99bb9364ce7f7 100644 --- a/packages/@aws-cdk/aws-events-targets/README.md +++ b/packages/@aws-cdk/aws-events-targets/README.md @@ -23,6 +23,7 @@ Currently supported are: * Queue a Batch job * Make an AWS API call * Put a record to a Kinesis stream +* Put a record to a Kinesis Data Firehose stream See the README of the `@aws-cdk/aws-events` library for more information on EventBridge. diff --git a/packages/@aws-cdk/aws-events-targets/lib/index.ts b/packages/@aws-cdk/aws-events-targets/lib/index.ts index 7031423e6b739..e771a74d8c4eb 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/index.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/index.ts @@ -9,3 +9,4 @@ export * from './ecs-task-properties'; export * from './ecs-task'; export * from './state-machine'; export * from './kinesis-stream'; +export * from './kinesis-firehose-stream'; diff --git a/packages/@aws-cdk/aws-events-targets/lib/kinesis-firehose-stream.ts b/packages/@aws-cdk/aws-events-targets/lib/kinesis-firehose-stream.ts new file mode 100644 index 0000000000000..d861be96aa7f4 --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/lib/kinesis-firehose-stream.ts @@ -0,0 +1,47 @@ +import * as events from '@aws-cdk/aws-events'; +import * as iam from '@aws-cdk/aws-iam'; +import * as firehose from '@aws-cdk/aws-kinesisfirehose'; +import { singletonEventRole } from './util'; + +/** + * Customize the Firehose Stream Event Target + */ +export interface KinesisFirehoseStreamProps { + /** + * The message to send to the stream. + * + * Must be a valid JSON text passed to the target stream. + * + * @default - the entire Event Bridge event + */ + readonly message?: events.RuleTargetInput; +} + + +/** + * Customize the Firehose Stream Event Target + */ +export class KinesisFirehoseStream implements events.IRuleTarget { + + constructor(private readonly stream: firehose.CfnDeliveryStream, private readonly props: KinesisFirehoseStreamProps = {}) { + } + + /** + * Returns a RuleTarget that can be used to trigger this Firehose Stream as a + * result from a Event Bridge event. + */ + public bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig { + const policyStatements = [new iam.PolicyStatement({ + actions: ['firehose:PutRecord', 'firehose:PutRecordBatch'], + resources: [this.stream.attrArn], + })]; + + return { + id: '', + arn: this.stream.attrArn, + role: singletonEventRole(this.stream, policyStatements), + input: this.props.message, + targetResource: this.stream, + }; + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 42e0d6d91db67..0ad61bef081c0 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -74,6 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", + "@aws-cdk/aws-s3": "0.0.0", "aws-sdk": "^2.739.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", @@ -82,39 +83,41 @@ "pkglint": "0.0.0" }, "dependencies": { + "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/aws-codebuild": "0.0.0", "@aws-cdk/aws-codepipeline": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-ecs": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kinesis": "0.0.0", + "@aws-cdk/aws-kinesisfirehose": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", - "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", + "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-stepfunctions": "0.0.0", - "@aws-cdk/aws-batch": "0.0.0", - "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { + "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/aws-codebuild": "0.0.0", "@aws-cdk/aws-codepipeline": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-ecs": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kinesis": "0.0.0", + "@aws-cdk/aws-kinesisfirehose": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", - "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", + "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-stepfunctions": "0.0.0", - "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.4", - "@aws-cdk/aws-kinesis": "0.0.0" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.expected.json b/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.expected.json new file mode 100644 index 0000000000000..8cc4f2c5bbe65 --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.expected.json @@ -0,0 +1,164 @@ +{ + "Resources": { + "firehosebucket84C8AE0B": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "firehoseroleDDC4CF0E": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "firehose.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "firehoseroleDefaultPolicy3F3F850D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject*", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "firehosebucket84C8AE0B", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "firehosebucket84C8AE0B", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "firehoseroleDefaultPolicy3F3F850D", + "Roles": [ + { + "Ref": "firehoseroleDDC4CF0E" + } + ] + } + }, + "MyStream": { + "Type": "AWS::KinesisFirehose::DeliveryStream", + "Properties": { + "ExtendedS3DestinationConfiguration": { + "BucketARN": { + "Fn::GetAtt": [ + "firehosebucket84C8AE0B", + "Arn" + ] + }, + "RoleARN": { + "Fn::GetAtt": [ + "firehoseroleDDC4CF0E", + "Arn" + ] + } + } + } + }, + "MyStreamEventsRole5B6CC6AF": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "events.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "MyStreamEventsRoleDefaultPolicy2089B49E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "firehose:PutRecord", + "firehose:PutRecordBatch" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyStream", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyStreamEventsRoleDefaultPolicy2089B49E", + "Roles": [ + { + "Ref": "MyStreamEventsRole5B6CC6AF" + } + ] + } + }, + "EveryMinute2BBCEA8F": { + "Type": "AWS::Events::Rule", + "Properties": { + "ScheduleExpression": "rate(1 minute)", + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::GetAtt": [ + "MyStream", + "Arn" + ] + }, + "Id": "Target0", + "RoleArn": { + "Fn::GetAtt": [ + "MyStreamEventsRole5B6CC6AF", + "Arn" + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.ts b/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.ts new file mode 100644 index 0000000000000..70c4ddf050e4f --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/integ.kinesis-firehose-stream.ts @@ -0,0 +1,33 @@ +import * as events from '@aws-cdk/aws-events'; +import * as iam from '@aws-cdk/aws-iam'; +import * as firehose from '@aws-cdk/aws-kinesisfirehose'; +import * as s3 from '@aws-cdk/aws-s3'; +import * as cdk from '@aws-cdk/core'; +import * as targets from '../../lib'; + +// --------------------------------- +// Define a rule that triggers a put to a Kinesis stream every 1min. + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'aws-cdk-firehose-event-target'); + +const bucket = new s3.Bucket(stack, 'firehose-bucket'); +const firehoseRole = new iam.Role(stack, 'firehose-role', { + assumedBy: new iam.ServicePrincipal('firehose.amazonaws.com'), +}); +const stream = new firehose.CfnDeliveryStream(stack, 'MyStream', { + extendedS3DestinationConfiguration: { + bucketArn: bucket.bucketArn, + roleArn: firehoseRole.roleArn, + }, +}); +bucket.grantReadWrite(firehoseRole); + +const event = new events.Rule(stack, 'EveryMinute', { + schedule: events.Schedule.rate(cdk.Duration.minutes(1)), +}); + +event.addTarget(new targets.KinesisFirehoseStream(stream, {})); + +app.synth(); diff --git a/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/kinesis-firehose-stream.test.ts b/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/kinesis-firehose-stream.test.ts new file mode 100644 index 0000000000000..556816853fee2 --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/test/kinesis-firehose/kinesis-firehose-stream.test.ts @@ -0,0 +1,80 @@ +import { expect, haveResource, haveResourceLike } from '@aws-cdk/assert'; +import * as events from '@aws-cdk/aws-events'; +import * as firehose from '@aws-cdk/aws-kinesisfirehose'; +import { Stack } from '@aws-cdk/core'; +import * as targets from '../../lib'; + +describe('KinesisFirehoseStream event target', () => { + let stack: Stack; + let stream: firehose.CfnDeliveryStream; + let streamArn: any; + + beforeEach(() => { + stack = new Stack(); + stream = new firehose.CfnDeliveryStream(stack, 'MyStream'); + streamArn = { 'Fn::GetAtt': ['MyStream', 'Arn'] }; + }); + + describe('when added to an event rule as a target', () => { + let rule: events.Rule; + + beforeEach(() => { + rule = new events.Rule(stack, 'rule', { + schedule: events.Schedule.expression('rate(1 minute)'), + }); + }); + + describe('with default settings', () => { + beforeEach(() => { + rule.addTarget(new targets.KinesisFirehoseStream(stream)); + }); + + test("adds the stream's ARN and role to the targets of the rule", () => { + expect(stack).to(haveResource('AWS::Events::Rule', { + Targets: [ + { + Arn: streamArn, + Id: 'Target0', + RoleArn: { 'Fn::GetAtt': ['MyStreamEventsRole5B6CC6AF', 'Arn'] }, + }, + ], + })); + }); + + test("creates a policy that has PutRecord and PutRecords permissions on the stream's ARN", () => { + expect(stack).to(haveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: ['firehose:PutRecord', 'firehose:PutRecordBatch'], + Effect: 'Allow', + Resource: streamArn, + }, + ], + Version: '2012-10-17', + }, + })); + }); + }); + + describe('with an explicit message', () => { + beforeEach(() => { + rule.addTarget(new targets.KinesisFirehoseStream(stream, { + message: events.RuleTargetInput.fromText('fooBar'), + })); + }); + + test('sets the input', () => { + expect(stack).to(haveResourceLike('AWS::Events::Rule', { + Targets: [ + { + Arn: streamArn, + Id: 'Target0', + Input: '"fooBar"', + }, + ], + })); + }); + }); + }); +}); From 170551e75f1699efa5ed49a65c7fb4641915810c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2020 07:38:05 +0000 Subject: [PATCH 03/45] chore(deps): bump jest from 26.4.2 to 26.6.0 (#10973) Bumps [jest](https://github.com/facebook/jest) from 26.4.2 to 26.6.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v26.4.2...v26.6.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../ecs-service-extensions/package.json | 2 +- packages/@aws-cdk/assert/package.json | 4 +- packages/@aws-cdk/aws-appsync/package.json | 2 +- .../aws-autoscaling-hooktargets/package.json | 2 +- packages/@aws-cdk/aws-batch/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- .../aws-cloudwatch-actions/package.json | 2 +- packages/@aws-cdk/aws-cognito/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- .../@aws-cdk/aws-ecs-patterns/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-glue/package.json | 2 +- packages/@aws-cdk/aws-iam/package.json | 2 +- .../aws-lambda-destinations/package.json | 2 +- packages/@aws-cdk/aws-lambda/package.json | 2 +- .../aws-logs-destinations/package.json | 2 +- packages/@aws-cdk/aws-redshift/package.json | 2 +- .../aws-route53-patterns/package.json | 2 +- .../@aws-cdk/aws-route53-targets/package.json | 2 +- .../@aws-cdk/aws-s3-deployment/package.json | 2 +- .../aws-s3-notifications/package.json | 2 +- packages/@aws-cdk/aws-sam/package.json | 2 +- .../@aws-cdk/aws-ses-actions/package.json | 2 +- .../aws-sns-subscriptions/package.json | 2 +- .../aws-stepfunctions-tasks/package.json | 2 +- .../@aws-cdk/cdk-assets-schema/package.json | 2 +- .../cloud-assembly-schema/package.json | 2 +- .../@aws-cdk/cloudformation-diff/package.json | 2 +- .../cloudformation-include/package.json | 2 +- packages/@aws-cdk/cx-api/package.json | 2 +- .../example-construct-library/package.json | 2 +- packages/@aws-cdk/yaml-cfn/package.json | 2 +- .../@monocdk-experiment/assert/package.json | 4 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/cdk-dasm/package.json | 2 +- packages/decdk/package.json | 2 +- tools/cdk-build-tools/package.json | 2 +- tools/cfn2ts/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/pkglint/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 1357 +++++------------ 46 files changed, 410 insertions(+), 1041 deletions(-) diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index 908ab993cf42f..993be82075433 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -40,7 +40,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^25.5.4", + "jest": "^26.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index e2476231c0af3..047998b2e3ef9 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -23,7 +23,7 @@ "devDependencies": { "@types/jest": "^26.0.14", "cdk-build-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0", "ts-jest": "^26.4.1" }, @@ -37,7 +37,7 @@ "peerDependencies": { "@aws-cdk/core": "0.0.0", "constructs": "^3.0.4", - "jest": "^26.4.2" + "jest": "^26.6.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index 77fb13de689f3..1bbdcb00298aa 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index b5bf3df6b0b48..3a046c9503859 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index 83a0722c1844c..5caaf31e20bd7 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 6d60bf80a6cf5..4306f050b9d1c 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -78,7 +78,7 @@ "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "colors": "^1.4.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index 5cd9a914188f9..7a3b1456a6141 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index df7f26c5591cc..c54873f73863e 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -77,7 +77,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index db8e59fd3be05..bd0deb1d79d30 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -79,7 +79,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0", "sinon": "^9.1.0", "ts-jest": "^26.4.1" diff --git a/packages/@aws-cdk/aws-ecs-patterns/package.json b/packages/@aws-cdk/aws-ecs-patterns/package.json index a8d7905e89cf2..ead8ced0e0ee1 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/package.json +++ b/packages/@aws-cdk/aws-ecs-patterns/package.json @@ -69,7 +69,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index 9dd9b82ea2479..ab1cb8cca2023 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -67,7 +67,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index d5148b9709815..82ce69cee6101 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -67,7 +67,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 0ad61bef081c0..d1574a3c058c2 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -79,7 +79,7 @@ "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-glue/package.json b/packages/@aws-cdk/aws-glue/package.json index 853f13eba7f69..04b84d3c347b5 100644 --- a/packages/@aws-cdk/aws-glue/package.json +++ b/packages/@aws-cdk/aws-glue/package.json @@ -77,7 +77,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index baadb15f398eb..efa705aaf669c 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -76,7 +76,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0", "sinon": "^9.1.0" }, diff --git a/packages/@aws-cdk/aws-lambda-destinations/package.json b/packages/@aws-cdk/aws-lambda-destinations/package.json index c6b1414588d2f..64232e6f367a1 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/package.json +++ b/packages/@aws-cdk/aws-lambda-destinations/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 198d840dbf4ab..056ccb67e6d68 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -82,7 +82,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "lodash": "^4.17.20", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index 8f7f06ef3d4b0..cb20a511c902e 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index 73619e02a08b6..9b44d2a15a36a 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index 0ea5727474b23..f85057928fb12 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index 1d069b61487a8..078ff6f6acb50 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -69,7 +69,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index 7394ffb84b4d8..92d6ab6fbcd2f 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -87,7 +87,7 @@ "@types/jest": "^26.0.14", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-s3-notifications/package.json b/packages/@aws-cdk/aws-s3-notifications/package.json index bc818c945ef07..ab017d60d912f 100644 --- a/packages/@aws-cdk/aws-s3-notifications/package.json +++ b/packages/@aws-cdk/aws-s3-notifications/package.json @@ -66,7 +66,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index d9178069d5f23..840669a6c7c50 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -77,7 +77,7 @@ "@types/jest": "^26.0.14", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0", "ts-jest": "^26.4.1" }, diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index 80842ef57969a..8ef2f699f5feb 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -68,7 +68,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index 44c9aa6963dff..aa22738a1b647 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index 860f8ec7d16ea..4e77e858735cf 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -69,7 +69,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index a2f6e7a88f7e8..2bae672bd0d70 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -53,7 +53,7 @@ "devDependencies": { "@types/jest": "^26.0.14", "cdk-build-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "repository": { diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 8db7c0ed14807..003e36566b529 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -55,7 +55,7 @@ "@types/jest": "^26.0.14", "@types/mock-fs": "^4.10.0", "cdk-build-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "mock-fs": "^4.13.0", "pkglint": "0.0.0", "typescript-json-schema": "^0.43.0" diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index a3c33a52eae91..3449a436cfd91 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -34,7 +34,7 @@ "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", "fast-check": "^2.4.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0", "ts-jest": "^26.4.1" }, diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 014f66012e9c9..0e340761cb8a5 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -330,7 +330,7 @@ "@types/jest": "^26.0.14", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0", "ts-jest": "^26.4.1" }, diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index 4f4bc15e84a3a..abd8a47463b29 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -62,7 +62,7 @@ "@types/mock-fs": "^4.10.0", "@types/semver": "^7.3.4", "cdk-build-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "mock-fs": "^4.13.0", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index 1fcfaf962ed3c..a15bb0cdd6284 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -68,7 +68,7 @@ "@aws-cdk/assert": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/yaml-cfn/package.json b/packages/@aws-cdk/yaml-cfn/package.json index ae3e876d12b80..579c9d6caa626 100644 --- a/packages/@aws-cdk/yaml-cfn/package.json +++ b/packages/@aws-cdk/yaml-cfn/package.json @@ -71,7 +71,7 @@ "@types/jest": "^26.0.14", "@types/yaml": "^1.9.7", "cdk-build-tools": "0.0.0", - "jest": "^25.5.4", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "bundledDependencies": [ diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 063ac8be41c60..712960c6939c7 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -38,7 +38,7 @@ "@types/node": "^10.17.35", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", - "jest": "^26.4.2", + "jest": "^26.6.0", "monocdk": "0.0.0", "pkglint": "0.0.0", "ts-jest": "^26.4.1" @@ -48,7 +48,7 @@ }, "peerDependencies": { "constructs": "^3.0.4", - "jest": "^26.4.2", + "jest": "^26.6.0", "monocdk": "^0.0.0" }, "repository": { diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index e02905f1c86ae..005f0eebf6860 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -55,7 +55,7 @@ "@types/yargs": "^15.0.7", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "mockery": "^2.1.0", "pkglint": "0.0.0", "sinon": "^9.1.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index d0a828f251ea5..fb161725cbfe2 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -38,7 +38,7 @@ "@types/node": "^10.17.35", "@types/yargs": "^15.0.7", "cdk-build-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "jszip": "^3.5.0", "mock-fs": "^4.13.0", "pkglint": "0.0.0" diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 16469f7b1b5e1..9d30566e8d12b 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@types/jest": "^26.0.14", "@types/yaml": "1.9.7", - "jest": "^26.4.2" + "jest": "^26.6.0" }, "keywords": [ "aws", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index f87aadce13e5d..eb62f163f0f83 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -199,7 +199,7 @@ "@types/jest": "^26.0.14", "@types/yaml": "1.9.7", "@types/yargs": "^15.0.7", - "jest": "^26.4.2", + "jest": "^26.6.0", "jsii": "^1.13.0" }, "keywords": [ diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 7e5ea946ea5b3..be921ac90d11a 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -49,7 +49,7 @@ "eslint-import-resolver-typescript": "^2.3.0", "eslint-plugin-import": "^2.22.1", "fs-extra": "^9.0.1", - "jest": "^26.4.2", + "jest": "^26.6.0", "jsii": "^1.13.0", "jsii-pacmak": "^1.13.0", "nodeunit": "^0.11.3", diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 899adf76ae1e5..27ace1c44318a 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -40,7 +40,7 @@ "@types/jest": "^26.0.14", "@types/yargs": "^15.0.7", "cdk-build-tools": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0" }, "keywords": [ diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index 4615b43cd6e63..b5e8bff810c80 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -17,7 +17,7 @@ "@types/jest": "^26.0.14", "@types/node": "^10.17.35", "eslint-plugin-rulesdir": "^0.1.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index ebec2519fd49a..d45e805571d31 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -17,7 +17,7 @@ "typescript": "~3.9.7" }, "dependencies": { - "jest": "^26.4.2" + "jest": "^26.6.0" }, "keywords": [], "author": "", diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index b1ac5ff7aec8a..5f3b0cb82b8b9 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -39,7 +39,7 @@ "@types/semver": "^7.3.4", "@types/yargs": "^15.0.7", "eslint-plugin-cdk": "0.0.0", - "jest": "^26.4.2", + "jest": "^26.6.0", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index c13cbd2017aa4..00cc54e406985 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -41,7 +41,7 @@ "@types/jest": "^26.0.14", "@types/node": "^10.17.35", "@types/yarnpkg__lockfile": "^1.1.4", - "jest": "^26.4.2", + "jest": "^26.6.0", "pkglint": "0.0.0", "typescript": "~3.9.7" }, diff --git a/yarn.lock b/yarn.lock index e4f611e815cb4..2e9cf8eb723af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1084,199 +1084,93 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.5.0.tgz#770800799d510f37329c508a9edd0b7b447d9abb" - integrity sha512-T48kZa6MK1Y6k4b89sexwmSF4YLeZS/Udqg3Jj3jG/cHH+N/sLFCEoXEDMOKugJQ9FxPN1osxIknvKkxt6MKyw== - dependencies: - "@jest/types" "^25.5.0" - chalk "^3.0.0" - jest-message-util "^25.5.0" - jest-util "^25.5.0" - slash "^3.0.0" - -"@jest/console@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.3.0.tgz#ed04063efb280c88ba87388b6f16427c0a85c856" - integrity sha512-/5Pn6sJev0nPUcAdpJHMVIsA8sKizL2ZkcKPE5+dJrCccks7tcM7c9wbgHudBJbxXLoTbqsHkG1Dofoem4F09w== +"@jest/console@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.0.tgz#fd4a4733df3c50260aefb227414296aee96e682f" + integrity sha512-ArGcZWAEYMWmWnc/QvxLDvFmGRPvmHeulhS7FUUAlUGR5vS/SqMfArsGaYmIFEThSotCMnEihwx1h62I1eg5lg== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.3.0" - jest-util "^26.3.0" + jest-message-util "^26.6.0" + jest-util "^26.6.0" slash "^3.0.0" -"@jest/core@^25.5.4": - version "25.5.4" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.5.4.tgz#3ef7412f7339210f003cdf36646bbca786efe7b4" - integrity sha512-3uSo7laYxF00Dg/DMgbn4xMJKmDdWvZnf89n8Xj/5/AeQ2dOQmn6b6Hkj/MleyzZWXpwv+WSdYWl4cLsy2JsoA== +"@jest/core@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.0.tgz#04dd3e046e9ebbe06a4f330e05a67f21f7bb314a" + integrity sha512-7wbunxosnC5zXjxrEtTQSblFjRVOT8qz1eSytw8riEeWgegy3ct91NLPEP440CDuWrmW3cOLcEGxIf9q2u6O9Q== dependencies: - "@jest/console" "^25.5.0" - "@jest/reporters" "^25.5.1" - "@jest/test-result" "^25.5.0" - "@jest/transform" "^25.5.1" - "@jest/types" "^25.5.0" - ansi-escapes "^4.2.1" - chalk "^3.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-changed-files "^25.5.0" - jest-config "^25.5.4" - jest-haste-map "^25.5.1" - jest-message-util "^25.5.0" - jest-regex-util "^25.2.6" - jest-resolve "^25.5.1" - jest-resolve-dependencies "^25.5.4" - jest-runner "^25.5.4" - jest-runtime "^25.5.4" - jest-snapshot "^25.5.1" - jest-util "^25.5.0" - jest-validate "^25.5.0" - jest-watcher "^25.5.0" - micromatch "^4.0.2" - p-each-series "^2.1.0" - realpath-native "^2.0.0" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/core@^26.4.2": - version "26.4.2" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.4.2.tgz#85d0894f31ac29b5bab07aa86806d03dd3d33edc" - integrity sha512-sDva7YkeNprxJfepOctzS8cAk9TOekldh+5FhVuXS40+94SHbiicRO1VV2tSoRtgIo+POs/Cdyf8p76vPTd6dg== - dependencies: - "@jest/console" "^26.3.0" - "@jest/reporters" "^26.4.1" - "@jest/test-result" "^26.3.0" - "@jest/transform" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/console" "^26.6.0" + "@jest/reporters" "^26.6.0" + "@jest/test-result" "^26.6.0" + "@jest/transform" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.3.0" - jest-config "^26.4.2" - jest-haste-map "^26.3.0" - jest-message-util "^26.3.0" + jest-changed-files "^26.6.0" + jest-config "^26.6.0" + jest-haste-map "^26.6.0" + jest-message-util "^26.6.0" jest-regex-util "^26.0.0" - jest-resolve "^26.4.0" - jest-resolve-dependencies "^26.4.2" - jest-runner "^26.4.2" - jest-runtime "^26.4.2" - jest-snapshot "^26.4.2" - jest-util "^26.3.0" - jest-validate "^26.4.2" - jest-watcher "^26.3.0" + jest-resolve "^26.6.0" + jest-resolve-dependencies "^26.6.0" + jest-runner "^26.6.0" + jest-runtime "^26.6.0" + jest-snapshot "^26.6.0" + jest-util "^26.6.0" + jest-validate "^26.6.0" + jest-watcher "^26.6.0" micromatch "^4.0.2" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.5.0.tgz#aa33b0c21a716c65686638e7ef816c0e3a0c7b37" - integrity sha512-U2VXPEqL07E/V7pSZMSQCvV5Ea4lqOlT+0ZFijl/i316cRMHvZ4qC+jBdryd+lmRetjQo0YIQr6cVPNxxK87mA== - dependencies: - "@jest/fake-timers" "^25.5.0" - "@jest/types" "^25.5.0" - jest-mock "^25.5.0" - -"@jest/environment@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.3.0.tgz#e6953ab711ae3e44754a025f838bde1a7fd236a0" - integrity sha512-EW+MFEo0DGHahf83RAaiqQx688qpXgl99wdb8Fy67ybyzHwR1a58LHcO376xQJHfmoXTu89M09dH3J509cx2AA== +"@jest/environment@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.0.tgz#695ee24cbf110456272caa9debbbf7e01afb2f78" + integrity sha512-l+5MSdiC4rUUrz8xPdj0TwHBwuoqMcAbFnsYDTn5FkenJl8b+lvC5NdJl1tVICGHWnx0fnjdd1luRZ7u3U4xyg== dependencies: - "@jest/fake-timers" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/fake-timers" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" - jest-mock "^26.3.0" + jest-mock "^26.6.0" -"@jest/fake-timers@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.5.0.tgz#46352e00533c024c90c2bc2ad9f2959f7f114185" - integrity sha512-9y2+uGnESw/oyOI3eww9yaxdZyHq7XvprfP/eeoCsjqKYts2yRlsHS/SgjPDV8FyMfn2nbMy8YzUk6nyvdLOpQ== - dependencies: - "@jest/types" "^25.5.0" - jest-message-util "^25.5.0" - jest-mock "^25.5.0" - jest-util "^25.5.0" - lolex "^5.0.0" - -"@jest/fake-timers@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.3.0.tgz#f515d4667a6770f60ae06ae050f4e001126c666a" - integrity sha512-ZL9ytUiRwVP8ujfRepffokBvD2KbxbqMhrXSBhSdAhISCw3gOkuntisiSFv+A6HN0n0fF4cxzICEKZENLmW+1A== +"@jest/fake-timers@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.0.tgz#5b4cc83fab91029963c53e6e2716f02544323b22" + integrity sha512-7VQpjChrwlwvGNysS10lDBLOVLxMvMtpx0Xo6aIotzNVyojYk0NN0CR8R4T6h/eu7Zva/LB3P71jqwGdtADoag== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" "@sinonjs/fake-timers" "^6.0.1" "@types/node" "*" - jest-message-util "^26.3.0" - jest-mock "^26.3.0" - jest-util "^26.3.0" - -"@jest/globals@^25.5.2": - version "25.5.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-25.5.2.tgz#5e45e9de8d228716af3257eeb3991cc2e162ca88" - integrity sha512-AgAS/Ny7Q2RCIj5kZ+0MuKM1wbF0WMLxbCVl/GOMoCNbODRdJ541IxJ98xnZdVSZXivKpJlNPIWa3QmY0l4CXA== - dependencies: - "@jest/environment" "^25.5.0" - "@jest/types" "^25.5.0" - expect "^25.5.0" + jest-message-util "^26.6.0" + jest-mock "^26.6.0" + jest-util "^26.6.0" -"@jest/globals@^26.4.2": - version "26.4.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.4.2.tgz#73c2a862ac691d998889a241beb3dc9cada40d4a" - integrity sha512-Ot5ouAlehhHLRhc+sDz2/9bmNv9p5ZWZ9LE1pXGGTCXBasmi5jnYjlgYcYt03FBwLmZXCZ7GrL29c33/XRQiow== +"@jest/globals@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.0.tgz#da2f58d17105b6a7531ee3c8724acb5f233400e2" + integrity sha512-rs3a/a8Lq8FgTx11SxbqIU2bDjsFU2PApl2oK2oUVlo84RSF76afFm2nLojW93AGssr715GHUwhq5b6mpCI5BQ== dependencies: - "@jest/environment" "^26.3.0" - "@jest/types" "^26.3.0" - expect "^26.4.2" - -"@jest/reporters@^25.5.1": - version "25.5.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.5.1.tgz#cb686bcc680f664c2dbaf7ed873e93aa6811538b" - integrity sha512-3jbd8pPDTuhYJ7vqiHXbSwTJQNavczPs+f1kRprRDxETeE3u6srJ+f0NPuwvOmk+lmunZzPkYWIFZDLHQPkviw== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^25.5.0" - "@jest/test-result" "^25.5.0" - "@jest/transform" "^25.5.1" - "@jest/types" "^25.5.0" - chalk "^3.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.2.4" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^4.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - jest-haste-map "^25.5.1" - jest-resolve "^25.5.1" - jest-util "^25.5.0" - jest-worker "^25.5.0" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^3.1.0" - terminal-link "^2.0.0" - v8-to-istanbul "^4.1.3" - optionalDependencies: - node-notifier "^6.0.0" + "@jest/environment" "^26.6.0" + "@jest/types" "^26.6.0" + expect "^26.6.0" -"@jest/reporters@^26.4.1": - version "26.4.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.4.1.tgz#3b4d6faf28650f3965f8b97bc3d114077fb71795" - integrity sha512-aROTkCLU8++yiRGVxLsuDmZsQEKO6LprlrxtAuzvtpbIFl3eIjgIf3EUxDKgomkS25R9ZzwGEdB5weCcBZlrpQ== +"@jest/reporters@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.0.tgz#2a8d631ad3b19a722fd0fae58ce9fa25e8aac1cf" + integrity sha512-PXbvHhdci5Rj1VFloolgLb+0kkdtzswhG8MzVENKJRI3O1ndwr52G6E/2QupjwrRcYnApZOelFf4nNpf5+SDxA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.3.0" - "@jest/test-result" "^26.3.0" - "@jest/transform" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/console" "^26.6.0" + "@jest/test-result" "^26.6.0" + "@jest/transform" "^26.6.0" + "@jest/types" "^26.6.0" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -1287,115 +1181,63 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.3.0" - jest-resolve "^26.4.0" - jest-util "^26.3.0" - jest-worker "^26.3.0" + jest-haste-map "^26.6.0" + jest-resolve "^26.6.0" + jest-util "^26.6.0" + jest-worker "^26.5.0" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" terminal-link "^2.0.0" - v8-to-istanbul "^5.0.1" + v8-to-istanbul "^6.0.1" optionalDependencies: node-notifier "^8.0.0" -"@jest/source-map@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.5.0.tgz#df5c20d6050aa292c2c6d3f0d2c7606af315bd1b" - integrity sha512-eIGx0xN12yVpMcPaVpjXPnn3N30QGJCJQSkEDUt9x1fI1Gdvb07Ml6K5iN2hG7NmMP6FDmtPEssE3z6doOYUwQ== +"@jest/source-map@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.5.0.tgz#98792457c85bdd902365cd2847b58fff05d96367" + integrity sha512-jWAw9ZwYHJMe9eZq/WrsHlwF8E3hM9gynlcDpOyCb9bR8wEd9ZNBZCi7/jZyzHxC7t3thZ10gO2IDhu0bPKS5g== dependencies: callsites "^3.0.0" graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/source-map@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.3.0.tgz#0e646e519883c14c551f7b5ae4ff5f1bfe4fc3d9" - integrity sha512-hWX5IHmMDWe1kyrKl7IhFwqOuAreIwHhbe44+XH2ZRHjrKIh0LO5eLQ/vxHFeAfRwJapmxuqlGAEYLadDq6ZGQ== +"@jest/test-result@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.0.tgz#79705c8a57165777af5ef1d45c65dcc4a5965c11" + integrity sha512-LV6X1ry+sKjseQsIFz3e6XAZYxwidvmeJFnVF08fq98q08dF1mJYI0lDq/LmH/jas+R4s0pwnNGiz1hfC4ZUBw== dependencies: - callsites "^3.0.0" - graceful-fs "^4.2.4" - source-map "^0.6.0" - -"@jest/test-result@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.5.0.tgz#139a043230cdeffe9ba2d8341b27f2efc77ce87c" - integrity sha512-oV+hPJgXN7IQf/fHWkcS99y0smKLU2czLBJ9WA0jHITLst58HpQMtzSYxzaBvYc6U5U6jfoMthqsUlUlbRXs0A== - dependencies: - "@jest/console" "^25.5.0" - "@jest/types" "^25.5.0" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-result@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.3.0.tgz#46cde01fa10c0aaeb7431bf71e4a20d885bc7fdb" - integrity sha512-a8rbLqzW/q7HWheFVMtghXV79Xk+GWwOK1FrtimpI5n1la2SY0qHri3/b0/1F0Ve0/yJmV8pEhxDfVwiUBGtgg== - dependencies: - "@jest/console" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/console" "^26.6.0" + "@jest/types" "^26.6.0" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^25.5.4": - version "25.5.4" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.5.4.tgz#9b4e685b36954c38d0f052e596d28161bdc8b737" - integrity sha512-pTJGEkSeg1EkCO2YWq6hbFvKNXk8ejqlxiOg1jBNLnWrgXOkdY6UmqZpwGFXNnRt9B8nO1uWMzLLZ4eCmhkPNA== - dependencies: - "@jest/test-result" "^25.5.0" - graceful-fs "^4.2.4" - jest-haste-map "^25.5.1" - jest-runner "^25.5.4" - jest-runtime "^25.5.4" - -"@jest/test-sequencer@^26.4.2": - version "26.4.2" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.4.2.tgz#58a3760a61eec758a2ce6080201424580d97cbba" - integrity sha512-83DRD8N3M0tOhz9h0bn6Kl6dSp+US6DazuVF8J9m21WAp5x7CqSMaNycMP0aemC/SH/pDQQddbsfHRTBXVUgog== +"@jest/test-sequencer@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.0.tgz#a9dbc6545b1c59e7f375b05466e172126609906d" + integrity sha512-rWPTMa+8rejvePZnJmnKkmKWh0qILFDPpN0qbSif+KNGvFxqqDGafMo4P2Y8+I9XWrZQBeXL9IxPL4ZzDgRlbw== dependencies: - "@jest/test-result" "^26.3.0" + "@jest/test-result" "^26.6.0" graceful-fs "^4.2.4" - jest-haste-map "^26.3.0" - jest-runner "^26.4.2" - jest-runtime "^26.4.2" + jest-haste-map "^26.6.0" + jest-runner "^26.6.0" + jest-runtime "^26.6.0" -"@jest/transform@^25.5.1": - version "25.5.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.5.1.tgz#0469ddc17699dd2bf985db55fa0fb9309f5c2db3" - integrity sha512-Y8CEoVwXb4QwA6Y/9uDkn0Xfz0finGkieuV0xkdF9UtZGJeLukD5nLkaVrVsODB1ojRWlaoD0AJZpVHCSnJEvg== +"@jest/transform@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.0.tgz#1a6b95d0c7f9b4f96dd3aab9d28422a9e5e4043e" + integrity sha512-NUNA1NMCyVV9g5NIQF1jzW7QutQhB/HAocteCiUyH0VhmLXnGMTfPYQu1G6IjPk+k1SWdh2PD+Zs1vMqbavWzg== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^25.5.0" - babel-plugin-istanbul "^6.0.0" - chalk "^3.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.4" - jest-haste-map "^25.5.1" - jest-regex-util "^25.2.6" - jest-util "^25.5.0" - micromatch "^4.0.2" - pirates "^4.0.1" - realpath-native "^2.0.0" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" - -"@jest/transform@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.3.0.tgz#c393e0e01459da8a8bfc6d2a7c2ece1a13e8ba55" - integrity sha512-Isj6NB68QorGoFWvcOjlUhpkT56PqNIsXKR7XfvoDlCANn/IANlh8DrKAA2l2JKC3yWSMH5wS0GwuQM20w3b2A== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^26.3.0" + jest-haste-map "^26.6.0" jest-regex-util "^26.0.0" - jest-util "^26.3.0" + jest-util "^26.6.0" micromatch "^4.0.2" pirates "^4.0.1" slash "^3.0.0" @@ -1423,6 +1265,17 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jest/types@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.0.tgz#2c045f231bfd79d52514cda3fbc93ef46157fa6a" + integrity sha512-8pDeq/JVyAYw7jBGU83v8RMYAkdrRxLG3BGnAJuqaQAUd6GWBmND2uyl+awI88+hit48suLoLjNFtR+ZXxWaYg== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@jsii/spec@^1.13.0": version "1.13.0" resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.13.0.tgz#3389e047065b6b7f7fda238a90d58ac577c811bf" @@ -3161,7 +3014,7 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.15.tgz#db9e4238931eb69ef8aab0ad6523d4d4caa39d03" integrity sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A== @@ -3319,11 +3172,6 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/prettier@^1.19.0": - version "1.19.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" - integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== - "@types/prettier@^2.0.0": version "2.1.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.1.tgz#be148756d5480a84cde100324c03a86ae5739fb5" @@ -3363,10 +3211,10 @@ resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz#3a84cf5ec3249439015e14049bd3161419bf9eae" integrity sha512-dIPoZ3g5gcx9zZEszaxLSVTvMReD3xxyyDnQUjA6IYDG9Ba2AV0otMPs+77sG9ojB4Qr2N2Vk5RnKeuA0X/0bg== -"@types/stack-utils@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" - integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== +"@types/stack-utils@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" + integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== "@types/string-width@^4.0.1": version "4.0.1" @@ -3528,7 +3376,7 @@ abortcontroller-polyfill@^1.1.9: resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.5.0.tgz#2c562f530869abbcf88d949a2b60d1d402e87a7c" integrity sha512-O6Xk757Jb4o0LMzMOMdWvxpHWrQzruYBaUruFaIOfAQRnWFxfdXYobw12jrVHGtoXk6WiiyYzc0QWN9aL62HQA== -acorn-globals@^4.3.0, acorn-globals@^4.3.2: +acorn-globals@^4.3.0: version "4.3.4" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== @@ -3564,7 +3412,7 @@ acorn@^6.0.1, acorn@^6.0.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== -acorn@^7.1.0, acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.1.1, acorn@^7.4.0: version "7.4.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== @@ -4000,30 +3848,16 @@ axios@^0.19.0: dependencies: follow-redirects "1.5.10" -babel-jest@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.5.1.tgz#bc2e6101f849d6f6aec09720ffc7bc5332e62853" - integrity sha512-9dA9+GmMjIzgPnYtkhBg73gOo/RHqPmLruP3BaGL4KEX3Dwz6pI8auSN8G8+iuEG90+GSswyKvslN+JYSaacaQ== +babel-jest@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.0.tgz#eca57ac8af99d6e06047e595b1faf0b5adf8a7bb" + integrity sha512-JI66yILI7stzjHccAoQtRKcUwJrJb4oMIxLTirL3GdAjGpaUBQSjZDFi9LsPkN4gftsS4R2AThAJwOjJxadwbg== dependencies: - "@jest/transform" "^25.5.1" - "@jest/types" "^25.5.0" + "@jest/transform" "^26.6.0" + "@jest/types" "^26.6.0" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^25.5.0" - chalk "^3.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - -babel-jest@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.3.0.tgz#10d0ca4b529ca3e7d1417855ef7d7bd6fc0c3463" - integrity sha512-sxPnQGEyHAOPF8NcUsD0g7hDCnvLL2XyblRBcgrzTWBB/mAIpWow3n1bEL+VghnnZfreLhFSBsFluRoK2tRK4g== - dependencies: - "@jest/transform" "^26.3.0" - "@jest/types" "^26.3.0" - "@types/babel__core" "^7.1.7" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^26.3.0" + babel-preset-jest "^26.5.0" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -4046,26 +3880,17 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.5.0.tgz#129c80ba5c7fc75baf3a45b93e2e372d57ca2677" - integrity sha512-u+/W+WAjMlvoocYGTwthAiQSxDcJAyHpQ6oWlHdFZaaN+Rlk8Q7iiwDPg2lN/FyJtAYnKjFxbn7xus4HCFkg5g== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__traverse" "^7.0.6" - -babel-plugin-jest-hoist@^26.2.0: - version "26.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.2.0.tgz#bdd0011df0d3d513e5e95f76bd53b51147aca2dd" - integrity sha512-B/hVMRv8Nh1sQ1a3EY8I0n4Y1Wty3NrR5ebOyVT302op+DOAau+xNEImGMsUWOC3++ZlMooCytKz+NgN8aKGbA== +babel-plugin-jest-hoist@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.5.0.tgz#3916b3a28129c29528de91e5784a44680db46385" + integrity sha512-ck17uZFD3CDfuwCLATWZxkkuGGFhMij8quP8CNhwj8ek1mqFgbFzRJ30xwC04LLscj/aKsVFfRST+b5PT7rSuw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-preset-current-node-syntax@^0.1.2, babel-preset-current-node-syntax@^0.1.3: +babel-preset-current-node-syntax@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.3.tgz#b4b547acddbf963cba555ba9f9cbbb70bfd044da" integrity sha512-uyexu1sVwcdFnyq9o8UQYsXwXflIh8LvrF5+cKrYam93ned1CStffB3+BEcsxGSgagoA3GEyjDqO4a/58hyPYQ== @@ -4082,20 +3907,12 @@ babel-preset-current-node-syntax@^0.1.2, babel-preset-current-node-syntax@^0.1.3 "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -babel-preset-jest@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.5.0.tgz#c1d7f191829487a907764c65307faa0e66590b49" - integrity sha512-8ZczygctQkBU+63DtSOKGh7tFL0CeCuz+1ieud9lJ1WPQ9O6A1a/r+LGn6Y705PA6whHQ3T1XuB/PmpfNYf8Fw== - dependencies: - babel-plugin-jest-hoist "^25.5.0" - babel-preset-current-node-syntax "^0.1.2" - -babel-preset-jest@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.3.0.tgz#ed6344506225c065fd8a0b53e191986f74890776" - integrity sha512-5WPdf7nyYi2/eRxCbVrE1kKCWxgWY4RsPEbdJWFm7QsesFGqjdkyLeu1zRkwM1cxK6EPIlNd6d2AxLk7J+t4pw== +babel-preset-jest@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.5.0.tgz#f1b166045cd21437d1188d29f7fba470d5bdb0e7" + integrity sha512-F2vTluljhqkiGSJGBg/jOruA8vIIIL11YrxRcO7nviNTMbbofPSHwnm8mgP7d/wS7wRSexRoI6X1A6T74d4LQA== dependencies: - babel-plugin-jest-hoist "^26.2.0" + babel-plugin-jest-hoist "^26.5.0" babel-preset-current-node-syntax "^0.1.3" balanced-match@^1.0.0: @@ -4215,13 +4032,6 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browser-resolve@^1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" - integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== - dependencies: - resolve "1.1.7" - browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" @@ -5531,7 +5341,7 @@ cssom@0.3.x, cssom@^0.3.4, cssom@~0.3.6: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssom@^0.4.1, cssom@^0.4.4: +cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== @@ -5543,7 +5353,7 @@ cssstyle@^1.1.1: dependencies: cssom "0.3.x" -cssstyle@^2.0.0, cssstyle@^2.2.0: +cssstyle@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== @@ -5835,10 +5645,10 @@ diff-sequences@^25.2.6: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== -diff-sequences@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.3.0.tgz#62a59b1b29ab7fd27cef2a33ae52abe73042d0a2" - integrity sha512-5j5vdRcw3CNctePNYN0Wy2e/JbWT6cAYnXv5OuqPhDpyCGc0uLu2TK0zOCJWNB9kOIfYMSpIulRaDgIi4HJ6Ig== +diff-sequences@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" + integrity sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q== diff@^4.0.1, diff@^4.0.2: version "4.0.2" @@ -6228,7 +6038,7 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@1.x.x, escodegen@^1.11.0, escodegen@^1.11.1, escodegen@^1.14.1: +escodegen@1.x.x, escodegen@^1.11.0, escodegen@^1.14.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== @@ -6463,22 +6273,6 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-3.4.0.tgz#c08ed4550ef65d858fac269ffc8572446f37eb89" - integrity sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - p-finally "^2.0.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - execa@^4.0.0, execa@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" @@ -6512,28 +6306,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-25.5.0.tgz#f07f848712a2813bb59167da3fb828ca21f58bba" - integrity sha512-w7KAXo0+6qqZZhovCaBVPSIqQp7/UTcx4M9uKt2m6pd2VB1voyC8JizLRqeEqud3AAVP02g+hbErDu5gu64tlA== +expect@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.0.tgz#f48861317f62bb9f1248eaab7ae9e50a9a5a8339" + integrity sha512-EzhbZ1tbwcaa5Ok39BI11flIMeIUSlg1QsnXOrleaMvltwHsvIQPBtL710l+ma+qDFLUgktCXK4YuQzmHdm7cg== dependencies: - "@jest/types" "^25.5.0" - ansi-styles "^4.0.0" - jest-get-type "^25.2.6" - jest-matcher-utils "^25.5.0" - jest-message-util "^25.5.0" - jest-regex-util "^25.2.6" - -expect@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.4.2.tgz#36db120928a5a2d7d9736643032de32f24e1b2a1" - integrity sha512-IlJ3X52Z0lDHm7gjEp+m76uX46ldH5VpqmU0006vqDju/285twh7zaWMRhs67VpQhBwjjMchk+p5aA0VkERCAA== - dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.4.2" - jest-message-util "^26.3.0" + jest-matcher-utils "^26.6.0" + jest-message-util "^26.6.0" jest-regex-util "^26.0.0" extend-shallow@^2.0.1: @@ -8295,113 +8077,59 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.5.0.tgz#141cc23567ceb3f534526f8614ba39421383634c" - integrity sha512-EOw9QEqapsDT7mKF162m8HFzRPbmP8qJQny6ldVOdOVBz3ACgPm/1nAn5fPQ/NDaYhX/AHkrGwwkCncpAVSXcw== - dependencies: - "@jest/types" "^25.5.0" - execa "^3.2.0" - throat "^5.0.0" - -jest-changed-files@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.3.0.tgz#68fb2a7eb125f50839dab1f5a17db3607fe195b1" - integrity sha512-1C4R4nijgPltX6fugKxM4oQ18zimS7LqQ+zTTY8lMCMFPrxqBFb7KJH0Z2fRQJvw2Slbaipsqq7s1mgX5Iot+g== +jest-changed-files@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.0.tgz#63b04aa261b5733c6ade96b7dd24784d12d8bb2d" + integrity sha512-k8PZzlp3cRWDe0fDc/pYs+c4w36+hiWXe1PpW/pW1UJmu1TNTAcQfZUrVYleij+uEqlY6z4mPv7Iff3kY0o5SQ== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" execa "^4.0.0" throat "^5.0.0" -jest-cli@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.5.4.tgz#b9f1a84d1301a92c5c217684cb79840831db9f0d" - integrity sha512-rG8uJkIiOUpnREh1768/N3n27Cm+xPFkSNFO91tgg+8o2rXeVLStz+vkXkGr4UtzH6t1SNbjwoiswd7p4AhHTw== +jest-cli@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.0.tgz#dc3ae34fd5937310493ed07dc79c5ffba2bf6671" + integrity sha512-lJAMZGpmML+y3Kfln6L5DGRTfKGQ+n1JDM1RQstojSLUhe/EaXWR8vmcx70v4CyJKvFZs7c/0QDkPX5ra/aDew== dependencies: - "@jest/core" "^25.5.4" - "@jest/test-result" "^25.5.0" - "@jest/types" "^25.5.0" - chalk "^3.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - import-local "^3.0.2" - is-ci "^2.0.0" - jest-config "^25.5.4" - jest-util "^25.5.0" - jest-validate "^25.5.0" - prompts "^2.0.1" - realpath-native "^2.0.0" - yargs "^15.3.1" - -jest-cli@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.4.2.tgz#24afc6e4dfc25cde4c7ec4226fb7db5f157c21da" - integrity sha512-zb+lGd/SfrPvoRSC/0LWdaWCnscXc1mGYW//NP4/tmBvRPT3VntZ2jtKUONsRi59zc5JqmsSajA9ewJKFYp8Cw== - dependencies: - "@jest/core" "^26.4.2" - "@jest/test-result" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/core" "^26.6.0" + "@jest/test-result" "^26.6.0" + "@jest/types" "^26.6.0" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.4.2" - jest-util "^26.3.0" - jest-validate "^26.4.2" + jest-config "^26.6.0" + jest-util "^26.6.0" + jest-validate "^26.6.0" prompts "^2.0.1" - yargs "^15.3.1" - -jest-config@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.5.4.tgz#38e2057b3f976ef7309b2b2c8dcd2a708a67f02c" - integrity sha512-SZwR91SwcdK6bz7Gco8qL7YY2sx8tFJYzvg216DLihTWf+LKY/DoJXpM9nTzYakSyfblbqeU48p/p7Jzy05Atg== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^25.5.4" - "@jest/types" "^25.5.0" - babel-jest "^25.5.1" - chalk "^3.0.0" - deepmerge "^4.2.2" - glob "^7.1.1" - graceful-fs "^4.2.4" - jest-environment-jsdom "^25.5.0" - jest-environment-node "^25.5.0" - jest-get-type "^25.2.6" - jest-jasmine2 "^25.5.4" - jest-regex-util "^25.2.6" - jest-resolve "^25.5.1" - jest-util "^25.5.0" - jest-validate "^25.5.0" - micromatch "^4.0.2" - pretty-format "^25.5.0" - realpath-native "^2.0.0" + yargs "^15.4.1" -jest-config@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.4.2.tgz#da0cbb7dc2c131ffe831f0f7f2a36256e6086558" - integrity sha512-QBf7YGLuToiM8PmTnJEdRxyYy3mHWLh24LJZKVdXZ2PNdizSe1B/E8bVm+HYcjbEzGuVXDv/di+EzdO/6Gq80A== +jest-config@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.0.tgz#cb879a37002f881edb66d673fd40b6704595de89" + integrity sha512-RCR1Kf7MGJ5waVCvrj/k3nCAJKquWZlzs8rkskzj0KlG392hNBOaYd5FQ4cCac08j6pwfIDOwNvMcy0/FqguJg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.4.2" - "@jest/types" "^26.3.0" - babel-jest "^26.3.0" + "@jest/test-sequencer" "^26.6.0" + "@jest/types" "^26.6.0" + babel-jest "^26.6.0" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.3.0" - jest-environment-node "^26.3.0" + jest-environment-jsdom "^26.6.0" + jest-environment-node "^26.6.0" jest-get-type "^26.3.0" - jest-jasmine2 "^26.4.2" + jest-jasmine2 "^26.6.0" jest-regex-util "^26.0.0" - jest-resolve "^26.4.0" - jest-util "^26.3.0" - jest-validate "^26.4.2" + jest-resolve "^26.6.0" + jest-util "^26.6.0" + jest-validate "^26.6.0" micromatch "^4.0.2" - pretty-format "^26.4.2" + pretty-format "^26.6.0" -jest-diff@^25.2.1, jest-diff@^25.5.0: +jest-diff@^25.2.1: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== @@ -8411,22 +8139,15 @@ jest-diff@^25.2.1, jest-diff@^25.5.0: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-diff@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.4.2.tgz#a1b7b303bcc534aabdb3bd4a7caf594ac059f5aa" - integrity sha512-6T1XQY8U28WH0Z5rGpQ+VqZSZz8EN8rZcBtfvXaOkbwxIEeRre6qnuZQlbY1AJ4MKDxQF8EkrCvK+hL/VkyYLQ== +jest-diff@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.0.tgz#5e5bbbaf93ec5017fae2b3ef12fc895e29988379" + integrity sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w== dependencies: chalk "^4.0.0" - diff-sequences "^26.3.0" + diff-sequences "^26.5.0" jest-get-type "^26.3.0" - pretty-format "^26.4.2" - -jest-docblock@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.3.0.tgz#8b777a27e3477cd77a168c05290c471a575623ef" - integrity sha512-aktF0kCar8+zxRHxQZwxMy70stc9R1mOmrLsT5VO3pIT0uzGRSDAXxSlz4NqQWpuLjPpuMhPRl7H+5FRsvIQAg== - dependencies: - detect-newline "^3.0.0" + pretty-format "^26.6.0" jest-docblock@^26.0.0: version "26.0.0" @@ -8435,76 +8156,41 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.5.0.tgz#0c3c2797e8225cb7bec7e4d249dcd96b934be516" - integrity sha512-QBogUxna3D8vtiItvn54xXde7+vuzqRrEeaw8r1s+1TG9eZLVJE5ZkKoSUlqFwRjnlaA4hyKGiu9OlkFIuKnjA== +jest-each@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.0.tgz#9e9d90a4fc5a79e1d99a008897038325a6c7fbbf" + integrity sha512-7LzSNwNviYnm4FWK46itIE03NqD/8O8/7tVQ5rwTdTNrmPMQoQ1Z7hEFQ1uzRReluOFislpurpnQ0QsclSiDkA== dependencies: - "@jest/types" "^25.5.0" - chalk "^3.0.0" - jest-get-type "^25.2.6" - jest-util "^25.5.0" - pretty-format "^25.5.0" - -jest-each@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.4.2.tgz#bb14f7f4304f2bb2e2b81f783f989449b8b6ffae" - integrity sha512-p15rt8r8cUcRY0Mvo1fpkOGYm7iI8S6ySxgIdfh3oOIv+gHwrHTy5VWCGOecWUhDsit4Nz8avJWdT07WLpbwDA== - dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" chalk "^4.0.0" jest-get-type "^26.3.0" - jest-util "^26.3.0" - pretty-format "^26.4.2" + jest-util "^26.6.0" + pretty-format "^26.6.0" -jest-environment-jsdom@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.5.0.tgz#dcbe4da2ea997707997040ecf6e2560aec4e9834" - integrity sha512-7Jr02ydaq4jaWMZLY+Skn8wL5nVIYpWvmeatOHL3tOcV3Zw8sjnPpx+ZdeBfc457p8jCR9J6YCc+Lga0oIy62A== +jest-environment-jsdom@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.0.tgz#2ce353fb82d27a9066bfea3ff2c27d9405076c69" + integrity sha512-bXO9IG7a3YlyiHxwfKF+OWoTA+GIw4FrD+Y0pb6CC+nKs5JuSRZmR2ovEX6PWo6KY42ka3JoZOp3KEnXiFPPCg== dependencies: - "@jest/environment" "^25.5.0" - "@jest/fake-timers" "^25.5.0" - "@jest/types" "^25.5.0" - jest-mock "^25.5.0" - jest-util "^25.5.0" - jsdom "^15.2.1" - -jest-environment-jsdom@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.3.0.tgz#3b749ba0f3a78e92ba2c9ce519e16e5dd515220c" - integrity sha512-zra8He2btIMJkAzvLaiZ9QwEPGEetbxqmjEBQwhH3CA+Hhhu0jSiEJxnJMbX28TGUvPLxBt/zyaTLrOPF4yMJA== - dependencies: - "@jest/environment" "^26.3.0" - "@jest/fake-timers" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/environment" "^26.6.0" + "@jest/fake-timers" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" - jest-mock "^26.3.0" - jest-util "^26.3.0" - jsdom "^16.2.2" - -jest-environment-node@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.5.0.tgz#0f55270d94804902988e64adca37c6ce0f7d07a1" - integrity sha512-iuxK6rQR2En9EID+2k+IBs5fCFd919gVVK5BeND82fYeLWPqvRcFNPKu9+gxTwfB5XwBGBvZ0HFQa+cHtIoslA== - dependencies: - "@jest/environment" "^25.5.0" - "@jest/fake-timers" "^25.5.0" - "@jest/types" "^25.5.0" - jest-mock "^25.5.0" - jest-util "^25.5.0" - semver "^6.3.0" - -jest-environment-node@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.3.0.tgz#56c6cfb506d1597f94ee8d717072bda7228df849" - integrity sha512-c9BvYoo+FGcMj5FunbBgtBnbR5qk3uky8PKyRVpSfe2/8+LrNQMiXX53z6q2kY+j15SkjQCOSL/6LHnCPLVHNw== - dependencies: - "@jest/environment" "^26.3.0" - "@jest/fake-timers" "^26.3.0" - "@jest/types" "^26.3.0" + jest-mock "^26.6.0" + jest-util "^26.6.0" + jsdom "^16.4.0" + +jest-environment-node@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.0.tgz#97f6e48085e67bda43b97f48e678ce78d760cd14" + integrity sha512-kWU6ZD1h6fs7sIl6ufuK0sXW/3d6WLaj48iow0NxhgU6eY89d9K+0MVmE0cRcVlh53yMyxTK6b+TnhLOnlGp/A== + dependencies: + "@jest/environment" "^26.6.0" + "@jest/fake-timers" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" - jest-mock "^26.3.0" - jest-util "^26.3.0" + jest-mock "^26.6.0" + jest-util "^26.6.0" jest-get-type@^25.2.6: version "25.2.6" @@ -8516,92 +8202,49 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.5.1.tgz#1df10f716c1d94e60a1ebf7798c9fb3da2620943" - integrity sha512-dddgh9UZjV7SCDQUrQ+5t9yy8iEgKc1AKqZR9YDww8xsVOtzPQSMVLDChc21+g29oTRexb9/B0bIlZL+sWmvAQ== +jest-haste-map@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.0.tgz#4cd392bc51109bd8e0f765b2d5afa746bebb5ce2" + integrity sha512-RpNqAGMR58uG9E9vWITorX2/R7he/tSbHWldX5upt1ymEcmCaXczqXxjqI6xOtRR8Ev6ZEYDfgSA5Fy7WHUL5w== dependencies: - "@jest/types" "^25.5.0" - "@types/graceful-fs" "^4.1.2" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - jest-serializer "^25.5.0" - jest-util "^25.5.0" - jest-worker "^25.5.0" - micromatch "^4.0.2" - sane "^4.0.3" - walker "^1.0.7" - which "^2.0.2" - optionalDependencies: - fsevents "^2.1.2" - -jest-haste-map@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.3.0.tgz#c51a3b40100d53ab777bfdad382d2e7a00e5c726" - integrity sha512-DHWBpTJgJhLLGwE5Z1ZaqLTYqeODQIZpby0zMBsCU9iRFHYyhklYqP4EiG73j5dkbaAdSZhgB938mL51Q5LeZA== - dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.4" jest-regex-util "^26.0.0" - jest-serializer "^26.3.0" - jest-util "^26.3.0" - jest-worker "^26.3.0" + jest-serializer "^26.5.0" + jest-util "^26.6.0" + jest-worker "^26.5.0" micromatch "^4.0.2" sane "^4.0.3" walker "^1.0.7" optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.5.4.tgz#66ca8b328fb1a3c5364816f8958f6970a8526968" - integrity sha512-9acbWEfbmS8UpdcfqnDO+uBUgKa/9hcRh983IHdM+pKmJPL77G0sWAAK0V0kr5LK3a8cSBfkFSoncXwQlRZfkQ== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^25.5.0" - "@jest/source-map" "^25.5.0" - "@jest/test-result" "^25.5.0" - "@jest/types" "^25.5.0" - chalk "^3.0.0" - co "^4.6.0" - expect "^25.5.0" - is-generator-fn "^2.0.0" - jest-each "^25.5.0" - jest-matcher-utils "^25.5.0" - jest-message-util "^25.5.0" - jest-runtime "^25.5.4" - jest-snapshot "^25.5.1" - jest-util "^25.5.0" - pretty-format "^25.5.0" - throat "^5.0.0" - -jest-jasmine2@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.4.2.tgz#18a9d5bec30904267ac5e9797570932aec1e2257" - integrity sha512-z7H4EpCldHN1J8fNgsja58QftxBSL+JcwZmaXIvV9WKIM+x49F4GLHu/+BQh2kzRKHAgaN/E82od+8rTOBPyPA== +jest-jasmine2@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.0.tgz#1b59e26aa56651bae3d4637965c8cd4d3851de6d" + integrity sha512-2E3c+0A9y2OIK5caw5qlcm3b4doaf8FSfXKTX3xqKTUJoR4zXh0xvERBNWxZP9xMNXEi/2Z3LVsZpR2hROgixA== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.3.0" - "@jest/source-map" "^26.3.0" - "@jest/test-result" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/environment" "^26.6.0" + "@jest/source-map" "^26.5.0" + "@jest/test-result" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.4.2" + expect "^26.6.0" is-generator-fn "^2.0.0" - jest-each "^26.4.2" - jest-matcher-utils "^26.4.2" - jest-message-util "^26.3.0" - jest-runtime "^26.4.2" - jest-snapshot "^26.4.2" - jest-util "^26.3.0" - pretty-format "^26.4.2" + jest-each "^26.6.0" + jest-matcher-utils "^26.6.0" + jest-message-util "^26.6.0" + jest-runtime "^26.6.0" + jest-snapshot "^26.6.0" + jest-util "^26.6.0" + pretty-format "^26.6.0" throat "^5.0.0" jest-junit@^11.1.0: @@ -8614,331 +8257,168 @@ jest-junit@^11.1.0: uuid "^3.3.3" xml "^1.0.1" -jest-leak-detector@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.5.0.tgz#2291c6294b0ce404241bb56fe60e2d0c3e34f0bb" - integrity sha512-rV7JdLsanS8OkdDpZtgBf61L5xZ4NnYLBq72r6ldxahJWWczZjXawRsoHyXzibM5ed7C2QRjpp6ypgwGdKyoVA== - dependencies: - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - -jest-leak-detector@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.4.2.tgz#c73e2fa8757bf905f6f66fb9e0070b70fa0f573f" - integrity sha512-akzGcxwxtE+9ZJZRW+M2o+nTNnmQZxrHJxX/HjgDaU5+PLmY1qnQPnMjgADPGCRPhB+Yawe1iij0REe+k/aHoA== +jest-leak-detector@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.0.tgz#a211c4c7627743e8d87b392bf92502cd64275df3" + integrity sha512-3oMv34imWTl1/nwKnmE/DxYo3QqHnZeF3nO6UzldppkhW0Za7OY2DYyWiamqVzwdUrjhoQkY5g+aF6Oc3alYEQ== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.4.2" + pretty-format "^26.6.0" -jest-matcher-utils@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.5.0.tgz#fbc98a12d730e5d2453d7f1ed4a4d948e34b7867" - integrity sha512-VWI269+9JS5cpndnpCwm7dy7JtGQT30UHfrnM3mXl22gHGt/b7NkjBqXfbhZ8V4B7ANUsjK18PlSBmG0YH7gjw== - dependencies: - chalk "^3.0.0" - jest-diff "^25.5.0" - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - -jest-matcher-utils@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.4.2.tgz#fa81f3693f7cb67e5fc1537317525ef3b85f4b06" - integrity sha512-KcbNqWfWUG24R7tu9WcAOKKdiXiXCbMvQYT6iodZ9k1f7065k0keUOW6XpJMMvah+hTfqkhJhRXmA3r3zMAg0Q== +jest-matcher-utils@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.0.tgz#8f57d78353275bfa7a3ccea128c1030b347138e2" + integrity sha512-BUy/dQYb7ELGRazmK4ZVkbfPYCaNnrMtw1YljVhcKzWUxBM0xQ+bffrfnMLdRZp4wUUcT4ahaVnA3VWZtXWP9Q== dependencies: chalk "^4.0.0" - jest-diff "^26.4.2" + jest-diff "^26.6.0" jest-get-type "^26.3.0" - pretty-format "^26.4.2" + pretty-format "^26.6.0" -jest-message-util@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.5.0.tgz#ea11d93204cc7ae97456e1d8716251185b8880ea" - integrity sha512-ezddz3YCT/LT0SKAmylVyWWIGYoKHOFOFXx3/nA4m794lfVUskMcwhip6vTgdVrOtYdjeQeis2ypzes9mZb4EA== +jest-message-util@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.0.tgz#c3499053022e05765f71b8c2535af63009e2d4be" + integrity sha512-WPAeS38Kza29f04I0iOIQrXeiebRXjmn6cFehzI7KKJOgT0NmqYAcLgjWnIAfKs5FBmEQgje1kXab0DaLKCl2w== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^25.5.0" - "@types/stack-utils" "^1.0.1" - chalk "^3.0.0" - graceful-fs "^4.2.4" - micromatch "^4.0.2" - slash "^3.0.0" - stack-utils "^1.0.1" - -jest-message-util@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.3.0.tgz#3bdb538af27bb417f2d4d16557606fd082d5841a" - integrity sha512-xIavRYqr4/otGOiLxLZGj3ieMmjcNE73Ui+LdSW/Y790j5acqCsAdDiLIbzHCZMpN07JOENRWX5DcU+OQ+TjTA== - dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.3.0" - "@types/stack-utils" "^1.0.1" + "@jest/types" "^26.6.0" + "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.2" slash "^3.0.0" stack-utils "^2.0.2" -jest-mock@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.5.0.tgz#a91a54dabd14e37ecd61665d6b6e06360a55387a" - integrity sha512-eXWuTV8mKzp/ovHc5+3USJMYsTBhyQ+5A1Mak35dey/RG8GlM4YWVylZuGgVXinaW6tpvk/RSecmF37FKUlpXA== - dependencies: - "@jest/types" "^25.5.0" - -jest-mock@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.3.0.tgz#ee62207c3c5ebe5f35b760e1267fee19a1cfdeba" - integrity sha512-PeaRrg8Dc6mnS35gOo/CbZovoDPKAeB1FICZiuagAgGvbWdNNyjQjkOaGUa/3N3JtpQ/Mh9P4A2D4Fv51NnP8Q== +jest-mock@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.0.tgz#5d13a41f3662a98a55c7742ac67c482e232ded13" + integrity sha512-HsNmL8vVIn1rL1GWA21Drpy9Cl+7GImwbWz/0fkWHrUXVzuaG7rP0vwLtE+/n70Mt0U8nPkz8fxioi3SC0wqhw== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" "@types/node" "*" -jest-pnp-resolver@^1.2.1, jest-pnp-resolver@^1.2.2: +jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.2.6.tgz#d847d38ba15d2118d3b06390056028d0f2fd3964" - integrity sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw== - jest-regex-util@^26.0.0: version "26.0.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.5.4.tgz#85501f53957c8e3be446e863a74777b5a17397a7" - integrity sha512-yFmbPd+DAQjJQg88HveObcGBA32nqNZ02fjYmtL16t1xw9bAttSn5UGRRhzMHIQbsep7znWvAvnD4kDqOFM0Uw== +jest-resolve-dependencies@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.0.tgz#05bfecc977a3a48929fc7d9876f03d93a16b7df0" + integrity sha512-4di+XUT7LwJJ8b8qFEEDQssC5+aeVjLhvRICCaS4alh/EVS9JCT1armfJ3pnSS8t4o6659WbMmKVo82H4LuUVw== dependencies: - "@jest/types" "^25.5.0" - jest-regex-util "^25.2.6" - jest-snapshot "^25.5.1" - -jest-resolve-dependencies@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.4.2.tgz#739bdb027c14befb2fe5aabbd03f7bab355f1dc5" - integrity sha512-ADHaOwqEcVc71uTfySzSowA/RdxUpCxhxa2FNLiin9vWLB1uLPad3we+JSSROq5+SrL9iYPdZZF8bdKM7XABTQ== - dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" jest-regex-util "^26.0.0" - jest-snapshot "^26.4.2" + jest-snapshot "^26.6.0" -jest-resolve@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.5.1.tgz#0e6fbcfa7c26d2a5fe8f456088dc332a79266829" - integrity sha512-Hc09hYch5aWdtejsUZhA+vSzcotf7fajSlPA6EZPE1RmPBAD39XtJhvHWFStid58iit4IPDLI/Da4cwdDmAHiQ== +jest-resolve@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.0.tgz#070fe7159af87b03e50f52ea5e17ee95bbee40e1" + integrity sha512-tRAz2bwraHufNp+CCmAD8ciyCpXCs1NQxB5EJAmtCFy6BN81loFEGWKzYu26Y62lAJJe4X4jg36Kf+NsQyiStQ== dependencies: - "@jest/types" "^25.5.0" - browser-resolve "^1.11.3" - chalk "^3.0.0" - graceful-fs "^4.2.4" - jest-pnp-resolver "^1.2.1" - read-pkg-up "^7.0.1" - realpath-native "^2.0.0" - resolve "^1.17.0" - slash "^3.0.0" - -jest-resolve@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.4.0.tgz#6dc0af7fb93e65b73fec0368ca2b76f3eb59a6d7" - integrity sha512-bn/JoZTEXRSlEx3+SfgZcJAVuTMOksYq9xe9O6s4Ekg84aKBObEaVXKOEilULRqviSLAYJldnoWV9c07kwtiCg== - dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" chalk "^4.0.0" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.3.0" + jest-util "^26.6.0" read-pkg-up "^7.0.1" resolve "^1.17.0" slash "^3.0.0" -jest-runner@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.5.4.tgz#ffec5df3875da5f5c878ae6d0a17b8e4ecd7c71d" - integrity sha512-V/2R7fKZo6blP8E9BL9vJ8aTU4TH2beuqGNxHbxi6t14XzTb+x90B3FRgdvuHm41GY8ch4xxvf0ATH4hdpjTqg== - dependencies: - "@jest/console" "^25.5.0" - "@jest/environment" "^25.5.0" - "@jest/test-result" "^25.5.0" - "@jest/types" "^25.5.0" - chalk "^3.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-config "^25.5.4" - jest-docblock "^25.3.0" - jest-haste-map "^25.5.1" - jest-jasmine2 "^25.5.4" - jest-leak-detector "^25.5.0" - jest-message-util "^25.5.0" - jest-resolve "^25.5.1" - jest-runtime "^25.5.4" - jest-util "^25.5.0" - jest-worker "^25.5.0" - source-map-support "^0.5.6" - throat "^5.0.0" - -jest-runner@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.4.2.tgz#c3ec5482c8edd31973bd3935df5a449a45b5b853" - integrity sha512-FgjDHeVknDjw1gRAYaoUoShe1K3XUuFMkIaXbdhEys+1O4bEJS8Avmn4lBwoMfL8O5oFTdWYKcf3tEJyyYyk8g== +jest-runner@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.0.tgz#465a76efc9ec12cfd83a2af3a6cfb695b13a3efe" + integrity sha512-QpeN6pje8PQvFgT+wYOlzeycKd67qAvSw5FgYBiX2cTW+QTiObTzv/k09qRvT09rcCntFxUhy9VB1mgNGFLYIA== dependencies: - "@jest/console" "^26.3.0" - "@jest/environment" "^26.3.0" - "@jest/test-result" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/console" "^26.6.0" + "@jest/environment" "^26.6.0" + "@jest/test-result" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" chalk "^4.0.0" emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.4.2" + jest-config "^26.6.0" jest-docblock "^26.0.0" - jest-haste-map "^26.3.0" - jest-leak-detector "^26.4.2" - jest-message-util "^26.3.0" - jest-resolve "^26.4.0" - jest-runtime "^26.4.2" - jest-util "^26.3.0" - jest-worker "^26.3.0" + jest-haste-map "^26.6.0" + jest-leak-detector "^26.6.0" + jest-message-util "^26.6.0" + jest-resolve "^26.6.0" + jest-runtime "^26.6.0" + jest-util "^26.6.0" + jest-worker "^26.5.0" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.5.4.tgz#dc981fe2cb2137abcd319e74ccae7f7eeffbfaab" - integrity sha512-RWTt8LeWh3GvjYtASH2eezkc8AehVoWKK20udV6n3/gC87wlTbE1kIA+opCvNWyyPeBs6ptYsc6nyHUb1GlUVQ== - dependencies: - "@jest/console" "^25.5.0" - "@jest/environment" "^25.5.0" - "@jest/globals" "^25.5.2" - "@jest/source-map" "^25.5.0" - "@jest/test-result" "^25.5.0" - "@jest/transform" "^25.5.1" - "@jest/types" "^25.5.0" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.4" - jest-config "^25.5.4" - jest-haste-map "^25.5.1" - jest-message-util "^25.5.0" - jest-mock "^25.5.0" - jest-regex-util "^25.2.6" - jest-resolve "^25.5.1" - jest-snapshot "^25.5.1" - jest-util "^25.5.0" - jest-validate "^25.5.0" - realpath-native "^2.0.0" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^15.3.1" - -jest-runtime@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.4.2.tgz#94ce17890353c92e4206580c73a8f0c024c33c42" - integrity sha512-4Pe7Uk5a80FnbHwSOk7ojNCJvz3Ks2CNQWT5Z7MJo4tX0jb3V/LThKvD9tKPNVNyeMH98J/nzGlcwc00R2dSHQ== - dependencies: - "@jest/console" "^26.3.0" - "@jest/environment" "^26.3.0" - "@jest/fake-timers" "^26.3.0" - "@jest/globals" "^26.4.2" - "@jest/source-map" "^26.3.0" - "@jest/test-result" "^26.3.0" - "@jest/transform" "^26.3.0" - "@jest/types" "^26.3.0" +jest-runtime@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.0.tgz#90f80ea5eb0d97a1089120f582fb84bd36ca5491" + integrity sha512-JEz4YGnybFvtN4NLID6lsZf0bcd8jccwjWcG5TRE3fYVnxoX1egTthPjnC4btIwWJ6QaaHhtOQ/E3AGn8iClAw== + dependencies: + "@jest/console" "^26.6.0" + "@jest/environment" "^26.6.0" + "@jest/fake-timers" "^26.6.0" + "@jest/globals" "^26.6.0" + "@jest/source-map" "^26.5.0" + "@jest/test-result" "^26.6.0" + "@jest/transform" "^26.6.0" + "@jest/types" "^26.6.0" "@types/yargs" "^15.0.0" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.4.2" - jest-haste-map "^26.3.0" - jest-message-util "^26.3.0" - jest-mock "^26.3.0" + jest-config "^26.6.0" + jest-haste-map "^26.6.0" + jest-message-util "^26.6.0" + jest-mock "^26.6.0" jest-regex-util "^26.0.0" - jest-resolve "^26.4.0" - jest-snapshot "^26.4.2" - jest-util "^26.3.0" - jest-validate "^26.4.2" + jest-resolve "^26.6.0" + jest-snapshot "^26.6.0" + jest-util "^26.6.0" + jest-validate "^26.6.0" slash "^3.0.0" strip-bom "^4.0.0" - yargs "^15.3.1" - -jest-serializer@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.5.0.tgz#a993f484e769b4ed54e70e0efdb74007f503072b" - integrity sha512-LxD8fY1lByomEPflwur9o4e2a5twSQ7TaVNLlFUuToIdoJuBt8tzHfCsZ42Ok6LkKXWzFWf3AGmheuLAA7LcCA== - dependencies: - graceful-fs "^4.2.4" + yargs "^15.4.1" -jest-serializer@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.3.0.tgz#1c9d5e1b74d6e5f7e7f9627080fa205d976c33ef" - integrity sha512-IDRBQBLPlKa4flg77fqg0n/pH87tcRKwe8zxOVTWISxGpPHYkRZ1dXKyh04JOja7gppc60+soKVZ791mruVdow== +jest-serializer@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.5.0.tgz#f5425cc4c5f6b4b355f854b5f0f23ec6b962bc13" + integrity sha512-+h3Gf5CDRlSLdgTv7y0vPIAoLgX/SI7T4v6hy+TEXMgYbv+ztzbg5PSN6mUXAT/hXYHvZRWm+MaObVfqkhCGxA== dependencies: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.5.1.tgz#1a2a576491f9961eb8d00c2e5fd479bc28e5ff7f" - integrity sha512-C02JE1TUe64p2v1auUJ2ze5vcuv32tkv9PyhEb318e8XOKF7MOyXdJ7kdjbvrp3ChPLU2usI7Rjxs97Dj5P0uQ== +jest-snapshot@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.0.tgz#457aa9c1761efc781ac9c02b021a0b21047c6a38" + integrity sha512-mcqJZeIZqxomvBcsaiIbiEe2g7K1UxnUpTwjMoHb+DX4uFGnuZoZ6m28YOYRyCfZsdU9mmq73rNBnEH2atTR4Q== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^25.5.0" - "@types/prettier" "^1.19.0" - chalk "^3.0.0" - expect "^25.5.0" - graceful-fs "^4.2.4" - jest-diff "^25.5.0" - jest-get-type "^25.2.6" - jest-matcher-utils "^25.5.0" - jest-message-util "^25.5.0" - jest-resolve "^25.5.1" - make-dir "^3.0.0" - natural-compare "^1.4.0" - pretty-format "^25.5.0" - semver "^6.3.0" - -jest-snapshot@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.4.2.tgz#87d3ac2f2bd87ea8003602fbebd8fcb9e94104f6" - integrity sha512-N6Uub8FccKlf5SBFnL2Ri/xofbaA68Cc3MGjP/NuwgnsvWh+9hLIR/DhrxbSiKXMY9vUW5dI6EW1eHaDHqe9sg== - dependencies: - "@babel/types" "^7.0.0" - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" + "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.4.2" + expect "^26.6.0" graceful-fs "^4.2.4" - jest-diff "^26.4.2" + jest-diff "^26.6.0" jest-get-type "^26.3.0" - jest-haste-map "^26.3.0" - jest-matcher-utils "^26.4.2" - jest-message-util "^26.3.0" - jest-resolve "^26.4.0" + jest-haste-map "^26.6.0" + jest-matcher-utils "^26.6.0" + jest-message-util "^26.6.0" + jest-resolve "^26.6.0" natural-compare "^1.4.0" - pretty-format "^26.4.2" + pretty-format "^26.6.0" semver "^7.3.2" -jest-util@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.5.0.tgz#31c63b5d6e901274d264a4fec849230aa3fa35b0" - integrity sha512-KVlX+WWg1zUTB9ktvhsg2PXZVdkI1NBevOJSkTKYAyXyH4QSvh+Lay/e/v+bmaFfrkfx43xD8QTfgobzlEXdIA== - dependencies: - "@jest/types" "^25.5.0" - chalk "^3.0.0" - graceful-fs "^4.2.4" - is-ci "^2.0.0" - make-dir "^3.0.0" - -jest-util@^26.1.0, jest-util@^26.3.0: +jest-util@^26.1.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.3.0.tgz#a8974b191df30e2bf523ebbfdbaeb8efca535b3e" integrity sha512-4zpn6bwV0+AMFN0IYhH/wnzIQzRaYVrz1A8sYnRnj4UXDXbOVtWmlaZkO9mipFqZ13okIfN87aDoJWB7VH6hcw== @@ -8950,89 +8430,60 @@ jest-util@^26.1.0, jest-util@^26.3.0: is-ci "^2.0.0" micromatch "^4.0.2" -jest-validate@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.5.0.tgz#fb4c93f332c2e4cf70151a628e58a35e459a413a" - integrity sha512-okUFKqhZIpo3jDdtUXUZ2LxGUZJIlfdYBvZb1aczzxrlyMlqdnnws9MOxezoLGhSaFc2XYaHNReNQfj5zPIWyQ== +jest-util@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.0.tgz#a81547f6d38738b505c5a594b37d911335dea60f" + integrity sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg== dependencies: - "@jest/types" "^25.5.0" - camelcase "^5.3.1" - chalk "^3.0.0" - jest-get-type "^25.2.6" - leven "^3.1.0" - pretty-format "^25.5.0" + "@jest/types" "^26.6.0" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" -jest-validate@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.4.2.tgz#e871b0dfe97747133014dcf6445ee8018398f39c" - integrity sha512-blft+xDX7XXghfhY0mrsBCYhX365n8K5wNDC4XAcNKqqjEzsRUSXP44m6PL0QJEW2crxQFLLztVnJ4j7oPlQrQ== +jest-validate@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.0.tgz#b95e2076cca1a58b183e5bcce2bf43af52eebf10" + integrity sha512-FKHNqvh1Pgs4NWas56gsTPmjcIoGAAzSVUCK1+g8euzuCGbmdEr8LRTtOEFjd29uMZUk0PhzmzKGlHPe6j3UWw== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.4.2" + pretty-format "^26.6.0" -jest-watcher@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.5.0.tgz#d6110d101df98badebe435003956fd4a465e8456" - integrity sha512-XrSfJnVASEl+5+bb51V0Q7WQx65dTSk7NL4yDdVjPnRNpM0hG+ncFmDYJo9O8jaSRcAitVbuVawyXCRoxGrT5Q== +jest-watcher@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.0.tgz#06001c22831583a16f9ccb388ee33316a7f4200f" + integrity sha512-gw5BvcgPi0PKpMlNWQjUet5C5A4JOYrT7gexdP6+DR/f7mRm7wE0o1GqwPwcTsTwo0/FNf9c/kIDXTRaSAYwlw== dependencies: - "@jest/test-result" "^25.5.0" - "@jest/types" "^25.5.0" - ansi-escapes "^4.2.1" - chalk "^3.0.0" - jest-util "^25.5.0" - string-length "^3.1.0" - -jest-watcher@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.3.0.tgz#f8ef3068ddb8af160ef868400318dc4a898eed08" - integrity sha512-XnLdKmyCGJ3VoF6G/p5ohbJ04q/vv5aH9ENI+i6BL0uu9WWB6Z7Z2lhQQk0d2AVZcRGp1yW+/TsoToMhBFPRdQ== - dependencies: - "@jest/test-result" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/test-result" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.3.0" + jest-util "^26.6.0" string-length "^4.0.1" -jest-worker@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" - integrity sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw== - dependencies: - merge-stream "^2.0.0" - supports-color "^7.0.0" - -jest-worker@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.3.0.tgz#7c8a97e4f4364b4f05ed8bca8ca0c24de091871f" - integrity sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw== +jest-worker@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.5.0.tgz#87deee86dbbc5f98d9919e0dadf2c40e3152fa30" + integrity sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db" - integrity sha512-hHFJROBTqZahnO+X+PMtT6G2/ztqAZJveGqz//FnWWHurizkD05PQGzRZOhF3XP6z7SJmL+5tCfW8qV06JypwQ== +jest@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.0.tgz#546b25a1d8c888569dbbe93cae131748086a4a25" + integrity sha512-jxTmrvuecVISvKFFhOkjsWRZV7sFqdSUAd1ajOKY+/QE/aLBVstsJ/dX8GczLzwiT6ZEwwmZqtCUHLHHQVzcfA== dependencies: - "@jest/core" "^25.5.4" + "@jest/core" "^26.6.0" import-local "^3.0.2" - jest-cli "^25.5.4" - -jest@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.4.2.tgz#7e8bfb348ec33f5459adeaffc1a25d5752d9d312" - integrity sha512-LLCjPrUh98Ik8CzW8LLVnSCfLaiY+wbK53U7VxnFSX7Q+kWC4noVeDvGWIFw0Amfq1lq2VfGm7YHWSLBV62MJw== - dependencies: - "@jest/core" "^26.4.2" - import-local "^3.0.2" - jest-cli "^26.4.2" + jest-cli "^26.6.0" jmespath@0.15.0: version "0.15.0" @@ -9094,39 +8545,7 @@ jsdom@^14.1.0: ws "^6.1.2" xml-name-validator "^3.0.0" -jsdom@^15.2.1: - version "15.2.1" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.2.1.tgz#d2feb1aef7183f86be521b8c6833ff5296d07ec5" - integrity sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g== - dependencies: - abab "^2.0.0" - acorn "^7.1.0" - acorn-globals "^4.3.2" - array-equal "^1.0.0" - cssom "^0.4.1" - cssstyle "^2.0.0" - data-urls "^1.1.0" - domexception "^1.0.1" - escodegen "^1.11.1" - html-encoding-sniffer "^1.0.2" - nwsapi "^2.2.0" - parse5 "5.1.0" - pn "^1.1.0" - request "^2.88.0" - request-promise-native "^1.0.7" - saxes "^3.1.9" - symbol-tree "^3.2.2" - tough-cookie "^3.0.1" - w3c-hr-time "^1.0.1" - w3c-xmlserializer "^1.1.2" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^7.0.0" - ws "^7.0.0" - xml-name-validator "^3.0.0" - -jsdom@^16.2.2: +jsdom@^16.4.0: version "16.4.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.4.0.tgz#36005bde2d136f73eee1a830c6d45e55408edddb" integrity sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w== @@ -9713,13 +9132,6 @@ log4js@^6.3.0: rfdc "^1.1.4" streamroller "^2.2.4" -lolex@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-5.1.2.tgz#953694d098ce7c07bc5ed6d0e42bc6c0c6d5a367" - integrity sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A== - dependencies: - "@sinonjs/commons" "^1.7.0" - loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -10335,17 +9747,6 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-notifier@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-6.0.0.tgz#cea319e06baa16deec8ce5cd7f133c4a46b68e12" - integrity sha512-SVfQ/wMw+DesunOm5cKqr6yDcvUTDl/yc97ybGHMrteNEY6oekXpNpS3lZwgLlwz0FLgHoiW28ZpmBHUDg37cw== - dependencies: - growly "^1.3.0" - is-wsl "^2.1.1" - semver "^6.3.0" - shellwords "^0.1.1" - which "^1.3.1" - node-notifier@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.0.tgz#a7eee2d51da6d0f7ff5094bc7108c911240c1620" @@ -10808,11 +10209,6 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-finally@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" - integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -11673,12 +11069,12 @@ pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" -pretty-format@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.4.2.tgz#d081d032b398e801e2012af2df1214ef75a81237" - integrity sha512-zK6Gd8zDsEiVydOCGLkoBoZuqv8VTiHyAbKznXe/gaph/DAeZOmit9yMfgIz5adIgAMMs5XfoYSwAX3jcCO1tA== +pretty-format@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.0.tgz#1e1030e3c70e3ac1c568a5fd15627671ea159391" + integrity sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.0" ansi-regex "^5.0.0" ansi-styles "^4.0.0" react-is "^16.12.0" @@ -12098,11 +11494,6 @@ readdir-scoped-modules@^1.0.0: graceful-fs "^4.1.2" once "^1.3.0" -realpath-native@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-2.0.0.tgz#7377ac429b6e1fd599dc38d08ed942d0d7beb866" - integrity sha512-v1SEYUOXXdbBZK8ZuNgO4TBjamPsiSgcFr0aP+tEKpQZK8vooEUqV6nm6Cv502mX4NF2EfsnVqtNAHG+/6Ur1Q== - rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -12239,7 +11630,7 @@ request-promise-core@1.1.4: dependencies: lodash "^4.17.19" -request-promise-native@^1.0.5, request-promise-native@^1.0.7, request-promise-native@^1.0.8: +request-promise-native@^1.0.5, request-promise-native@^1.0.8: version "1.0.9" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== @@ -12323,11 +11714,6 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" @@ -12930,7 +12316,7 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== -stack-utils@^1.0.1, stack-utils@^1.0.2: +stack-utils@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== @@ -13018,14 +12404,6 @@ string-argv@0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== -string-length@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-3.1.0.tgz#107ef8c23456e187a8abd4a61162ff4ac6e25837" - integrity sha512-Ttp5YvkGm5v9Ijagtaz1BnN+k9ObpvS0eIBblPMp2YWL8FBmi9qblQ9fexc2k/CXFgrTIteU3jAw3payCnwSTA== - dependencies: - astral-regex "^1.0.0" - strip-ansi "^5.2.0" - string-length@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" @@ -14087,19 +13465,10 @@ v8-compile-cache@^2.0.0, v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== -v8-to-istanbul@^4.1.3: - version "4.1.4" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-4.1.4.tgz#b97936f21c0e2d9996d4985e5c5156e9d4e49cd6" - integrity sha512-Rw6vJHj1mbdK8edjR7+zuJrpDtKIgNdAvTSAcpYfgMIw+u2dPDntD3dgN4XQFLU2/fvFQdzj+EeSGfd/jnY5fQ== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" - -v8-to-istanbul@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-5.0.1.tgz#0608f5b49a481458625edb058488607f25498ba5" - integrity sha512-mbDNjuDajqYe3TXFk5qxcQy8L1msXNE37WTlLoqqpBfRsimbNcrlhQlDPntmECEcUvdC+AQ8CyMMf6EUx1r74Q== +v8-to-istanbul@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-6.0.1.tgz#7ef0e32faa10f841fe4c1b0f8de96ed067c0be1e" + integrity sha512-PzM1WlqquhBvsV+Gco6WSFeg1AGdD53ccMRkFeyHRE/KRZaVacPOmQYP3EeVgDBtKD2BJ8kgynBQ5OtKiHCH+w== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -14394,7 +13763,7 @@ ws@^6.1.2, ws@^6.2.0: dependencies: async-limiter "~1.0.0" -ws@^7.0.0, ws@^7.2.3: +ws@^7.2.3: version "7.3.1" resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA== From 37dc9d895d2c4be3e538b035b4486f3c8efc1aed Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Tue, 20 Oct 2020 09:43:45 +0100 Subject: [PATCH 04/45] chore: add 'v2' branch prefix as a mergify conditional (#10956) Two different mergify rules match the v2-main branch merge. Include the branch base name as a conditional to keep them unique. --- .mergify.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index f91085a78d7a8..2675841005330 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -19,6 +19,7 @@ pull_request_rules: commit_message: title+body conditions: - base!=release + - -base~=^v2 - -title~=(WIP|wip) - -label~=(blocked|do-not-merge|no-squash|two-approvers) - -merged @@ -41,6 +42,7 @@ pull_request_rules: commit_message: title+body conditions: - base!=release + - -base~=^v2 - -title~=(WIP|wip) - label~=two-approvers - -label~=(blocked|do-not-merge|no-squash) @@ -64,6 +66,7 @@ pull_request_rules: strict_method: merge commit_message: title+body conditions: + - -base~=^v2 - -title~=(WIP|wip) - -label~=(blocked|do-not-merge) # Only if no-squash is set @@ -129,6 +132,7 @@ pull_request_rules: strict_method: merge commit_message: title+body conditions: + - base=v2-main - label~=forward-merge - -label~=(blocked|do-not-merge) - -merged From dd81e77e6ad606c2e76e01de1c7d38b762357d26 Mon Sep 17 00:00:00 2001 From: Andrii Radyk Date: Tue, 20 Oct 2020 11:13:07 +0200 Subject: [PATCH 05/45] feat(cloudfront): brotli compression support (#10950) Enable brotli compression support in `CachePolicy` Closes #10947 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudfront/README.md | 1 + packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts | 7 +++++++ packages/@aws-cdk/aws-cloudfront/test/cache-policy.test.ts | 3 +++ .../test/integ.distribution-policies.expected.json | 1 + 4 files changed, 12 insertions(+) diff --git a/packages/@aws-cdk/aws-cloudfront/README.md b/packages/@aws-cdk/aws-cloudfront/README.md index 641b329aadf04..cbf6baf3d888b 100644 --- a/packages/@aws-cdk/aws-cloudfront/README.md +++ b/packages/@aws-cdk/aws-cloudfront/README.md @@ -194,6 +194,7 @@ const myCachePolicy = new cloudfront.CachePolicy(this, 'myCachePolicy', { headerBehavior: cloudfront.CacheHeaderBehavior.allowList('X-CustomHeader'), queryStringBehavior: cloudfront.CacheQueryStringBehavior.denyList('username'), enableAcceptEncodingGzip: true, + enableAcceptEncodingBrotli: true, }); new cloudfront.Distribution(this, 'myDistCustomPolicy', { defaultBehavior: { diff --git a/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts b/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts index 80f8f6ce1fe7d..ac3075d5f9aa4 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts @@ -75,6 +75,12 @@ export interface CachePolicyProps { * @default false */ readonly enableAcceptEncodingGzip?: boolean; + + /** + * Whether to normalize and include the `Accept-Encoding` header in the cache key when the `Accept-Encoding` header is 'br'. + * @default false + */ + readonly enableAcceptEncodingBrotli?: boolean; } /** @@ -160,6 +166,7 @@ export class CachePolicy extends Resource implements ICachePolicy { headers: headers.headers, }, enableAcceptEncodingGzip: props.enableAcceptEncodingGzip ?? false, + enableAcceptEncodingBrotli: props.enableAcceptEncodingBrotli ?? false, queryStringsConfig: { queryStringBehavior: queryStrings.behavior, queryStrings: queryStrings.queryStrings, diff --git a/packages/@aws-cdk/aws-cloudfront/test/cache-policy.test.ts b/packages/@aws-cdk/aws-cloudfront/test/cache-policy.test.ts index 4b825f7c1283b..66b5fa80d5749 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/cache-policy.test.ts +++ b/packages/@aws-cdk/aws-cloudfront/test/cache-policy.test.ts @@ -33,6 +33,7 @@ describe('CachePolicy', () => { CookieBehavior: 'none', }, EnableAcceptEncodingGzip: false, + EnableAcceptEncodingBrotli: false, HeadersConfig: { HeaderBehavior: 'none', }, @@ -55,6 +56,7 @@ describe('CachePolicy', () => { headerBehavior: CacheHeaderBehavior.allowList('X-CustomHeader'), queryStringBehavior: CacheQueryStringBehavior.denyList('username'), enableAcceptEncodingGzip: true, + enableAcceptEncodingBrotli: true, }); expect(stack).toHaveResource('AWS::CloudFront::CachePolicy', { @@ -77,6 +79,7 @@ describe('CachePolicy', () => { QueryStrings: ['username'], }, EnableAcceptEncodingGzip: true, + EnableAcceptEncodingBrotli: true, }, }, }); diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-policies.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-policies.expected.json index a3fcd0084202a..bf8b74f747b46 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-policies.expected.json +++ b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-policies.expected.json @@ -13,6 +13,7 @@ "CookieBehavior": "none" }, "EnableAcceptEncodingGzip": false, + "EnableAcceptEncodingBrotli": false, "HeadersConfig": { "HeaderBehavior": "none" }, From aa3f3fdc92545157205e533e124412d0db08c575 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Tue, 20 Oct 2020 11:00:38 +0100 Subject: [PATCH 06/45] fix(cloudfront): logging bucket uses global domain name (#10945) This reverts #10570. The logging buckets were originally using the regional domain names, but this caused odd behavior with CloudFront's new console "Logs" experience. #10570 switched logging buckets to use the global domain name, which addressed the console issue but broke customers in CN regions. We will follow up internally to improve the CloudFront console issue. fixes #10923 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudfront/lib/distribution.ts | 2 +- packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts | 2 +- .../@aws-cdk/aws-cloudfront/test/distribution.test.ts | 8 ++++---- .../test/integ.cloudfront-bucket-logging.expected.json | 6 +++--- .../test/integ.distribution-extensive.expected.json | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts index 5d1d7cb720b94..806bf2a36c44b 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts @@ -419,7 +419,7 @@ export class Distribution extends Resource implements IDistribution { const bucket = props.logBucket ?? new s3.Bucket(this, 'LoggingBucket'); return { - bucket: bucket.bucketDomainName, + bucket: bucket.bucketRegionalDomainName, includeCookies: props.logIncludesCookies, prefix: props.logFilePrefix, }; diff --git a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts index 3edc8a914563e..6889e50739f7e 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts @@ -899,7 +899,7 @@ export class CloudFrontWebDistribution extends cdk.Resource implements IDistribu distributionConfig = { ...distributionConfig, logging: { - bucket: this.loggingBucket.bucketDomainName, + bucket: this.loggingBucket.bucketRegionalDomainName, includeCookies: props.loggingConfig.includeCookies || false, prefix: props.loggingConfig.prefix, }, diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts b/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts index bbe6b34ebae3a..6cba1e07295f1 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts @@ -79,7 +79,7 @@ test('exhaustive example of props renders correctly', () => { HttpVersion: 'http1.1', IPV6Enabled: false, Logging: { - Bucket: { 'Fn::GetAtt': ['MyDistLoggingBucket9B8976BC', 'DomainName'] }, + Bucket: { 'Fn::GetAtt': ['MyDistLoggingBucket9B8976BC', 'RegionalDomainName'] }, IncludeCookies: true, Prefix: 'logs/', }, @@ -411,7 +411,7 @@ describe('logging', () => { expect(stack).toHaveResourceLike('AWS::CloudFront::Distribution', { DistributionConfig: { Logging: { - Bucket: { 'Fn::GetAtt': ['MyDistLoggingBucket9B8976BC', 'DomainName'] }, + Bucket: { 'Fn::GetAtt': ['MyDistLoggingBucket9B8976BC', 'RegionalDomainName'] }, }, }, }); @@ -428,7 +428,7 @@ describe('logging', () => { expect(stack).toHaveResourceLike('AWS::CloudFront::Distribution', { DistributionConfig: { Logging: { - Bucket: { 'Fn::GetAtt': ['MyLoggingBucket4382CD04', 'DomainName'] }, + Bucket: { 'Fn::GetAtt': ['MyLoggingBucket4382CD04', 'RegionalDomainName'] }, }, }, }); @@ -446,7 +446,7 @@ describe('logging', () => { expect(stack).toHaveResourceLike('AWS::CloudFront::Distribution', { DistributionConfig: { Logging: { - Bucket: { 'Fn::GetAtt': ['MyDistLoggingBucket9B8976BC', 'DomainName'] }, + Bucket: { 'Fn::GetAtt': ['MyDistLoggingBucket9B8976BC', 'RegionalDomainName'] }, IncludeCookies: true, Prefix: 'logs/', }, diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-bucket-logging.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-bucket-logging.expected.json index 5b6c0af340e28..36a334898a57f 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-bucket-logging.expected.json +++ b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-bucket-logging.expected.json @@ -36,7 +36,7 @@ "Bucket": { "Fn::GetAtt": [ "Bucket83908E77", - "DomainName" + "RegionalDomainName" ] }, "IncludeCookies": true, @@ -109,7 +109,7 @@ "Bucket": { "Fn::GetAtt": [ "AnAmazingWebsiteProbably2LoggingBucket222F7CE9", - "DomainName" + "RegionalDomainName" ] }, "IncludeCookies": false @@ -146,4 +146,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-extensive.expected.json b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-extensive.expected.json index 9ec492a9c730a..56829919d2306 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-extensive.expected.json +++ b/packages/@aws-cdk/aws-cloudfront/test/integ.distribution-extensive.expected.json @@ -24,7 +24,7 @@ "Bucket": { "Fn::GetAtt": [ "MyDistLoggingBucket9B8976BC", - "DomainName" + "RegionalDomainName" ] }, "IncludeCookies": true, From db842233fae67587901bd2742e9f2686af9256fb Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Tue, 20 Oct 2020 16:09:25 +0100 Subject: [PATCH 07/45] chore(redshift): update package stability to experimental (#10983) L2 constructs were created in May for this module, but the package stability was never updated. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-redshift/README.md | 8 ++++++++ packages/@aws-cdk/aws-redshift/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-redshift/README.md b/packages/@aws-cdk/aws-redshift/README.md index 05736c4c15c2c..11fe7a8fd363d 100644 --- a/packages/@aws-cdk/aws-redshift/README.md +++ b/packages/@aws-cdk/aws-redshift/README.md @@ -1,4 +1,5 @@ ## Amazon Redshift Construct Library + --- @@ -6,6 +7,10 @@ > All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. + --- @@ -24,6 +29,7 @@ const cluster = new redshift.Cluster(this, 'Redshift', { vpc }); ``` + By default, the master password will be generated and stored in AWS Secrets Manager. A default database named `default_db` will be created in the cluster. To change the name of this database set the `defaultDatabaseName` attribute in the constructor properties. @@ -46,11 +52,13 @@ cluster.clusterEndpoint.socketAddress; // "HOSTNAME:PORT" ### Rotating credentials When the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically: + ```ts cluster.addRotationSingleUser(); // Will rotate automatically after 30 days ``` The multi user rotation scheme is also available: + ```ts cluster.addRotationMultiUser('MyUser', { secret: myImportedSecret diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index 9b44d2a15a36a..6df900877d373 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -111,7 +111,7 @@ ] }, "stability": "experimental", - "maturity": "cfn-only", + "maturity": "experimental", "awscdkio": { "announce": false } From af45a1f30c1fa304fdb06018cd340fe2e7fc6cc4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2020 15:43:03 +0000 Subject: [PATCH 08/45] chore(deps-dev): bump cdk8s from 0.30.0 to 0.32.0 (#10991) Bumps [cdk8s](https://github.com/awslabs/cdk8s) from 0.30.0 to 0.32.0. - [Release notes](https://github.com/awslabs/cdk8s/releases) - [Changelog](https://github.com/awslabs/cdk8s/blob/master/CHANGELOG.md) - [Commits](https://github.com/awslabs/cdk8s/compare/v0.30.0...v0.32.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-eks/package.json | 2 +- yarn.lock | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 9fcf327b2c357..919b153e5f811 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -82,7 +82,7 @@ "pkglint": "0.0.0", "sinon": "^9.1.0", "cdk8s-plus": "^0.29.0", - "cdk8s": "^0.30.0" + "cdk8s": "^0.32.0" }, "dependencies": { "@aws-cdk/aws-autoscaling": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 2e9cf8eb723af..90f10271086ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4359,14 +4359,14 @@ cdk8s-plus@^0.29.0: dependencies: minimatch "^3.0.4" -cdk8s@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/cdk8s/-/cdk8s-0.30.0.tgz#71cfbc36c09a03c2410b4530486d38b4e0025c51" - integrity sha512-ZPNq02HXekAbgdTwNVXYpAqPT9tq2S279oRf0ffbiphjmVtL+wrog2es+DAygFZzG8zkoOkJG5dOZtkE9FaSbQ== +cdk8s@^0.32.0: + version "0.32.0" + resolved "https://registry.yarnpkg.com/cdk8s/-/cdk8s-0.32.0.tgz#d977e977c1eee589d74a302675aa0f296cbc19d8" + integrity sha512-FUIULXEKPjXA+9DLzCUpIcOpBrF2B3Dl0jxxjPbwScrTnVqAY2+WetUbcnpogsVCbGl5gWTdO3nI2eBEaST6Bg== dependencies: follow-redirects "^1.11.0" json-stable-stringify "^1.0.1" - yaml "^1.7.2" + yaml "2.0.0-1" chalk@^1.1.3: version "1.1.3" @@ -13841,11 +13841,16 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@*, yaml@1.10.0, yaml@^1.10.0, yaml@^1.5.0, yaml@^1.7.2: +yaml@*, yaml@1.10.0, yaml@^1.10.0, yaml@^1.5.0: version "1.10.0" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== +yaml@2.0.0-1: + version "2.0.0-1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.0.0-1.tgz#8c3029b3ee2028306d5bcf396980623115ff8d18" + integrity sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ== + yapool@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/yapool/-/yapool-1.0.0.tgz#f693f29a315b50d9a9da2646a7a6645c96985b6a" From fe6ec39f92819d451e11df79e3d6145868818da1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2020 16:20:41 +0000 Subject: [PATCH 09/45] chore(deps-dev): bump @types/node from 10.17.35 to 10.17.40 (#10980) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.35 to 10.17.40. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/core/package.json | 2 +- packages/@monocdk-experiment/assert/package.json | 2 +- packages/@monocdk-experiment/rewrite-imports/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/monocdk/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 8 ++++---- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index b5384adedcc12..bc083b052f98b 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -170,7 +170,7 @@ "devDependencies": { "@types/lodash": "^4.14.161", "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "@types/sinon": "^9.0.7", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 712960c6939c7..e4a53277bd678 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.14", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "jest": "^26.6.0", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 683d6be64a2ee..51912c5c951ff 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/glob": "^7.1.3", "@types/jest": "^26.0.14", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 833751e24d76e..e79eacd364b00 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -255,7 +255,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "fs-extra": "^9.0.1", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 005f0eebf6860..58b6a57b2bbe8 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,7 +45,7 @@ "@types/jest": "^26.0.14", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", "@types/sinon": "^9.0.7", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index fb161725cbfe2..66d479dcfd3a6 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -35,7 +35,7 @@ "@types/jest": "^26.0.14", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.10.0", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "@types/yargs": "^15.0.7", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 87917ce856928..d9877a713d5da 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -254,7 +254,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "fs-extra": "^9.0.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index b5e8bff810c80..a3510b480ec80 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -15,7 +15,7 @@ "@types/eslint": "^7.2.3", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.14", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.0", "typescript": "~3.9.7" diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index d45e805571d31..1af5c92bdcecb 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@types/jest": "^26.0.14", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 00cc54e406985..8edb7635a8f74 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/jest": "^26.0.14", - "@types/node": "^10.17.35", + "@types/node": "^10.17.40", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.0", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 90f10271086ce..7278e77c36949 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3152,10 +3152,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== -"@types/node@^10.17.35": - version "10.17.35" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.35.tgz#58058f29b870e6ae57b20e4f6e928f02b7129f56" - integrity sha512-gXx7jAWpMddu0f7a+L+txMplp3FnHl53OhQIF9puXKq3hDGY/GjH+MF04oWnV/adPSCrbtHumDCFwzq2VhltWA== +"@types/node@^10.17.40": + version "10.17.40" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.40.tgz#8a50e47daff15fd4a89dc56f5221b3729e506be6" + integrity sha512-3hZT2z2/531A5pc8hYhn1gU5Qb1SIRSgMLQ6zuHA5xtt16lWAxUGprtr8lJuc9zNJMXEIIBWfSnzqBP/4mglpA== "@types/nodeunit@^0.0.31": version "0.0.31" From 585920e69e981187eed036659f6fe3f4bd4096d1 Mon Sep 17 00:00:00 2001 From: Christopher Rybicki Date: Tue, 20 Oct 2020 14:01:52 -0400 Subject: [PATCH 10/45] chore(s3): migrate tests to jest (#10934) One test was modified because the last argument didn't type check against the nodeunit-shim - here: https://github.com/aws/aws-cdk/blob/2640d9aa06039a6eb539d959d2126749486c7ef3/packages/%40aws-cdk/aws-s3/test/test.bucket.ts#L128-L132 changed to: ```ts test.throws(() => new s3.Bucket(stack, 'MyBucket', { bucketName: bucket, }), expectedErrors); ``` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-s3/.gitignore | 3 ++- packages/@aws-cdk/aws-s3/.npmignore | 3 ++- packages/@aws-cdk/aws-s3/jest.config.js | 2 ++ packages/@aws-cdk/aws-s3/package.json | 8 ++++---- .../aws-s3/test/{test.aspect.ts => aspect.test.ts} | 6 +++--- .../{test.bucket-policy.ts => bucket-policy.test.ts} | 6 +++--- .../aws-s3/test/{test.bucket.ts => bucket.test.ts} | 10 ++++------ .../aws-s3/test/{test.cors.ts => cors.test.ts} | 6 +++--- .../aws-s3/test/{test.metrics.ts => metrics.test.ts} | 6 +++--- .../{test.notification.ts => notification.test.ts} | 6 +++--- .../aws-s3/test/{test.rules.ts => rules.test.ts} | 6 +++--- .../aws-s3/test/{test.util.ts => util.test.ts} | 6 +++--- 12 files changed, 35 insertions(+), 33 deletions(-) create mode 100644 packages/@aws-cdk/aws-s3/jest.config.js rename packages/@aws-cdk/aws-s3/test/{test.aspect.ts => aspect.test.ts} (95%) rename packages/@aws-cdk/aws-s3/test/{test.bucket-policy.ts => bucket-policy.test.ts} (98%) rename packages/@aws-cdk/aws-s3/test/{test.bucket.ts => bucket.test.ts} (99%) rename packages/@aws-cdk/aws-s3/test/{test.cors.ts => cors.test.ts} (97%) rename packages/@aws-cdk/aws-s3/test/{test.metrics.ts => metrics.test.ts} (96%) rename packages/@aws-cdk/aws-s3/test/{test.notification.ts => notification.test.ts} (98%) rename packages/@aws-cdk/aws-s3/test/{test.rules.ts => rules.test.ts} (97%) rename packages/@aws-cdk/aws-s3/test/{test.util.ts => util.test.ts} (96%) diff --git a/packages/@aws-cdk/aws-s3/.gitignore b/packages/@aws-cdk/aws-s3/.gitignore index dcc1dc41e477f..17a41566f0002 100644 --- a/packages/@aws-cdk/aws-s3/.gitignore +++ b/packages/@aws-cdk/aws-s3/.gitignore @@ -15,4 +15,5 @@ nyc.config.js *.snk !.eslintrc.js -junit.xml \ No newline at end of file +junit.xml +!jest.config.js \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/.npmignore b/packages/@aws-cdk/aws-s3/.npmignore index a94c531529866..9e88226921c33 100644 --- a/packages/@aws-cdk/aws-s3/.npmignore +++ b/packages/@aws-cdk/aws-s3/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +jest.config.js \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/jest.config.js b/packages/@aws-cdk/aws-s3/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-s3/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-s3/package.json b/packages/@aws-cdk/aws-s3/package.json index f0b983a92e255..b763221c8cfb1 100644 --- a/packages/@aws-cdk/aws-s3/package.json +++ b/packages/@aws-cdk/aws-s3/package.json @@ -56,7 +56,8 @@ "cloudformation": "AWS::S3", "env": { "AWSLINT_BASE_CONSTRUCT": "true" - } + }, + "jest": true }, "keywords": [ "aws", @@ -72,12 +73,11 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "nodeunit": "^0.11.3", - "pkglint": "0.0.0" + "pkglint": "0.0.0", + "nodeunit-shim": "0.0.0" }, "dependencies": { "@aws-cdk/aws-events": "0.0.0", diff --git a/packages/@aws-cdk/aws-s3/test/test.aspect.ts b/packages/@aws-cdk/aws-s3/test/aspect.test.ts similarity index 95% rename from packages/@aws-cdk/aws-s3/test/test.aspect.ts rename to packages/@aws-cdk/aws-s3/test/aspect.test.ts index df020a5ca4698..fb981c8f3e27a 100644 --- a/packages/@aws-cdk/aws-s3/test/test.aspect.ts +++ b/packages/@aws-cdk/aws-s3/test/aspect.test.ts @@ -2,10 +2,10 @@ import { SynthUtils } from '@aws-cdk/assert'; import * as cdk from '@aws-cdk/core'; import { IConstruct } from 'constructs'; -import { Test } from 'nodeunit'; +import { nodeunitShim, Test } from 'nodeunit-shim'; import * as s3 from '../lib'; -export = { +nodeunitShim({ 'bucket must have versioning: failure'(test: Test) { // GIVEN const stack = new cdk.Stack(); @@ -38,7 +38,7 @@ export = { test.done(); }, -}; +}); class BucketVersioningChecker implements cdk.IAspect { public visit(node: IConstruct): void { diff --git a/packages/@aws-cdk/aws-s3/test/test.bucket-policy.ts b/packages/@aws-cdk/aws-s3/test/bucket-policy.test.ts similarity index 98% rename from packages/@aws-cdk/aws-s3/test/test.bucket-policy.ts rename to packages/@aws-cdk/aws-s3/test/bucket-policy.test.ts index d99ddbc1cac84..bb3a5fd6de135 100644 --- a/packages/@aws-cdk/aws-s3/test/test.bucket-policy.ts +++ b/packages/@aws-cdk/aws-s3/test/bucket-policy.test.ts @@ -1,13 +1,13 @@ import { expect, haveResource } from '@aws-cdk/assert'; import { AnyPrincipal, PolicyStatement } from '@aws-cdk/aws-iam'; import { RemovalPolicy, Stack, App } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; +import { nodeunitShim, Test } from 'nodeunit-shim'; import * as s3 from '../lib'; // to make it easy to copy & paste from output: /* eslint-disable quote-props */ -export = { +nodeunitShim({ 'default properties'(test: Test) { const stack = new Stack(); @@ -161,4 +161,4 @@ export = { test.done(); }, -}; \ No newline at end of file +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/test.bucket.ts b/packages/@aws-cdk/aws-s3/test/bucket.test.ts similarity index 99% rename from packages/@aws-cdk/aws-s3/test/test.bucket.ts rename to packages/@aws-cdk/aws-s3/test/bucket.test.ts index f06942a28b5e8..275f4bc6aa822 100644 --- a/packages/@aws-cdk/aws-s3/test/test.bucket.ts +++ b/packages/@aws-cdk/aws-s3/test/bucket.test.ts @@ -3,13 +3,13 @@ import { expect, haveResource, haveResourceLike, SynthUtils, arrayWith, objectLi import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; +import { nodeunitShim, Test } from 'nodeunit-shim'; import * as s3 from '../lib'; // to make it easy to copy & paste from output: /* eslint-disable quote-props */ -export = { +nodeunitShim({ 'default bucket'(test: Test) { const stack = new cdk.Stack(); @@ -127,9 +127,7 @@ export = { test.throws(() => new s3.Bucket(stack, 'MyBucket', { bucketName: bucket, - }), function(err: Error) { - return expectedErrors === err.message; - }); + }), expectedErrors); test.done(); }, @@ -2250,4 +2248,4 @@ export = { test.done(); }, -}; +}); diff --git a/packages/@aws-cdk/aws-s3/test/test.cors.ts b/packages/@aws-cdk/aws-s3/test/cors.test.ts similarity index 97% rename from packages/@aws-cdk/aws-s3/test/test.cors.ts rename to packages/@aws-cdk/aws-s3/test/cors.test.ts index f06819cc5dcd6..45daf74c75742 100644 --- a/packages/@aws-cdk/aws-s3/test/test.cors.ts +++ b/packages/@aws-cdk/aws-s3/test/cors.test.ts @@ -1,9 +1,9 @@ import { expect, haveResource } from '@aws-cdk/assert'; import { Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; +import { nodeunitShim, Test } from 'nodeunit-shim'; import { Bucket, HttpMethods } from '../lib'; -export = { +nodeunitShim({ 'Can use addCors() to add a CORS configuration'(test: Test) { // GIVEN const stack = new Stack(); @@ -118,4 +118,4 @@ export = { test.done(); }, -}; +}); diff --git a/packages/@aws-cdk/aws-s3/test/test.metrics.ts b/packages/@aws-cdk/aws-s3/test/metrics.test.ts similarity index 96% rename from packages/@aws-cdk/aws-s3/test/test.metrics.ts rename to packages/@aws-cdk/aws-s3/test/metrics.test.ts index da6a5b1c977ef..c82267afcadd1 100644 --- a/packages/@aws-cdk/aws-s3/test/test.metrics.ts +++ b/packages/@aws-cdk/aws-s3/test/metrics.test.ts @@ -1,9 +1,9 @@ import { expect, haveResource } from '@aws-cdk/assert'; import { Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; +import { nodeunitShim, Test } from 'nodeunit-shim'; import { Bucket } from '../lib'; -export = { +nodeunitShim({ 'Can use addMetrics() to add a metric configuration'(test: Test) { // GIVEN const stack = new Stack(); @@ -109,4 +109,4 @@ export = { test.done(); }, -}; +}); diff --git a/packages/@aws-cdk/aws-s3/test/test.notification.ts b/packages/@aws-cdk/aws-s3/test/notification.test.ts similarity index 98% rename from packages/@aws-cdk/aws-s3/test/test.notification.ts rename to packages/@aws-cdk/aws-s3/test/notification.test.ts index 1eb3708dc10c5..a96290643770d 100644 --- a/packages/@aws-cdk/aws-s3/test/test.notification.ts +++ b/packages/@aws-cdk/aws-s3/test/notification.test.ts @@ -1,9 +1,9 @@ import { expect, haveResource, haveResourceLike, ResourcePart } from '@aws-cdk/assert'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; +import { nodeunitShim, Test } from 'nodeunit-shim'; import * as s3 from '../lib'; -export = { +nodeunitShim({ 'when notification is added a custom s3 bucket notification resource is provisioned'(test: Test) { const stack = new cdk.Stack(); @@ -133,4 +133,4 @@ export = { test.done(); }, -}; +}); diff --git a/packages/@aws-cdk/aws-s3/test/test.rules.ts b/packages/@aws-cdk/aws-s3/test/rules.test.ts similarity index 97% rename from packages/@aws-cdk/aws-s3/test/test.rules.ts rename to packages/@aws-cdk/aws-s3/test/rules.test.ts index f8de0f1fa82f4..8e3a5ea5c3530 100644 --- a/packages/@aws-cdk/aws-s3/test/test.rules.ts +++ b/packages/@aws-cdk/aws-s3/test/rules.test.ts @@ -1,9 +1,9 @@ import { expect, haveResource } from '@aws-cdk/assert'; import { Duration, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; +import { nodeunitShim, Test } from 'nodeunit-shim'; import { Bucket, StorageClass } from '../lib'; -export = { +nodeunitShim({ 'Bucket with expiration days'(test: Test) { // GIVEN const stack = new Stack(); @@ -128,4 +128,4 @@ export = { test.done(); }, -}; +}); diff --git a/packages/@aws-cdk/aws-s3/test/test.util.ts b/packages/@aws-cdk/aws-s3/test/util.test.ts similarity index 96% rename from packages/@aws-cdk/aws-s3/test/test.util.ts rename to packages/@aws-cdk/aws-s3/test/util.test.ts index 96276f681d499..13a6376847ee9 100644 --- a/packages/@aws-cdk/aws-s3/test/test.util.ts +++ b/packages/@aws-cdk/aws-s3/test/util.test.ts @@ -1,8 +1,8 @@ import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; +import { nodeunitShim, Test } from 'nodeunit-shim'; import { parseBucketArn, parseBucketName } from '../lib/util'; -export = { +nodeunitShim({ parseBucketArn: { 'explicit arn'(test: Test) { const stack = new cdk.Stack(); @@ -65,4 +65,4 @@ export = { test.done(); }, }, -}; +}); From 5c030b38fa4a92f73a858063eda59d1ab5236cc6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2020 21:20:47 +0000 Subject: [PATCH 11/45] chore(deps-dev): bump parcel from 2.0.0-nightly.425 to 2.0.0-nightly.426 (#10997) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.425 to 2.0.0-nightly.426. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 920 +++++++++--------- 2 files changed, 461 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 389679b1c1051..2dff274fd0cbd 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.425", + "parcel": "2.0.0-nightly.426", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 7278e77c36949..78bcb29265411 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2157,128 +2157,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2049.tgz#cebde3947bd567dbb93c3cc4b3c49bf4c15d57eb" - integrity sha512-80bKWp+zd4G5WUDteitmITx5XxJUHO6BxBIOKXCuKY3OctunqlrfixD4e82o70obSGFEScgug+S6rKmchhIeRQ== +"@parcel/babel-ast-utils@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2050.tgz#5b03d8b2c0c67ac596276aac0d0d67227213539a" + integrity sha512-kyQ7JOaqk5YIY02+bbK8jXUpdONtUyxroITT6cnZ4wT6KgYmlB3HqhdluxcB5D07XdhsoyC+lS8hidHXG85ttQ== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" -"@parcel/babel-preset-env@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.427.tgz#f1c270fec74767a2863f1cfab3c42da228215293" - integrity sha512-6OaRhNbgPC3BUqf82MWdAKQhJ+qcX++vuVGC7vIvBkMoEWQFqEZBnxKIL8Ed46SjnttjDZ8JCfPfnDr0qRuYYw== +"@parcel/babel-preset-env@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.428.tgz#de2a2223adbf7265fe993d696c21266796a788de" + integrity sha512-Rf6UApd24x/cisNUT+H/Yn02XPmuQEZc0tTWdmPGS2lOoREJ/XUUOFhEU9maffVUM+VgqUelkfwTs5m7wHTCbw== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2049.tgz#2bb30222232367d610095e56e6091cecd0a3fe82" - integrity sha512-DyS5VQ7kHUy3YBh1yPQzh1z8lbb6/H++g69CbXNQ8wZHTymvJLHZcw8IH3fkplPgjViO72hTF+j7bM9M/EeK5w== +"@parcel/babylon-walk@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2050.tgz#dc353a5d5d19de40c7c389be9e1670dd32dd5b2e" + integrity sha512-s+boLOs106tl740NFcL3Jx+YRHII8+X4a4CBo+jeDXURTbTamYvfaEagM9qiAhPgRG7+oxPzPvmU//pPGfOKPg== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.427.tgz#caef3b0a18a497daac8a4f467c1dbd6511cacf95" - integrity sha512-b/zmxlTgm9yVEYRtUuwpC5kGKTVf9i7d6URLrTgRM6SVYK1sIbn4+Jz5cAMY8MPOp8uyPOHR+aOwC2n/gvNZwg== +"@parcel/bundler-default@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.428.tgz#9a75e48965d3051dd97c97bc76d46346a7d09fc6" + integrity sha512-CF4cFxoPsZaWEFcVGL4u2VHdPeanaBExquqoqQl9oaG4FqGP4B95MaSjs76XtdbCERAO5Tl5MuoC9j4VRUzYMQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.427.tgz#9a78d6ab38b07280ab89f4bb89bb91be0451e17a" - integrity sha512-My3hhtsABWEAv9NIqx5USfgZ763QEu2FMwHNldL4xMcfiltdJfL83ztVtCC+DQ03cRiOAvBv43FqU+mmB4Yl3g== +"@parcel/cache@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.428.tgz#daaecd0cd061d8728deb78b948f09ce90f3c1543" + integrity sha512-67n0FyNPvanlQL6zlOhGWFcuVDOVgtkiuROhdrzW1in/MT/XwM1fYDSgpGtIZ4Megjp1aWlv58PBnC3b+qyU+w== dependencies: - "@parcel/logger" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" -"@parcel/codeframe@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.427.tgz#0ed3b4fd4c35e3204247e4d93058ef2c9051267c" - integrity sha512-xCObavel3LoqTEGnvuXODi6HC07jMb4pRr7F/upCjiGaE0JNX7ek6ptZpEYq+djLPeis9z1Zn0TyEDD3MX/5rA== +"@parcel/codeframe@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.428.tgz#68687330a76f098b6cfba3b3cc1e166c382098a9" + integrity sha512-a9e8nqoTKKcnlqhwNCqRgCqxn6ZMdVcVnxCWDGF4Fb74VzLXXbIbLre9lumb2EeD5msWZvnzlCJmnRwI84KUDw== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.427.tgz#18133dcfccffea6c542142bd50daf56a9244e23e" - integrity sha512-dec8iKX1MOM1bB6aYKYpQHL4zpIbmNjt3sWaGfYlqeqgidx+9nzoQegEH4yQzXXTcJfNLW5bv7CpPouyb6MxPg== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.427+069a2b1d" - "@parcel/namer-default" "2.0.0-nightly.427+069a2b1d" - "@parcel/optimizer-cssnano" "2.0.0-nightly.427+069a2b1d" - "@parcel/optimizer-data-url" "2.0.0-nightly.427+069a2b1d" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.427+069a2b1d" - "@parcel/optimizer-terser" "2.0.0-nightly.427+069a2b1d" - "@parcel/packager-css" "2.0.0-nightly.427+069a2b1d" - "@parcel/packager-html" "2.0.0-nightly.427+069a2b1d" - "@parcel/packager-js" "2.0.0-nightly.427+069a2b1d" - "@parcel/packager-raw" "2.0.0-nightly.427+069a2b1d" - "@parcel/packager-raw-url" "2.0.0-nightly.2049+069a2b1d" - "@parcel/packager-ts" "2.0.0-nightly.427+069a2b1d" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2049+069a2b1d" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2049+069a2b1d" - "@parcel/reporter-cli" "2.0.0-nightly.427+069a2b1d" - "@parcel/reporter-dev-server" "2.0.0-nightly.427+069a2b1d" - "@parcel/resolver-default" "2.0.0-nightly.427+069a2b1d" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.427+069a2b1d" - "@parcel/runtime-js" "2.0.0-nightly.427+069a2b1d" - "@parcel/runtime-react-refresh" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-babel" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-coffeescript" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-css" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-glsl" "2.0.0-nightly.2049+069a2b1d" - "@parcel/transformer-graphql" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-html" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-image" "2.0.0-nightly.2049+069a2b1d" - "@parcel/transformer-inline-string" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-js" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-json" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-jsonld" "2.0.0-nightly.2049+069a2b1d" - "@parcel/transformer-less" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-mdx" "2.0.0-nightly.2049+069a2b1d" - "@parcel/transformer-postcss" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-posthtml" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-pug" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-raw" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-sass" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-stylus" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-sugarss" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-toml" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-typescript-types" "2.0.0-nightly.427+069a2b1d" - "@parcel/transformer-vue" "2.0.0-nightly.2049+069a2b1d" - "@parcel/transformer-yaml" "2.0.0-nightly.427+069a2b1d" - -"@parcel/core@2.0.0-nightly.425+069a2b1d": - version "2.0.0-nightly.425" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.425.tgz#1526370b1b270b57a0ac748992c99c09e5c22316" - integrity sha512-qcgliAYE5GQI3flZiEZiAaExUJDs1JgIiwye9CRxQzRIseuZdpdQY/Lq+saMCYpsoMWNE8wOq1XecVsOOLz6YA== - dependencies: - "@parcel/cache" "2.0.0-nightly.427+069a2b1d" - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/events" "2.0.0-nightly.427+069a2b1d" - "@parcel/fs" "2.0.0-nightly.427+069a2b1d" - "@parcel/logger" "2.0.0-nightly.427+069a2b1d" - "@parcel/package-manager" "2.0.0-nightly.427+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" +"@parcel/config-default@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.428.tgz#111e40ed342ced5b38bbcf65e91e33c66be23491" + integrity sha512-0KAba2rXoFAhl+o3fOnAdBn01rMzkfCx2unR2ivLd6/dMvektwAap0/ExH+MyMa+qPzbs5JI6YkSglfsTVhxtw== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.428+5f72d6bb" + "@parcel/namer-default" "2.0.0-nightly.428+5f72d6bb" + "@parcel/optimizer-cssnano" "2.0.0-nightly.428+5f72d6bb" + "@parcel/optimizer-data-url" "2.0.0-nightly.428+5f72d6bb" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.428+5f72d6bb" + "@parcel/optimizer-terser" "2.0.0-nightly.428+5f72d6bb" + "@parcel/packager-css" "2.0.0-nightly.428+5f72d6bb" + "@parcel/packager-html" "2.0.0-nightly.428+5f72d6bb" + "@parcel/packager-js" "2.0.0-nightly.428+5f72d6bb" + "@parcel/packager-raw" "2.0.0-nightly.428+5f72d6bb" + "@parcel/packager-raw-url" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/packager-ts" "2.0.0-nightly.428+5f72d6bb" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/reporter-cli" "2.0.0-nightly.428+5f72d6bb" + "@parcel/reporter-dev-server" "2.0.0-nightly.428+5f72d6bb" + "@parcel/resolver-default" "2.0.0-nightly.428+5f72d6bb" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.428+5f72d6bb" + "@parcel/runtime-js" "2.0.0-nightly.428+5f72d6bb" + "@parcel/runtime-react-refresh" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-babel" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-coffeescript" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-css" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-glsl" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/transformer-graphql" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-html" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-image" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/transformer-inline-string" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-js" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-json" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-jsonld" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/transformer-less" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-mdx" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/transformer-postcss" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-posthtml" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-pug" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-raw" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-sass" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-stylus" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-sugarss" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-toml" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-typescript-types" "2.0.0-nightly.428+5f72d6bb" + "@parcel/transformer-vue" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/transformer-yaml" "2.0.0-nightly.428+5f72d6bb" + +"@parcel/core@2.0.0-nightly.426+5f72d6bb": + version "2.0.0-nightly.426" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.426.tgz#2b652e74ecc073831d1fa5da7f97b8e13c220972" + integrity sha512-KqndVF5Fd4gf6Zf2gK6sY0qogS6OiyO6uF1oYL6+gqcFZKRNRi/9dd3lDverdAq7brt18bCCVXICy6dYme3DyQ== + dependencies: + "@parcel/cache" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/events" "2.0.0-nightly.428+5f72d6bb" + "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" + "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" + "@parcel/package-manager" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" - "@parcel/workers" "2.0.0-nightly.427+069a2b1d" + "@parcel/types" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2292,71 +2292,71 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.427.tgz#feb54de269aaf2a8fd0d03e5cf19328810b2db55" - integrity sha512-lLeSF6tqLAVeEGrXvFaAEIZ3qfFUhP4SPeDdcaBavkxcl21YpxBkIYkIeJV37sCkNNMkNsknex7PP2iwX4Ec2w== +"@parcel/diagnostic@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.428.tgz#40d618bddd08724c8aa845c8a8092fdf5b871bb2" + integrity sha512-UxtwtCFsdVKQzmcAooQkm1Wwtd27165/wB1UQrkXYx5RQpSptEhd8LPBqgFZPMzUBLbBp1izwxCQmmekG4ignw== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.427.tgz#d55520ae0dbd120f5599c003706cda5a8a3c2f8c" - integrity sha512-JDmZJ8gD/xKuUqq1qGJ9gCvsql9UM6RSxwe429/LighXkv8Lleh/0ByLOFdsxUiYds7hS+1zbdKyCmpORhVxYQ== +"@parcel/events@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.428.tgz#f1e5852f6050027f843de9a61a7fdf12dbc45a98" + integrity sha512-PProq1xqik+5hemAOJi+bRqRkRVHsGQhg86KJkt9+4ojP0HAwmsOQrpULO0S0WPF8lLGaGNVs4xo8O3ej6JBWg== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2049.tgz#26cd9729953f1c8d6b90cd72423e0e579a676f89" - integrity sha512-q7O0EHB3Ge4vZPGb3aAzNSFBk0wBLiHqiNzH3t7oqX0ySHIx18sBu9ihYb+zi8dsCqW4/xpva331xTHyCbax0w== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2050.tgz#0b647b977ce4959951599904044525bf4048ce70" + integrity sha512-f808N3PzbQceq0dkdQ7CZ1u32S0E8SLPeUOXlIPk8TSrBiq1UUA59nWJXNGCVTJ6yTUmKoFsgzM91xHWuQTB+Q== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.427.tgz#6e198f41a8e223392e924b1e02fdf01441760c89" - integrity sha512-v+pY2S4NS2H2LaQtbYChWCc9QIA2nDScnXIz2r95w03dta8LaTevu5vaIYz6lnQVuQnwdzD7HpHGxxONJEUURA== +"@parcel/fs@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.428.tgz#7cfb856764e8496486f5e2093d4dc9c1182f14ab" + integrity sha512-rTIqQJKI7qXDfZcuCbEhI3/OJuNCulfZs4j8wYbSRDJVIh7gmdNwkJQhYzft2NlH5MkbusbpFxBus7UiiJNv+g== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2049+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.427+069a2b1d" + "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^2.6.2" -"@parcel/logger@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.427.tgz#df6b5947be56701bbb1e20580a1d47663fec7b89" - integrity sha512-wmx+kg8p8f1hF/8PwQW8ir+Ul/3i1Yw0i+Z8LOoissP5dqxFFZbZr7E59ssOLVe4KnHmN57LxPsv8vv8C+1ZHg== +"@parcel/logger@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.428.tgz#9cd9e5f70254c1e52eb78087e70046545fe2f506" + integrity sha512-cKljUUzvyo3ZXPQ5VRoOJ578h/LUrXpigYjQf2Fk3HnbKokdjljkEIyJCe/tlPLqoP4fAnh38+HfoJor24qoqQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/events" "2.0.0-nightly.427+069a2b1d" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/events" "2.0.0-nightly.428+5f72d6bb" -"@parcel/markdown-ansi@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.427.tgz#cd5cabff791fa1f306b00c5ff080a6f2582482ad" - integrity sha512-h8koKTVMBLoP41UT7HBkI2z8vXxc9z67J2MZZAiYVE7PG96budn7jnz3SiGjicVpRjVVravxz6eqWOakk+4WUw== +"@parcel/markdown-ansi@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.428.tgz#b577193f5cdacd302030793d10bcffffe61debf0" + integrity sha512-Nj9Zl4ik/i056KJ8meYDlfBvZNOnneA5AyOCvqlC4Ulk5EiOtEhC1oowbO/T2eDYCI4bmRxzb1Sf0dQ6y89mng== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.427.tgz#61aafa67fa83bf2625d287dbd29efc34611dd448" - integrity sha512-po1zNHOd27GX6Ubd2/0wtnrZGUDvTYZHTEahAygpYKJ0rukx+EzycwN56Sr0//osujPva4rXUmirwIqe5nnx1g== +"@parcel/namer-default@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.428.tgz#f2eb5b3307717d0b041bd6cddaef3987b9f5d717" + integrity sha512-ZIyw48pQaMWvsIzugg7VUl8osrdMEsnJsC9K+mqr/UZj9jxDhy151WEdUu/OSQUXUnD1W0eULEksYCTUGVPo+w== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2049.tgz#22d5af60b3a503c530fb0880c5cb1eff100eef4c" - integrity sha512-L+bf05EXEdCUTa5IB+JMyHXLW9Io9Z4tA2QiZ2fa9jFnp8i9JswQIXE3peMQJD35GPpLINYllKr3z5pvMPHyEA== +"@parcel/node-libs-browser@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2050.tgz#fb4700beece5c36d7495590646b0f3541d0228ad" + integrity sha512-Vv/1AUmSAANKgkpBhoIK0V0KcBl6WbEuPqqjbbZ0HIrKjgyMq4kfyDpprvfNmnCVEcildFYSSLWNhfYCMjD/eA== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2381,71 +2381,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2049.tgz#e59b405b20321989000dccc1d0ab3065c2ec7527" - integrity sha512-Z/kKlgR6lZU1JmF8oHZyGqTIbS+DYpsGOyUBecur9rF/2UBgI9G+91Anf8wQ4jsM92X3J81Tp78148s2D48+eQ== +"@parcel/node-resolver-core@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2050.tgz#0bf66076f65949e73e94e80fe5bec377682bfbaa" + integrity sha512-MREk4sjv2KmxTWfZbW8FMU4mKAwkKd/VkCqFzpcgBQzedrGx19g+HwdcgnDvwON5NRHZp1qEFmRYeHHQWbiK3A== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/node-libs-browser" "2.0.0-nightly.2049+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/node-libs-browser" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.427.tgz#d1903407d05b2dfe96e3d057fda01580375ce656" - integrity sha512-OH27+gNaD0aw6AJzovN0ThjJD8p0iEnHqiQxFyrDzeGcNHgPo7GInV07il80R/7jqizUryX9juOWOtKp/sD1Mg== +"@parcel/optimizer-cssnano@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.428.tgz#8e539d0a1e1717a7f90fb85ad319e6ba07434bac" + integrity sha512-kPUAsPbQwH9NO3jUOfJh3RH8KV/N3rdt5ZAgIW+yhbl4mkUk+tMXE1pXXbN1F44saQNR/GKn+Z0i98x3sF8XKQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.427.tgz#d6c3a964a700827ef2efc35df86a4763e95feecc" - integrity sha512-9n3FrmUYPjlIpixfPhzmUfp4/6F2ZuWKFpmEetP4b8yIsy2dc/QYUGP9rd7lJ/ey5aw2P4RH1LKiNw0tI7FfKA== +"@parcel/optimizer-data-url@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.428.tgz#bb4d4bc6970e94ddcbb21fe74c58fc1f5f503fcd" + integrity sha512-WB1PbSlej//iVaoM7w+sRo7rHrRNNemiZysy8amXfzDkQWYHKmQc7/9iQtr9qf3TGrR50IZTcDWViyNfp8mC+A== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.427.tgz#0879a4638e1a336b8eb7a5ff7db84ef0ee07ec10" - integrity sha512-f1N1lSh3R/+k8oAuzltGVCkDcWGoqKriRZCj64lh80LaihdCdrGIeVKh2in/YbMr9EQRNHiktHpPXatZBeWupg== +"@parcel/optimizer-htmlnano@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.428.tgz#bd71fd60408c4d2f22e7d936874bec01cba070c9" + integrity sha512-h+f0Oj+MUBcedHK31vMEB2tBbNOGGVN/tNSjkmpeURr4GDR3VletHpd3uDJwp3M2t5Hi5x8tRF+PKAA/XPfCfQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.427.tgz#2294f36770b6f9475b159eb63dce152480be4fcc" - integrity sha512-33OU8bGAIhFqTXbTYHnML7uVfYxV/AfGkqb8d1hZKwqT+lGdQIii1i3xmxT9C5mgchwSZYRaVj45x6JLm0zsHg== +"@parcel/optimizer-terser@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.428.tgz#7e058b63320f6ec631b46f04896d2fc73bfbca1c" + integrity sha512-jdJt+kqTVx3QVwoZ1ghDSLxkLaklGqeRzCcDNeMx8SnXgnG4nohqvl4UeG5SRdj1V1+2LSVt/zW43XIY5wpp7g== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.427.tgz#be1c8a69071b2f2feb168bcd48e51cdde28f8f8a" - integrity sha512-7L06EYti5tWXfnojNXNHF1lgTlcB0ffrZUWLjmPrUZhrQHs8YeNq+DB4JSU07v+SgYAL6gyG8rZGIVQfcsUKyQ== +"@parcel/package-manager@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.428.tgz#9a47a91cb604120f8a154e1108309d0384ebedb7" + integrity sha512-M2poHMzbQ1nlxfrJD1C23Fh8YUBh8RB73HMXEpKrPAEn+S5AIMxxdc6oeJbpTpUIEiyGm3MkCt8nOk/la+StgA== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/fs" "2.0.0-nightly.427+069a2b1d" - "@parcel/logger" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" - "@parcel/workers" "2.0.0-nightly.427+069a2b1d" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" + "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2453,91 +2453,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.427.tgz#15d453b3e1644bd6aa602502f1bcdf06193a3731" - integrity sha512-/vbcFO9P9EnSJyD5oouBu5ZVs6HFCuxSNXIVdntOrV+crJnSAPwytnQz1Z+wAUmM75jyRQ0GTi45xk41b9qQGw== +"@parcel/packager-css@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.428.tgz#15461eadba085a6144caa6416a9757396a4eeedc" + integrity sha512-O5lfvpPuPUzXih32+bRm+6ZcTygUq4K9rHcVr3OY9neIGu7exYJtKB0ysoG6B8fZo7dt3jVytBZHnSHyZMTNvQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" -"@parcel/packager-html@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.427.tgz#f61f204b46d6cbf9c600ad600f8de7bd2bb6e792" - integrity sha512-Uzzt19vI8q4eso2CmzAAtreRfOtlo/wKROHaCW5MwPXmR7qv56JSTyFu1rVrWMaN9H4PtTWgZWcs/YPLPDlxeQ== +"@parcel/packager-html@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.428.tgz#ab66dafada49cf5397981657ec51258b95801b09" + integrity sha512-4ZTfPK5o4VWui0U4QM3rU4+qgSouNeweahN2lyTaXML4LLHb80i02/VgSA/cE/6kOfo7mNMv+jnnNgrLBYQ91g== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/types" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/types" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.427.tgz#267e4f12e6df9ada63baccada8b3f187e7730aa6" - integrity sha512-T6xsPWsqfpQiVsudiWRdoqnweT3U4Y5jIMqOueW59kRqQVJAD6BP5P5pj68v3CNWiED6W8b13O+1ZBkMWBZXXg== +"@parcel/packager-js@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.428.tgz#baa2288d9346013ef128ef0dfdfafc43fe6eb3db" + integrity sha512-vbiFYwbcCXCU6VJfgcndx6eB9G1cUaOXaDsdE8eOviuzEJxxSAzhtraxDX5BUDxwZUBiqsjfm+AKKvwoYWnbUQ== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/scope-hoisting" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/scope-hoisting" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2049.tgz#0caed87933e94be94c743434c970a79ee91d1fa2" - integrity sha512-WiwW/yWeq4ouV8A/MJY/q4TbECKo5v4U2uyTCgfJiQu8897t6GEab7MWYsPwU/3XIW6LvO9R1LK7GkphTHszyg== +"@parcel/packager-raw-url@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2050.tgz#c1ae7df401e3ac2be1d7f275fecf97d075685191" + integrity sha512-UBXtPeEpmtpYmCCw36HkNRVKzltQWceRzeM4WFHAF+30Zn96PlT+EzY8K1gtl2xyQ7yqa9lAm2jkEnuC6HeoPQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" -"@parcel/packager-raw@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.427.tgz#9e3bf375b6954a3505dfdefb18ccb418f7e5a57d" - integrity sha512-LnlW7WzaJBEH5Vy5k2jfRp74Q013gttCWq2P30CR6EqAYdaEWWoKsXzbjJEi2fFPOgfAExALp3pQ+YJOmS2aQg== +"@parcel/packager-raw@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.428.tgz#6ce37a7a3b70b59a3ea19274a20231a802107730" + integrity sha512-pzWComnfjMqLKKP4qL3Fr5AQyxAACIS3Ms0tjSzVJgRf6s3Ef9IHfGZmWoB8EEICdSi914zrGlTA/06dWpX6hA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/packager-ts@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.427.tgz#72453866b662582074eb99d3cb40f3412e85eb5e" - integrity sha512-Y/ItDUjRirLJf0HFjEgzXGlyKwYM9wry3GirAfRNLtu7hUYPSHNrbH6LhjkJFdH0doTN/FGzxm0sBYJrL7wllw== +"@parcel/packager-ts@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.428.tgz#c2989bfe3774da9305a485ce6af7bfd5594bc700" + integrity sha512-tmFJUgImvnrHBdSiGnzJzs92D/mHyCkamSyhphz2ZOa1xMaQbw3V4Hj50RXnmjNTZPyspDDkFk2TfMjISgDSIw== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/plugin@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.427.tgz#7161469a6e85c3c766c9b7574b047bb37ae3e00f" - integrity sha512-b8syJsyApXwqRVN1DtwHL/ZRVdfsFz9x2Hrf/za+AE4bmF2NcHctiJfqVkngbNoIPbvJMqe/YMRq+RdOfK0ddw== +"@parcel/plugin@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.428.tgz#0a8b3c0bcff4b4233cb85e4110f819acca291a77" + integrity sha512-rbHyE1zBOWM62BtoDnjDgXrdWDsdRDK9NdHY/IJdILnrrqbrRamY6x9xkOMuvrIBOkN7DmnfbFi2P8yUyaqr8Q== dependencies: - "@parcel/types" "2.0.0-nightly.427+069a2b1d" + "@parcel/types" "2.0.0-nightly.428+5f72d6bb" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2049.tgz#609c1939a632e9ba1fb8050879d94d646192b3a5" - integrity sha512-zjaRWJyWfJTLHWzFsKg2qYvwt/5r9bJ+Nb2lirwEo3lAqNoC4icalBTCCtFRY520K9l49YCKluHi9rKy0WB4uQ== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2050.tgz#bedabd5a0a631a98fe4152f7fd2093a766ff1e95" + integrity sha512-lRBWNQZXu71kvM07Rf4+1EDMWPCsV5+eowOTkPxT1eWGt+HPFmmxtb7JAUyHKcdId4IXEcKkWAssvX2+TlEPUQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2049.tgz#5c504b1379e166861650faeb5e885aa5a5888698" - integrity sha512-/iZ6yF1BP0X6JXLCMgmbGFgOVa03mAjCMIL6U6WA13pRQ4tf0bXS52d6wwoa1h7EGvWdX2TTSN136ELiVUEX0g== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2050.tgz#bf75aea295515a82ba97d7a731e1bd9a5fe42a39" + integrity sha512-RkI3qbE76jWYxRFMp8y1VSnDKRypZ6WqVQp3FEjJgk6Uf/XfecG6S9fg7Lxm4JeSJhJ1+bsRTl8RoqV9Gx5XGQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/reporter-cli@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.427.tgz#042a300161e37457b2593644e8f65c13d04f7b8b" - integrity sha512-cO6S7hFfa6FqZ6qkYYqF7I8xesaLYWihkXpaD92HeMg/xTUlD/GjmLJlBsCHdIX+XdyUwJ2UxQgI6tjcvqE1Jw== +"@parcel/reporter-cli@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.428.tgz#54d65cf83840e0ae22e5fbd5df3565c7fd575fb3" + integrity sha512-AVIZnI6olE64AkdZe9XLyOYBQUxgmH58N6oyIljn8COVpeLN7C2pNiJMlaXODxat4yqJg8LR8dt7vA0RMOcM6Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/types" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/types" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2546,13 +2546,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.427.tgz#548ec2de8d11ee48d74d7c00e6ed9288bfd65045" - integrity sha512-8NDV0oE5Bkm3NO5M2x4jwZnTUC4yDennvDQdqMiu+pVNOroi9jUQ3kkQa4OwVY8bOgo0Q4nP4Ka+AhFb4Vh3gQ== +"@parcel/reporter-dev-server@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.428.tgz#c77becc777bfe72d2a155136df0432e5b41742b2" + integrity sha512-ipr9XFKXWrQ6lWlkUeLYgCHcaxNbREb/Uh17t+n7E5vD7kQvvW7ptDi1MB1IqJAzn/y4a4OTLwJV2ZKnwEN9Iw== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^0.19.1" @@ -2560,54 +2560,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.427.tgz#92adf77c338a2a4787447095efe036801dee9ab4" - integrity sha512-wYIKtrqf1+6CKuWLhoGUUr2BdnoSCJqUeF5WGYaQRUHwgI/WOaq4JuyvHJoWa69u8z7gdjAyvIyVk6cExMBbog== +"@parcel/resolver-default@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.428.tgz#ef3adc63137dd23f53b5d230cff32fa732c88098" + integrity sha512-ay0HkjAZxtBEbSYTF65wCfxilDE0LkVeuwgapG8Pd1/FCw2zU4dA/s7MozRmb6DQ4cU2hZL+qbNgLOyQ0cSNuQ== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2049+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/node-resolver-core" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/runtime-browser-hmr@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.427.tgz#5c1c72105489e169dc385df5b81663d9ad73631d" - integrity sha512-wM+56RHCkkkDoTEzrUkSoQUAU8hmWLCmgt0w8Mi9PXJVqJzHZ/goKDF4BzeFWgMa1AU3v58JcCLRLQlc7erU2A== +"@parcel/runtime-browser-hmr@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.428.tgz#df69813cdf1f8ca05ed9ae9a4b3de0f41f255b5c" + integrity sha512-Sa2gGxveh3qjv6zCGY5l9yOgPjrqZrSzw0vISdtsgnItqW5o64Y2ZAtLS+nb1vH7KwEuhm9/O2tcye0JqeOEvQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" -"@parcel/runtime-js@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.427.tgz#1c4b26d070a23d336003c65b30ada64bf8d0cb65" - integrity sha512-wKph3P2AG4g3cM9wf1RqKKTwwZDlIZuzycsC0S2Dr/Xm6VjwqvHAL1GcY8w6lsCRQoXt8Qt3el+kx9MaM8+UCw== +"@parcel/runtime-js@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.428.tgz#e71798bd93144d9b4ec9665d23a7a68b88922340" + integrity sha512-26kopuJ1l3KvIc5Br+ctotsZ3BMqKlVHc4GvH9YilYGehqEaF1GDEX9Xjd2zBaLfQuFmHSM+dhFCkfz8ZVjQlA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.427.tgz#4b8e807d6ddd9f73d0a3e5f207eea6eed5bbe75e" - integrity sha512-Y2q48k9VtHZgcD1md6jNNiZuFriNxZg3gYUrTmZdZgHYqfP6K2xIcxCInPCHyDS2X+QhTPoQNByuYdgJAcXOSg== +"@parcel/runtime-react-refresh@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.428.tgz#f5f4b9c0d71c7a9835fe2c0f559215c09593f43d" + integrity sha512-CSA7HRbQrpSZK7ulZpKrhW/yN97TTxGUeqoYHKZ34xK+lPCNGNNBnQMrBoKxJ2xEE1nEiK8uYJjm3/3W2qAItA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" react-refresh "^0.6.0" -"@parcel/scope-hoisting@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.427.tgz#d7203cd607b9d055fe7ba03fa55a0972763e417c" - integrity sha512-vV2HJ88GrvTvLWzq0NnMKgc7qdotjg/up/o/V+GrGhNNaRAzIR9YXgiH5IbGy1fWGDev8uLoJSFmtI+1qJaFVQ== +"@parcel/scope-hoisting@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.428.tgz#b2a6d2d1eeaf3042b8c6a6ccb015b024488c0e27" + integrity sha512-31F7KlPhSteVSTT5+3ZAB3rFYSEtwsKv6qnn+0GBpMN2lZROXzSuo016OOwirCqw9mFwnbHf0/tm5qmP7tlaLQ== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2049+069a2b1d" - "@parcel/babylon-walk" "2.0.0-nightly.2049+069a2b1d" - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" + "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/babylon-walk" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2618,10 +2618,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.427.tgz#9cf581ff7b2d875c0ea797f971a800d68a4f6641" - integrity sha512-bTM3RPoM+9qbZhtxAGjifSJcw+sMx1jsFhL0rOXJ5wDeOSD4sVkMmdeAHvfnlE9CRTNgGY9y44j5Jsvem2aw2g== +"@parcel/transformer-babel@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.428.tgz#7e051b1cf177766d788a0faea3c4f85cf236129d" + integrity sha512-KASGFzx0m0tjqJqxyXEHc6ool4eTrBdhIJcfcOwBSoNSVDAloJxqqqgROSWL3bJmOraj85ToDJKPhBwXVYvBUA== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2631,85 +2631,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2049+069a2b1d" - "@parcel/babel-preset-env" "2.0.0-nightly.427+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/babel-preset-env" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.427.tgz#48a938d37e17dfe5ce070f89a5728bf88fbddf8a" - integrity sha512-sS+ibQxOnj1+G/oJ/S2GK6sEU+xtV4UZxbD/2iFfgBCOTDs6oyNJRYpbdDTYboMyStp2saOgwY6sQYwS1E0Yiw== +"@parcel/transformer-coffeescript@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.428.tgz#09fdc807bc06eababdbd8bd791bf42f6dfeff7bb" + integrity sha512-pEr51sfPjHqcuOFhLwT26+T4QWcbiUFz12521N5C+yJnpDYEOH5j+ojVaKjLefp62n2PSZKUzsobTB+TxHhJrQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.427.tgz#a7d1505baf6ff1007fad6eca5d54c98f0fe4fc18" - integrity sha512-3YMNC8xnGsyd5wvIFEhsTdEcYW3I1wcmN96inhcYsg5c+1pUJ/+e4Fe7syw2L6KTh1B8rxoX5zIVnYX1nKfG6A== +"@parcel/transformer-css@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.428.tgz#2173056e77387825f86ee0028df6d569f47111c6" + integrity sha512-IkIaoSxnfwz2XPUujqQr15buj/YnD4vWVY3BZKyDQ6wElOKXag9K/zSpYsDZk7S28ZKaDM12XyOhFKZl1SBdXA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2049.tgz#a20e40174f4fd53e569a40d9c9f72afbdbb40413" - integrity sha512-1nQIyN5NMWeDeR2cMi3M1tWUrYJMQG1qyyvnhproukjx1kjnIP8OynZHhlkrsYloBY+ezh1BtSIAXw5VxtJUXw== +"@parcel/transformer-glsl@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2050.tgz#2d5bacb53d8c8e8016bec0322943bb97ac9d691a" + integrity sha512-G3ROXTtkg8Ta5GakogQ/y2HMcc3xLcrhm4cKkDYBSSNnfnlqNVbB4CzErEv3VNLiJATQgnH//Aq2V3aZ1ui8mQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-graphql@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.427.tgz#a0eb7a6e44cb06e75859e14fc985624e55ffb736" - integrity sha512-1l8arpnwP6BWtpSooSC2IhN9MvsJxsr3EDl1ni7GTPsihHlQOmm3qPVKxE//nkJLjrOdq0f/GvCgJzW0+EQXIg== +"@parcel/transformer-graphql@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.428.tgz#66e756dc5826d79732917d9e8bbecae29763a702" + integrity sha512-ILBirKHDsbWMSiUCMKs25XBoCkjI9ZZPakpHANwVVzK46scOqyCZtD8uDrNW2IqBecoviHH9e1E2ke50AphWow== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-html@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.427.tgz#9ca36cbb6db921be55baa8eec0eadb26632f8c41" - integrity sha512-TEI7lLZEwmA0fmHae9dGbUJeK/40MUwBE7oGekpiQ8VsXB8RzMKsfdh4RI5XnqpsCMs1mFE0HWkQEnrKgvKtMw== +"@parcel/transformer-html@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.428.tgz#407875dfa6ccd3fb12ca0f24e0b1c4c5c3669b15" + integrity sha512-o0/w/+NLcPPUF7//HoTF/VQaALh+4YjCdhor8dCJgiVqX1tL7HEWgZ41TV6YrK9CF8eOIMp9iJLEtC7blEs9Eg== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2049.tgz#e5937da36a5902b710d4d9536d6ab90bc4179407" - integrity sha512-DAr1N3dH2CgzmvMCAe7/tDf2ws9DACx4xFcJrXRD9Dj8pokPPG5U6Ucykl2siGCpPRlhXoEymK2PRa/0c3Derw== +"@parcel/transformer-image@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2050.tgz#f57424c4016b46a4e92d8355af3821c49e07ab09" + integrity sha512-TLyxN4G86POpHW/VdGXloLwM3eu0wRfJMagjNue3nDl0aKGSvpT2OJZEpyhUui7C7owytM15s23+DHI3miwjpg== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-inline-string@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.427.tgz#7ddbf73d9a921f49235117dd83995d549f72eec5" - integrity sha512-INpyFes7Dknw5wN3bn6OyHdHfEYvW8AavHHnbeOsaEKiGUsGQZInKH3BA9KrAgg6KuxoLqwD7hLbP37Mzceo7g== +"@parcel/transformer-inline-string@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.428.tgz#8979079900022f74512a5fc6eb3278d8900a5fd6" + integrity sha512-DVwKaFobajhNDA9D7fewXoMtxwdgIUpZ6nK3m8BgzWHoH6zvDkkxaRqUfaodDtz+O46K8a80bwPeQsjqmVZyaA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-js@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.427.tgz#eaaa0d5db11884118b0ce69b4e62456571e8367c" - integrity sha512-kJ3Zhxgckq2+ZpZNo00UIUYCD6ZcHnPSWZ3mvRXxIAtRI5+jvhMEsskmmte/84MoKK+cGU7F57AHaX9cvK99kA== +"@parcel/transformer-js@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.428.tgz#d086557b4aa7589de1f0bc2105f89e40042a8291" + integrity sha512-RmCOay6oEGV0v7bjg7BC9l1St0f3WVBtTZUP8WNVWbfVv3zSNod5gTMaLI+4j1EDbzcLTm99d4XY6+mxK2+EFQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2718,193 +2718,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2049+069a2b1d" - "@parcel/babylon-walk" "2.0.0-nightly.2049+069a2b1d" - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/scope-hoisting" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/babylon-walk" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/scope-hoisting" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.427.tgz#95bf3abd3314163e4946fe672de15f4c6d3547be" - integrity sha512-K7Tb1ojU7vBIDrvdfA8rTaRAgCHYqG0H9wSYFjli+BfigkiZiSlvgo8tA6j2mNn5JfaQmHy2eug1QEBFoY8bSA== +"@parcel/transformer-json@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.428.tgz#f00ae358c6f6b0a1ac1676fcea189f45350ab447" + integrity sha512-6zt/xB4Abe3HW4EXboBN4eAMnX9AZ+s4ffMoezGVHVxlHClKQ4Hf7OkdHef/KZnu33JNjeC81BofSYVDMPD2xA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2049.tgz#9db25d1ccb38ac9060b90123be3c20c437e2036d" - integrity sha512-GOGngy3mSphQ/eVHk3zsOf5dfJ0XS+GDJNVgolyDA+PFErmNkkpieXB6MwwMt8hXBsUY4WerW+scbmPANra9EQ== +"@parcel/transformer-jsonld@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2050.tgz#8f877bf2abe86794fceb451df31ed3fee33ec62c" + integrity sha512-GG89Hfz4Nf9N10cJdBF2rrCJ1MSnTvVX+WRP379KxUHJh540O8xSVxcBnHnt5ByOD0JWB0Qkk0KyQQOe7K7WhA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/types" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/types" "2.0.0-nightly.428+5f72d6bb" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.427.tgz#b2c49b3d0f1174012dd48c5d63c897b128a03861" - integrity sha512-enww5T6QNvahBzrV28S9z5IdsuszGwbddFoSb2pd4d0LiyI2ne8occalKeftK3NkKltXTLL7SZH0HiBONzAbaA== +"@parcel/transformer-less@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.428.tgz#436159b13cba102d114eff58c4ad082b5322ce87" + integrity sha512-gSrGzckTQi7b+g8FrdsJiysgHSSzeEPA7RGE0MDjHllvcjpTSTvkIquS2ImMhTeID6b4DlxSo12JkGUAsQf15g== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2049.tgz#f37b41f59b1881743b6a67d6422989e15f70fd6d" - integrity sha512-JATFhb/3lvOy9/FFcOKjcsltQemrR1vG/Hn74rgYb3lybreY2CMvBje+lAJwZCb0aw21dpLwBWxhmGiPq5PkDA== +"@parcel/transformer-mdx@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2050.tgz#b03c7a0f4c9b8bb76743b06600a78a9224cf25d6" + integrity sha512-SWvTLYNy+ol3iHtOySeXq/nDMseTClIaX5yBrzvXlKbWt2voOhQjFJiUmxk6/mUqxRvBzwRr+0t5SnnKDWpGUg== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-postcss@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.427.tgz#b0446c89003ab05f89ed1981de75bd941b3f412a" - integrity sha512-jxNOSMYos559NfFjXI4Xcz1CCj6aUeHJzBKg1Qx6azrw3RuNQkmZybb7ajuGK6qljav2r6n2TvkuDLfmFjMYig== +"@parcel/transformer-postcss@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.428.tgz#02b4c8cccbb672a074dabc07be54e700b2257fa0" + integrity sha512-fYt5mAGMjWzG0Nucgy8M6qP5B9lIBsKwgpZM/ZlE3vP4AX2+CVtswYh8kDz44tQ4KLtxdCs0r2TJkVZ+HzW2vA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.427.tgz#c336ddc71335bcf680312a508b597ebffeeac337" - integrity sha512-qYlL59eJzDfpEfiNZl78CcjW/0Iedxz0RagGiGhkj6fHvN7T4P95Yz38kox4cuXitSbQuuTtC6zauNhBeQPo6w== +"@parcel/transformer-posthtml@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.428.tgz#1c5e845aab7201b6832215b6e44b793a74daf7f3" + integrity sha512-o2a02kFYexpKHR+1eMZE8bcmoMC7scKlHhFkaYD5LObdfAkQSu/ymFK692UUj6nuBCaqHu5DJjBqSoDVDH8pTw== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.427.tgz#94f757b82b84fbef08aa208a3623e2cf7108aa8b" - integrity sha512-ke+qKRPBOXvvjzL9SVV1L8iKiPYZzGi3cRBTicsmlWoees7qJji8pRXEGh8HW+KRcdrBBAUjtTdb441E1+g1+A== +"@parcel/transformer-pug@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.428.tgz#498d7332aa43725ed7c4003714666dd3e198a0c1" + integrity sha512-6b8qI6NfAyp9nac4Ffd6WgwUhV+SdmqAin1AUGvrPpxLP52Vd8ZyvTcPC7E2yHzoQ/wBU+WqMcvGL6i5x2efwQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-raw@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.427.tgz#d18a2b605665600f35fec7cd259a6580ca9aef89" - integrity sha512-2A6Mpp+8/oStIcen7r7+9rb7XNSeCNv1I7L/rFw2TNSB1zfSDA/+hTLA7VAtUYbffpUuze6ZY31W7vXQS8CdJQ== +"@parcel/transformer-raw@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.428.tgz#58dcb4f563869512cc148783aec3ba527208d610" + integrity sha512-m0OQ1ck0/hAfylpbJqtuIQTCDA2Jy7Y86SKV5WgSYKR1jjfelE4BJWWCGtl4I4mtK2/VpMvCQZKd6Kob4AJOog== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.427.tgz#bf7795789a4bc1bb7bed66dac465e6220f9af7bd" - integrity sha512-e4Aips/FUuH9KHrgvGLj7EHkw8UeYYno6tGzPnUWlPtpyTpVaTi0KVC022ALk5bInr+67WUSOuGWE68JP4SHug== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.428.tgz#25d5af01e55bef51edf83ad229e5e5f5970aa991" + integrity sha512-uqPx62jUjgt98Jq1UJcA6RuI3F46HAiF4DxuAJQNyQjGAtx4WZeZP/8iH1K1hpgyRGB8fBJwYxVtuwFCfxATlQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" react-refresh "^0.6.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.427.tgz#388f17f31222cfc44bbf1d13488d3f9a62b14927" - integrity sha512-W0cQbRd0DAYWKJYVg4O/2ld4tXK58QzQQnqVU5f9FDIGHJjWDF3NHmmpvJq1T3BHZEslFtwca5yG9jP2G8B7OA== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.428.tgz#beb9c3243dcb18cab717d75019bcb9c99f62f3b9" + integrity sha512-2iarFS+oVuLsu4yW8EbOkfl7SYRy4krL/Bqv6jRHYQf1YEG4fcStZusfkEcR6IwV4XDBHE4NkuTxhAKwFbGqAw== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2049+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" react-refresh "^0.6.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.427.tgz#1945835dec386f26696ac8ddd729f0fd8ec3273a" - integrity sha512-pA0CNcy/AnC/9u6EjY9fiXxE1eVcsQkVdkkpSRwcuEz6TKyGCqjxMr7uO3Om3JW+cN8Bj0C6YGmgTu/2bNvNmw== +"@parcel/transformer-sass@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.428.tgz#576bf41e99da779c2324179337e30a22da5e0bf9" + integrity sha512-W2AMLKI3OHvLrbCv1XJoeCA1KLmsAgx5UNWYL36P0vgS66DCy/JfqggtJ/8Oq3kXOzVfmjONwGlyn9O+0/2ZuA== dependencies: - "@parcel/fs" "2.0.0-nightly.427+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-stylus@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.427.tgz#29340c06f05a6b0f894aab367af4ea29e5a71a24" - integrity sha512-x8VBqbHzZLnWKeZu3XTZICcS8Ixhlf1OZ2oywdbskW5bWCGX7tGYk3biQz+CfQI9K9cdLYFeqNgr2jfTDTxMxA== +"@parcel/transformer-stylus@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.428.tgz#bdfdee966c1ffa8d5205d0df7b5630dc1259a672" + integrity sha512-E6dlNK55W4DosspdCdq8ggn2PEOZpt58OvpYJH4iPEeGCVMrdqFPDTcHDQ1kyosFF70RwpCqx7w9xLdFibD2sA== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-sugarss@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.427.tgz#17359e1e34426bca1f8a69f6f35e8eb3f3afb8cf" - integrity sha512-/8RiQpvTHMxAkzW3e95bQhCAIpGH44xGDBhQIKaGUDVCcuGbr+dVeU4t3Fqv616n9PvwrfljM80jZqL/0vgYHw== +"@parcel/transformer-sugarss@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.428.tgz#cc286659ac0892c2b1b9376d82847911b74c5ed2" + integrity sha512-llP6x3caV63EADeZethqEDAwM7VTdglkPLmvKFM57PQbxJ1sLDFzuWb9CY5ajd7gcFs9a2c4wRTz87EdL/Y8pg== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.427.tgz#5807c374701bcd6cf3cc676f6290fcf00a9578fb" - integrity sha512-CtNiTTwO21keOwsei3E9opHI7A3cdPnhUH5HFjjlJ3T5BTqwwLhqgSTbQ6ZsMlNkgkNOnOs06XRqjfg5JorW9w== +"@parcel/transformer-toml@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.428.tgz#c92cab9c5b75e23264377ead3e4ef05673339299" + integrity sha512-jAjP/76eF4RV0Sl6fOMXt3OjqIBAyQiaSSqPT59bHD65XPakPTvxGSII05jmqUqSFCtn+Qy7SMF2SktIJKZi7g== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/transformer-typescript-types@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.427.tgz#ab6d15c7a29c9cd634951668707345c0529ad3b5" - integrity sha512-++PDIuDPWLg1mkOfn4E5gnafbO9AGgJlXutGpHcpA01RZeCFU5AX+Tc/U/U5pCI6nB0vBttFvI+BA5lOeZLABw== +"@parcel/transformer-typescript-types@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.428.tgz#1121f5702fbf3563f785be393da252aa7e3a75ba" + integrity sha512-WMmmZB8fNwQ/wj9A6Z6OYEkIXCpbF8h73Ie6q2MUPpz6mgRtLhL3IfbCulpoHH3GvvJ/qo7IWynOqrYajHNuqw== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/ts-utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2049+069a2b1d": - version "2.0.0-nightly.2049" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2049.tgz#4204466e0ce1c6e09c91942afcb2a798a048752c" - integrity sha512-ghw9HNBfGukkn7qJPiRJG2MrFpsLv60BM/PNd14x6ZUFc+LY+ORkOxPdkRU8HoBx8LGl6DutRf/sos60aoFQEA== +"@parcel/transformer-vue@2.0.0-nightly.2050+5f72d6bb": + version "2.0.0-nightly.2050" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2050.tgz#7ac51e3921f1dfc2bf62be794e059d384c0a4107" + integrity sha512-qPYRvLHgbmB6heNIVwz8r2yfzaTpgIIKAXyHt66SFmA63l0iAt0HzRdmrRUKRSywinplrXwkEejY7W7PUtIAuQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.427.tgz#d197899c66990745cb10b0f4f249cf69785f747a" - integrity sha512-8HvnantEqFpwyHbNCVrpLYCtw4JuhX5TeIDsmN7A8/lhKPIMK79/Hp9FktzX5P2uEAUzeFpmaypSjVHIIBkeIw== +"@parcel/transformer-yaml@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.428.tgz#ab429adc33b8fef46f7b835fd85085f1e7958169" + integrity sha512-OnKyVu09nNxjCVC+Ltz44dX1Wobd6vPVUMOizzumxr/mffKF56qyJH5nZr5K3WFmjQPt3dZTALewE6K+/hmMHw== dependencies: - "@parcel/plugin" "2.0.0-nightly.427+069a2b1d" + "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" -"@parcel/ts-utils@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.427.tgz#5fbf562ef1af645d4574dddda022cfa10307f6e7" - integrity sha512-2NCi6On8/Q1xLrCfekFV3bM/mrF7F4aR704v0bDWtHq8UcTcjLolhYbNJcm35c44leEMmN8sUWpXLB6J69twpw== +"@parcel/ts-utils@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.428.tgz#aac135f27bf5108b5c3efd5f187de409c524ba9e" + integrity sha512-tiEGEvo5vnlnhxaRpECaJGMPv2h2WrDZLwmoJmd7dA8bRoi3J33b34XqcM1X0vOKAoiorA3Ty1eVZidhk8Wa5A== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.427.tgz#d4b29ebd86c68838503ff5757b5a0aacaf37a24c" - integrity sha512-eW6QQb0ormf23aMFH5YVdwJDyG91lx/urEtrDRgnvR1f1edS6htM12bfrKy5W+hF5bR/j/HaWOjB+iCLgMMgYQ== +"@parcel/types@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.428.tgz#2de9d12da3a389ee7c192e6f1778d1e40982ab4f" + integrity sha512-EccPH9PldxURL7FVd4Qk6wRXMPbw+9FLbK22hg6a7SKlioqKbM0Wi3esWvuArLTsLqKb1tYPskygPRqIzEfqmQ== -"@parcel/utils@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.427.tgz#92deb3a2ebdc5274b9cb3797dafa30c071893b7c" - integrity sha512-kSnspfphui50S4ExxiVhUVVSuoDWGVk5BPpHBowC/MliN9xUyJwKmNOyFTKPf7rZaJvqEzYlhkULX7fiqmZxfw== +"@parcel/utils@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.428.tgz#d791d9e7534db8ef99e189cbee4162505c33f0ab" + integrity sha512-uCcBVUYqhld0822F+4Yw3dnWuHsNbNsK6iIvbZbKCh7L+MlQkmCvlwYE0H0ew1u3HxjQj+Dlz/lfP7iFDj+Yvw== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.427+069a2b1d" - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/logger" "2.0.0-nightly.427+069a2b1d" - "@parcel/markdown-ansi" "2.0.0-nightly.427+069a2b1d" + "@parcel/codeframe" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" + "@parcel/markdown-ansi" "2.0.0-nightly.428+5f72d6bb" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2929,14 +2929,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.427+069a2b1d": - version "2.0.0-nightly.427" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.427.tgz#35eb168cb53d25ef3322b4220287a145a521f6ee" - integrity sha512-5yPy9oB6Kph+qhRxHZnqgDVBcA0yuxRjc75NCu/4dPcFbYuKhxz4Fu9Hte5UH6G3IbeFx8IeS9cD7YhGhUnGjg== +"@parcel/workers@2.0.0-nightly.428+5f72d6bb": + version "2.0.0-nightly.428" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.428.tgz#227023c9725bb31e495f752f35a317e5428873be" + integrity sha512-dWQNLnJ9TcgbXDQEQcudCAZj2n0IXeBmaYq/yaCSYJ2JfT68W+LyTZS5GleKo41UfudqecnFnLQFrbqHTWreyw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/logger" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10363,19 +10363,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.425: - version "2.0.0-nightly.425" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.425.tgz#5a45d6114794ed8bdff4094576f815e6ed2918fc" - integrity sha512-9LS0Yke3BW2vmK9lzcQn8CJS1STxMb53ed8styeAcgkA/YIHGDUjUmafx8HZyeBfmKFyY1NoP0mkZ8/WbS4iNw== - dependencies: - "@parcel/config-default" "2.0.0-nightly.427+069a2b1d" - "@parcel/core" "2.0.0-nightly.425+069a2b1d" - "@parcel/diagnostic" "2.0.0-nightly.427+069a2b1d" - "@parcel/events" "2.0.0-nightly.427+069a2b1d" - "@parcel/fs" "2.0.0-nightly.427+069a2b1d" - "@parcel/logger" "2.0.0-nightly.427+069a2b1d" - "@parcel/package-manager" "2.0.0-nightly.427+069a2b1d" - "@parcel/utils" "2.0.0-nightly.427+069a2b1d" +parcel@2.0.0-nightly.426: + version "2.0.0-nightly.426" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.426.tgz#9d5ae450adc1bc4174a5778c96042be342ab5657" + integrity sha512-hgEqIXAjG/ZQnImXxVqJeg1ZhlCfosrnUXSswRCG8XdNUs8oncumC3PbfvYWHNAGnX/h8y/7nU98u3hi9l1tFQ== + dependencies: + "@parcel/config-default" "2.0.0-nightly.428+5f72d6bb" + "@parcel/core" "2.0.0-nightly.426+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/events" "2.0.0-nightly.428+5f72d6bb" + "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" + "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" + "@parcel/package-manager" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From 6afaddc64fc07f7e014de9aaf4a8a8d7642339ba Mon Sep 17 00:00:00 2001 From: John Skilbeck Date: Tue, 20 Oct 2020 18:41:48 -0700 Subject: [PATCH 12/45] chore(stepfunctions): fix typo in sfn docs (#11000) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts index 2a12632d33ed0..52eecc773a3ad 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts @@ -363,7 +363,7 @@ export class StateMachine extends StateMachineBase { } /** - * Metric for the number of executions that succeeded + * Metric for the number of executions that timed out * * @default sum over 5 minutes */ From da57d61190b0f4c7cd62a46936a8c557075f2d66 Mon Sep 17 00:00:00 2001 From: Christoph Gysin Date: Wed, 21 Oct 2020 05:40:59 +0300 Subject: [PATCH 13/45] docs(app-delivery): Fix URL to pipelines readme (#10985) fixes #10984 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/app-delivery/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/app-delivery/README.md b/packages/@aws-cdk/app-delivery/README.md index 85e378002e5d1..949cf90b6c714 100644 --- a/packages/@aws-cdk/app-delivery/README.md +++ b/packages/@aws-cdk/app-delivery/README.md @@ -17,7 +17,7 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw # Replacement recommended This library has been deprecated. We recommend you use the -[@aws-cdk/pipelines](https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines.html) module instead. +[@aws-cdk/pipelines](https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html) module instead. ### Limitations From cc2600f4f2e43ebe8cc7b57e58e9ed75a210dfc4 Mon Sep 17 00:00:00 2001 From: Pat Myron Date: Tue, 20 Oct 2020 20:09:53 -0700 Subject: [PATCH 14/45] chore(region-info): eu-south-1 (Milan) ROUTE_53_BUCKET_WEBSITE_ZONE_ID (#10915) https://github.com/terraform-providers/terraform-provider-aws/pull/13061 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/region-info/build-tools/fact-tables.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts index 16124517c2d5e..6520348d3e2ad 100644 --- a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts +++ b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts @@ -65,6 +65,7 @@ export const ROUTE_53_BUCKET_WEBSITE_ZONE_IDS: { [region: string]: string } = { 'eu-west-2': 'Z3GKZC51ZF0DB4', 'eu-west-3': 'Z3R1K369G5AVDG', 'eu-north-1': 'Z3BAZG2TWCNX0D', + 'eu-south-1': 'Z3IXVV8C73GIO3', 'sa-east-1': 'Z7KQH4QJS55SO', 'me-south-1': 'Z1MPMWCPA7YB62', }; From 6956aadd6043499d8d55ca2d1a8ee65a91ac1bc6 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 21 Oct 2020 10:34:12 +0100 Subject: [PATCH 15/45] feat(cloudfront-origins): move cloudfront-origins to Developer Preview (#11005) The `aws-cloudfront` `Distribution` construct was marked as Developer Preview in #10831, but this module -- which the `Distribution` relies on -- was missed. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cloudfront-origins/README.md | 4 ++-- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/README.md b/packages/@aws-cdk/aws-cloudfront-origins/README.md index 1fe19e77ebf1b..8047fd612b814 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/README.md +++ b/packages/@aws-cdk/aws-cloudfront-origins/README.md @@ -3,9 +3,9 @@ --- -![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) +![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge) -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. +> The APIs of higher level constructs in this module are in **developer preview** before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. --- diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index e8810f8903394..419fb01f53c78 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -96,7 +96,7 @@ "node": ">= 10.13.0 <13 || >=13.7.0" }, "stability": "experimental", - "maturity": "experimental", + "maturity": "developer-preview", "awscdkio": { "announce": false } From 191d7b7706282812878e1aeed79d8f4b39d1f797 Mon Sep 17 00:00:00 2001 From: ncaq Date: Wed, 21 Oct 2020 20:48:37 +0900 Subject: [PATCH 16/45] fix(lambda-nodejs): docker build is not working (#10885) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #10881 # fix from sh to bash `lib/bundlers.ts` actually uses not `sh` but `bash`, `bash` is a good way to test. # lock yarn version aws-lambda-nodejs have issue * [npm install -g yarn · Issue #6 · nodejs/corepack](https://github.com/nodejs/corepack/issues/6) * [npm install yarn --global fails in docker container · Issue #8358 · yarnpkg/yarn](https://github.com/yarnpkg/yarn/issues/8358) From issue comment, > For future reference, you can (should) pin your version rather than use whatever the latest is on npm (by using yarn@1.22.6, etc) - it's a good practice anyway regardless of the conditions, as you never know which bug could slip by us. You can also use the yarn-path setting to ensure that upgrades go through the appropriate review processes (including CI). > > So we'll follow it. And from issue comment, > Fwiw we don't plan to add any more features to Yarn 1, as all of our resources have shifted to Yarn 2. The past few commits have been aimed toward making the transition a bit easier, in particular thanks to the Corepack initiative which we hope will make it easier to use Yarn (both 1 & 2) by removing the need to manually install them. > > There's not much need to be concerned with the latest version of 1. # allow execute command for non root user `amazon/aws-sam-cli-build-image-nodejs12.x` don't have user that index is 1000. So create non root user. `/` in `amazon/aws-sam-cli-build-image-nodejs12.x` permission is `700`. change to allow execute command for non root user. I really don't want to change around the permissions, but I don't have a choice. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile | 5 ++++- packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile b/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile index 40081228fd554..fe715c72fa8f2 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile +++ b/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile @@ -4,7 +4,7 @@ ARG IMAGE=amazon/aws-sam-cli-build-image-nodejs12.x FROM $IMAGE # Install yarn -RUN npm install --global yarn +RUN npm install --global yarn@1.22.5 # Install parcel 2 (fix the version since it's still in beta) # install at "/" so that node_modules will be in the path for /asset-input @@ -19,4 +19,7 @@ RUN mkdir /tmp/npm-cache && \ # Disable npm update notifications RUN npm config --global set update-notifier false +# create non root user and change allow execute command for non root user +RUN /sbin/useradd -u 1000 user && chmod 711 / + CMD [ "parcel" ] diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts index dfb8d07b0fb4a..7e0ed9db2fb86 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/docker.test.ts @@ -8,7 +8,7 @@ beforeAll(() => { test('parcel is available', async () => { const proc = spawnSync('docker', [ 'run', 'parcel', - 'sh', '-c', + 'bash', '-c', '$(node -p "require.resolve(\'parcel\')") --version', ]); expect(proc.status).toEqual(0); @@ -20,7 +20,7 @@ test('parcel is installed without a package-lock.json file', async () => { // See https://github.com/aws/aws-cdk/pull/10039#issuecomment-682738396 const proc = spawnSync('docker', [ 'run', 'parcel', - 'sh', '-c', + 'bash', '-c', 'test ! -f /package-lock.json', ]); expect(proc.status).toEqual(0); @@ -30,7 +30,7 @@ test('can npm install with non root user', async () => { const proc = spawnSync('docker', [ 'run', '-u', '1000:1000', 'parcel', - 'sh', '-c', [ + 'bash', '-c', [ 'mkdir /tmp/test', 'cd /tmp/test', 'npm i constructs', @@ -43,7 +43,7 @@ test('can yarn install with non root user', async () => { const proc = spawnSync('docker', [ 'run', '-u', '500:500', 'parcel', - 'sh', '-c', [ + 'bash', '-c', [ 'mkdir /tmp/test', 'cd /tmp/test', 'yarn add constructs', From 104af7973af6ea919b3caad6c7bfc100141fc363 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:26:50 +0000 Subject: [PATCH 17/45] chore(deps-dev): bump @types/jest from 26.0.14 to 26.0.15 (#11013) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.14 to 26.0.15. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/assert/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- .../@aws-cdk/aws-s3-deployment/package.json | 2 +- packages/@aws-cdk/aws-sam/package.json | 2 +- .../@aws-cdk/cdk-assets-schema/package.json | 2 +- .../cloud-assembly-schema/package.json | 2 +- .../@aws-cdk/cloudformation-diff/package.json | 2 +- .../cloudformation-include/package.json | 2 +- packages/@aws-cdk/cx-api/package.json | 2 +- packages/@aws-cdk/yaml-cfn/package.json | 2 +- .../@monocdk-experiment/assert/package.json | 2 +- .../rewrite-imports/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/cdk-dasm/package.json | 2 +- packages/decdk/package.json | 2 +- tools/cdk-build-tools/package.json | 2 +- tools/cfn2ts/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 64 +++---------------- 22 files changed, 29 insertions(+), 77 deletions(-) diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index 047998b2e3ef9..bde81f60bb29e 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -21,7 +21,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", "pkglint": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index bd0deb1d79d30..76161ad0592f3 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "aws-sdk": "^2.739.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index 92d6ab6fbcd2f..4855a85d55912 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -84,7 +84,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "jest": "^26.6.0", diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 840669a6c7c50..12e502538f1cb 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -74,7 +74,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", "jest": "^26.6.0", diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index 2bae672bd0d70..9e54e1b01e0c6 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -51,7 +51,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 003e36566b529..f30b868052d89 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -52,7 +52,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/mock-fs": "^4.10.0", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 3449a436cfd91..12bf07e3ad5b3 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -29,7 +29,7 @@ "table": "^6.0.3" }, "devDependencies": { - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/string-width": "^4.0.1", "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 0e340761cb8a5..4a375fd912535 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -327,7 +327,7 @@ }, "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "jest": "^26.6.0", diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index abd8a47463b29..b3d0346a284eb 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -58,7 +58,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/mock-fs": "^4.10.0", "@types/semver": "^7.3.4", "cdk-build-tools": "0.0.0", diff --git a/packages/@aws-cdk/yaml-cfn/package.json b/packages/@aws-cdk/yaml-cfn/package.json index 579c9d6caa626..e80e67461905a 100644 --- a/packages/@aws-cdk/yaml-cfn/package.json +++ b/packages/@aws-cdk/yaml-cfn/package.json @@ -68,7 +68,7 @@ }, "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/yaml": "^1.9.7", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index e4a53277bd678..5a062553b94e3 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -34,7 +34,7 @@ "license": "Apache-2.0", "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/node": "^10.17.40", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 51912c5c951ff..70062d4c99c5b 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -36,7 +36,7 @@ }, "devDependencies": { "@types/glob": "^7.1.3", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/node": "^10.17.40", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 58b6a57b2bbe8..60091f79304bd 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -42,7 +42,7 @@ "@types/archiver": "^3.1.1", "@types/fs-extra": "^8.1.1", "@types/glob": "^7.1.3", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", "@types/node": "^10.17.40", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 66d479dcfd3a6..08b0f2e386cd7 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@types/archiver": "^3.1.1", "@types/glob": "^7.1.3", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.10.0", "@types/node": "^10.17.40", diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 9d30566e8d12b..931d14a29804b 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -30,7 +30,7 @@ "yaml": "1.10.0" }, "devDependencies": { - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/yaml": "1.9.7", "jest": "^26.6.0" }, diff --git a/packages/decdk/package.json b/packages/decdk/package.json index eb62f163f0f83..c5e037718909f 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -196,7 +196,7 @@ }, "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/yaml": "1.9.7", "@types/yargs": "^15.0.7", "jest": "^26.6.0", diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index be921ac90d11a..0e9ce15abf100 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -34,7 +34,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/yargs": "^15.0.7", "pkglint": "0.0.0" }, diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 27ace1c44318a..d18a7449fc107 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/yargs": "^15.0.7", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index a3510b480ec80..e7c12b57ab571 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@types/eslint": "^7.2.3", "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/node": "^10.17.40", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.0", diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index 1af5c92bdcecb..d978a065474aa 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -12,7 +12,7 @@ "build+test": "npm run build && npm test" }, "devDependencies": { - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/node": "^10.17.40", "typescript": "~3.9.7" }, diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 8edb7635a8f74..7d42d40d9fc79 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -38,7 +38,7 @@ ] }, "devDependencies": { - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.15", "@types/node": "^10.17.40", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.0", diff --git a/yarn.lock b/yarn.lock index 78bcb29265411..f9e3107e767ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1244,16 +1244,6 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" - integrity sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - "@jest/types@^26.3.0": version "26.3.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.3.0.tgz#97627bf4bdb72c55346eef98e3b3f7ddc4941f71" @@ -3073,14 +3063,6 @@ dependencies: "@types/istanbul-lib-coverage" "*" -"@types/istanbul-reports@^1.1.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" - integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== - dependencies: - "@types/istanbul-lib-coverage" "*" - "@types/istanbul-lib-report" "*" - "@types/istanbul-reports@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821" @@ -3088,13 +3070,13 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.x", "@types/jest@^26.0.14": - version "26.0.14" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.14.tgz#078695f8f65cb55c5a98450d65083b2b73e5a3f3" - integrity sha512-Hz5q8Vu0D288x3iWXePSn53W7hAjP0H7EQ6QvDO9c7t46mR0lNOLlfuwQ+JkVxuhygHzlzPX+0jKdA3ZgSh+Vg== +"@types/jest@26.x", "@types/jest@^26.0.15": + version "26.0.15" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.15.tgz#12e02c0372ad0548e07b9f4e19132b834cb1effe" + integrity sha512-s2VMReFXRg9XXxV+CW9e5Nz8fH2K1aEhwgjUqPPbQd7g95T0laAcvLv032EhFHIa5GHsZ8W7iJEQVaJq6k3Gog== dependencies: - jest-diff "^25.2.1" - pretty-format "^25.2.1" + jest-diff "^26.0.0" + pretty-format "^26.0.0" "@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5": version "7.0.6" @@ -5640,11 +5622,6 @@ dezalgo@^1.0.0: asap "^2.0.0" wrappy "1" -diff-sequences@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" - integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== - diff-sequences@^26.5.0: version "26.5.0" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" @@ -8129,17 +8106,7 @@ jest-config@^26.6.0: micromatch "^4.0.2" pretty-format "^26.6.0" -jest-diff@^25.2.1: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" - integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== - dependencies: - chalk "^3.0.0" - diff-sequences "^25.2.6" - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - -jest-diff@^26.6.0: +jest-diff@^26.0.0, jest-diff@^26.6.0: version "26.6.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.0.tgz#5e5bbbaf93ec5017fae2b3ef12fc895e29988379" integrity sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w== @@ -8192,11 +8159,6 @@ jest-environment-node@^26.6.0: jest-mock "^26.6.0" jest-util "^26.6.0" -jest-get-type@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" - integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== - jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" @@ -11059,17 +11021,7 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -pretty-format@^25.2.1, pretty-format@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" - integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== - dependencies: - "@jest/types" "^25.5.0" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" - -pretty-format@^26.6.0: +pretty-format@^26.0.0, pretty-format@^26.6.0: version "26.6.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.0.tgz#1e1030e3c70e3ac1c568a5fd15627671ea159391" integrity sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA== From cc176ac4f043408bdb51732b74f229efeb8e52bd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 17:08:00 +0000 Subject: [PATCH 18/45] chore(deps-dev): bump cdk8s-plus from 0.29.0 to 0.33.0 (#11017) Bumps [cdk8s-plus](https://github.com/awslabs/cdk8s) from 0.29.0 to 0.33.0. - [Release notes](https://github.com/awslabs/cdk8s/releases) - [Changelog](https://github.com/awslabs/cdk8s/blob/master/CHANGELOG.md) - [Commits](https://github.com/awslabs/cdk8s/compare/v0.29.0...v0.33.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-eks/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 919b153e5f811..fdc7ade0a2031 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -81,7 +81,7 @@ "nodeunit": "^0.11.3", "pkglint": "0.0.0", "sinon": "^9.1.0", - "cdk8s-plus": "^0.29.0", + "cdk8s-plus": "^0.33.0", "cdk8s": "^0.32.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index f9e3107e767ca..88f30135421fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4334,10 +4334,10 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -cdk8s-plus@^0.29.0: - version "0.29.0" - resolved "https://registry.yarnpkg.com/cdk8s-plus/-/cdk8s-plus-0.29.0.tgz#c30dc2aca0338f473b2572e92268946adc014ad9" - integrity sha512-++8E+uk7cdLiqZgpb/95goNd8pSHBtjWEqe/Fe7JCrUOCfKEBma60PvTHZaSMGRx52bkd1vevyQYiCmcAz4Aww== +cdk8s-plus@^0.33.0: + version "0.33.0" + resolved "https://registry.yarnpkg.com/cdk8s-plus/-/cdk8s-plus-0.33.0.tgz#b2dc56b417ab8261cd4a796f080f04dcd4fe0f66" + integrity sha512-CnvuNTQS9DH1MYEDizUObMZ3PG7BqshJaG7kkuThmwNgC8QkVGmOkLC9YP8UBDr1mKW+zfV12HCIw93SteRr3g== dependencies: minimatch "^3.0.4" From 3f668fa0d65aee75ab68372e13930357d9964e62 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Wed, 21 Oct 2020 18:52:33 +0100 Subject: [PATCH 19/45] docs(lambda): correct the default value for maxRecordAge in EventSourceMapping (#11018) closes #10693 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda/lib/event-source-mapping.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda/lib/event-source-mapping.ts b/packages/@aws-cdk/aws-lambda/lib/event-source-mapping.ts index be59fdd54f0a1..d44ce1cbea1b4 100644 --- a/packages/@aws-cdk/aws-lambda/lib/event-source-mapping.ts +++ b/packages/@aws-cdk/aws-lambda/lib/event-source-mapping.ts @@ -68,7 +68,7 @@ export interface EventSourceMappingOptions { * * Minimum value of 60 seconds * * Maximum value of 7 days * - * @default Duration.days(7) + * @default - infinite or until the record expires. */ readonly maxRecordAge?: cdk.Duration; From 60f493c9a606162816c14149ea578341ea458a05 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Wed, 21 Oct 2020 12:13:13 -0700 Subject: [PATCH 20/45] chore(cognito): reorganize identity providers structure so that UserPoolIdentityProviderBase is not exported (#10925) we had split our identity providers to have a file per provider. however, in this organization we were exporting the base class which we did not intend to. the `UserPoolIdentityProviderBase` class cannot be moved to a separate file (i.e. private folder) as JSII will be unable to resolve type. updated to follow our typical pattern of containing all extensions of the base class within a single file `user-pool-idp.ts` and moved all the tests over as well. BREAKING CHANGE: the `UserPoolIdentityProviderBase` abstract class has been removed. Use the `UserPoolIdentityProvider*` classes directly. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cognito/lib/index.ts | 3 +- .../@aws-cdk/aws-cognito/lib/user-pool-idp.ts | 387 ++++++++++++++++++ .../aws-cognito/lib/user-pool-idps/amazon.ts | 53 --- .../aws-cognito/lib/user-pool-idps/base.ts | 233 ----------- .../lib/user-pool-idps/facebook.ts | 58 --- .../aws-cognito/lib/user-pool-idps/google.ts | 53 --- .../aws-cognito/lib/user-pool-idps/index.ts | 4 - .../aws-cognito/test/user-pool-idp.test.ts | 295 +++++++++++++ .../test/user-pool-idps/amazon.test.ts | 101 ----- .../test/user-pool-idps/base.test.ts | 94 ----- .../test/user-pool-idps/facebook.test.ts | 103 ----- .../test/user-pool-idps/google.test.ts | 101 ----- 12 files changed, 683 insertions(+), 802 deletions(-) delete mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/amazon.ts delete mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/base.ts delete mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/facebook.ts delete mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/google.ts delete mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idp.test.ts delete mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/amazon.test.ts delete mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/base.test.ts delete mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/facebook.test.ts delete mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/google.test.ts diff --git a/packages/@aws-cdk/aws-cognito/lib/index.ts b/packages/@aws-cdk/aws-cognito/lib/index.ts index 2da1e6121b69b..9aaccf45bf47e 100644 --- a/packages/@aws-cdk/aws-cognito/lib/index.ts +++ b/packages/@aws-cdk/aws-cognito/lib/index.ts @@ -4,5 +4,4 @@ export * from './user-pool'; export * from './user-pool-attr'; export * from './user-pool-client'; export * from './user-pool-domain'; -export * from './user-pool-idp'; -export * from './user-pool-idps'; \ No newline at end of file +export * from './user-pool-idp'; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idp.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idp.ts index c569ccd778fd8..1cc5ccbea23b1 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-idp.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idp.ts @@ -1,5 +1,8 @@ import { IResource, Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; +import { CfnUserPoolIdentityProvider } from './cognito.generated'; +import { StandardAttributeNames } from './private/attr-names'; +import { IUserPool } from './user-pool'; /** * Represents a UserPoolIdentityProvider @@ -29,4 +32,388 @@ export class UserPoolIdentityProvider { } private constructor() {} +} + +/** + * An attribute available from a third party identity provider. + */ +export class ProviderAttribute { + /** The user id attribute provided by Amazon */ + public static readonly AMAZON_USER_ID = new ProviderAttribute('user_id'); + /** The email attribute provided by Amazon */ + public static readonly AMAZON_EMAIL = new ProviderAttribute('email'); + /** The name attribute provided by Amazon */ + public static readonly AMAZON_NAME = new ProviderAttribute('name'); + /** The postal code attribute provided by Amazon */ + public static readonly AMAZON_POSTAL_CODE = new ProviderAttribute('postal_code'); + + /** The user id attribute provided by Facebook */ + public static readonly FACEBOOK_ID = new ProviderAttribute('id'); + /** The birthday attribute provided by Facebook */ + public static readonly FACEBOOK_BIRTHDAY = new ProviderAttribute('birthday'); + /** The email attribute provided by Facebook */ + public static readonly FACEBOOK_EMAIL = new ProviderAttribute('email'); + /** The name attribute provided by Facebook */ + public static readonly FACEBOOK_NAME = new ProviderAttribute('name'); + /** The first name attribute provided by Facebook */ + public static readonly FACEBOOK_FIRST_NAME = new ProviderAttribute('first_name'); + /** The last name attribute provided by Facebook */ + public static readonly FACEBOOK_LAST_NAME = new ProviderAttribute('last_name'); + /** The middle name attribute provided by Facebook */ + public static readonly FACEBOOK_MIDDLE_NAME = new ProviderAttribute('middle_name'); + /** The gender attribute provided by Facebook */ + public static readonly FACEBOOK_GENDER = new ProviderAttribute('gender'); + /** The locale attribute provided by Facebook */ + public static readonly FACEBOOK_LOCALE = new ProviderAttribute('locale'); + + /** The name attribute provided by Google */ + public static readonly GOOGLE_NAMES = new ProviderAttribute('names'); + /** The gender attribute provided by Google */ + public static readonly GOOGLE_GENDER = new ProviderAttribute('gender'); + /** The birthday attribute provided by Google */ + public static readonly GOOGLE_BIRTHDAYS = new ProviderAttribute('birthdays'); + /** The birthday attribute provided by Google */ + public static readonly GOOGLE_PHONE_NUMBERS = new ProviderAttribute('phoneNumbers'); + /** The email attribute provided by Google */ + public static readonly GOOGLE_EMAIL = new ProviderAttribute('email'); + /** The name attribute provided by Google */ + public static readonly GOOGLE_NAME = new ProviderAttribute('name'); + /** The email attribute provided by Google */ + public static readonly GOOGLE_PICTURE = new ProviderAttribute('picture'); + /** The email attribute provided by Google */ + public static readonly GOOGLE_GIVEN_NAME = new ProviderAttribute('given_name'); + /** The email attribute provided by Google */ + public static readonly GOOGLE_FAMILY_NAME = new ProviderAttribute('family_name'); + + /** + * Use this to specify an attribute from the identity provider that is not pre-defined in the CDK. + * @param attributeName the attribute value string as recognized by the provider + */ + public static other(attributeName: string): ProviderAttribute { + return new ProviderAttribute(attributeName); + } + + /** The attribute value string as recognized by the provider. */ + public readonly attributeName: string; + + private constructor(attributeName: string) { + this.attributeName = attributeName; + } +} + +/** + * The mapping of user pool attributes to the attributes provided by the identity providers. + */ +export interface AttributeMapping { + /** + * The user's postal address is a required attribute. + * @default - not mapped + */ + readonly address?: ProviderAttribute; + + /** + * The user's birthday. + * @default - not mapped + */ + readonly birthdate?: ProviderAttribute; + + /** + * The user's e-mail address. + * @default - not mapped + */ + readonly email?: ProviderAttribute; + + /** + * The surname or last name of user. + * @default - not mapped + */ + readonly familyName?: ProviderAttribute; + + /** + * The user's gender. + * @default - not mapped + */ + readonly gender?: ProviderAttribute; + + /** + * The user's first name or give name. + * @default - not mapped + */ + readonly givenName?: ProviderAttribute; + + /** + * The user's locale. + * @default - not mapped + */ + readonly locale?: ProviderAttribute; + + /** + * The user's middle name. + * @default - not mapped + */ + readonly middleName?: ProviderAttribute; + + /** + * The user's full name in displayable form. + * @default - not mapped + */ + readonly fullname?: ProviderAttribute; + + /** + * The user's nickname or casual name. + * @default - not mapped + */ + readonly nickname?: ProviderAttribute; + + /** + * The user's telephone number. + * @default - not mapped + */ + readonly phoneNumber?: ProviderAttribute; + + /** + * The URL to the user's profile picture. + * @default - not mapped + */ + readonly profilePicture?: ProviderAttribute; + + /** + * The user's preferred username. + * @default - not mapped + */ + readonly preferredUsername?: ProviderAttribute; + + /** + * The URL to the user's profile page. + * @default - not mapped + */ + readonly profilePage?: ProviderAttribute; + + /** + * The user's time zone. + * @default - not mapped + */ + readonly timezone?: ProviderAttribute; + + /** + * Time, the user's information was last updated. + * @default - not mapped + */ + readonly lastUpdateTime?: ProviderAttribute; + + /** + * The URL to the user's web page or blog. + * @default - not mapped + */ + readonly website?: ProviderAttribute; + + /** + * Specify custom attribute mapping here and mapping for any standard attributes not supported yet. + * @default - no custom attribute mapping + */ + readonly custom?: { [key: string]: ProviderAttribute }; +} + +/** + * Properties to create a new instance of UserPoolIdentityProvider + */ +export interface UserPoolIdentityProviderProps { + /** + * The user pool to which this construct provides identities. + */ + readonly userPool: IUserPool; + + /** + * Mapping attributes from the identity provider to standard and custom attributes of the user pool. + * @default - no attribute mapping + */ + readonly attributeMapping?: AttributeMapping; +} + +/** + * Options to integrate with the various social identity providers. + */ +abstract class UserPoolIdentityProviderBase extends Resource implements IUserPoolIdentityProvider { + public abstract readonly providerName: string; + + public constructor(scope: Construct, id: string, private readonly props: UserPoolIdentityProviderProps) { + super(scope, id); + props.userPool.registerIdentityProvider(this); + } + + protected configureAttributeMapping(): any { + if (!this.props.attributeMapping) { + return undefined; + } + type SansCustom = Omit; + let mapping: { [key: string]: string } = {}; + mapping = Object.entries(this.props.attributeMapping) + .filter(([k, _]) => k !== 'custom') // 'custom' handled later separately + .reduce((agg, [k, v]) => { + return { ...agg, [StandardAttributeNames[k as keyof SansCustom]]: v.attributeName }; + }, mapping); + if (this.props.attributeMapping.custom) { + mapping = Object.entries(this.props.attributeMapping.custom).reduce((agg, [k, v]) => { + return { ...agg, [k]: v.attributeName }; + }, mapping); + } + if (Object.keys(mapping).length === 0) { return undefined; } + return mapping; + } +} + +/** + * Properties to initialize UserPoolAmazonIdentityProvider + */ +export interface UserPoolIdentityProviderAmazonProps extends UserPoolIdentityProviderProps { + /** + * The client id recognized by 'Login with Amazon' APIs. + * @see https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier + */ + readonly clientId: string; + /** + * The client secret to be accompanied with clientId for 'Login with Amazon' APIs to authenticate the client. + * @see https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier + */ + readonly clientSecret: string; + /** + * The types of user profile data to obtain for the Amazon profile. + * @see https://developer.amazon.com/docs/login-with-amazon/customer-profile.html + * @default [ profile ] + */ + readonly scopes?: string[]; +} + +/** + * Represents a identity provider that integrates with 'Login with Amazon' + * @resource AWS::Cognito::UserPoolIdentityProvider + */ +export class UserPoolIdentityProviderAmazon extends UserPoolIdentityProviderBase { + public readonly providerName: string; + + constructor(scope: Construct, id: string, props: UserPoolIdentityProviderAmazonProps) { + super(scope, id, props); + + const scopes = props.scopes ?? ['profile']; + + const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { + userPoolId: props.userPool.userPoolId, + providerName: 'LoginWithAmazon', // must be 'LoginWithAmazon' when the type is 'LoginWithAmazon' + providerType: 'LoginWithAmazon', + providerDetails: { + client_id: props.clientId, + client_secret: props.clientSecret, + authorize_scopes: scopes.join(' '), + }, + attributeMapping: super.configureAttributeMapping(), + }); + + this.providerName = super.getResourceNameAttribute(resource.ref); + } +} + +/** + * Properties to initialize UserPoolFacebookIdentityProvider + */ +export interface UserPoolIdentityProviderFacebookProps extends UserPoolIdentityProviderProps { + /** + * The client id recognized by Facebook APIs. + */ + readonly clientId: string; + /** + * The client secret to be accompanied with clientUd for Facebook to authenticate the client. + * @see https://developers.facebook.com/docs/facebook-login/security#appsecret + */ + readonly clientSecret: string; + /** + * The list of facebook permissions to obtain for getting access to the Facebook profile. + * @see https://developers.facebook.com/docs/facebook-login/permissions + * @default [ public_profile ] + */ + readonly scopes?: string[]; + /** + * The Facebook API version to use + * @default - to the oldest version supported by Facebook + */ + readonly apiVersion?: string; +} + +/** +* Represents a identity provider that integrates with 'Facebook Login' +* @resource AWS::Cognito::UserPoolIdentityProvider +*/ +export class UserPoolIdentityProviderFacebook extends UserPoolIdentityProviderBase { + public readonly providerName: string; + + constructor(scope: Construct, id: string, props: UserPoolIdentityProviderFacebookProps) { + super(scope, id, props); + + const scopes = props.scopes ?? ['public_profile']; + + const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { + userPoolId: props.userPool.userPoolId, + providerName: 'Facebook', // must be 'Facebook' when the type is 'Facebook' + providerType: 'Facebook', + providerDetails: { + client_id: props.clientId, + client_secret: props.clientSecret, + authorize_scopes: scopes.join(','), + api_version: props.apiVersion, + }, + attributeMapping: super.configureAttributeMapping(), + }); + + this.providerName = super.getResourceNameAttribute(resource.ref); + } +} + + +/** + * Properties to initialize UserPoolGoogleIdentityProvider + */ +export interface UserPoolIdentityProviderGoogleProps extends UserPoolIdentityProviderProps { + /** + * The client id recognized by Google APIs. + * @see https://developers.google.com/identity/sign-in/web/sign-in#specify_your_apps_client_id + */ + readonly clientId: string; + /** + * The client secret to be accompanied with clientId for Google APIs to authenticate the client. + * @see https://developers.google.com/identity/sign-in/web/sign-in + */ + readonly clientSecret: string; + /** + * The list of google permissions to obtain for getting access to the google profile + * @see https://developers.google.com/identity/sign-in/web/sign-in + * @default [ profile ] + */ + readonly scopes?: string[]; +} + +/** + * Represents a identity provider that integrates with 'Google' + * @resource AWS::Cognito::UserPoolIdentityProvider + */ +export class UserPoolIdentityProviderGoogle extends UserPoolIdentityProviderBase { + public readonly providerName: string; + + constructor(scope: Construct, id: string, props: UserPoolIdentityProviderGoogleProps) { + super(scope, id, props); + + const scopes = props.scopes ?? ['profile']; + + const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { + userPoolId: props.userPool.userPoolId, + providerName: 'Google', // must be 'Google' when the type is 'Google' + providerType: 'Google', + providerDetails: { + client_id: props.clientId, + client_secret: props.clientSecret, + authorize_scopes: scopes.join(' '), + }, + attributeMapping: super.configureAttributeMapping(), + }); + + this.providerName = super.getResourceNameAttribute(resource.ref); + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/amazon.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/amazon.ts deleted file mode 100644 index e6c0258d9346a..0000000000000 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/amazon.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Construct } from 'constructs'; -import { CfnUserPoolIdentityProvider } from '../cognito.generated'; -import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base'; - -/** - * Properties to initialize UserPoolAmazonIdentityProvider - */ -export interface UserPoolIdentityProviderAmazonProps extends UserPoolIdentityProviderProps { - /** - * The client id recognized by 'Login with Amazon' APIs. - * @see https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier - */ - readonly clientId: string; - /** - * The client secret to be accompanied with clientId for 'Login with Amazon' APIs to authenticate the client. - * @see https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier - */ - readonly clientSecret: string; - /** - * The types of user profile data to obtain for the Amazon profile. - * @see https://developer.amazon.com/docs/login-with-amazon/customer-profile.html - * @default [ profile ] - */ - readonly scopes?: string[]; -} - -/** - * Represents a identity provider that integrates with 'Login with Amazon' - * @resource AWS::Cognito::UserPoolIdentityProvider - */ -export class UserPoolIdentityProviderAmazon extends UserPoolIdentityProviderBase { - public readonly providerName: string; - - constructor(scope: Construct, id: string, props: UserPoolIdentityProviderAmazonProps) { - super(scope, id, props); - - const scopes = props.scopes ?? ['profile']; - - const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { - userPoolId: props.userPool.userPoolId, - providerName: 'LoginWithAmazon', // must be 'LoginWithAmazon' when the type is 'LoginWithAmazon' - providerType: 'LoginWithAmazon', - providerDetails: { - client_id: props.clientId, - client_secret: props.clientSecret, - authorize_scopes: scopes.join(' '), - }, - attributeMapping: super.configureAttributeMapping(), - }); - - this.providerName = super.getResourceNameAttribute(resource.ref); - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/base.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/base.ts deleted file mode 100644 index e32f59eca2de5..0000000000000 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/base.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { Resource } from '@aws-cdk/core'; -import { Construct } from 'constructs'; -import { StandardAttributeNames } from '../private/attr-names'; -import { IUserPool } from '../user-pool'; -import { IUserPoolIdentityProvider } from '../user-pool-idp'; - -/** - * An attribute available from a third party identity provider. - */ -export class ProviderAttribute { - /** The user id attribute provided by Amazon */ - public static readonly AMAZON_USER_ID = new ProviderAttribute('user_id'); - /** The email attribute provided by Amazon */ - public static readonly AMAZON_EMAIL = new ProviderAttribute('email'); - /** The name attribute provided by Amazon */ - public static readonly AMAZON_NAME = new ProviderAttribute('name'); - /** The postal code attribute provided by Amazon */ - public static readonly AMAZON_POSTAL_CODE = new ProviderAttribute('postal_code'); - - /** The user id attribute provided by Facebook */ - public static readonly FACEBOOK_ID = new ProviderAttribute('id'); - /** The birthday attribute provided by Facebook */ - public static readonly FACEBOOK_BIRTHDAY = new ProviderAttribute('birthday'); - /** The email attribute provided by Facebook */ - public static readonly FACEBOOK_EMAIL = new ProviderAttribute('email'); - /** The name attribute provided by Facebook */ - public static readonly FACEBOOK_NAME = new ProviderAttribute('name'); - /** The first name attribute provided by Facebook */ - public static readonly FACEBOOK_FIRST_NAME = new ProviderAttribute('first_name'); - /** The last name attribute provided by Facebook */ - public static readonly FACEBOOK_LAST_NAME = new ProviderAttribute('last_name'); - /** The middle name attribute provided by Facebook */ - public static readonly FACEBOOK_MIDDLE_NAME = new ProviderAttribute('middle_name'); - /** The gender attribute provided by Facebook */ - public static readonly FACEBOOK_GENDER = new ProviderAttribute('gender'); - /** The locale attribute provided by Facebook */ - public static readonly FACEBOOK_LOCALE = new ProviderAttribute('locale'); - - /** The name attribute provided by Google */ - public static readonly GOOGLE_NAMES = new ProviderAttribute('names'); - /** The gender attribute provided by Google */ - public static readonly GOOGLE_GENDER = new ProviderAttribute('gender'); - /** The birthday attribute provided by Google */ - public static readonly GOOGLE_BIRTHDAYS = new ProviderAttribute('birthdays'); - /** The birthday attribute provided by Google */ - public static readonly GOOGLE_PHONE_NUMBERS = new ProviderAttribute('phoneNumbers'); - /** The email attribute provided by Google */ - public static readonly GOOGLE_EMAIL = new ProviderAttribute('email'); - /** The name attribute provided by Google */ - public static readonly GOOGLE_NAME = new ProviderAttribute('name'); - /** The email attribute provided by Google */ - public static readonly GOOGLE_PICTURE = new ProviderAttribute('picture'); - /** The email attribute provided by Google */ - public static readonly GOOGLE_GIVEN_NAME = new ProviderAttribute('given_name'); - /** The email attribute provided by Google */ - public static readonly GOOGLE_FAMILY_NAME = new ProviderAttribute('family_name'); - - /** - * Use this to specify an attribute from the identity provider that is not pre-defined in the CDK. - * @param attributeName the attribute value string as recognized by the provider - */ - public static other(attributeName: string): ProviderAttribute { - return new ProviderAttribute(attributeName); - } - - /** The attribute value string as recognized by the provider. */ - public readonly attributeName: string; - - private constructor(attributeName: string) { - this.attributeName = attributeName; - } -} - -/** - * The mapping of user pool attributes to the attributes provided by the identity providers. - */ -export interface AttributeMapping { - /** - * The user's postal address is a required attribute. - * @default - not mapped - */ - readonly address?: ProviderAttribute; - - /** - * The user's birthday. - * @default - not mapped - */ - readonly birthdate?: ProviderAttribute; - - /** - * The user's e-mail address. - * @default - not mapped - */ - readonly email?: ProviderAttribute; - - /** - * The surname or last name of user. - * @default - not mapped - */ - readonly familyName?: ProviderAttribute; - - /** - * The user's gender. - * @default - not mapped - */ - readonly gender?: ProviderAttribute; - - /** - * The user's first name or give name. - * @default - not mapped - */ - readonly givenName?: ProviderAttribute; - - /** - * The user's locale. - * @default - not mapped - */ - readonly locale?: ProviderAttribute; - - /** - * The user's middle name. - * @default - not mapped - */ - readonly middleName?: ProviderAttribute; - - /** - * The user's full name in displayable form. - * @default - not mapped - */ - readonly fullname?: ProviderAttribute; - - /** - * The user's nickname or casual name. - * @default - not mapped - */ - readonly nickname?: ProviderAttribute; - - /** - * The user's telephone number. - * @default - not mapped - */ - readonly phoneNumber?: ProviderAttribute; - - /** - * The URL to the user's profile picture. - * @default - not mapped - */ - readonly profilePicture?: ProviderAttribute; - - /** - * The user's preferred username. - * @default - not mapped - */ - readonly preferredUsername?: ProviderAttribute; - - /** - * The URL to the user's profile page. - * @default - not mapped - */ - readonly profilePage?: ProviderAttribute; - - /** - * The user's time zone. - * @default - not mapped - */ - readonly timezone?: ProviderAttribute; - - /** - * Time, the user's information was last updated. - * @default - not mapped - */ - readonly lastUpdateTime?: ProviderAttribute; - - /** - * The URL to the user's web page or blog. - * @default - not mapped - */ - readonly website?: ProviderAttribute; - - /** - * Specify custom attribute mapping here and mapping for any standard attributes not supported yet. - * @default - no custom attribute mapping - */ - readonly custom?: { [key: string]: ProviderAttribute }; -} - -/** - * Properties to create a new instance of UserPoolIdentityProvider - */ -export interface UserPoolIdentityProviderProps { - /** - * The user pool to which this construct provides identities. - */ - readonly userPool: IUserPool; - - /** - * Mapping attributes from the identity provider to standard and custom attributes of the user pool. - * @default - no attribute mapping - */ - readonly attributeMapping?: AttributeMapping; -} - -/** - * Options to integrate with the various social identity providers. - */ -export abstract class UserPoolIdentityProviderBase extends Resource implements IUserPoolIdentityProvider { - public abstract readonly providerName: string; - - public constructor(scope: Construct, id: string, private readonly props: UserPoolIdentityProviderProps) { - super(scope, id); - props.userPool.registerIdentityProvider(this); - } - - protected configureAttributeMapping(): any { - if (!this.props.attributeMapping) { - return undefined; - } - type SansCustom = Omit; - let mapping: { [key: string]: string } = {}; - mapping = Object.entries(this.props.attributeMapping) - .filter(([k, _]) => k !== 'custom') // 'custom' handled later separately - .reduce((agg, [k, v]) => { - return { ...agg, [StandardAttributeNames[k as keyof SansCustom]]: v.attributeName }; - }, mapping); - if (this.props.attributeMapping.custom) { - mapping = Object.entries(this.props.attributeMapping.custom).reduce((agg, [k, v]) => { - return { ...agg, [k]: v.attributeName }; - }, mapping); - } - if (Object.keys(mapping).length === 0) { return undefined; } - return mapping; - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/facebook.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/facebook.ts deleted file mode 100644 index 144344253e065..0000000000000 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/facebook.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Construct } from 'constructs'; -import { CfnUserPoolIdentityProvider } from '../cognito.generated'; -import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base'; - -/** - * Properties to initialize UserPoolFacebookIdentityProvider - */ -export interface UserPoolIdentityProviderFacebookProps extends UserPoolIdentityProviderProps { - /** - * The client id recognized by Facebook APIs. - */ - readonly clientId: string; - /** - * The client secret to be accompanied with clientUd for Facebook to authenticate the client. - * @see https://developers.facebook.com/docs/facebook-login/security#appsecret - */ - readonly clientSecret: string; - /** - * The list of facebook permissions to obtain for getting access to the Facebook profile. - * @see https://developers.facebook.com/docs/facebook-login/permissions - * @default [ public_profile ] - */ - readonly scopes?: string[]; - /** - * The Facebook API version to use - * @default - to the oldest version supported by Facebook - */ - readonly apiVersion?: string; -} - -/** - * Represents a identity provider that integrates with 'Facebook Login' - * @resource AWS::Cognito::UserPoolIdentityProvider - */ -export class UserPoolIdentityProviderFacebook extends UserPoolIdentityProviderBase { - public readonly providerName: string; - - constructor(scope: Construct, id: string, props: UserPoolIdentityProviderFacebookProps) { - super(scope, id, props); - - const scopes = props.scopes ?? ['public_profile']; - - const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { - userPoolId: props.userPool.userPoolId, - providerName: 'Facebook', // must be 'Facebook' when the type is 'Facebook' - providerType: 'Facebook', - providerDetails: { - client_id: props.clientId, - client_secret: props.clientSecret, - authorize_scopes: scopes.join(','), - api_version: props.apiVersion, - }, - attributeMapping: super.configureAttributeMapping(), - }); - - this.providerName = super.getResourceNameAttribute(resource.ref); - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/google.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/google.ts deleted file mode 100644 index 12275646691e8..0000000000000 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/google.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Construct } from 'constructs'; -import { CfnUserPoolIdentityProvider } from '../cognito.generated'; -import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base'; - -/** - * Properties to initialize UserPoolGoogleIdentityProvider - */ -export interface UserPoolIdentityProviderGoogleProps extends UserPoolIdentityProviderProps { - /** - * The client id recognized by Google APIs. - * @see https://developers.google.com/identity/sign-in/web/sign-in#specify_your_apps_client_id - */ - readonly clientId: string; - /** - * The client secret to be accompanied with clientId for Google APIs to authenticate the client. - * @see https://developers.google.com/identity/sign-in/web/sign-in - */ - readonly clientSecret: string; - /** - * The list of google permissions to obtain for getting access to the google profile - * @see https://developers.google.com/identity/sign-in/web/sign-in - * @default [ profile ] - */ - readonly scopes?: string[]; -} - -/** - * Represents a identity provider that integrates with 'Google' - * @resource AWS::Cognito::UserPoolIdentityProvider - */ -export class UserPoolIdentityProviderGoogle extends UserPoolIdentityProviderBase { - public readonly providerName: string; - - constructor(scope: Construct, id: string, props: UserPoolIdentityProviderGoogleProps) { - super(scope, id, props); - - const scopes = props.scopes ?? ['profile']; - - const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { - userPoolId: props.userPool.userPoolId, - providerName: 'Google', // must be 'Google' when the type is 'Google' - providerType: 'Google', - providerDetails: { - client_id: props.clientId, - client_secret: props.clientSecret, - authorize_scopes: scopes.join(' '), - }, - attributeMapping: super.configureAttributeMapping(), - }); - - this.providerName = super.getResourceNameAttribute(resource.ref); - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts deleted file mode 100644 index dbc63a9854f37..0000000000000 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './base'; -export * from './amazon'; -export * from './facebook'; -export * from './google'; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idp.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.test.ts new file mode 100644 index 0000000000000..c997fa9d61190 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.test.ts @@ -0,0 +1,295 @@ +import '@aws-cdk/assert/jest'; +import { Stack } from '@aws-cdk/core'; +import { ProviderAttribute, UserPool, UserPoolIdentityProviderAmazon, UserPoolIdentityProviderFacebook, UserPoolIdentityProviderGoogle } from '../lib'; + +describe('UserPoolIdentityProvider', () => { + describe('amazon', () => { + test('defaults', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { + userPool: pool, + clientId: 'amzn-client-id', + clientSecret: 'amzn-client-secret', + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'LoginWithAmazon', + ProviderType: 'LoginWithAmazon', + ProviderDetails: { + client_id: 'amzn-client-id', + client_secret: 'amzn-client-secret', + authorize_scopes: 'profile', + }, + }); + }); + + test('scopes', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { + userPool: pool, + clientId: 'amzn-client-id', + clientSecret: 'amzn-client-secret', + scopes: ['scope1', 'scope2'], + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'LoginWithAmazon', + ProviderType: 'LoginWithAmazon', + ProviderDetails: { + client_id: 'amzn-client-id', + client_secret: 'amzn-client-secret', + authorize_scopes: 'scope1 scope2', + }, + }); + }); + + test('registered with user pool', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + const provider = new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { + userPool: pool, + clientId: 'amzn-client-id', + clientSecret: 'amzn-client-secret', + }); + + // THEN + expect(pool.identityProviders).toContain(provider); + }); + + test('attribute mapping', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { + userPool: pool, + clientId: 'amazn-client-id', + clientSecret: 'amzn-client-secret', + attributeMapping: { + givenName: ProviderAttribute.AMAZON_NAME, + address: ProviderAttribute.other('amzn-address'), + custom: { + customAttr1: ProviderAttribute.AMAZON_EMAIL, + customAttr2: ProviderAttribute.other('amzn-custom-attr'), + }, + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + AttributeMapping: { + given_name: 'name', + address: 'amzn-address', + customAttr1: 'email', + customAttr2: 'amzn-custom-attr', + }, + }); + }); + }); + + describe('facebook', () => { + test('defaults', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { + userPool: pool, + clientId: 'fb-client-id', + clientSecret: 'fb-client-secret', + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'Facebook', + ProviderType: 'Facebook', + ProviderDetails: { + client_id: 'fb-client-id', + client_secret: 'fb-client-secret', + authorize_scopes: 'public_profile', + }, + }); + }); + + test('scopes & api_version', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { + userPool: pool, + clientId: 'fb-client-id', + clientSecret: 'fb-client-secret', + scopes: ['scope1', 'scope2'], + apiVersion: 'version1', + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'Facebook', + ProviderType: 'Facebook', + ProviderDetails: { + client_id: 'fb-client-id', + client_secret: 'fb-client-secret', + authorize_scopes: 'scope1,scope2', + api_version: 'version1', + }, + }); + }); + + test('registered with user pool', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + const provider = new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { + userPool: pool, + clientId: 'fb-client-id', + clientSecret: 'fb-client-secret', + }); + + // THEN + expect(pool.identityProviders).toContain(provider); + }); + + test('attribute mapping', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { + userPool: pool, + clientId: 'fb-client-id', + clientSecret: 'fb-client-secret', + attributeMapping: { + givenName: ProviderAttribute.FACEBOOK_NAME, + address: ProviderAttribute.other('fb-address'), + custom: { + customAttr1: ProviderAttribute.FACEBOOK_EMAIL, + customAttr2: ProviderAttribute.other('fb-custom-attr'), + }, + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + AttributeMapping: { + given_name: 'name', + address: 'fb-address', + customAttr1: 'email', + customAttr2: 'fb-custom-attr', + }, + }); + }); + }); + + describe('google', () => { + test('defaults', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { + userPool: pool, + clientId: 'google-client-id', + clientSecret: 'google-client-secret', + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'Google', + ProviderType: 'Google', + ProviderDetails: { + client_id: 'google-client-id', + client_secret: 'google-client-secret', + authorize_scopes: 'profile', + }, + }); + }); + + test('scopes', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { + userPool: pool, + clientId: 'google-client-id', + clientSecret: 'google-client-secret', + scopes: ['scope1', 'scope2'], + }); + + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'Google', + ProviderType: 'Google', + ProviderDetails: { + client_id: 'google-client-id', + client_secret: 'google-client-secret', + authorize_scopes: 'scope1 scope2', + }, + }); + }); + + test('registered with user pool', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + const provider = new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { + userPool: pool, + clientId: 'google-client-id', + clientSecret: 'google-client-secret', + }); + + // THEN + expect(pool.identityProviders).toContain(provider); + }); + + test('attribute mapping', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { + userPool: pool, + clientId: 'google-client-id', + clientSecret: 'google-client-secret', + attributeMapping: { + givenName: ProviderAttribute.GOOGLE_NAME, + address: ProviderAttribute.other('google-address'), + custom: { + customAttr1: ProviderAttribute.GOOGLE_EMAIL, + customAttr2: ProviderAttribute.other('google-custom-attr'), + }, + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { + AttributeMapping: { + given_name: 'name', + address: 'google-address', + customAttr1: 'email', + customAttr2: 'google-custom-attr', + }, + }); + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/amazon.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/amazon.test.ts deleted file mode 100644 index a6995367a3ded..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/amazon.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { Stack } from '@aws-cdk/core'; -import { ProviderAttribute, UserPool, UserPoolIdentityProviderAmazon } from '../../lib'; - -describe('UserPoolIdentityProvider', () => { - describe('amazon', () => { - test('defaults', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { - userPool: pool, - clientId: 'amzn-client-id', - clientSecret: 'amzn-client-secret', - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'LoginWithAmazon', - ProviderType: 'LoginWithAmazon', - ProviderDetails: { - client_id: 'amzn-client-id', - client_secret: 'amzn-client-secret', - authorize_scopes: 'profile', - }, - }); - }); - - test('scopes', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { - userPool: pool, - clientId: 'amzn-client-id', - clientSecret: 'amzn-client-secret', - scopes: ['scope1', 'scope2'], - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'LoginWithAmazon', - ProviderType: 'LoginWithAmazon', - ProviderDetails: { - client_id: 'amzn-client-id', - client_secret: 'amzn-client-secret', - authorize_scopes: 'scope1 scope2', - }, - }); - }); - - test('registered with user pool', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - const provider = new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { - userPool: pool, - clientId: 'amzn-client-id', - clientSecret: 'amzn-client-secret', - }); - - // THEN - expect(pool.identityProviders).toContain(provider); - }); - - test('attribute mapping', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderAmazon(stack, 'userpoolidp', { - userPool: pool, - clientId: 'amazn-client-id', - clientSecret: 'amzn-client-secret', - attributeMapping: { - givenName: ProviderAttribute.AMAZON_NAME, - address: ProviderAttribute.other('amzn-address'), - custom: { - customAttr1: ProviderAttribute.AMAZON_EMAIL, - customAttr2: ProviderAttribute.other('amzn-custom-attr'), - }, - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - AttributeMapping: { - given_name: 'name', - address: 'amzn-address', - customAttr1: 'email', - customAttr2: 'amzn-custom-attr', - }, - }); - }); - }); -}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/base.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/base.test.ts deleted file mode 100644 index f4a6ba4ae7f04..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/base.test.ts +++ /dev/null @@ -1,94 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { Stack } from '@aws-cdk/core'; -import { ProviderAttribute, UserPool, UserPoolIdentityProviderBase } from '../../lib'; - -class MyIdp extends UserPoolIdentityProviderBase { - public readonly providerName = 'MyProvider'; - public readonly mapping = this.configureAttributeMapping(); -} - -describe('UserPoolIdentityProvider', () => { - describe('attribute mapping', () => { - test('absent or empty', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'UserPool'); - - // WHEN - const idp1 = new MyIdp(stack, 'MyIdp1', { - userPool: pool, - }); - const idp2 = new MyIdp(stack, 'MyIdp2', { - userPool: pool, - attributeMapping: {}, - }); - - // THEN - expect(idp1.mapping).toBeUndefined(); - expect(idp2.mapping).toBeUndefined(); - }); - - test('standard attributes', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'UserPool'); - - // WHEN - const idp = new MyIdp(stack, 'MyIdp', { - userPool: pool, - attributeMapping: { - givenName: ProviderAttribute.FACEBOOK_NAME, - birthdate: ProviderAttribute.FACEBOOK_BIRTHDAY, - }, - }); - - // THEN - expect(idp.mapping).toStrictEqual({ - given_name: 'name', - birthdate: 'birthday', - }); - }); - - test('custom', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'UserPool'); - - // WHEN - const idp = new MyIdp(stack, 'MyIdp', { - userPool: pool, - attributeMapping: { - custom: { - 'custom-attr-1': ProviderAttribute.AMAZON_EMAIL, - 'custom-attr-2': ProviderAttribute.AMAZON_NAME, - }, - }, - }); - - // THEN - expect(idp.mapping).toStrictEqual({ - 'custom-attr-1': 'email', - 'custom-attr-2': 'name', - }); - }); - - test('custom provider attribute', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'UserPool'); - - // WHEN - const idp = new MyIdp(stack, 'MyIdp', { - userPool: pool, - attributeMapping: { - address: ProviderAttribute.other('custom-provider-attr'), - }, - }); - - // THEN - expect(idp.mapping).toStrictEqual({ - address: 'custom-provider-attr', - }); - }); - }); -}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/facebook.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/facebook.test.ts deleted file mode 100644 index 3020bd117221f..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/facebook.test.ts +++ /dev/null @@ -1,103 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { Stack } from '@aws-cdk/core'; -import { ProviderAttribute, UserPool, UserPoolIdentityProviderFacebook } from '../../lib'; - -describe('UserPoolIdentityProvider', () => { - describe('facebook', () => { - test('defaults', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { - userPool: pool, - clientId: 'fb-client-id', - clientSecret: 'fb-client-secret', - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'Facebook', - ProviderType: 'Facebook', - ProviderDetails: { - client_id: 'fb-client-id', - client_secret: 'fb-client-secret', - authorize_scopes: 'public_profile', - }, - }); - }); - - test('scopes & api_version', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { - userPool: pool, - clientId: 'fb-client-id', - clientSecret: 'fb-client-secret', - scopes: ['scope1', 'scope2'], - apiVersion: 'version1', - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'Facebook', - ProviderType: 'Facebook', - ProviderDetails: { - client_id: 'fb-client-id', - client_secret: 'fb-client-secret', - authorize_scopes: 'scope1,scope2', - api_version: 'version1', - }, - }); - }); - - test('registered with user pool', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - const provider = new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { - userPool: pool, - clientId: 'fb-client-id', - clientSecret: 'fb-client-secret', - }); - - // THEN - expect(pool.identityProviders).toContain(provider); - }); - - test('attribute mapping', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderFacebook(stack, 'userpoolidp', { - userPool: pool, - clientId: 'fb-client-id', - clientSecret: 'fb-client-secret', - attributeMapping: { - givenName: ProviderAttribute.FACEBOOK_NAME, - address: ProviderAttribute.other('fb-address'), - custom: { - customAttr1: ProviderAttribute.FACEBOOK_EMAIL, - customAttr2: ProviderAttribute.other('fb-custom-attr'), - }, - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - AttributeMapping: { - given_name: 'name', - address: 'fb-address', - customAttr1: 'email', - customAttr2: 'fb-custom-attr', - }, - }); - }); - }); -}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/google.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/google.test.ts deleted file mode 100644 index 41700abe1c92d..0000000000000 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/google.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { Stack } from '@aws-cdk/core'; -import { ProviderAttribute, UserPool, UserPoolIdentityProviderGoogle } from '../../lib'; - -describe('UserPoolIdentityProvider', () => { - describe('google', () => { - test('defaults', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { - userPool: pool, - clientId: 'google-client-id', - clientSecret: 'google-client-secret', - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'Google', - ProviderType: 'Google', - ProviderDetails: { - client_id: 'google-client-id', - client_secret: 'google-client-secret', - authorize_scopes: 'profile', - }, - }); - }); - - test('scopes', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { - userPool: pool, - clientId: 'google-client-id', - clientSecret: 'google-client-secret', - scopes: ['scope1', 'scope2'], - }); - - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - ProviderName: 'Google', - ProviderType: 'Google', - ProviderDetails: { - client_id: 'google-client-id', - client_secret: 'google-client-secret', - authorize_scopes: 'scope1 scope2', - }, - }); - }); - - test('registered with user pool', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - const provider = new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { - userPool: pool, - clientId: 'google-client-id', - clientSecret: 'google-client-secret', - }); - - // THEN - expect(pool.identityProviders).toContain(provider); - }); - - test('attribute mapping', () => { - // GIVEN - const stack = new Stack(); - const pool = new UserPool(stack, 'userpool'); - - // WHEN - new UserPoolIdentityProviderGoogle(stack, 'userpoolidp', { - userPool: pool, - clientId: 'google-client-id', - clientSecret: 'google-client-secret', - attributeMapping: { - givenName: ProviderAttribute.GOOGLE_NAME, - address: ProviderAttribute.other('google-address'), - custom: { - customAttr1: ProviderAttribute.GOOGLE_EMAIL, - customAttr2: ProviderAttribute.other('google-custom-attr'), - }, - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::Cognito::UserPoolIdentityProvider', { - AttributeMapping: { - given_name: 'name', - address: 'google-address', - customAttr1: 'email', - customAttr2: 'google-custom-attr', - }, - }); - }); - }); -}); \ No newline at end of file From 9c88a6408a9177e0240fc2d1ac300eeece50a931 Mon Sep 17 00:00:00 2001 From: Neta Nir Date: Wed, 21 Oct 2020 14:09:52 -0700 Subject: [PATCH 21/45] chore(pkglint): don't allow adding peer dependencies to monocdk (#10930) * chore(pkglint): don't allow adding peer dependencies to monocdk --- tools/pkglint/lib/rules.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 25d59e434169e..a035db23b90b5 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -487,6 +487,27 @@ export class JSIIProjectReferences extends ValidationRule { } } +export class NoPeerDependenciesMonocdk extends ValidationRule { + public readonly name = 'monocdk/no-peer'; + private readonly allowedPeer = ['constructs']; + private readonly modules = ['monocdk', 'aws-cdk-lib']; + + public validate(pkg: PackageJson): void { + if (!this.modules.includes(pkg.packageName)) { + return; + } + + const peers = Object.keys(pkg.peerDependencies).filter(peer => !this.allowedPeer.includes(peer)); + if (peers.length > 0) { + pkg.report({ + ruleName: this.name, + message: `Adding a peer dependency to the monolithic package ${pkg.packageName} is a breaking change, and thus not allowed. + Added ${peers.join(' ')}`, + }); + } + } +} + /** * JSII Java package is required and must look sane */ @@ -1462,4 +1483,4 @@ function toRegExp(str: string): RegExp { function readBannerFile(file: string): string { return fs.readFileSync(path.join(__dirname, 'banners', file), { encoding: 'utf-8' }); -} \ No newline at end of file +} From 0abc3b8803c52315609f6e957d6471efe88f12fe Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 22:08:49 +0000 Subject: [PATCH 22/45] chore(deps-dev): bump @types/mock-fs from 4.10.0 to 4.13.0 (#11024) Bumps [@types/mock-fs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mock-fs) from 4.10.0 to 4.13.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mock-fs) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/cloud-assembly-schema/package.json | 2 +- packages/@aws-cdk/cx-api/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index f30b868052d89..d6b7f95639067 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -53,7 +53,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/jest": "^26.0.15", - "@types/mock-fs": "^4.10.0", + "@types/mock-fs": "^4.13.0", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", "mock-fs": "^4.13.0", diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index b3d0346a284eb..60db83e12eac7 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -59,7 +59,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/jest": "^26.0.15", - "@types/mock-fs": "^4.10.0", + "@types/mock-fs": "^4.13.0", "@types/semver": "^7.3.4", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 08b0f2e386cd7..b35386fc1db0a 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -34,7 +34,7 @@ "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", - "@types/mock-fs": "^4.10.0", + "@types/mock-fs": "^4.13.0", "@types/node": "^10.17.40", "@types/yargs": "^15.0.7", "cdk-build-tools": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 88f30135421fb..664795353a10f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3117,10 +3117,10 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= -"@types/mock-fs@^4.10.0": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@types/mock-fs/-/mock-fs-4.10.0.tgz#460061b186993d76856f669d5317cda8a007c24b" - integrity sha512-FQ5alSzmHMmliqcL36JqIA4Yyn9jyJKvRSGV3mvPh108VFatX7naJDzSG4fnFQNZFq9dIx0Dzoe6ddflMB2Xkg== +"@types/mock-fs@^4.13.0": + version "4.13.0" + resolved "https://registry.yarnpkg.com/@types/mock-fs/-/mock-fs-4.13.0.tgz#b8b01cd2db588668b2532ecd21b1babd3fffb2c0" + integrity sha512-FUqxhURwqFtFBCuUj3uQMp7rPSQs//b3O9XecAVxhqS9y4/W8SIJEZFq2mmpnFVZBXwR/2OyPLE97CpyYiB8Mw== dependencies: "@types/node" "*" From 9e31b0234b9458cce92f4bdae5720802bab1ab68 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2020 00:38:13 +0000 Subject: [PATCH 23/45] chore(deps-dev): bump cdk8s from 0.32.0 to 0.33.0 (#11019) Bumps [cdk8s](https://github.com/awslabs/cdk8s) from 0.32.0 to 0.33.0. - [Release notes](https://github.com/awslabs/cdk8s/releases) - [Changelog](https://github.com/awslabs/cdk8s/blob/master/CHANGELOG.md) - [Commits](https://github.com/awslabs/cdk8s/compare/v0.32.0...v0.33.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-eks/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index fdc7ade0a2031..b80c9252b228b 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -82,7 +82,7 @@ "pkglint": "0.0.0", "sinon": "^9.1.0", "cdk8s-plus": "^0.33.0", - "cdk8s": "^0.32.0" + "cdk8s": "^0.33.0" }, "dependencies": { "@aws-cdk/aws-autoscaling": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 664795353a10f..045eb167a09a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4341,10 +4341,10 @@ cdk8s-plus@^0.33.0: dependencies: minimatch "^3.0.4" -cdk8s@^0.32.0: - version "0.32.0" - resolved "https://registry.yarnpkg.com/cdk8s/-/cdk8s-0.32.0.tgz#d977e977c1eee589d74a302675aa0f296cbc19d8" - integrity sha512-FUIULXEKPjXA+9DLzCUpIcOpBrF2B3Dl0jxxjPbwScrTnVqAY2+WetUbcnpogsVCbGl5gWTdO3nI2eBEaST6Bg== +cdk8s@^0.33.0: + version "0.33.0" + resolved "https://registry.yarnpkg.com/cdk8s/-/cdk8s-0.33.0.tgz#503b60b98de5fe82b22ac5dee2c351a4ba102deb" + integrity sha512-Yoo6RZWZPk6K2JZLiJA22faNVWqTE6Nv+VNgmTFTq4AC8c+eCvq6/xHKcpn78HhTLEPBmczaja7q2MiRc9LTBQ== dependencies: follow-redirects "^1.11.0" json-stable-stringify "^1.0.1" From 8771b7877c398317ad9b16ea3dcf3a883affb722 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2020 01:27:17 +0000 Subject: [PATCH 24/45] chore(deps): bump aws-sdk from 2.764.0 to 2.776.0 (#11027) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.764.0 to 2.776.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.764.0...v2.776.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/aws-cloudfront-origins/package.json | 2 +- packages/@aws-cdk/aws-cloudfront/package.json | 2 +- packages/@aws-cdk/aws-cloudtrail/package.json | 2 +- packages/@aws-cdk/aws-codebuild/package.json | 2 +- packages/@aws-cdk/aws-codecommit/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-events-targets/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/aws-route53/package.json | 2 +- packages/@aws-cdk/aws-sqs/package.json | 2 +- packages/@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- yarn.lock | 8 ++++---- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index 419fb01f53c78..48e2670ecdc8d 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 64fd49012e4da..58320c1d42404 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 4306f050b9d1c..f592b17211346 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -73,7 +73,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 25390ea5e64ae..29ced21a7d465 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index cb5bf1f4945be..56bbe17dedd7c 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -79,7 +79,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 76161ad0592f3..310861a75ab17 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.15", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index b80c9252b228b..bcef51bd48e37 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index d1574a3c058c2..82f434890070c 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -75,7 +75,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index d92212dd10a68..eb462e3370e85 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 43d57731f2c9e..7666fc8ef3621 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 4cc3cf6224ee5..ee62f913c80c7 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -74,7 +74,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 280f69bc77ade..cdbc39e15109c 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -79,7 +79,7 @@ "@types/aws-lambda": "^8.10.63", "@types/fs-extra": "^8.1.1", "@types/sinon": "^9.0.7", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 60091f79304bd..d5ac48aaf1ea1 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -71,7 +71,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "camelcase": "^6.0.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index b35386fc1db0a..40e1a0e4a1f60 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -47,7 +47,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^5.0.2", - "aws-sdk": "^2.739.0", + "aws-sdk": "^2.776.0", "glob": "^7.1.6", "yargs": "^16.1.0" }, diff --git a/yarn.lock b/yarn.lock index 045eb167a09a0..79a24d1c7642d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3798,10 +3798,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.739.0: - version "2.764.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.764.0.tgz#587bf954645bbcb706c0ce985e7befeb94b15427" - integrity sha512-0asgRwAI3WxUyOjlx2fL7pPHEZajFbAVRerE2h0xX649123PwdhIiJ2HM7lWwn/f+mX7IagYjOCn9dIyvCHBVQ== +aws-sdk@^2.637.0, aws-sdk@^2.776.0: + version "2.776.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.776.0.tgz#a809a78b01128614eb6a656a406ff325c70bed8c" + integrity sha512-fIwiHSQ7o8r2WqNg3l6Qrn5XdjRW7zGyn0OVuXmTAKYo9mZn89AVg0MfrcD4ZFcJc56VCKbz5PR04X5oHdk/Bw== dependencies: buffer "4.9.2" events "1.1.1" From c5c96b2d76fe3583513de5c30e8d357bcbd997bb Mon Sep 17 00:00:00 2001 From: Kumbirai Tanekha Date: Thu, 22 Oct 2020 05:45:58 +0100 Subject: [PATCH 25/45] docs(stepfunctions-tasks): fix example code in README (#11028) The example code for running a job from a task definition on Fargate requires public IP address assignment. Closes https://github.com/aws/aws-cdk/issues/10729 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-stepfunctions-tasks/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md index a663faf7e5325..393c72b471b4b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md @@ -445,6 +445,7 @@ const runTask = new tasks.EcsRunTask(stack, 'RunFargate', { integrationPattern: sfn.IntegrationPattern.RUN_JOB, cluster, taskDefinition, + assignPublicIp: true, containerOverrides: [{ containerDefinition, environment: [{ name: 'SOME_KEY', value: sfn.JsonPath.stringAt('$.SomeKey') }], From a97b41a882ced2375d834d4467f2e4dda3a2e8f6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2020 05:53:22 +0000 Subject: [PATCH 26/45] chore(deps-dev): bump parcel from 2.0.0-nightly.426 to 2.0.0-nightly.429 (#11030) Bumps [parcel](https://github.com/parcel-bundler/parcel) from 2.0.0-nightly.426 to 2.0.0-nightly.429. - [Release notes](https://github.com/parcel-bundler/parcel/releases) - [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md) - [Commits](https://github.com/parcel-bundler/parcel/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-lambda-nodejs/package.json | 2 +- yarn.lock | 921 +++++++++--------- 2 files changed, 462 insertions(+), 461 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 2dff274fd0cbd..428055feb5233 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -67,7 +67,7 @@ "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", - "parcel": "2.0.0-nightly.426", + "parcel": "2.0.0-nightly.429", "pkglint": "0.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 79a24d1c7642d..273da93fc0afd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2147,128 +2147,128 @@ dependencies: "@types/node" ">= 8" -"@parcel/babel-ast-utils@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2050.tgz#5b03d8b2c0c67ac596276aac0d0d67227213539a" - integrity sha512-kyQ7JOaqk5YIY02+bbK8jXUpdONtUyxroITT6cnZ4wT6KgYmlB3HqhdluxcB5D07XdhsoyC+lS8hidHXG85ttQ== +"@parcel/babel-ast-utils@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/babel-ast-utils/-/babel-ast-utils-2.0.0-nightly.2053.tgz#c2c2dba5a043e402e04ee5f7caed79fe21132969" + integrity sha512-fcbXhdlcABXJfN/cN0D3hpmf+EcpWehf21ACFMCvOyyfsiMpkWHCQv/xtIB8F0qS5OZGN3EABNNcdJG9sjh96w== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/babel-preset-env@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.428.tgz#de2a2223adbf7265fe993d696c21266796a788de" - integrity sha512-Rf6UApd24x/cisNUT+H/Yn02XPmuQEZc0tTWdmPGS2lOoREJ/XUUOFhEU9maffVUM+VgqUelkfwTs5m7wHTCbw== +"@parcel/babel-preset-env@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/babel-preset-env/-/babel-preset-env-2.0.0-nightly.431.tgz#23bef18a558b5d98db63ce675c6d7edc6292d469" + integrity sha512-H2ezlzTrunFhVJ3rk1Uf4krrruA7shRLoWEjroNWRp+jpLSdbYKUks2QqwidmR274OxIMtZKu2+bw1ZnA8Wsrw== dependencies: "@babel/preset-env" "^7.4.0" semver "^5.4.1" -"@parcel/babylon-walk@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2050.tgz#dc353a5d5d19de40c7c389be9e1670dd32dd5b2e" - integrity sha512-s+boLOs106tl740NFcL3Jx+YRHII8+X4a4CBo+jeDXURTbTamYvfaEagM9qiAhPgRG7+oxPzPvmU//pPGfOKPg== +"@parcel/babylon-walk@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/babylon-walk/-/babylon-walk-2.0.0-nightly.2053.tgz#6f26b502af1ee45a64029037100538c9cf96b5e9" + integrity sha512-YFTNMGwbQl2DEwqrPCPejPPdhq6HOBj38Eui9N3HeSg1Az5nYsXp6h+w2s7jPXv6Zj4yY97qGtGWRVe60hflLg== dependencies: "@babel/types" "^7.0.0" lodash.clone "^4.5.0" -"@parcel/bundler-default@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.428.tgz#9a75e48965d3051dd97c97bc76d46346a7d09fc6" - integrity sha512-CF4cFxoPsZaWEFcVGL4u2VHdPeanaBExquqoqQl9oaG4FqGP4B95MaSjs76XtdbCERAO5Tl5MuoC9j4VRUzYMQ== +"@parcel/bundler-default@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.0.0-nightly.431.tgz#a01c36ce3cbde26d35b207b0e2b8e9e09627fc82" + integrity sha512-5v57j+S5d0/I76aKX1MSnieuvYi3sz+g0XEhIaQHHHLW4zvAJKw8KfjyrHHpQWasO9CqL5Z73T+z4jLRK5jYHg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/cache@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.428.tgz#daaecd0cd061d8728deb78b948f09ce90f3c1543" - integrity sha512-67n0FyNPvanlQL6zlOhGWFcuVDOVgtkiuROhdrzW1in/MT/XwM1fYDSgpGtIZ4Megjp1aWlv58PBnC3b+qyU+w== +"@parcel/cache@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/cache/-/cache-2.0.0-nightly.431.tgz#14a9bfb404b8a01f194c511e8af130a6bbd12ec8" + integrity sha512-GG1KYjeLoCL3jcDagr8Z3f5za2ScxXoGJNM4sW8z9hVX5BKYYjG/Pd11EitziQTz8yyEN3Z63Xv1anO4zRCZqw== dependencies: - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/codeframe@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.428.tgz#68687330a76f098b6cfba3b3cc1e166c382098a9" - integrity sha512-a9e8nqoTKKcnlqhwNCqRgCqxn6ZMdVcVnxCWDGF4Fb74VzLXXbIbLre9lumb2EeD5msWZvnzlCJmnRwI84KUDw== +"@parcel/codeframe@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/codeframe/-/codeframe-2.0.0-nightly.431.tgz#1c930a957313132f0cca9240754648f9d0f389c2" + integrity sha512-vn50vb/LdujpNEpEdCnsgAMVuo/7SpChfjxhiqlTxkSWZTJTNZwVUDRxfes2m7s11S12aNDHMZbX8WoIXNe8Pw== dependencies: chalk "^2.4.2" emphasize "^2.1.0" slice-ansi "^4.0.0" string-width "^4.2.0" -"@parcel/config-default@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.428.tgz#111e40ed342ced5b38bbcf65e91e33c66be23491" - integrity sha512-0KAba2rXoFAhl+o3fOnAdBn01rMzkfCx2unR2ivLd6/dMvektwAap0/ExH+MyMa+qPzbs5JI6YkSglfsTVhxtw== - dependencies: - "@parcel/bundler-default" "2.0.0-nightly.428+5f72d6bb" - "@parcel/namer-default" "2.0.0-nightly.428+5f72d6bb" - "@parcel/optimizer-cssnano" "2.0.0-nightly.428+5f72d6bb" - "@parcel/optimizer-data-url" "2.0.0-nightly.428+5f72d6bb" - "@parcel/optimizer-htmlnano" "2.0.0-nightly.428+5f72d6bb" - "@parcel/optimizer-terser" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-css" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-html" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-js" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-raw" "2.0.0-nightly.428+5f72d6bb" - "@parcel/packager-raw-url" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/packager-ts" "2.0.0-nightly.428+5f72d6bb" - "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/reporter-cli" "2.0.0-nightly.428+5f72d6bb" - "@parcel/reporter-dev-server" "2.0.0-nightly.428+5f72d6bb" - "@parcel/resolver-default" "2.0.0-nightly.428+5f72d6bb" - "@parcel/runtime-browser-hmr" "2.0.0-nightly.428+5f72d6bb" - "@parcel/runtime-js" "2.0.0-nightly.428+5f72d6bb" - "@parcel/runtime-react-refresh" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-babel" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-coffeescript" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-css" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-glsl" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-graphql" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-html" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-image" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-inline-string" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-js" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-json" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-jsonld" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-less" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-mdx" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-postcss" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-posthtml" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-pug" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-raw" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-sass" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-stylus" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-sugarss" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-toml" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-typescript-types" "2.0.0-nightly.428+5f72d6bb" - "@parcel/transformer-vue" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/transformer-yaml" "2.0.0-nightly.428+5f72d6bb" - -"@parcel/core@2.0.0-nightly.426+5f72d6bb": - version "2.0.0-nightly.426" - resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.426.tgz#2b652e74ecc073831d1fa5da7f97b8e13c220972" - integrity sha512-KqndVF5Fd4gf6Zf2gK6sY0qogS6OiyO6uF1oYL6+gqcFZKRNRi/9dd3lDverdAq7brt18bCCVXICy6dYme3DyQ== - dependencies: - "@parcel/cache" "2.0.0-nightly.428+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/events" "2.0.0-nightly.428+5f72d6bb" - "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/package-manager" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" +"@parcel/config-default@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/config-default/-/config-default-2.0.0-nightly.431.tgz#ed6caf7ebbe1e20723363bc47b2608d2918dd662" + integrity sha512-4Nj83SQP+jgKebo3OwCEJU+qwZf0h4oS8ithGVJgVnNZ9SnIo269V04jRZ7su2eZGSM8CiQBlJl+TX7Z9tyqnQ== + dependencies: + "@parcel/bundler-default" "2.0.0-nightly.431+296bc57f" + "@parcel/namer-default" "2.0.0-nightly.431+296bc57f" + "@parcel/optimizer-cssnano" "2.0.0-nightly.431+296bc57f" + "@parcel/optimizer-data-url" "2.0.0-nightly.431+296bc57f" + "@parcel/optimizer-htmlnano" "2.0.0-nightly.431+296bc57f" + "@parcel/optimizer-terser" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-css" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-html" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-js" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-raw" "2.0.0-nightly.431+296bc57f" + "@parcel/packager-raw-url" "2.0.0-nightly.2053+296bc57f" + "@parcel/packager-ts" "2.0.0-nightly.431+296bc57f" + "@parcel/reporter-bundle-analyzer" "2.0.0-nightly.2053+296bc57f" + "@parcel/reporter-bundle-buddy" "2.0.0-nightly.2053+296bc57f" + "@parcel/reporter-cli" "2.0.0-nightly.431+296bc57f" + "@parcel/reporter-dev-server" "2.0.0-nightly.431+296bc57f" + "@parcel/resolver-default" "2.0.0-nightly.431+296bc57f" + "@parcel/runtime-browser-hmr" "2.0.0-nightly.431+296bc57f" + "@parcel/runtime-js" "2.0.0-nightly.431+296bc57f" + "@parcel/runtime-react-refresh" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-babel" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-coffeescript" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-css" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-glsl" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-graphql" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-html" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-image" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-inline-string" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-js" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-json" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-jsonld" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-less" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-mdx" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-postcss" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-posthtml" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-pug" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-raw" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-react-refresh-babel" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-react-refresh-wrap" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-sass" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-stylus" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-sugarss" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-toml" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-typescript-types" "2.0.0-nightly.431+296bc57f" + "@parcel/transformer-vue" "2.0.0-nightly.2053+296bc57f" + "@parcel/transformer-yaml" "2.0.0-nightly.431+296bc57f" + +"@parcel/core@2.0.0-nightly.429+296bc57f": + version "2.0.0-nightly.429" + resolved "https://registry.yarnpkg.com/@parcel/core/-/core-2.0.0-nightly.429.tgz#edde8f84a5d03b3b6d042819f2f8321ef64b2572" + integrity sha512-0czo4MYbZElj1hxgGQ+923R2vZN/mDGb4mrkkZIg0WSavKf0ypxD8Tznipb7TYgQu8Ax1jMb5Jh4Rsgi+NnbZA== + dependencies: + "@parcel/cache" "2.0.0-nightly.431+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/events" "2.0.0-nightly.431+296bc57f" + "@parcel/fs" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/package-manager" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" - "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" + "@parcel/types" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" + "@parcel/workers" "2.0.0-nightly.431+296bc57f" abortcontroller-polyfill "^1.1.9" base-x "^3.0.8" browserslist "^4.6.6" @@ -2282,71 +2282,72 @@ querystring "^0.2.0" semver "^5.4.1" -"@parcel/diagnostic@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.428.tgz#40d618bddd08724c8aa845c8a8092fdf5b871bb2" - integrity sha512-UxtwtCFsdVKQzmcAooQkm1Wwtd27165/wB1UQrkXYx5RQpSptEhd8LPBqgFZPMzUBLbBp1izwxCQmmekG4ignw== +"@parcel/diagnostic@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/diagnostic/-/diagnostic-2.0.0-nightly.431.tgz#c60f761cb13e21025e603342cc1cc41774d19cad" + integrity sha512-5PuQPD4p/q013LI+koGor3j7Shj2hjyJXaY3dVlVym/IBXzqEuIWKB9Ul7qBzC0cHxhKJmqwiwYaLF8mgCsaog== dependencies: json-source-map "^0.6.1" nullthrows "^1.1.1" -"@parcel/events@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.428.tgz#f1e5852f6050027f843de9a61a7fdf12dbc45a98" - integrity sha512-PProq1xqik+5hemAOJi+bRqRkRVHsGQhg86KJkt9+4ojP0HAwmsOQrpULO0S0WPF8lLGaGNVs4xo8O3ej6JBWg== +"@parcel/events@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/events/-/events-2.0.0-nightly.431.tgz#ae13bd6c93ea022379dc658290011024fa4593c1" + integrity sha512-O21hZLrLYlRh7klAHQgMtPMO67fxBX3mg9YpvxMG+iQMvfSRgN2w7SDqTceIt2uNy6l4+DLQw02Mg9bjX85bsw== -"@parcel/fs-write-stream-atomic@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2050.tgz#0b647b977ce4959951599904044525bf4048ce70" - integrity sha512-f808N3PzbQceq0dkdQ7CZ1u32S0E8SLPeUOXlIPk8TSrBiq1UUA59nWJXNGCVTJ6yTUmKoFsgzM91xHWuQTB+Q== +"@parcel/fs-write-stream-atomic@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/fs-write-stream-atomic/-/fs-write-stream-atomic-2.0.0-nightly.2053.tgz#b4d43d3ea1ea260be9add6128aa1ecc57200f1f5" + integrity sha512-11PeH3/Fo9RGKGTTuLRrqrb97VqDF1noHFzQP1L6+a59Pn4K/rZ/L+sY+rVNWj9CDPcQEewQrL3jUzkdolwQsg== dependencies: graceful-fs "^4.1.2" iferr "^1.0.2" imurmurhash "^0.1.4" readable-stream "1 || 2" -"@parcel/fs@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.428.tgz#7cfb856764e8496486f5e2093d4dc9c1182f14ab" - integrity sha512-rTIqQJKI7qXDfZcuCbEhI3/OJuNCulfZs4j8wYbSRDJVIh7gmdNwkJQhYzft2NlH5MkbusbpFxBus7UiiJNv+g== +"@parcel/fs@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/fs/-/fs-2.0.0-nightly.431.tgz#68719ca0c1f5e77ac03e7e4f5a471d8609e1feea" + integrity sha512-cKMEMV8/8/5pJ4W88NBLc5x9IXuMB1tK7SoTMTlf/MaPS9mz7Tlm8lIPBb3x86DMGYuRilANyw7fw/RJNPkKRQ== dependencies: - "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/fs-write-stream-atomic" "2.0.0-nightly.2053+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" "@parcel/watcher" "2.0.0-alpha.8" - "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" + "@parcel/workers" "2.0.0-nightly.431+296bc57f" + graceful-fs "^4.2.4" mkdirp "^0.5.1" ncp "^2.0.0" nullthrows "^1.1.1" rimraf "^2.6.2" -"@parcel/logger@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.428.tgz#9cd9e5f70254c1e52eb78087e70046545fe2f506" - integrity sha512-cKljUUzvyo3ZXPQ5VRoOJ578h/LUrXpigYjQf2Fk3HnbKokdjljkEIyJCe/tlPLqoP4fAnh38+HfoJor24qoqQ== +"@parcel/logger@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/logger/-/logger-2.0.0-nightly.431.tgz#a05686c88318342cce23a6b5d38087eb7c36c6c5" + integrity sha512-43nUsGg9VxP1p0ffF9L02EEpXsx0i4tIbNKbi1auFW2IPQ+fSBmv/pU5h4vF4tiLN4tXS/Re20SaGwa/13NLRw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/events" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/events" "2.0.0-nightly.431+296bc57f" -"@parcel/markdown-ansi@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.428.tgz#b577193f5cdacd302030793d10bcffffe61debf0" - integrity sha512-Nj9Zl4ik/i056KJ8meYDlfBvZNOnneA5AyOCvqlC4Ulk5EiOtEhC1oowbO/T2eDYCI4bmRxzb1Sf0dQ6y89mng== +"@parcel/markdown-ansi@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/markdown-ansi/-/markdown-ansi-2.0.0-nightly.431.tgz#abee3634b20dec073451b94a156e25935dc5d842" + integrity sha512-EJWgpLuTIJt5PXZTeDEhF/iuyN04ySzFvFe6gpZJwJ0VJPSs+nslE5pcc+AQIhpGQUWcVv5F6ZF4GmymziWn2w== dependencies: chalk "^2.4.2" -"@parcel/namer-default@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.428.tgz#f2eb5b3307717d0b041bd6cddaef3987b9f5d717" - integrity sha512-ZIyw48pQaMWvsIzugg7VUl8osrdMEsnJsC9K+mqr/UZj9jxDhy151WEdUu/OSQUXUnD1W0eULEksYCTUGVPo+w== +"@parcel/namer-default@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/namer-default/-/namer-default-2.0.0-nightly.431.tgz#ec7a5c9c7e9d36bbe03ed6f84fc7caffeb528acd" + integrity sha512-DnDQCdvha8bL8LmqKvnEc5uw+/OQLRTsbrHUhle9vtj/US6gQj6fR7DgIZDeFyoxLgg9RWc+aSiF8zqwAGywzg== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/node-libs-browser@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2050.tgz#fb4700beece5c36d7495590646b0f3541d0228ad" - integrity sha512-Vv/1AUmSAANKgkpBhoIK0V0KcBl6WbEuPqqjbbZ0HIrKjgyMq4kfyDpprvfNmnCVEcildFYSSLWNhfYCMjD/eA== +"@parcel/node-libs-browser@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/node-libs-browser/-/node-libs-browser-2.0.0-nightly.2053.tgz#ebdc57748917b1b679b420e8df25f207cda14d72" + integrity sha512-p98O5y4p5a2xA5oB4rUwzXCf4S82JmKsOmdKtTd/DZmJlIvBZb3zFuacs2XJMK67S4OssBHUNMxv74NnPSMWAw== dependencies: assert "^2.0.0" browserify-zlib "^0.2.0" @@ -2371,71 +2372,71 @@ util "^0.12.3" vm-browserify "^1.1.2" -"@parcel/node-resolver-core@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2050.tgz#0bf66076f65949e73e94e80fe5bec377682bfbaa" - integrity sha512-MREk4sjv2KmxTWfZbW8FMU4mKAwkKd/VkCqFzpcgBQzedrGx19g+HwdcgnDvwON5NRHZp1qEFmRYeHHQWbiK3A== +"@parcel/node-resolver-core@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/node-resolver-core/-/node-resolver-core-2.0.0-nightly.2053.tgz#010c703d7d38ddda06c5143e97c5168a48862573" + integrity sha512-W2Jm6ce2Bfz824fLnd2pQU9cw1lTwxsCF03YiC6U95U0ZyFLDsnA3x6BeIb8CFmlhUEz3lFp2ZgLQHTGAu4mHQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/node-libs-browser" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/node-libs-browser" "2.0.0-nightly.2053+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" micromatch "^3.0.4" nullthrows "^1.1.1" querystring "^0.2.0" -"@parcel/optimizer-cssnano@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.428.tgz#8e539d0a1e1717a7f90fb85ad319e6ba07434bac" - integrity sha512-kPUAsPbQwH9NO3jUOfJh3RH8KV/N3rdt5ZAgIW+yhbl4mkUk+tMXE1pXXbN1F44saQNR/GKn+Z0i98x3sF8XKQ== +"@parcel/optimizer-cssnano@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-cssnano/-/optimizer-cssnano-2.0.0-nightly.431.tgz#816b512eef568c86529f8e067a95ba1c7b0e5b17" + integrity sha512-TPPWr9Ml4b70jApnF414DyeHWPr9NeDaa4nCiSmy5Du79RAfpxtfEan6MAtUBxMEiqLwRAyUxbj/mF2ZjdYidw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" cssnano "^4.1.10" postcss "^8.0.5" -"@parcel/optimizer-data-url@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.428.tgz#bb4d4bc6970e94ddcbb21fe74c58fc1f5f503fcd" - integrity sha512-WB1PbSlej//iVaoM7w+sRo7rHrRNNemiZysy8amXfzDkQWYHKmQc7/9iQtr9qf3TGrR50IZTcDWViyNfp8mC+A== +"@parcel/optimizer-data-url@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-data-url/-/optimizer-data-url-2.0.0-nightly.431.tgz#95e092dc5cf801be3bf86b324c6847f31e7d3e98" + integrity sha512-1Mv0+XnvW5wi6NgBlqiCq/8XbNw6rQhOaM/u3crk+rQ98ua+zL8tT4s3XttOCSD9OwV9E9RyufV8xj/glV8hIQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" isbinaryfile "^4.0.2" mime "^2.4.4" -"@parcel/optimizer-htmlnano@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.428.tgz#bd71fd60408c4d2f22e7d936874bec01cba070c9" - integrity sha512-h+f0Oj+MUBcedHK31vMEB2tBbNOGGVN/tNSjkmpeURr4GDR3VletHpd3uDJwp3M2t5Hi5x8tRF+PKAA/XPfCfQ== +"@parcel/optimizer-htmlnano@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.0.0-nightly.431.tgz#35777a573e34b8af78af5a9ff03f030952d28188" + integrity sha512-mZvgQEEH1u71mxqd+28BLx+ZGYYq44o3RlSquxlx9VtIS6qiUi/Be4+qxevtnAR9J2MWf5D3tgGqoGJXeZTMCg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" htmlnano "^0.2.2" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/optimizer-terser@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.428.tgz#7e058b63320f6ec631b46f04896d2fc73bfbca1c" - integrity sha512-jdJt+kqTVx3QVwoZ1ghDSLxkLaklGqeRzCcDNeMx8SnXgnG4nohqvl4UeG5SRdj1V1+2LSVt/zW43XIY5wpp7g== +"@parcel/optimizer-terser@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/optimizer-terser/-/optimizer-terser-2.0.0-nightly.431.tgz#04446897700e9ae35fb99249e92be88bc3e899cb" + integrity sha512-OEofMoNpS+pj7N9Y+l0Qdg8bPFrXDT/710T4mZd2ZpP8W3bOfZ9EtN7Pb7sDRBOvxnxDcxAKfvyOXhxudurxAQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" terser "^5.2.0" -"@parcel/package-manager@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.428.tgz#9a47a91cb604120f8a154e1108309d0384ebedb7" - integrity sha512-M2poHMzbQ1nlxfrJD1C23Fh8YUBh8RB73HMXEpKrPAEn+S5AIMxxdc6oeJbpTpUIEiyGm3MkCt8nOk/la+StgA== +"@parcel/package-manager@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/package-manager/-/package-manager-2.0.0-nightly.431.tgz#e0ce92382a3ad8b31ac91caff1605316acaf6a99" + integrity sha512-wbc/UYjTjrqCFZ/AJ1gOxyKDfXE3lmLm0xt5L4GOJBToe6EsfbdowGsb1BTKvP73NcGdU7vZ93qMpv5bgT5INw== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" - "@parcel/workers" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/fs" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" + "@parcel/workers" "2.0.0-nightly.431+296bc57f" command-exists "^1.2.6" cross-spawn "^6.0.4" nullthrows "^1.1.1" @@ -2443,91 +2444,91 @@ semver "^5.4.1" split2 "^3.1.1" -"@parcel/packager-css@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.428.tgz#15461eadba085a6144caa6416a9757396a4eeedc" - integrity sha512-O5lfvpPuPUzXih32+bRm+6ZcTygUq4K9rHcVr3OY9neIGu7exYJtKB0ysoG6B8fZo7dt3jVytBZHnSHyZMTNvQ== +"@parcel/packager-css@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-css/-/packager-css-2.0.0-nightly.431.tgz#afe33ebfa5f5e0c3f45154ec7342cddfe752d073" + integrity sha512-DEIMsYxa/hhyKpyP46B2U+zzLqqYoeeWE0TY6iL0JZevbqJneaHd6wWWD4dSZorX7QYjfQdPwD0bpr2bA2F4Jw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/packager-html@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.428.tgz#ab66dafada49cf5397981657ec51258b95801b09" - integrity sha512-4ZTfPK5o4VWui0U4QM3rU4+qgSouNeweahN2lyTaXML4LLHb80i02/VgSA/cE/6kOfo7mNMv+jnnNgrLBYQ91g== +"@parcel/packager-html@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-html/-/packager-html-2.0.0-nightly.431.tgz#97e28d80f20da261e080a2480c54d80f197ae29c" + integrity sha512-6ahA23Q1fx28wpHOeB1ci5wDvD5KTz6Kqq4g1GwYWDwUHDmgAkxBhYaOGSB5+veEgwgqkDT4IHX90ctCy+vkhw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/types" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" posthtml "^0.11.3" -"@parcel/packager-js@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.428.tgz#baa2288d9346013ef128ef0dfdfafc43fe6eb3db" - integrity sha512-vbiFYwbcCXCU6VJfgcndx6eB9G1cUaOXaDsdE8eOviuzEJxxSAzhtraxDX5BUDxwZUBiqsjfm+AKKvwoYWnbUQ== +"@parcel/packager-js@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-js/-/packager-js-2.0.0-nightly.431.tgz#0c2523d19ed5e30c6120477af13458efcbaa412c" + integrity sha512-i+Z+ybrcYWzvK8bc5asyjqPE6g0FCJXVY1ES5Yu9suKWlVlkxzcMI8lZZ80Z1Hk4me4oEsRC3dhE9PRCJkG4Mg== dependencies: "@babel/traverse" "^7.2.3" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/scope-hoisting" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/scope-hoisting" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/packager-raw-url@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2050.tgz#c1ae7df401e3ac2be1d7f275fecf97d075685191" - integrity sha512-UBXtPeEpmtpYmCCw36HkNRVKzltQWceRzeM4WFHAF+30Zn96PlT+EzY8K1gtl2xyQ7yqa9lAm2jkEnuC6HeoPQ== +"@parcel/packager-raw-url@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw-url/-/packager-raw-url-2.0.0-nightly.2053.tgz#506a80c3f0e24f42bf68e70d2b7bd275380dac4f" + integrity sha512-S6vI4Lze+Dnq0OqH5y0Or1qFWL0ajPuZSlPlbOqzaoBNYVtWdMEb2qtug/spRKqT7iHrcX4oQSx/qnxNawn0jQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/packager-raw@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.428.tgz#6ce37a7a3b70b59a3ea19274a20231a802107730" - integrity sha512-pzWComnfjMqLKKP4qL3Fr5AQyxAACIS3Ms0tjSzVJgRf6s3Ef9IHfGZmWoB8EEICdSi914zrGlTA/06dWpX6hA== +"@parcel/packager-raw@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-raw/-/packager-raw-2.0.0-nightly.431.tgz#bf5e21838aa139c7546231505163bd514c8cacd5" + integrity sha512-thsJdeKUfEuS3G8+Gnb7m+tKQjQlK+UIWVCSL2v/8N7Syf34QySwvH/flSRWNchl0dEcE2y+wVeGNIlW3y9VYw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/packager-ts@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.428.tgz#c2989bfe3774da9305a485ce6af7bfd5594bc700" - integrity sha512-tmFJUgImvnrHBdSiGnzJzs92D/mHyCkamSyhphz2ZOa1xMaQbw3V4Hj50RXnmjNTZPyspDDkFk2TfMjISgDSIw== +"@parcel/packager-ts@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/packager-ts/-/packager-ts-2.0.0-nightly.431.tgz#e8aa1af40943d44d219920f56096c19ccd196577" + integrity sha512-+f8V8rsOyheoc5sk8h6HKY11HcDcaDzj8xwKHdiRDSk1VWfUFgA/uF0uD6jtTzUtlVNhKrZoN2XByorTx4VnAQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/plugin@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.428.tgz#0a8b3c0bcff4b4233cb85e4110f819acca291a77" - integrity sha512-rbHyE1zBOWM62BtoDnjDgXrdWDsdRDK9NdHY/IJdILnrrqbrRamY6x9xkOMuvrIBOkN7DmnfbFi2P8yUyaqr8Q== +"@parcel/plugin@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/plugin/-/plugin-2.0.0-nightly.431.tgz#7fcda9c74f87b7f4407c91350d627130a7b62ccf" + integrity sha512-qG1KX98FvZMikPLycE2L2a/ykD06S3kKmz3KZkRA7FmfrdkLS5emO/DstvqdoTeVJbWG3YQlhImI+zABTlvJGg== dependencies: - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" + "@parcel/types" "2.0.0-nightly.431+296bc57f" -"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2050.tgz#bedabd5a0a631a98fe4152f7fd2093a766ff1e95" - integrity sha512-lRBWNQZXu71kvM07Rf4+1EDMWPCsV5+eowOTkPxT1eWGt+HPFmmxtb7JAUyHKcdId4IXEcKkWAssvX2+TlEPUQ== +"@parcel/reporter-bundle-analyzer@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-analyzer/-/reporter-bundle-analyzer-2.0.0-nightly.2053.tgz#9ed5ae88752811f2ffbdf675d84e47fb4a732418" + integrity sha512-yi3wBMM32aPMikaNv14p56gmVzA9P8yjVW20GYy9sTQmqCB70FHyWzZk1cgjkeOlFyPDVP0dQP5A8dYteQTiyA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/reporter-bundle-buddy@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2050.tgz#bf75aea295515a82ba97d7a731e1bd9a5fe42a39" - integrity sha512-RkI3qbE76jWYxRFMp8y1VSnDKRypZ6WqVQp3FEjJgk6Uf/XfecG6S9fg7Lxm4JeSJhJ1+bsRTl8RoqV9Gx5XGQ== +"@parcel/reporter-bundle-buddy@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/reporter-bundle-buddy/-/reporter-bundle-buddy-2.0.0-nightly.2053.tgz#a8fe39e5a56709b8402576165da30ec98550e0e4" + integrity sha512-VMR6ACWwpxjQRIsB9jvPnHRmg5KbU/pojfFu5nwUBAJIGpszF6iEwUmJR6QQNF804PwDauAPkIr1rqWowi4cHA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/reporter-cli@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.428.tgz#54d65cf83840e0ae22e5fbd5df3565c7fd575fb3" - integrity sha512-AVIZnI6olE64AkdZe9XLyOYBQUxgmH58N6oyIljn8COVpeLN7C2pNiJMlaXODxat4yqJg8LR8dt7vA0RMOcM6Q== +"@parcel/reporter-cli@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/reporter-cli/-/reporter-cli-2.0.0-nightly.431.tgz#fc572cbacbfd00e25dc145e1b3de3983d54a5581" + integrity sha512-wsxDn8iFnjy8pGLNemr5vSXT5qLHHRFti0/Ir3FybkAtcvbAzb1XlF/MrVhHx2beQztTRSbVfmJA5WMqWu/bFQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/types" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" chalk "^3.0.0" filesize "^3.6.0" nullthrows "^1.1.1" @@ -2536,13 +2537,13 @@ strip-ansi "^6.0.0" term-size "^2.1.1" -"@parcel/reporter-dev-server@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.428.tgz#c77becc777bfe72d2a155136df0432e5b41742b2" - integrity sha512-ipr9XFKXWrQ6lWlkUeLYgCHcaxNbREb/Uh17t+n7E5vD7kQvvW7ptDi1MB1IqJAzn/y4a4OTLwJV2ZKnwEN9Iw== +"@parcel/reporter-dev-server@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/reporter-dev-server/-/reporter-dev-server-2.0.0-nightly.431.tgz#2455b15671e1d250e196b018b2acb7a718754d1d" + integrity sha512-W20/1fAvZU9907e/Fpr5yzpRxrvNEF91G+b8VeF6a6Dw9gt331Ay5qyregN7/CcM2zkWtOB2yG2ckuzPhUnAiw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" connect "^3.7.0" ejs "^2.6.1" http-proxy-middleware "^0.19.1" @@ -2550,54 +2551,54 @@ serve-handler "^6.0.0" ws "^6.2.0" -"@parcel/resolver-default@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.428.tgz#ef3adc63137dd23f53b5d230cff32fa732c88098" - integrity sha512-ay0HkjAZxtBEbSYTF65wCfxilDE0LkVeuwgapG8Pd1/FCw2zU4dA/s7MozRmb6DQ4cU2hZL+qbNgLOyQ0cSNuQ== +"@parcel/resolver-default@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/resolver-default/-/resolver-default-2.0.0-nightly.431.tgz#188469dda57dd5e43770dbbf7c7f156000126f91" + integrity sha512-Qpx7xdhY1KML0GfCZggsdBsxl4Tp9LtSF0AINHpOTm1JJBzoUGNSytvFneZOHwRe7JPEHgTY+ZEuFEbbjG/lfA== dependencies: - "@parcel/node-resolver-core" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/node-resolver-core" "2.0.0-nightly.2053+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/runtime-browser-hmr@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.428.tgz#df69813cdf1f8ca05ed9ae9a4b3de0f41f255b5c" - integrity sha512-Sa2gGxveh3qjv6zCGY5l9yOgPjrqZrSzw0vISdtsgnItqW5o64Y2ZAtLS+nb1vH7KwEuhm9/O2tcye0JqeOEvQ== +"@parcel/runtime-browser-hmr@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.0.0-nightly.431.tgz#5483f4c00faaac3154b855fce9ef68bbca1e27b4" + integrity sha512-UU/LFh2cAhi4T+JdoD/A4Ivott6ZC8dZ5V/VfMzdh/ZwdPTDW0Y0q4VihFSVJWj2dX1CzlqUgJk6L3+VUqks/A== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/runtime-js@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.428.tgz#e71798bd93144d9b4ec9665d23a7a68b88922340" - integrity sha512-26kopuJ1l3KvIc5Br+ctotsZ3BMqKlVHc4GvH9YilYGehqEaF1GDEX9Xjd2zBaLfQuFmHSM+dhFCkfz8ZVjQlA== +"@parcel/runtime-js@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/runtime-js/-/runtime-js-2.0.0-nightly.431.tgz#f47623f3b883938bdf2a609b59129f3e55bcdd4e" + integrity sha512-Irt6e1vWdqqk85b0dzB6HP5vM3si8J6LfmiZZRRPH0yKNE6UL9LsaKMtAI6YSChT4JWwPoy+CWesEBLnrehE2w== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/runtime-react-refresh@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.428.tgz#f5f4b9c0d71c7a9835fe2c0f559215c09593f43d" - integrity sha512-CSA7HRbQrpSZK7ulZpKrhW/yN97TTxGUeqoYHKZ34xK+lPCNGNNBnQMrBoKxJ2xEE1nEiK8uYJjm3/3W2qAItA== +"@parcel/runtime-react-refresh@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.0.0-nightly.431.tgz#b0812cd2a4e0abc03e130e264124e692ca52d107" + integrity sha512-oY/7RYcU1y3LusZP0zKISFtOw0b2ZioKAV3gWBHW9/ywB2z6szf2In4byCjnI/otIq2ab2B6VFN7SHnnPwZXdA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" react-refresh "^0.6.0" -"@parcel/scope-hoisting@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.428.tgz#b2a6d2d1eeaf3042b8c6a6ccb015b024488c0e27" - integrity sha512-31F7KlPhSteVSTT5+3ZAB3rFYSEtwsKv6qnn+0GBpMN2lZROXzSuo016OOwirCqw9mFwnbHf0/tm5qmP7tlaLQ== +"@parcel/scope-hoisting@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/scope-hoisting/-/scope-hoisting-2.0.0-nightly.431.tgz#e0194721d523ef88af9c06d1922b1b51faf82068" + integrity sha512-50/KXGnGcRPpPrcoMNYWHrRC6vvKauB1EKy84E32lG0cAafkOvykoo28aQp7vstnxGnVZ9c2hmabyJedxm3L3w== dependencies: "@babel/generator" "^7.3.3" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/traverse" "^7.2.3" "@babel/types" "^7.3.3" - "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/babylon-walk" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" + "@parcel/babel-ast-utils" "2.0.0-nightly.2053+296bc57f" + "@parcel/babylon-walk" "2.0.0-nightly.2053+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" "@parcel/source-map@2.0.0-alpha.4.16": @@ -2608,10 +2609,10 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -"@parcel/transformer-babel@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.428.tgz#7e051b1cf177766d788a0faea3c4f85cf236129d" - integrity sha512-KASGFzx0m0tjqJqxyXEHc6ool4eTrBdhIJcfcOwBSoNSVDAloJxqqqgROSWL3bJmOraj85ToDJKPhBwXVYvBUA== +"@parcel/transformer-babel@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-babel/-/transformer-babel-2.0.0-nightly.431.tgz#6bc079070cb02be8b1fb6a6f81ca2a7bf6f6de11" + integrity sha512-cvWTPKNhCv2+NeHBqJIagp+vKIBfutRO0xIuoyJ6+IuA6XbXLnIJlWaJQqQvErJoJ2akY5ytx+lctzWnKd6TXQ== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2621,85 +2622,85 @@ "@babel/preset-env" "^7.0.0" "@babel/preset-react" "^7.0.0" "@babel/traverse" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/babel-preset-env" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/babel-ast-utils" "2.0.0-nightly.2053+296bc57f" + "@parcel/babel-preset-env" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" browserslist "^4.6.6" core-js "^3.2.1" nullthrows "^1.1.1" semver "^5.7.0" -"@parcel/transformer-coffeescript@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.428.tgz#09fdc807bc06eababdbd8bd791bf42f6dfeff7bb" - integrity sha512-pEr51sfPjHqcuOFhLwT26+T4QWcbiUFz12521N5C+yJnpDYEOH5j+ojVaKjLefp62n2PSZKUzsobTB+TxHhJrQ== +"@parcel/transformer-coffeescript@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-coffeescript/-/transformer-coffeescript-2.0.0-nightly.431.tgz#d7d3465b9318e2535e22b52f92df5d91a1eb21a1" + integrity sha512-Ygws6dccdBw3M39MWjqJS6EIAzJekmg15ivlCww4SNrfesI1+eeArKsL/KrcSvk9YyatYG7fL20rRiAq/nunIw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" coffeescript "^2.0.3" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-css@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.428.tgz#2173056e77387825f86ee0028df6d569f47111c6" - integrity sha512-IkIaoSxnfwz2XPUujqQr15buj/YnD4vWVY3BZKyDQ6wElOKXag9K/zSpYsDZk7S28ZKaDM12XyOhFKZl1SBdXA== +"@parcel/transformer-css@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-css/-/transformer-css-2.0.0-nightly.431.tgz#1ba7aadab0e87b3ac5ea7e0cccd016f5ec9a6772" + integrity sha512-nq29icIS/0QOynOMDnjTtLLFhaK8GrKF6FD8QFhLi1vAFxyvuDJyFTyHlagTFqWEHQmLw7WEUsfY+uBBj5Ut4Q== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" postcss "^8.0.5" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-glsl@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2050.tgz#2d5bacb53d8c8e8016bec0322943bb97ac9d691a" - integrity sha512-G3ROXTtkg8Ta5GakogQ/y2HMcc3xLcrhm4cKkDYBSSNnfnlqNVbB4CzErEv3VNLiJATQgnH//Aq2V3aZ1ui8mQ== +"@parcel/transformer-glsl@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-glsl/-/transformer-glsl-2.0.0-nightly.2053.tgz#3d713830d451f5b5a188cb844dd4222919958c4a" + integrity sha512-s7cjzJS3E2MOOETlRfLghdw/mmvbrNuP0zuOWaW6c8zc7AttenoX0/LHScoK71wukfax9S6WdLKJl/xhwmLXMQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-graphql@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.428.tgz#66e756dc5826d79732917d9e8bbecae29763a702" - integrity sha512-ILBirKHDsbWMSiUCMKs25XBoCkjI9ZZPakpHANwVVzK46scOqyCZtD8uDrNW2IqBecoviHH9e1E2ke50AphWow== +"@parcel/transformer-graphql@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-graphql/-/transformer-graphql-2.0.0-nightly.431.tgz#9ea545c47d401ab68e02bbe0cc71273b7405fe9f" + integrity sha512-znKzDICXeQZ8TKGI0pYq7tX9RWG954T5D6Ynzii5zJdzDDfYjs53U3b4XATMk8RhNuAzdpqVwV3PUa9XoPMEnw== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-html@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.428.tgz#407875dfa6ccd3fb12ca0f24e0b1c4c5c3669b15" - integrity sha512-o0/w/+NLcPPUF7//HoTF/VQaALh+4YjCdhor8dCJgiVqX1tL7HEWgZ41TV6YrK9CF8eOIMp9iJLEtC7blEs9Eg== +"@parcel/transformer-html@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-html/-/transformer-html-2.0.0-nightly.431.tgz#2537f9c38eed7a3ae0ea9a7a0fd60aded795cefd" + integrity sha512-wBu3QaBjcHmomFUmi71Ee2fhlr8wPysajAZpegXHep2aSY+Hpfv7zIFleUuyqhGkzli7bTSeHp0HOFqj1l2sTQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-image@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2050.tgz#f57424c4016b46a4e92d8355af3821c49e07ab09" - integrity sha512-TLyxN4G86POpHW/VdGXloLwM3eu0wRfJMagjNue3nDl0aKGSvpT2OJZEpyhUui7C7owytM15s23+DHI3miwjpg== +"@parcel/transformer-image@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-image/-/transformer-image-2.0.0-nightly.2053.tgz#0cf77853df259fa5cbdb2fd050d983c672be70c4" + integrity sha512-xMBlyb8awU6hxg82+QizaObHShs9rG4nMmPhGuoRLetOFkHzS9OjeWGHooQ2RMEeqPnX0H4rMj7ZPobdSkarqQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-inline-string@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.428.tgz#8979079900022f74512a5fc6eb3278d8900a5fd6" - integrity sha512-DVwKaFobajhNDA9D7fewXoMtxwdgIUpZ6nK3m8BgzWHoH6zvDkkxaRqUfaodDtz+O46K8a80bwPeQsjqmVZyaA== +"@parcel/transformer-inline-string@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.0.0-nightly.431.tgz#4ef6d0401d748ea5a3be81908096495af038e20b" + integrity sha512-oTmDZ/axGCpkITyQo7lHjuEj2vhCWVKlQfQXSiWW65W7bS2tZ8gyLU1zcC88K3B7/VUH/7m+WrvHuoBsBX0d/g== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-js@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.428.tgz#d086557b4aa7589de1f0bc2105f89e40042a8291" - integrity sha512-RmCOay6oEGV0v7bjg7BC9l1St0f3WVBtTZUP8WNVWbfVv3zSNod5gTMaLI+4j1EDbzcLTm99d4XY6+mxK2+EFQ== +"@parcel/transformer-js@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.0.0-nightly.431.tgz#cdfbfe23649b1d481454b529ece46b51578171b2" + integrity sha512-eGD0Zc8IT4VXuhj7Fl/Iei2fnN9GMF+lLjC8ElZd6VPZkO6a9R4bYTSnskP8s+f3bquqEnUeodgkwU7+VSBl1g== dependencies: "@babel/core" "^7.0.0" "@babel/generator" "^7.0.0" @@ -2708,193 +2709,193 @@ "@babel/template" "^7.4.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/babylon-walk" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/scope-hoisting" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/babel-ast-utils" "2.0.0-nightly.2053+296bc57f" + "@parcel/babylon-walk" "2.0.0-nightly.2053+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/scope-hoisting" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" micromatch "^4.0.2" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-json@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.428.tgz#f00ae358c6f6b0a1ac1676fcea189f45350ab447" - integrity sha512-6zt/xB4Abe3HW4EXboBN4eAMnX9AZ+s4ffMoezGVHVxlHClKQ4Hf7OkdHef/KZnu33JNjeC81BofSYVDMPD2xA== +"@parcel/transformer-json@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-json/-/transformer-json-2.0.0-nightly.431.tgz#da8bfdeba1e0dd6a4b011836bf4c76ed0c5e75d0" + integrity sha512-0lU2UI/XPDKKP2Fc9+re16ft84UfTnPl9MgGzzUSfYjQLSsyOvN5ocY6ue8qHgumFZ7AUWUbUFjuJJgVzGSAqA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" json5 "^2.1.0" -"@parcel/transformer-jsonld@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2050.tgz#8f877bf2abe86794fceb451df31ed3fee33ec62c" - integrity sha512-GG89Hfz4Nf9N10cJdBF2rrCJ1MSnTvVX+WRP379KxUHJh540O8xSVxcBnHnt5ByOD0JWB0Qkk0KyQQOe7K7WhA== +"@parcel/transformer-jsonld@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-jsonld/-/transformer-jsonld-2.0.0-nightly.2053.tgz#f75f84de1a95b571f63c91e57795750a16aa8071" + integrity sha512-X34rMFizKuLjND2jkK13hIDHdO1Y5GAi5HVZxXBKP0ixYXxXcPpeYtcjcVOX2l86Rg2rPL+BDKv2PweqVG+Geg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/types" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/types" "2.0.0-nightly.431+296bc57f" json5 "^2.1.2" -"@parcel/transformer-less@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.428.tgz#436159b13cba102d114eff58c4ad082b5322ce87" - integrity sha512-gSrGzckTQi7b+g8FrdsJiysgHSSzeEPA7RGE0MDjHllvcjpTSTvkIquS2ImMhTeID6b4DlxSo12JkGUAsQf15g== +"@parcel/transformer-less@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-less/-/transformer-less-2.0.0-nightly.431.tgz#faf1c2ba4fe98de05b0f7614589cc92f8da1e250" + integrity sha512-wxdDPRZn3mt6mDakyLgnXWHARNX14JT0J8UT3Xcr8dvhh01kgK6KE6Ndp1jhibw36kd+1fvvJ93qRY8nyrf1kg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" -"@parcel/transformer-mdx@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2050.tgz#b03c7a0f4c9b8bb76743b06600a78a9224cf25d6" - integrity sha512-SWvTLYNy+ol3iHtOySeXq/nDMseTClIaX5yBrzvXlKbWt2voOhQjFJiUmxk6/mUqxRvBzwRr+0t5SnnKDWpGUg== +"@parcel/transformer-mdx@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-mdx/-/transformer-mdx-2.0.0-nightly.2053.tgz#ea7f46349d1f7cba477578ebc7b9dec9f7ca0102" + integrity sha512-zslRcwHCs+dx/PHi7AF5HB1zQ5zdULS3TwEmBjshL6Mxov8O29R1aAWSRzSYN8xgki+8JjJSOGStcZx2P6fTsA== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-postcss@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.428.tgz#02b4c8cccbb672a074dabc07be54e700b2257fa0" - integrity sha512-fYt5mAGMjWzG0Nucgy8M6qP5B9lIBsKwgpZM/ZlE3vP4AX2+CVtswYh8kDz44tQ4KLtxdCs0r2TJkVZ+HzW2vA== +"@parcel/transformer-postcss@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-postcss/-/transformer-postcss-2.0.0-nightly.431.tgz#e32461c484bc9135e171da3e8de4a089f6198d86" + integrity sha512-gKQtKR0FJinwm4NONJk1rQc1HKDHX+8ypISQ6rDmh5PhH5GsDw6pJRibl/tEAkPuoAH9wozEMk21Qwjjr+TwcQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" css-modules-loader-core "^1.1.0" nullthrows "^1.1.1" postcss-value-parser "^4.1.0" semver "^5.4.1" -"@parcel/transformer-posthtml@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.428.tgz#1c5e845aab7201b6832215b6e44b793a74daf7f3" - integrity sha512-o2a02kFYexpKHR+1eMZE8bcmoMC7scKlHhFkaYD5LObdfAkQSu/ymFK692UUj6nuBCaqHu5DJjBqSoDVDH8pTw== +"@parcel/transformer-posthtml@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-posthtml/-/transformer-posthtml-2.0.0-nightly.431.tgz#01992570a1fac563063ca1917cccd11724392a6a" + integrity sha512-0VA3OJ9yXdQPG+DuEYYL0KcMUACCepOMQF3xLQNCJjh3/SB1f3bmBOzGYPcw18bMHA6S3OX/pNRIIvvhPfBf3g== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" posthtml "^0.11.3" posthtml-parser "^0.4.1" posthtml-render "^1.1.5" semver "^5.4.1" -"@parcel/transformer-pug@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.428.tgz#498d7332aa43725ed7c4003714666dd3e198a0c1" - integrity sha512-6b8qI6NfAyp9nac4Ffd6WgwUhV+SdmqAin1AUGvrPpxLP52Vd8ZyvTcPC7E2yHzoQ/wBU+WqMcvGL6i5x2efwQ== +"@parcel/transformer-pug@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-pug/-/transformer-pug-2.0.0-nightly.431.tgz#217a3582e2a68293d3d3f3a0e87fbc7c40e1a085" + integrity sha512-EuqsLIFpakB5v6pHzXrMbT7j8vyWMhQA9ubAezlwuUCuMrF+ED+fLZ0amNbfOY17LTutlMOF0ijsaThJg032sg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-raw@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.428.tgz#58dcb4f563869512cc148783aec3ba527208d610" - integrity sha512-m0OQ1ck0/hAfylpbJqtuIQTCDA2Jy7Y86SKV5WgSYKR1jjfelE4BJWWCGtl4I4mtK2/VpMvCQZKd6Kob4AJOog== +"@parcel/transformer-raw@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-raw/-/transformer-raw-2.0.0-nightly.431.tgz#8f755a17cdc25d0a2102b27574536d8fe001752d" + integrity sha512-+Z3hKjlUoG8QydM2CpcF1yXW0DFbm99LeLFrAIkAj2VcTRpDjgcXP1smWXaolux/FVto3WK14nk2PScUZqgE4g== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-react-refresh-babel@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.428.tgz#25d5af01e55bef51edf83ad229e5e5f5970aa991" - integrity sha512-uqPx62jUjgt98Jq1UJcA6RuI3F46HAiF4DxuAJQNyQjGAtx4WZeZP/8iH1K1hpgyRGB8fBJwYxVtuwFCfxATlQ== +"@parcel/transformer-react-refresh-babel@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-babel/-/transformer-react-refresh-babel-2.0.0-nightly.431.tgz#e100cd5b357a7e1655041b42bfee38aa927e34d3" + integrity sha512-pxODnpLkC658na/RD6jRm8SJCUYaCL2ufLrYnh6H7B7VY0dkMg0I8vNRJGmb5R6nWsW8ML2n8QvzOYmTWIq7Ug== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" react-refresh "^0.6.0" -"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.428.tgz#beb9c3243dcb18cab717d75019bcb9c99f62f3b9" - integrity sha512-2iarFS+oVuLsu4yW8EbOkfl7SYRy4krL/Bqv6jRHYQf1YEG4fcStZusfkEcR6IwV4XDBHE4NkuTxhAKwFbGqAw== +"@parcel/transformer-react-refresh-wrap@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.0.0-nightly.431.tgz#fe24b98d69fcc3c08e5de8367d63a895216e94ae" + integrity sha512-On3rvDjaywOAtp9ZitFAEWmRti5hUTT8KcxiJtvuKU7UzAyT/zDHr7KiaUibvJwdYfMTmukdHwFKDGiXHJSRYw== dependencies: "@babel/generator" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.4.0" "@babel/types" "^7.0.0" - "@parcel/babel-ast-utils" "2.0.0-nightly.2050+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/babel-ast-utils" "2.0.0-nightly.2053+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" react-refresh "^0.6.0" semver "^5.4.1" -"@parcel/transformer-sass@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.428.tgz#576bf41e99da779c2324179337e30a22da5e0bf9" - integrity sha512-W2AMLKI3OHvLrbCv1XJoeCA1KLmsAgx5UNWYL36P0vgS66DCy/JfqggtJ/8Oq3kXOzVfmjONwGlyn9O+0/2ZuA== +"@parcel/transformer-sass@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sass/-/transformer-sass-2.0.0-nightly.431.tgz#35d08684ac5488db9a7c1f40df274e381c33c170" + integrity sha512-FAsZ2oxRYTJor6A/EIqX+bitiqc5aURMBRhMwwn/edsVf6uaHd4ZNLjQ5OvYK5+qWyNVK6FcbJx/tWRcNj3xFw== dependencies: - "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/fs" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-stylus@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.428.tgz#bdfdee966c1ffa8d5205d0df7b5630dc1259a672" - integrity sha512-E6dlNK55W4DosspdCdq8ggn2PEOZpt58OvpYJH4iPEeGCVMrdqFPDTcHDQ1kyosFF70RwpCqx7w9xLdFibD2sA== +"@parcel/transformer-stylus@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-stylus/-/transformer-stylus-2.0.0-nightly.431.tgz#971d7f1e1d1d038925148ea09d1dbad2eb000680" + integrity sha512-ptTcApAPuVJ+rRIZ6C+iB+Kq4rUsXsO1GDWgq/YIilGM49xLZB76hwMKg1fCYZEQJyrCEk6PJIVqpu0EAQetAg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-sugarss@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.428.tgz#cc286659ac0892c2b1b9376d82847911b74c5ed2" - integrity sha512-llP6x3caV63EADeZethqEDAwM7VTdglkPLmvKFM57PQbxJ1sLDFzuWb9CY5ajd7gcFs9a2c4wRTz87EdL/Y8pg== +"@parcel/transformer-sugarss@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-sugarss/-/transformer-sugarss-2.0.0-nightly.431.tgz#69d9aa5a0ca4c1b4c0b4e7eba282faf8aea34958" + integrity sha512-M3AZQOKR7BLiWTN28GBMADz5EGdecNF1JGbIs9sHYWtNW7koKDVni0z6+5salGBudaimYrHtCixP0eBlS/L0ag== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" postcss "^8.0.5" -"@parcel/transformer-toml@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.428.tgz#c92cab9c5b75e23264377ead3e4ef05673339299" - integrity sha512-jAjP/76eF4RV0Sl6fOMXt3OjqIBAyQiaSSqPT59bHD65XPakPTvxGSII05jmqUqSFCtn+Qy7SMF2SktIJKZi7g== +"@parcel/transformer-toml@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-toml/-/transformer-toml-2.0.0-nightly.431.tgz#6ec515d86265be6b6b8d569557c24f4ec6e914fa" + integrity sha512-hZHVL7zW//AYHTCgEkdevGI71radmKqEvT/eLsHQH/AyWwdB+ob7nMMTO5ZIgutluxA9BCgnuzC8+jOtHrz5Vg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/transformer-typescript-types@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.428.tgz#1121f5702fbf3563f785be393da252aa7e3a75ba" - integrity sha512-WMmmZB8fNwQ/wj9A6Z6OYEkIXCpbF8h73Ie6q2MUPpz6mgRtLhL3IfbCulpoHH3GvvJ/qo7IWynOqrYajHNuqw== +"@parcel/transformer-typescript-types@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-typescript-types/-/transformer-typescript-types-2.0.0-nightly.431.tgz#cb1e474b584d314ae071ced0844c994365b4cfbf" + integrity sha512-7/bejpeNYvfdfWi+CFJ3T0JRP9NfI0W1yh49laX38/V8hYdfZYedA65dzsxnMoOu0F2vHaE6ToD9OnvdCI0UYQ== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/ts-utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/ts-utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" -"@parcel/transformer-vue@2.0.0-nightly.2050+5f72d6bb": - version "2.0.0-nightly.2050" - resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2050.tgz#7ac51e3921f1dfc2bf62be794e059d384c0a4107" - integrity sha512-qPYRvLHgbmB6heNIVwz8r2yfzaTpgIIKAXyHt66SFmA63l0iAt0HzRdmrRUKRSywinplrXwkEejY7W7PUtIAuQ== +"@parcel/transformer-vue@2.0.0-nightly.2053+296bc57f": + version "2.0.0-nightly.2053" + resolved "https://registry.yarnpkg.com/@parcel/transformer-vue/-/transformer-vue-2.0.0-nightly.2053.tgz#1d9e985a8664fd7ad8886cf522d1cc67b9e62da0" + integrity sha512-XwL+Iwf5zOk8duxR27Xw7FWvT3V4D2cr3O2Uz9+bnbv4FL7gxy5ekebU3S30c4rp47SceGsss17ZCwGSknw5vQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" nullthrows "^1.1.1" semver "^5.4.1" -"@parcel/transformer-yaml@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.428.tgz#ab429adc33b8fef46f7b835fd85085f1e7958169" - integrity sha512-OnKyVu09nNxjCVC+Ltz44dX1Wobd6vPVUMOizzumxr/mffKF56qyJH5nZr5K3WFmjQPt3dZTALewE6K+/hmMHw== +"@parcel/transformer-yaml@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/transformer-yaml/-/transformer-yaml-2.0.0-nightly.431.tgz#8395fe907df61b5f93af09e0adb9f87fb175022e" + integrity sha512-euA+BTJjsYTmOKIWIklzwlI+DZ8GFVHYS4rdP+3I/lZEAyTjdZUopA4m99TKq0cwnYPu1R53H2wXsbK1wAK1Vg== dependencies: - "@parcel/plugin" "2.0.0-nightly.428+5f72d6bb" + "@parcel/plugin" "2.0.0-nightly.431+296bc57f" -"@parcel/ts-utils@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.428.tgz#aac135f27bf5108b5c3efd5f187de409c524ba9e" - integrity sha512-tiEGEvo5vnlnhxaRpECaJGMPv2h2WrDZLwmoJmd7dA8bRoi3J33b34XqcM1X0vOKAoiorA3Ty1eVZidhk8Wa5A== +"@parcel/ts-utils@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/ts-utils/-/ts-utils-2.0.0-nightly.431.tgz#7e8af0fcae0e75659b334fec24e31cd89805dc69" + integrity sha512-0AeaQy4KIG2sT7BB+OnUsmv138DPbrechHQxO1Zfkt7Pd3FWz8vl6cLTfiYA6QW0XyVFCnRFG0GIqubbmSk4Iw== dependencies: nullthrows "^1.1.1" -"@parcel/types@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.428.tgz#2de9d12da3a389ee7c192e6f1778d1e40982ab4f" - integrity sha512-EccPH9PldxURL7FVd4Qk6wRXMPbw+9FLbK22hg6a7SKlioqKbM0Wi3esWvuArLTsLqKb1tYPskygPRqIzEfqmQ== +"@parcel/types@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/types/-/types-2.0.0-nightly.431.tgz#20cd0e153dc8705b357c549f4a26e554937db14d" + integrity sha512-RJA4MWzeL9DaYi5LZwNoVBF8ZIz/dmIi7nYKGqo/LqSTJISh6rNLwhf7YuXMGKxjlLJ95mfaEzcmtTNo/d3Z3g== -"@parcel/utils@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.428.tgz#d791d9e7534db8ef99e189cbee4162505c33f0ab" - integrity sha512-uCcBVUYqhld0822F+4Yw3dnWuHsNbNsK6iIvbZbKCh7L+MlQkmCvlwYE0H0ew1u3HxjQj+Dlz/lfP7iFDj+Yvw== +"@parcel/utils@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/utils/-/utils-2.0.0-nightly.431.tgz#ba38915f5d35289a42aeaf87d62760f72f5e8167" + integrity sha512-yIdwnvdL47EV8sv8DbcZG+SOSueM4rMrEnHojN/LPOIzTDiQPUtMx0wTGW3923UN3E2vknGbssIDJ+fnl5l2Aw== dependencies: "@iarna/toml" "^2.2.0" - "@parcel/codeframe" "2.0.0-nightly.428+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/markdown-ansi" "2.0.0-nightly.428+5f72d6bb" + "@parcel/codeframe" "2.0.0-nightly.431+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/markdown-ansi" "2.0.0-nightly.431+296bc57f" "@parcel/source-map" "2.0.0-alpha.4.16" ansi-html "^0.0.7" chalk "^2.4.2" @@ -2919,14 +2920,14 @@ node-addon-api "^3.0.0" node-gyp-build "^4.2.1" -"@parcel/workers@2.0.0-nightly.428+5f72d6bb": - version "2.0.0-nightly.428" - resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.428.tgz#227023c9725bb31e495f752f35a317e5428873be" - integrity sha512-dWQNLnJ9TcgbXDQEQcudCAZj2n0IXeBmaYq/yaCSYJ2JfT68W+LyTZS5GleKo41UfudqecnFnLQFrbqHTWreyw== +"@parcel/workers@2.0.0-nightly.431+296bc57f": + version "2.0.0-nightly.431" + resolved "https://registry.yarnpkg.com/@parcel/workers/-/workers-2.0.0-nightly.431.tgz#af69ad5c18390c8af2fc05395c23d491064baf83" + integrity sha512-0jlEgTwHU38g/KTB57yNT+3ZB7G8cqCxetnMbIo+2oEJPwuOW1qHoaBcL2ld87BNwq9OB5b4gpvGsOxE1X/9OQ== dependencies: - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" chrome-trace-event "^1.0.2" nullthrows "^1.1.1" @@ -10325,19 +10326,19 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parcel@2.0.0-nightly.426: - version "2.0.0-nightly.426" - resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.426.tgz#9d5ae450adc1bc4174a5778c96042be342ab5657" - integrity sha512-hgEqIXAjG/ZQnImXxVqJeg1ZhlCfosrnUXSswRCG8XdNUs8oncumC3PbfvYWHNAGnX/h8y/7nU98u3hi9l1tFQ== - dependencies: - "@parcel/config-default" "2.0.0-nightly.428+5f72d6bb" - "@parcel/core" "2.0.0-nightly.426+5f72d6bb" - "@parcel/diagnostic" "2.0.0-nightly.428+5f72d6bb" - "@parcel/events" "2.0.0-nightly.428+5f72d6bb" - "@parcel/fs" "2.0.0-nightly.428+5f72d6bb" - "@parcel/logger" "2.0.0-nightly.428+5f72d6bb" - "@parcel/package-manager" "2.0.0-nightly.428+5f72d6bb" - "@parcel/utils" "2.0.0-nightly.428+5f72d6bb" +parcel@2.0.0-nightly.429: + version "2.0.0-nightly.429" + resolved "https://registry.yarnpkg.com/parcel/-/parcel-2.0.0-nightly.429.tgz#bf5419d35865685515f9e3b298b345d48f1b9421" + integrity sha512-C5vyjWrOneYMtE+kEoF9bYXfZn+1DbzzhyU0cXU8wbO9lYrJNnrNS97SXzd9AgeGd2IcXF8GOZtvDtSaglEG1w== + dependencies: + "@parcel/config-default" "2.0.0-nightly.431+296bc57f" + "@parcel/core" "2.0.0-nightly.429+296bc57f" + "@parcel/diagnostic" "2.0.0-nightly.431+296bc57f" + "@parcel/events" "2.0.0-nightly.431+296bc57f" + "@parcel/fs" "2.0.0-nightly.431+296bc57f" + "@parcel/logger" "2.0.0-nightly.431+296bc57f" + "@parcel/package-manager" "2.0.0-nightly.431+296bc57f" + "@parcel/utils" "2.0.0-nightly.431+296bc57f" chalk "^2.1.0" commander "^2.19.0" get-port "^4.2.0" From a73a4ee983d0a17c1c6b58ba49146284582f2bb0 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Thu, 22 Oct 2020 05:29:29 -0700 Subject: [PATCH 27/45] docs(cognito): fix up code samples so that they compile (#11034) Added a default fixture with the imports needed to compile snippets. Fixed up a few parameter names, required parameters, references that were incorrect. Verified that these snippets (with fixture) compile by running `compile-samples` in the `scripts` directory. Closes #9185 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cognito/README.md | 118 +++++++++--------- .../aws-cognito/rosetta/default.ts-fixture | 15 +++ 2 files changed, 76 insertions(+), 57 deletions(-) create mode 100644 packages/@aws-cdk/aws-cognito/rosetta/default.ts-fixture diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 749ca525f048c..70fe341c59c8b 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -53,7 +53,7 @@ Using the CDK, a new user pool can be created as part of the stack using the con the `userPoolName` to give your own identifier to the user pool. If not, CloudFormation will generate a name. ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { userPoolName: 'myawesomeapp-userpool', }); ``` @@ -68,13 +68,13 @@ When a user signs up, email and SMS messages are used to verify their account an snippet configures a user pool with properties relevant to these verification messages - ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... selfSignUpEnabled: true, userVerification: { emailSubject: 'Verify your email for our awesome app!', emailBody: 'Hello {username}, Thanks for signing up to our awesome app! Your verification code is {####}', - emailStyle: VerificationEmailStyle.CODE, + emailStyle: cognito.VerificationEmailStyle.CODE, smsMessage: 'Hello {username}, Thanks for signing up to our awesome app! Your verification code is {####}', } }); @@ -88,7 +88,7 @@ invitation to join the user pool. The following code snippet configures a user p invitation messages - ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... userInvitation: { emailSubject: 'Invite to join our awesome app!', @@ -116,7 +116,7 @@ available: The following code sets up a user pool so that the user can sign in with either their username or their email address - ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... // ... signInAliases: { @@ -144,7 +144,7 @@ overridden by specifying the `autoVerify` property. The following code snippet sets up only email as a sign in alias, but both email and phone number to be auto-verified. ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... // ... signInAliases: { username: true, email: true }, @@ -169,7 +169,7 @@ The following code configures a user pool with two standard attributes (name and four custom attributes. ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... standardAttributes: { fullname: { @@ -182,10 +182,10 @@ new UserPool(this, 'myuserpool', { }, }, customAttributes: { - 'myappid': new StringAttribute({ minLen: 5, maxLen: 15, mutable: false }), - 'callingcode': new NumberAttribute({ min: 1, max: 3, mutable: true }), - 'isEmployee': new BooleanAttribute({ mutable: true }), - 'joinedOn': new DateTimeAttribute(), + 'myappid': new cognito.StringAttribute({ minLen: 5, maxLen: 15, mutable: false }), + 'callingcode': new cognito.NumberAttribute({ min: 1, max: 3, mutable: true }), + 'isEmployee': new cognito.BooleanAttribute({ mutable: true }), + 'joinedOn': new cognito.DateTimeAttribute(), }, }); ``` @@ -211,11 +211,11 @@ Additionally, the property `enableSmsRole` can be used to override the CDK's def suppress automatic role creation. ```ts -import { Role } from '@aws-cdk/aws-iam'; - -const poolSmsRole = new Role(this, 'userpoolsmsrole', { /* ... */ }); +const poolSmsRole = new iam.Role(this, 'userpoolsmsrole', { + assumedBy: new iam.ServicePrincipal('foo'), +}); -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... smsRole: poolSmsRole, smsRoleExternalId: 'c87467be-4f34-11ea-b77f-2e728ce88125' @@ -241,9 +241,9 @@ configure an MFA token and use it for sign in. It also allows for the users to u (TOTP)](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa-totp.html). ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... - mfa: Mfa.REQUIRED, + mfa: cognito.Mfa.REQUIRED, mfaSecondFactor: { sms: true, otp: true, @@ -261,7 +261,7 @@ The validity of this password dictates how long to give the user to use this pas The following code snippet configures these properties - ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... passwordPolicy: { minLength: 12, @@ -282,9 +282,9 @@ User pools can be configured on which method a user should use when recovering t can either be email and/or SMS. Read more at [Recovering User Accounts](https://docs.aws.amazon.com/cognito/latest/developerguide/how-to-recover-a-user-account.html) ```ts -new UserPool(this, 'UserPool', { - ..., - accountRecovery: AccountRecovery.EMAIL_ONLY, +new cognito.UserPool(this, 'UserPool', { + // ... + accountRecovery: cognito.AccountRecovery.EMAIL_ONLY, }) ``` @@ -295,7 +295,7 @@ emails, password resets, etc. The address from which these emails are sent can b Read more about [email settings here](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-email.html). ```ts -new UserPool(this, 'myuserpool', { +new cognito.UserPool(this, 'myuserpool', { // ... emailSettings: { from: 'noreply@myawesomeapp.com', @@ -320,22 +320,24 @@ Lambda triggers can either be specified as part of the `UserPool` initialization on the construct, as so - ```ts -import * as lambda from '@aws-cdk/aws-lambda'; - const authChallengeFn = new lambda.Function(this, 'authChallengeFn', { - // ... + runtime: lambda.Runtime.NODEJS_10_X, + handler: 'index.handler', + code: lambda.Code.fromInline('auth challenge'), }); -const userpool = new UserPool(this, 'myuserpool', { +const userpool = new cognito.UserPool(this, 'myuserpool', { // ... - triggers: { + lambdaTriggers: { createAuthChallenge: authChallengeFn, // ... } }); -userpool.addTrigger(UserPoolOperation.USER_MIGRATION, new lambda.Function(this, 'userMigrationFn', { - // ... +userpool.addTrigger(cognito.UserPoolOperation.USER_MIGRATION, new lambda.Function(this, 'userMigrationFn', { + runtime: lambda.Runtime.NODEJS_10_X, + handler: 'index.handler', + code: lambda.Code.fromInline('user migration'), })); ``` @@ -355,11 +357,9 @@ User pools can be imported either using their id via the `UserPool.fromUserPoolI `UserPool.fromUserPoolArn()` API. ```ts -const stack = new Stack(app, 'my-stack'); - -const awesomePool = UserPool.fromUserPoolId(stack, 'awesome-user-pool', 'us-east-1_oiuR12Abd'); +const awesomePool = cognito.UserPool.fromUserPoolId(this, 'awesome-user-pool', 'us-east-1_oiuR12Abd'); -const otherAwesomePool = UserPool.fromUserPoolArn(stack, 'other-awesome-user-pool', +const otherAwesomePool = cognito.UserPool.fromUserPoolArn(this, 'other-awesome-user-pool', 'arn:aws:cognito-idp:eu-west-1:123456789012:userpool/us-east-1_mtRyYQ14D'); ``` @@ -381,9 +381,9 @@ provider needs to be configured with a set of credentials that the Cognito backe third-party identity provider. ```ts -const userpool = new UserPool(stack, 'Pool'); +const userpool = new cognito.UserPool(this, 'Pool'); -const provider = new UserPoolIdentityProviderAmazon(stack, 'Amazon', { +const provider = new cognito.UserPoolIdentityProviderAmazon(this, 'Amazon', { clientId: 'amzn-client-id', clientSecret: 'amzn-client-secret', userPool: userpool, @@ -398,14 +398,18 @@ The following code shows how different attributes provided by 'Login With Amazon user pool attributes. ```ts -new UserPoolIdentityProviderAmazon(stack, 'Amazon', { - // ... +const userpool = new cognito.UserPool(this, 'Pool'); + +new cognito.UserPoolIdentityProviderAmazon(this, 'Amazon', { + clientId: 'amzn-client-id', + clientSecret: 'amzn-client-secret', + userPool: userpool, attributeMapping: { - email: ProviderAttribute.AMAZON_EMAIL, - website: ProviderAttribute.other('url'), // use other() when an attribute is not pre-defined in the CDK + email: cognito.ProviderAttribute.AMAZON_EMAIL, + website: cognito.ProviderAttribute.other('url'), // use other() when an attribute is not pre-defined in the CDK custom: { // custom user pool attributes go here - uniqueId: ProviderAttribute.AMAZON_USER_ID, + uniqueId: cognito.ProviderAttribute.AMAZON_USER_ID, } } }); @@ -421,7 +425,7 @@ Client](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-sett The following code creates an app client and retrieves the client id - ```ts -const pool = new UserPool(this, 'pool'); +const pool = new cognito.UserPool(this, 'pool'); const client = pool.addClient('customer-app-client'); const clientId = client.userPoolClientId; ``` @@ -430,8 +434,8 @@ Existing app clients can be imported into the CDK app using the `UserPoolClient. and imported user pools, clients can also be created via the `UserPoolClient` constructor, as so - ```ts -const importedPool = UserPool.fromUserPoolId(this, 'imported-pool', 'us-east-1_oiuR12Abd'); -new UserPoolClient(this, 'customer-app-client', { +const importedPool = cognito.UserPool.fromUserPoolId(this, 'imported-pool', 'us-east-1_oiuR12Abd'); +new cognito.UserPoolClient(this, 'customer-app-client', { userPool: importedPool }); ``` @@ -444,7 +448,7 @@ Flow](https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-u The following code configures a client to use both SRP and username-and-password authentication - ```ts -const pool = new UserPool(this, 'pool'); +const pool = new cognito.UserPool(this, 'pool'); pool.addClient('app-client', { authFlows: { userPassword: true, @@ -468,13 +472,13 @@ page as a callback (or redirect) URL. It also configures the access token scope be found in the [OAuth 2.0 RFC](https://tools.ietf.org/html/rfc6749). ```ts -const pool = new UserPool(this, 'Pool'); +const pool = new cognito.UserPool(this, 'Pool'); pool.addClient('app-client', { oAuth: { flows: { authorizationCodeGrant: true, }, - scopes: [ OAuthScope.OPENID ], + scopes: [ cognito.OAuthScope.OPENID ], callbackUrls: [ 'https://my-app-domain.com/welcome' ], logoutUrls: [ 'https://my-app-domain.com/signin' ], } @@ -489,7 +493,7 @@ is not set, which means different things for existing and new stacks. See the for the full details on the behavior of this flag. ```ts -const pool = new UserPool(this, 'Pool'); +const pool = new cognito.UserPool(this, 'Pool'); pool.addClient('app-client', { preventUserExistenceErrors: true, }); @@ -501,12 +505,12 @@ that allows users to register and sign in directly with the Cognito user pool, i Alternatively, the list of supported identity providers for a client can be explicitly specified - ```ts -const pool = new UserPool(this, 'Pool'); +const pool = new cognito.UserPool(this, 'Pool'); pool.addClient('app-client', { // ... supportedIdentityProviders: [ - UserPoolClientIdentityProvider.AMAZON, - UserPoolClientIdentityProvider.COGNITO, + cognito.UserPoolClientIdentityProvider.AMAZON, + cognito.UserPoolClientIdentityProvider.COGNITO, ] }); ``` @@ -521,7 +525,7 @@ owned, and whose certificate is registered in AWS Certificate Manager. The following code sets up a user pool domain in Amazon Cognito hosted domain with the prefix 'my-awesome-app', and another domain with the custom domain 'user.myapp.com' - ```ts -const pool = new UserPool(this, 'Pool'); +const pool = new cognito.UserPool(this, 'Pool'); pool.addDomain('CognitoDomain', { cognitoDomain: { @@ -529,7 +533,9 @@ pool.addDomain('CognitoDomain', { }, }); -const domainCert = new acm.Certificate.fromCertificateArn(this, 'domainCert', certificateArn); +const certificateArn = 'arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d'; + +const domainCert = certificatemanager.Certificate.fromCertificateArn(this, 'domainCert', certificateArn); pool.addDomain('CustomDomain', { customDomain: { domainName: 'user.myapp.com', @@ -547,7 +553,7 @@ hosted UI configured with Cognito. Learn more at [Hosted UI with the Amazon Cogn Console](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html#cognito-user-pools-create-an-app-integration). ```ts -const userpool = new UserPool(this, 'UserPool', { +const userpool = new cognito.UserPool(this, 'UserPool', { // ... }); const client = userpool.addClient('Client', { @@ -566,14 +572,12 @@ const domain = userpool.addDomain('Domain', { // ... }); const signInUrl = domain.signInUrl(client, { - redirectUrl: 'https://myapp.com/home', // must be a URL configured under 'callbackUrls' with the client + redirectUri: 'https://myapp.com/home', // must be a URL configured under 'callbackUrls' with the client }) ``` Existing domains can be imported into CDK apps using `UserPoolDomain.fromDomainName()` API ```ts -const stack = new Stack(app, 'my-stack'); - -const myUserPoolDomain = UserPoolDomain.fromDomainName(stack, 'my-user-pool-domain', 'domain-name'); +const myUserPoolDomain = cognito.UserPoolDomain.fromDomainName(this, 'my-user-pool-domain', 'domain-name'); ``` \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-cognito/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e0b5bfc8747a3 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/rosetta/default.ts-fixture @@ -0,0 +1,15 @@ +// Fixture with packages imported, but nothing else +import { Duration, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as certificatemanager from '@aws-cdk/aws-certificatemanager'; +import * as cognito from '@aws-cdk/aws-cognito'; +import * as iam from '@aws-cdk/aws-iam'; +import * as lambda from '@aws-cdk/aws-lambda'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + + /// here + } +} From 1bbf1eb1a2ea2ef69040dc19273484b6a492b738 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2020 21:54:08 +0000 Subject: [PATCH 28/45] chore(deps-dev): bump sinon from 9.1.0 to 9.2.0 (#11047) Bumps [sinon](https://github.com/sinonjs/sinon) from 9.1.0 to 9.2.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v9.1.0...v9.2.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/assets/package.json | 2 +- packages/@aws-cdk/aws-dynamodb/package.json | 2 +- packages/@aws-cdk/aws-eks/package.json | 2 +- packages/@aws-cdk/aws-iam/package.json | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- .../@aws-cdk/custom-resources/package.json | 2 +- packages/aws-cdk/package.json | 2 +- yarn.lock | 22 +++++++++---------- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 3dd816721ca7f..98834fd677472 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -76,7 +76,7 @@ "cdk-integ-tools": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "ts-mock-imports": "^1.3.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 310861a75ab17..c75f44ccceb06 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -81,7 +81,7 @@ "cfn2ts": "0.0.0", "jest": "^26.6.0", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "ts-jest": "^26.4.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index bcef51bd48e37..6ba65551376f0 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -80,7 +80,7 @@ "cfn2ts": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "cdk8s-plus": "^0.33.0", "cdk8s": "^0.33.0" }, diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index efa705aaf669c..a345bf8ffa436 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -78,7 +78,7 @@ "cfn2ts": "0.0.0", "jest": "^26.6.0", "pkglint": "0.0.0", - "sinon": "^9.1.0" + "sinon": "^9.2.0" }, "dependencies": { "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index eb462e3370e85..6fc9d0233f556 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -81,7 +81,7 @@ "nock": "^13.0.4", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.1.0" + "sinon": "^9.2.0" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index bc083b052f98b..b6bde780d18b1 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -178,7 +178,7 @@ "lodash": "^4.17.20", "nodeunit-shim": "0.0.0", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "ts-mock-imports": "^1.3.0" }, "dependencies": { diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index cdbc39e15109c..9367f6f94c0be 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -87,7 +87,7 @@ "fs-extra": "^9.0.1", "nock": "^13.0.4", "pkglint": "0.0.0", - "sinon": "^9.1.0" + "sinon": "^9.2.0" }, "dependencies": { "@aws-cdk/aws-cloudformation": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index d5ac48aaf1ea1..35cec0039d794 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -58,7 +58,7 @@ "jest": "^26.6.0", "mockery": "^2.1.0", "pkglint": "0.0.0", - "sinon": "^9.1.0", + "sinon": "^9.2.0", "ts-jest": "^26.4.1", "ts-mock-imports": "^1.3.0", "@octokit/rest": "^18.0.6", diff --git a/yarn.lock b/yarn.lock index 273da93fc0afd..2df5b10c5fda0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2931,7 +2931,7 @@ chrome-trace-event "^1.0.2" nullthrows "^1.1.1" -"@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.7.2": +"@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": version "1.8.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw== @@ -2953,10 +2953,10 @@ "@sinonjs/commons" "^1" "@sinonjs/samsam" "^5.0.2" -"@sinonjs/samsam@^5.0.2", "@sinonjs/samsam@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-5.1.0.tgz#3afe719232b541bb6cf3411a4c399a188de21ec0" - integrity sha512-42nyaQOVunX5Pm6GRJobmzbS7iLI+fhERITnETXzzwDZh+TtDr/Au3yAvXVjFmZ4wEUaE4Y3NFZfKv0bV0cbtg== +"@sinonjs/samsam@^5.0.2", "@sinonjs/samsam@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-5.2.0.tgz#fcff83ab86f83b5498f4a967869c079408d9b5eb" + integrity sha512-CaIcyX5cDsjcW/ab7HposFWzV1kC++4HNsfnEdFJa7cP1QIuILAKV+BgfeqRXhcnSAc76r/Rh/O5C+300BwUIw== dependencies: "@sinonjs/commons" "^1.6.0" lodash.get "^4.4.2" @@ -11988,15 +11988,15 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sinon@^9.0.1, sinon@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.1.0.tgz#4afc90707c8e360fe051398eed2d3b197980ffc3" - integrity sha512-9zQShgaeylYH6qtsnNXlTvv0FGTTckuDfHBi+qhgj5PvW2r2WslHZpgc3uy3e/ZAoPkqaOASPi+juU6EdYRYxA== +sinon@^9.0.1, sinon@^9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.2.0.tgz#1d333967e30023609f7347351ebc0dc964c0f3c9" + integrity sha512-eSNXz1XMcGEMHw08NJXSyTHIu6qTCOiN8x9ODACmZpNQpr0aXTBXBnI4xTzQzR+TEpOmLiKowGf9flCuKIzsbw== dependencies: - "@sinonjs/commons" "^1.7.2" + "@sinonjs/commons" "^1.8.1" "@sinonjs/fake-timers" "^6.0.1" "@sinonjs/formatio" "^5.0.1" - "@sinonjs/samsam" "^5.1.0" + "@sinonjs/samsam" "^5.2.0" diff "^4.0.2" nise "^4.0.4" supports-color "^7.1.0" From 24e98cb3f6e91da501db763323655e15611cdca6 Mon Sep 17 00:00:00 2001 From: Robert Djurasaj Date: Thu, 22 Oct 2020 17:06:20 -0600 Subject: [PATCH 29/45] chore(rds): Minor fix for DatabaseInstance and DatabaseCluster examples in RDS docs (#11044) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-rds/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-rds/README.md b/packages/@aws-cdk/aws-rds/README.md index 18d61eb54cc00..5ca811eabe8c7 100644 --- a/packages/@aws-cdk/aws-rds/README.md +++ b/packages/@aws-cdk/aws-rds/README.md @@ -23,7 +23,7 @@ your instances will be launched privately or publicly: ```ts const cluster = new rds.DatabaseCluster(this, 'Database', { engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_2_08_1 }), - masterUser: rds.Credentials.fromUsername('clusteradmin'), // Optional - will default to admin + credentials: rds.Credentials.fromUsername('clusteradmin'), // Optional - will default to admin instanceProps: { // optional , defaults to t3.medium instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), @@ -70,7 +70,7 @@ const instance = new rds.DatabaseInstance(this, 'Instance', { engine: rds.DatabaseInstanceEngine.oracleSe2({ version: rds.OracleEngineVersion.VER_19_0_0_0_2020_04_R1 }), // optional, defaults to m5.large instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.SMALL), - masterUsername: rds.Credentials.fromUsername('syscdk'), // Optional - will default to admin + credentials: rds.Credentials.fromUsername('syscdk'), // Optional - will default to admin vpc, vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE From fd8bce3d1409fd66877ca7530f8e74d9d78e0b8a Mon Sep 17 00:00:00 2001 From: Jorge Barreto Date: Thu, 22 Oct 2020 20:43:53 -0400 Subject: [PATCH 30/45] feat(aws-codebuild): add COMMIT_MESSAGE support for webhook FilterGroup (#11011) closes #9033 A small amount of housekeeping was done by collecting the different string constants for webhook filter types into a single enum ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-codebuild/README.md | 5 +- packages/@aws-cdk/aws-codebuild/lib/source.ts | 70 +++++++++++++-- .../aws-codebuild/test/test.codebuild.ts | 87 +++++++++++++++++++ 3 files changed, 154 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk/aws-codebuild/README.md b/packages/@aws-cdk/aws-codebuild/README.md index 208912c6657e9..c51b263279e34 100644 --- a/packages/@aws-cdk/aws-codebuild/README.md +++ b/packages/@aws-cdk/aws-codebuild/README.md @@ -91,7 +91,10 @@ const gitHubSource = codebuild.Source.gitHub({ repo: 'aws-cdk', webhook: true, // optional, default: true if `webhookFilters` were provided, false otherwise webhookFilters: [ - codebuild.FilterGroup.inEventOf(codebuild.EventAction.PUSH).andBranchIs('master'), + codebuild.FilterGroup + .inEventOf(codebuild.EventAction.PUSH) + .andBranchIs('master') + .andCommitMessageIs('the commit message'), ], // optional, by default all pushes and Pull Requests will trigger a build }); ``` diff --git a/packages/@aws-cdk/aws-codebuild/lib/source.ts b/packages/@aws-cdk/aws-codebuild/lib/source.ts index f83ab66cfb315..f0a61373c0fbd 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/source.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/source.ts @@ -193,7 +193,13 @@ export enum EventAction { PULL_REQUEST_REOPENED = 'PULL_REQUEST_REOPENED', } -const FILE_PATH_WEBHOOK_COND = 'FILE_PATH'; +enum WebhookFilterTypes { + FILE_PATH = 'FILE_PATH', + COMMIT_MESSAGE = 'COMMIT_MESSAGE', + HEAD_REF = 'HEAD_REF', + ACTOR_ACCOUNT_ID = 'ACTOR_ACCOUNT_ID', + BASE_REF = 'BASE_REF', +} /** * An object that represents a group of filter conditions for a webhook. @@ -245,6 +251,26 @@ export class FilterGroup { return this.addHeadBranchFilter(branchName, false); } + /** + * Create a new FilterGroup with an added condition: + * the event must affect a head commit with the given message. + * + * @param commitMessage the commit message (can be a regular expression) + */ + public andCommitMessageIs(commitMessage: string): FilterGroup { + return this.addCommitMessageFilter(commitMessage, true); + } + + /** + * Create a new FilterGroup with an added condition: + * the event must not affect a head commit with the given message. + * + * @param commitMessage the commit message (can be a regular expression) + */ + public andCommitMessageIsNot(commitMessage: string): FilterGroup { + return this.addCommitMessageFilter(commitMessage, false); + } + /** * Create a new FilterGroup with an added condition: * the event must affect the given tag. @@ -394,6 +420,10 @@ export class FilterGroup { return [eventFilter].concat(this.filters); } + private addCommitMessageFilter(commitMessage: string, include: boolean): FilterGroup { + return this.addFilter(WebhookFilterTypes.COMMIT_MESSAGE, commitMessage, include); + } + private addHeadBranchFilter(branchName: string, include: boolean): FilterGroup { return this.addHeadRefFilter(`refs/heads/${branchName}`, include); } @@ -403,11 +433,11 @@ export class FilterGroup { } private addHeadRefFilter(refName: string, include: boolean) { - return this.addFilter('HEAD_REF', refName, include); + return this.addFilter(WebhookFilterTypes.HEAD_REF, refName, include); } private addActorAccountId(accountId: string, include: boolean) { - return this.addFilter('ACTOR_ACCOUNT_ID', accountId, include); + return this.addFilter(WebhookFilterTypes.ACTOR_ACCOUNT_ID, accountId, include); } private addBaseBranchFilter(branchName: string, include: boolean): FilterGroup { @@ -418,14 +448,14 @@ export class FilterGroup { if (this.actions.has(EventAction.PUSH)) { throw new Error('A base reference condition cannot be added if a Group contains a PUSH event action'); } - return this.addFilter('BASE_REF', refName, include); + return this.addFilter(WebhookFilterTypes.BASE_REF, refName, include); } private addFilePathFilter(pattern: string, include: boolean): FilterGroup { - return this.addFilter(FILE_PATH_WEBHOOK_COND, pattern, include); + return this.addFilter(WebhookFilterTypes.FILE_PATH, pattern, include); } - private addFilter(type: string, pattern: string, include: boolean) { + private addFilter(type: WebhookFilterTypes, pattern: string, include: boolean) { return new FilterGroup(this.actions, this.filters.concat([{ type, pattern, @@ -657,6 +687,14 @@ class GitHubEnterpriseSource extends ThirdPartyGitSource { } public bind(_scope: CoreConstruct, _project: IProject): SourceConfig { + if (this.hasCommitMessageFilterAndPrEvent()) { + throw new Error('COMMIT_MESSAGE filters cannot be used with GitHub Enterprise Server pull request events'); + } + + if (this.hasFilePathFilterAndPrEvent()) { + throw new Error('FILE_PATH filters cannot be used with GitHub Enterprise Server pull request events'); + } + const superConfig = super.bind(_scope, _project); return { sourceProperty: { @@ -668,6 +706,24 @@ class GitHubEnterpriseSource extends ThirdPartyGitSource { buildTriggers: superConfig.buildTriggers, }; } + + private hasCommitMessageFilterAndPrEvent() { + return this.webhookFilters.some(fg => ( + fg._filters.some(fp => fp.type === WebhookFilterTypes.COMMIT_MESSAGE) && + this.hasPrEvent(fg._actions))); + } + private hasFilePathFilterAndPrEvent() { + return this.webhookFilters.some(fg => ( + fg._filters.some(fp => fp.type === WebhookFilterTypes.FILE_PATH) && + this.hasPrEvent(fg._actions))); + } + private hasPrEvent(actions: EventAction[]) { + return actions.includes( + EventAction.PULL_REQUEST_CREATED || + EventAction.PULL_REQUEST_MERGED || + EventAction.PULL_REQUEST_REOPENED || + EventAction.PULL_REQUEST_UPDATED); + } } /** @@ -731,7 +787,7 @@ class BitBucketSource extends ThirdPartyGitSource { private anyWebhookFilterContainsFilePathConditions() { return this.webhookFilters.findIndex(fg => { - return fg._filters.findIndex(f => f.type === FILE_PATH_WEBHOOK_COND) !== -1; + return fg._filters.findIndex(f => f.type === WebhookFilterTypes.FILE_PATH) !== -1; }) !== -1; } } diff --git a/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts b/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts index 893cb2836245c..ea1c8eb87b021 100644 --- a/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts +++ b/packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts @@ -1708,5 +1708,92 @@ export = { test.done(); }, + + 'GitHub Enterprise Server sources do not support FILE_PATH filters on PR events'(test: Test) { + const stack = new cdk.Stack(); + const pullFilterGroup = codebuild.FilterGroup.inEventOf( + codebuild.EventAction.PULL_REQUEST_CREATED, + codebuild.EventAction.PULL_REQUEST_MERGED, + codebuild.EventAction.PULL_REQUEST_REOPENED, + codebuild.EventAction.PULL_REQUEST_UPDATED, + ); + + test.throws(() => { + new codebuild.Project(stack, 'MyFilePathProject', { + source: codebuild.Source.gitHubEnterprise({ + httpsCloneUrl: 'https://github.testcompany.com/testowner/testrepo', + webhookFilters: [ + pullFilterGroup.andFilePathIs('ReadMe.md'), + ], + }), + }); + }, /FILE_PATH filters cannot be used with GitHub Enterprise Server pull request events/); + test.done(); + }, + + 'COMMIT_MESSAGE Filter': { + 'GitHub Enterprise Server sources do not support COMMIT_MESSAGE filters on PR events'(test: Test) { + const stack = new cdk.Stack(); + const pullFilterGroup = codebuild.FilterGroup.inEventOf( + codebuild.EventAction.PULL_REQUEST_CREATED, + codebuild.EventAction.PULL_REQUEST_MERGED, + codebuild.EventAction.PULL_REQUEST_REOPENED, + codebuild.EventAction.PULL_REQUEST_UPDATED, + ); + + test.throws(() => { + new codebuild.Project(stack, 'MyProject', { + source: codebuild.Source.gitHubEnterprise({ + httpsCloneUrl: 'https://github.testcompany.com/testowner/testrepo', + webhookFilters: [ + pullFilterGroup.andCommitMessageIs('the commit message'), + ], + }), + }); + }, /COMMIT_MESSAGE filters cannot be used with GitHub Enterprise Server pull request events/); + test.done(); + }, + 'GitHub Enterprise Server sources support COMMIT_MESSAGE filters on PUSH events'(test: Test) { + const stack = new cdk.Stack(); + const pushFilterGroup = codebuild.FilterGroup.inEventOf(codebuild.EventAction.PUSH); + + test.doesNotThrow(() => { + new codebuild.Project(stack, 'MyProject', { + source: codebuild.Source.gitHubEnterprise({ + httpsCloneUrl: 'https://github.testcompany.com/testowner/testrepo', + webhookFilters: [ + pushFilterGroup.andCommitMessageIs('the commit message'), + ], + }), + }); + }); + test.done(); + }, + 'BitBucket and GitHub sources support a COMMIT_MESSAGE filter'(test: Test) { + const stack = new cdk.Stack(); + const filterGroup = codebuild + .FilterGroup + .inEventOf(codebuild.EventAction.PUSH, codebuild.EventAction.PULL_REQUEST_CREATED) + .andCommitMessageIs('the commit message'); + + test.doesNotThrow(() => { + new codebuild.Project(stack, 'BitBucket Project', { + source: codebuild.Source.bitBucket({ + owner: 'owner', + repo: 'repo', + webhookFilters: [filterGroup], + }), + }); + new codebuild.Project(stack, 'GitHub Project', { + source: codebuild.Source.gitHub({ + owner: 'owner', + repo: 'repo', + webhookFilters: [filterGroup], + }), + }); + }); + test.done(); + }, + }, }, }; From bb4d97b36af19c8961020ddf7bb90056d15902d9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2020 05:38:45 +0000 Subject: [PATCH 31/45] chore(deps-dev): bump @types/node from 10.17.40 to 10.17.42 (#11053) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.40 to 10.17.42. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/core/package.json | 2 +- packages/@monocdk-experiment/assert/package.json | 2 +- packages/@monocdk-experiment/rewrite-imports/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/aws-cdk/package.json | 2 +- packages/cdk-assets/package.json | 2 +- packages/monocdk/package.json | 2 +- tools/eslint-plugin-cdk/package.json | 2 +- tools/nodeunit-shim/package.json | 2 +- tools/yarn-cling/package.json | 2 +- yarn.lock | 8 ++++---- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index b6bde780d18b1..e6c1041ca5c0f 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -170,7 +170,7 @@ "devDependencies": { "@types/lodash": "^4.14.161", "@types/minimatch": "^3.0.3", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "@types/sinon": "^9.0.7", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 5a062553b94e3..ad5960bac6c75 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "jest": "^26.6.0", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 70062d4c99c5b..b46d38a7c4072 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/glob": "^7.1.3", "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index e79eacd364b00..47b286dff08ff 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -255,7 +255,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "fs-extra": "^9.0.1", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 35cec0039d794..d4025d89f76e1 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -45,7 +45,7 @@ "@types/jest": "^26.0.15", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.4", "@types/sinon": "^9.0.7", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 40e1a0e4a1f60..812ee2fab8b28 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -35,7 +35,7 @@ "@types/jest": "^26.0.15", "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "@types/yargs": "^15.0.7", "cdk-build-tools": "0.0.0", "jest": "^26.6.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index d9877a713d5da..2c257cdf70c9f 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -254,7 +254,7 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", "fs-extra": "^9.0.1", diff --git a/tools/eslint-plugin-cdk/package.json b/tools/eslint-plugin-cdk/package.json index e7c12b57ab571..b5fc8f9fcd826 100644 --- a/tools/eslint-plugin-cdk/package.json +++ b/tools/eslint-plugin-cdk/package.json @@ -15,7 +15,7 @@ "@types/eslint": "^7.2.3", "@types/fs-extra": "^8.1.1", "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "eslint-plugin-rulesdir": "^0.1.0", "jest": "^26.6.0", "typescript": "~3.9.7" diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index d978a065474aa..d273b04a765bc 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "typescript": "~3.9.7" }, "dependencies": { diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 7d42d40d9fc79..0d38b028055b3 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@types/jest": "^26.0.15", - "@types/node": "^10.17.40", + "@types/node": "^10.17.42", "@types/yarnpkg__lockfile": "^1.1.4", "jest": "^26.6.0", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 2df5b10c5fda0..66f8dd2b039e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3135,10 +3135,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== -"@types/node@^10.17.40": - version "10.17.40" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.40.tgz#8a50e47daff15fd4a89dc56f5221b3729e506be6" - integrity sha512-3hZT2z2/531A5pc8hYhn1gU5Qb1SIRSgMLQ6zuHA5xtt16lWAxUGprtr8lJuc9zNJMXEIIBWfSnzqBP/4mglpA== +"@types/node@^10.17.42": + version "10.17.42" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.42.tgz#90dd71b26fe4f4e2929df6b07e72ef2e9648a173" + integrity sha512-HElxYF7C/MSkuvlaHB2c+82zhXiuO49Cq056Dol8AQuTph7oJtduo2n6J8rFa+YhJyNgQ/Lm20ZaxqD0vxU0+Q== "@types/nodeunit@^0.0.31": version "0.0.31" From d22c31895f9f3d66bdeb9415870f68cb10f0fd4c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2020 07:41:21 +0000 Subject: [PATCH 32/45] chore(deps-dev): bump fast-check from 2.4.0 to 2.6.0 (#11057) Bumps [fast-check](https://github.com/dubzzz/fast-check) from 2.4.0 to 2.6.0. - [Release notes](https://github.com/dubzzz/fast-check/releases) - [Changelog](https://github.com/dubzzz/fast-check/blob/master/CHANGELOG.md) - [Commits](https://github.com/dubzzz/fast-check/compare/v2.4.0...v2.6.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/@aws-cdk/app-delivery/package.json | 2 +- packages/@aws-cdk/aws-applicationautoscaling/package.json | 2 +- packages/@aws-cdk/aws-autoscaling-common/package.json | 2 +- packages/@aws-cdk/cloudformation-diff/package.json | 2 +- packages/@aws-cdk/core/package.json | 2 +- yarn.lock | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index 08df2cbb16a29..35e4711feb1b2 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -63,7 +63,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 19c9121c033f0..719098dbf9960 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -75,7 +75,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index 7d2b43f9fe709..fb7c0381a46f3 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -67,7 +67,7 @@ "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 12bf07e3ad5b3..549b5dbb28c8b 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -33,7 +33,7 @@ "@types/string-width": "^4.0.1", "@types/table": "^5.0.0", "cdk-build-tools": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "jest": "^26.6.0", "pkglint": "0.0.0", "ts-jest": "^26.4.1" diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index e6c1041ca5c0f..97dc2ace65140 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -174,7 +174,7 @@ "@types/sinon": "^9.0.7", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", - "fast-check": "^2.4.0", + "fast-check": "^2.6.0", "lodash": "^4.17.20", "nodeunit-shim": "0.0.0", "pkglint": "0.0.0", diff --git a/yarn.lock b/yarn.lock index 66f8dd2b039e6..5d3f4f3ce5812 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6349,10 +6349,10 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-check@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.4.0.tgz#8142ad724103e378f3afefeeb165c5dd6a9b2949" - integrity sha512-28SiCkMSkCq5x3vOjCkwqsJRL3rUAdAvp9vjslDbCf25Ej1HaZBgRrgW1/a31m2LMlG9lM4jsTc7xy5xuCu8Jg== +fast-check@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.6.0.tgz#b4f69c781325ecdfadf6d23468e5dae2c46bfb46" + integrity sha512-Wpz0mMPGxvOtMBaEguu5Pw35uTVfJzAUqRYQksiHk6vHKBV2YNeKk9BzTuqVCYwUIl+NELyPBY2Mg96sYk2fhw== dependencies: pure-rand "^3.0.0" From 5db865e17169b83a075fbe53474db35b9e804916 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2020 09:17:54 +0000 Subject: [PATCH 33/45] chore(deps): bump proxy-agent from 3.1.1 to 4.0.0 (#11048) Bumps [proxy-agent](https://github.com/TooTallNate/node-proxy-agent) from 3.1.1 to 4.0.0. - [Release notes](https://github.com/TooTallNate/node-proxy-agent/releases) - [Changelog](https://github.com/TooTallNate/node-proxy-agent/blob/master/History.md) - [Commits](https://github.com/TooTallNate/node-proxy-agent/compare/3.1.1...4.0.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- packages/aws-cdk/package.json | 2 +- yarn.lock | 187 +++++++++++++++++++--------------- 2 files changed, 108 insertions(+), 81 deletions(-) diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index d4025d89f76e1..95ae09424001c 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -81,7 +81,7 @@ "json-diff": "^0.5.4", "minimatch": ">=3.0", "promptly": "^3.0.3", - "proxy-agent": "^3.1.1", + "proxy-agent": "^4.0.0", "semver": "^7.3.2", "source-map-support": "^0.5.19", "table": "^6.0.3", diff --git a/yarn.lock b/yarn.lock index 5d3f4f3ce5812..1717aafb3bafa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2967,6 +2967,11 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + "@types/archiver@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/archiver/-/archiver-3.1.1.tgz#10cc1be44af8911e57484342c7b3b32a5f178a1a" @@ -3405,13 +3410,20 @@ add-stream@^1.0.0: resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= -agent-base@4, agent-base@^4.2.0, agent-base@^4.3.0: +agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== dependencies: es6-promisify "^5.0.0" +agent-base@6, agent-base@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.1.tgz#808007e4e5867decb0ab6ab2f928fbdb5a596db4" + integrity sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg== + dependencies: + debug "4" + agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" @@ -3736,10 +3748,10 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= -ast-types@0.x.x: - version "0.14.2" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" - integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA== +ast-types@^0.13.2: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== dependencies: tslib "^2.0.1" @@ -5369,10 +5381,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-uri-to-buffer@1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz#77163ea9c20d8641b4707e8f18abdf9a78f34835" - integrity sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ== +data-uri-to-buffer@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" + integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== data-urls@^1.1.0: version "1.1.0" @@ -5407,7 +5419,7 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -5553,14 +5565,14 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -degenerator@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-1.0.4.tgz#fcf490a37ece266464d9cc431ab98c5819ced095" - integrity sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU= +degenerator@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-2.2.0.tgz#49e98c11fa0293c5b26edfbb52f15729afcdb254" + integrity sha512-aiQcQowF01RxFI4ZLFMpzyotbQonhNpBao6dkI8JPk5a+hmSjR5ErHp2CQySmQe8os3VBqLCIh87nDBgZXvsmg== dependencies: - ast-types "0.x.x" - escodegen "1.x.x" - esprima "3.x.x" + ast-types "^0.13.2" + escodegen "^1.8.1" + esprima "^4.0.0" delay@4.4.0: version "4.4.0" @@ -6016,7 +6028,7 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@1.x.x, escodegen@^1.11.0, escodegen@^1.14.1: +escodegen@^1.11.0, escodegen@^1.14.1, escodegen@^1.8.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== @@ -6161,11 +6173,6 @@ espree@^7.3.0: acorn-jsx "^5.2.0" eslint-visitor-keys "^1.3.0" -esprima@3.x.x: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= - esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -6487,10 +6494,10 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-uri-to-path@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +file-uri-to-path@2: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba" + integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg== filesize@^3.6.0: version "3.6.1" @@ -6745,7 +6752,7 @@ fsevents@^2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== -ftp@~0.3.10: +ftp@^0.3.10: version "0.3.10" resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d" integrity sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0= @@ -6842,17 +6849,17 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" -get-uri@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-2.0.4.tgz#d4937ab819e218d4cb5ae18e4f5962bef169cc6a" - integrity sha512-v7LT/s8kVjs+Tx0ykk1I+H/rbpzkHvuIq87LmeXptcf5sNWm9uQiwjNAt94SJPA1zOlCntmnOlJvVWKmzsxG8Q== +get-uri@3: + version "3.0.2" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-3.0.2.tgz#f0ef1356faabc70e1f9404fa3b66b2ba9bfc725c" + integrity sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg== dependencies: - data-uri-to-buffer "1" - debug "2" - extend "~3.0.2" - file-uri-to-path "1" - ftp "~0.3.10" - readable-stream "2" + "@tootallnate/once" "1" + data-uri-to-buffer "3" + debug "4" + file-uri-to-path "2" + fs-extra "^8.1.0" + ftp "^0.3.10" get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" @@ -7263,6 +7270,15 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" +http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + http-proxy-middleware@^0.19.1: version "0.19.2" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.2.tgz#ee73dcc8348165afefe8de2ff717751d181608ee" @@ -7296,6 +7312,14 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= +https-proxy-agent@5, https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + https-proxy-agent@^2.2.3: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" @@ -7304,14 +7328,6 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" -https-proxy-agent@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.1.tgz#b8c286433e87602311b01c8ea34413d856a4af81" - integrity sha512-+ML2Rbh6DAuee7d07tYGEKOEi2voWPUGan+ExdPbPW6Z3svq+JCqr0v8WmKPOkz1vOVykPCBSuobe7G8GJUtVg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -10267,30 +10283,29 @@ p-waterfall@^1.0.0: dependencies: p-reduce "^1.0.0" -pac-proxy-agent@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-3.0.1.tgz#115b1e58f92576cac2eba718593ca7b0e37de2ad" - integrity sha512-44DUg21G/liUZ48dJpUSjZnFfZro/0K5JTyFYLBcmh9+T6Ooi4/i4efwUiEy0+4oQusCBqWdhv16XohIj1GqnQ== +pac-proxy-agent@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-4.1.0.tgz#66883eeabadc915fc5e95457324cb0f0ac78defb" + integrity sha512-ejNgYm2HTXSIYX9eFlkvqFp8hyJ374uDf0Zq5YUAifiSh1D6fo+iBivQZirGvVv8dCYUsLhmLBRhlAYvBKI5+Q== dependencies: - agent-base "^4.2.0" - debug "^4.1.1" - get-uri "^2.0.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^3.0.0" - pac-resolver "^3.0.0" + "@tootallnate/once" "1" + agent-base "6" + debug "4" + get-uri "3" + http-proxy-agent "^4.0.1" + https-proxy-agent "5" + pac-resolver "^4.1.0" raw-body "^2.2.0" - socks-proxy-agent "^4.0.1" + socks-proxy-agent "5" -pac-resolver@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-3.0.0.tgz#6aea30787db0a891704deb7800a722a7615a6f26" - integrity sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA== +pac-resolver@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-4.1.0.tgz#4b12e7d096b255a3b84e53f6831f32e9c7e5fe95" + integrity sha512-d6lf2IrZJJ7ooVHr7BfwSjRO1yKSJMaiiWYSHcrxSIUtZrCa4KKGwcztdkZ/E9LFleJfjoi1yl+XLR7AX24nbQ== dependencies: - co "^4.6.0" - degenerator "^1.0.4" + degenerator "^2.2.0" ip "^1.1.5" netmask "^1.0.6" - thunkify "^2.1.2" package-hash@^3.0.0: version "3.0.0" @@ -11112,19 +11127,19 @@ protoduck@^5.0.1: dependencies: genfun "^5.0.0" -proxy-agent@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-3.1.1.tgz#7e04e06bf36afa624a1540be247b47c970bd3014" - integrity sha512-WudaR0eTsDx33O3EJE16PjBRZWcX8GqCEeERw1W3hZJgH/F2a46g7jty6UGty6NeJ4CKQy8ds2CJPMiyeqaTvw== +proxy-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-4.0.0.tgz#a92976af3fbc7d846f2e850e2ac5ac6ca3fb74c7" + integrity sha512-8P0Y2SkwvKjiGU1IkEfYuTteioMIDFxPL4/j49zzt5Mz3pG1KO+mIrDG1qH0PQUHTTczjwGcYl+EzfXiFj5vUQ== dependencies: - agent-base "^4.2.0" + agent-base "^6.0.0" debug "4" - http-proxy-agent "^2.1.0" - https-proxy-agent "^3.0.0" + http-proxy-agent "^4.0.0" + https-proxy-agent "^5.0.0" lru-cache "^5.1.1" - pac-proxy-agent "^3.0.1" + pac-proxy-agent "^4.1.0" proxy-from-env "^1.0.0" - socks-proxy-agent "^4.0.1" + socks-proxy-agent "^5.0.0" proxy-from-env@^1.0.0: version "1.1.0" @@ -11398,7 +11413,7 @@ read@1, read@^1.0.4, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -12083,7 +12098,16 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socks-proxy-agent@^4.0.0, socks-proxy-agent@^4.0.1: +socks-proxy-agent@5, socks-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60" + integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA== + dependencies: + agent-base "6" + debug "4" + socks "^2.3.3" + +socks-proxy-agent@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== @@ -12091,6 +12115,14 @@ socks-proxy-agent@^4.0.0, socks-proxy-agent@^4.0.1: agent-base "~4.2.1" socks "~2.3.2" +socks@^2.3.3: + version "2.4.4" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.4.4.tgz#f1a3382e7814ae28c97bb82a38bc1ac24b21cca2" + integrity sha512-7LmHN4IHj1Vpd/k8D872VGCHJ6yIVyeFkfIBExRmGPYQ/kdUkpdg9eKh9oOzYYYKQhuxavayJHTnmBG+EzluUA== + dependencies: + ip "^1.1.5" + smart-buffer "^4.1.0" + socks@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" @@ -12869,11 +12901,6 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -thunkify@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/thunkify/-/thunkify-2.1.2.tgz#faa0e9d230c51acc95ca13a361ac05ca7e04553d" - integrity sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0= - timers-browserify@^2.0.11: version "2.0.11" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" From 8a0b0a94b7c69809af4749ec78ee4fb8453f71a2 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Fri, 23 Oct 2020 14:02:19 +0100 Subject: [PATCH 34/45] chore(apigateway): migrate tests to jest (#11060) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-apigateway/.gitignore | 1 + packages/@aws-cdk/aws-apigateway/.npmignore | 1 + .../@aws-cdk/aws-apigateway/jest.config.js | 10 + packages/@aws-cdk/aws-apigateway/package.json | 5 +- ...{test.access-log.ts => access-log.test.ts} | 38 +- ...i-definition.ts => api-definition.test.ts} | 97 ++-- .../test/{test.api-key.ts => api-key.test.ts} | 113 ++-- ...{test.authorizer.ts => authorizer.test.ts} | 15 +- .../test/authorizers/identity-source.test.ts | 27 + .../{test.lambda.ts => lambda.test.ts} | 122 ++--- .../test/authorizers/test.identity-source.ts | 33 -- .../test/{test.cors.ts => cors.test.ts} | 197 +++---- ...{test.deployment.ts => deployment.test.ts} | 85 ++- .../test/{test.domains.ts => domains.test.ts} | 198 ++++--- .../test/{test.http.ts => http.test.ts} | 27 +- ...est.integration.ts => integration.test.ts} | 83 ++- .../lambda.test.ts} | 103 ++-- ...{test.lambda-api.ts => lambda-api.test.ts} | 147 +++-- .../test/{test.method.ts => method.test.ts} | 320 +++++------ .../test/{test.model.ts => model.test.ts} | 27 +- ...tvalidator.ts => requestvalidator.test.ts} | 27 +- .../{test.resource.ts => resource.test.ts} | 179 +++--- .../test/{test.restapi.ts => restapi.test.ts} | 509 ++++++++---------- .../test/{test.stage.ts => stage.test.ts} | 135 ++--- .../@aws-cdk/aws-apigateway/test/test.util.ts | 137 ----- ...{test.usage-plan.ts => usage-plan.test.ts} | 83 ++- .../@aws-cdk/aws-apigateway/test/util.test.ts | 125 +++++ .../{test.vpc-link.ts => vpc-link.test.ts} | 42 +- 28 files changed, 1305 insertions(+), 1581 deletions(-) create mode 100644 packages/@aws-cdk/aws-apigateway/jest.config.js rename packages/@aws-cdk/aws-apigateway/test/{test.access-log.ts => access-log.test.ts} (73%) rename packages/@aws-cdk/aws-apigateway/test/{test.api-definition.ts => api-definition.test.ts} (52%) rename packages/@aws-cdk/aws-apigateway/test/{test.api-key.ts => api-key.test.ts} (78%) rename packages/@aws-cdk/aws-apigateway/test/{test.authorizer.ts => authorizer.test.ts} (52%) create mode 100644 packages/@aws-cdk/aws-apigateway/test/authorizers/identity-source.test.ts rename packages/@aws-cdk/aws-apigateway/test/authorizers/{test.lambda.ts => lambda.test.ts} (78%) delete mode 100644 packages/@aws-cdk/aws-apigateway/test/authorizers/test.identity-source.ts rename packages/@aws-cdk/aws-apigateway/test/{test.cors.ts => cors.test.ts} (83%) rename packages/@aws-cdk/aws-apigateway/test/{test.deployment.ts => deployment.test.ts} (74%) rename packages/@aws-cdk/aws-apigateway/test/{test.domains.ts => domains.test.ts} (75%) rename packages/@aws-cdk/aws-apigateway/test/{test.http.ts => http.test.ts} (71%) rename packages/@aws-cdk/aws-apigateway/test/{test.integration.ts => integration.test.ts} (71%) rename packages/@aws-cdk/aws-apigateway/test/{test.lambda.ts => integrations/lambda.test.ts} (79%) rename packages/@aws-cdk/aws-apigateway/test/{test.lambda-api.ts => lambda-api.test.ts} (65%) rename packages/@aws-cdk/aws-apigateway/test/{test.method.ts => method.test.ts} (76%) rename packages/@aws-cdk/aws-apigateway/test/{test.model.ts => model.test.ts} (83%) rename packages/@aws-cdk/aws-apigateway/test/{test.requestvalidator.ts => requestvalidator.test.ts} (78%) rename packages/@aws-cdk/aws-apigateway/test/{test.resource.ts => resource.test.ts} (66%) rename packages/@aws-cdk/aws-apigateway/test/{test.restapi.ts => restapi.test.ts} (70%) rename packages/@aws-cdk/aws-apigateway/test/{test.stage.ts => stage.test.ts} (77%) delete mode 100644 packages/@aws-cdk/aws-apigateway/test/test.util.ts rename packages/@aws-cdk/aws-apigateway/test/{test.usage-plan.ts => usage-plan.test.ts} (76%) create mode 100644 packages/@aws-cdk/aws-apigateway/test/util.test.ts rename packages/@aws-cdk/aws-apigateway/test/{test.vpc-link.ts => vpc-link.test.ts} (69%) diff --git a/packages/@aws-cdk/aws-apigateway/.gitignore b/packages/@aws-cdk/aws-apigateway/.gitignore index 018c65919d67c..d8a8561d50885 100644 --- a/packages/@aws-cdk/aws-apigateway/.gitignore +++ b/packages/@aws-cdk/aws-apigateway/.gitignore @@ -14,5 +14,6 @@ nyc.config.js .LAST_PACKAGE *.snk !.eslintrc.js +!jest.config.js junit.xml \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/.npmignore b/packages/@aws-cdk/aws-apigateway/.npmignore index a94c531529866..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-apigateway/.npmignore +++ b/packages/@aws-cdk/aws-apigateway/.npmignore @@ -19,6 +19,7 @@ dist tsconfig.json .eslintrc.js +jest.config.js # exclude cdk artifacts **/cdk.out diff --git a/packages/@aws-cdk/aws-apigateway/jest.config.js b/packages/@aws-cdk/aws-apigateway/jest.config.js new file mode 100644 index 0000000000000..82c5d0bb93666 --- /dev/null +++ b/packages/@aws-cdk/aws-apigateway/jest.config.js @@ -0,0 +1,10 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = { + ...baseConfig, + coverageThreshold: { + global: { + branches: 80, + statements: 60, + }, + }, +}; diff --git a/packages/@aws-cdk/aws-apigateway/package.json b/packages/@aws-cdk/aws-apigateway/package.json index 5125418beaf8d..5593b569e7d15 100644 --- a/packages/@aws-cdk/aws-apigateway/package.json +++ b/packages/@aws-cdk/aws-apigateway/package.json @@ -56,7 +56,8 @@ "cloudformation": "AWS::ApiGateway", "env": { "AWSLINT_BASE_CONSTRUCT": true - } + }, + "jest": true }, "keywords": [ "aws", @@ -72,11 +73,9 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "nodeunit": "^0.11.3", "pkglint": "0.0.0" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-apigateway/test/test.access-log.ts b/packages/@aws-cdk/aws-apigateway/test/access-log.test.ts similarity index 73% rename from packages/@aws-cdk/aws-apigateway/test/test.access-log.ts rename to packages/@aws-cdk/aws-apigateway/test/access-log.test.ts index 524e3cd1e13af..e7993ba7c287e 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.access-log.ts +++ b/packages/@aws-cdk/aws-apigateway/test/access-log.test.ts @@ -1,15 +1,13 @@ -import { Test } from 'nodeunit'; +import '@aws-cdk/assert/jest'; import * as apigateway from '../lib'; -export = { - 'if jsonWithStandardFields method called with no parameter'(test: Test) { +describe('access log', () => { + test('if jsonWithStandardFields method called with no parameter', () => { const testFormat = apigateway.AccessLogFormat.jsonWithStandardFields(); - test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","user":"$context.identity.user","caller":"$context.identity.caller","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength"}'); + expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","user":"$context.identity.user","caller":"$context.identity.caller","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength"}'); + }); - test.done(); - }, - - 'if jsonWithStandardFields method called with all parameters false'(test: Test) { + test('if jsonWithStandardFields method called with all parameters false', () => { const testFormat = apigateway.AccessLogFormat.jsonWithStandardFields({ caller: false, httpMethod: false, @@ -21,19 +19,15 @@ export = { status: false, user: false, }); - test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId"}'); - - test.done(); - }, + expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId"}'); + }); - 'if clf method called'(test: Test) { + test('if clf method called', () => { const testFormat = apigateway.AccessLogFormat.clf(); - test.deepEqual(testFormat.toString(), '$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId'); + expect(testFormat.toString()).toEqual('$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId'); + }); - test.done(); - }, - - 'if custom method called'(test: Test) { + test('if custom method called', () => { const testFormat = apigateway.AccessLogFormat.custom(JSON.stringify({ requestId: apigateway.AccessLogField.contextRequestId(), sourceIp: apigateway.AccessLogField.contextIdentitySourceIp(), @@ -44,8 +38,6 @@ export = { email: apigateway.AccessLogField.contextAuthorizerClaims('email'), }, })); - test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId","sourceIp":"$context.identity.sourceIp","method":"$context.httpMethod","accountId":"$context.identity.accountId","userContext":{"sub":"$context.authorizer.claims.sub","email":"$context.authorizer.claims.email"}}'); - - test.done(); - }, -}; + expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId","sourceIp":"$context.identity.sourceIp","method":"$context.httpMethod","accountId":"$context.identity.accountId","userContext":{"sub":"$context.authorizer.claims.sub","email":"$context.authorizer.claims.email"}}'); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.api-definition.ts b/packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts similarity index 52% rename from packages/@aws-cdk/aws-apigateway/test/test.api-definition.ts rename to packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts index fd1adb03aedd5..aee6c954f2b90 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.api-definition.ts +++ b/packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts @@ -1,59 +1,56 @@ +import '@aws-cdk/assert/jest'; import * as path from 'path'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -export = { - 'apigateway.ApiDefinition.fromJson': { - 'happy case'(test: Test) { +describe('api definition', () => { + describe('apigateway.ApiDefinition.fromJson', () => { + test('happy case', () => { const stack = new cdk.Stack(); const definition = { key1: 'val1', }; const config = apigw.ApiDefinition.fromInline(definition).bind(stack); - test.deepEqual(config.inlineDefinition, definition); - test.ok(config.s3Location === undefined); - test.done(); - }, - - 'fails if Json definition is empty'(test: Test) { - test.throws( - () => defineRestApi(apigw.ApiDefinition.fromInline({})), - /cannot be empty/); - test.done(); - }, - - 'fails if definition is not an object'(test: Test) { - test.throws( - () => defineRestApi(apigw.ApiDefinition.fromInline('not-json')), - /should be of type object/); - test.done(); - }, - }, - - 'apigateway.ApiDefinition.fromAsset': { - 'happy case'(test: Test) { + expect(config.inlineDefinition).toEqual(definition); + expect(config.s3Location).toBeUndefined(); + }); + + test('fails if Json definition is empty', () => { + expect( + () => defineRestApi(apigw.ApiDefinition.fromInline({}))) + .toThrow(/cannot be empty/); + }); + + test('fails if definition is not an object', () => { + expect( + () => defineRestApi(apigw.ApiDefinition.fromInline('not-json'))) + .toThrow(/should be of type object/); + }); + }); + + describe('apigateway.ApiDefinition.fromAsset', () => { + test('happy case', () => { const stack = new cdk.Stack(); const config = apigw.ApiDefinition.fromAsset(path.join(__dirname, 'sample-definition.yaml')).bind(stack); - test.ok(config.inlineDefinition === undefined); - test.ok(config.s3Location !== undefined); - test.deepEqual(stack.resolve(config.s3Location!.bucket), { + expect(config.inlineDefinition).toBeUndefined(); + expect(config.s3Location).toBeDefined(); + expect(stack.resolve(config.s3Location!.bucket)).toEqual({ Ref: 'AssetParameters68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fbS3Bucket42039E29', }); - test.done(); - }, - 'fails if a directory is given for an asset'(test: Test) { + }); + + test('fails if a directory is given for an asset', () => { // GIVEN const fileAsset = apigw.ApiDefinition.fromAsset(path.join(__dirname, 'authorizers')); // THEN - test.throws(() => defineRestApi(fileAsset), /Asset cannot be a \.zip file or a directory/); - test.done(); - }, + expect(() => defineRestApi(fileAsset)).toThrow(/Asset cannot be a \.zip file or a directory/); - 'only one Asset object gets created even if multiple functions use the same AssetApiDefinition'(test: Test) { + }); + + test('only one Asset object gets created even if multiple functions use the same AssetApiDefinition', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'MyStack'); @@ -73,26 +70,26 @@ export = { const synthesized = assembly.stacks[0]; // API1 has an asset, API2 does not - test.deepEqual(synthesized.assets.length, 1); - test.done(); - }, - }, + expect(synthesized.assets.length).toEqual(1); + + }); + }); - 'apigateway.ApiDefinition.fromBucket': { - 'happy case'(test: Test) { + describe('apigateway.ApiDefinition.fromBucket', () => { + test('happy case', () => { const stack = new cdk.Stack(); const bucket = new s3.Bucket(stack, 'my-bucket'); const config = apigw.ApiDefinition.fromBucket(bucket, 'my-key', 'my-version').bind(stack); - test.ok(config.inlineDefinition === undefined); - test.ok(config.s3Location !== undefined); - test.deepEqual(stack.resolve(config.s3Location!.bucket), { + expect(config.inlineDefinition).toBeUndefined(); + expect(config.s3Location).toBeDefined(); + expect(stack.resolve(config.s3Location!.bucket)).toEqual({ Ref: 'mybucket15D133BF', }); - test.equals(config.s3Location!.key, 'my-key'); - test.done(); - }, - }, -}; + expect(config.s3Location!.key).toEqual('my-key'); + + }); + }); +}); function defineRestApi(definition: apigw.ApiDefinition) { const stack = new cdk.Stack(); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.api-key.ts b/packages/@aws-cdk/aws-apigateway/test/api-key.test.ts similarity index 78% rename from packages/@aws-cdk/aws-apigateway/test/test.api-key.ts rename to packages/@aws-cdk/aws-apigateway/test/api-key.test.ts index f33751ee9cbc7..18db74d841d04 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.api-key.ts +++ b/packages/@aws-cdk/aws-apigateway/test/api-key.test.ts @@ -1,11 +1,11 @@ -import { expect, haveResource, haveResourceLike, ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ResourcePart } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'default setup'(test: Test) { +describe('api key', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); @@ -13,13 +13,11 @@ export = { new apigateway.ApiKey(stack, 'my-api-key'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', undefined, ResourcePart.CompleteDefinition)); + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', undefined, ResourcePart.CompleteDefinition); // should have an api key with no props defined. + }); - test.done(); - }, - - 'specify props for apiKey'(test: Test) { + test('specify props for apiKey', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -32,7 +30,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { CustomerId: 'test-customer', StageKeys: [ { @@ -40,12 +38,10 @@ export = { StageName: { Ref: 'testapiDeploymentStagetest5869DF71' }, }, ], - })); - - test.done(); - }, + }); + }); - 'use an imported api key'(test: Test) { + test('use an imported api key', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -58,17 +54,16 @@ export = { }); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::UsagePlanKey', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::UsagePlanKey', { KeyId: 'KeyIdabc', KeyType: 'API_KEY', UsagePlanId: { Ref: 'testapiplan1B111AFF', }, - })); - test.done(); - }, + }); + }); - 'grantRead'(test: Test) { + test('grantRead', () => { // GIVEN const stack = new cdk.Stack(); const user = new iam.User(stack, 'User'); @@ -83,7 +78,7 @@ export = { apiKey.grantRead(user); // THEN - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResource('AWS::IAM::Policy', { PolicyDocument: { Statement: [ { @@ -112,12 +107,10 @@ export = { ], Version: '2012-10-17', }, - })); - - test.done(); - }, + }); + }); - 'grantWrite'(test: Test) { + test('grantWrite', () => { // GIVEN const stack = new cdk.Stack(); const user = new iam.User(stack, 'User'); @@ -132,7 +125,7 @@ export = { apiKey.grantWrite(user); // THEN - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResource('AWS::IAM::Policy', { PolicyDocument: { Statement: [ { @@ -166,12 +159,10 @@ export = { ], Version: '2012-10-17', }, - })); - - test.done(); - }, + }); + }); - 'grantReadWrite'(test: Test) { + test('grantReadWrite', () => { // GIVEN const stack = new cdk.Stack(); const user = new iam.User(stack, 'User'); @@ -186,7 +177,7 @@ export = { apiKey.grantReadWrite(user); // THEN - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResource('AWS::IAM::Policy', { PolicyDocument: { Statement: [ { @@ -221,13 +212,11 @@ export = { ], Version: '2012-10-17', }, - })); - - test.done(); - }, + }); + }); - 'rate limited': { - 'default setup'(test: Test) { + describe('rate limited', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api', { cloudWatchRole: false, deploy: false }); @@ -238,16 +227,14 @@ export = { // THEN // should have an api key with no props defined. - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', undefined, ResourcePart.CompleteDefinition)); + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', undefined, ResourcePart.CompleteDefinition); // should not have a usage plan. - expect(stack).notTo(haveResource('AWS::ApiGateway::UsagePlan')); + expect(stack).not.toHaveResource('AWS::ApiGateway::UsagePlan'); // should not have a usage plan key. - expect(stack).notTo(haveResource('AWS::ApiGateway::UsagePlanKey')); - - test.done(); - }, + expect(stack).not.toHaveResource('AWS::ApiGateway::UsagePlanKey'); + }); - 'only api key is created when rate limiting properties are not provided'(test: Test) { + test('only api key is created when rate limiting properties are not provided', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -260,7 +247,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { CustomerId: 'test-customer', StageKeys: [ { @@ -268,16 +255,14 @@ export = { StageName: { Ref: 'testapiDeploymentStagetest5869DF71' }, }, ], - })); + }); // should not have a usage plan. - expect(stack).notTo(haveResource('AWS::ApiGateway::UsagePlan')); + expect(stack).not.toHaveResource('AWS::ApiGateway::UsagePlan'); // should not have a usage plan key. - expect(stack).notTo(haveResource('AWS::ApiGateway::UsagePlanKey')); - - test.done(); - }, + expect(stack).not.toHaveResource('AWS::ApiGateway::UsagePlanKey'); + }); - 'api key and usage plan are created and linked when rate limiting properties are provided'(test: Test) { + test('api key and usage plan are created and linked when rate limiting properties are provided', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -295,7 +280,7 @@ export = { // THEN // should have an api key - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { CustomerId: 'test-customer', StageKeys: [ { @@ -303,16 +288,16 @@ export = { StageName: { Ref: 'testapiDeploymentStagetest5869DF71' }, }, ], - })); + }); // should have a usage plan with specified quota. - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlan', { + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlan', { Quota: { Limit: 10000, Period: 'MONTH', }, - }, ResourcePart.Properties)); + }, ResourcePart.Properties); // should have a usage plan key linking the api key and usage plan - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlanKey', { + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlanKey', { KeyId: { Ref: 'testapikey998028B6', }, @@ -320,9 +305,7 @@ export = { UsagePlanId: { Ref: 'testapikeyUsagePlanResource66DB63D6', }, - }, ResourcePart.Properties)); - - test.done(); - }, - }, -}; + }, ResourcePart.Properties); + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.authorizer.ts b/packages/@aws-cdk/aws-apigateway/test/authorizer.test.ts similarity index 52% rename from packages/@aws-cdk/aws-apigateway/test/test.authorizer.ts rename to packages/@aws-cdk/aws-apigateway/test/authorizer.test.ts index 89b6905fddb4e..0946ef4214c73 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.authorizer.ts +++ b/packages/@aws-cdk/aws-apigateway/test/authorizer.test.ts @@ -1,9 +1,8 @@ import { Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import { Authorizer, IRestApi } from '../lib'; -export = { - 'isAuthorizer correctly detects an instance of type Authorizer'(test: Test) { +describe('authorizer', () => { + test('isAuthorizer correctly detects an instance of type Authorizer', () => { class MyAuthorizer extends Authorizer { public readonly authorizerId = 'test-authorizer-id'; public _attachToApi(_: IRestApi): void { @@ -13,9 +12,7 @@ export = { const stack = new Stack(); const authorizer = new MyAuthorizer(stack, 'authorizer'); - test.ok(Authorizer.isAuthorizer(authorizer), 'type Authorizer expected but is not'); - test.ok(!Authorizer.isAuthorizer(stack), 'type Authorizer found, when not expected'); - - test.done(); - }, -}; \ No newline at end of file + expect(Authorizer.isAuthorizer(authorizer)).toEqual(true); + expect(Authorizer.isAuthorizer(stack)).toEqual(false); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/identity-source.test.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/identity-source.test.ts new file mode 100644 index 0000000000000..4c31cb96d9173 --- /dev/null +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/identity-source.test.ts @@ -0,0 +1,27 @@ +import { IdentitySource } from '../../lib'; + +describe('identity source', () => { + test('blank amount', () => { + expect(() => IdentitySource.context('')).toThrow(/empty/); + }); + + test('IdentitySource header', () => { + const identitySource = IdentitySource.header('Authorization'); + expect(identitySource.toString()).toEqual('method.request.header.Authorization'); + }); + + test('IdentitySource queryString', () => { + const identitySource = IdentitySource.queryString('param'); + expect(identitySource.toString()).toEqual('method.request.querystring.param'); + }); + + test('IdentitySource stageVariable', () => { + const identitySource = IdentitySource.stageVariable('var1'); + expect(identitySource.toString()).toEqual('stageVariables.var1'); + }); + + test('IdentitySource context', () => { + const identitySource = IdentitySource.context('httpMethod'); + expect(identitySource.toString()).toEqual('context.httpMethod'); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/test.lambda.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts similarity index 78% rename from packages/@aws-cdk/aws-apigateway/test/authorizers/test.lambda.ts rename to packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts index 9da1cf9e4e159..fd0be26e030df 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/test.lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts @@ -1,12 +1,12 @@ -import { expect, haveResource, ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ResourcePart } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import { Duration, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import { AuthorizationType, IdentitySource, RequestAuthorizer, RestApi, TokenAuthorizer } from '../../lib'; -export = { - 'default token authorizer'(test: Test) { +describe('lambda authorizer', () => { + test('default token authorizer', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -25,7 +25,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'TOKEN', RestApiId: stack.resolve(restApi.restApiId), IdentitySource: 'method.request.header.Authorization', @@ -49,19 +49,17 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { Action: 'lambda:InvokeFunction', Principal: 'apigateway.amazonaws.com', - })); - - test.ok(auth.authorizerArn.endsWith(`/authorizers/${auth.authorizerId}`), 'Malformed authorizer ARN'); + }); - test.done(); - }, + expect(auth.authorizerArn.endsWith(`/authorizers/${auth.authorizerId}`)).toBeTruthy(); + }); - 'default request authorizer'(test: Test) { + test('default request authorizer', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -82,7 +80,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'REQUEST', RestApiId: stack.resolve(restApi.restApiId), AuthorizerUri: { @@ -105,19 +103,19 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { Action: 'lambda:InvokeFunction', Principal: 'apigateway.amazonaws.com', - })); + }); - test.ok(auth.authorizerArn.endsWith(`/authorizers/${auth.authorizerId}`), 'Malformed authorizer ARN'); + expect(auth.authorizerArn.endsWith(`/authorizers/${auth.authorizerId}`)).toBeTruthy(); - test.done(); - }, - 'invalid request authorizer config'(test: Test) { + }); + + test('invalid request authorizer config', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -126,16 +124,14 @@ export = { runtime: lambda.Runtime.NODEJS_12_X, }); - test.throws(() => new RequestAuthorizer(stack, 'myauthorizer', { + expect(() => new RequestAuthorizer(stack, 'myauthorizer', { handler: func, resultsCacheTtl: Duration.seconds(1), identitySources: [], - }), Error, 'At least one Identity Source is required for a REQUEST-based Lambda authorizer if caching is enabled.'); - - test.done(); - }, + })).toThrow('At least one Identity Source is required for a REQUEST-based Lambda authorizer if caching is enabled.'); + }); - 'token authorizer with all parameters specified'(test: Test) { + test('token authorizer with all parameters specified', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -158,7 +154,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'TOKEN', RestApiId: stack.resolve(restApi.restApiId), IdentitySource: 'method.request.header.whoami', @@ -185,12 +181,10 @@ export = { ], ], }, - })); - - test.done(); - }, + }); + }); - 'request authorizer with all parameters specified'(test: Test) { + test('request authorizer with all parameters specified', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -212,7 +206,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'REQUEST', RestApiId: stack.resolve(restApi.restApiId), IdentitySource: 'method.request.header.whoami', @@ -238,12 +232,10 @@ export = { ], ], }, - })); - - test.done(); - }, + }); + }); - 'token authorizer with assume role'(test: Test) { + test('token authorizer with assume role', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -268,7 +260,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'TOKEN', RestApiId: stack.resolve(restApi.restApiId), AuthorizerUri: { @@ -291,11 +283,11 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::IAM::Role')); + expect(stack).toHaveResource('AWS::IAM::Role'); - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResourceLike('AWS::IAM::Policy', { Roles: [ stack.resolve(role.roleName), ], @@ -308,14 +300,12 @@ export = { }, ], }, - }, ResourcePart.Properties, true)); - - expect(stack).notTo(haveResource('AWS::Lambda::Permission')); + }, ResourcePart.Properties); - test.done(); - }, + expect(stack).not.toHaveResource('AWS::Lambda::Permission'); + }); - 'request authorizer with assume role'(test: Test) { + test('request authorizer with assume role', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -342,7 +332,7 @@ export = { authorizationType: AuthorizationType.CUSTOM, }); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Type: 'REQUEST', RestApiId: stack.resolve(restApi.restApiId), AuthorizerUri: { @@ -365,11 +355,11 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::IAM::Role')); + expect(stack).toHaveResource('AWS::IAM::Role'); - expect(stack).to(haveResource('AWS::IAM::Policy', { + expect(stack).toHaveResourceLike('AWS::IAM::Policy', { Roles: [ stack.resolve(role.roleName), ], @@ -382,14 +372,12 @@ export = { }, ], }, - }, ResourcePart.Properties, true)); - - expect(stack).notTo(haveResource('AWS::Lambda::Permission')); + }, ResourcePart.Properties); - test.done(); - }, + expect(stack).not.toHaveResource('AWS::Lambda::Permission'); + }); - 'token authorizer throws when not attached to a rest api'(test: Test) { + test('token authorizer throws when not attached to a rest api', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { handler: 'handler', @@ -400,12 +388,10 @@ export = { handler: func, }); - test.throws(() => stack.resolve(auth.authorizerArn), /must be attached to a RestApi/); + expect(() => stack.resolve(auth.authorizerArn)).toThrow(/must be attached to a RestApi/); + }); - test.done(); - }, - - 'request authorizer throws when not attached to a rest api'(test: Test) { + test('request authorizer throws when not attached to a rest api', () => { const stack = new Stack(); const func = new lambda.Function(stack, 'myfunction', { handler: 'handler', @@ -417,8 +403,6 @@ export = { identitySources: [IdentitySource.header('myheader')], }); - test.throws(() => stack.resolve(auth.authorizerArn), /must be attached to a RestApi/); - - test.done(); - }, -}; + expect(() => stack.resolve(auth.authorizerArn)).toThrow(/must be attached to a RestApi/); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/test.identity-source.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/test.identity-source.ts deleted file mode 100644 index 65c589fd7d53a..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/test.identity-source.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as nodeunit from 'nodeunit'; -import { IdentitySource } from '../../lib'; - -export = nodeunit.testCase({ - 'blank amount'(test: nodeunit.Test) { - test.throws(() => IdentitySource.context(''), /empty/); - test.done(); - }, - - 'IdentitySource header'(test: nodeunit.Test) { - const identitySource = IdentitySource.header('Authorization'); - test.equal(identitySource.toString(), 'method.request.header.Authorization'); - test.done(); - }, - - 'IdentitySource queryString'(test: nodeunit.Test) { - const identitySource = IdentitySource.queryString('param'); - test.equal(identitySource.toString(), 'method.request.querystring.param'); - test.done(); - }, - - 'IdentitySource stageVariable'(test: nodeunit.Test) { - const identitySource = IdentitySource.stageVariable('var1'); - test.equal(identitySource.toString(), 'stageVariables.var1'); - test.done(); - }, - - 'IdentitySource context'(test: nodeunit.Test) { - const identitySource = IdentitySource.context('httpMethod'); - test.equal(identitySource.toString(), 'context.httpMethod'); - test.done(); - }, -}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.cors.ts b/packages/@aws-cdk/aws-apigateway/test/cors.test.ts similarity index 83% rename from packages/@aws-cdk/aws-apigateway/test/test.cors.ts rename to packages/@aws-cdk/aws-apigateway/test/cors.test.ts index 006ed58375b55..46fe8e1756443 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.cors.ts +++ b/packages/@aws-cdk/aws-apigateway/test/cors.test.ts @@ -1,11 +1,10 @@ -import { countResources, expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as lambda from '@aws-cdk/aws-lambda'; import { Duration, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -export = { - 'adds an OPTIONS method to a resource'(test: Test) { +describe('cors', () => { + test('adds an OPTIONS method to a resource', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -17,7 +16,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -48,11 +47,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'allowCredentials'(test: Test) { + test('allowCredentials', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -65,7 +63,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -98,11 +96,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'allowMethods'(test: Test) { + test('allowMethods', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -115,7 +112,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -146,11 +143,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'allowMethods ANY will expand to all supported methods'(test: Test) { + test('allowMethods ANY will expand to all supported methods', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -163,7 +159,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -194,26 +190,23 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'allowMethods ANY cannot be used with any other method'(test: Test) { + test('allowMethods ANY cannot be used with any other method', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); const resource = api.root.addResource('MyResource'); // THEN - test.throws(() => resource.addCorsPreflight({ + expect(() => resource.addCorsPreflight({ allowOrigins: ['https://aws.amazon.com'], allowMethods: ['ANY', 'PUT'], - }), /ANY cannot be used with any other method. Received: ANY,PUT/); - - test.done(); - }, + })).toThrow(/ANY cannot be used with any other method. Received: ANY,PUT/); + }); - 'statusCode can be used to set the response status code'(test: Test) { + test('statusCode can be used to set the response status code', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -226,7 +219,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -257,25 +250,22 @@ export = { StatusCode: '200', }, ], - })); - test.done(); - }, + }); + }); - 'allowOrigins must contain at least one origin'(test: Test) { + test('allowOrigins must contain at least one origin', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); const resource = api.root.addResource('MyResource'); // WHEN - test.throws(() => resource.addCorsPreflight({ + expect(() => resource.addCorsPreflight({ allowOrigins: [], - }), /allowOrigins must contain at least one origin/); + })).toThrow(/allowOrigins must contain at least one origin/); + }); - test.done(); - }, - - 'allowOrigins can be used to specify multiple origins'(test: Test) { + test('allowOrigins can be used to specify multiple origins', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -287,7 +277,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -321,11 +311,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'maxAge can be used to specify Access-Control-Max-Age'(test: Test) { + test('maxAge can be used to specify Access-Control-Max-Age', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -338,7 +327,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -371,11 +360,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'disableCache will set Max-Age to -1'(test: Test) { + test('disableCache will set Max-Age to -1', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -388,7 +376,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -421,27 +409,24 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'maxAge and disableCache are mutually exclusive'(test: Test) { + test('maxAge and disableCache are mutually exclusive', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); const resource = api.root.addResource('MyResource'); // THEN - test.throws(() => resource.addCorsPreflight({ + expect(() => resource.addCorsPreflight({ allowOrigins: ['https://amazon.com'], disableCache: true, maxAge: Duration.seconds(10), - }), /The options "maxAge" and "disableCache" are mutually exclusive/); - - test.done(); - }, + })).toThrow(/The options "maxAge" and "disableCache" are mutually exclusive/); + }); - 'exposeHeaders can be used to specify Access-Control-Expose-Headers'(test: Test) { + test('exposeHeaders can be used to specify Access-Control-Expose-Headers', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -454,7 +439,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, Integration: { @@ -487,11 +472,10 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'defaultCorsPreflightOptions can be used to specify CORS for all resource tree'(test: Test) { + test('defaultCorsPreflightOptions can be used to specify CORS for all resource tree', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -505,19 +489,18 @@ export = { resource.addResource('MyChildResource'); // THEN - expect(stack).to(countResources('AWS::ApiGateway::Method', 2)); // on both resources - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toCountResources('AWS::ApiGateway::Method', 2); // on both resources + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceD5CDB490' }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apiMyResourceMyChildResource2DC010C5' }, - })); - test.done(); - }, + }); + }); - 'defaultCorsPreflightOptions can be specified at the API level to apply to all resources'(test: Test) { + test('defaultCorsPreflightOptions can be specified at the API level to apply to all resources', () => { // GIVEN const stack = new Stack(); @@ -532,22 +515,21 @@ export = { child1.addResource('child2'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { 'Fn::GetAtt': ['apiC8550315', 'RootResourceId'] }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apichild1841A5840' }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'apichild1child26A9A7C47' }, - })); - test.done(); - }, + }); + }); - 'Vary: Origin is sent back if Allow-Origin is not "*"'(test: Test) { + test('Vary: Origin is sent back if Allow-Origin is not "*"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -566,7 +548,7 @@ export = { }); // THENB - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ResourceId: { Ref: 'apiAllowAll2F5BC564', }, @@ -596,8 +578,8 @@ export = { StatusCode: '204', }, ], - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ResourceId: { Ref: 'apiAllowSpecific77DD8AF1', }, @@ -629,26 +611,23 @@ export = { StatusCode: '204', }, ], - })); - test.done(); - }, + }); + }); - 'If "*" is specified in allow-origin, it cannot be mixed with specific origins'(test: Test) { + test('If "*" is specified in allow-origin, it cannot be mixed with specific origins', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); // WHEN - test.throws(() => api.root.addResource('AllowAll', { + expect(() => api.root.addResource('AllowAll', { defaultCorsPreflightOptions: { allowOrigins: ['https://bla.com', '*', 'https://specific'], }, - }), /Invalid "allowOrigins" - cannot mix "\*" with specific origins: https:\/\/bla\.com,\*,https:\/\/specific/); - - test.done(); - }, + })).toThrow(/Invalid "allowOrigins" - cannot mix "\*" with specific origins: https:\/\/bla\.com,\*,https:\/\/specific/); + }); - 'defaultCorsPreflightOptions can be used to specify CORS for all resource tree [LambdaRestApi]'(test: Test) { + test('defaultCorsPreflightOptions can be used to specify CORS for all resource tree [LambdaRestApi]', () => { // GIVEN const stack = new Stack(); @@ -667,8 +646,8 @@ export = { }); // THEN - expect(stack).to(countResources('AWS::ApiGateway::Method', 4)); // two ANY and two OPTIONS resources - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toCountResources('AWS::ApiGateway::Method', 4); // two ANY and two OPTIONS resources + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { 'Fn::GetAtt': [ @@ -676,17 +655,16 @@ export = { 'RootResourceId', ], }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'lambdarestapiproxyE3AE07E3', }, - })); - test.done(); - }, + }); + }); - 'CORS and proxy resources'(test: Test) { + test('CORS and proxy resources', () => { // GIVEN const stack = new Stack(); @@ -698,9 +676,8 @@ export = { api.root.addProxy(); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', - })); - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.deployment.ts b/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts similarity index 74% rename from packages/@aws-cdk/aws-apigateway/test/test.deployment.ts rename to packages/@aws-cdk/aws-apigateway/test/deployment.test.ts index c8eb430d42a10..77f8b887eae57 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.deployment.ts +++ b/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts @@ -1,12 +1,12 @@ import * as path from 'path'; -import { expect, haveResource, ResourcePart, SynthUtils } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ResourcePart, SynthUtils } from '@aws-cdk/assert'; import * as lambda from '@aws-cdk/aws-lambda'; import { CfnResource, Lazy, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'minimal setup'(test: Test) { +describe('deployment', () => { + test('minimal setup', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -16,7 +16,7 @@ export = { new apigateway.Deployment(stack, 'deployment', { api }); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { apiGETECF0BD67: { Type: 'AWS::ApiGateway::Method', @@ -56,11 +56,9 @@ export = { }, }, }); + }); - test.done(); - }, - - '"retainDeployments" can be used to control the deletion policy of the resource'(test: Test) { + test('"retainDeployments" can be used to control the deletion policy of the resource', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -70,7 +68,7 @@ export = { new apigateway.Deployment(stack, 'deployment', { api, retainDeployments: true }); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { apiGETECF0BD67: { Type: 'AWS::ApiGateway::Method', @@ -112,11 +110,9 @@ export = { }, }, }); + }); - test.done(); - }, - - '"description" can be set on the deployment'(test: Test) { + test('"description" can be set on the deployment', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -126,14 +122,12 @@ export = { new apigateway.Deployment(stack, 'deployment', { api, description: 'this is my deployment' }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Deployment', { + expect(stack).toHaveResource('AWS::ApiGateway::Deployment', { Description: 'this is my deployment', - })); - - test.done(); - }, + }); + }); - 'logical ID of the deployment resource is salted'(test: Test) { + test('logical ID of the deployment resource is salted', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -141,34 +135,29 @@ export = { api.root.addMethod('GET'); const resources = synthesize().Resources; - test.ok(resources.deployment33381975bba46c5132329b81e7befcbbba5a0e75, - `resource deployment33381975bba46c5132329b81e7befcbbba5a0e75 not found, instead found ${Object.keys(resources)}`); + expect(resources.deployment33381975bba46c5132329b81e7befcbbba5a0e75).toBeDefined(); // adding some salt deployment.addToLogicalId({ foo: 123 }); // add some data to the logical ID // the logical ID changed const template = synthesize(); - test.ok(!template.Resources.deployment33381975bba46c5132329b81e7befcbbba5a0e75, 'old resource id is not deleted'); - test.ok(template.Resources.deployment333819758aa4cdb9d204502b959c4903f4d5d29f, - `new resource deployment333819758aa4cdb9d204502b959c4903f4d5d29f is not created, instead found ${Object.keys(template.Resources)}`); + expect(template.Resources.deployment33381975bba46c5132329b81e7befcbbba5a0e75).toBeUndefined(); + expect(template.Resources.deployment333819758aa4cdb9d204502b959c4903f4d5d29f).toBeDefined(); // tokens supported, and are resolved upon synthesis const value = 'hello hello'; deployment.addToLogicalId({ foo: Lazy.stringValue({ produce: () => value }) }); const template2 = synthesize(); - test.ok(template2.Resources.deployment333819758d91bed959c6bd6268ba84f6d33e888e, - `resource deployment333819758d91bed959c6bd6268ba84f6d33e888e not found, instead found ${Object.keys(template2.Resources)}`); - - test.done(); + expect(template2.Resources.deployment333819758d91bed959c6bd6268ba84f6d33e888e).toBeDefined(); function synthesize() { return SynthUtils.synthesize(stack).template; } - }, + }); - '"addDependency" can be used to add a resource as a dependency'(test: Test) { + test('"addDependency" can be used to add a resource as a dependency', () => { // GIVEN const stack = new Stack(); const api = new apigateway.RestApi(stack, 'api', { deploy: false, cloudWatchRole: false }); @@ -180,17 +169,17 @@ export = { // WHEN deployment.node.addDependency(dep); - expect(stack).to(haveResource('AWS::ApiGateway::Deployment', { + expect(stack).toHaveResource('AWS::ApiGateway::Deployment', { DependsOn: [ 'apiGETECF0BD67', 'MyResource', ], - }, ResourcePart.CompleteDefinition)); + }, ResourcePart.CompleteDefinition); - test.done(); - }, - 'integration change invalidates deployment'(test: Test) { + }); + + test('integration change invalidates deployment', () => { // GIVEN const stack1 = new Stack(); const stack2 = new Stack(); @@ -216,16 +205,16 @@ export = { api2.root.addMethod('GET'); // THEN - expect(stack1).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack1).toHaveResource('AWS::ApiGateway::Stage', { DeploymentId: { Ref: 'myapiDeploymentB7EF8EB74c5295c27fa87ff13f4d04e13f67662d' }, - })); - expect(stack2).to(haveResource('AWS::ApiGateway::Stage', { + }); + expect(stack2).toHaveResource('AWS::ApiGateway::Stage', { DeploymentId: { Ref: 'myapiDeploymentB7EF8EB7b50d305057ba109c118e4aafd4509355' }, - })); - test.done(); - }, + }); - 'deployment resource depends on all restapi methods defined'(test: Test) { + }); + + test('deployment resource depends on all restapi methods defined', () => { const stack = new Stack(); const restapi = new apigateway.RestApi(stack, 'myapi', { deploy: false, @@ -244,14 +233,12 @@ export = { const resource = restapi.root.addResource('myresource'); resource.addMethod('GET'); - expect(stack).to(haveResource('AWS::ApiGateway::Deployment', { + expect(stack).toHaveResource('AWS::ApiGateway::Deployment', { DependsOn: [ 'myapiGET9B7CD29E', 'myapimyresourceGET732851A5', 'myapiPOST23417BD2', ], - }, ResourcePart.CompleteDefinition)); - - test.done(); - }, -}; + }, ResourcePart.CompleteDefinition); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.domains.ts b/packages/@aws-cdk/aws-apigateway/test/domains.test.ts similarity index 75% rename from packages/@aws-cdk/aws-apigateway/test/test.domains.ts rename to packages/@aws-cdk/aws-apigateway/test/domains.test.ts index 1e611c4601cd4..ee70b4e9cb98e 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.domains.ts +++ b/packages/@aws-cdk/aws-apigateway/test/domains.test.ts @@ -1,14 +1,14 @@ -import { ABSENT, expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ABSENT } from '@aws-cdk/assert'; import * as acm from '@aws-cdk/aws-certificatemanager'; import { Bucket } from '@aws-cdk/aws-s3'; import { Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; /* eslint-disable quote-props */ -export = { - 'can define either an EDGE or REGIONAL domain name'(test: Test) { +describe('domains', () => { + test('can define either an EDGE or REGIONAL domain name', () => { // GIVEN const stack = new Stack(); const cert = new acm.Certificate(stack, 'Cert', { domainName: 'example.com' }); @@ -27,27 +27,27 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['EDGE'] }, 'CertificateArn': { 'Ref': 'Cert5C9FAEC1' }, - })); + }); + + expect(stack.resolve(regionalDomain.domainNameAliasDomainName)).toEqual({ 'Fn::GetAtt': ['mydomain592C948B', 'RegionalDomainName'] }); + expect(stack.resolve(regionalDomain.domainNameAliasHostedZoneId)).toEqual({ 'Fn::GetAtt': ['mydomain592C948B', 'RegionalHostedZoneId'] }); + expect(stack.resolve(edgeDomain.domainNameAliasDomainName)).toEqual({ 'Fn::GetAtt': ['yourdomain5FE30C81', 'DistributionDomainName'] }); + expect(stack.resolve(edgeDomain.domainNameAliasHostedZoneId)).toEqual({ 'Fn::GetAtt': ['yourdomain5FE30C81', 'DistributionHostedZoneId'] }); - test.deepEqual(stack.resolve(regionalDomain.domainNameAliasDomainName), { 'Fn::GetAtt': ['mydomain592C948B', 'RegionalDomainName'] }); - test.deepEqual(stack.resolve(regionalDomain.domainNameAliasHostedZoneId), { 'Fn::GetAtt': ['mydomain592C948B', 'RegionalHostedZoneId'] }); - test.deepEqual(stack.resolve(edgeDomain.domainNameAliasDomainName), { 'Fn::GetAtt': ['yourdomain5FE30C81', 'DistributionDomainName'] }); - test.deepEqual(stack.resolve(edgeDomain.domainNameAliasHostedZoneId), { 'Fn::GetAtt': ['yourdomain5FE30C81', 'DistributionHostedZoneId'] }); - test.done(); - }, + }); - 'default endpoint type is REGIONAL'(test: Test) { + test('default endpoint type is REGIONAL', () => { // GIVEN const stack = new Stack(); const cert = new acm.Certificate(stack, 'Cert', { domainName: 'example.com' }); @@ -59,15 +59,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, - })); - test.done(); - }, + }); + + }); - 'accepts different security policies'(test: Test) { + test('accepts different security policies', () => { // GIVEN const stack = new Stack(); const cert = new acm.Certificate(stack, 'Cert', { domainName: 'example.com' }); @@ -91,30 +91,30 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'old.example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, 'SecurityPolicy': 'TLS_1_0', - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'new.example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, 'SecurityPolicy': 'TLS_1_2', - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'default.example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': { 'Ref': 'Cert5C9FAEC1' }, 'SecurityPolicy': ABSENT, - })); - test.done(); - }, + }); - '"mapping" can be used to automatically map this domain to the deployment stage of an API'(test: Test) { + }); + + test('"mapping" can be used to automatically map this domain to the deployment stage of an API', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -129,7 +129,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'Domain66AC69E0', }, @@ -139,11 +139,11 @@ export = { 'Stage': { 'Ref': 'apiDeploymentStageprod896C8101', }, - })); - test.done(); - }, + }); - '"addBasePathMapping" can be used to add base path mapping to the domain'(test: Test) { + }); + + test('"addBasePathMapping" can be used to add base path mapping to the domain', () => { // GIVEN const stack = new Stack(); const api1 = new apigw.RestApi(stack, 'api1'); @@ -161,7 +161,7 @@ export = { domain.addBasePathMapping(api2, { basePath: 'api2' }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'mydomain592C948B', }, @@ -172,9 +172,9 @@ export = { 'Stage': { 'Ref': 'api1DeploymentStageprod362746F6', }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'mydomain592C948B', }, @@ -185,11 +185,11 @@ export = { 'Stage': { 'Ref': 'api2DeploymentStageprod4120D74E', }, - })); - test.done(); - }, + }); - 'a domain name can be defined with the API'(test: Test) { + }); + + test('a domain name can be defined with the API', () => { // GIVEN const domainName = 'my.domain.com'; const stack = new Stack(); @@ -203,7 +203,7 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'my.domain.com', 'EndpointConfiguration': { 'Types': [ @@ -213,8 +213,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'apiCustomDomain64773C4F', }, @@ -224,12 +224,12 @@ export = { 'Stage': { 'Ref': 'apiDeploymentStageprod896C8101', }, - })); + }); + - test.done(); - }, + }); - 'a domain name can be added later'(test: Test) { + test('a domain name can be added later', () => { // GIVEN const domainName = 'my.domain.com'; const stack = new Stack(); @@ -243,7 +243,7 @@ export = { api.addDomainName('domainId', { domainName, certificate }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': domainName, 'EndpointConfiguration': { 'Types': [ @@ -253,8 +253,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'apidomainId102F8DAA', }, @@ -264,26 +264,26 @@ export = { 'Stage': { 'Ref': 'apiDeploymentStageprod896C8101', }, - })); + }); - test.done(); - }, - 'domain name cannot contain uppercase letters'(test: Test) { + }); + + test('domain name cannot contain uppercase letters', () => { // GIVEN const stack = new Stack(); const certificate = new acm.Certificate(stack, 'cert', { domainName: 'someDomainWithUpercase.domain.com' }); // WHEN - test.throws(() => { + expect(() => { new apigw.DomainName(stack, 'someDomain', { domainName: 'someDomainWithUpercase.domain.com', certificate }); - }, /uppercase/); + }).toThrow(/uppercase/); // THEN - test.done(); - }, - 'multiple domain names can be added'(test: Test) { + }); + + test('multiple domain names can be added', () => { // GIVEN const domainName = 'my.domain.com'; const stack = new Stack(); @@ -298,10 +298,10 @@ export = { api.addDomainName('domainId1', { domainName: 'your.domain.com', certificate }); api.addDomainName('domainId2', { domainName: 'our.domain.com', certificate }); - test.deepEqual(api.domainName, domainName1); + expect(api.domainName).toEqual(domainName1); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'my.domain.com', 'EndpointConfiguration': { 'Types': [ @@ -311,8 +311,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'your.domain.com', 'EndpointConfiguration': { 'Types': [ @@ -322,8 +322,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'our.domain.com', 'EndpointConfiguration': { 'Types': [ @@ -333,8 +333,8 @@ export = { 'RegionalCertificateArn': { 'Ref': 'cert56CA94EB', }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'apidomainId102F8DAA', }, @@ -344,12 +344,12 @@ export = { 'Stage': { 'Ref': 'apiDeploymentStageprod896C8101', }, - })); + }); + - test.done(); - }, + }); - '"addBasePathMapping" can be used to add base path mapping to the domain with specific stage'(test: Test) { + test('"addBasePathMapping" can be used to add base path mapping to the domain with specific stage', () => { // GIVEN const stack = new Stack(); const api1 = new apigw.RestApi(stack, 'api1'); @@ -375,7 +375,7 @@ export = { domain.addBasePathMapping(api2, { basePath: 'api2' }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'mydomain592C948B', }, @@ -384,9 +384,9 @@ export = { 'Ref': 'api1A91238E2', }, 'Stage': stack.resolve(testStage.stageName), - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'mydomain592C948B', }, @@ -397,11 +397,11 @@ export = { 'Stage': { 'Ref': 'api2DeploymentStageprod4120D74E', }, - })); - test.done(); - }, + }); - 'accepts a mutual TLS configuration'(test: Test) { + }); + + test('accepts a mutual TLS configuration', () => { const stack = new Stack(); const bucket = Bucket.fromBucketName(stack, 'testBucket', 'exampleBucket'); new apigw.DomainName(stack, 'another-domain', { @@ -413,16 +413,16 @@ export = { certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'), }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d', 'MutualTlsAuthentication': { 'TruststoreUri': 's3://exampleBucket/someca.pem' }, - })); - test.done(); - }, + }); + + }); - 'mTLS should allow versions to be set on the s3 bucket'(test: Test) { + test('mTLS should allow versions to be set on the s3 bucket', () => { const stack = new Stack(); const bucket = Bucket.fromBucketName(stack, 'testBucket', 'exampleBucket'); new apigw.DomainName(stack, 'another-domain', { @@ -434,16 +434,16 @@ export = { version: 'version', }, }); - expect(stack).to(haveResource('AWS::ApiGateway::DomainName', { + expect(stack).toHaveResource('AWS::ApiGateway::DomainName', { 'DomainName': 'example.com', 'EndpointConfiguration': { 'Types': ['REGIONAL'] }, 'RegionalCertificateArn': 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d', 'MutualTlsAuthentication': { 'TruststoreUri': 's3://exampleBucket/someca.pem', 'TruststoreVersion': 'version' }, - })); - test.done(); - }, + }); + + }); - 'base path mapping configures stage for RestApi creation'(test: Test) { + test('base path mapping configures stage for RestApi creation', () => { // GIVEN const stack = new Stack(); new apigw.RestApi(stack, 'restApiWithStage', { @@ -455,7 +455,7 @@ export = { }).root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'restApiWithStageCustomDomainC4749625', }, @@ -465,12 +465,12 @@ export = { 'Stage': { 'Ref': 'restApiWithStageDeploymentStageprodC82A6648', }, - })); + }); + - test.done(); - }, + }); - 'base path mapping configures stage for SpecRestApi creation'(test: Test) { + test('base path mapping configures stage for SpecRestApi creation', () => { // GIVEN const stack = new Stack(); @@ -488,7 +488,7 @@ export = { }).root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', { + expect(stack).toHaveResource('AWS::ApiGateway::BasePathMapping', { 'DomainName': { 'Ref': 'specRestApiWithStageCustomDomain8A36A5C9', }, @@ -498,8 +498,6 @@ export = { 'Stage': { 'Ref': 'specRestApiWithStageDeploymentStageprod2D3037ED', }, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.http.ts b/packages/@aws-cdk/aws-apigateway/test/http.test.ts similarity index 71% rename from packages/@aws-cdk/aws-apigateway/test/test.http.ts rename to packages/@aws-cdk/aws-apigateway/test/http.test.ts index 73bdf75a182c9..c0f58e828d271 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.http.ts +++ b/packages/@aws-cdk/aws-apigateway/test/http.test.ts @@ -1,10 +1,9 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'minimal setup'(test: Test) { +describe('http integration', () => { + test('minimal setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api'); @@ -15,18 +14,16 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'GET', Type: 'HTTP_PROXY', Uri: 'http://foo/bar', }, - })); - - test.done(); - }, + }); + }); - 'options can be passed via props'(test: Test) { + test('options can be passed via props', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api'); @@ -43,15 +40,13 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { CacheNamespace: 'hey', IntegrationHttpMethod: 'POST', Type: 'HTTP', Uri: 'http://foo/bar', }, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.integration.ts b/packages/@aws-cdk/aws-apigateway/test/integration.test.ts similarity index 71% rename from packages/@aws-cdk/aws-apigateway/test/test.integration.ts rename to packages/@aws-cdk/aws-apigateway/test/integration.test.ts index e946ded961b29..3c8990247d74e 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.integration.ts +++ b/packages/@aws-cdk/aws-apigateway/test/integration.test.ts @@ -1,40 +1,40 @@ -import { ABSENT, expect, haveResourceLike } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ABSENT } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -export = { - 'integration "credentialsRole" and "credentialsPassthrough" are mutually exclusive'(test: Test) { +describe('integration', () => { + test('integration "credentialsRole" and "credentialsPassthrough" are mutually exclusive', () => { // GIVEN const stack = new cdk.Stack(); const role = new iam.Role(stack, 'MyRole', { assumedBy: new iam.ServicePrincipal('foo') }); // THEN - test.throws(() => new apigw.Integration({ + expect(() => new apigw.Integration({ type: apigw.IntegrationType.AWS_PROXY, options: { credentialsPassthrough: true, credentialsRole: role, }, - }), /'credentialsPassthrough' and 'credentialsRole' are mutually exclusive/); - test.done(); - }, + })).toThrow(/'credentialsPassthrough' and 'credentialsRole' are mutually exclusive/); - 'integration connectionType VpcLink requires vpcLink to be set'(test: Test) { - test.throws(() => new apigw.Integration({ + }); + + test('integration connectionType VpcLink requires vpcLink to be set', () => { + expect(() => new apigw.Integration({ type: apigw.IntegrationType.HTTP_PROXY, integrationHttpMethod: 'ANY', options: { connectionType: apigw.ConnectionType.VPC_LINK, }, - }), /'connectionType' of VPC_LINK requires 'vpcLink' prop to be set/); - test.done(); - }, + })).toThrow(/'connectionType' of VPC_LINK requires 'vpcLink' prop to be set/); + + }); - 'uri is self determined from the NLB'(test: Test) { + test('uri is self determined from the NLB', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); const nlb = new elbv2.NetworkLoadBalancer(stack, 'NLB', { vpc }); @@ -52,7 +52,7 @@ export = { }); api.root.addMethod('GET', integration); - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { Uri: { 'Fn::Join': [ @@ -69,12 +69,10 @@ export = { ], }, }, - })); - - test.done(); - }, + }); + }); - 'uri must be set for VpcLink with multiple NLBs'(test: Test) { + test('uri must be set for VpcLink with multiple NLBs', () => { const app = new cdk.App(); const stack = new cdk.Stack(app); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -93,12 +91,10 @@ export = { }, }); api.root.addMethod('GET', integration); - test.throws(() => app.synth(), /'uri' is required when there are more than one NLBs in the VPC Link/); - - test.done(); - }, + expect(() => app.synth()).toThrow(/'uri' is required when there are more than one NLBs in the VPC Link/); + }); - 'uri must be set when using an imported VpcLink'(test: Test) { + test('uri must be set when using an imported VpcLink', () => { const app = new cdk.App(); const stack = new cdk.Stack(app); const link = apigw.VpcLink.fromVpcLinkId(stack, 'link', 'vpclinkid'); @@ -112,12 +108,10 @@ export = { }, }); api.root.addMethod('GET', integration); - test.throws(() => app.synth(), /'uri' is required when the 'connectionType' is VPC_LINK/); + expect(() => app.synth()).toThrow(/'uri' is required when the 'connectionType' is VPC_LINK/); + }); - test.done(); - }, - - 'connectionType of INTERNET and vpcLink are mutually exclusive'(test: Test) { + test('connectionType of INTERNET and vpcLink are mutually exclusive', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -129,18 +123,17 @@ export = { }); // THEN - test.throws(() => new apigw.Integration({ + expect(() => new apigw.Integration({ type: apigw.IntegrationType.HTTP_PROXY, integrationHttpMethod: 'ANY', options: { connectionType: apigw.ConnectionType.INTERNET, vpcLink: link, }, - }), /cannot set 'vpcLink' where 'connectionType' is INTERNET/); - test.done(); - }, + })).toThrow(/cannot set 'vpcLink' where 'connectionType' is INTERNET/); + }); - 'connectionType is ABSENT when vpcLink is not specified'(test: Test) { + test('connectionType is ABSENT when vpcLink is not specified', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'restapi'); @@ -153,17 +146,15 @@ export = { api.root.addMethod('ANY', integration); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'ANY', Integration: { ConnectionType: ABSENT, }, - })); - - test.done(); - }, + }); + }); - 'connectionType defaults to VPC_LINK if vpcLink is configured'(test: Test) { + test('connectionType defaults to VPC_LINK if vpcLink is configured', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -186,13 +177,11 @@ export = { api.root.addMethod('ANY', integration); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'ANY', Integration: { ConnectionType: 'VPC_LINK', }, - })); - - test.done(); - }, -}; \ No newline at end of file + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/test.lambda.ts b/packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts similarity index 79% rename from packages/@aws-cdk/aws-apigateway/test/test.lambda.ts rename to packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts index 0519f62ee5a36..862b9b64266f9 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/test/integrations/lambda.test.ts @@ -1,11 +1,10 @@ -import { expect, haveResource, haveResourceLike, not } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; -import * as apigateway from '../lib'; +import * as apigateway from '../../lib'; -export = { - 'minimal setup'(test: Test) { +describe('lambda', () => { + test('minimal setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api'); @@ -20,7 +19,7 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'POST', Type: 'AWS_PROXY', @@ -48,11 +47,10 @@ export = { ], }, }, - })); - test.done(); - }, + }); + }); - '"allowTestInvoke" can be used to disallow calling the API from the test UI'(test: Test) { + test('"allowTestInvoke" can be used to disallow calling the API from the test UI', () => { // GIVEN const stack = new cdk.Stack(); const fn = new lambda.Function(stack, 'Handler', { @@ -68,7 +66,7 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -78,9 +76,9 @@ export = { ], ], }, - })); + }); - expect(stack).to(not(haveResource('AWS::Lambda::Permission', { + expect(stack).not.toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -97,12 +95,10 @@ export = { ], ], }, - }))); - - test.done(); - }, + }); + }); - '"allowTestInvoke" set to true allows calling the API from the test UI'(test: Test) { + test('"allowTestInvoke" set to true allows calling the API from the test UI', () => { // GIVEN const stack = new cdk.Stack(); const fn = new lambda.Function(stack, 'Handler', { @@ -118,7 +114,7 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -135,12 +131,10 @@ export = { ], ], }, - })); - - test.done(); - }, + }); + }); - '"proxy" can be used to disable proxy mode'(test: Test) { + test('"proxy" can be used to disable proxy mode', () => { // GIVEN const stack = new cdk.Stack(); const fn = new lambda.Function(stack, 'Handler', { @@ -156,16 +150,14 @@ export = { api.root.addMethod('GET', integ); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { Type: 'AWS', }, - })); - - test.done(); - }, + }); + }); - 'when "ANY" is used, lambda permission will include "*" for method'(test: Test) { + test('when "ANY" is used, lambda permission will include "*" for method', () => { const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api'); @@ -179,7 +171,7 @@ export = { api.root.addMethod('ANY', target); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -196,9 +188,9 @@ export = { ], ], }, - })); + }); - expect(stack).to(haveResource('AWS::Lambda::Permission', { + expect(stack).toHaveResource('AWS::Lambda::Permission', { SourceArn: { 'Fn::Join': [ '', @@ -225,12 +217,10 @@ export = { ], ], }, - })); - - test.done(); - }, + }); + }); - 'works for imported RestApi'(test: Test) { + test('works for imported RestApi', () => { const stack = new cdk.Stack(); const api = apigateway.RestApi.fromRestApiAttributes(stack, 'RestApi', { restApiId: 'imported-rest-api-id', @@ -245,16 +235,14 @@ export = { api.root.addMethod('ANY', new apigateway.LambdaIntegration(handler)); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { RestApiId: 'imported-rest-api-id', ResourceId: 'imported-root-resource-id', HttpMethod: 'ANY', - })); - - test.done(); - }, + }); + }); - 'fingerprint is computed when functionName is specified'(test: Test) { + test('fingerprint is computed when functionName is specified', () => { // GIVEN const stack = new cdk.Stack(); const restapi = new apigateway.RestApi(stack, 'RestApi'); @@ -271,13 +259,11 @@ export = { const bindResult = integration.bind(method); // THEN - test.ok(bindResult?.deploymentToken); - test.deepEqual(bindResult!.deploymentToken, '{"functionName":"ThisFunction"}'); + expect(bindResult?.deploymentToken).toBeDefined(); + expect(bindResult!.deploymentToken).toEqual('{"functionName":"ThisFunction"}'); + }); - test.done(); - }, - - 'fingerprint is not computed when functionName is not specified'(test: Test) { + test('fingerprint is not computed when functionName is not specified', () => { // GIVEN const stack = new cdk.Stack(); const restapi = new apigateway.RestApi(stack, 'RestApi'); @@ -293,12 +279,10 @@ export = { const bindResult = integration.bind(method); // THEN - test.equals(bindResult?.deploymentToken, undefined); - - test.done(); - }, + expect(bindResult?.deploymentToken).toBeUndefined(); + }); - 'bind works for integration with imported functions'(test: Test) { + test('bind works for integration with imported functions', () => { // GIVEN const stack = new cdk.Stack(); const restapi = new apigateway.RestApi(stack, 'RestApi'); @@ -311,9 +295,6 @@ export = { // the deployment token should be defined since the function name // should be a literal string. - test.equal(bindResult?.deploymentToken, JSON.stringify({ functionName: 'myfunc' })); - - test.done(); - }, - -}; + expect(bindResult?.deploymentToken).toEqual(JSON.stringify({ functionName: 'myfunc' })); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts b/packages/@aws-cdk/aws-apigateway/test/lambda-api.test.ts similarity index 65% rename from packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts rename to packages/@aws-cdk/aws-apigateway/test/lambda-api.test.ts index a4fb4757aaba3..6850cf4e8ba06 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts +++ b/packages/@aws-cdk/aws-apigateway/test/lambda-api.test.ts @@ -1,13 +1,10 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -/* eslint-disable quote-props */ - -export = { - 'LambdaRestApi defines a REST API with Lambda proxy integration'(test: Test) { +describe('lambda api', () => { + test('LambdaRestApi defines a REST API with Lambda proxy integration', () => { // GIVEN const stack = new cdk.Stack(); @@ -21,38 +18,38 @@ export = { const api = new apigw.LambdaRestApi(stack, 'lambda-rest-api', { handler }); // THEN -- can't customize further - test.throws(() => { + expect(() => { api.root.addResource('cant-touch-this'); - }); + }).toThrow(); // THEN -- template proxies everything - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { - 'PathPart': '{proxy+}', - })); + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { + PathPart: '{proxy+}', + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { - 'HttpMethod': 'ANY', - 'ResourceId': { - 'Ref': 'lambdarestapiproxyE3AE07E3', + expect(stack).toHaveResource('AWS::ApiGateway::Method', { + HttpMethod: 'ANY', + ResourceId: { + Ref: 'lambdarestapiproxyE3AE07E3', }, - 'RestApiId': { - 'Ref': 'lambdarestapiAAD10924', + RestApiId: { + Ref: 'lambdarestapiAAD10924', }, - 'AuthorizationType': 'NONE', - 'Integration': { - 'IntegrationHttpMethod': 'POST', - 'Type': 'AWS_PROXY', - 'Uri': { + AuthorizationType: 'NONE', + Integration: { + IntegrationHttpMethod: 'POST', + Type: 'AWS_PROXY', + Uri: { 'Fn::Join': [ '', [ 'arn:', { - 'Ref': 'AWS::Partition', + Ref: 'AWS::Partition', }, ':apigateway:', { - 'Ref': 'AWS::Region', + Ref: 'AWS::Region', }, ':lambda:path/2015-03-31/functions/', { @@ -66,12 +63,10 @@ export = { ], }, }, - })); - - test.done(); - }, + }); + }); - 'LambdaRestApi supports function Alias'(test: Test) { + test('LambdaRestApi supports function Alias', () => { // GIVEN const stack = new cdk.Stack(); @@ -91,54 +86,52 @@ export = { const api = new apigw.LambdaRestApi(stack, 'lambda-rest-api', { handler: alias }); // THEN -- can't customize further - test.throws(() => { + expect(() => { api.root.addResource('cant-touch-this'); - }); + }).toThrow(); // THEN -- template proxies everything - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { - 'PathPart': '{proxy+}', - })); + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { + PathPart: '{proxy+}', + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { - 'HttpMethod': 'ANY', - 'ResourceId': { - 'Ref': 'lambdarestapiproxyE3AE07E3', + expect(stack).toHaveResource('AWS::ApiGateway::Method', { + HttpMethod: 'ANY', + ResourceId: { + Ref: 'lambdarestapiproxyE3AE07E3', }, - 'RestApiId': { - 'Ref': 'lambdarestapiAAD10924', + RestApiId: { + Ref: 'lambdarestapiAAD10924', }, - 'AuthorizationType': 'NONE', - 'Integration': { - 'IntegrationHttpMethod': 'POST', - 'Type': 'AWS_PROXY', - 'Uri': { + AuthorizationType: 'NONE', + Integration: { + IntegrationHttpMethod: 'POST', + Type: 'AWS_PROXY', + Uri: { 'Fn::Join': [ '', [ 'arn:', { - 'Ref': 'AWS::Partition', + Ref: 'AWS::Partition', }, ':apigateway:', { - 'Ref': 'AWS::Region', + Ref: 'AWS::Region', }, ':lambda:path/2015-03-31/functions/', { - 'Ref': 'alias68BF17F5', + Ref: 'alias68BF17F5', }, '/invocations', ], ], }, }, - })); - - test.done(); - }, + }); + }); - 'when "proxy" is set to false, users need to define the model'(test: Test) { + test('when "proxy" is set to false, users need to define the model', () => { // GIVEN const stack = new cdk.Stack(); @@ -156,28 +149,26 @@ export = { tasks.addMethod('POST'); // THEN - expect(stack).notTo(haveResource('AWS::ApiGateway::Resource', { - 'PathPart': '{proxy+}', - })); + expect(stack).not.toHaveResource('AWS::ApiGateway::Resource', { + PathPart: '{proxy+}', + }); - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'tasks', - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', ResourceId: { Ref: 'lambdarestapitasks224418C8' }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'POST', ResourceId: { Ref: 'lambdarestapitasks224418C8' }, - })); - - test.done(); - }, + }); + }); - 'fails if options.defaultIntegration is also set'(test: Test) { + test('fails if options.defaultIntegration is also set', () => { // GIVEN const stack = new cdk.Stack(); @@ -187,20 +178,18 @@ export = { runtime: lambda.Runtime.NODEJS_10_X, }); - test.throws(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { + expect(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { handler, options: { defaultIntegration: new apigw.HttpIntegration('https://foo/bar') }, - }), /Cannot specify \"defaultIntegration\" since Lambda integration is automatically defined/); + })).toThrow(/Cannot specify \"defaultIntegration\" since Lambda integration is automatically defined/); - test.throws(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { + expect(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { handler, defaultIntegration: new apigw.HttpIntegration('https://foo/bar'), - }), /Cannot specify \"defaultIntegration\" since Lambda integration is automatically defined/); - - test.done(); - }, + })).toThrow(/Cannot specify \"defaultIntegration\" since Lambda integration is automatically defined/); + }); - 'LambdaRestApi defines a REST API with CORS enabled'(test: Test) { + test('LambdaRestApi defines a REST API with CORS enabled', () => { // GIVEN const stack = new cdk.Stack(); @@ -220,7 +209,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'OPTIONS', ResourceId: { Ref: 'lambdarestapiproxyE3AE07E3' }, Integration: { @@ -251,8 +240,6 @@ export = { StatusCode: '204', }, ], - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.method.ts b/packages/@aws-cdk/aws-apigateway/test/method.test.ts similarity index 76% rename from packages/@aws-cdk/aws-apigateway/test/test.method.ts rename to packages/@aws-cdk/aws-apigateway/test/method.test.ts index 2255e36e26182..36610126f3ec6 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.method.ts +++ b/packages/@aws-cdk/aws-apigateway/test/method.test.ts @@ -1,8 +1,8 @@ -import { ABSENT, expect, haveResource, haveResourceLike } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ABSENT } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; const DUMMY_AUTHORIZER: apigw.IAuthorizer = { @@ -10,8 +10,8 @@ const DUMMY_AUTHORIZER: apigw.IAuthorizer = { authorizationType: apigw.AuthorizationType.CUSTOM, }; -export = { - 'default setup'(test: Test) { +describe('method', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -23,18 +23,18 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'POST', AuthorizationType: 'NONE', Integration: { Type: 'MOCK', }, - })); + }); + - test.done(); - }, + }); - 'method options can be specified'(test: Test) { + test('method options can be specified', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -50,15 +50,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ApiKeyRequired: true, OperationName: 'MyOperation', - })); + }); - test.done(); - }, - 'integration can be set via a property'(test: Test) { + }); + + test('integration can be set via a property', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -71,7 +71,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'POST', Type: 'AWS', @@ -85,12 +85,12 @@ export = { ], }, }, - })); + }); - test.done(); - }, - 'integration with a custom http method can be set via a property'(test: Test) { + }); + + test('integration with a custom http method can be set via a property', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -103,16 +103,16 @@ export = { }); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'GET', }, - })); + }); + - test.done(); - }, + }); - 'use default integration from api'(test: Test) { + test('use default integration from api', () => { // GIVEN const stack = new cdk.Stack(); const defaultIntegration = new apigw.Integration({ type: apigw.IntegrationType.HTTP_PROXY, uri: 'https://amazon.com' }); @@ -129,17 +129,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { Type: 'HTTP_PROXY', Uri: 'https://amazon.com', }, - })); + }); + - test.done(); - }, + }); - '"methodArn" returns the ARN execute-api ARN for this method in the current stage'(test: Test) { + test('"methodArn" returns the ARN execute-api ARN for this method in the current stage', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api'); @@ -151,7 +151,7 @@ export = { }); // THEN - test.deepEqual(stack.resolve(method.methodArn), { + expect(stack.resolve(method.methodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -170,10 +170,10 @@ export = { ], }); - test.done(); - }, - '"testMethodArn" returns the ARN of the "test-invoke-stage" stage (console UI)'(test: Test) { + }); + + test('"testMethodArn" returns the ARN of the "test-invoke-stage" stage (console UI)', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api'); @@ -185,7 +185,7 @@ export = { }); // THEN - test.deepEqual(stack.resolve(method.testMethodArn), { + expect(stack.resolve(method.testMethodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -202,10 +202,10 @@ export = { ], }); - test.done(); - }, - '"methodArn" returns an arn with "*" as its stage when deploymentStage is not set'(test: Test) { + }); + + test('"methodArn" returns an arn with "*" as its stage when deploymentStage is not set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -214,7 +214,7 @@ export = { const method = new apigw.Method(stack, 'my-method', { httpMethod: 'POST', resource: api.root }); // THEN - test.deepEqual(stack.resolve(method.methodArn), { + expect(stack.resolve(method.methodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -231,17 +231,17 @@ export = { ], }); - test.done(); - }, - '"methodArn" and "testMethodArn" replace path parameters with asterisks'(test: Test) { + }); + + test('"methodArn" and "testMethodArn" replace path parameters with asterisks', () => { const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api'); const petId = api.root.addResource('pets').addResource('{petId}'); const commentId = petId.addResource('comments').addResource('{commentId}'); const method = commentId.addMethod('GET'); - test.deepEqual(stack.resolve(method.methodArn), { + expect(stack.resolve(method.methodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -260,7 +260,7 @@ export = { ], }); - test.deepEqual(stack.resolve(method.testMethodArn), { + expect(stack.resolve(method.testMethodArn)).toEqual({ 'Fn::Join': [ '', [ @@ -277,10 +277,10 @@ export = { ], }); - test.done(); - }, - 'integration "credentialsRole" can be used to assume a role when calling backend'(test: Test) { + }); + + test('integration "credentialsRole" can be used to assume a role when calling backend', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -295,15 +295,15 @@ export = { })); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { Credentials: { 'Fn::GetAtt': ['MyRoleF48FFE04', 'Arn'] }, }, - })); - test.done(); - }, + }); + + }); - 'integration "credentialsPassthrough" can be used to passthrough user credentials to backend'(test: Test) { + test('integration "credentialsPassthrough" can be used to passthrough user credentials to backend', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -317,15 +317,15 @@ export = { })); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { Integration: { Credentials: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':iam::*:user/*']] }, }, - })); - test.done(); - }, + }); - 'methodResponse set one or more method responses via options'(test: Test) { + }); + + test('methodResponse set one or more method responses via options', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -356,7 +356,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', MethodResponses: [{ StatusCode: '200', @@ -375,12 +375,12 @@ export = { 'text/plain': 'Error', }, }], - })); + }); - test.done(); - }, - 'multiple integration responses can be used'(test: Test) { // @see https://github.com/aws/aws-cdk/issues/1608 + }); + + test('multiple integration responses can be used', () => { // @see https://github.com/aws/aws-cdk/issues/1608 // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -405,7 +405,7 @@ export = { })); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { Integration: { IntegrationHttpMethod: 'POST', IntegrationResponses: [ @@ -422,11 +422,11 @@ export = { Type: 'AWS', Uri: { 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':apigateway:', { Ref: 'AWS::Region' }, ':foo-service:action/BarAction']] }, }, - })); - test.done(); - }, + }); + + }); - 'method is always set as uppercase'(test: Test) { + test('method is always set as uppercase', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -437,13 +437,13 @@ export = { api.root.addMethod('PUT'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { HttpMethod: 'POST' })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET' })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { HttpMethod: 'PUT' })); - test.done(); - }, + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'POST' }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET' }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'PUT' }); + + }); - 'requestModel can be set'(test: Test) { + test('requestModel can be set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -469,17 +469,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', RequestModels: { 'application/json': { Ref: stack.getLogicalId(model.node.findChild('Resource') as cdk.CfnElement) }, }, - })); + }); - test.done(); - }, - 'methodResponse has a mix of response modes'(test: Test) { + }); + + test('methodResponse has a mix of response modes', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -519,7 +519,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', MethodResponses: [{ StatusCode: '200', @@ -539,12 +539,12 @@ export = { 'text/html': { Ref: stack.getLogicalId(htmlModel.node.findChild('Resource') as cdk.CfnElement) }, }, }], - })); + }); + - test.done(); - }, + }); - 'method has a request validator'(test: Test) { + test('method has a request validator', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -563,19 +563,19 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { RequestValidatorId: { Ref: stack.getLogicalId(validator.node.findChild('Resource') as cdk.CfnElement) }, - })); - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, ValidateRequestBody: true, ValidateRequestParameters: false, - })); + }); + - test.done(); - }, + }); - 'use default requestParameters'(test: Test) { + test('use default requestParameters', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { @@ -596,17 +596,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { OperationName: 'defaultRequestParameters', RequestParameters: { 'method.request.path.proxy': true, }, - })); + }); + - test.done(); - }, + }); - 'authorizer is bound correctly'(test: Test) { + test('authorizer is bound correctly', () => { const stack = new cdk.Stack(); const restApi = new apigw.RestApi(stack, 'myrestapi'); @@ -614,16 +614,16 @@ export = { authorizer: DUMMY_AUTHORIZER, }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'ANY', AuthorizationType: 'CUSTOM', AuthorizerId: DUMMY_AUTHORIZER.authorizerId, - })); + }); - test.done(); - }, - 'authorizer via default method options'(test: Test) { + }); + + test('authorizer via default method options', () => { const stack = new cdk.Stack(); const func = new lambda.Function(stack, 'myfunction', { @@ -644,31 +644,31 @@ export = { }); restApi.root.addMethod('ANY'); - expect(stack).to(haveResource('AWS::ApiGateway::Authorizer', { + expect(stack).toHaveResource('AWS::ApiGateway::Authorizer', { Name: 'myauthorizer1', Type: 'TOKEN', RestApiId: stack.resolve(restApi.restApiId), - })); + }); - test.done(); - }, - 'fails when authorization type does not match the authorizer'(test: Test) { + }); + + test('fails when authorization type does not match the authorizer', () => { const stack = new cdk.Stack(); const restApi = new apigw.RestApi(stack, 'myrestapi'); - test.throws(() => { + expect(() => { restApi.root.addMethod('ANY', undefined, { authorizationType: apigw.AuthorizationType.IAM, authorizer: DUMMY_AUTHORIZER, }); - }, /Authorization type is set to AWS_IAM which is different from what is required by the authorizer/); + }).toThrow(/Authorization type is set to AWS_IAM which is different from what is required by the authorizer/); + - test.done(); - }, + }); - 'fails when authorization type does not match the authorizer in default method options'(test: Test) { + test('fails when authorization type does not match the authorizer in default method options', () => { const stack = new cdk.Stack(); const restApi = new apigw.RestApi(stack, 'myrestapi', { @@ -677,16 +677,16 @@ export = { }, }); - test.throws(() => { + expect(() => { restApi.root.addMethod('ANY', undefined, { authorizationType: apigw.AuthorizationType.NONE, }); - }, /Authorization type is set to NONE which is different from what is required by the authorizer/); + }).toThrow(/Authorization type is set to NONE which is different from what is required by the authorizer/); - test.done(); - }, - 'method has Auth Scopes'(test: Test) { + }); + + test('method has Auth Scopes', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -702,15 +702,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ApiKeyRequired: true, AuthorizationScopes: ['AuthScope1', 'AuthScope2'], - })); + }); + - test.done(); - }, + }); - 'use default Auth Scopes'(test: Test) { + test('use default Auth Scopes', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { @@ -731,15 +731,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { OperationName: 'defaultAuthScopes', AuthorizationScopes: ['DefaultAuth'], - })); + }); + - test.done(); - }, + }); - 'Method options Auth Scopes is picked up'(test: Test) { + test('Method options Auth Scopes is picked up', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { @@ -761,15 +761,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { ApiKeyRequired: true, AuthorizationScopes: ['MethodAuthScope'], - })); + }); - test.done(); - }, - 'Auth Scopes absent'(test: Test) { + }); + + test('Auth Scopes absent', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { @@ -787,15 +787,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { OperationName: 'authScopesAbsent', AuthorizationScopes: ABSENT, - })); + }); - test.done(); - }, - 'method has a request validator with provided properties'(test: Test) { + }); + + test('method has a request validator with provided properties', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -814,17 +814,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: stack.resolve(api.restApiId), ValidateRequestBody: true, ValidateRequestParameters: false, Name: 'test-validator', - })); + }); + - test.done(); - }, + }); - 'method does not have a request validator'(test: Test) { + test('method does not have a request validator', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -836,14 +836,14 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { RequestValidatorId: ABSENT, - })); + }); + - test.done(); - }, + }); - 'method does not support both request validator and request validator options'(test: Test) { + test('method does not support both request validator and request validator options', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { deploy: false }); @@ -867,13 +867,13 @@ export = { }; // THEN - test.throws(() => new apigw.Method(stack, 'method', methodProps), - /Only one of 'requestValidator' or 'requestValidatorOptions' must be specified./); + expect(() => new apigw.Method(stack, 'method', methodProps)) + .toThrow(/Only one of 'requestValidator' or 'requestValidatorOptions' must be specified./); - test.done(); - }, - '"restApi" and "api" properties return the RestApi correctly'(test: Test) { + }); + + test('"restApi" and "api" properties return the RestApi correctly', () => { // GIVEN const stack = new cdk.Stack(); @@ -882,14 +882,14 @@ export = { const method = api.root.addResource('pets').addMethod('GET'); // THEN - test.ok(method.restApi); - test.ok(method.api); - test.deepEqual(stack.resolve(method.api.restApiId), stack.resolve(method.restApi.restApiId)); + expect(method.restApi).toBeDefined(); + expect(method.api).toBeDefined(); + expect(stack.resolve(method.api.restApiId)).toEqual(stack.resolve(method.restApi.restApiId)); + - test.done(); - }, + }); - '"restApi" throws an error on imported while "api" returns correctly'(test: Test) { + test('"restApi" throws an error on imported while "api" returns correctly', () => { // GIVEN const stack = new cdk.Stack(); @@ -901,9 +901,9 @@ export = { const method = api.root.addResource('pets').addMethod('GET'); // THEN - test.throws(() => method.restApi, /not available on Resource not connected to an instance of RestApi/); - test.ok(method.api); + expect(() => method.restApi).toThrow(/not available on Resource not connected to an instance of RestApi/); + expect(method.api).toBeDefined(); - test.done(); - }, -}; + + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.model.ts b/packages/@aws-cdk/aws-apigateway/test/model.test.ts similarity index 83% rename from packages/@aws-cdk/aws-apigateway/test/test.model.ts rename to packages/@aws-cdk/aws-apigateway/test/model.test.ts index 9f0907b1e66f2..cb741f77e2d83 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.model.ts +++ b/packages/@aws-cdk/aws-apigateway/test/model.test.ts @@ -1,10 +1,9 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -export = { - 'default setup'(test: Test) { +describe('model', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true }); @@ -25,7 +24,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Model', { + expect(stack).toHaveResource('AWS::ApiGateway::Model', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, Schema: { $schema: 'http://json-schema.org/draft-04/schema#', @@ -34,12 +33,10 @@ export = { properties: { message: { type: 'string' } }, }, ContentType: 'application/json', - })); - - test.done(); - }, + }); + }); - 'no deployment'(test: Test) { + test('no deployment', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigw.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true }); @@ -60,7 +57,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Model', { + expect(stack).toHaveResource('AWS::ApiGateway::Model', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, Schema: { $schema: 'http://json-schema.org/draft-04/schema#', @@ -68,8 +65,6 @@ export = { type: 'object', properties: { message: { type: 'string' } }, }, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.requestvalidator.ts b/packages/@aws-cdk/aws-apigateway/test/requestvalidator.test.ts similarity index 78% rename from packages/@aws-cdk/aws-apigateway/test/test.requestvalidator.ts rename to packages/@aws-cdk/aws-apigateway/test/requestvalidator.test.ts index b264f85c0733c..0838db161f8db 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.requestvalidator.ts +++ b/packages/@aws-cdk/aws-apigateway/test/requestvalidator.test.ts @@ -1,10 +1,9 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'default setup'(test: Test) { +describe('request validator', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: true }); @@ -21,16 +20,14 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, ValidateRequestBody: true, ValidateRequestParameters: false, - })); - - test.done(); - }, + }); + }); - 'no deployment'(test: Test) { + test('no deployment', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -48,13 +45,11 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as cdk.CfnElement) }, Name: 'my-model', ValidateRequestBody: false, ValidateRequestParameters: true, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.resource.ts b/packages/@aws-cdk/aws-apigateway/test/resource.test.ts similarity index 66% rename from packages/@aws-cdk/aws-apigateway/test/test.resource.ts rename to packages/@aws-cdk/aws-apigateway/test/resource.test.ts index 43db34771346f..ecad61cb1905c 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.resource.ts +++ b/packages/@aws-cdk/aws-apigateway/test/resource.test.ts @@ -1,12 +1,11 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import { Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; /* eslint-disable quote-props */ -export = { - 'ProxyResource defines a "{proxy+}" resource with ANY method'(test: Test) { +describe('resource', () => { + test('ProxyResource defines a "{proxy+}" resource with ANY method', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -17,7 +16,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { 'ParentId': { 'Fn::GetAtt': [ 'apiC8550315', @@ -28,9 +27,9 @@ export = { 'RestApiId': { 'Ref': 'apiC8550315', }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'ANY', 'ResourceId': { 'Ref': 'proxy3A1DA9C7', @@ -42,12 +41,12 @@ export = { 'Integration': { 'Type': 'MOCK', }, - })); + }); - test.done(); - }, - 'if "anyMethod" is false, then an ANY method will not be defined'(test: Test) { + }); + + test('if "anyMethod" is false, then an ANY method will not be defined', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -61,14 +60,14 @@ export = { proxy.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource')); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'GET' })); - expect(stack).notTo(haveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'ANY' })); + expect(stack).toHaveResource('AWS::ApiGateway::Resource'); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'GET' }); + expect(stack).not.toHaveResource('AWS::ApiGateway::Method', { 'HttpMethod': 'ANY' }); + - test.done(); - }, + }); - 'addProxy can be used on any resource to attach a proxy from that route'(test: Test) { + test('addProxy can be used on any resource to attach a proxy from that route', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api', { @@ -79,7 +78,7 @@ export = { const v2 = api.root.addResource('v2'); v2.addProxy(); - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ 'Resources': { 'apiC8550315': { 'Type': 'AWS::ApiGateway::RestApi', @@ -133,10 +132,10 @@ export = { }, }); - test.done(); - }, - 'if proxy is added to root, proxy methods are automatically duplicated (with integration and options)'(test: Test) { + }); + + test('if proxy is added to root, proxy methods are automatically duplicated (with integration and options)', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -155,7 +154,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'DELETE', ResourceId: { Ref: 'apiproxy4EA44110' }, Integration: { @@ -163,9 +162,9 @@ export = { Type: 'MOCK', }, OperationName: 'DeleteMe', - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'DELETE', ResourceId: { 'Fn::GetAtt': ['apiC8550315', 'RootResourceId'] }, Integration: { @@ -173,12 +172,12 @@ export = { Type: 'MOCK', }, OperationName: 'DeleteMe', - })); + }); + - test.done(); - }, + }); - 'if proxy is added to root, proxy methods are only added if they are not defined already on the root resource'(test: Test) { + test('if proxy is added to root, proxy methods are only added if they are not defined already on the root resource', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -189,10 +188,10 @@ export = { proxy.addMethod('POST'); // THEN - test.done(); - }, - 'url for a resource'(test: Test) { + }); + + test('url for a resource', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -202,7 +201,7 @@ export = { const cResource = aResource.addResource('b').addResource('c'); // THEN - test.deepEqual(stack.resolve(aResource.url), { + expect(stack.resolve(aResource.url)).toEqual({ 'Fn::Join': [ '', [ @@ -218,7 +217,7 @@ export = { ], ], }); - test.deepEqual(stack.resolve(cResource.url), { + expect(stack.resolve(cResource.url)).toEqual({ 'Fn::Join': [ '', [ @@ -234,23 +233,23 @@ export = { ], ], }); - test.done(); - }, - 'getResource': { + }); + + describe('getResource', () => { - 'root resource': { - 'returns undefined if not found'(test: Test) { + describe('root resource', () => { + test('returns undefined if not found', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); // THEN - test.deepEqual(api.root.getResource('boom'), undefined); - test.done(); - }, + expect(api.root.getResource('boom')).toBeUndefined(); + + }); - 'returns the resource if found'(test: Test) { + test('returns the resource if found', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -260,12 +259,12 @@ export = { const r2 = api.root.addResource('world'); // THEN - test.deepEqual(api.root.getResource('hello'), r1); - test.deepEqual(api.root.getResource('world'), r2); - test.done(); - }, + expect(api.root.getResource('hello')).toEqual(r1); + expect(api.root.getResource('world')).toEqual(r2); + + }); - 'returns the resource even if it was created using "new"'(test: Test) { + test('returns the resource even if it was created using "new"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -277,26 +276,26 @@ export = { }); // THEN - test.deepEqual(api.root.getResource('yello'), r1); - test.done(); - }, + expect(api.root.getResource('yello')).toEqual(r1); - }, + }); - 'non-root': { + }); - 'returns undefined if not found'(test: Test) { + describe('non-root', () => { + + test('returns undefined if not found', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); const res = api.root.addResource('boom'); // THEN - test.deepEqual(res.getResource('child-of-boom'), undefined); - test.done(); - }, + expect(res.getResource('child-of-boom')).toBeUndefined(); - 'returns the resource if found'(test: Test) { + }); + + test('returns the resource if found', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -307,12 +306,12 @@ export = { const r2 = child.addResource('world'); // THEN - test.deepEqual(child.getResource('hello'), r1); - test.deepEqual(child.getResource('world'), r2); - test.done(); - }, + expect(child.getResource('hello')).toEqual(r1); + expect(child.getResource('world')).toEqual(r2); - 'returns the resource even if created with "new"'(test: Test) { + }); + + test('returns the resource even if created with "new"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -327,28 +326,28 @@ export = { }); // THEN - test.deepEqual(child.getResource('hello'), r1); - test.deepEqual(child.getResource('outside-world'), r2); - test.done(); + expect(child.getResource('hello')).toEqual(r1); + expect(child.getResource('outside-world')).toEqual(r2); - }, - }, - 'resourceForPath': { + }); + }); + + describe('resourceForPath', () => { - 'empty path or "/" (on root) returns this'(test: Test) { + test('empty path or "/" (on root) returns this', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); // THEN - test.deepEqual(api.root.resourceForPath(''), api.root); - test.deepEqual(api.root.resourceForPath('/'), api.root); - test.deepEqual(api.root.resourceForPath('///'), api.root); - test.done(); - }, + expect(api.root.resourceForPath('')).toEqual(api.root); + expect(api.root.resourceForPath('/')).toEqual(api.root); + expect(api.root.resourceForPath('///')).toEqual(api.root); + + }); - 'returns a resource for that path'(test: Test) { + test('returns a resource for that path', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -357,11 +356,11 @@ export = { const resource = api.root.resourceForPath('/boom/trach'); // THEN - test.deepEqual(resource.path, '/boom/trach'); - test.done(); - }, + expect(resource.path).toEqual('/boom/trach'); + + }); - 'resources not created if not needed'(test: Test) { + test('resources not created if not needed', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'MyRestApi'); @@ -372,19 +371,19 @@ export = { // THEN const parent = api.root.getResource('boom'); - test.ok(parent); - test.deepEqual(parent!.path, '/boom'); + expect(parent).toBeDefined(); + expect(parent!.path).toEqual('/boom'); - test.same(trach.parentResource, parent); - test.deepEqual(trach.parentResource!.path, '/boom'); + expect(trach.parentResource).toBe(parent); + expect(trach.parentResource!.path).toEqual('/boom'); const bam2 = api.root.resourceForPath('/boom/bam'); - test.same(bam1, bam2); - test.deepEqual(bam1.parentResource!.path, '/boom'); - test.done(); - }, + expect(bam1).toBe(bam2); + expect(bam1.parentResource!.path).toEqual('/boom'); + + }); - }, - }, + }); + }); -}; +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.restapi.ts b/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts similarity index 70% rename from packages/@aws-cdk/aws-apigateway/test/test.restapi.ts rename to packages/@aws-cdk/aws-apigateway/test/restapi.test.ts index dfbe61d180e28..8b1c159e2baa5 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.restapi.ts +++ b/packages/@aws-cdk/aws-apigateway/test/restapi.test.ts @@ -1,13 +1,11 @@ -import { ABSENT, expect, haveResource, haveResourceLike, ResourcePart, SynthUtils } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ABSENT, ResourcePart, SynthUtils } from '@aws-cdk/assert'; import { GatewayVpcEndpoint } from '@aws-cdk/aws-ec2'; import { App, CfnElement, CfnResource, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigw from '../lib'; -/* eslint-disable max-len */ - -export = { - 'minimal setup'(test: Test) { +describe('restapi', () => { + test('minimal setup', () => { // GIVEN const stack = new Stack(); @@ -16,7 +14,7 @@ export = { api.root.addMethod('GET'); // must have at least one method or an API definition // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { myapi4C7BF186: { Type: 'AWS::ApiGateway::RestApi', @@ -96,11 +94,9 @@ export = { }, }, }); + }); - test.done(); - }, - - 'restApiName is set correctly'(test: Test) { + test('restApiName is set correctly', () => { // GIVEN const stack = new Stack(); @@ -111,19 +107,17 @@ export = { }); // THEN - test.deepEqual(myapi.restApiName, 'myapi'); - test.deepEqual(yourapi.restApiName, 'namedapi'); - test.done(); - }, + expect(myapi.restApiName).toEqual('myapi'); + expect(yourapi.restApiName).toEqual('namedapi'); + }); - 'defaultChild is set correctly'(test: Test) { + test('defaultChild is set correctly', () => { const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); - test.ok(api.node.defaultChild instanceof apigw.CfnRestApi); - test.done(); - }, + expect(api.node.defaultChild instanceof apigw.CfnRestApi).toBeDefined(); + }); - '"name" is defaulted to resource physical name'(test: Test) { + test('"name" is defaulted to resource physical name', () => { // GIVEN const stack = new Stack(); @@ -136,14 +130,12 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { Name: 'restapi', - })); - - test.done(); - }, + }); + }); - 'fails in synthesis if there are no methods or definition'(test: Test) { + test('fails in synthesis if there are no methods or definition', () => { // GIVEN const app = new App(); const stack = new Stack(app, 'my-stack'); @@ -154,11 +146,10 @@ export = { api.root.addResource('bar').addResource('goo'); // THEN - test.throws(() => app.synth(), /The REST API doesn't contain any methods/); - test.done(); - }, + expect(() => app.synth()).toThrow(/The REST API doesn't contain any methods/); + }); - '"addResource" can be used on "IRestApiResource" to form a tree'(test: Test) { + test('"addResource" can be used on "IRestApiResource" to form a tree', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'restapi', { @@ -175,25 +166,23 @@ export = { foo.addResource('{hello}'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'foo', ParentId: { 'Fn::GetAtt': ['restapiC5611D27', 'RootResourceId'] }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'bar', ParentId: { 'Fn::GetAtt': ['restapiC5611D27', 'RootResourceId'] }, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: '{hello}', ParentId: { Ref: 'restapifooF697E056' }, - })); - - test.done(); - }, + }); + }); - '"addResource" allows configuration of proxy paths'(test: Test) { + test('"addResource" allows configuration of proxy paths', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'restapi', { @@ -207,14 +196,13 @@ export = { proxy.addMethod('ANY'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: '{proxy+}', ParentId: { 'Fn::GetAtt': ['restapiC5611D27', 'RootResourceId'] }, - })); - test.done(); - }, + }); + }); - '"addMethod" can be used to add methods to resources'(test: Test) { + test('"addMethod" can be used to add methods to resources', () => { // GIVEN const stack = new Stack(); @@ -226,7 +214,7 @@ export = { r1.addMethod('POST'); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { restapiC5611D27: { Type: 'AWS::ApiGateway::RestApi', @@ -286,11 +274,9 @@ export = { }, }, }); + }); - test.done(); - }, - - 'resourcePath returns the full path of the resource within the API'(test: Test) { + test('resourcePath returns the full path of the resource within the API', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'restapi'); @@ -303,62 +289,57 @@ export = { const r2 = api.root.addResource('r2'); // THEN - test.deepEqual(api.root.path, '/'); - test.deepEqual(r1.path, '/r1'); - test.deepEqual(r11.path, '/r1/r1_1'); - test.deepEqual(r12.path, '/r1/r1_2'); - test.deepEqual(r121.path, '/r1/r1_2/r1_2_1'); - test.deepEqual(r2.path, '/r2'); - test.done(); - }, - - 'resource path part validation'(test: Test) { + expect(api.root.path).toEqual('/'); + expect(r1.path).toEqual('/r1'); + expect(r11.path).toEqual('/r1/r1_1'); + expect(r12.path).toEqual('/r1/r1_2'); + expect(r121.path).toEqual('/r1/r1_2/r1_2_1'); + expect(r2.path).toEqual('/r2'); + }); + + test('resource path part validation', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'restapi'); // THEN - test.throws(() => api.root.addResource('foo/')); + expect(() => api.root.addResource('foo/')).toThrow(); api.root.addResource('boom-bam'); - test.throws(() => api.root.addResource('illegal()')); + expect(() => api.root.addResource('illegal()')).toThrow(); api.root.addResource('{foo}'); - test.throws(() => api.root.addResource('foo{bar}')); - test.done(); - }, + expect(() => api.root.addResource('foo{bar}')).toThrow(); + }); - 'fails if "deployOptions" is set with "deploy" disabled'(test: Test) { + test('fails if "deployOptions" is set with "deploy" disabled', () => { // GIVEN const stack = new Stack(); // THEN - test.throws(() => new apigw.RestApi(stack, 'myapi', { + expect(() => new apigw.RestApi(stack, 'myapi', { deploy: false, deployOptions: { cachingEnabled: true }, - }), /Cannot set 'deployOptions' if 'deploy' is disabled/); + })).toThrow(/Cannot set 'deployOptions' if 'deploy' is disabled/); + }); - test.done(); - }, - - 'CloudWatch role is created for API Gateway'(test: Test) { + test('CloudWatch role is created for API Gateway', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::IAM::Role')); - expect(stack).to(haveResource('AWS::ApiGateway::Account')); - test.done(); - }, + expect(stack).toHaveResource('AWS::IAM::Role'); + expect(stack).toHaveResource('AWS::ApiGateway::Account'); + }); - '"url" and "urlForPath" return the URL endpoints of the deployed API'(test: Test) { + test('"url" and "urlForPath" return the URL endpoints of the deployed API', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); api.root.addMethod('GET'); // THEN - test.deepEqual(stack.resolve(api.url), { + expect(stack.resolve(api.url)).toEqual({ 'Fn::Join': ['', ['https://', @@ -371,7 +352,7 @@ export = { { Ref: 'apiDeploymentStageprod896C8101' }, '/']], }); - test.deepEqual(stack.resolve(api.urlForPath('/foo/bar')), { + expect(stack.resolve(api.urlForPath('/foo/bar'))).toEqual({ 'Fn::Join': ['', ['https://', @@ -384,33 +365,30 @@ export = { { Ref: 'apiDeploymentStageprod896C8101' }, '/foo/bar']], }); - test.done(); - }, + }); - '"urlForPath" would not work if there is no deployment'(test: Test) { + test('"urlForPath" would not work if there is no deployment', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api', { deploy: false }); api.root.addMethod('GET'); // THEN - test.throws(() => api.url, /Cannot determine deployment stage for API from "deploymentStage". Use "deploy" or explicitly set "deploymentStage"/); - test.throws(() => api.urlForPath('/foo'), /Cannot determine deployment stage for API from "deploymentStage". Use "deploy" or explicitly set "deploymentStage"/); - test.done(); - }, + expect(() => api.url).toThrow(/Cannot determine deployment stage for API from "deploymentStage". Use "deploy" or explicitly set "deploymentStage"/); + expect(() => api.urlForPath('/foo')).toThrow(/Cannot determine deployment stage for API from "deploymentStage". Use "deploy" or explicitly set "deploymentStage"/); + }); - '"urlForPath" requires that path will begin with "/"'(test: Test) { + test('"urlForPath" requires that path will begin with "/"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); api.root.addMethod('GET'); // THEN - test.throws(() => api.urlForPath('foo'), /Path must begin with \"\/\": foo/); - test.done(); - }, + expect(() => api.urlForPath('foo')).toThrow(/Path must begin with \"\/\": foo/); + }); - '"executeApiArn" returns the execute-api ARN for a resource/method'(test: Test) { + test('"executeApiArn" returns the execute-api ARN for a resource/method', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); @@ -420,7 +398,7 @@ export = { const arn = api.arnForExecuteApi('method', '/path', 'stage'); // THEN - test.deepEqual(stack.resolve(arn), { + expect(stack.resolve(arn)).toEqual({ 'Fn::Join': ['', ['arn:', @@ -433,21 +411,19 @@ export = { { Ref: 'apiC8550315' }, '/stage/method/path']], }); - test.done(); - }, + }); - '"executeApiArn" path must begin with "/"'(test: Test) { + test('"executeApiArn" path must begin with "/"', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'api'); api.root.addMethod('GET'); // THEN - test.throws(() => api.arnForExecuteApi('method', 'hey-path', 'stage'), /"path" must begin with a "\/": 'hey-path'/); - test.done(); - }, + expect(() => api.arnForExecuteApi('method', 'hey-path', 'stage')).toThrow(/"path" must begin with a "\/": 'hey-path'/); + }); - '"executeApiArn" will convert ANY to "*"'(test: Test) { + test('"executeApiArn" will convert ANY to "*"', () => { // GIVEN const stack = new Stack(); @@ -455,7 +431,7 @@ export = { const method = api.root.addMethod('ANY'); // THEN - test.deepEqual(stack.resolve(method.methodArn), { + expect(stack.resolve(method.methodArn)).toEqual({ 'Fn::Join': ['', ['arn:', @@ -470,10 +446,9 @@ export = { { Ref: 'apiDeploymentStageprod896C8101' }, '/*/']], }); - test.done(); - }, + }); - '"endpointTypes" can be used to specify endpoint configuration for the api'(test: Test) { + test('"endpointTypes" can be used to specify endpoint configuration for the api', () => { // GIVEN const stack = new Stack(); @@ -485,18 +460,17 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { EndpointConfiguration: { Types: [ 'EDGE', 'PRIVATE', ], }, - })); - test.done(); - }, + }); + }); - '"endpointConfiguration" can be used to specify endpoint types for the api'(test: Test) { + test('"endpointConfiguration" can be used to specify endpoint types for the api', () => { // GIVEN const stack = new Stack(); @@ -510,15 +484,14 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { EndpointConfiguration: { Types: ['EDGE', 'PRIVATE'], }, - })); - test.done(); - }, + }); + }); - '"endpointConfiguration" can be used to specify vpc endpoints on the API'(test: Test) { + test('"endpointConfiguration" can be used to specify vpc endpoints on the API', () => { // GIVEN const stack = new Stack(); @@ -536,7 +509,7 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { EndpointConfiguration: { Types: [ 'EDGE', @@ -547,26 +520,24 @@ export = { 'vpcEndpoint2', ], }, - })); - test.done(); - }, + }); + }); - '"endpointTypes" and "endpointConfiguration" can NOT both be used to specify endpoint configuration for the api'(test: Test) { + test('"endpointTypes" and "endpointConfiguration" can NOT both be used to specify endpoint configuration for the api', () => { // GIVEN const stack = new Stack(); // THEN - test.throws(() => new apigw.RestApi(stack, 'api', { + expect(() => new apigw.RestApi(stack, 'api', { endpointConfiguration: { types: [apigw.EndpointType.PRIVATE], vpcEndpoints: [GatewayVpcEndpoint.fromGatewayVpcEndpointId(stack, 'ImportedEndpoint', 'vpcEndpoint')], }, endpointTypes: [apigw.EndpointType.PRIVATE], - }), /Only one of the RestApi props, endpointTypes or endpointConfiguration, is allowed/); - test.done(); - }, + })).toThrow(/Only one of the RestApi props, endpointTypes or endpointConfiguration, is allowed/); + }); - '"cloneFrom" can be used to clone an existing API'(test: Test) { + test('"cloneFrom" can be used to clone an existing API', () => { // GIVEN const stack = new Stack(); const cloneFrom = apigw.RestApi.fromRestApiId(stack, 'RestApi', 'foobar'); @@ -578,15 +549,13 @@ export = { api.root.addMethod('GET'); - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { CloneFrom: 'foobar', Name: 'api', - })); - - test.done(); - }, + }); + }); - 'allow taking a dependency on the rest api (includes deployment and stage)'(test: Test) { + test('allow taking a dependency on the rest api (includes deployment and stage)', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); @@ -597,7 +566,7 @@ export = { resource.node.addDependency(api); // THEN - expect(stack).to(haveResource('My::Resource', { + expect(stack).toHaveResource('My::Resource', { DependsOn: [ 'myapiAccountC3A4750C', 'myapiCloudWatchRoleEB425128', @@ -606,12 +575,10 @@ export = { 'myapiDeploymentStageprod329F21FF', 'myapi162F20B8', ], - }, ResourcePart.CompleteDefinition)); + }, ResourcePart.CompleteDefinition); + }); - test.done(); - }, - - 'defaultIntegration and defaultMethodOptions can be used at any level'(test: Test) { + test('defaultIntegration and defaultMethodOptions can be used at any level', () => { // GIVEN const stack = new Stack(); const rootInteg = new apigw.AwsIntegration({ @@ -655,43 +622,41 @@ export = { // THEN // CASE #1 - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'GET', ResourceId: { 'Fn::GetAtt': ['myapi162F20B8', 'RootResourceId'] }, Integration: { Type: 'AWS' }, AuthorizerId: 'AUTHID', AuthorizationType: 'AWS_IAM', - })); + }); // CASE #2 - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'POST', ResourceId: { Ref: 'myapichildA0A65412' }, Integration: { Type: 'AWS' }, AuthorizerId: 'AUTHID', AuthorizationType: 'COGNITO_USER_POOLS', - })); + }); // CASE #3 - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'DELETE', Integration: { Type: 'MOCK' }, AuthorizerId: 'AUTHID2', AuthorizationType: 'AWS_IAM', - })); + }); // CASE #4 - expect(stack).to(haveResourceLike('AWS::ApiGateway::Method', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', { HttpMethod: 'PUT', Integration: { Type: 'AWS' }, AuthorizerId: 'AUTHID2', AuthorizationType: 'AWS_IAM', - })); - - test.done(); - }, + }); + }); - 'addApiKey is supported'(test: Test) { + test('addApiKey is supported', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); @@ -704,7 +669,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { Enabled: true, Name: 'myApiKey1', StageKeys: [ @@ -714,12 +679,10 @@ export = { }, ], Value: '01234567890ABCDEFabcdef', - })); - - test.done(); - }, + }); + }); - 'addModel is supported'(test: Test) { + test('addModel is supported', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); @@ -736,7 +699,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Model', { + expect(stack).toHaveResource('AWS::ApiGateway::Model', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as CfnElement) }, Schema: { $schema: 'http://json-schema.org/draft-04/schema#', @@ -744,12 +707,10 @@ export = { type: 'object', properties: { message: { type: 'string' } }, }, - })); - - test.done(); - }, + }); + }); - 'addRequestValidator is supported'(test: Test) { + test('addRequestValidator is supported', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'myapi'); @@ -768,23 +729,22 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as CfnElement) }, Name: 'Parameters', ValidateRequestBody: false, ValidateRequestParameters: true, - })); + }); - expect(stack).to(haveResource('AWS::ApiGateway::RequestValidator', { + expect(stack).toHaveResource('AWS::ApiGateway::RequestValidator', { RestApiId: { Ref: stack.getLogicalId(api.node.findChild('Resource') as CfnElement) }, Name: 'Body', ValidateRequestBody: true, ValidateRequestParameters: false, - })); + }); + }); - test.done(); - }, - 'creates output with given "exportName"'(test: Test) { + test('creates output with given "exportName"', () => { // GIVEN const stack = new Stack(); @@ -793,7 +753,7 @@ export = { api.root.addMethod('GET'); // THEN - test.deepEqual(SynthUtils.toCloudFormation(stack).Outputs, { + expect(SynthUtils.toCloudFormation(stack).Outputs).toEqual({ myapiEndpoint8EB17201: { Value: { 'Fn::Join': [ @@ -814,11 +774,9 @@ export = { Export: { Name: 'my-given-export-name' }, }, }); + }); - test.done(); - }, - - 'creates output when "exportName" is not specified'(test: Test) { + test('creates output when "exportName" is not specified', () => { // GIVEN const stack = new Stack(); @@ -827,7 +785,7 @@ export = { api.root.addMethod('GET'); // THEN - test.deepEqual(SynthUtils.toCloudFormation(stack).Outputs, { + expect(SynthUtils.toCloudFormation(stack).Outputs).toEqual({ myapiEndpoint8EB17201: { Value: { 'Fn::Join': [ @@ -847,11 +805,9 @@ export = { }, }, }); + }); - test.done(); - }, - - 'gateway response resource is created'(test: Test) { + test('gateway response resource is created', () => { // GIVEN const stack = new Stack(); @@ -867,18 +823,16 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::GatewayResponse', { + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { ResponseType: 'ACCESS_DENIED', RestApiId: stack.resolve(api.restApiId), StatusCode: ABSENT, ResponseParameters: ABSENT, ResponseTemplates: ABSENT, - })); - - test.done(); - }, + }); + }); - 'gateway response resource is created with parameters'(test: Test) { + test('gateway response resource is created with parameters', () => { // GIVEN const stack = new Stack(); @@ -899,7 +853,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::GatewayResponse', { + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { ResponseType: 'AUTHORIZER_FAILURE', RestApiId: stack.resolve(api.restApiId), StatusCode: '500', @@ -908,12 +862,10 @@ export = { 'gatewayresponse.header.test-key': 'test-value', }, ResponseTemplates: ABSENT, - })); - - test.done(); - }, + }); + }); - 'gateway response resource is created with templates'(test: Test) { + test('gateway response resource is created with templates', () => { // GIVEN const stack = new Stack(); @@ -933,7 +885,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::GatewayResponse', { + expect(stack).toHaveResource('AWS::ApiGateway::GatewayResponse', { ResponseType: 'AUTHORIZER_FAILURE', RestApiId: stack.resolve(api.restApiId), StatusCode: '500', @@ -941,12 +893,10 @@ export = { ResponseTemplates: { 'application/json': '{ "message": $context.error.messageString, "statusCode": "488" }', }, - })); - - test.done(); - }, + }); + }); - '"restApi" and "api" properties return the RestApi correctly'(test: Test) { + test('"restApi" and "api" properties return the RestApi correctly', () => { // GIVEN const stack = new Stack(); @@ -955,14 +905,12 @@ export = { const method = api.root.addResource('pets').addMethod('GET'); // THEN - test.ok(method.restApi); - test.ok(method.api); - test.deepEqual(stack.resolve(method.api.restApiId), stack.resolve(method.restApi.restApiId)); + expect(method.restApi).toBeDefined(); + expect(method.api).toBeDefined(); + expect(stack.resolve(method.api.restApiId)).toEqual(stack.resolve(method.restApi.restApiId)); + }); - test.done(); - }, - - '"restApi" throws an error on imported while "api" returns correctly'(test: Test) { + test('"restApi" throws an error on imported while "api" returns correctly', () => { // GIVEN const stack = new Stack(); @@ -974,14 +922,12 @@ export = { const method = api.root.addResource('pets').addMethod('GET'); // THEN - test.throws(() => method.restApi, /not available on Resource not connected to an instance of RestApi/); - test.ok(method.api); - - test.done(); - }, + expect(() => method.restApi).toThrow(/not available on Resource not connected to an instance of RestApi/); + expect(method.api).toBeDefined(); + }); - Import: { - 'fromRestApiId()'(test: Test) { + describe('Import', () => { + test('fromRestApiId()', () => { // GIVEN const stack = new Stack(); @@ -989,11 +935,10 @@ export = { const imported = apigw.RestApi.fromRestApiId(stack, 'imported-api', 'api-rxt4498f'); // THEN - test.deepEqual(stack.resolve(imported.restApiId), 'api-rxt4498f'); - test.done(); - }, + expect(stack.resolve(imported.restApiId)).toEqual('api-rxt4498f'); + }); - 'fromRestApiAttributes()'(test: Test) { + test('fromRestApiAttributes()', () => { // GIVEN const stack = new Stack(); @@ -1006,21 +951,19 @@ export = { resource.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'pets', ParentId: stack.resolve(imported.restApiRootResourceId), - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', ResourceId: stack.resolve(resource.resourceId), - })); - - test.done(); - }, - }, + }); + }); + }); - SpecRestApi: { - 'add Methods and Resources'(test: Test) { + describe('SpecRestApi', () => { + test('add Methods and Resources', () => { // GIVEN const stack = new Stack(); const api = new apigw.SpecRestApi(stack, 'SpecRestApi', { @@ -1032,18 +975,17 @@ export = { resource.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Resource', { + expect(stack).toHaveResource('AWS::ApiGateway::Resource', { PathPart: 'pets', ParentId: stack.resolve(api.restApiRootResourceId), - })); - expect(stack).to(haveResource('AWS::ApiGateway::Method', { + }); + expect(stack).toHaveResource('AWS::ApiGateway::Method', { HttpMethod: 'GET', ResourceId: stack.resolve(resource.resourceId), - })); - test.done(); - }, + }); + }); - '"endpointTypes" can be used to specify endpoint configuration for SpecRestApi'(test: Test) { + test('"endpointTypes" can be used to specify endpoint configuration for SpecRestApi', () => { // GIVEN const stack = new Stack(); @@ -1056,20 +998,19 @@ export = { api.root.addMethod('GET'); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::RestApi', { + expect(stack).toHaveResource('AWS::ApiGateway::RestApi', { EndpointConfiguration: { Types: [ 'EDGE', 'PRIVATE', ], }, - })); - test.done(); - }, - }, + }); + }); + }); - Metrics: { - 'metric'(test: Test) { + describe('Metrics', () => { + test('metric', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1080,15 +1021,13 @@ export = { const countMetric = api.metric(metricName, { statistic }); // THEN - test.equal(countMetric.namespace, 'AWS/ApiGateway'); - test.equal(countMetric.metricName, metricName); - test.deepEqual(countMetric.dimensions, { ApiName: 'my-api' }); - test.equal(countMetric.statistic, statistic); - - test.done(); - }, + expect(countMetric.namespace).toEqual('AWS/ApiGateway'); + expect(countMetric.metricName).toEqual(metricName); + expect(countMetric.dimensions).toEqual({ ApiName: 'my-api' }); + expect(countMetric.statistic).toEqual(statistic); + }); - 'metricClientError'(test: Test) { + test('metricClientError', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1098,14 +1037,12 @@ export = { const countMetric = api.metricClientError({ color }); // THEN - test.equal(countMetric.metricName, '4XXError'); - test.equal(countMetric.statistic, 'Sum'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('4XXError'); + expect(countMetric.statistic).toEqual('Sum'); + expect(countMetric.color).toEqual(color); + }); - 'metricServerError'(test: Test) { + test('metricServerError', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1115,14 +1052,12 @@ export = { const countMetric = api.metricServerError({ color }); // THEN - test.equal(countMetric.metricName, '5XXError'); - test.equal(countMetric.statistic, 'Sum'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('5XXError'); + expect(countMetric.statistic).toEqual('Sum'); + expect(countMetric.color).toEqual(color); + }); - 'metricCacheHitCount'(test: Test) { + test('metricCacheHitCount', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1132,14 +1067,12 @@ export = { const countMetric = api.metricCacheHitCount({ color }); // THEN - test.equal(countMetric.metricName, 'CacheHitCount'); - test.equal(countMetric.statistic, 'Sum'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('CacheHitCount'); + expect(countMetric.statistic).toEqual('Sum'); + expect(countMetric.color).toEqual(color); + }); - 'metricCacheMissCount'(test: Test) { + test('metricCacheMissCount', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1149,14 +1082,12 @@ export = { const countMetric = api.metricCacheMissCount({ color }); // THEN - test.equal(countMetric.metricName, 'CacheMissCount'); - test.equal(countMetric.statistic, 'Sum'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('CacheMissCount'); + expect(countMetric.statistic).toEqual('Sum'); + expect(countMetric.color).toEqual(color); + }); - 'metricCount'(test: Test) { + test('metricCount', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1166,14 +1097,12 @@ export = { const countMetric = api.metricCount({ color }); // THEN - test.equal(countMetric.metricName, 'Count'); - test.equal(countMetric.statistic, 'SampleCount'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('Count'); + expect(countMetric.statistic).toEqual('SampleCount'); + expect(countMetric.color).toEqual(color); + }); - 'metricIntegrationLatency'(test: Test) { + test('metricIntegrationLatency', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1183,13 +1112,11 @@ export = { const countMetric = api.metricIntegrationLatency({ color }); // THEN - test.equal(countMetric.metricName, 'IntegrationLatency'); - test.equal(countMetric.color, color); - - test.done(); - }, + expect(countMetric.metricName).toEqual('IntegrationLatency'); + expect(countMetric.color).toEqual(color); + }); - 'metricLatency'(test: Test) { + test('metricLatency', () => { // GIVEN const stack = new Stack(); const api = new apigw.RestApi(stack, 'my-api'); @@ -1199,10 +1126,8 @@ export = { const countMetric = api.metricLatency({ color }); // THEN - test.equal(countMetric.metricName, 'Latency'); - test.equal(countMetric.color, color); - - test.done(); - }, - }, -}; + expect(countMetric.metricName).toEqual('Latency'); + expect(countMetric.color).toEqual(color); + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.stage.ts b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts similarity index 77% rename from packages/@aws-cdk/aws-apigateway/test/test.stage.ts rename to packages/@aws-cdk/aws-apigateway/test/stage.test.ts index b51f30a601e20..1584850913deb 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.stage.ts +++ b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts @@ -1,11 +1,10 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as logs from '@aws-cdk/aws-logs'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'minimal setup'(test: Test) { +describe('stage', () => { + test('minimal setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -16,7 +15,7 @@ export = { new apigateway.Stage(stack, 'my-stage', { deployment }); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { testapiD6451F70: { Type: 'AWS::ApiGateway::RestApi', @@ -68,11 +67,9 @@ export = { }, }, }); + }); - test.done(); - }, - - 'common method settings can be set at the stage level'(test: Test) { + test('common method settings can be set at the stage level', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -87,7 +84,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { MethodSettings: [ { HttpMethod: '*', @@ -96,12 +93,10 @@ export = { ThrottlingRateLimit: 12, }, ], - })); - - test.done(); - }, + }); + }); - 'custom method settings can be set by their path'(test: Test) { + test('custom method settings can be set by their path', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -121,7 +116,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { MethodSettings: [ { HttpMethod: '*', @@ -135,12 +130,10 @@ export = { ResourcePath: '/~1goo~1bar', }, ], - })); - - test.done(); - }, + }); + }); - 'default "cacheClusterSize" is 0.5 (if cache cluster is enabled)'(test: Test) { + test('default "cacheClusterSize" is 0.5 (if cache cluster is enabled)', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -154,15 +147,13 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { CacheClusterEnabled: true, CacheClusterSize: '0.5', - })); - - test.done(); - }, + }); + }); - 'setting "cacheClusterSize" implies "cacheClusterEnabled"'(test: Test) { + test('setting "cacheClusterSize" implies "cacheClusterEnabled"', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -176,15 +167,13 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { CacheClusterEnabled: true, CacheClusterSize: '0.5', - })); - - test.done(); - }, + }); + }); - 'fails when "cacheClusterEnabled" is "false" and "cacheClusterSize" is set'(test: Test) { + test('fails when "cacheClusterEnabled" is "false" and "cacheClusterSize" is set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -192,16 +181,14 @@ export = { api.root.addMethod('GET'); // THEN - test.throws(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { deployment, cacheClusterSize: '0.5', cacheClusterEnabled: false, - }), /Cannot set "cacheClusterSize" to 0.5 and "cacheClusterEnabled" to "false"/); - - test.done(); - }, + })).toThrow(/Cannot set "cacheClusterSize" to 0.5 and "cacheClusterEnabled" to "false"/); + }); - 'if "cachingEnabled" in method settings, implicitly enable cache cluster'(test: Test) { + test('if "cachingEnabled" in method settings, implicitly enable cache cluster', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -215,7 +202,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { CacheClusterEnabled: true, CacheClusterSize: '0.5', MethodSettings: [ @@ -226,12 +213,10 @@ export = { }, ], StageName: 'prod', - })); - - test.done(); - }, + }); + }); - 'if caching cluster is explicitly disabled, do not auto-enable cache cluster when "cachingEnabled" is set in method options'(test: Test) { + test('if caching cluster is explicitly disabled, do not auto-enable cache cluster when "cachingEnabled" is set in method options', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -239,16 +224,14 @@ export = { api.root.addMethod('GET'); // THEN - test.throws(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { cacheClusterEnabled: false, deployment, cachingEnabled: true, - }), /Cannot enable caching for method \/\*\/\* since cache cluster is disabled on stage/); - - test.done(); - }, + })).toThrow(/Cannot enable caching for method \/\*\/\* since cache cluster is disabled on stage/); + }); - 'if only the custom log destination log group is set'(test: Test) { + test('if only the custom log destination log group is set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -263,7 +246,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { AccessLogSetting: { DestinationArn: { 'Fn::GetAtt': [ @@ -274,12 +257,10 @@ export = { Format: '$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId', }, StageName: 'prod', - })); - - test.done(); - }, + }); + }); - 'if the custom log destination log group and format is set'(test: Test) { + test('if the custom log destination log group and format is set', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -296,7 +277,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::Stage', { + expect(stack).toHaveResource('AWS::ApiGateway::Stage', { AccessLogSetting: { DestinationArn: { 'Fn::GetAtt': [ @@ -307,12 +288,10 @@ export = { Format: '{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","user":"$context.identity.user","caller":"$context.identity.caller","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength"}', }, StageName: 'prod', - })); - - test.done(); - }, + }); + }); - 'fails when access log format does not contain `AccessLogFormat.contextRequestId()`'(test: Test) { + test('fails when access log format does not contain `AccessLogFormat.contextRequestId()`', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -324,16 +303,14 @@ export = { const testFormat = apigateway.AccessLogFormat.custom(''); // THEN - test.throws(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { deployment, accessLogDestination: new apigateway.LogGroupLogDestination(testLogGroup), accessLogFormat: testFormat, - }), /Access log must include at least `AccessLogFormat.contextRequestId\(\)`/); - - test.done(); - }, + })).toThrow(/Access log must include at least `AccessLogFormat.contextRequestId\(\)`/); + }); - 'does not fail when access log format is a token'(test: Test) { + test('does not fail when access log format is a token', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -345,16 +322,14 @@ export = { const testFormat = apigateway.AccessLogFormat.custom(cdk.Lazy.stringValue({ produce: () => 'test' })); // THEN - test.doesNotThrow(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { deployment, accessLogDestination: new apigateway.LogGroupLogDestination(testLogGroup), accessLogFormat: testFormat, - })); + })).not.toThrow(); + }); - test.done(); - }, - - 'fails when access log destination is empty'(test: Test) { + test('fails when access log destination is empty', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'test-api', { cloudWatchRole: false, deploy: false }); @@ -365,11 +340,9 @@ export = { const testFormat = apigateway.AccessLogFormat.jsonWithStandardFields(); // THEN - test.throws(() => new apigateway.Stage(stack, 'my-stage', { + expect(() => new apigateway.Stage(stack, 'my-stage', { deployment, accessLogFormat: testFormat, - }), /Access log format is specified without a destination/); - - test.done(); - }, -}; + })).toThrow(/Access log format is specified without a destination/); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.util.ts b/packages/@aws-cdk/aws-apigateway/test/test.util.ts deleted file mode 100644 index 98e3a8ea4be53..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/test.util.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { Test, testCase } from 'nodeunit'; -import { JsonSchema, JsonSchemaType } from '../lib'; -import { JsonSchemaMapper, parseAwsApiCall, parseMethodOptionsPath } from '../lib/util'; - -export = testCase({ - 'parseMethodResourcePath': { - 'fails if path does not start with a /'(test: Test) { - test.throws(() => parseMethodOptionsPath('foo'), /Method options path must start with \'\/\'/); - test.done(); - }, - - 'fails if there are less than two components'(test: Test) { - test.throws(() => parseMethodOptionsPath('/'), /Method options path must include at least two components/); - test.throws(() => parseMethodOptionsPath('/foo'), /Method options path must include at least two components/); - test.throws(() => parseMethodOptionsPath('/foo/'), /Invalid HTTP method ""/); - test.done(); - }, - - 'fails if a non-supported http method is used'(test: Test) { - test.throws(() => parseMethodOptionsPath('/foo/bar'), /Invalid HTTP method "BAR"/); - test.done(); - }, - - 'extracts resource path and method correctly'(test: Test) { - test.deepEqual(parseMethodOptionsPath('/foo/GET'), { resourcePath: '/~1foo', httpMethod: 'GET' }); - test.deepEqual(parseMethodOptionsPath('/foo/bar/GET'), { resourcePath: '/~1foo~1bar', httpMethod: 'GET' }); - test.deepEqual(parseMethodOptionsPath('/foo/*/GET'), { resourcePath: '/~1foo~1*', httpMethod: 'GET' }); - test.deepEqual(parseMethodOptionsPath('/*/GET'), { resourcePath: '/*', httpMethod: 'GET' }); - test.deepEqual(parseMethodOptionsPath('/*/*'), { resourcePath: '/*', httpMethod: '*' }); - test.deepEqual(parseMethodOptionsPath('//POST'), { resourcePath: '/', httpMethod: 'POST' }); - test.done(); - }, - }, - - 'parseAwsApiCall': { - 'fails if "actionParams" is set but "action" is undefined'(test: Test) { - test.throws(() => parseAwsApiCall(undefined, undefined, { foo: '123' }), /"actionParams" requires that "action" will be set/); - test.done(); - }, - - 'fails since "action" and "path" are mutually exclusive'(test: Test) { - test.throws(() => parseAwsApiCall('foo', 'bar'), /"path" and "action" are mutually exclusive \(path="foo", action="bar"\)/); - test.done(); - }, - - 'fails if "path" and "action" are both undefined'(test: Test) { - test.throws(() => parseAwsApiCall(), /Either "path" or "action" are required/); - test.done(); - }, - - '"path" mode'(test: Test) { - test.deepEqual(parseAwsApiCall('my/path'), { apiType: 'path', apiValue: 'my/path' }); - test.done(); - }, - - '"action" mode with no parameters'(test: Test) { - test.deepEqual(parseAwsApiCall(undefined, 'MyAction'), { apiType: 'action', apiValue: 'MyAction' }); - test.done(); - }, - - '"action" mode with parameters (url-encoded)'(test: Test) { - test.deepEqual(parseAwsApiCall(undefined, 'GetObject', { Bucket: 'MyBucket', Key: 'MyKey' }), { - apiType: 'action', - apiValue: 'GetObject&Bucket=MyBucket&Key=MyKey', - }); - test.done(); - }, - }, - - 'JsonSchemaMapper.toCfnJsonSchema': { - 'maps "ref" found under properties'(test: Test) { - const schema: JsonSchema = { - type: JsonSchemaType.OBJECT, - properties: { - collection: { - type: JsonSchemaType.ARRAY, - items: { - ref: '#/some/reference', - }, - uniqueItems: true, - }, - }, - required: ['collection'], - }; - - const actual = JsonSchemaMapper.toCfnJsonSchema(schema); - test.deepEqual(actual, { - $schema: 'http://json-schema.org/draft-04/schema#', - type: 'object', - properties: { - collection: { - type: 'array', - items: { - $ref: '#/some/reference', - }, - uniqueItems: true, - }, - }, - required: ['collection'], - }); - test.done(); - }, - - 'does not map a "ref" property name'(test: Test) { - const schema: JsonSchema = { - type: JsonSchemaType.OBJECT, - properties: { - ref: { - type: JsonSchemaType.ARRAY, - items: { - ref: '#/some/reference', - }, - uniqueItems: true, - }, - }, - required: ['ref'], - }; - - const actual = JsonSchemaMapper.toCfnJsonSchema(schema); - test.deepEqual(actual, { - $schema: 'http://json-schema.org/draft-04/schema#', - type: 'object', - properties: { - ref: { - type: 'array', - items: { - $ref: '#/some/reference', - }, - uniqueItems: true, - }, - }, - required: ['ref'], - }); - test.done(); - }, - }, -}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.usage-plan.ts b/packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts similarity index 76% rename from packages/@aws-cdk/aws-apigateway/test/test.usage-plan.ts rename to packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts index 78c76ba5f896d..f183d08796388 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.usage-plan.ts +++ b/packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts @@ -1,11 +1,11 @@ -import { expect, haveResource, ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; +import { ResourcePart } from '@aws-cdk/assert'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; const RESOURCE_TYPE = 'AWS::ApiGateway::UsagePlan'; -export = { - 'default setup'(test: Test) { +describe('usage plan', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api', { cloudWatchRole: false, deploy: false }); @@ -20,15 +20,13 @@ export = { }); // THEN - expect(stack).to(haveResource(RESOURCE_TYPE, { + expect(stack).toHaveResource(RESOURCE_TYPE, { UsagePlanName: usagePlanName, Description: usagePlanDescription, - }, ResourcePart.Properties)); + }, ResourcePart.Properties); + }); - test.done(); - }, - - 'usage plan with throttling limits'(test: Test) { + test('usage plan with throttling limits', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -57,7 +55,7 @@ export = { }); // THEN - expect(stack).to(haveResource(RESOURCE_TYPE, { + expect(stack).toHaveResource(RESOURCE_TYPE, { UsagePlanName: usagePlanName, Description: usagePlanDescription, ApiStages: [ @@ -76,13 +74,10 @@ export = { }, }, ], - }, ResourcePart.Properties)); - - test.done(); - - }, + }, ResourcePart.Properties); + }); - 'usage plan with blocked methods'(test: Test) { + test('usage plan with blocked methods', () => { // GIVEN const stack = new cdk.Stack(); const api = new apigateway.RestApi(stack, 'my-api', { cloudWatchRole: false, deploy: true, deployOptions: { stageName: 'test' } }); @@ -111,7 +106,7 @@ export = { }); // THEN - expect(stack).to(haveResource(RESOURCE_TYPE, { + expect(stack).toHaveResource(RESOURCE_TYPE, { UsagePlanName: usagePlanName, Description: usagePlanDescription, ApiStages: [ @@ -130,13 +125,10 @@ export = { }, }, ], - }, ResourcePart.Properties)); - - test.done(); - - }, + }, ResourcePart.Properties); + }); - 'usage plan with quota limits'(test: Test) { + test('usage plan with quota limits', () => { // GIVEN const stack = new cdk.Stack(); @@ -149,18 +141,15 @@ export = { }); // THEN - expect(stack).to(haveResource(RESOURCE_TYPE, { + expect(stack).toHaveResource(RESOURCE_TYPE, { Quota: { Limit: 10000, Period: 'MONTH', }, - }, ResourcePart.Properties)); + }, ResourcePart.Properties); + }); - test.done(); - - }, - - 'UsagePlanKey'(test: Test) { + test('UsagePlanKey', () => { // GIVEN const stack = new cdk.Stack(); const usagePlan: apigateway.UsagePlan = new apigateway.UsagePlan(stack, 'my-usage-plan', { @@ -172,7 +161,7 @@ export = { usagePlan.addApiKey(apiKey); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlanKey', { + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlanKey', { KeyId: { Ref: 'myapikey1B052F70', }, @@ -180,12 +169,10 @@ export = { UsagePlanId: { Ref: 'myusageplan23AA1E32', }, - }, ResourcePart.Properties)); + }, ResourcePart.Properties); + }); - test.done(); - }, - - 'UsagePlan can have multiple keys'(test: Test) { + test('UsagePlan can have multiple keys', () => { // GIVEN const stack = new cdk.Stack(); const usagePlan = new apigateway.UsagePlan(stack, 'my-usage-plan'); @@ -201,23 +188,21 @@ export = { usagePlan.addApiKey(apiKey2); // THEN - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { Name: 'my-api-key-1', - }, ResourcePart.Properties)); - expect(stack).to(haveResource('AWS::ApiGateway::ApiKey', { + }, ResourcePart.Properties); + expect(stack).toHaveResource('AWS::ApiGateway::ApiKey', { Name: 'my-api-key-2', - }, ResourcePart.Properties)); - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlanKey', { + }, ResourcePart.Properties); + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlanKey', { KeyId: { Ref: 'myapikey11F723FC7', }, - }, ResourcePart.Properties)); - expect(stack).to(haveResource('AWS::ApiGateway::UsagePlanKey', { + }, ResourcePart.Properties); + expect(stack).toHaveResource('AWS::ApiGateway::UsagePlanKey', { KeyId: { Ref: 'myapikey2ABDEF012', }, - }, ResourcePart.Properties)); - - test.done(); - }, -}; + }, ResourcePart.Properties); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/util.test.ts b/packages/@aws-cdk/aws-apigateway/test/util.test.ts new file mode 100644 index 0000000000000..f879c63698733 --- /dev/null +++ b/packages/@aws-cdk/aws-apigateway/test/util.test.ts @@ -0,0 +1,125 @@ +import '@aws-cdk/assert/jest'; +import { JsonSchema, JsonSchemaType } from '../lib'; +import { JsonSchemaMapper, parseAwsApiCall, parseMethodOptionsPath } from '../lib/util'; + +describe('util', () => { + describe('parseMethodResourcePath', () => { + test('fails if path does not start with a /', () => { + expect(() => parseMethodOptionsPath('foo')).toThrow(/Method options path must start with \'\/\'/); + }); + + test('fails if there are less than two components', () => { + expect(() => parseMethodOptionsPath('/')).toThrow(/Method options path must include at least two components/); + expect(() => parseMethodOptionsPath('/foo')).toThrow(/Method options path must include at least two components/); + expect(() => parseMethodOptionsPath('/foo/')).toThrow(/Invalid HTTP method ""/); + }); + + test('fails if a non-supported http method is used', () => { + expect(() => parseMethodOptionsPath('/foo/bar')).toThrow(/Invalid HTTP method "BAR"/); + }); + + test('extracts resource path and method correctly', () => { + expect(parseMethodOptionsPath('/foo/GET')).toEqual({ resourcePath: '/~1foo', httpMethod: 'GET' }); + expect(parseMethodOptionsPath('/foo/bar/GET')).toEqual({ resourcePath: '/~1foo~1bar', httpMethod: 'GET' }); + expect(parseMethodOptionsPath('/foo/*/GET')).toEqual({ resourcePath: '/~1foo~1*', httpMethod: 'GET' }); + expect(parseMethodOptionsPath('/*/GET')).toEqual({ resourcePath: '/*', httpMethod: 'GET' }); + expect(parseMethodOptionsPath('/*/*')).toEqual({ resourcePath: '/*', httpMethod: '*' }); + expect(parseMethodOptionsPath('//POST')).toEqual({ resourcePath: '/', httpMethod: 'POST' }); + }); + }); + + describe('parseAwsApiCall', () => { + test('fails if "actionParams" is set but "action" is undefined', () => { + expect(() => parseAwsApiCall(undefined, undefined, { foo: '123' })).toThrow(/"actionParams" requires that "action" will be set/); + }); + + test('fails since "action" and "path" are mutually exclusive', () => { + expect(() => parseAwsApiCall('foo', 'bar')).toThrow(/"path" and "action" are mutually exclusive \(path="foo", action="bar"\)/); + }); + + test('fails if "path" and "action" are both undefined', () => { + expect(() => parseAwsApiCall()).toThrow(/Either "path" or "action" are required/); + }); + + test('"path" mode', () => { + expect(parseAwsApiCall('my/path')).toEqual({ apiType: 'path', apiValue: 'my/path' }); + }); + + test('"action" mode with no parameters', () => { + expect(parseAwsApiCall(undefined, 'MyAction')).toEqual({ apiType: 'action', apiValue: 'MyAction' }); + }); + + test('"action" mode with parameters (url-encoded)', () => { + expect(parseAwsApiCall(undefined, 'GetObject', { Bucket: 'MyBucket', Key: 'MyKey' })).toEqual({ + apiType: 'action', + apiValue: 'GetObject&Bucket=MyBucket&Key=MyKey', + }); + }); + }); + + describe('JsonSchemaMapper.toCfnJsonSchema', () => { + test('maps "ref" found under properties', () => { + const schema: JsonSchema = { + type: JsonSchemaType.OBJECT, + properties: { + collection: { + type: JsonSchemaType.ARRAY, + items: { + ref: '#/some/reference', + }, + uniqueItems: true, + }, + }, + required: ['collection'], + }; + + const actual = JsonSchemaMapper.toCfnJsonSchema(schema); + expect(actual).toEqual({ + $schema: 'http://json-schema.org/draft-04/schema#', + type: 'object', + properties: { + collection: { + type: 'array', + items: { + $ref: '#/some/reference', + }, + uniqueItems: true, + }, + }, + required: ['collection'], + }); + }); + + test('does not map a "ref" property name', () => { + const schema: JsonSchema = { + type: JsonSchemaType.OBJECT, + properties: { + ref: { + type: JsonSchemaType.ARRAY, + items: { + ref: '#/some/reference', + }, + uniqueItems: true, + }, + }, + required: ['ref'], + }; + + const actual = JsonSchemaMapper.toCfnJsonSchema(schema); + expect(actual).toEqual({ + $schema: 'http://json-schema.org/draft-04/schema#', + type: 'object', + properties: { + ref: { + type: 'array', + items: { + $ref: '#/some/reference', + }, + uniqueItems: true, + }, + }, + required: ['ref'], + }); + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.vpc-link.ts b/packages/@aws-cdk/aws-apigateway/test/vpc-link.test.ts similarity index 69% rename from packages/@aws-cdk/aws-apigateway/test/test.vpc-link.ts rename to packages/@aws-cdk/aws-apigateway/test/vpc-link.test.ts index 331889ffbdf1e..b7a023966d1fb 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.vpc-link.ts +++ b/packages/@aws-cdk/aws-apigateway/test/vpc-link.test.ts @@ -1,12 +1,11 @@ -import { expect, haveResource, haveResourceLike } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as apigateway from '../lib'; -export = { - 'default setup'(test: Test) { +describe('vpc link', () => { + test('default setup', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -21,15 +20,13 @@ export = { }); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::VpcLink', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::VpcLink', { Name: 'MyLink', TargetArns: [{ Ref: 'NLB55158F82' }], - })); - - test.done(); - }, + }); + }); - 'targets can be added using addTargets'(test: Test) { + test('targets can be added using addTargets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -46,7 +43,7 @@ export = { link.addTargets(nlb3); // THEN - expect(stack).to(haveResourceLike('AWS::ApiGateway::VpcLink', { + expect(stack).toHaveResourceLike('AWS::ApiGateway::VpcLink', { Name: 'VpcLink', TargetArns: [ { Ref: 'NLB03D178991' }, @@ -54,12 +51,10 @@ export = { { Ref: 'NLB2BEBACE62' }, { Ref: 'NLB372DB3895' }, ], - })); - - test.done(); - }, + }); + }); - 'import'(test: Test) { + test('import', () => { // GIVEN const stack = new cdk.Stack(); @@ -67,12 +62,10 @@ export = { apigateway.VpcLink.fromVpcLinkId(stack, 'ImportedVpcLink', 'vpclink-id'); // THEN - expect(stack).notTo(haveResource('AWS::ApiGateway::VpcLink')); - - test.done(); - }, + expect(stack).not.toHaveResource('AWS::ApiGateway::VpcLink'); + }); - 'validation error if vpc link is created and no targets are added'(test: Test) { + test('validation error if vpc link is created and no targets are added', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'stack'); @@ -81,7 +74,6 @@ export = { new apigateway.VpcLink(stack, 'vpclink'); // TEST - test.throws(() => app.synth(), /No targets added to vpc link/); - test.done(); - }, -}; + expect(() => app.synth()).toThrow(/No targets added to vpc link/); + }); +}); From 0537598a065c74c713d1ec58c96f09f0d66b12ca Mon Sep 17 00:00:00 2001 From: Ayush Goyal Date: Fri, 23 Oct 2020 21:02:39 +0530 Subject: [PATCH 35/45] feat(apigatewayv2): vpc link and private integrations (#10531) VpcLink and HttpProxyPrivateIntegration. References in AWS docs: [VpcLink](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-vpclink.html) [Integration-1](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-private.html) [Integration-2](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-connectiontype) closes #10119 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../.eslintrc.js | 3 + .../aws-apigatewayv2-integrations/.gitignore | 17 + .../aws-apigatewayv2-integrations/.npmignore | 28 + .../aws-apigatewayv2-integrations/LICENSE | 201 +++++ .../aws-apigatewayv2-integrations/NOTICE | 2 + .../aws-apigatewayv2-integrations/README.md | 88 +++ .../jest.config.js | 2 + .../lib/http/alb.ts | 39 + .../lib/http/base-types.ts | 19 + .../lib/http/index.ts | 4 + .../lib/http/nlb.ts | 39 + .../lib/http/private/integration.ts | 65 ++ .../lib/http/service-discovery.ts | 44 ++ .../lib/index.ts | 1 + .../package.json | 104 +++ .../test/http/alb.test.ts | 101 +++ .../test/http/integ.alb.expected.json | 702 ++++++++++++++++++ .../test/http/integ.alb.ts | 31 + .../test/http/integ.nlb.expected.json | 667 +++++++++++++++++ .../test/http/integ.nlb.ts | 24 + .../integ.service-discovery.expected.json | 653 ++++++++++++++++ .../test/http/integ.service-discovery.ts | 28 + .../test/http/nlb.test.ts | 102 +++ .../test/http/private/integration.test.ts | 37 + .../test/http/service-discovery.test.ts | 77 ++ packages/@aws-cdk/aws-apigatewayv2/README.md | 27 + .../@aws-cdk/aws-apigatewayv2/lib/http/api.ts | 20 + .../aws-apigatewayv2/lib/http/index.ts | 1 + .../aws-apigatewayv2/lib/http/integration.ts | 44 ++ .../aws-apigatewayv2/lib/http/route.ts | 6 +- .../aws-apigatewayv2/lib/http/vpc-link.ts | 120 +++ .../@aws-cdk/aws-apigatewayv2/package.json | 2 + .../aws-apigatewayv2/test/http/api.test.ts | 40 + .../aws-apigatewayv2/test/http/route.test.ts | 38 +- .../test/http/vpc-link.test.ts | 188 +++++ .../lib/nlb/network-listener.ts | 2 +- packages/aws-cdk-lib/package.json | 1 + packages/decdk/package.json | 1 + packages/monocdk/package.json | 1 + 39 files changed, 3565 insertions(+), 4 deletions(-) create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/README.md create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/package.json create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts create mode 100644 packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js b/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore b/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore new file mode 100644 index 0000000000000..becda34c45624 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore @@ -0,0 +1,17 @@ +*.d.ts +*.generated.ts +*.js +*.js.map +*.snk +.jsii +.LAST_BUILD +.LAST_PACKAGE +nyc.config.js +.nyc_output +coverage +dist +tsconfig.json +!.eslintrc.js +!jest.config.js + +junit.xml \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore b/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore new file mode 100644 index 0000000000000..093c734b1bd2f --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore @@ -0,0 +1,28 @@ +# The basics +*.ts +*.tgz +*.snk +!*.d.ts +!*.js +**/cdk.out + +# Coverage +coverage +.nyc_output +.nycrc + +# Build gear +dist +.LAST_BUILD +.LAST_PACKAGE + +*.tsbuildinfo +tsconfig.json +!.jsii +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE b/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE new file mode 100644 index 0000000000000..b71ec1688783a --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE b/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE new file mode 100644 index 0000000000000..bfccac9a7f69c --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md new file mode 100644 index 0000000000000..2cda8eab308ab --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md @@ -0,0 +1,88 @@ +## AWS APIGatewayv2 Integrations + +--- + +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. + +--- + + +## Table of Contents + +- [Introduction](#introduction) +- [Private Integration](#private-integration) + +## Introduction + +Integrations connect a route to backend resources. HTTP APIs support Lambda proxy, AWS service, and HTTP proxy integrations. HTTP proxy integrations are also known as private integrations. + +Currently the following integrations are supported by this construct library. + +## Private Integration + +Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or +Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by +clients outside of the VPC. + +The following integrations are supported for private resources in a VPC. + +### Application Load Balancer + +The following code is a basic application load balancer private integration of HTTP API: + +```ts +const vpc = new ec2.Vpc(stack, 'VPC'); +const lb = new elbv2.ALB(stack, 'lb', { vpc }); +const listener = lb.addListener('listener', { port: 80 }); +listener.addTargets('target', { + port: 80, +}); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpAlbIntegrationProps({ + listener, + }), +}); +``` + +### Network Load Balancer + +The following code is a basic network load balancer private integration of HTTP API: + +```ts +const vpc = new ec2.Vpc(stack, 'VPC'); +const lb = new elbv2.NLB(stack, 'lb', { vpc }); +const listener = lb.addListener('listener', { port: 80 }); +listener.addTargets('target', { + port: 80, +}); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpNlbIntegrationProps({ + listener, + }), +}); +``` + +### Cloud Map Service Discovery + +The following code is a basic discovery service private integration of HTTP API: + +```ts +const vpc = new ec2.Vpc(stack, 'VPC'); +const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); +const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'boobar.com', + vpc, +}); +const service = namespace.createService('Service'); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpServiceDiscoveryIntegration({ + vpcLink, + service, + }), +}); +``` diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js b/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts new file mode 100644 index 0000000000000..2d35f89e8206e --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts @@ -0,0 +1,39 @@ +import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { HttpPrivateIntegrationOptions } from './base-types'; +import { HttpPrivateIntegration } from './private/integration'; + +/** + * Properties to initialize `HttpAlbIntegration`. + */ +export interface HttpAlbIntegrationProps extends HttpPrivateIntegrationOptions { + /** + * The listener to the application load balancer used for the integration + */ + readonly listener: elbv2.ApplicationListener; +} + +/** + * The Application Load Balancer integration resource for HTTP API + */ +export class HttpAlbIntegration extends HttpPrivateIntegration { + constructor(private readonly props: HttpAlbIntegrationProps) { + super(); + } + + public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + const vpcLink = this._configureVpcLink(options, { + vpcLink: this.props.vpcLink, + vpc: this.props.listener.loadBalancer.vpc, + }); + + return { + method: this.props.method ?? this.httpMethod, + payloadFormatVersion: this.payloadFormatVersion, + type: this.integrationType, + connectionType: this.connectionType, + connectionId: vpcLink.vpcLinkId, + uri: this.props.listener.listenerArn, + }; + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts new file mode 100644 index 0000000000000..5000dfb63a751 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts @@ -0,0 +1,19 @@ +import { HttpMethod, IVpcLink } from '@aws-cdk/aws-apigatewayv2'; + +/** + * Base options for private integration + */ +export interface HttpPrivateIntegrationOptions { + /** + * The vpc link to be used for the private integration + * + * @default - a new VpcLink is created + */ + readonly vpcLink?: IVpcLink; + + /** + * The HTTP method that must be used to invoke the underlying HTTP proxy. + * @default HttpMethod.ANY + */ + readonly method?: HttpMethod; +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts new file mode 100644 index 0000000000000..bd4bb0ee34cac --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts @@ -0,0 +1,4 @@ +export * from './base-types'; +export * from './alb'; +export * from './nlb'; +export * from './service-discovery'; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts new file mode 100644 index 0000000000000..1ee7ce4f208ed --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts @@ -0,0 +1,39 @@ +import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { HttpPrivateIntegrationOptions } from './base-types'; +import { HttpPrivateIntegration } from './private/integration'; + +/** + * Properties to initialize `HttpNlbIntegration`. + */ +export interface HttpNlbIntegrationProps extends HttpPrivateIntegrationOptions { + /** + * The listener to the netwwork load balancer used for the integration + */ + readonly listener: elbv2.NetworkListener; +} + +/** + * The Network Load Balancer integration resource for HTTP API + */ +export class HttpNlbIntegration extends HttpPrivateIntegration { + constructor(private readonly props: HttpNlbIntegrationProps) { + super(); + } + + public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + const vpcLink = this._configureVpcLink(options, { + vpcLink: this.props.vpcLink, + vpc: this.props.listener.loadBalancer.vpc, + }); + + return { + method: this.props.method ?? this.httpMethod, + payloadFormatVersion: this.payloadFormatVersion, + type: this.integrationType, + connectionType: this.connectionType, + connectionId: vpcLink.vpcLinkId, + uri: this.props.listener.listenerArn, + }; + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts new file mode 100644 index 0000000000000..6d32b22794722 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts @@ -0,0 +1,65 @@ +import { + HttpConnectionType, + HttpIntegrationType, + HttpRouteIntegrationBindOptions, + HttpRouteIntegrationConfig, + IHttpRouteIntegration, + PayloadFormatVersion, + HttpMethod, + IVpcLink, +} from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; + + +/** + * Options required to use an existing vpcLink or configure a new one + * + * @internal + */ +export interface VpcLinkConfigurationOptions { + /** + * The vpc link to be used for the private integration + * + * @default - a new VpcLink is created + */ + readonly vpcLink?: IVpcLink; + + /** + * The vpc for which the VpcLink needs to be created + * + * @default undefined + */ + readonly vpc?: ec2.IVpc; +} + +/** + * The HTTP Private integration resource for HTTP API + * + * @internal + */ +export abstract class HttpPrivateIntegration implements IHttpRouteIntegration { + protected httpMethod = HttpMethod.ANY; + protected payloadFormatVersion = PayloadFormatVersion.VERSION_1_0; // 1.0 is required and is the only supported format + protected integrationType = HttpIntegrationType.HTTP_PROXY; + protected connectionType = HttpConnectionType.VPC_LINK + + /** + * Adds a vpcLink to the API if not passed in the options + * + * @internal + */ + protected _configureVpcLink(bindOptions: HttpRouteIntegrationBindOptions, configOptions: VpcLinkConfigurationOptions): IVpcLink { + let vpcLink = configOptions.vpcLink; + if (!vpcLink) { + if (!configOptions.vpc) { + throw new Error('One of vpcLink or vpc should be provided for private integration'); + } + + vpcLink = bindOptions.route.httpApi.addVpcLink({ vpc: configOptions.vpc }); + } + + return vpcLink; + } + + public abstract bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig; +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts new file mode 100644 index 0000000000000..96e13d0a03273 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts @@ -0,0 +1,44 @@ +import { HttpMethod, IVpcLink, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; +import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; +import { HttpPrivateIntegration } from './private/integration'; + +/** + * Properties to initialize `HttpServiceDiscoveryIntegration`. + */ +export interface HttpServiceDiscoveryIntegrationProps { + /** + * The discovery service used for the integration + */ + readonly service: servicediscovery.Service; + + /** + * The vpc link to be used for the private integration + */ + readonly vpcLink: IVpcLink; + + /** + * The HTTP method that must be used to invoke the underlying HTTP proxy. + * @default HttpMethod.ANY + */ + readonly method?: HttpMethod; +} + +/** + * The Service Discovery integration resource for HTTP API + */ +export class HttpServiceDiscoveryIntegration extends HttpPrivateIntegration { + constructor(private readonly props: HttpServiceDiscoveryIntegrationProps) { + super(); + } + + public bind(_: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + return { + method: this.props.method ?? this.httpMethod, + payloadFormatVersion: this.payloadFormatVersion, + type: this.integrationType, + connectionType: this.connectionType, + connectionId: this.props.vpcLink.vpcLinkId, + uri: this.props.service.serviceArn, + }; + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts new file mode 100644 index 0000000000000..c202386ae710e --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts @@ -0,0 +1 @@ +export * from './http'; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json new file mode 100644 index 0000000000000..30b3772fa586a --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json @@ -0,0 +1,104 @@ +{ + "name": "@aws-cdk/aws-apigatewayv2-integrations", + "version": "0.0.0", + "description": "Integrations for AWS APIGateway V2", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.APIGatewayv2.Integrations", + "packageId": "Amazon.CDK.AWS.APIGatewayv2.Integrations", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.apigatewayv2.integrations", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "apigatewayv2-integrations" + } + }, + "python": { + "distName": "aws-cdk.aws-apigatewayv2-integrations", + "module": "aws_cdk.aws_apigatewayv2_integrations", + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ] + } + }, + "projectReferences": true + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-apigatewayv2-integrations" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "integ": "cdk-integ", + "lint": "cdk-lint", + "package": "cdk-package", + "awslint": "cdk-awslint", + "pkglint": "pkglint -f", + "test": "cdk-test", + "watch": "cdk-watch", + "compat": "cdk-compat", + "build+test": "npm run build && npm test", + "build+test+package": "npm run build+test && npm run package" + }, + "cdk-build": { + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": true + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "apigateway" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "0.0.0", + "@types/nodeunit": "^0.0.31", + "cdk-build-tools": "0.0.0", + "cdk-integ-tools": "0.0.0", + "nodeunit": "^0.11.3", + "pkglint": "0.0.0" + }, + "dependencies": { + "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", + "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", + "@aws-cdk/aws-servicediscovery": "0.0.0", + "@aws-cdk/core": "0.0.0", + "constructs": "^3.0.4" + }, + "peerDependencies": { + "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", + "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", + "@aws-cdk/aws-servicediscovery": "0.0.0", + "@aws-cdk/core": "0.0.0", + "constructs": "^3.0.4" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "experimental", + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts new file mode 100644 index 0000000000000..691da1e4c3b9f --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts @@ -0,0 +1,101 @@ +import '@aws-cdk/assert/jest'; +import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { Stack } from '@aws-cdk/core'; +import { HttpAlbIntegration } from '../../lib'; + +describe('HttpAlbIntegration', () => { + test('default', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpAlbIntegration({ + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'HttpApiVpcLink159804837', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + Ref: 'lblistener657ADDEC', + }, + PayloadFormatVersion: '1.0', + }); + }); + + test('able to add a custom vpcLink', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpAlbIntegration({ + vpcLink, + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'VpcLink42ED6FF0', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + Ref: 'lblistener657ADDEC', + }, + PayloadFormatVersion: '1.0', + }); + }); + + test('method option is correctly recognized', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpAlbIntegration({ + listener, + method: HttpMethod.PATCH, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationMethod: 'PATCH', + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json new file mode 100644 index 0000000000000..a052f0243e596 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json @@ -0,0 +1,702 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet3Subnet631C5E25": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTable98AE0E14": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTableAssociation427FE0C6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + } + } + }, + "VPCPublicSubnet3DefaultRouteA0D29D46": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet3EIPAD4BC883": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3NATGatewayD3048F5C": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet3EIPAD4BC883", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "VPCPrivateSubnet3Subnet3EDCD457": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTable192186F8": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTableAssociationC28D144E": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + } + }, + "VPCPrivateSubnet3DefaultRoute27F311AE": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "integ-alb-integration/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "lbA35910C5": { + "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "Properties": { + "LoadBalancerAttributes": [ + { + "Key": "deletion_protection.enabled", + "Value": "false" + } + ], + "Scheme": "internal", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "lbSecurityGroup47B6F855", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "Type": "application" + } + }, + "lbSecurityGroup47B6F855": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Automatically created Security Group for ELB integalbintegrationlb02F792D5", + "SecurityGroupEgress": [ + { + "CidrIp": "255.255.255.255/32", + "Description": "Disallow all traffic", + "FromPort": 252, + "IpProtocol": "icmp", + "ToPort": 86 + } + ], + "SecurityGroupIngress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow from anyone on port 80", + "FromPort": 80, + "IpProtocol": "tcp", + "ToPort": 80 + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "lblistener657ADDEC": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "FixedResponseConfig": { + "StatusCode": "200" + }, + "Type": "fixed-response" + } + ], + "LoadBalancerArn": { + "Ref": "lbA35910C5" + }, + "Port": 80, + "Protocol": "HTTP" + } + }, + "lblistenertargetGroupC7489D1E": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 80, + "Protocol": "HTTP", + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "HttpProxyPrivateApiA55E154D": { + "Type": "AWS::ApiGatewayV2::Api", + "Properties": { + "Name": "HttpProxyPrivateApi", + "ProtocolType": "HTTP" + } + }, + "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { + "Type": "AWS::ApiGatewayV2::Integration", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "IntegrationType": "HTTP_PROXY", + "ConnectionId": { + "Ref": "HttpProxyPrivateApiVpcLink190366CAE" + }, + "ConnectionType": "VPC_LINK", + "IntegrationMethod": "ANY", + "IntegrationUri": { + "Ref": "lblistener657ADDEC" + }, + "PayloadFormatVersion": "1.0" + } + }, + "HttpProxyPrivateApiDefaultRoute1BDCA252": { + "Type": "AWS::ApiGatewayV2::Route", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "RouteKey": "$default", + "Target": { + "Fn::Join": [ + "", + [ + "integrations/", + { + "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" + } + ] + ] + } + } + }, + "HttpProxyPrivateApiVpcLink190366CAE": { + "Type": "AWS::ApiGatewayV2::VpcLink", + "Properties": { + "Name": "integalbintegrationHttpProxyPrivateApiVpcLink125175F29", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "SecurityGroupIds": [] + } + }, + "HttpProxyPrivateApiDefaultStage18B3706E": { + "Type": "AWS::ApiGatewayV2::Stage", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "StageName": "$default", + "AutoDeploy": true + } + } + }, + "Outputs": { + "Endpoint": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/" + ] + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts new file mode 100644 index 0000000000000..e077560466851 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts @@ -0,0 +1,31 @@ +import { HttpApi } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { HttpAlbIntegration } from '../../lib'; + +/* + * Stack verification steps: + * * Deploy the stack and wait for the API endpoint output to get printed + * * Hit the above endpoint using curl and expect a 200 response + */ + +const app = new App(); + +const stack = new Stack(app, 'integ-alb-integration'); + +const vpc = new ec2.Vpc(stack, 'VPC'); +const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); +const listener = lb.addListener('listener', { port: 80 }); +listener.addTargets('target', { port: 80 }); +listener.addAction('dsf', { action: elbv2.ListenerAction.fixedResponse(200) }); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpAlbIntegration({ + listener, + }), +}); + +new CfnOutput(stack, 'Endpoint', { + value: httpEndpoint.url!, +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json new file mode 100644 index 0000000000000..ea3801b13354f --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json @@ -0,0 +1,667 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet3Subnet631C5E25": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTable98AE0E14": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTableAssociation427FE0C6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + } + } + }, + "VPCPublicSubnet3DefaultRouteA0D29D46": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet3EIPAD4BC883": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3NATGatewayD3048F5C": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet3EIPAD4BC883", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "VPCPrivateSubnet3Subnet3EDCD457": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTable192186F8": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTableAssociationC28D144E": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + } + }, + "VPCPrivateSubnet3DefaultRoute27F311AE": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "integ-nlb-integration/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "lbA35910C5": { + "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "Properties": { + "LoadBalancerAttributes": [ + { + "Key": "deletion_protection.enabled", + "Value": "false" + } + ], + "Scheme": "internal", + "Subnets": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "Type": "network" + } + }, + "lblistener657ADDEC": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "TargetGroupArn": { + "Ref": "lblistenertargetGroupC7489D1E" + }, + "Type": "forward" + } + ], + "LoadBalancerArn": { + "Ref": "lbA35910C5" + }, + "Port": 80, + "Protocol": "TCP" + } + }, + "lblistenertargetGroupC7489D1E": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 80, + "Protocol": "TCP", + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "HttpProxyPrivateApiA55E154D": { + "Type": "AWS::ApiGatewayV2::Api", + "Properties": { + "Name": "HttpProxyPrivateApi", + "ProtocolType": "HTTP" + } + }, + "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { + "Type": "AWS::ApiGatewayV2::Integration", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "IntegrationType": "HTTP_PROXY", + "ConnectionId": { + "Ref": "HttpProxyPrivateApiVpcLink190366CAE" + }, + "ConnectionType": "VPC_LINK", + "IntegrationMethod": "ANY", + "IntegrationUri": { + "Ref": "lblistener657ADDEC" + }, + "PayloadFormatVersion": "1.0" + } + }, + "HttpProxyPrivateApiDefaultRoute1BDCA252": { + "Type": "AWS::ApiGatewayV2::Route", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "RouteKey": "$default", + "Target": { + "Fn::Join": [ + "", + [ + "integrations/", + { + "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" + } + ] + ] + } + } + }, + "HttpProxyPrivateApiVpcLink190366CAE": { + "Type": "AWS::ApiGatewayV2::VpcLink", + "Properties": { + "Name": "integnlbintegrationHttpProxyPrivateApiVpcLink1C940EC42", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "SecurityGroupIds": [] + } + }, + "HttpProxyPrivateApiDefaultStage18B3706E": { + "Type": "AWS::ApiGatewayV2::Stage", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "StageName": "$default", + "AutoDeploy": true + } + } + }, + "Outputs": { + "Endpoint": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/" + ] + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts new file mode 100644 index 0000000000000..9b78c3f676e30 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts @@ -0,0 +1,24 @@ +import { HttpApi } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { HttpNlbIntegration } from '../../lib'; + +const app = new App(); + +const stack = new Stack(app, 'integ-nlb-integration'); + +const vpc = new ec2.Vpc(stack, 'VPC'); +const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); +const listener = lb.addListener('listener', { port: 80 }); +listener.addTargets('target', { port: 80 }); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpNlbIntegration({ + listener, + }), +}); + +new CfnOutput(stack, 'Endpoint', { + value: httpEndpoint.url!, +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json new file mode 100644 index 0000000000000..30e1c20fbaddc --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json @@ -0,0 +1,653 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.0.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.32.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet3Subnet631C5E25": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.64.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTable98AE0E14": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3RouteTableAssociation427FE0C6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + } + } + }, + "VPCPublicSubnet3DefaultRouteA0D29D46": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet3RouteTable98AE0E14" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet3EIPAD4BC883": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPublicSubnet3NATGatewayD3048F5C": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet3EIPAD4BC883", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet3Subnet631C5E25" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" + } + ] + } + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.96.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1a", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.128.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1b", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "VPCPrivateSubnet3Subnet3EDCD457": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "CidrBlock": "10.0.160.0/19", + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": "test-region-1c", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTable192186F8": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC/PrivateSubnet3" + } + ] + } + }, + "VPCPrivateSubnet3RouteTableAssociationC28D144E": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + } + }, + "VPCPrivateSubnet3DefaultRoute27F311AE": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet3RouteTable192186F8" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "integ-service-discovery-integration/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "VpcLink42ED6FF0": { + "Type": "AWS::ApiGatewayV2::VpcLink", + "Properties": { + "Name": "integservicediscoveryintegrationVpcLink09ACD3FF", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + }, + { + "Ref": "VPCPrivateSubnet3Subnet3EDCD457" + } + ], + "SecurityGroupIds": [] + } + }, + "Namespace9B63B8C8": { + "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", + "Properties": { + "Name": "foobar.com", + "Vpc": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "NamespaceServiceCABDF534": { + "Type": "AWS::ServiceDiscovery::Service", + "Properties": { + "DnsConfig": { + "DnsRecords": [ + { + "TTL": 60, + "Type": "A" + } + ], + "NamespaceId": { + "Fn::GetAtt": [ + "Namespace9B63B8C8", + "Id" + ] + }, + "RoutingPolicy": "MULTIVALUE" + }, + "NamespaceId": { + "Fn::GetAtt": [ + "Namespace9B63B8C8", + "Id" + ] + } + } + }, + "HttpProxyPrivateApiA55E154D": { + "Type": "AWS::ApiGatewayV2::Api", + "Properties": { + "Name": "HttpProxyPrivateApi", + "ProtocolType": "HTTP" + } + }, + "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { + "Type": "AWS::ApiGatewayV2::Integration", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "IntegrationType": "HTTP_PROXY", + "ConnectionId": { + "Ref": "VpcLink42ED6FF0" + }, + "ConnectionType": "VPC_LINK", + "IntegrationMethod": "ANY", + "IntegrationUri": { + "Fn::GetAtt": [ + "NamespaceServiceCABDF534", + "Arn" + ] + }, + "PayloadFormatVersion": "1.0" + } + }, + "HttpProxyPrivateApiDefaultRoute1BDCA252": { + "Type": "AWS::ApiGatewayV2::Route", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "RouteKey": "$default", + "Target": { + "Fn::Join": [ + "", + [ + "integrations/", + { + "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" + } + ] + ] + } + } + }, + "HttpProxyPrivateApiDefaultStage18B3706E": { + "Type": "AWS::ApiGatewayV2::Stage", + "Properties": { + "ApiId": { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + "StageName": "$default", + "AutoDeploy": true + } + } + }, + "Outputs": { + "Endpoint": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "HttpProxyPrivateApiA55E154D" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/" + ] + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts new file mode 100644 index 0000000000000..1ff64ba5955c9 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts @@ -0,0 +1,28 @@ +import { HttpApi, VpcLink } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; +import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { HttpServiceDiscoveryIntegration } from '../../lib'; + +const app = new App(); + +const stack = new Stack(app, 'integ-service-discovery-integration'); + +const vpc = new ec2.Vpc(stack, 'VPC'); +const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); +const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'foobar.com', + vpc, +}); +const service = namespace.createService('Service'); + +const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { + defaultIntegration: new HttpServiceDiscoveryIntegration({ + vpcLink, + service, + }), +}); + +new CfnOutput(stack, 'Endpoint', { + value: httpEndpoint.url!, +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts new file mode 100644 index 0000000000000..ec537cfedb311 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts @@ -0,0 +1,102 @@ +import '@aws-cdk/assert/jest'; +import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; +import { Stack } from '@aws-cdk/core'; +import { HttpNlbIntegration } from '../../lib'; + +describe('HttpNlbIntegration', () => { + test('default', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpNlbIntegration({ + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'HttpApiVpcLink159804837', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + Ref: 'lblistener657ADDEC', + }, + PayloadFormatVersion: '1.0', + }); + }); + + test('able to add a custom vpcLink', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpNlbIntegration({ + vpcLink, + listener, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'VpcLink42ED6FF0', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + Ref: 'lblistener657ADDEC', + }, + PayloadFormatVersion: '1.0', + }); + }); + + + test('method option is correctly recognized', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); + const listener = lb.addListener('listener', { port: 80 }); + listener.addTargets('target', { port: 80 }); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpNlbIntegration({ + listener, + method: HttpMethod.PATCH, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationMethod: 'PATCH', + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts new file mode 100644 index 0000000000000..ce5f269f648a0 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts @@ -0,0 +1,37 @@ +import '@aws-cdk/assert/jest'; +import { HttpApi, HttpRoute, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, HttpRouteKey } from '@aws-cdk/aws-apigatewayv2'; +import { Stack } from '@aws-cdk/core'; +import { HttpPrivateIntegration } from '../../../lib/http/private/integration'; + +describe('HttpPrivateIntegration', () => { + test('throws error if both vpcLink and vpc are not passed', () => { + // GIVEN + const stack = new Stack(); + class DummyPrivateIntegration extends HttpPrivateIntegration { + constructor() { + super(); + } + + public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { + const vpcLink = this._configureVpcLink(options, {}); + + return { + method: this.httpMethod, + payloadFormatVersion: this.payloadFormatVersion, + type: this.integrationType, + connectionType: this.connectionType, + connectionId: vpcLink.vpcLinkId, + uri: 'some-uri', + }; + } + } + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + expect(() => new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new DummyPrivateIntegration(), + routeKey: HttpRouteKey.with('/pets'), + })).toThrow(/One of vpcLink or vpc should be provided for private integration/); + }); +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts new file mode 100644 index 0000000000000..62097b9d0a3c0 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts @@ -0,0 +1,77 @@ +import '@aws-cdk/assert/jest'; +import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; +import { Stack } from '@aws-cdk/core'; +import { HttpServiceDiscoveryIntegration } from '../../lib'; + +describe('HttpServiceDiscoveryIntegration', () => { + test('default', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'foobar.com', + vpc, + }); + const service = namespace.createService('Service'); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpServiceDiscoveryIntegration({ + vpcLink, + service, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: { + Ref: 'VpcLink42ED6FF0', + }, + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: { + 'Fn::GetAtt': [ + 'NamespaceServiceCABDF534', + 'Arn', + ], + }, + PayloadFormatVersion: '1.0', + }); + }); + + test('method option is correctly recognized', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { + name: 'foobar.com', + vpc, + }); + const service = namespace.createService('Service'); + + // WHEN + const api = new HttpApi(stack, 'HttpApi'); + new HttpRoute(stack, 'HttpProxyPrivateRoute', { + httpApi: api, + integration: new HttpServiceDiscoveryIntegration({ + vpcLink, + service, + method: HttpMethod.PATCH, + }), + routeKey: HttpRouteKey.with('/pets'), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationMethod: 'PATCH', + }); + }); +}); diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index e5cf86886aa3d..208271df2a732 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -24,6 +24,8 @@ - [Publishing HTTP APIs](#publishing-http-apis) - [Custom Domain](#custom-domain) - [Metrics](#metrics) + - [VPC Link](#vpc-link) + - [Private Integration](#private-integration) ## Introduction @@ -223,3 +225,28 @@ const stage = new HttpStage(stack, 'Stage', { }); const clientErrorMetric = stage.metricClientError(); ``` + +### VPC Link + +Private integrations let HTTP APIs connect with AWS resources that are placed behind a VPC. These are usually Application +Load Balancers, Network Load Balancers or a Cloud Map service. The `VpcLink` construct enables this integration. +The following code creates a `VpcLink` to a private VPC. + +```ts +const vpc = new ec2.Vpc(stack, 'VPC'); +const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); +``` + +Any existing `VpcLink` resource can be imported into the CDK app via the `VpcLink.fromVpcLinkId()`. + +```ts +const awesomeLink = VpcLink.fromVpcLinkId(stack, 'awesome-vpc-link', 'us-east-1_oiuR12Abd'); +``` + +### Private Integration + +Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or +Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by +clients outside of the VPC. + +These integrations can be found in the [APIGatewayV2-Integrations](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-apigatewayv2-integrations-readme.html) constructs library. diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts index ff75808b5a8d6..8ea35ab4f1312 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts @@ -6,6 +6,7 @@ import { DefaultDomainMappingOptions } from '../http/stage'; import { IHttpRouteIntegration } from './integration'; import { BatchHttpRouteOptions, HttpMethod, HttpRoute, HttpRouteKey } from './route'; import { HttpStage, HttpStageOptions } from './stage'; +import { VpcLink, VpcLinkProps } from './vpc-link'; /** * Represents an HTTP API @@ -73,6 +74,11 @@ export interface IHttpApi extends IResource { * @default - no statistic */ metricLatency(props?: MetricOptions): Metric; + + /** + * Add a new VpcLink + */ + addVpcLink(options: VpcLinkProps): VpcLink } /** @@ -178,6 +184,7 @@ export interface AddRoutesOptions extends BatchHttpRouteOptions { abstract class HttpApiBase extends Resource implements IHttpApi { // note that this is not exported public abstract readonly httpApiId: string; + private vpcLinks: Record = {}; public metric(metricName: string, props?: MetricOptions): Metric { return new Metric({ @@ -211,6 +218,19 @@ abstract class HttpApiBase extends Resource implements IHttpApi { // note that t public metricLatency(props?: MetricOptions): Metric { return this.metric('Latency', props); } + + public addVpcLink(options: VpcLinkProps): VpcLink { + const { vpcId } = options.vpc; + if (vpcId in this.vpcLinks) { + return this.vpcLinks[vpcId]; + } + + const count = Object.keys(this.vpcLinks).length + 1; + const vpcLink = new VpcLink(this, `VpcLink-${count}`, options); + this.vpcLinks[vpcId] = vpcLink; + + return vpcLink; + } } /** diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts index c42e089aa1d08..ee07bd7af8ee2 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts @@ -4,3 +4,4 @@ export * from './integration'; export * from './integrations'; export * from './stage'; export * from './api-mapping'; +export * from './vpc-link'; diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts index 237177f31957a..e609c9396c08f 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts @@ -33,6 +33,20 @@ export enum HttpIntegrationType { HTTP_PROXY = 'HTTP_PROXY', } +/** + * Supported connection types + */ +export enum HttpConnectionType { + /** + * For private connections between API Gateway and resources in a VPC + */ + VPC_LINK = 'VPC_LINK', + /** + * For connections through public routable internet + */ + INTERNET = 'INTERNET', +} + /** * Payload format version for lambda proxy integration * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html @@ -86,6 +100,20 @@ export interface HttpIntegrationProps { */ readonly method?: HttpMethod; + /** + * The ID of the VPC link for a private integration. Supported only for HTTP APIs. + * + * @default - undefined + */ + readonly connectionId?: string; + + /** + * The type of the network connection to the integration endpoint + * + * @default HttpConnectionType.INTERNET + */ + readonly connectionType?: HttpConnectionType; + /** * The version of the payload format * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html @@ -110,6 +138,8 @@ export class HttpIntegration extends Resource implements IHttpIntegration { integrationType: props.integrationType, integrationUri: props.integrationUri, integrationMethod: props.method, + connectionId: props.connectionId, + connectionType: props.connectionType, payloadFormatVersion: props.payloadFormatVersion?.version, }); this.integrationId = integ.ref; @@ -165,6 +195,20 @@ export interface HttpRouteIntegrationConfig { */ readonly method?: HttpMethod; + /** + * The ID of the VPC link for a private integration. Supported only for HTTP APIs. + * + * @default - undefined + */ + readonly connectionId?: string; + + /** + * The type of the network connection to the integration endpoint + * + * @default HttpConnectionType.INTERNET + */ + readonly connectionType?: HttpConnectionType; + /** * Payload format version in the case of lambda proxy integration * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts index 6f13c46d9e3d5..e688e78d84921 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts @@ -120,16 +120,18 @@ export class HttpRoute extends Resource implements IHttpRoute { this.httpApi = props.httpApi; this.path = props.routeKey.path; - let integration: HttpIntegration | undefined; const config = props.integration.bind({ route: this, scope: this, }); - integration = new HttpIntegration(this, `${this.node.id}-Integration`, { + + const integration = new HttpIntegration(this, `${this.node.id}-Integration`, { httpApi: props.httpApi, integrationType: config.type, integrationUri: config.uri, method: config.method, + connectionId: config.connectionId, + connectionType: config.connectionType, payloadFormatVersion: config.payloadFormatVersion, }); diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts new file mode 100644 index 0000000000000..ac832a730e62c --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts @@ -0,0 +1,120 @@ +import * as ec2 from '@aws-cdk/aws-ec2'; +import { IResource, Lazy, Resource } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnVpcLink } from '../apigatewayv2.generated'; + +/** + * Represents an API Gateway VpcLink + */ +export interface IVpcLink extends IResource { + /** + * Physical ID of the VpcLink resource + * @attribute + */ + readonly vpcLinkId: string; +} + +/** + * Properties for a VpcLink + */ +export interface VpcLinkProps { + /** + * The VPC in which the private resources reside. + */ + readonly vpc: ec2.IVpc; + + /** + * The name used to label and identify the VPC link. + * @default - automatically generated name + */ + readonly vpcLinkName?: string; + + /** + * A list of subnets for the VPC link. + * + * @default - private subnets of the provided VPC. Use `addSubnets` to add more subnets + */ + readonly subnets?: ec2.ISubnet[]; + + /** + * A list of security groups for the VPC link. + * + * @default - no security groups. Use `addSecurityGroups` to add security groups + */ + readonly securityGroups?: ec2.ISecurityGroup[]; +} + + +/** + * Define a new VPC Link + * Specifies an API Gateway VPC link for a HTTP API to access resources in an Amazon Virtual Private Cloud (VPC). + */ +export class VpcLink extends Resource implements IVpcLink { + /** + * Import a VPC Link by its Id + */ + public static fromVpcLinkId(scope: Construct, id: string, vpcLinkId: string): IVpcLink { + class Import extends Resource implements IVpcLink { + public vpcLinkId = vpcLinkId; + } + + return new Import(scope, id); + } + + /** + * Physical ID of the VpcLink resource + * @attribute + */ + public readonly vpcLinkId: string; + + private readonly subnets = new Array(); + private readonly securityGroups = new Array(); + + constructor(scope: Construct, id: string, props: VpcLinkProps) { + super(scope, id); + + const cfnResource = new CfnVpcLink(this, 'Resource', { + name: props.vpcLinkName || Lazy.stringValue({ produce: () => this.node.uniqueId }), + subnetIds: Lazy.listValue({ produce: () => this.renderSubnets() }), + securityGroupIds: Lazy.listValue({ produce: () => this.renderSecurityGroups() }), + }); + + this.vpcLinkId = cfnResource.ref; + + this.addSubnets(...props.vpc.privateSubnets); + + if (props.subnets) { + this.addSubnets(...props.subnets); + } + + if (props.securityGroups) { + this.addSecurityGroups(...props.securityGroups); + } + } + + /** + * Adds the provided subnets to the vpc link + * + * @param subnets + */ + public addSubnets(...subnets: ec2.ISubnet[]) { + this.subnets.push(...subnets); + } + + /** + * Adds the provided security groups to the vpc link + * + * @param groups + */ + public addSecurityGroups(...groups: ec2.ISecurityGroup[]) { + this.securityGroups.push(...groups); + } + + private renderSubnets() { + return this.subnets.map(subnet => subnet.subnetId); + } + + private renderSecurityGroups() { + return this.securityGroups.map(sg => sg.securityGroupId); + } +} diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index 7c079b71baab1..07559822d43fc 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -81,6 +81,7 @@ }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", + "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", @@ -88,6 +89,7 @@ "constructs": "^3.0.4" }, "peerDependencies": { + "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts index 13ee4e120945d..bfc9c9102a011 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts @@ -1,6 +1,7 @@ import '@aws-cdk/assert/jest'; import { ABSENT } from '@aws-cdk/assert'; import { Metric } from '@aws-cdk/aws-cloudwatch'; +import * as ec2 from '@aws-cdk/aws-ec2'; import { Code, Function, Runtime } from '@aws-cdk/aws-lambda'; import { Duration, Stack } from '@aws-cdk/core'; import { HttpApi, HttpMethod, LambdaProxyIntegration } from '../../lib'; @@ -233,4 +234,43 @@ describe('HttpApi', () => { Description: 'My Api', }); }); + + test('can add a vpc links', () => { + // GIVEN + const stack = new Stack(); + const api = new HttpApi(stack, 'api'); + const vpc1 = new ec2.Vpc(stack, 'VPC-1'); + const vpc2 = new ec2.Vpc(stack, 'VPC-2'); + + // WHEN + api.addVpcLink({ vpc: vpc1, vpcLinkName: 'Link-1' }); + api.addVpcLink({ vpc: vpc2, vpcLinkName: 'Link-2' }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'Link-1', + }); + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'Link-2', + }); + }); + + test('should add only one vpc link per vpc', () => { + // GIVEN + const stack = new Stack(); + const api = new HttpApi(stack, 'api'); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + api.addVpcLink({ vpc, vpcLinkName: 'Link-1' }); + api.addVpcLink({ vpc, vpcLinkName: 'Link-2' }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'Link-1', + }); + expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'Link-2', + }); + }); }); diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts index 6d125b5eadc6e..e250ae153389d 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts @@ -1,7 +1,7 @@ import '@aws-cdk/assert/jest'; import { Stack } from '@aws-cdk/core'; import { - HttpApi, HttpIntegrationType, HttpMethod, HttpRoute, HttpRouteIntegrationConfig, HttpRouteKey, IHttpRouteIntegration, + HttpApi, HttpConnectionType, HttpIntegrationType, HttpMethod, HttpRoute, HttpRouteIntegrationConfig, HttpRouteKey, IHttpRouteIntegration, PayloadFormatVersion, } from '../../lib'; @@ -77,6 +77,42 @@ describe('HttpRoute', () => { })).toThrowError(/path must always start with a "\/" and not end with a "\/"/); }); + test('configures private integration correctly when all props are passed', () => { + // GIVEN + const stack = new Stack(); + const httpApi = new HttpApi(stack, 'HttpApi'); + + class PrivateIntegration implements IHttpRouteIntegration { + public bind(): HttpRouteIntegrationConfig { + return { + method: HttpMethod.ANY, + payloadFormatVersion: PayloadFormatVersion.VERSION_1_0, + type: HttpIntegrationType.HTTP_PROXY, + connectionId: 'some-connection-id', + connectionType: HttpConnectionType.VPC_LINK, + uri: 'some-target-arn', + }; + } + } + + // WHEN + new HttpRoute(stack, 'HttpRoute', { + httpApi, + integration: new PrivateIntegration(), + routeKey: HttpRouteKey.with('/books', HttpMethod.GET), + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { + IntegrationType: 'HTTP_PROXY', + ConnectionId: 'some-connection-id', + ConnectionType: 'VPC_LINK', + IntegrationMethod: 'ANY', + IntegrationUri: 'some-target-arn', + PayloadFormatVersion: '1.0', + }); + expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink'); + }); }); class DummyIntegration implements IHttpRouteIntegration { diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts new file mode 100644 index 0000000000000..b5f7dc178e458 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts @@ -0,0 +1,188 @@ +import '@aws-cdk/assert/jest'; +import * as ec2 from '@aws-cdk/aws-ec2'; +import { Stack } from '@aws-cdk/core'; +import { VpcLink } from '../../lib'; + +describe('VpcLink', () => { + test('default setup', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new VpcLink(stack, 'VpcLink', { + vpcLinkName: 'MyLink', + vpc, + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'MyLink', + SubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + ], + SecurityGroupIds: [], + }); + }); + + test('subnets and security security groups in props', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const subnet1 = new ec2.Subnet(stack, 'subnet1', { + vpcId: vpc.vpcId, + availabilityZone: vpc.availabilityZones[0], + cidrBlock: vpc.vpcCidrBlock, + }); + const subnet2 = new ec2.Subnet(stack, 'subnet2', { + vpcId: vpc.vpcId, + availabilityZone: vpc.availabilityZones[1], + cidrBlock: vpc.vpcCidrBlock, + }); + const sg1 = new ec2.SecurityGroup(stack, 'SG1', { vpc }); + const sg2 = new ec2.SecurityGroup(stack, 'SG2', { vpc }); + const sg3 = new ec2.SecurityGroup(stack, 'SG3', { vpc }); + + // WHEN + new VpcLink(stack, 'VpcLink', { + vpc, + subnets: [subnet1, subnet2], + securityGroups: [sg1, sg2, sg3], + }); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'VpcLink', + SubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + { + Ref: 'subnet1Subnet16A4B3BD', + }, + { + Ref: 'subnet2SubnetF9569CD3', + }, + ], + SecurityGroupIds: [ + { + 'Fn::GetAtt': [ + 'SG1BA065B6E', + 'GroupId', + ], + }, + { + 'Fn::GetAtt': [ + 'SG20CE3219C', + 'GroupId', + ], + }, + { + 'Fn::GetAtt': [ + 'SG351782A25', + 'GroupId', + ], + }, + ], + }); + }); + + test('subnets can be added using addSubnets', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const subnet = new ec2.Subnet(stack, 'subnet', { + vpcId: vpc.vpcId, + availabilityZone: vpc.availabilityZones[0], + cidrBlock: vpc.vpcCidrBlock, + }); + + // WHEN + const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); + vpcLink.addSubnets(subnet); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'VpcLink', + SubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + { + Ref: 'subnetSubnet39D20FD5', + }, + ], + }); + }); + + test('security groups can be added using addSecurityGroups', () => { + // GIVEN + const stack = new Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const sg1 = new ec2.SecurityGroup(stack, 'SG1', { vpc }); + const sg2 = new ec2.SecurityGroup(stack, 'SG2', { vpc }); + const sg3 = new ec2.SecurityGroup(stack, 'SG3', { vpc }); + + + // WHEN + const vpcLink = new VpcLink(stack, 'VpcLink', { + vpc, + }); + vpcLink.addSecurityGroups(sg1, sg2, sg3); + + // THEN + expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { + Name: 'VpcLink', + SubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + ], + SecurityGroupIds: [ + { + 'Fn::GetAtt': [ + 'SG1BA065B6E', + 'GroupId', + ], + }, + { + 'Fn::GetAtt': [ + 'SG20CE3219C', + 'GroupId', + ], + }, + { + 'Fn::GetAtt': [ + 'SG351782A25', + 'GroupId', + ], + }, + ], + }); + }); + + test('importing an existing vpc link', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + VpcLink.fromVpcLinkId(stack, 'ImportedVpcLink', 'vpclink-id'); + + // THEN + expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink'); + }); +}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts index 17857a2ed4187..cf98f4b7cbbd4 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts @@ -106,7 +106,7 @@ export class NetworkListener extends BaseListener implements INetworkListener { /** * The load balancer this listener is attached to */ - private readonly loadBalancer: INetworkLoadBalancer; + public readonly loadBalancer: INetworkLoadBalancer; /** * the protocol of the listener diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 47b286dff08ff..6730c3f050759 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -103,6 +103,7 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index c5e037718909f..53f1f7ad15610 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -36,6 +36,7 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 2c257cdf70c9f..e491685485c62 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -102,6 +102,7 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", From 17a87fc542354509d2ca9e644eaac992ea7460cb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2020 17:34:33 +0000 Subject: [PATCH 36/45] chore(deps): bump jsonschema from 1.2.10 to 1.4.0 (#11069) Bumps [jsonschema](https://github.com/tdegrunt/jsonschema) from 1.2.10 to 1.4.0. - [Release notes](https://github.com/tdegrunt/jsonschema/releases) - [Commits](https://github.com/tdegrunt/jsonschema/compare/v1.2.10...v1.4.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .../@aws-cdk/cloud-assembly-schema/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- packages/decdk/package.json | 2 +- packages/monocdk/package.json | 2 +- yarn.lock | 13 ++++--------- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index d6b7f95639067..eea719afcb6c3 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -82,7 +82,7 @@ "exclude": [] }, "dependencies": { - "jsonschema": "^1.2.10", + "jsonschema": "^1.4.0", "semver": "^7.3.2" }, "awscdkio": { diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 6730c3f050759..5b627bb924566 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -88,7 +88,7 @@ "dependencies": { "case": "1.6.3", "fs-extra": "^9.0.1", - "jsonschema": "^1.2.10", + "jsonschema": "^1.4.0", "minimatch": "^3.0.4", "semver": "^7.3.2", "yaml": "1.10.0" diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 53f1f7ad15610..c32c6039b039d 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -191,7 +191,7 @@ "constructs": "^3.0.4", "fs-extra": "^9.0.1", "jsii-reflect": "^1.13.0", - "jsonschema": "^1.2.10", + "jsonschema": "^1.4.0", "yaml": "1.10.0", "yargs": "^16.1.0" }, diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index e491685485c62..93e7257628021 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -87,7 +87,7 @@ "dependencies": { "case": "1.6.3", "fs-extra": "^9.0.1", - "jsonschema": "^1.2.10", + "jsonschema": "^1.4.0", "minimatch": "^3.0.4", "semver": "^7.3.2", "yaml": "1.10.0" diff --git a/yarn.lock b/yarn.lock index 1717aafb3bafa..4a31db8deb4dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8728,15 +8728,10 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= -jsonschema@^1.2.10: - version "1.2.10" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.10.tgz#38dc18b63839e8f07580df015e37d959f20d1eda" - integrity sha512-CoRSun5gmvgSYMHx5msttse19SnQpaHoPzIqULwE7B9KtR4Od1g70sBqeUriq5r8b9R3ptDc0o7WKpUDjUgLgg== - -jsonschema@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.7.tgz#4e6d6dc4d83dc80707055ba22c00ec6152c0e6e9" - integrity sha512-3dFMg9hmI9LdHag/BRIhMefCfbq1hicvYMy8YhZQorAdzOzWz7NjniSpn39yjpzUAMIWtGyyZuH2KNBloH7ZLw== +jsonschema@^1.2.7, jsonschema@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.0.tgz#1afa34c4bc22190d8e42271ec17ac8b3404f87b2" + integrity sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw== jsprim@^1.2.2: version "1.4.1" From 0d92242c62d4d5e066e5550d3bfb0742fcbf0b17 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Fri, 23 Oct 2020 11:03:15 -0700 Subject: [PATCH 37/45] docs(cognito): README touch-ups (#10993) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cognito/README.md | 35 +++++++++++++++++-- .../rosetta/with-lambda-trigger.ts-fixture | 26 ++++++++++++++ 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 packages/@aws-cdk/aws-cognito/rosetta/with-lambda-trigger.ts-fixture diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 70fe341c59c8b..2974610b23b1c 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -38,6 +38,7 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw - [Account Recovery Settings](#account-recovery-settings) - [Emails](#emails) - [Lambda Triggers](#lambda-triggers) + - [Trigger Permissions](#trigger-permissions) - [Import](#importing-user-pools) - [Identity Providers](#identity-providers) - [App Clients](#app-clients) @@ -58,6 +59,10 @@ new cognito.UserPool(this, 'myuserpool', { }); ``` +The default set up for the user pool is configured such that only administrators will be allowed +to create users. Features such as Multi-factor authentication (MFAs) and Lambda Triggers are not +configured by default. + ### Sign Up Users can either be signed up by the app's administrators or can sign themselves up. Once a user has signed up, their @@ -131,6 +136,8 @@ used additionally; or it can be configured so that email and/or phone numbers ar sign in. Read more about this [here](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-aliases-settings). +⚠️ The Cognito service prevents changing the `signInAlias` property for an existing user pool. + To match with 'Option 1' in the above link, with a verified email, `signInAliases` should be set to `{ username: true, email: true }`. To match with 'Option 2' in the above link with both a verified email and phone number, this property should be set to `{ email: true, phone: true }`. @@ -288,6 +295,9 @@ new cognito.UserPool(this, 'UserPool', { }) ``` +The default for account recovery is by phone if available and by email otherwise. +A user will not be allowed to reset their password via phone if they are also using it for MFA. + ### Emails Cognito sends emails to users in the user pool, when particular actions take place, such as welcome emails, invitation @@ -345,6 +355,27 @@ The following table lists the set of triggers available, and their corresponding For more information on the function of these triggers and how to configure them, read [User Pool Workflows with Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html). +#### Trigger Permissions + +The `function.attachToRolePolicy()` API can be used to add additional IAM permissions to the lambda trigger +as necessary. + +⚠️ Using the `attachToRolePolicy` API to provide permissions to your user pool will result in a circular dependency. See [aws/aws-cdk#7016](https://github.com/aws/aws-cdk/issues/7016). +Error message when running `cdk synth` or `cdk deploy`: +> Circular dependency between resources: [pool056F3F7E, fnPostAuthFnCognitoA630A2B1, ...] + +To work around the circular dependency issue, use the `attachInlinePolicy()` API instead, as shown below. + +```ts fixture=with-lambda-trigger +// provide permissions to describe the user pool scoped to the ARN the user pool +postAuthFn.role?.attachInlinePolicy(new iam.Policy(this, 'userpool-policy', { + statements: [new iam.PolicyStatement({ + actions: ['cognito-idp:DescribeUserPool'], + resources: [userpool.userPoolArn], + })], +})); +``` + ### Importing User Pools Any user pool that has been created outside of this stack, can be imported into the CDK app. Importing a user pool @@ -370,7 +401,7 @@ identity provider. Once configured, the Cognito backend will take care of integr Read more about [Adding User Pool Sign-in Through a Third Party](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html). -The following third-party identity providers are currentlhy supported in the CDK - +The following third-party identity providers are currently supported in the CDK - * [Login With Amazon](https://developer.amazon.com/apps-and-games/login-with-amazon) * [Facebook Login](https://developers.facebook.com/docs/facebook-login/) @@ -580,4 +611,4 @@ Existing domains can be imported into CDK apps using `UserPoolDomain.fromDomainN ```ts const myUserPoolDomain = cognito.UserPoolDomain.fromDomainName(this, 'my-user-pool-domain', 'domain-name'); -``` \ No newline at end of file +``` diff --git a/packages/@aws-cdk/aws-cognito/rosetta/with-lambda-trigger.ts-fixture b/packages/@aws-cdk/aws-cognito/rosetta/with-lambda-trigger.ts-fixture new file mode 100644 index 0000000000000..de9aa90eedfc2 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/rosetta/with-lambda-trigger.ts-fixture @@ -0,0 +1,26 @@ +// Fixture with packages imported, but nothing else +import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import * as cognito from '@aws-cdk/aws-cognito'; +import * as iam from '@aws-cdk/aws-iam'; +import * as lambda from '@aws-cdk/aws-lambda'; + +class Fixture extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + + const postAuthFn = new lambda.Function(this, 'postAuthFn', { + code: lambda.Code.fromInline('post authentication'), + runtime: lambda.Runtime.NODEJS_12_X, + handler: 'index.handler', + }); + + const userpool = new cognito.UserPool(this, 'myuserpool', { + lambdaTriggers: { + postAuthentication: postAuthFn, + }, + }); + + /// here + } +} From 5dc1d96e77ec2359a77aed7266c4e7769d04e084 Mon Sep 17 00:00:00 2001 From: Iiro Huikko Date: Fri, 23 Oct 2020 21:58:56 +0300 Subject: [PATCH 38/45] fix(ses-actions): invalid action in policy statement created when using SES S3 action (#11061) Current SES S3 action does not work out of the box because there is a typo in a policy statement action. This PR fixes that `km:Encrypt` => `kms:Encrypt`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ses-actions/lib/s3.ts | 2 +- packages/@aws-cdk/aws-ses-actions/test/actions.test.ts | 2 +- .../@aws-cdk/aws-ses-actions/test/integ.actions.expected.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-ses-actions/lib/s3.ts b/packages/@aws-cdk/aws-ses-actions/lib/s3.ts index 35014d7a381f9..9be2fd8750378 100644 --- a/packages/@aws-cdk/aws-ses-actions/lib/s3.ts +++ b/packages/@aws-cdk/aws-ses-actions/lib/s3.ts @@ -72,7 +72,7 @@ export class S3 implements ses.IReceiptRuleAction { // See https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html#receiving-email-permissions-kms if (this.props.kmsKey && !/alias\/aws\/ses$/.test(this.props.kmsKey.keyArn)) { const kmsStatement = new iam.PolicyStatement({ - actions: ['km:Encrypt', 'kms:GenerateDataKey'], + actions: ['kms:Encrypt', 'kms:GenerateDataKey'], principals: [new iam.ServicePrincipal('ses.amazonaws.com')], resources: ['*'], conditions: { diff --git a/packages/@aws-cdk/aws-ses-actions/test/actions.test.ts b/packages/@aws-cdk/aws-ses-actions/test/actions.test.ts index fb84ae69a372b..3a963fcf3f24b 100644 --- a/packages/@aws-cdk/aws-ses-actions/test/actions.test.ts +++ b/packages/@aws-cdk/aws-ses-actions/test/actions.test.ts @@ -267,7 +267,7 @@ test('add s3 action', () => { }, { Action: [ - 'km:Encrypt', + 'kms:Encrypt', 'kms:GenerateDataKey', ], Condition: { diff --git a/packages/@aws-cdk/aws-ses-actions/test/integ.actions.expected.json b/packages/@aws-cdk/aws-ses-actions/test/integ.actions.expected.json index db7a2a0f70eaa..2bde038826803 100644 --- a/packages/@aws-cdk/aws-ses-actions/test/integ.actions.expected.json +++ b/packages/@aws-cdk/aws-ses-actions/test/integ.actions.expected.json @@ -161,7 +161,7 @@ }, { "Action": [ - "km:Encrypt", + "kms:Encrypt", "kms:GenerateDataKey" ], "Condition": { @@ -389,4 +389,4 @@ } } } -} \ No newline at end of file +} From 7435db853636628a60c8aa465481fc01136aa4a1 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Fri, 23 Oct 2020 12:26:49 -0700 Subject: [PATCH 39/45] feat(cognito): Cognito User Pools is now in Generally Available (stable) (#11003) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cognito/README.md | 4 ++-- packages/@aws-cdk/aws-cognito/package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index 2974610b23b1c..7160d9cf60efc 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -5,12 +5,12 @@ | Features | Stability | | --- | --- | | CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | -| Higher level constructs for User Pools | ![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge) | +| Higher level constructs for User Pools | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) | | Higher level constructs for Identity Pools | ![Not Implemented](https://img.shields.io/badge/not--implemented-black.svg?style=for-the-badge) | > **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use. -> **Developer Preview:** Higher level constructs in this module that are marked as developer preview have completed their phase of active development and are looking for adoption and feedback. While the same caveats around non-backward compatible as Experimental constructs apply, they will undergo fewer breaking changes. Just as with Experimental constructs, these are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. +> **Stable:** Higher level constructs in this module that are marked stable will not undergo any breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. --- diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index c54873f73863e..423f7cca2eae4 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -111,12 +111,12 @@ "props-physical-name:@aws-cdk/aws-cognito.UserPoolIdentityProviderGoogleProps" ] }, - "stability": "experimental", - "maturity": "developer-preview", + "stability": "stable", + "maturity": "stable", "features": [ { "name": "Higher level constructs for User Pools", - "stability": "Developer Preview" + "stability": "Stable" }, { "name": "Higher level constructs for Identity Pools", From f4f53a65e55d895338aecf8cb63637c6d265b929 Mon Sep 17 00:00:00 2001 From: wtho Date: Fri, 23 Oct 2020 21:54:42 +0200 Subject: [PATCH 40/45] feat(lambda-event-sources): disable source mapping (#10927) Specifically, it enables this flag in the props of which resources use an underlying Cfn EventSourceMapping, which carries the Enabled flag itself. These are currently: SQS, DynamoDb Streams and Kinesis. MSK is also listed in the Cfn Docs, but I could not find MSK in `lambda-event-sources`. Closes #5750 - [X] Added Unit Tests - [X] Documented addition in `README.md` This change is not breaking. I did not add integration tests so far, but could write some if required. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-lambda-event-sources/README.md | 3 +++ .../aws-lambda-event-sources/lib/sqs.ts | 8 ++++++ .../aws-lambda-event-sources/lib/stream.ts | 8 ++++++ .../test/test.dynamo.ts | 26 +++++++++++++++++++ .../test/test.kinesis.ts | 20 ++++++++++++++ .../aws-lambda-event-sources/test/test.sqs.ts | 19 ++++++++++++++ 6 files changed, 84 insertions(+) diff --git a/packages/@aws-cdk/aws-lambda-event-sources/README.md b/packages/@aws-cdk/aws-lambda-event-sources/README.md index b88ce808a9d9f..9f33fb689b54d 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/README.md +++ b/packages/@aws-cdk/aws-lambda-event-sources/README.md @@ -51,6 +51,7 @@ behavior: * __receiveMessageWaitTime__: Will determine [long poll](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html) duration. The default value is 20 seconds. +* __enabled__: If the SQS event source mapping should be enabled. The default is true. ```ts import * as sqs from '@aws-cdk/aws-sqs'; @@ -145,6 +146,7 @@ and add it to your Lambda function. The following parameters will impact Amazon * __parallelizationFactor__: The number of batches to concurrently process on each shard. * __retryAttempts__: The maximum number of times a record should be retried in the event of failure. * __startingPosition__: Will determine where to being consumption, either at the most recent ('LATEST') record or the oldest record ('TRIM_HORIZON'). 'TRIM_HORIZON' will ensure you process all available data, while 'LATEST' will ignore all records that arrived prior to attaching the event source. +* __enabled__: If the DynamoDB Streams event source mapping should be enabled. The default is true. ```ts import * as dynamodb from '@aws-cdk/aws-dynamodb'; @@ -188,6 +190,7 @@ behavior: * __parallelizationFactor__: The number of batches to concurrently process on each shard. * __retryAttempts__: The maximum number of times a record should be retried in the event of failure. * __startingPosition__: Will determine where to being consumption, either at the most recent ('LATEST') record or the oldest record ('TRIM_HORIZON'). 'TRIM_HORIZON' will ensure you process all available data, while 'LATEST' will ignore all records that arrived prior to attaching the event source. +* __enabled__: If the DynamoDB Streams event source mapping should be enabled. The default is true. ```ts import * as lambda from '@aws-cdk/aws-lambda'; diff --git a/packages/@aws-cdk/aws-lambda-event-sources/lib/sqs.ts b/packages/@aws-cdk/aws-lambda-event-sources/lib/sqs.ts index 9badef3e6f8bc..2c379e128541c 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/lib/sqs.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/lib/sqs.ts @@ -12,6 +12,13 @@ export interface SqsEventSourceProps { * @default 10 */ readonly batchSize?: number; + + /** + * If the SQS event source mapping should be enabled. + * + * @default true + */ + readonly enabled?: boolean; } /** @@ -29,6 +36,7 @@ export class SqsEventSource implements lambda.IEventSource { public bind(target: lambda.IFunction) { const eventSourceMapping = target.addEventSourceMapping(`SqsEventSource:${this.queue.node.uniqueId}`, { batchSize: this.props.batchSize, + enabled: this.props.enabled, eventSourceArn: this.queue.queueArn, }); this._eventSourceMappingId = eventSourceMapping.eventSourceMappingId; diff --git a/packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts b/packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts index 5dd6570c29712..d18eaaf3f947c 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts @@ -77,6 +77,13 @@ export interface StreamEventSourceProps { * @default Duration.seconds(0) */ readonly maxBatchingWindow?: Duration; + + /** + * If the stream event source mapping should be enabled. + * + * @default true + */ + readonly enabled?: boolean; } /** @@ -99,6 +106,7 @@ export abstract class StreamEventSource implements lambda.IEventSource { retryAttempts: this.props.retryAttempts, parallelizationFactor: this.props.parallelizationFactor, onFailure: this.props.onFailure, + enabled: this.props.enabled, }; } } diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/test.dynamo.ts b/packages/@aws-cdk/aws-lambda-event-sources/test/test.dynamo.ts index ec8de1664ac26..41d8535d90235 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/test.dynamo.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/test/test.dynamo.ts @@ -596,4 +596,30 @@ export = { test.done(); }, + + 'event source disabled'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fn = new TestFunction(stack, 'Fn'); + const table = new dynamodb.Table(stack, 'T', { + partitionKey: { + name: 'id', + type: dynamodb.AttributeType.STRING, + }, + stream: dynamodb.StreamViewType.NEW_IMAGE, + }); + + // WHEN + fn.addEventSource(new sources.DynamoEventSource(table, { + startingPosition: lambda.StartingPosition.LATEST, + enabled: false, + })); + + //THEN + expect(stack).to(haveResource('AWS::Lambda::EventSourceMapping', { + 'Enabled': false, + })); + + test.done(); + }, }; diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts b/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts index 6fea04f3d9089..b8791c99017ec 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts @@ -210,4 +210,24 @@ export = { test.throws(() => eventSource.eventSourceMappingId, /KinesisEventSource is not yet bound to an event source mapping/); test.done(); }, + + 'event source disabled'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fn = new TestFunction(stack, 'Fn'); + const stream = new kinesis.Stream(stack, 'S'); + const eventSource = new sources.KinesisEventSource(stream, { + startingPosition: lambda.StartingPosition.LATEST, + enabled: false, + }); + + // WHEN + fn.addEventSource(eventSource); + + // THEN + expect(stack).to(haveResource('AWS::Lambda::EventSourceMapping', { + 'Enabled': false, + })); + test.done(); + }, }; diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/test.sqs.ts b/packages/@aws-cdk/aws-lambda-event-sources/test/test.sqs.ts index c2fcf18239b64..fd02dda47a304 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/test.sqs.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/test/test.sqs.ts @@ -138,4 +138,23 @@ export = { test.throws(() => eventSource.eventSourceMappingId, /SqsEventSource is not yet bound to an event source mapping/); test.done(); }, + + 'event source disabled'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fn = new TestFunction(stack, 'Fn'); + const q = new sqs.Queue(stack, 'Q'); + + // WHEN + fn.addEventSource(new sources.SqsEventSource(q, { + enabled: false, + })); + + // THEN + expect(stack).to(haveResource('AWS::Lambda::EventSourceMapping', { + 'Enabled': false, + })); + + test.done(); + }, }; From 65be3a0bd565f35161ee449d059db06cd77c20f5 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Fri, 23 Oct 2020 13:24:32 -0700 Subject: [PATCH 41/45] revert: "feat(apigatewayv2): vpc link and private integrations (#10531)" (#11070) This reverts commit 0537598a065c74c713d1ec58c96f09f0d66b12ca. This change requires aws/jsii#2172 to be merged and a jsii upgrade as the usage of `@internal` for `HttpPrivateIntegration` and `VpcLinkConfigurationOptions` is causing downstream compilation failures currently. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../.eslintrc.js | 3 - .../aws-apigatewayv2-integrations/.gitignore | 17 - .../aws-apigatewayv2-integrations/.npmignore | 28 - .../aws-apigatewayv2-integrations/LICENSE | 201 ----- .../aws-apigatewayv2-integrations/NOTICE | 2 - .../aws-apigatewayv2-integrations/README.md | 88 --- .../jest.config.js | 2 - .../lib/http/alb.ts | 39 - .../lib/http/base-types.ts | 19 - .../lib/http/index.ts | 4 - .../lib/http/nlb.ts | 39 - .../lib/http/private/integration.ts | 65 -- .../lib/http/service-discovery.ts | 44 -- .../lib/index.ts | 1 - .../package.json | 104 --- .../test/http/alb.test.ts | 101 --- .../test/http/integ.alb.expected.json | 702 ------------------ .../test/http/integ.alb.ts | 31 - .../test/http/integ.nlb.expected.json | 667 ----------------- .../test/http/integ.nlb.ts | 24 - .../integ.service-discovery.expected.json | 653 ---------------- .../test/http/integ.service-discovery.ts | 28 - .../test/http/nlb.test.ts | 102 --- .../test/http/private/integration.test.ts | 37 - .../test/http/service-discovery.test.ts | 77 -- packages/@aws-cdk/aws-apigatewayv2/README.md | 27 - .../@aws-cdk/aws-apigatewayv2/lib/http/api.ts | 20 - .../aws-apigatewayv2/lib/http/index.ts | 1 - .../aws-apigatewayv2/lib/http/integration.ts | 44 -- .../aws-apigatewayv2/lib/http/route.ts | 6 +- .../aws-apigatewayv2/lib/http/vpc-link.ts | 120 --- .../@aws-cdk/aws-apigatewayv2/package.json | 2 - .../aws-apigatewayv2/test/http/api.test.ts | 40 - .../aws-apigatewayv2/test/http/route.test.ts | 38 +- .../test/http/vpc-link.test.ts | 188 ----- .../lib/nlb/network-listener.ts | 2 +- packages/aws-cdk-lib/package.json | 1 - packages/decdk/package.json | 1 - packages/monocdk/package.json | 1 - 39 files changed, 4 insertions(+), 3565 deletions(-) delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/README.md delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/package.json delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts delete mode 100644 packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js b/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js deleted file mode 100644 index 61dd8dd001f63..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/.eslintrc.js +++ /dev/null @@ -1,3 +0,0 @@ -const baseConfig = require('cdk-build-tools/config/eslintrc'); -baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; -module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore b/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore deleted file mode 100644 index becda34c45624..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -*.d.ts -*.generated.ts -*.js -*.js.map -*.snk -.jsii -.LAST_BUILD -.LAST_PACKAGE -nyc.config.js -.nyc_output -coverage -dist -tsconfig.json -!.eslintrc.js -!jest.config.js - -junit.xml \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore b/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore deleted file mode 100644 index 093c734b1bd2f..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore +++ /dev/null @@ -1,28 +0,0 @@ -# The basics -*.ts -*.tgz -*.snk -!*.d.ts -!*.js -**/cdk.out - -# Coverage -coverage -.nyc_output -.nycrc - -# Build gear -dist -.LAST_BUILD -.LAST_PACKAGE - -*.tsbuildinfo -tsconfig.json -!.jsii -.eslintrc.js -jest.config.js - -# exclude cdk artifacts -**/cdk.out -junit.xml -test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE b/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE deleted file mode 100644 index b71ec1688783a..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE b/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE deleted file mode 100644 index bfccac9a7f69c..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md b/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md deleted file mode 100644 index 2cda8eab308ab..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/README.md +++ /dev/null @@ -1,88 +0,0 @@ -## AWS APIGatewayv2 Integrations - ---- - -![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) - -> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package. - ---- - - -## Table of Contents - -- [Introduction](#introduction) -- [Private Integration](#private-integration) - -## Introduction - -Integrations connect a route to backend resources. HTTP APIs support Lambda proxy, AWS service, and HTTP proxy integrations. HTTP proxy integrations are also known as private integrations. - -Currently the following integrations are supported by this construct library. - -## Private Integration - -Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or -Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by -clients outside of the VPC. - -The following integrations are supported for private resources in a VPC. - -### Application Load Balancer - -The following code is a basic application load balancer private integration of HTTP API: - -```ts -const vpc = new ec2.Vpc(stack, 'VPC'); -const lb = new elbv2.ALB(stack, 'lb', { vpc }); -const listener = lb.addListener('listener', { port: 80 }); -listener.addTargets('target', { - port: 80, -}); - -const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { - defaultIntegration: new HttpAlbIntegrationProps({ - listener, - }), -}); -``` - -### Network Load Balancer - -The following code is a basic network load balancer private integration of HTTP API: - -```ts -const vpc = new ec2.Vpc(stack, 'VPC'); -const lb = new elbv2.NLB(stack, 'lb', { vpc }); -const listener = lb.addListener('listener', { port: 80 }); -listener.addTargets('target', { - port: 80, -}); - -const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { - defaultIntegration: new HttpNlbIntegrationProps({ - listener, - }), -}); -``` - -### Cloud Map Service Discovery - -The following code is a basic discovery service private integration of HTTP API: - -```ts -const vpc = new ec2.Vpc(stack, 'VPC'); -const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); -const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { - name: 'boobar.com', - vpc, -}); -const service = namespace.createService('Service'); - -const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { - defaultIntegration: new HttpServiceDiscoveryIntegration({ - vpcLink, - service, - }), -}); -``` diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js b/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js deleted file mode 100644 index 54e28beb9798b..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/jest.config.js +++ /dev/null @@ -1,2 +0,0 @@ -const baseConfig = require('cdk-build-tools/config/jest.config'); -module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts deleted file mode 100644 index 2d35f89e8206e..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; -import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; -import { HttpPrivateIntegrationOptions } from './base-types'; -import { HttpPrivateIntegration } from './private/integration'; - -/** - * Properties to initialize `HttpAlbIntegration`. - */ -export interface HttpAlbIntegrationProps extends HttpPrivateIntegrationOptions { - /** - * The listener to the application load balancer used for the integration - */ - readonly listener: elbv2.ApplicationListener; -} - -/** - * The Application Load Balancer integration resource for HTTP API - */ -export class HttpAlbIntegration extends HttpPrivateIntegration { - constructor(private readonly props: HttpAlbIntegrationProps) { - super(); - } - - public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { - const vpcLink = this._configureVpcLink(options, { - vpcLink: this.props.vpcLink, - vpc: this.props.listener.loadBalancer.vpc, - }); - - return { - method: this.props.method ?? this.httpMethod, - payloadFormatVersion: this.payloadFormatVersion, - type: this.integrationType, - connectionType: this.connectionType, - connectionId: vpcLink.vpcLinkId, - uri: this.props.listener.listenerArn, - }; - } -} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts deleted file mode 100644 index 5000dfb63a751..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { HttpMethod, IVpcLink } from '@aws-cdk/aws-apigatewayv2'; - -/** - * Base options for private integration - */ -export interface HttpPrivateIntegrationOptions { - /** - * The vpc link to be used for the private integration - * - * @default - a new VpcLink is created - */ - readonly vpcLink?: IVpcLink; - - /** - * The HTTP method that must be used to invoke the underlying HTTP proxy. - * @default HttpMethod.ANY - */ - readonly method?: HttpMethod; -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts deleted file mode 100644 index bd4bb0ee34cac..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './base-types'; -export * from './alb'; -export * from './nlb'; -export * from './service-discovery'; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts deleted file mode 100644 index 1ee7ce4f208ed..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; -import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; -import { HttpPrivateIntegrationOptions } from './base-types'; -import { HttpPrivateIntegration } from './private/integration'; - -/** - * Properties to initialize `HttpNlbIntegration`. - */ -export interface HttpNlbIntegrationProps extends HttpPrivateIntegrationOptions { - /** - * The listener to the netwwork load balancer used for the integration - */ - readonly listener: elbv2.NetworkListener; -} - -/** - * The Network Load Balancer integration resource for HTTP API - */ -export class HttpNlbIntegration extends HttpPrivateIntegration { - constructor(private readonly props: HttpNlbIntegrationProps) { - super(); - } - - public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { - const vpcLink = this._configureVpcLink(options, { - vpcLink: this.props.vpcLink, - vpc: this.props.listener.loadBalancer.vpc, - }); - - return { - method: this.props.method ?? this.httpMethod, - payloadFormatVersion: this.payloadFormatVersion, - type: this.integrationType, - connectionType: this.connectionType, - connectionId: vpcLink.vpcLinkId, - uri: this.props.listener.listenerArn, - }; - } -} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts deleted file mode 100644 index 6d32b22794722..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/private/integration.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { - HttpConnectionType, - HttpIntegrationType, - HttpRouteIntegrationBindOptions, - HttpRouteIntegrationConfig, - IHttpRouteIntegration, - PayloadFormatVersion, - HttpMethod, - IVpcLink, -} from '@aws-cdk/aws-apigatewayv2'; -import * as ec2 from '@aws-cdk/aws-ec2'; - - -/** - * Options required to use an existing vpcLink or configure a new one - * - * @internal - */ -export interface VpcLinkConfigurationOptions { - /** - * The vpc link to be used for the private integration - * - * @default - a new VpcLink is created - */ - readonly vpcLink?: IVpcLink; - - /** - * The vpc for which the VpcLink needs to be created - * - * @default undefined - */ - readonly vpc?: ec2.IVpc; -} - -/** - * The HTTP Private integration resource for HTTP API - * - * @internal - */ -export abstract class HttpPrivateIntegration implements IHttpRouteIntegration { - protected httpMethod = HttpMethod.ANY; - protected payloadFormatVersion = PayloadFormatVersion.VERSION_1_0; // 1.0 is required and is the only supported format - protected integrationType = HttpIntegrationType.HTTP_PROXY; - protected connectionType = HttpConnectionType.VPC_LINK - - /** - * Adds a vpcLink to the API if not passed in the options - * - * @internal - */ - protected _configureVpcLink(bindOptions: HttpRouteIntegrationBindOptions, configOptions: VpcLinkConfigurationOptions): IVpcLink { - let vpcLink = configOptions.vpcLink; - if (!vpcLink) { - if (!configOptions.vpc) { - throw new Error('One of vpcLink or vpc should be provided for private integration'); - } - - vpcLink = bindOptions.route.httpApi.addVpcLink({ vpc: configOptions.vpc }); - } - - return vpcLink; - } - - public abstract bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig; -} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts deleted file mode 100644 index 96e13d0a03273..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { HttpMethod, IVpcLink, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig } from '@aws-cdk/aws-apigatewayv2'; -import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; -import { HttpPrivateIntegration } from './private/integration'; - -/** - * Properties to initialize `HttpServiceDiscoveryIntegration`. - */ -export interface HttpServiceDiscoveryIntegrationProps { - /** - * The discovery service used for the integration - */ - readonly service: servicediscovery.Service; - - /** - * The vpc link to be used for the private integration - */ - readonly vpcLink: IVpcLink; - - /** - * The HTTP method that must be used to invoke the underlying HTTP proxy. - * @default HttpMethod.ANY - */ - readonly method?: HttpMethod; -} - -/** - * The Service Discovery integration resource for HTTP API - */ -export class HttpServiceDiscoveryIntegration extends HttpPrivateIntegration { - constructor(private readonly props: HttpServiceDiscoveryIntegrationProps) { - super(); - } - - public bind(_: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { - return { - method: this.props.method ?? this.httpMethod, - payloadFormatVersion: this.payloadFormatVersion, - type: this.integrationType, - connectionType: this.connectionType, - connectionId: this.props.vpcLink.vpcLinkId, - uri: this.props.service.serviceArn, - }; - } -} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts deleted file mode 100644 index c202386ae710e..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/lib/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './http'; diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json deleted file mode 100644 index 30b3772fa586a..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "name": "@aws-cdk/aws-apigatewayv2-integrations", - "version": "0.0.0", - "description": "Integrations for AWS APIGateway V2", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "jsii": { - "outdir": "dist", - "targets": { - "dotnet": { - "namespace": "Amazon.CDK.AWS.APIGatewayv2.Integrations", - "packageId": "Amazon.CDK.AWS.APIGatewayv2.Integrations", - "signAssembly": true, - "assemblyOriginatorKeyFile": "../../key.snk", - "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" - }, - "java": { - "package": "software.amazon.awscdk.services.apigatewayv2.integrations", - "maven": { - "groupId": "software.amazon.awscdk", - "artifactId": "apigatewayv2-integrations" - } - }, - "python": { - "distName": "aws-cdk.aws-apigatewayv2-integrations", - "module": "aws_cdk.aws_apigatewayv2_integrations", - "classifiers": [ - "Framework :: AWS CDK", - "Framework :: AWS CDK :: 1" - ] - } - }, - "projectReferences": true - }, - "repository": { - "type": "git", - "url": "https://github.com/aws/aws-cdk.git", - "directory": "packages/@aws-cdk/aws-apigatewayv2-integrations" - }, - "homepage": "https://github.com/aws/aws-cdk", - "scripts": { - "build": "cdk-build", - "integ": "cdk-integ", - "lint": "cdk-lint", - "package": "cdk-package", - "awslint": "cdk-awslint", - "pkglint": "pkglint -f", - "test": "cdk-test", - "watch": "cdk-watch", - "compat": "cdk-compat", - "build+test": "npm run build && npm test", - "build+test+package": "npm run build+test && npm run package" - }, - "cdk-build": { - "jest": true, - "env": { - "AWSLINT_BASE_CONSTRUCT": true - } - }, - "keywords": [ - "aws", - "cdk", - "constructs", - "apigateway" - ], - "author": { - "name": "Amazon Web Services", - "url": "https://aws.amazon.com", - "organization": true - }, - "license": "Apache-2.0", - "devDependencies": { - "@aws-cdk/assert": "0.0.0", - "@types/nodeunit": "^0.0.31", - "cdk-build-tools": "0.0.0", - "cdk-integ-tools": "0.0.0", - "nodeunit": "^0.11.3", - "pkglint": "0.0.0" - }, - "dependencies": { - "@aws-cdk/aws-apigatewayv2": "0.0.0", - "@aws-cdk/aws-ec2": "0.0.0", - "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", - "@aws-cdk/aws-servicediscovery": "0.0.0", - "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.4" - }, - "peerDependencies": { - "@aws-cdk/aws-apigatewayv2": "0.0.0", - "@aws-cdk/aws-ec2": "0.0.0", - "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", - "@aws-cdk/aws-servicediscovery": "0.0.0", - "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.4" - }, - "engines": { - "node": ">= 10.13.0 <13 || >=13.7.0" - }, - "stability": "experimental", - "maturity": "experimental", - "awscdkio": { - "announce": false - } -} diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts deleted file mode 100644 index 691da1e4c3b9f..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/alb.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; -import { Stack } from '@aws-cdk/core'; -import { HttpAlbIntegration } from '../../lib'; - -describe('HttpAlbIntegration', () => { - test('default', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); - const listener = lb.addListener('listener', { port: 80 }); - listener.addTargets('target', { port: 80 }); - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new HttpAlbIntegration({ - listener, - }), - routeKey: HttpRouteKey.with('/pets'), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationType: 'HTTP_PROXY', - ConnectionId: { - Ref: 'HttpApiVpcLink159804837', - }, - ConnectionType: 'VPC_LINK', - IntegrationMethod: 'ANY', - IntegrationUri: { - Ref: 'lblistener657ADDEC', - }, - PayloadFormatVersion: '1.0', - }); - }); - - test('able to add a custom vpcLink', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); - const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); - const listener = lb.addListener('listener', { port: 80 }); - listener.addTargets('target', { port: 80 }); - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new HttpAlbIntegration({ - vpcLink, - listener, - }), - routeKey: HttpRouteKey.with('/pets'), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationType: 'HTTP_PROXY', - ConnectionId: { - Ref: 'VpcLink42ED6FF0', - }, - ConnectionType: 'VPC_LINK', - IntegrationMethod: 'ANY', - IntegrationUri: { - Ref: 'lblistener657ADDEC', - }, - PayloadFormatVersion: '1.0', - }); - }); - - test('method option is correctly recognized', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); - const listener = lb.addListener('listener', { port: 80 }); - listener.addTargets('target', { port: 80 }); - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new HttpAlbIntegration({ - listener, - method: HttpMethod.PATCH, - }), - routeKey: HttpRouteKey.with('/pets'), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationMethod: 'PATCH', - }); - }); -}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json deleted file mode 100644 index a052f0243e596..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.expected.json +++ /dev/null @@ -1,702 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-alb-integration/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "lbA35910C5": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internal", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "lbSecurityGroup47B6F855", - "GroupId" - ] - } - ], - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "Type": "application" - } - }, - "lbSecurityGroup47B6F855": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatically created Security Group for ELB integalbintegrationlb02F792D5", - "SecurityGroupEgress": [ - { - "CidrIp": "255.255.255.255/32", - "Description": "Disallow all traffic", - "FromPort": 252, - "IpProtocol": "icmp", - "ToPort": 86 - } - ], - "SecurityGroupIngress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow from anyone on port 80", - "FromPort": 80, - "IpProtocol": "tcp", - "ToPort": 80 - } - ], - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "lblistener657ADDEC": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "FixedResponseConfig": { - "StatusCode": "200" - }, - "Type": "fixed-response" - } - ], - "LoadBalancerArn": { - "Ref": "lbA35910C5" - }, - "Port": 80, - "Protocol": "HTTP" - } - }, - "lblistenertargetGroupC7489D1E": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "HTTP", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "HttpProxyPrivateApiA55E154D": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpProxyPrivateApi", - "ProtocolType": "HTTP" - } - }, - "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "IntegrationType": "HTTP_PROXY", - "ConnectionId": { - "Ref": "HttpProxyPrivateApiVpcLink190366CAE" - }, - "ConnectionType": "VPC_LINK", - "IntegrationMethod": "ANY", - "IntegrationUri": { - "Ref": "lblistener657ADDEC" - }, - "PayloadFormatVersion": "1.0" - } - }, - "HttpProxyPrivateApiDefaultRoute1BDCA252": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "RouteKey": "$default", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" - } - ] - ] - } - } - }, - "HttpProxyPrivateApiVpcLink190366CAE": { - "Type": "AWS::ApiGatewayV2::VpcLink", - "Properties": { - "Name": "integalbintegrationHttpProxyPrivateApiVpcLink125175F29", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "SecurityGroupIds": [] - } - }, - "HttpProxyPrivateApiDefaultStage18B3706E": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "StageName": "$default", - "AutoDeploy": true - } - } - }, - "Outputs": { - "Endpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts deleted file mode 100644 index e077560466851..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.alb.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { HttpApi } from '@aws-cdk/aws-apigatewayv2'; -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; -import { App, CfnOutput, Stack } from '@aws-cdk/core'; -import { HttpAlbIntegration } from '../../lib'; - -/* - * Stack verification steps: - * * Deploy the stack and wait for the API endpoint output to get printed - * * Hit the above endpoint using curl and expect a 200 response - */ - -const app = new App(); - -const stack = new Stack(app, 'integ-alb-integration'); - -const vpc = new ec2.Vpc(stack, 'VPC'); -const lb = new elbv2.ApplicationLoadBalancer(stack, 'lb', { vpc }); -const listener = lb.addListener('listener', { port: 80 }); -listener.addTargets('target', { port: 80 }); -listener.addAction('dsf', { action: elbv2.ListenerAction.fixedResponse(200) }); - -const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { - defaultIntegration: new HttpAlbIntegration({ - listener, - }), -}); - -new CfnOutput(stack, 'Endpoint', { - value: httpEndpoint.url!, -}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json deleted file mode 100644 index ea3801b13354f..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.expected.json +++ /dev/null @@ -1,667 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-nlb-integration/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "lbA35910C5": { - "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", - "Properties": { - "LoadBalancerAttributes": [ - { - "Key": "deletion_protection.enabled", - "Value": "false" - } - ], - "Scheme": "internal", - "Subnets": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "Type": "network" - } - }, - "lblistener657ADDEC": { - "Type": "AWS::ElasticLoadBalancingV2::Listener", - "Properties": { - "DefaultActions": [ - { - "TargetGroupArn": { - "Ref": "lblistenertargetGroupC7489D1E" - }, - "Type": "forward" - } - ], - "LoadBalancerArn": { - "Ref": "lbA35910C5" - }, - "Port": 80, - "Protocol": "TCP" - } - }, - "lblistenertargetGroupC7489D1E": { - "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", - "Properties": { - "Port": 80, - "Protocol": "TCP", - "VpcId": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "HttpProxyPrivateApiA55E154D": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpProxyPrivateApi", - "ProtocolType": "HTTP" - } - }, - "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "IntegrationType": "HTTP_PROXY", - "ConnectionId": { - "Ref": "HttpProxyPrivateApiVpcLink190366CAE" - }, - "ConnectionType": "VPC_LINK", - "IntegrationMethod": "ANY", - "IntegrationUri": { - "Ref": "lblistener657ADDEC" - }, - "PayloadFormatVersion": "1.0" - } - }, - "HttpProxyPrivateApiDefaultRoute1BDCA252": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "RouteKey": "$default", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" - } - ] - ] - } - } - }, - "HttpProxyPrivateApiVpcLink190366CAE": { - "Type": "AWS::ApiGatewayV2::VpcLink", - "Properties": { - "Name": "integnlbintegrationHttpProxyPrivateApiVpcLink1C940EC42", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "SecurityGroupIds": [] - } - }, - "HttpProxyPrivateApiDefaultStage18B3706E": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "StageName": "$default", - "AutoDeploy": true - } - } - }, - "Outputs": { - "Endpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts deleted file mode 100644 index 9b78c3f676e30..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.nlb.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { HttpApi } from '@aws-cdk/aws-apigatewayv2'; -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; -import { App, CfnOutput, Stack } from '@aws-cdk/core'; -import { HttpNlbIntegration } from '../../lib'; - -const app = new App(); - -const stack = new Stack(app, 'integ-nlb-integration'); - -const vpc = new ec2.Vpc(stack, 'VPC'); -const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); -const listener = lb.addListener('listener', { port: 80 }); -listener.addTargets('target', { port: 80 }); - -const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { - defaultIntegration: new HttpNlbIntegration({ - listener, - }), -}); - -new CfnOutput(stack, 'Endpoint', { - value: httpEndpoint.url!, -}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json deleted file mode 100644 index 30e1c20fbaddc..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.expected.json +++ /dev/null @@ -1,653 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.0.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.32.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet2EIP4947BC00": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2NATGateway3C070193": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet2EIP4947BC00", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet3Subnet631C5E25": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.64.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTable98AE0E14": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3RouteTableAssociation427FE0C6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - } - } - }, - "VPCPublicSubnet3DefaultRouteA0D29D46": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet3RouteTable98AE0E14" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet3EIPAD4BC883": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPublicSubnet3NATGatewayD3048F5C": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet3EIPAD4BC883", - "AllocationId" - ] - }, - "SubnetId": { - "Ref": "VPCPublicSubnet3Subnet631C5E25" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PublicSubnet3" - } - ] - } - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.96.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1a", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.128.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1b", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet2NATGateway3C070193" - } - } - }, - "VPCPrivateSubnet3Subnet3EDCD457": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "CidrBlock": "10.0.160.0/19", - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": "test-region-1c", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTable192186F8": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC/PrivateSubnet3" - } - ] - } - }, - "VPCPrivateSubnet3RouteTableAssociationC28D144E": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - } - }, - "VPCPrivateSubnet3DefaultRoute27F311AE": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet3RouteTable192186F8" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet3NATGatewayD3048F5C" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "integ-service-discovery-integration/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "VpcLink42ED6FF0": { - "Type": "AWS::ApiGatewayV2::VpcLink", - "Properties": { - "Name": "integservicediscoveryintegrationVpcLink09ACD3FF", - "SubnetIds": [ - { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - }, - { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - }, - { - "Ref": "VPCPrivateSubnet3Subnet3EDCD457" - } - ], - "SecurityGroupIds": [] - } - }, - "Namespace9B63B8C8": { - "Type": "AWS::ServiceDiscovery::PrivateDnsNamespace", - "Properties": { - "Name": "foobar.com", - "Vpc": { - "Ref": "VPCB9E5F0B4" - } - } - }, - "NamespaceServiceCABDF534": { - "Type": "AWS::ServiceDiscovery::Service", - "Properties": { - "DnsConfig": { - "DnsRecords": [ - { - "TTL": 60, - "Type": "A" - } - ], - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - }, - "RoutingPolicy": "MULTIVALUE" - }, - "NamespaceId": { - "Fn::GetAtt": [ - "Namespace9B63B8C8", - "Id" - ] - } - } - }, - "HttpProxyPrivateApiA55E154D": { - "Type": "AWS::ApiGatewayV2::Api", - "Properties": { - "Name": "HttpProxyPrivateApi", - "ProtocolType": "HTTP" - } - }, - "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0": { - "Type": "AWS::ApiGatewayV2::Integration", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "IntegrationType": "HTTP_PROXY", - "ConnectionId": { - "Ref": "VpcLink42ED6FF0" - }, - "ConnectionType": "VPC_LINK", - "IntegrationMethod": "ANY", - "IntegrationUri": { - "Fn::GetAtt": [ - "NamespaceServiceCABDF534", - "Arn" - ] - }, - "PayloadFormatVersion": "1.0" - } - }, - "HttpProxyPrivateApiDefaultRoute1BDCA252": { - "Type": "AWS::ApiGatewayV2::Route", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "RouteKey": "$default", - "Target": { - "Fn::Join": [ - "", - [ - "integrations/", - { - "Ref": "HttpProxyPrivateApiDefaultRouteDefaultRouteIntegration0AE210B0" - } - ] - ] - } - } - }, - "HttpProxyPrivateApiDefaultStage18B3706E": { - "Type": "AWS::ApiGatewayV2::Stage", - "Properties": { - "ApiId": { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - "StageName": "$default", - "AutoDeploy": true - } - } - }, - "Outputs": { - "Endpoint": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "HttpProxyPrivateApiA55E154D" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/" - ] - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts deleted file mode 100644 index 1ff64ba5955c9..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/integ.service-discovery.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { HttpApi, VpcLink } from '@aws-cdk/aws-apigatewayv2'; -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; -import { App, CfnOutput, Stack } from '@aws-cdk/core'; -import { HttpServiceDiscoveryIntegration } from '../../lib'; - -const app = new App(); - -const stack = new Stack(app, 'integ-service-discovery-integration'); - -const vpc = new ec2.Vpc(stack, 'VPC'); -const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); -const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { - name: 'foobar.com', - vpc, -}); -const service = namespace.createService('Service'); - -const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', { - defaultIntegration: new HttpServiceDiscoveryIntegration({ - vpcLink, - service, - }), -}); - -new CfnOutput(stack, 'Endpoint', { - value: httpEndpoint.url!, -}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts deleted file mode 100644 index ec537cfedb311..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/nlb.test.ts +++ /dev/null @@ -1,102 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; -import { Stack } from '@aws-cdk/core'; -import { HttpNlbIntegration } from '../../lib'; - -describe('HttpNlbIntegration', () => { - test('default', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); - const listener = lb.addListener('listener', { port: 80 }); - listener.addTargets('target', { port: 80 }); - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new HttpNlbIntegration({ - listener, - }), - routeKey: HttpRouteKey.with('/pets'), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationType: 'HTTP_PROXY', - ConnectionId: { - Ref: 'HttpApiVpcLink159804837', - }, - ConnectionType: 'VPC_LINK', - IntegrationMethod: 'ANY', - IntegrationUri: { - Ref: 'lblistener657ADDEC', - }, - PayloadFormatVersion: '1.0', - }); - }); - - test('able to add a custom vpcLink', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); - const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); - const listener = lb.addListener('listener', { port: 80 }); - listener.addTargets('target', { port: 80 }); - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new HttpNlbIntegration({ - vpcLink, - listener, - }), - routeKey: HttpRouteKey.with('/pets'), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationType: 'HTTP_PROXY', - ConnectionId: { - Ref: 'VpcLink42ED6FF0', - }, - ConnectionType: 'VPC_LINK', - IntegrationMethod: 'ANY', - IntegrationUri: { - Ref: 'lblistener657ADDEC', - }, - PayloadFormatVersion: '1.0', - }); - }); - - - test('method option is correctly recognized', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const lb = new elbv2.NetworkLoadBalancer(stack, 'lb', { vpc }); - const listener = lb.addListener('listener', { port: 80 }); - listener.addTargets('target', { port: 80 }); - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new HttpNlbIntegration({ - listener, - method: HttpMethod.PATCH, - }), - routeKey: HttpRouteKey.with('/pets'), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationMethod: 'PATCH', - }); - }); -}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts deleted file mode 100644 index ce5f269f648a0..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/private/integration.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { HttpApi, HttpRoute, HttpRouteIntegrationBindOptions, HttpRouteIntegrationConfig, HttpRouteKey } from '@aws-cdk/aws-apigatewayv2'; -import { Stack } from '@aws-cdk/core'; -import { HttpPrivateIntegration } from '../../../lib/http/private/integration'; - -describe('HttpPrivateIntegration', () => { - test('throws error if both vpcLink and vpc are not passed', () => { - // GIVEN - const stack = new Stack(); - class DummyPrivateIntegration extends HttpPrivateIntegration { - constructor() { - super(); - } - - public bind(options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig { - const vpcLink = this._configureVpcLink(options, {}); - - return { - method: this.httpMethod, - payloadFormatVersion: this.payloadFormatVersion, - type: this.integrationType, - connectionType: this.connectionType, - connectionId: vpcLink.vpcLinkId, - uri: 'some-uri', - }; - } - } - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - expect(() => new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new DummyPrivateIntegration(), - routeKey: HttpRouteKey.with('/pets'), - })).toThrow(/One of vpcLink or vpc should be provided for private integration/); - }); -}); diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts deleted file mode 100644 index 62097b9d0a3c0..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/http/service-discovery.test.ts +++ /dev/null @@ -1,77 +0,0 @@ -import '@aws-cdk/assert/jest'; -import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey, VpcLink } from '@aws-cdk/aws-apigatewayv2'; -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as servicediscovery from '@aws-cdk/aws-servicediscovery'; -import { Stack } from '@aws-cdk/core'; -import { HttpServiceDiscoveryIntegration } from '../../lib'; - -describe('HttpServiceDiscoveryIntegration', () => { - test('default', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); - const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { - name: 'foobar.com', - vpc, - }); - const service = namespace.createService('Service'); - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new HttpServiceDiscoveryIntegration({ - vpcLink, - service, - }), - routeKey: HttpRouteKey.with('/pets'), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationType: 'HTTP_PROXY', - ConnectionId: { - Ref: 'VpcLink42ED6FF0', - }, - ConnectionType: 'VPC_LINK', - IntegrationMethod: 'ANY', - IntegrationUri: { - 'Fn::GetAtt': [ - 'NamespaceServiceCABDF534', - 'Arn', - ], - }, - PayloadFormatVersion: '1.0', - }); - }); - - test('method option is correctly recognized', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); - const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { - name: 'foobar.com', - vpc, - }); - const service = namespace.createService('Service'); - - // WHEN - const api = new HttpApi(stack, 'HttpApi'); - new HttpRoute(stack, 'HttpProxyPrivateRoute', { - httpApi: api, - integration: new HttpServiceDiscoveryIntegration({ - vpcLink, - service, - method: HttpMethod.PATCH, - }), - routeKey: HttpRouteKey.with('/pets'), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationMethod: 'PATCH', - }); - }); -}); diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index 208271df2a732..e5cf86886aa3d 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -24,8 +24,6 @@ - [Publishing HTTP APIs](#publishing-http-apis) - [Custom Domain](#custom-domain) - [Metrics](#metrics) - - [VPC Link](#vpc-link) - - [Private Integration](#private-integration) ## Introduction @@ -225,28 +223,3 @@ const stage = new HttpStage(stack, 'Stage', { }); const clientErrorMetric = stage.metricClientError(); ``` - -### VPC Link - -Private integrations let HTTP APIs connect with AWS resources that are placed behind a VPC. These are usually Application -Load Balancers, Network Load Balancers or a Cloud Map service. The `VpcLink` construct enables this integration. -The following code creates a `VpcLink` to a private VPC. - -```ts -const vpc = new ec2.Vpc(stack, 'VPC'); -const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); -``` - -Any existing `VpcLink` resource can be imported into the CDK app via the `VpcLink.fromVpcLinkId()`. - -```ts -const awesomeLink = VpcLink.fromVpcLinkId(stack, 'awesome-vpc-link', 'us-east-1_oiuR12Abd'); -``` - -### Private Integration - -Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or -Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by -clients outside of the VPC. - -These integrations can be found in the [APIGatewayV2-Integrations](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-apigatewayv2-integrations-readme.html) constructs library. diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts index 8ea35ab4f1312..ff75808b5a8d6 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts @@ -6,7 +6,6 @@ import { DefaultDomainMappingOptions } from '../http/stage'; import { IHttpRouteIntegration } from './integration'; import { BatchHttpRouteOptions, HttpMethod, HttpRoute, HttpRouteKey } from './route'; import { HttpStage, HttpStageOptions } from './stage'; -import { VpcLink, VpcLinkProps } from './vpc-link'; /** * Represents an HTTP API @@ -74,11 +73,6 @@ export interface IHttpApi extends IResource { * @default - no statistic */ metricLatency(props?: MetricOptions): Metric; - - /** - * Add a new VpcLink - */ - addVpcLink(options: VpcLinkProps): VpcLink } /** @@ -184,7 +178,6 @@ export interface AddRoutesOptions extends BatchHttpRouteOptions { abstract class HttpApiBase extends Resource implements IHttpApi { // note that this is not exported public abstract readonly httpApiId: string; - private vpcLinks: Record = {}; public metric(metricName: string, props?: MetricOptions): Metric { return new Metric({ @@ -218,19 +211,6 @@ abstract class HttpApiBase extends Resource implements IHttpApi { // note that t public metricLatency(props?: MetricOptions): Metric { return this.metric('Latency', props); } - - public addVpcLink(options: VpcLinkProps): VpcLink { - const { vpcId } = options.vpc; - if (vpcId in this.vpcLinks) { - return this.vpcLinks[vpcId]; - } - - const count = Object.keys(this.vpcLinks).length + 1; - const vpcLink = new VpcLink(this, `VpcLink-${count}`, options); - this.vpcLinks[vpcId] = vpcLink; - - return vpcLink; - } } /** diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts index ee07bd7af8ee2..c42e089aa1d08 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/index.ts @@ -4,4 +4,3 @@ export * from './integration'; export * from './integrations'; export * from './stage'; export * from './api-mapping'; -export * from './vpc-link'; diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts index e609c9396c08f..237177f31957a 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts @@ -33,20 +33,6 @@ export enum HttpIntegrationType { HTTP_PROXY = 'HTTP_PROXY', } -/** - * Supported connection types - */ -export enum HttpConnectionType { - /** - * For private connections between API Gateway and resources in a VPC - */ - VPC_LINK = 'VPC_LINK', - /** - * For connections through public routable internet - */ - INTERNET = 'INTERNET', -} - /** * Payload format version for lambda proxy integration * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html @@ -100,20 +86,6 @@ export interface HttpIntegrationProps { */ readonly method?: HttpMethod; - /** - * The ID of the VPC link for a private integration. Supported only for HTTP APIs. - * - * @default - undefined - */ - readonly connectionId?: string; - - /** - * The type of the network connection to the integration endpoint - * - * @default HttpConnectionType.INTERNET - */ - readonly connectionType?: HttpConnectionType; - /** * The version of the payload format * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html @@ -138,8 +110,6 @@ export class HttpIntegration extends Resource implements IHttpIntegration { integrationType: props.integrationType, integrationUri: props.integrationUri, integrationMethod: props.method, - connectionId: props.connectionId, - connectionType: props.connectionType, payloadFormatVersion: props.payloadFormatVersion?.version, }); this.integrationId = integ.ref; @@ -195,20 +165,6 @@ export interface HttpRouteIntegrationConfig { */ readonly method?: HttpMethod; - /** - * The ID of the VPC link for a private integration. Supported only for HTTP APIs. - * - * @default - undefined - */ - readonly connectionId?: string; - - /** - * The type of the network connection to the integration endpoint - * - * @default HttpConnectionType.INTERNET - */ - readonly connectionType?: HttpConnectionType; - /** * Payload format version in the case of lambda proxy integration * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts index e688e78d84921..6f13c46d9e3d5 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/route.ts @@ -120,18 +120,16 @@ export class HttpRoute extends Resource implements IHttpRoute { this.httpApi = props.httpApi; this.path = props.routeKey.path; + let integration: HttpIntegration | undefined; const config = props.integration.bind({ route: this, scope: this, }); - - const integration = new HttpIntegration(this, `${this.node.id}-Integration`, { + integration = new HttpIntegration(this, `${this.node.id}-Integration`, { httpApi: props.httpApi, integrationType: config.type, integrationUri: config.uri, method: config.method, - connectionId: config.connectionId, - connectionType: config.connectionType, payloadFormatVersion: config.payloadFormatVersion, }); diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts deleted file mode 100644 index ac832a730e62c..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/vpc-link.ts +++ /dev/null @@ -1,120 +0,0 @@ -import * as ec2 from '@aws-cdk/aws-ec2'; -import { IResource, Lazy, Resource } from '@aws-cdk/core'; -import { Construct } from 'constructs'; -import { CfnVpcLink } from '../apigatewayv2.generated'; - -/** - * Represents an API Gateway VpcLink - */ -export interface IVpcLink extends IResource { - /** - * Physical ID of the VpcLink resource - * @attribute - */ - readonly vpcLinkId: string; -} - -/** - * Properties for a VpcLink - */ -export interface VpcLinkProps { - /** - * The VPC in which the private resources reside. - */ - readonly vpc: ec2.IVpc; - - /** - * The name used to label and identify the VPC link. - * @default - automatically generated name - */ - readonly vpcLinkName?: string; - - /** - * A list of subnets for the VPC link. - * - * @default - private subnets of the provided VPC. Use `addSubnets` to add more subnets - */ - readonly subnets?: ec2.ISubnet[]; - - /** - * A list of security groups for the VPC link. - * - * @default - no security groups. Use `addSecurityGroups` to add security groups - */ - readonly securityGroups?: ec2.ISecurityGroup[]; -} - - -/** - * Define a new VPC Link - * Specifies an API Gateway VPC link for a HTTP API to access resources in an Amazon Virtual Private Cloud (VPC). - */ -export class VpcLink extends Resource implements IVpcLink { - /** - * Import a VPC Link by its Id - */ - public static fromVpcLinkId(scope: Construct, id: string, vpcLinkId: string): IVpcLink { - class Import extends Resource implements IVpcLink { - public vpcLinkId = vpcLinkId; - } - - return new Import(scope, id); - } - - /** - * Physical ID of the VpcLink resource - * @attribute - */ - public readonly vpcLinkId: string; - - private readonly subnets = new Array(); - private readonly securityGroups = new Array(); - - constructor(scope: Construct, id: string, props: VpcLinkProps) { - super(scope, id); - - const cfnResource = new CfnVpcLink(this, 'Resource', { - name: props.vpcLinkName || Lazy.stringValue({ produce: () => this.node.uniqueId }), - subnetIds: Lazy.listValue({ produce: () => this.renderSubnets() }), - securityGroupIds: Lazy.listValue({ produce: () => this.renderSecurityGroups() }), - }); - - this.vpcLinkId = cfnResource.ref; - - this.addSubnets(...props.vpc.privateSubnets); - - if (props.subnets) { - this.addSubnets(...props.subnets); - } - - if (props.securityGroups) { - this.addSecurityGroups(...props.securityGroups); - } - } - - /** - * Adds the provided subnets to the vpc link - * - * @param subnets - */ - public addSubnets(...subnets: ec2.ISubnet[]) { - this.subnets.push(...subnets); - } - - /** - * Adds the provided security groups to the vpc link - * - * @param groups - */ - public addSecurityGroups(...groups: ec2.ISecurityGroup[]) { - this.securityGroups.push(...groups); - } - - private renderSubnets() { - return this.subnets.map(subnet => subnet.subnetId); - } - - private renderSecurityGroups() { - return this.securityGroups.map(sg => sg.securityGroupId); - } -} diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index 07559822d43fc..7c079b71baab1 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -81,7 +81,6 @@ }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", - "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", @@ -89,7 +88,6 @@ "constructs": "^3.0.4" }, "peerDependencies": { - "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts index bfc9c9102a011..13ee4e120945d 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts @@ -1,7 +1,6 @@ import '@aws-cdk/assert/jest'; import { ABSENT } from '@aws-cdk/assert'; import { Metric } from '@aws-cdk/aws-cloudwatch'; -import * as ec2 from '@aws-cdk/aws-ec2'; import { Code, Function, Runtime } from '@aws-cdk/aws-lambda'; import { Duration, Stack } from '@aws-cdk/core'; import { HttpApi, HttpMethod, LambdaProxyIntegration } from '../../lib'; @@ -234,43 +233,4 @@ describe('HttpApi', () => { Description: 'My Api', }); }); - - test('can add a vpc links', () => { - // GIVEN - const stack = new Stack(); - const api = new HttpApi(stack, 'api'); - const vpc1 = new ec2.Vpc(stack, 'VPC-1'); - const vpc2 = new ec2.Vpc(stack, 'VPC-2'); - - // WHEN - api.addVpcLink({ vpc: vpc1, vpcLinkName: 'Link-1' }); - api.addVpcLink({ vpc: vpc2, vpcLinkName: 'Link-2' }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { - Name: 'Link-1', - }); - expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { - Name: 'Link-2', - }); - }); - - test('should add only one vpc link per vpc', () => { - // GIVEN - const stack = new Stack(); - const api = new HttpApi(stack, 'api'); - const vpc = new ec2.Vpc(stack, 'VPC'); - - // WHEN - api.addVpcLink({ vpc, vpcLinkName: 'Link-1' }); - api.addVpcLink({ vpc, vpcLinkName: 'Link-2' }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { - Name: 'Link-1', - }); - expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink', { - Name: 'Link-2', - }); - }); }); diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts index e250ae153389d..6d125b5eadc6e 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/http/route.test.ts @@ -1,7 +1,7 @@ import '@aws-cdk/assert/jest'; import { Stack } from '@aws-cdk/core'; import { - HttpApi, HttpConnectionType, HttpIntegrationType, HttpMethod, HttpRoute, HttpRouteIntegrationConfig, HttpRouteKey, IHttpRouteIntegration, + HttpApi, HttpIntegrationType, HttpMethod, HttpRoute, HttpRouteIntegrationConfig, HttpRouteKey, IHttpRouteIntegration, PayloadFormatVersion, } from '../../lib'; @@ -77,42 +77,6 @@ describe('HttpRoute', () => { })).toThrowError(/path must always start with a "\/" and not end with a "\/"/); }); - test('configures private integration correctly when all props are passed', () => { - // GIVEN - const stack = new Stack(); - const httpApi = new HttpApi(stack, 'HttpApi'); - - class PrivateIntegration implements IHttpRouteIntegration { - public bind(): HttpRouteIntegrationConfig { - return { - method: HttpMethod.ANY, - payloadFormatVersion: PayloadFormatVersion.VERSION_1_0, - type: HttpIntegrationType.HTTP_PROXY, - connectionId: 'some-connection-id', - connectionType: HttpConnectionType.VPC_LINK, - uri: 'some-target-arn', - }; - } - } - - // WHEN - new HttpRoute(stack, 'HttpRoute', { - httpApi, - integration: new PrivateIntegration(), - routeKey: HttpRouteKey.with('/books', HttpMethod.GET), - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::Integration', { - IntegrationType: 'HTTP_PROXY', - ConnectionId: 'some-connection-id', - ConnectionType: 'VPC_LINK', - IntegrationMethod: 'ANY', - IntegrationUri: 'some-target-arn', - PayloadFormatVersion: '1.0', - }); - expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink'); - }); }); class DummyIntegration implements IHttpRouteIntegration { diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts deleted file mode 100644 index b5f7dc178e458..0000000000000 --- a/packages/@aws-cdk/aws-apigatewayv2/test/http/vpc-link.test.ts +++ /dev/null @@ -1,188 +0,0 @@ -import '@aws-cdk/assert/jest'; -import * as ec2 from '@aws-cdk/aws-ec2'; -import { Stack } from '@aws-cdk/core'; -import { VpcLink } from '../../lib'; - -describe('VpcLink', () => { - test('default setup', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - - // WHEN - new VpcLink(stack, 'VpcLink', { - vpcLinkName: 'MyLink', - vpc, - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { - Name: 'MyLink', - SubnetIds: [ - { - Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', - }, - { - Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', - }, - ], - SecurityGroupIds: [], - }); - }); - - test('subnets and security security groups in props', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const subnet1 = new ec2.Subnet(stack, 'subnet1', { - vpcId: vpc.vpcId, - availabilityZone: vpc.availabilityZones[0], - cidrBlock: vpc.vpcCidrBlock, - }); - const subnet2 = new ec2.Subnet(stack, 'subnet2', { - vpcId: vpc.vpcId, - availabilityZone: vpc.availabilityZones[1], - cidrBlock: vpc.vpcCidrBlock, - }); - const sg1 = new ec2.SecurityGroup(stack, 'SG1', { vpc }); - const sg2 = new ec2.SecurityGroup(stack, 'SG2', { vpc }); - const sg3 = new ec2.SecurityGroup(stack, 'SG3', { vpc }); - - // WHEN - new VpcLink(stack, 'VpcLink', { - vpc, - subnets: [subnet1, subnet2], - securityGroups: [sg1, sg2, sg3], - }); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { - Name: 'VpcLink', - SubnetIds: [ - { - Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', - }, - { - Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', - }, - { - Ref: 'subnet1Subnet16A4B3BD', - }, - { - Ref: 'subnet2SubnetF9569CD3', - }, - ], - SecurityGroupIds: [ - { - 'Fn::GetAtt': [ - 'SG1BA065B6E', - 'GroupId', - ], - }, - { - 'Fn::GetAtt': [ - 'SG20CE3219C', - 'GroupId', - ], - }, - { - 'Fn::GetAtt': [ - 'SG351782A25', - 'GroupId', - ], - }, - ], - }); - }); - - test('subnets can be added using addSubnets', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const subnet = new ec2.Subnet(stack, 'subnet', { - vpcId: vpc.vpcId, - availabilityZone: vpc.availabilityZones[0], - cidrBlock: vpc.vpcCidrBlock, - }); - - // WHEN - const vpcLink = new VpcLink(stack, 'VpcLink', { vpc }); - vpcLink.addSubnets(subnet); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { - Name: 'VpcLink', - SubnetIds: [ - { - Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', - }, - { - Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', - }, - { - Ref: 'subnetSubnet39D20FD5', - }, - ], - }); - }); - - test('security groups can be added using addSecurityGroups', () => { - // GIVEN - const stack = new Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const sg1 = new ec2.SecurityGroup(stack, 'SG1', { vpc }); - const sg2 = new ec2.SecurityGroup(stack, 'SG2', { vpc }); - const sg3 = new ec2.SecurityGroup(stack, 'SG3', { vpc }); - - - // WHEN - const vpcLink = new VpcLink(stack, 'VpcLink', { - vpc, - }); - vpcLink.addSecurityGroups(sg1, sg2, sg3); - - // THEN - expect(stack).toHaveResource('AWS::ApiGatewayV2::VpcLink', { - Name: 'VpcLink', - SubnetIds: [ - { - Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', - }, - { - Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', - }, - ], - SecurityGroupIds: [ - { - 'Fn::GetAtt': [ - 'SG1BA065B6E', - 'GroupId', - ], - }, - { - 'Fn::GetAtt': [ - 'SG20CE3219C', - 'GroupId', - ], - }, - { - 'Fn::GetAtt': [ - 'SG351782A25', - 'GroupId', - ], - }, - ], - }); - }); - - test('importing an existing vpc link', () => { - // GIVEN - const stack = new Stack(); - - // WHEN - VpcLink.fromVpcLinkId(stack, 'ImportedVpcLink', 'vpclink-id'); - - // THEN - expect(stack).not.toHaveResource('AWS::ApiGatewayV2::VpcLink'); - }); -}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts index cf98f4b7cbbd4..17857a2ed4187 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener.ts @@ -106,7 +106,7 @@ export class NetworkListener extends BaseListener implements INetworkListener { /** * The load balancer this listener is attached to */ - public readonly loadBalancer: INetworkLoadBalancer; + private readonly loadBalancer: INetworkLoadBalancer; /** * the protocol of the listener diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 5b627bb924566..aa97148221df2 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -103,7 +103,6 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", - "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index c32c6039b039d..5b27e9a29134b 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -36,7 +36,6 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", - "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 93e7257628021..5a4b67ddce325 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -102,7 +102,6 @@ "@aws-cdk/aws-amplify": "0.0.0", "@aws-cdk/aws-apigateway": "0.0.0", "@aws-cdk/aws-apigatewayv2": "0.0.0", - "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-appconfig": "0.0.0", "@aws-cdk/aws-appflow": "0.0.0", "@aws-cdk/aws-applicationautoscaling": "0.0.0", From 3e33258d6d60b6097d0934c2b9764070dd9f9995 Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Fri, 23 Oct 2020 22:43:58 +0000 Subject: [PATCH 42/45] chore(release): 1.70.0 --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ lerna.json | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e65d57fc71e..6bff410ca51ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,33 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.70.0](https://github.com/aws/aws-cdk/compare/v1.69.0...v1.70.0) (2020-10-23) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **cognito:** the `UserPoolIdentityProviderBase` abstract class has been removed. Use the `UserPoolIdentityProvider*` classes directly. + +### Features + +* **apigatewayv2:** vpc link and private integrations ([#10531](https://github.com/aws/aws-cdk/issues/10531)) ([0537598](https://github.com/aws/aws-cdk/commit/0537598a065c74c713d1ec58c96f09f0d66b12ca)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html/issues/cfn-apigatewayv2) [#10119](https://github.com/aws/aws-cdk/issues/10119) +* **aws-codebuild:** add COMMIT_MESSAGE support for webhook FilterGroup ([#11011](https://github.com/aws/aws-cdk/issues/11011)) ([fd8bce3](https://github.com/aws/aws-cdk/commit/fd8bce3d1409fd66877ca7530f8e74d9d78e0b8a)), closes [#9033](https://github.com/aws/aws-cdk/issues/9033) +* **cloudfront:** brotli compression support ([#10950](https://github.com/aws/aws-cdk/issues/10950)) ([dd81e77](https://github.com/aws/aws-cdk/commit/dd81e77e6ad606c2e76e01de1c7d38b762357d26)), closes [#10947](https://github.com/aws/aws-cdk/issues/10947) +* **cloudfront-origins:** move cloudfront-origins to Developer Preview ([#11005](https://github.com/aws/aws-cdk/issues/11005)) ([6956aad](https://github.com/aws/aws-cdk/commit/6956aadd6043499d8d55ca2d1a8ee65a91ac1bc6)), closes [#10831](https://github.com/aws/aws-cdk/issues/10831) +* **cognito:** Cognito User Pools is now in Generally Available (stable) ([#11003](https://github.com/aws/aws-cdk/issues/11003)) ([7435db8](https://github.com/aws/aws-cdk/commit/7435db853636628a60c8aa465481fc01136aa4a1)) +* **events-targets:** add support for Kinesis Firehose as a target ([#10400](https://github.com/aws/aws-cdk/issues/10400)) ([b93cda6](https://github.com/aws/aws-cdk/commit/b93cda6f528e0e1d98b88ad8407620b8ef472125)), closes [#10349](https://github.com/aws/aws-cdk/issues/10349) +* **lambda-event-sources:** disable source mapping ([#10927](https://github.com/aws/aws-cdk/issues/10927)) ([f4f53a6](https://github.com/aws/aws-cdk/commit/f4f53a65e55d895338aecf8cb63637c6d265b929)), closes [#5750](https://github.com/aws/aws-cdk/issues/5750) + + +### Bug Fixes + +* **cloudfront:** logging bucket uses global domain name ([#10945](https://github.com/aws/aws-cdk/issues/10945)) ([aa3f3fd](https://github.com/aws/aws-cdk/commit/aa3f3fdc92545157205e533e124412d0db08c575)), closes [#10570](https://github.com/aws/aws-cdk/issues/10570) [#10570](https://github.com/aws/aws-cdk/issues/10570) [#10923](https://github.com/aws/aws-cdk/issues/10923) +* **lambda-nodejs:** docker build is not working ([#10885](https://github.com/aws/aws-cdk/issues/10885)) ([191d7b7](https://github.com/aws/aws-cdk/commit/191d7b7706282812878e1aeed79d8f4b39d1f797)), closes [#10881](https://github.com/aws/aws-cdk/issues/10881) [#6](https://github.com/aws/aws-cdk/issues/6) [#8358](https://github.com/aws/aws-cdk/issues/8358) [/github.com/yarnpkg/yarn/issues/8358#issuecomment-700011305](https://github.com/aws//github.com/yarnpkg/yarn/issues/8358/issues/issuecomment-700011305) [/github.com/yarnpkg/yarn/issues/8358#issuecomment-700018785](https://github.com/aws//github.com/yarnpkg/yarn/issues/8358/issues/issuecomment-700018785) +* **ses-actions:** invalid action in policy statement created when using SES S3 action ([#11061](https://github.com/aws/aws-cdk/issues/11061)) ([5dc1d96](https://github.com/aws/aws-cdk/commit/5dc1d96e77ec2359a77aed7266c4e7769d04e084)) + + +* **cognito:** reorganize identity providers structure so that UserPoolIdentityProviderBase is not exported ([#10925](https://github.com/aws/aws-cdk/issues/10925)) ([60f493c](https://github.com/aws/aws-cdk/commit/60f493c9a606162816c14149ea578341ea458a05)) + ## [1.69.0](https://github.com/aws/aws-cdk/compare/v1.68.0...v1.69.0) (2020-10-19) diff --git a/lerna.json b/lerna.json index b19998dd19695..a530390f60415 100644 --- a/lerna.json +++ b/lerna.json @@ -11,5 +11,5 @@ "tools/*" ], "rejectCycles": "true", - "version": "1.69.0" + "version": "1.70.0" } From 7862de1daf39e38a66018a54f3160dcf8ec30da3 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Fri, 23 Oct 2020 15:50:02 -0700 Subject: [PATCH 43/45] fix up CHANGELOG --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bff410ca51ce..3148c7081d3a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,9 @@ All notable changes to this project will be documented in this file. See [standa ### Features * **apigatewayv2:** vpc link and private integrations ([#10531](https://github.com/aws/aws-cdk/issues/10531)) ([0537598](https://github.com/aws/aws-cdk/commit/0537598a065c74c713d1ec58c96f09f0d66b12ca)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html/issues/cfn-apigatewayv2) [#10119](https://github.com/aws/aws-cdk/issues/10119) -* **aws-codebuild:** add COMMIT_MESSAGE support for webhook FilterGroup ([#11011](https://github.com/aws/aws-cdk/issues/11011)) ([fd8bce3](https://github.com/aws/aws-cdk/commit/fd8bce3d1409fd66877ca7530f8e74d9d78e0b8a)), closes [#9033](https://github.com/aws/aws-cdk/issues/9033) * **cloudfront:** brotli compression support ([#10950](https://github.com/aws/aws-cdk/issues/10950)) ([dd81e77](https://github.com/aws/aws-cdk/commit/dd81e77e6ad606c2e76e01de1c7d38b762357d26)), closes [#10947](https://github.com/aws/aws-cdk/issues/10947) * **cloudfront-origins:** move cloudfront-origins to Developer Preview ([#11005](https://github.com/aws/aws-cdk/issues/11005)) ([6956aad](https://github.com/aws/aws-cdk/commit/6956aadd6043499d8d55ca2d1a8ee65a91ac1bc6)), closes [#10831](https://github.com/aws/aws-cdk/issues/10831) +* **codebuild:** add COMMIT_MESSAGE support for webhook FilterGroup ([#11011](https://github.com/aws/aws-cdk/issues/11011)) ([fd8bce3](https://github.com/aws/aws-cdk/commit/fd8bce3d1409fd66877ca7530f8e74d9d78e0b8a)), closes [#9033](https://github.com/aws/aws-cdk/issues/9033) * **cognito:** Cognito User Pools is now in Generally Available (stable) ([#11003](https://github.com/aws/aws-cdk/issues/11003)) ([7435db8](https://github.com/aws/aws-cdk/commit/7435db853636628a60c8aa465481fc01136aa4a1)) * **events-targets:** add support for Kinesis Firehose as a target ([#10400](https://github.com/aws/aws-cdk/issues/10400)) ([b93cda6](https://github.com/aws/aws-cdk/commit/b93cda6f528e0e1d98b88ad8407620b8ef472125)), closes [#10349](https://github.com/aws/aws-cdk/issues/10349) * **lambda-event-sources:** disable source mapping ([#10927](https://github.com/aws/aws-cdk/issues/10927)) ([f4f53a6](https://github.com/aws/aws-cdk/commit/f4f53a65e55d895338aecf8cb63637c6d265b929)), closes [#5750](https://github.com/aws/aws-cdk/issues/5750) @@ -22,8 +22,8 @@ All notable changes to this project will be documented in this file. See [standa ### Bug Fixes -* **cloudfront:** logging bucket uses global domain name ([#10945](https://github.com/aws/aws-cdk/issues/10945)) ([aa3f3fd](https://github.com/aws/aws-cdk/commit/aa3f3fdc92545157205e533e124412d0db08c575)), closes [#10570](https://github.com/aws/aws-cdk/issues/10570) [#10570](https://github.com/aws/aws-cdk/issues/10570) [#10923](https://github.com/aws/aws-cdk/issues/10923) -* **lambda-nodejs:** docker build is not working ([#10885](https://github.com/aws/aws-cdk/issues/10885)) ([191d7b7](https://github.com/aws/aws-cdk/commit/191d7b7706282812878e1aeed79d8f4b39d1f797)), closes [#10881](https://github.com/aws/aws-cdk/issues/10881) [#6](https://github.com/aws/aws-cdk/issues/6) [#8358](https://github.com/aws/aws-cdk/issues/8358) [/github.com/yarnpkg/yarn/issues/8358#issuecomment-700011305](https://github.com/aws//github.com/yarnpkg/yarn/issues/8358/issues/issuecomment-700011305) [/github.com/yarnpkg/yarn/issues/8358#issuecomment-700018785](https://github.com/aws//github.com/yarnpkg/yarn/issues/8358/issues/issuecomment-700018785) +* **cloudfront:** logging bucket uses global domain name ([#10945](https://github.com/aws/aws-cdk/issues/10945)) ([aa3f3fd](https://github.com/aws/aws-cdk/commit/aa3f3fdc92545157205e533e124412d0db08c575)), closes [#10923](https://github.com/aws/aws-cdk/issues/10923) +* **lambda-nodejs:** docker build is not working ([#10885](https://github.com/aws/aws-cdk/issues/10885)) ([191d7b7](https://github.com/aws/aws-cdk/commit/191d7b7706282812878e1aeed79d8f4b39d1f797)), closes [#10881](https://github.com/aws/aws-cdk/issues/10881) * **ses-actions:** invalid action in policy statement created when using SES S3 action ([#11061](https://github.com/aws/aws-cdk/issues/11061)) ([5dc1d96](https://github.com/aws/aws-cdk/commit/5dc1d96e77ec2359a77aed7266c4e7769d04e084)) From 8ac663b0711b386e23c5d433627edfe46986c910 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Fri, 23 Oct 2020 15:51:25 -0700 Subject: [PATCH 44/45] Update CHANGELOG.md extra whitespace --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3148c7081d3a9..64e500406f9ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,8 +25,6 @@ All notable changes to this project will be documented in this file. See [standa * **cloudfront:** logging bucket uses global domain name ([#10945](https://github.com/aws/aws-cdk/issues/10945)) ([aa3f3fd](https://github.com/aws/aws-cdk/commit/aa3f3fdc92545157205e533e124412d0db08c575)), closes [#10923](https://github.com/aws/aws-cdk/issues/10923) * **lambda-nodejs:** docker build is not working ([#10885](https://github.com/aws/aws-cdk/issues/10885)) ([191d7b7](https://github.com/aws/aws-cdk/commit/191d7b7706282812878e1aeed79d8f4b39d1f797)), closes [#10881](https://github.com/aws/aws-cdk/issues/10881) * **ses-actions:** invalid action in policy statement created when using SES S3 action ([#11061](https://github.com/aws/aws-cdk/issues/11061)) ([5dc1d96](https://github.com/aws/aws-cdk/commit/5dc1d96e77ec2359a77aed7266c4e7769d04e084)) - - * **cognito:** reorganize identity providers structure so that UserPoolIdentityProviderBase is not exported ([#10925](https://github.com/aws/aws-cdk/issues/10925)) ([60f493c](https://github.com/aws/aws-cdk/commit/60f493c9a606162816c14149ea578341ea458a05)) ## [1.69.0](https://github.com/aws/aws-cdk/compare/v1.68.0...v1.69.0) (2020-10-19) From d48d64d7d94977bf269d18322711d74e80de4ba2 Mon Sep 17 00:00:00 2001 From: Shiv Lakshminarayan Date: Fri, 23 Oct 2020 15:56:10 -0700 Subject: [PATCH 45/45] Update CHANGELOG.md remove commit that was reverted --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e500406f9ba..0bb4d99fb0643 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,6 @@ All notable changes to this project will be documented in this file. See [standa ### Features -* **apigatewayv2:** vpc link and private integrations ([#10531](https://github.com/aws/aws-cdk/issues/10531)) ([0537598](https://github.com/aws/aws-cdk/commit/0537598a065c74c713d1ec58c96f09f0d66b12ca)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html/issues/cfn-apigatewayv2) [#10119](https://github.com/aws/aws-cdk/issues/10119) * **cloudfront:** brotli compression support ([#10950](https://github.com/aws/aws-cdk/issues/10950)) ([dd81e77](https://github.com/aws/aws-cdk/commit/dd81e77e6ad606c2e76e01de1c7d38b762357d26)), closes [#10947](https://github.com/aws/aws-cdk/issues/10947) * **cloudfront-origins:** move cloudfront-origins to Developer Preview ([#11005](https://github.com/aws/aws-cdk/issues/11005)) ([6956aad](https://github.com/aws/aws-cdk/commit/6956aadd6043499d8d55ca2d1a8ee65a91ac1bc6)), closes [#10831](https://github.com/aws/aws-cdk/issues/10831) * **codebuild:** add COMMIT_MESSAGE support for webhook FilterGroup ([#11011](https://github.com/aws/aws-cdk/issues/11011)) ([fd8bce3](https://github.com/aws/aws-cdk/commit/fd8bce3d1409fd66877ca7530f8e74d9d78e0b8a)), closes [#9033](https://github.com/aws/aws-cdk/issues/9033)